提交 a0d58aef authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Use RtpParameters->GetEncodingMediaSsrc() and clean some logs

上级 5005fa2e
...@@ -298,7 +298,7 @@ namespace RTC ...@@ -298,7 +298,7 @@ namespace RTC
RTC::RTCP::ReceiverReport* report = this->rtpStream->GetRtcpReceiverReport(); RTC::RTCP::ReceiverReport* report = this->rtpStream->GetRtcpReceiverReport();
// TODO: This assumes a single stream for now. // TODO: This assumes a single stream for now.
report->SetSsrc(this->rtpParameters->encodings[0].ssrc); report->SetSsrc(this->rtpParameters->GetEncodingMediaSsrc(0));
packet->AddReceiverReport(report); packet->AddReceiverReport(report);
this->lastRtcpSentTime = now; this->lastRtcpSentTime = now;
......
...@@ -292,7 +292,7 @@ namespace RTC ...@@ -292,7 +292,7 @@ namespace RTC
if (report) if (report)
{ {
// TODO: This assumes a single stream for now. // TODO: This assumes a single stream for now.
uint32_t ssrc = this->rtpParameters->encodings[0].ssrc; uint32_t ssrc = this->rtpParameters->GetEncodingMediaSsrc(0);
std::string cname = this->rtpParameters->rtcp.cname; std::string cname = this->rtpParameters->rtcp.cname;
report->SetSsrc(ssrc); report->SetSsrc(ssrc);
......
...@@ -115,8 +115,7 @@ namespace RTC ...@@ -115,8 +115,7 @@ namespace RTC
// Otherwise just return. // Otherwise just return.
else else
{ {
// TODO: REMOVE MS_DEBUG_DEV("requested packet range not in the buffer");
// MS_WARN_TAG(rtp, "requested packet range not in the buffer");
return; return;
} }
...@@ -135,14 +134,10 @@ namespace RTC ...@@ -135,14 +134,10 @@ namespace RTC
uint8_t bitmask_counter = 0; uint8_t bitmask_counter = 0;
bool too_old_packet_found = false; bool too_old_packet_found = false;
// TODO: REMOVE MS_DEBUG_DEV("loop [bitmask:" UINT16_TO_BINARY_PATTERN "]", UINT16_TO_BINARY(bitmask));
// MS_WARN_TAG(rtcp, "loop [bitmask:" UINT16_TO_BINARY_PATTERN "]", UINT16_TO_BINARY(bitmask));
while (requested || bitmask != 0) while (requested || bitmask != 0)
{ {
// TODO: REMOVE
// MS_WARN_TAG(rtcp, "while [bit:%" PRIu8 ", requested:%d]", bitmask_counter, requested);
bool sent = false; bool sent = false;
if (requested) if (requested)
...@@ -170,8 +165,7 @@ namespace RTC ...@@ -170,8 +165,7 @@ namespace RTC
} }
else if (!too_old_packet_found) else if (!too_old_packet_found)
{ {
// TODO: REMOVE MS_DEBUG_DEV("ignoring retransmission for too old packet [max_age:%" PRIu32 "ms, packet_age:%" PRIu32 "ms]", MAX_RETRANSMISSION_AGE, diff);
// MS_WARN_TAG(rtp, "ignoring retransmission for too old packet [max_age:%" PRIu32 "ms, packet_age:%" PRIu32 "ms]", MAX_RETRANSMISSION_AGE, diff);
too_old_packet_found = true; too_old_packet_found = true;
} }
...@@ -204,11 +198,6 @@ namespace RTC ...@@ -204,11 +198,6 @@ namespace RTC
MS_WARN_TAG(rtcp, "first packet sent but not all the bitmask packets [bitmask:" UINT16_TO_BINARY_PATTERN ", sent:" UINT16_TO_BINARY_PATTERN "]", MS_WARN_TAG(rtcp, "first packet sent but not all the bitmask packets [bitmask:" UINT16_TO_BINARY_PATTERN ", sent:" UINT16_TO_BINARY_PATTERN "]",
UINT16_TO_BINARY(orig_bitmask), UINT16_TO_BINARY(sent_bitmask)); UINT16_TO_BINARY(orig_bitmask), UINT16_TO_BINARY(sent_bitmask));
} }
// TODO: REMOVE
// else if (first_packet_sent && orig_bitmask && orig_bitmask == sent_bitmask)
// {
// MS_WARN_TAG(rtcp, "first packet sent and also all the bitmask packets [bitmask:" UINT16_TO_BINARY_PATTERN "]", UINT16_TO_BINARY(orig_bitmask));
// }
// Set the next container element to null. // Set the next container element to null.
container[container_idx] = nullptr; container[container_idx] = nullptr;
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论