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

Consumer: don't ask for full frame when the Producer is resumed (the Producer already does that).

上级 e67eea48
......@@ -23,3 +23,5 @@
* Check H246 parameters.
* JS: Remove tons of useless debugs (for example in `Peer._createProducer()`).
* Producer JS API to request fullframe.
......@@ -56,7 +56,7 @@ namespace RTC
void CreateRtpStream(RTC::RtpEncodingParameters& encoding);
void RetransmitRtpPacket(RTC::RtpPacket* packet);
void Pause();
void Resume();
void Resume(bool sourceWasResumed = false);
public:
// Passed by argument.
......@@ -136,7 +136,7 @@ namespace RTC
this->notifier->Emit(this->consumerId, "sourceresumed");
if (wasPaused)
Resume();
Resume(true);
}
inline uint32_t Consumer::GetTransmissionRate(uint64_t now)
......@@ -152,12 +152,13 @@ namespace RTC
this->rtpStream->Reset();
}
inline void Consumer::Resume()
inline void Consumer::Resume(bool sourceWasResumed)
{
if (!IsEnabled())
return;
RequestFullFrame();
if (!sourceWasResumed)
RequestFullFrame();
}
} // namespace RTC
......
......@@ -170,12 +170,12 @@ namespace RTC
if (wasPaused)
{
RequestFullFrame(true);
for (auto& listener : this->listeners)
{
listener->OnProducerResumed(this);
}
RequestFullFrame(true);
}
break;
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论