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

Add some dev logs

上级 6455d98b
...@@ -127,6 +127,8 @@ namespace RTC ...@@ -127,6 +127,8 @@ namespace RTC
// Create RtpStreamSend instance. // Create RtpStreamSend instance.
CreateRtpStream(this->rtpParameters.encodings[0]); CreateRtpStream(this->rtpParameters.encodings[0]);
MS_DEBUG_DEV("Consumer enabled [consumerId:%" PRIu32 "]", this->consumerId);
} }
void Consumer::Pause() void Consumer::Pause()
...@@ -138,6 +140,8 @@ namespace RTC ...@@ -138,6 +140,8 @@ namespace RTC
this->paused = true; this->paused = true;
MS_DEBUG_DEV("Consumer paused [consumerId:%" PRIu32 "]", this->consumerId);
if (IsEnabled() && !this->sourcePaused) if (IsEnabled() && !this->sourcePaused)
{ {
this->rtpStream->Reset(); this->rtpStream->Reset();
...@@ -153,6 +157,8 @@ namespace RTC ...@@ -153,6 +157,8 @@ namespace RTC
this->paused = false; this->paused = false;
MS_DEBUG_DEV("Consumer resumed [consumerId:%" PRIu32 "]", this->consumerId);
if (IsEnabled() && !this->sourcePaused) if (IsEnabled() && !this->sourcePaused)
{ {
RequestFullFrame(); RequestFullFrame();
...@@ -167,6 +173,9 @@ namespace RTC ...@@ -167,6 +173,9 @@ namespace RTC
return; return;
this->sourcePaused = true; this->sourcePaused = true;
MS_DEBUG_DEV("Consumer source paused [consumerId:%" PRIu32 "]", this->consumerId);
this->notifier->Emit(this->consumerId, "sourcepaused"); this->notifier->Emit(this->consumerId, "sourcepaused");
if (IsEnabled() && !this->paused) if (IsEnabled() && !this->paused)
...@@ -183,6 +192,9 @@ namespace RTC ...@@ -183,6 +192,9 @@ namespace RTC
return; return;
this->sourcePaused = false; this->sourcePaused = false;
MS_DEBUG_DEV("Consumer source resumed [consumerId:%" PRIu32 "]", this->consumerId);
this->notifier->Emit(this->consumerId, "sourceresumed"); this->notifier->Emit(this->consumerId, "sourceresumed");
if (IsEnabled() && !this->paused) if (IsEnabled() && !this->paused)
......
...@@ -194,6 +194,8 @@ namespace RTC ...@@ -194,6 +194,8 @@ namespace RTC
this->ssrcMapping[newEncoding.fec.ssrc] = outputEncoding.fec.ssrc; this->ssrcMapping[newEncoding.fec.ssrc] = outputEncoding.fec.ssrc;
} }
} }
MS_DEBUG_DEV("Producer RTP parameters updated [producerId:%" PRIu32 "]", this->producerId);
} }
void Producer::Pause() void Producer::Pause()
...@@ -205,6 +207,8 @@ namespace RTC ...@@ -205,6 +207,8 @@ namespace RTC
this->paused = true; this->paused = true;
MS_DEBUG_DEV("Producer paused [producerId:%" PRIu32 "]", this->producerId);
for (auto& listener : this->listeners) for (auto& listener : this->listeners)
{ {
listener->OnProducerPaused(this); listener->OnProducerPaused(this);
...@@ -220,6 +224,8 @@ namespace RTC ...@@ -220,6 +224,8 @@ namespace RTC
this->paused = false; this->paused = false;
MS_DEBUG_DEV("Producer resumed [producerId:%" PRIu32 "]", this->producerId);
for (auto& listener : this->listeners) for (auto& listener : this->listeners)
{ {
listener->OnProducerResumed(this); listener->OnProducerResumed(this);
...@@ -232,8 +238,20 @@ namespace RTC ...@@ -232,8 +238,20 @@ namespace RTC
{ {
MS_TRACE(); MS_TRACE();
if (enabled == this->rtpRawEventEnabled)
return;
this->rtpRawEventEnabled = enabled; this->rtpRawEventEnabled = enabled;
if (enabled)
{
MS_DEBUG_DEV("Producer rtpraw event enabled [producerId:%" PRIu32 "]", this->producerId);
}
else
{
MS_DEBUG_DEV("Producer rtpraw event disabled [producerId:%" PRIu32 "]", this->producerId);
}
// If set (and not paused), require a full frame. // If set (and not paused), require a full frame.
if (this->rtpRawEventEnabled && !this->paused) if (this->rtpRawEventEnabled && !this->paused)
RequestFullFrame(true); RequestFullFrame(true);
...@@ -243,8 +261,20 @@ namespace RTC ...@@ -243,8 +261,20 @@ namespace RTC
{ {
MS_TRACE(); MS_TRACE();
if (enabled == this->rtpObjectEventEnabled)
return;
this->rtpObjectEventEnabled = enabled; this->rtpObjectEventEnabled = enabled;
if (enabled)
{
MS_DEBUG_DEV("Producer rtpobject event enabled [producerId:%" PRIu32 "]", this->producerId);
}
else
{
MS_DEBUG_DEV("Producer rtpobject event disabled [producerId:%" PRIu32 "]", this->producerId);
}
// If set (and not paused), require a full frame. // If set (and not paused), require a full frame.
if (this->rtpObjectEventEnabled && !this->paused) if (this->rtpObjectEventEnabled && !this->paused)
RequestFullFrame(true); RequestFullFrame(true);
......
...@@ -490,9 +490,17 @@ namespace RTC ...@@ -490,9 +490,17 @@ namespace RTC
// Start or stop audio levels periodic timer. // Start or stop audio levels periodic timer.
if (enabled) if (enabled)
{
MS_DEBUG_DEV("audiolevels event enabled");
this->audioLevelsTimer->Start(AudioLevelsInterval, AudioLevelsInterval); this->audioLevelsTimer->Start(AudioLevelsInterval, AudioLevelsInterval);
}
else else
{
MS_DEBUG_DEV("audiolevels event disabled");
this->audioLevelsTimer->Stop(); this->audioLevelsTimer->Stop();
}
request->Accept(); request->Accept();
...@@ -516,6 +524,8 @@ namespace RTC ...@@ -516,6 +524,8 @@ namespace RTC
transport->Destroy(); transport->Destroy();
MS_DEBUG_DEV("Transport closed [transportId:%" PRIu32 "]", transport->transportId);
request->Accept(); request->Accept();
break; break;
...@@ -731,6 +741,8 @@ namespace RTC ...@@ -731,6 +741,8 @@ namespace RTC
producer->Destroy(); producer->Destroy();
MS_DEBUG_DEV("Producer closed [producerId:%" PRIu32 "]", producer->producerId);
request->Accept(); request->Accept();
break; break;
......
...@@ -493,6 +493,8 @@ namespace RTC ...@@ -493,6 +493,8 @@ namespace RTC
// Run the DTLS transport if ready. // Run the DTLS transport if ready.
MayRunDtlsTransport(); MayRunDtlsTransport();
MS_DEBUG_DEV("Transport remote DTLS parameters set [transportId:%" PRIu32 "]", this->transportId);
return this->dtlsLocalRole; return this->dtlsLocalRole;
} }
...@@ -507,7 +509,7 @@ namespace RTC ...@@ -507,7 +509,7 @@ namespace RTC
this->maxBitrate = bitrate; this->maxBitrate = bitrate;
MS_DEBUG_TAG(rbe, "transport max bitrate set to %" PRIu32 "bps", this->maxBitrate); MS_DEBUG_TAG(rbe, "Transport max bitrate set to %" PRIu32 "bps", this->maxBitrate);
} }
void Transport::ChangeUfragPwd(std::string& usernameFragment, std::string& password) void Transport::ChangeUfragPwd(std::string& usernameFragment, std::string& password)
...@@ -516,6 +518,8 @@ namespace RTC ...@@ -516,6 +518,8 @@ namespace RTC
this->iceServer->SetUsernameFragment(usernameFragment); this->iceServer->SetUsernameFragment(usernameFragment);
this->iceServer->SetPassword(password); this->iceServer->SetPassword(password);
MS_DEBUG_DEV("Transport ICE ufrag&pwd changed [transportId:%" PRIu32 "]", this->transportId);
} }
void Transport::SendRtpPacket(RTC::RtpPacket* packet) void Transport::SendRtpPacket(RTC::RtpPacket* packet)
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论