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

RtpStream: add debug logging

上级 94bce996
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "DepLibUV.h" #include "DepLibUV.h"
#include "Logger.h" #include "Logger.h"
#define MIN_SEQUENTIAL 2 #define MIN_SEQUENTIAL 0
#define MAX_DROPOUT 3000 #define MAX_DROPOUT 3000
#define MAX_MISORDER 100 #define MAX_MISORDER 100
#define RTP_SEQ_MOD (1<<16) #define RTP_SEQ_MOD (1<<16)
...@@ -112,6 +112,8 @@ namespace RTC ...@@ -112,6 +112,8 @@ namespace RTC
// Otherwise just return. // Otherwise just return.
else else
{ {
MS_WARN_TAG(rtp, "requested range not in the buffer");
return; return;
} }
} }
...@@ -124,6 +126,8 @@ namespace RTC ...@@ -124,6 +126,8 @@ namespace RTC
{ {
if (requested) if (requested)
{ {
bool found = false;
for (; buffer_it != this->buffer.end(); ++buffer_it) for (; buffer_it != this->buffer.end(); ++buffer_it)
{ {
auto current_seq32 = (*buffer_it).seq32; auto current_seq32 = (*buffer_it).seq32;
...@@ -131,6 +135,8 @@ namespace RTC ...@@ -131,6 +135,8 @@ namespace RTC
// Found. // Found.
if (current_seq32 == seq32) if (current_seq32 == seq32)
{ {
found = true;
auto current_packet = (*buffer_it).packet; auto current_packet = (*buffer_it).packet;
// Just provide the packet if no older than MAX_RETRANSMISSION_AGE ms. // Just provide the packet if no older than MAX_RETRANSMISSION_AGE ms.
...@@ -150,6 +156,9 @@ namespace RTC ...@@ -150,6 +156,9 @@ namespace RTC
break; break;
} }
} }
if (!found)
MS_WARN_TAG(rtp, "requested packet not found in the buffer");
} }
requested = (bitmask & 1) ? true : false; requested = (bitmask & 1) ? true : false;
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论