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

Minimal stuff in RtpStream

上级 d7960a16
...@@ -217,16 +217,17 @@ namespace RTC ...@@ -217,16 +217,17 @@ namespace RTC
// Store in the buffer // Store in the buffer
// TODO: Must check what kind of packet we are storing, right? // TODO: Must check what kind of packet we are storing, right?
// TODO: RtpStream.AddPacket() should return true if the packet is valid and // TODO: RtpStream.ReceivePacket() should return true if the packet is valid and
// false if it must be ignored. // false if it must be ignored.
// TODO: testing for just audio (remove) // TODO: testing for just video (remove)
if (this->kind == RTC::Media::Kind::AUDIO) if (this->kind == RTC::Media::Kind::VIDEO)
{ {
// TODO: Enable when properly implemented. // TODO: Enable when properly implemented.
// if (!this->rtpStream->AddPacket(packet)) if (!this->rtpStream->ReceivePacket(packet))
// return; return;
this->rtpStream->AddPacket(packet); // TODO: REMOVE
// this->rtpStream->ReceivePacket(packet);
} }
// Notify the listener. // Notify the listener.
......
...@@ -47,9 +47,14 @@ namespace RTC ...@@ -47,9 +47,14 @@ namespace RTC
this->probation = MIN_SEQUENTIAL; this->probation = MIN_SEQUENTIAL;
} }
// TODO: If this returns true, store the packet and return true just // If not a valid packet ignore it.
// if it's not a duplicated packet. if (!UpdateSeq(seq))
UpdateSeq(seq); {
// TODO: remove
MS_WARN("invalid packet [seq:%" PRIu16 "]", packet->GetSequenceNumber());
return false;
}
return true; return true;
} }
...@@ -134,7 +139,7 @@ namespace RTC ...@@ -134,7 +139,7 @@ namespace RTC
else else
{ {
// Duplicate or reordered packet. // Duplicate or reordered packet.
// TODO: so what? just return true? // NOTE: This would never happen because libsrtp rejects duplicated packets.
} }
this->received++; this->received++;
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论