Skip to content

Commit

Permalink
EHN: Enable the video message in the messagefactory
Browse files Browse the repository at this point in the history
  • Loading branch information
leochan2009 committed Dec 22, 2017
1 parent c501689 commit 4162c0a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ if (${OpenIGTLink_PROTOCOL_VERSION} GREATER 1)
)
endif (${OpenIGTLink_PROTOCOL_VERSION} GREATER 1)


IF(OpenIGTLink_USE_H264 OR OpenIGTLink_USE_VP9 OR (OpenIGTLink_USE_X265 AND OpenIGTLink_USE_OpenHEVC) AND (${OpenIGTLink_PROTOCOL_VERSION} GREATER 2))
SET(EXAMPLE_DIRS
${EXAMPLE_DIRS}
VideoStreaming
)
IF(${OpenIGTLink_PROTOCOL_VERSION} GREATER 2)
IF(OpenIGTLink_USE_H264 OR OpenIGTLink_USE_VP9 OR (OpenIGTLink_USE_X265 AND OpenIGTLink_USE_OpenHEVC))
SET(EXAMPLE_DIRS
${EXAMPLE_DIRS}
VideoStreaming
)
ENDIF()
ENDIF()


IF(USE_WEBSOCKET)
SET(EXAMPLE_DIRS
${EXAMPLE_DIRS}
Expand Down
8 changes: 8 additions & 0 deletions Source/igtlMessageFactory.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ PURPOSE. See the above copyright notices for more information.
#include "igtlCommandMessage.h"
#endif // OpenIGTLink_PROTOCOL_VERSION >= 3

#if OpenIGTLink_ENABLE_VIDEOSTREAMING && OpenIGTLink_PROTOCOL_VERSION >=3
#include "igtlVideoMessage.h"
#endif

#include "igtl_header.h"

#include <algorithm>
Expand Down Expand Up @@ -87,6 +91,10 @@ MessageFactory::MessageFactory()
this->AddMessageType("COMMAND", (PointerToMessageBaseNew)&igtl::CommandMessage::New);
this->AddMessageType("RTS_COMMAND", (PointerToMessageBaseNew)&igtl::RTSCommandMessage::New);
#endif

#if OpenIGTLink_ENABLE_VIDEOSTREAMING && OpenIGTLink_PROTOCOL_VERSION >=3
this->AddMessageType("VIDEO", (PointerToMessageBaseNew)&igtl::VideoMessage::New);
#endif
}


Expand Down

0 comments on commit 4162c0a

Please sign in to comment.