Pārlūkot izejas kodu

Fixed build with NO_MEDIA

Paul-Louis Ageneau 4 gadi atpakaļ
vecāks
revīzija
c6cd711d74

+ 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 "")
 	add_subdirectory(deps/json)
 	add_subdirectory(examples/client)
+if(NOT NO_MEDIA)
 	add_subdirectory(examples/media)
 	add_subdirectory(examples/sfu-media)
-if(NOT NO_MEDIA)
     add_subdirectory(examples/streamer)
 endif()
 	add_subdirectory(examples/copy-paste)

+ 3 - 1
include/rtc/rtcphandler.hpp

@@ -38,7 +38,9 @@ public:
 	virtual message_ptr outgoing(message_ptr ptr) = 0;
 
 	// 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; }
 };

+ 1 - 0
src/peerconnection.cpp

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

+ 0 - 4
src/rtcpreceivingsession.cpp

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