Bug 1406941 - Set opus maxplaybackrate in AudioConduit; r=padenot
authorDan Minor <dminor@mozilla.com>
Mon, 19 Nov 2018 17:01:16 +0000
changeset 503472 c0f52a7424dece45164a7af535a8ce85d0cf0053
parent 503471 c99a8cc72471893a46b15798439eba7549cf7300
child 503473 3f0b3e4421c02371dc83404acb259512a278905b
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1406941
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1406941 - Set opus maxplaybackrate in AudioConduit; r=padenot This was regressed by the branch 64 update. The parameter is used in audio_encoder_opus.cc. Depends on D12014 Differential Revision: https://phabricator.services.mozilla.com/D12015
media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
--- a/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
+++ b/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
@@ -488,16 +488,22 @@ WebrtcAudioConduit::ConfigureRecvMediaCo
     if((condError = ValidateCodecConfig(codec.get(), false)) != kMediaConduitNoError)
     {
       return condError;
     }
 
     webrtc::SdpAudioFormat::Parameters parameters;
     if (codec->mName == "opus") {
       parameters = {{"stereo", "1"}};
+
+      if (codec->mMaxPlaybackRate) {
+        std::ostringstream o;
+        o << codec->mMaxPlaybackRate;
+        parameters["maxplaybackrate"] = o.str();
+      }
     }
 
     webrtc::SdpAudioFormat format(codec->mName, codec->mFreq,
                                   codec->mChannels, parameters);
     mRecvStreamConfig.decoder_map.emplace(codec->mType, format);
 
     mRecvStreamConfig.voe_channel_id = mRecvChannel;
     success = true;