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

Add some dev logs

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