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