|
@@ -46,7 +46,7 @@ static impl::LogCounter COUNTER_BAD_SCTP_STATUS(plog::warning,
|
|
message_ptr RtcpReceivingSession::outgoing(message_ptr ptr) { return ptr; }
|
|
message_ptr RtcpReceivingSession::outgoing(message_ptr ptr) { return ptr; }
|
|
|
|
|
|
message_ptr RtcpReceivingSession::incoming(message_ptr ptr) {
|
|
message_ptr RtcpReceivingSession::incoming(message_ptr ptr) {
|
|
- if (ptr->type == impl::Message::Type::Binary) {
|
|
|
|
|
|
+ if (ptr->type == impl::Message::Binary) {
|
|
auto rtp = reinterpret_cast<const RTP *>(ptr->data());
|
|
auto rtp = reinterpret_cast<const RTP *>(ptr->data());
|
|
|
|
|
|
// https://tools.ietf.org/html/rfc3550#appendix-A.1
|
|
// https://tools.ietf.org/html/rfc3550#appendix-A.1
|
|
@@ -70,7 +70,7 @@ message_ptr RtcpReceivingSession::incoming(message_ptr ptr) {
|
|
return ptr;
|
|
return ptr;
|
|
}
|
|
}
|
|
|
|
|
|
- assert(ptr->type == impl::Message::Type::Control);
|
|
|
|
|
|
+ assert(ptr->type == impl::Message::Control);
|
|
auto rr = reinterpret_cast<const RTCP_RR *>(ptr->data());
|
|
auto rr = reinterpret_cast<const RTCP_RR *>(ptr->data());
|
|
if (rr->header.payloadType() == 201) {
|
|
if (rr->header.payloadType() == 201) {
|
|
// RR
|
|
// RR
|
|
@@ -100,7 +100,7 @@ void RtcpReceivingSession::requestBitrate(unsigned int newBitrate) {
|
|
}
|
|
}
|
|
|
|
|
|
void RtcpReceivingSession::pushREMB(unsigned int bitrate) {
|
|
void RtcpReceivingSession::pushREMB(unsigned int bitrate) {
|
|
- message_ptr msg = impl::make_message(RTCP_REMB::SizeWithSSRCs(1), impl::Message::Type::Control);
|
|
|
|
|
|
+ message_ptr msg = impl::make_message(RTCP_REMB::SizeWithSSRCs(1), impl::Message::Control);
|
|
auto remb = reinterpret_cast<RTCP_REMB *>(msg->data());
|
|
auto remb = reinterpret_cast<RTCP_REMB *>(msg->data());
|
|
remb->preparePacket(mSsrc, 1, bitrate);
|
|
remb->preparePacket(mSsrc, 1, bitrate);
|
|
remb->setSsrc(0, mSsrc);
|
|
remb->setSsrc(0, mSsrc);
|
|
@@ -109,7 +109,7 @@ void RtcpReceivingSession::pushREMB(unsigned int bitrate) {
|
|
}
|
|
}
|
|
|
|
|
|
void RtcpReceivingSession::pushRR(unsigned int lastSR_delay) {
|
|
void RtcpReceivingSession::pushRR(unsigned int lastSR_delay) {
|
|
- auto msg = impl::make_message(RTCP_RR::SizeWithReportBlocks(1), impl::Message::Type::Control);
|
|
|
|
|
|
+ auto msg = impl::make_message(RTCP_RR::SizeWithReportBlocks(1), impl::Message::Control);
|
|
auto rr = reinterpret_cast<RTCP_RR *>(msg->data());
|
|
auto rr = reinterpret_cast<RTCP_RR *>(msg->data());
|
|
rr->preparePacket(mSsrc, 1);
|
|
rr->preparePacket(mSsrc, 1);
|
|
rr->getReportBlock(0)->preparePacket(mSsrc, 0, 0, uint16_t(mGreatestSeqNo), 0, 0, mSyncNTPTS,
|
|
rr->getReportBlock(0)->preparePacket(mSsrc, 0, 0, uint16_t(mGreatestSeqNo), 0, 0, mSyncNTPTS,
|
|
@@ -135,7 +135,7 @@ bool RtcpReceivingSession::requestKeyframe() {
|
|
}
|
|
}
|
|
|
|
|
|
void RtcpReceivingSession::pushPLI() {
|
|
void RtcpReceivingSession::pushPLI() {
|
|
- auto msg = impl::make_message(RTCP_PLI::Size(), impl::Message::Type::Control);
|
|
|
|
|
|
+ auto msg = impl::make_message(RTCP_PLI::Size(), impl::Message::Control);
|
|
auto *pli = reinterpret_cast<RTCP_PLI *>(msg->data());
|
|
auto *pli = reinterpret_cast<RTCP_PLI *>(msg->data());
|
|
pli->preparePacket(mSsrc);
|
|
pli->preparePacket(mSsrc);
|
|
send(msg);
|
|
send(msg);
|