Skip to content

Commit 4162c0a

Browse files
committed
EHN: Enable the video message in the messagefactory
1 parent c501689 commit 4162c0a

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

Examples/CMakeLists.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@ if (${OpenIGTLink_PROTOCOL_VERSION} GREATER 1)
3030
)
3131
endif (${OpenIGTLink_PROTOCOL_VERSION} GREATER 1)
3232

33-
34-
IF(OpenIGTLink_USE_H264 OR OpenIGTLink_USE_VP9 OR (OpenIGTLink_USE_X265 AND OpenIGTLink_USE_OpenHEVC) AND (${OpenIGTLink_PROTOCOL_VERSION} GREATER 2))
35-
SET(EXAMPLE_DIRS
36-
${EXAMPLE_DIRS}
37-
VideoStreaming
38-
)
33+
IF(${OpenIGTLink_PROTOCOL_VERSION} GREATER 2)
34+
IF(OpenIGTLink_USE_H264 OR OpenIGTLink_USE_VP9 OR (OpenIGTLink_USE_X265 AND OpenIGTLink_USE_OpenHEVC))
35+
SET(EXAMPLE_DIRS
36+
${EXAMPLE_DIRS}
37+
VideoStreaming
38+
)
39+
ENDIF()
3940
ENDIF()
4041

42+
4143
IF(USE_WEBSOCKET)
4244
SET(EXAMPLE_DIRS
4345
${EXAMPLE_DIRS}

Source/igtlMessageFactory.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ PURPOSE. See the above copyright notices for more information.
3636
#include "igtlCommandMessage.h"
3737
#endif // OpenIGTLink_PROTOCOL_VERSION >= 3
3838

39+
#if OpenIGTLink_ENABLE_VIDEOSTREAMING && OpenIGTLink_PROTOCOL_VERSION >=3
40+
#include "igtlVideoMessage.h"
41+
#endif
42+
3943
#include "igtl_header.h"
4044

4145
#include <algorithm>
@@ -87,6 +91,10 @@ MessageFactory::MessageFactory()
8791
this->AddMessageType("COMMAND", (PointerToMessageBaseNew)&igtl::CommandMessage::New);
8892
this->AddMessageType("RTS_COMMAND", (PointerToMessageBaseNew)&igtl::RTSCommandMessage::New);
8993
#endif
94+
95+
#if OpenIGTLink_ENABLE_VIDEOSTREAMING && OpenIGTLink_PROTOCOL_VERSION >=3
96+
this->AddMessageType("VIDEO", (PointerToMessageBaseNew)&igtl::VideoMessage::New);
97+
#endif
9098
}
9199

92100

0 commit comments

Comments
 (0)