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

Fix REMB

上级 5d623558
......@@ -195,6 +195,11 @@ namespace RTC
packet->AddExtensionMapping(
RtpHeaderExtensionUri::Type::RTP_STREAM_ID, this->headerExtensionIds.rid);
}
if (this->headerExtensionIds.absSendTime != 0u)
{
packet->AddExtensionMapping(
RtpHeaderExtensionUri::Type::ABS_SEND_TIME, this->headerExtensionIds.absSendTime);
}
// Get the associated Producer.
RTC::Producer* producer = this->rtpListener.GetProducer(packet);
......
......@@ -201,8 +201,8 @@ namespace RTC
// Let's clone the RTP packet so we can mangle the payload (if needed) and other
// stuff that would change its size.
packet = packet->Clone(ClonedPacketBuffer);
clonedPacket.reset(packet->Clone(ClonedPacketBuffer));
packet = clonedPacket.get();
// Process the packet.
if (!rtpStream->ReceivePacket(packet))
......@@ -214,8 +214,8 @@ namespace RTC
// Let's clone the RTP packet so we can mangle the payload (if needed) and other
// stuff that would change its size.
packet = packet->Clone(ClonedPacketBuffer);
clonedPacket.reset(packet->Clone(ClonedPacketBuffer));
packet = clonedPacket.get();
// Process the packet.
if (!rtpStream->ReceiveRtxPacket(packet))
......
......@@ -708,12 +708,25 @@ namespace RTC
}
// Apply the Transport RTP header extension ids so the RTP listener can use them.
if (this->headerExtensionIds.rid != 0u)
{
packet->AddExtensionMapping(
RtpHeaderExtensionUri::Type::RTP_STREAM_ID, this->headerExtensionIds.rid);
}
if (this->headerExtensionIds.absSendTime != 0u)
{
packet->AddExtensionMapping(
RtpHeaderExtensionUri::Type::ABS_SEND_TIME, this->headerExtensionIds.absSendTime);
}
// Feed the remote bitrate estimator (REMB).
uint32_t absSendTime;
if (packet->ReadAbsSendTime(&absSendTime))
{
this->remoteBitrateEstimator->IncomingPacket(
DepLibUV::GetTime(), packet->GetPayloadLength(), *packet, absSendTime);
}
// Get the associated Producer.
RTC::Producer* producer = this->rtpListener.GetProducer(packet);
......@@ -742,15 +755,6 @@ namespace RTC
// Pass the RTP packet to the corresponding Producer.
producer->ReceiveRtpPacket(packet);
// Feed the remote bitrate estimator (REMB).
uint32_t absSendTime;
if (packet->ReadAbsSendTime(&absSendTime))
{
this->remoteBitrateEstimator->IncomingPacket(
DepLibUV::GetTime(), packet->GetPayloadLength(), *packet, absSendTime);
}
delete packet;
}
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论