Log audio network adaptor and DSCP in AudioSendStream.
Bug: chromium:1086942 Change-Id: I94177a3a0cf10e6af62b7787dcf5d14329443c8a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180661 Reviewed-by: Per Åhgren <peah@webrtc.org> Reviewed-by: Sebastian Jansson <srte@webrtc.org> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31928}
This commit is contained in:
committed by
Commit Bot
parent
00ea6284a6
commit
ed971167dd
@ -638,11 +638,11 @@ bool AudioSendStream::SetupSendCodec(const Config& new_config) {
|
||||
if (new_config.audio_network_adaptor_config) {
|
||||
if (encoder->EnableAudioNetworkAdaptor(
|
||||
*new_config.audio_network_adaptor_config, event_log_)) {
|
||||
RTC_DLOG(LS_INFO) << "Audio network adaptor enabled on SSRC "
|
||||
<< new_config.rtp.ssrc;
|
||||
RTC_LOG(LS_INFO) << "Audio network adaptor enabled on SSRC "
|
||||
<< new_config.rtp.ssrc;
|
||||
} else {
|
||||
RTC_DLOG(LS_INFO) << "Failed to enable Audio network adaptor on SSRC "
|
||||
<< new_config.rtp.ssrc;
|
||||
RTC_LOG(LS_INFO) << "Failed to enable Audio network adaptor on SSRC "
|
||||
<< new_config.rtp.ssrc;
|
||||
}
|
||||
}
|
||||
|
||||
@ -737,18 +737,18 @@ void AudioSendStream::ReconfigureANA(const Config& new_config) {
|
||||
channel_send_->CallEncoder([&](AudioEncoder* encoder) {
|
||||
if (encoder->EnableAudioNetworkAdaptor(
|
||||
*new_config.audio_network_adaptor_config, event_log_)) {
|
||||
RTC_DLOG(LS_INFO) << "Audio network adaptor enabled on SSRC "
|
||||
<< new_config.rtp.ssrc;
|
||||
RTC_LOG(LS_INFO) << "Audio network adaptor enabled on SSRC "
|
||||
<< new_config.rtp.ssrc;
|
||||
} else {
|
||||
RTC_DLOG(LS_INFO) << "Failed to enable Audio network adaptor on SSRC "
|
||||
<< new_config.rtp.ssrc;
|
||||
RTC_LOG(LS_INFO) << "Failed to enable Audio network adaptor on SSRC "
|
||||
<< new_config.rtp.ssrc;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
channel_send_->CallEncoder(
|
||||
[&](AudioEncoder* encoder) { encoder->DisableAudioNetworkAdaptor(); });
|
||||
RTC_DLOG(LS_INFO) << "Audio network adaptor disabled on SSRC "
|
||||
<< new_config.rtp.ssrc;
|
||||
RTC_LOG(LS_INFO) << "Audio network adaptor disabled on SSRC "
|
||||
<< new_config.rtp.ssrc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -366,6 +366,7 @@ TEST(AudioSendStreamTest, ConfigToString) {
|
||||
config.rtp.c_name = kCName;
|
||||
config.min_bitrate_bps = 12000;
|
||||
config.max_bitrate_bps = 34000;
|
||||
config.has_dscp = true;
|
||||
config.send_codec_spec =
|
||||
AudioSendStream::Config::SendCodecSpec(kIsacPayloadType, kIsacFormat);
|
||||
config.send_codec_spec->nack_enabled = true;
|
||||
@ -382,7 +383,8 @@ TEST(AudioSendStreamTest, ConfigToString) {
|
||||
"urn:ietf:params:rtp-hdrext:ssrc-audio-level, id: 2}], "
|
||||
"c_name: foo_name}, rtcp_report_interval_ms: 2500, "
|
||||
"send_transport: null, "
|
||||
"min_bitrate_bps: 12000, max_bitrate_bps: 34000, "
|
||||
"min_bitrate_bps: 12000, max_bitrate_bps: 34000, has "
|
||||
"audio_network_adaptor_config: false, has_dscp: true, "
|
||||
"send_codec_spec: {nack_enabled: true, transport_cc_enabled: false, "
|
||||
"cng_payload_type: 42, red_payload_type: 43, payload_type: 103, "
|
||||
"format: {name: isac, clockrate_hz: 16000, num_channels: 1, "
|
||||
|
||||
@ -34,6 +34,9 @@ std::string AudioSendStream::Config::ToString() const {
|
||||
ss << ", send_transport: " << (send_transport ? "(Transport)" : "null");
|
||||
ss << ", min_bitrate_bps: " << min_bitrate_bps;
|
||||
ss << ", max_bitrate_bps: " << max_bitrate_bps;
|
||||
ss << ", has audio_network_adaptor_config: "
|
||||
<< (audio_network_adaptor_config ? "true" : "false");
|
||||
ss << ", has_dscp: " << (has_dscp ? "true" : "false");
|
||||
ss << ", send_codec_spec: "
|
||||
<< (send_codec_spec ? send_codec_spec->ToString() : "<unset>");
|
||||
ss << '}';
|
||||
|
||||
Reference in New Issue
Block a user