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

Minimal stuff in RtpStream

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