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

WIP

上级 b9f7a216
...@@ -79,8 +79,6 @@ namespace RTC ...@@ -79,8 +79,6 @@ namespace RTC
{ {
MS_TRACE(); MS_TRACE();
MS_ERROR("--begin--");
this->nackCount++; this->nackCount++;
for (auto it = nackPacket->Begin(); it != nackPacket->End(); ++it) for (auto it = nackPacket->Begin(); it != nackPacket->End(); ++it)
...@@ -93,8 +91,6 @@ namespace RTC ...@@ -93,8 +91,6 @@ namespace RTC
for (auto* bufferItem : RetransmissionContainer) for (auto* bufferItem : RetransmissionContainer)
{ {
MS_ERROR("-- . --");
if (bufferItem == nullptr) if (bufferItem == nullptr)
break; break;
...@@ -116,8 +112,6 @@ namespace RTC ...@@ -116,8 +112,6 @@ namespace RTC
RTC::RtpStream::PacketRepaired(packet); RTC::RtpStream::PacketRepaired(packet);
} }
} }
MS_ERROR("--end--");
} }
void RtpStreamSend::ReceiveKeyFrameRequest(RTC::RTCP::FeedbackPs::MessageType messageType) void RtpStreamSend::ReceiveKeyFrameRequest(RTC::RTCP::FeedbackPs::MessageType messageType)
...@@ -238,8 +232,6 @@ namespace RTC ...@@ -238,8 +232,6 @@ namespace RTC
*/ */
inline void RtpStreamSend::UpdateBufferStartIdx() inline void RtpStreamSend::UpdateBufferStartIdx()
{ {
MS_ERROR("------- start ------");
uint16_t seq = this->bufferStartIdx + 1; uint16_t seq = this->bufferStartIdx + 1;
for (uint32_t idx{ 0 }; idx < 65536; ++idx, ++seq) for (uint32_t idx{ 0 }; idx < 65536; ++idx, ++seq)
...@@ -255,8 +247,6 @@ namespace RTC ...@@ -255,8 +247,6 @@ namespace RTC
break; break;
} }
} }
MS_ERROR("------- end ------");
} }
void RtpStreamSend::ClearRetransmissionBuffer() void RtpStreamSend::ClearRetransmissionBuffer()
...@@ -334,7 +324,7 @@ namespace RTC ...@@ -334,7 +324,7 @@ namespace RTC
UpdateBufferStartIdx(); UpdateBufferStartIdx();
} }
// Buffer not yet full, add an entry. // Buffer not yet full, add an entry.
else if (this->bufferSize < this->storage.size() - 1) else if (this->bufferSize < this->storage.size())
{ {
MS_ERROR("--3-- seq:%" PRIu16 ", buffer not full yet", packet->GetSequenceNumber()); MS_ERROR("--3-- seq:%" PRIu16 ", buffer not full yet", packet->GetSequenceNumber());
...@@ -366,6 +356,21 @@ namespace RTC ...@@ -366,6 +356,21 @@ namespace RTC
bufferItem.packet = packet->Clone(store); bufferItem.packet = packet->Clone(store);
MS_ERROR("--end-- seq:%" PRIu16, packet->GetSequenceNumber()); MS_ERROR("--end-- seq:%" PRIu16, packet->GetSequenceNumber());
// TODO
MS_ERROR(
"<BUFFER DUMP> bufferStartIdx:%" PRIu16 ", bufferSize:%zu",
this->bufferStartIdx, this->bufferSize);
for (size_t seq{ 0 }; seq < this->buffer.size(); ++seq)
{
auto& bufferItem = this->buffer[seq];
if (bufferItem.packet)
MS_ERROR(" - item buffer with packet: seq:%zu", seq);
}
MS_ERROR("</BUFFER DUMP>");
} }
// This method looks for the requested RTP packets and inserts them into the // This method looks for the requested RTP packets and inserts them into the
...@@ -377,8 +382,6 @@ namespace RTC ...@@ -377,8 +382,6 @@ namespace RTC
{ {
MS_TRACE(); MS_TRACE();
MS_ERROR("--begin-- seq:%" PRIu16, seq);
// Ensure the container's first element is 0. // Ensure the container's first element is 0.
RetransmissionContainer[0] = nullptr; RetransmissionContainer[0] = nullptr;
...@@ -527,8 +530,6 @@ namespace RTC ...@@ -527,8 +530,6 @@ namespace RTC
// Set the next container element to null. // Set the next container element to null.
RetransmissionContainer[containerIdx] = nullptr; RetransmissionContainer[containerIdx] = nullptr;
MS_ERROR("--end-- seq:%" PRIu16, seq);
} }
void RtpStreamSend::UpdateScore(RTC::RTCP::ReceiverReport* report) void RtpStreamSend::UpdateScore(RTC::RTCP::ReceiverReport* report)
......
...@@ -94,7 +94,7 @@ SCENARIO("NACK and RTP packets retransmission", "[rtp][rtcp]") ...@@ -94,7 +94,7 @@ SCENARIO("NACK and RTP packets retransmission", "[rtp][rtcp]")
params.useNack = true; params.useNack = true;
// Create a RtpStreamSend. // Create a RtpStreamSend.
RtpStreamSend* stream = new RtpStreamSend(&testRtpStreamListener, params, 3); RtpStreamSend* stream = new RtpStreamSend(&testRtpStreamListener, params, 5);
// Receive all the packets (some of them not in order and/or duplicated). // Receive all the packets (some of them not in order and/or duplicated).
stream->ReceivePacket(packet1); stream->ReceivePacket(packet1);
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论