mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-08-29 18:39:31 +00:00
Code formatting
This commit is contained in:
@ -22,27 +22,25 @@
|
||||
|
||||
namespace rtc {
|
||||
|
||||
OpusPacketizationHandler::OpusPacketizationHandler(std::shared_ptr<OpusRTPPacketizer> packetizer): RtcpHandler(), RTCPSenderReportable(packetizer->rtpConfig), packetizer(packetizer) {
|
||||
senderReportOutgoingCallback = [this](message_ptr msg) {
|
||||
outgoingCallback(msg);
|
||||
};
|
||||
OpusPacketizationHandler::OpusPacketizationHandler(std::shared_ptr<OpusRTPPacketizer> packetizer)
|
||||
: RtcpHandler(), RTCPSenderReportable(packetizer->rtpConfig), packetizer(packetizer) {
|
||||
senderReportOutgoingCallback = [this](message_ptr msg) { outgoingCallback(msg); };
|
||||
}
|
||||
|
||||
message_ptr OpusPacketizationHandler::incoming(message_ptr ptr) {
|
||||
return ptr;
|
||||
}
|
||||
message_ptr OpusPacketizationHandler::incoming(message_ptr ptr) { return ptr; }
|
||||
|
||||
message_ptr OpusPacketizationHandler::outgoing(message_ptr ptr) {
|
||||
if (ptr->type == Message::Binary) {
|
||||
return withStatsRecording<message_ptr>([this, ptr](std::function<void (message_ptr)> addToReport) {
|
||||
auto rtp = packetizer->packetize(*ptr, false);
|
||||
addToReport(rtp);
|
||||
return rtp;
|
||||
});
|
||||
}
|
||||
return ptr;
|
||||
if (ptr->type == Message::Binary) {
|
||||
return withStatsRecording<message_ptr>(
|
||||
[this, ptr](std::function<void(message_ptr)> addToReport) {
|
||||
auto rtp = packetizer->packetize(*ptr, false);
|
||||
addToReport(rtp);
|
||||
return rtp;
|
||||
});
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace rtc
|
||||
|
||||
#endif /* RTC_ENABLE_MEDIA */
|
||||
|
Reference in New Issue
Block a user