Browse Source

Fixed build with NO_MEDIA

Paul-Louis Ageneau 4 years ago
parent
commit
c6cd711d74
4 changed files with 5 additions and 6 deletions
  1. 1 1
      CMakeLists.txt
  2. 3 1
      include/rtc/rtcphandler.hpp
  3. 1 0
      src/peerconnection.cpp
  4. 0 4
      src/rtcpreceivingsession.cpp

+ 1 - 1
CMakeLists.txt

@@ -312,9 +312,9 @@ if(NOT NO_EXAMPLES AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
 	set(JSON_BuildTests OFF CACHE INTERNAL "")
 	set(JSON_BuildTests OFF CACHE INTERNAL "")
 	add_subdirectory(deps/json)
 	add_subdirectory(deps/json)
 	add_subdirectory(examples/client)
 	add_subdirectory(examples/client)
+if(NOT NO_MEDIA)
 	add_subdirectory(examples/media)
 	add_subdirectory(examples/media)
 	add_subdirectory(examples/sfu-media)
 	add_subdirectory(examples/sfu-media)
-if(NOT NO_MEDIA)
     add_subdirectory(examples/streamer)
     add_subdirectory(examples/streamer)
 endif()
 endif()
 	add_subdirectory(examples/copy-paste)
 	add_subdirectory(examples/copy-paste)

+ 3 - 1
include/rtc/rtcphandler.hpp

@@ -38,7 +38,9 @@ public:
 	virtual message_ptr outgoing(message_ptr ptr) = 0;
 	virtual message_ptr outgoing(message_ptr ptr) = 0;
 
 
 	// This callback is used to send traffic back to the peer.
 	// This callback is used to send traffic back to the peer.
-	void onOutgoing(const std::function<void(message_ptr)> &cb);
+	void onOutgoing(const std::function<void(message_ptr)> &cb) {
+		this->outgoingCallback = synchronized_callback<message_ptr>(cb);
+	}
 
 
 	virtual bool requestKeyframe() { return false; }
 	virtual bool requestKeyframe() { return false; }
 };
 };

+ 1 - 0
src/peerconnection.cpp

@@ -23,6 +23,7 @@
 #include "logcounter.hpp"
 #include "logcounter.hpp"
 #include "processor.hpp"
 #include "processor.hpp"
 #include "threadpool.hpp"
 #include "threadpool.hpp"
+#include "rtp.hpp"
 
 
 #include "dtlstransport.hpp"
 #include "dtlstransport.hpp"
 #include "icetransport.hpp"
 #include "icetransport.hpp"

+ 0 - 4
src/rtcpreceivingsession.cpp

@@ -137,10 +137,6 @@ void RtcpReceivingSession::pushPLI() {
 	send(msg);
 	send(msg);
 }
 }
 
 
-void RtcpHandler::onOutgoing(const std::function<void(message_ptr)> &cb) {
-	this->outgoingCallback = synchronized_callback<message_ptr>(cb);
-}
-
 } // namespace rtc
 } // namespace rtc
 
 
 #endif // RTC_ENABLE_MEDIA
 #endif // RTC_ENABLE_MEDIA