From 4d228e855b92ef3c9d31332da7514e4636a7fd36 Mon Sep 17 00:00:00 2001 From: Arda Cinar Date: Mon, 23 Oct 2023 13:36:02 +0000 Subject: [PATCH] Rename PliResponder => PliHandler Though I'm still not quite sure about the name since it's not exactly pli specific --- CMakeLists.txt | 4 ++-- include/rtc/{pliresponder.hpp => plihandler.hpp} | 4 ++-- include/rtc/rtc.hpp | 2 +- src/{pliresponder.cpp => plihandler.cpp} | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) rename include/rtc/{pliresponder.hpp => plihandler.hpp} (88%) rename src/{pliresponder.cpp => plihandler.cpp} (83%) diff --git a/CMakeLists.txt b/CMakeLists.txt index b4169d54b..2f3cd787b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 @@ -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 diff --git a/include/rtc/pliresponder.hpp b/include/rtc/plihandler.hpp similarity index 88% rename from include/rtc/pliresponder.hpp rename to include/rtc/plihandler.hpp index c95d5620c..cb037f1a4 100644 --- a/include/rtc/pliresponder.hpp +++ b/include/rtc/plihandler.hpp @@ -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 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 onPli); + PliHandler(std::function onPli); ChainedIncomingControlProduct processIncomingControlMessage(message_ptr) override; }; diff --git a/include/rtc/rtc.hpp b/include/rtc/rtc.hpp index a60e4b239..951d63304 100644 --- a/include/rtc/rtc.hpp +++ b/include/rtc/rtc.hpp @@ -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" diff --git a/src/pliresponder.cpp b/src/plihandler.cpp similarity index 83% rename from src/pliresponder.cpp rename to src/plihandler.cpp index f4f1b9a6b..d10770a04 100644 --- a/src/pliresponder.cpp +++ b/src/plihandler.cpp @@ -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()) { @@ -37,7 +37,7 @@ ChainedIncomingControlProduct PliResponder::processIncomingControlMessage(messag return { message, std::nullopt }; } -PliResponder::PliResponder(std::function onPli) : onPli(onPli) { } +PliHandler::PliHandler(std::function onPli) : onPli(onPli) { } }