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

Producer/Consumer: ignore RequestFullFrame() if paused.

上级 21eb34d3
...@@ -42,11 +42,11 @@ namespace RTC ...@@ -42,11 +42,11 @@ namespace RTC
void Resume(); void Resume();
void SourcePause(); void SourcePause();
void SourceResume(); void SourceResume();
void SourceRtpParametersUpdated();
void Disable(); void Disable();
bool IsEnabled() const; bool IsEnabled() const;
const RTC::RtpParameters& GetParameters() const; const RTC::RtpParameters& GetParameters() const;
bool IsPaused() const; bool IsPaused() const;
void SourceRtpParametersUpdated();
void SendRtpPacket(RTC::RtpPacket* packet); void SendRtpPacket(RTC::RtpPacket* packet);
void GetRtcp(RTC::RTCP::CompoundPacket* packet, uint64_t now); void GetRtcp(RTC::RTCP::CompoundPacket* packet, uint64_t now);
void ReceiveNack(RTC::RTCP::FeedbackRtpNackPacket* nackPacket); void ReceiveNack(RTC::RTCP::FeedbackRtpNackPacket* nackPacket);
...@@ -112,11 +112,6 @@ namespace RTC ...@@ -112,11 +112,6 @@ namespace RTC
return this->paused || this->sourcePaused; return this->paused || this->sourcePaused;
} }
inline void Consumer::SourceRtpParametersUpdated()
{
// TODO: Set special flag to be ready for random seq numbers.
}
inline uint32_t Consumer::GetTransmissionRate(uint64_t now) inline uint32_t Consumer::GetTransmissionRate(uint64_t now)
{ {
return this->transmittedCounter.GetRate(now) + this->retransmittedCounter.GetRate(now); return this->transmittedCounter.GetRate(now) + this->retransmittedCounter.GetRate(now);
......
...@@ -191,6 +191,11 @@ namespace RTC ...@@ -191,6 +191,11 @@ namespace RTC
} }
} }
void Consumer::SourceRtpParametersUpdated()
{
// TODO: Set special flag to be ready for random seq numbers.
}
/** /**
* Called when the Transport assigned to this Consumer has been closed, so this * Called when the Transport assigned to this Consumer has been closed, so this
* Consumer becomes unhandled. * Consumer becomes unhandled.
...@@ -331,7 +336,7 @@ namespace RTC ...@@ -331,7 +336,7 @@ namespace RTC
if (!IsEnabled()) if (!IsEnabled())
return; return;
if (this->kind == RTC::Media::Kind::AUDIO) if (this->kind == RTC::Media::Kind::AUDIO || IsPaused())
return; return;
for (auto& listener : this->listeners) for (auto& listener : this->listeners)
......
...@@ -184,12 +184,16 @@ namespace RTC ...@@ -184,12 +184,16 @@ namespace RTC
this->ssrcMapping[newEncoding.ssrc] = outputEncoding.ssrc; this->ssrcMapping[newEncoding.ssrc] = outputEncoding.ssrc;
} }
if (outputEncoding.hasRtx && newEncoding.hasRtx && outputEncoding.rtx.ssrc != newEncoding.rtx.ssrc) if (
outputEncoding.hasRtx && newEncoding.hasRtx &&
outputEncoding.rtx.ssrc != newEncoding.rtx.ssrc)
{ {
this->ssrcMapping[newEncoding.rtx.ssrc] = outputEncoding.rtx.ssrc; this->ssrcMapping[newEncoding.rtx.ssrc] = outputEncoding.rtx.ssrc;
} }
if (outputEncoding.hasFec && newEncoding.hasFec && outputEncoding.fec.ssrc != newEncoding.fec.ssrc) if (
outputEncoding.hasFec && newEncoding.hasFec &&
outputEncoding.fec.ssrc != newEncoding.fec.ssrc)
{ {
this->ssrcMapping[newEncoding.fec.ssrc] = outputEncoding.fec.ssrc; this->ssrcMapping[newEncoding.fec.ssrc] = outputEncoding.fec.ssrc;
} }
...@@ -402,7 +406,7 @@ namespace RTC ...@@ -402,7 +406,7 @@ namespace RTC
{ {
MS_TRACE(); MS_TRACE();
if (this->kind == RTC::Media::Kind::AUDIO) if (this->kind == RTC::Media::Kind::AUDIO || this->paused)
return; return;
if (force) if (force)
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论