Skip to content

Commit

Permalink
Rename PliResponder => PliHandler
Browse files Browse the repository at this point in the history
Though I'm still not quite sure about the name since it's not exactly pli specific
  • Loading branch information
kuzux committed Oct 23, 2023
1 parent 4467271 commit 4d228e8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ set(LIBDATACHANNEL_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/rtcpnackresponder.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/rtp.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/capi.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pliresponder.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/plihandler.cpp
)

set(LIBDATACHANNEL_HEADERS
Expand Down Expand Up @@ -133,7 +133,7 @@ set(LIBDATACHANNEL_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/include/rtc/mediahandlerrootelement.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/rtc/rtcpnackresponder.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/rtc/utils.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/rtc/pliresponder.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/rtc/plihandler.hpp
)

set(LIBDATACHANNEL_IMPL_SOURCES
Expand Down
4 changes: 2 additions & 2 deletions include/rtc/pliresponder.hpp → include/rtc/plihandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ namespace rtc {

/// Responds to PLI and FIR messages sent by the receiver. The sender should respond to these
/// messages by sending an intra.
class RTC_CPP_EXPORT PliResponder final : public MediaHandlerElement {
class RTC_CPP_EXPORT PliHandler final : public MediaHandlerElement {
std::function<void(void)> onPli;

public:
/// 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
PliResponder(std::function<void(void)> onPli);
PliHandler(std::function<void(void)> onPli);
ChainedIncomingControlProduct processIncomingControlMessage(message_ptr) override;
};

Expand Down
2 changes: 1 addition & 1 deletion include/rtc/rtc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "rtcpreceivingsession.hpp"
#include "rtcpsrreporter.hpp"

#include "pliresponder.hpp"
#include "plihandler.hpp"

// Opus/AAC/h264/h265/AV1 streaming
#include "aacrtppacketizer.hpp"
Expand Down
6 changes: 3 additions & 3 deletions src/pliresponder.cpp → src/plihandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

#include "pliresponder.hpp"
#include "plihandler.hpp"

#if RTC_ENABLE_MEDIA

namespace rtc {

ChainedIncomingControlProduct PliResponder::processIncomingControlMessage(message_ptr message) {
ChainedIncomingControlProduct PliHandler::processIncomingControlMessage(message_ptr message) {
size_t offset = 0;

while ((sizeof(RtcpHeader) + offset) <= message->size()) {
Expand All @@ -37,7 +37,7 @@ ChainedIncomingControlProduct PliResponder::processIncomingControlMessage(messag
return { message, std::nullopt };
}

PliResponder::PliResponder(std::function<void(void)> onPli) : onPli(onPli) { }
PliHandler::PliHandler(std::function<void(void)> onPli) : onPli(onPli) { }

}

Expand Down

0 comments on commit 4d228e8

Please sign in to comment.