Browse Source

Fix the std::function / rtc::synchronized_callback mixup

Arda Cinar 1 year ago
parent
commit
f6650bb72e
2 changed files with 3 additions and 3 deletions
  1. 2 2
      include/rtc/plihandler.hpp
  2. 1 1
      src/plihandler.cpp

+ 2 - 2
include/rtc/plihandler.hpp

@@ -20,12 +20,12 @@ namespace rtc {
 /// Responds to PLI and FIR messages sent by the receiver. The sender should respond to these
 /// Responds to PLI and FIR messages sent by the receiver. The sender should respond to these
 /// messages by sending an intra. 
 /// messages by sending an intra. 
 class RTC_CPP_EXPORT PliHandler final : public MediaHandlerElement {
 class RTC_CPP_EXPORT PliHandler final : public MediaHandlerElement {
-    std::function<void(void)> mOnPli;
+    rtc::synchronized_callback<> mOnPli;
 
 
 public:
 public:
 	/// Constructs the PLIResponder object to notify whenever a new intra frame is requested
 	/// Constructs the PLIResponder object to notify whenever a new intra frame is requested
 	/// @param onPli The callback that gets called whenever an intra frame is requested by the receiver
 	/// @param onPli The callback that gets called whenever an intra frame is requested by the receiver
-    PliHandler(rtc::synchronized_callback<> onPli);
+    PliHandler(std::function<void(void)> onPli);
     ChainedIncomingControlProduct processIncomingControlMessage(message_ptr) override;
     ChainedIncomingControlProduct processIncomingControlMessage(message_ptr) override;
 };
 };
 
 

+ 1 - 1
src/plihandler.cpp

@@ -37,7 +37,7 @@ ChainedIncomingControlProduct PliHandler::processIncomingControlMessage(message_
 	return { message, std::nullopt };
 	return { message, std::nullopt };
 }
 }
 
 
-PliHandler::PliHandler(rtc::synchronized_callback<> onPli) : mOnPli(onPli) { }
+PliHandler::PliHandler(std::function<void(void)> onPli) : mOnPli(onPli) { }
 
 
 }
 }