Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Unified Diff: webrtc/audio/audio_send_stream.cc

Issue 2772773002: Adding cbr support for Opus (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/audio/audio_send_stream.cc
diff --git a/webrtc/audio/audio_send_stream.cc b/webrtc/audio/audio_send_stream.cc
index 438d1cc78a5aca5d7657b6368bfbac03fa5aed8e..b713542824906650650061f315f02e0cf45ddb7d 100644
--- a/webrtc/audio/audio_send_stream.cc
+++ b/webrtc/audio/audio_send_stream.cc
@@ -303,13 +303,18 @@ bool AudioSendStream::SetupSendCodec() {
}
}
- // DTX and maxplaybackrate are only set if current codec is Opus.
+ // DTX, CBR, and maxplaybackrate are only set if current codec is Opus.
if (IsCodec(send_codec_spec.codec_inst, kOpusCodecName)) {
if (!channel_proxy_->SetOpusDtx(send_codec_spec.enable_opus_dtx)) {
LOG(LS_WARNING) << "SetOpusDtx() failed.";
return false;
}
+ if (!channel_proxy_->SetOpusCbr(send_codec_spec.enable_opus_cbr)) {
+ LOG(LS_WARNING) << "SetOpusCbr() failed.";
+ return false;
+ }
+
// If opus_max_playback_rate <= 0, the default maximum playback rate
// (48 kHz) will be used.
if (send_codec_spec.opus_max_playback_rate > 0) {

Powered by Google App Engine
This is Rietveld 408576698