From 6711ff193ae386fe3172224e9ff929c1c6005692 Mon Sep 17 00:00:00 2001 From: Ethan Hugg Date: Mon, 24 Aug 2015 09:31:38 -0700 Subject: [PATCH] Bug 1191301 - Re-enable the use of media.navigator.video.use_tmmbr pref. r=bwc --- .../webrtc/signaling/src/jsep/JsepCodecDescription.h | 12 ++++++------ .../src/peerconnection/PeerConnectionImpl.cpp | 8 ++++++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/media/webrtc/signaling/src/jsep/JsepCodecDescription.h b/media/webrtc/signaling/src/jsep/JsepCodecDescription.h index b0684ff4c37..5d3d46a02cc 100644 --- a/media/webrtc/signaling/src/jsep/JsepCodecDescription.h +++ b/media/webrtc/signaling/src/jsep/JsepCodecDescription.h @@ -204,16 +204,17 @@ struct JsepVideoCodecDescription : public JsepCodecDescription { mMaxMbps(0), mMaxCpb(0), mMaxDpb(0), - mMaxBr(0), - mUseTmmbr(false) + mMaxBr(0) { // Add supported rtcp-fb types mNackFbTypes.push_back(""); mNackFbTypes.push_back(SdpRtcpFbAttributeList::pli); mCcmFbTypes.push_back(SdpRtcpFbAttributeList::fir); - if (mUseTmmbr) { - mCcmFbTypes.push_back(SdpRtcpFbAttributeList::tmmbr); - } + } + + virtual void + EnableTmmbr() { + mCcmFbTypes.push_back(SdpRtcpFbAttributeList::tmmbr); } virtual void @@ -596,7 +597,6 @@ struct JsepVideoCodecDescription : public JsepCodecDescription { uint32_t mMaxCpb; uint32_t mMaxDpb; uint32_t mMaxBr; - bool mUseTmmbr; std::string mSpropParameterSets; }; diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp index a4dcec661b2..ef502cce30d 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp @@ -1059,9 +1059,13 @@ PeerConnectionImpl::ConfigureJsepSessionCodecs() { } - videoCodec.mUseTmmbr = false; + // TMMBR is enabled from a pref in about:config + bool useTmmbr = false; branch->GetBoolPref("media.navigator.video.use_tmmbr", - &videoCodec.mUseTmmbr); + &useTmmbr); + if (useTmmbr) { + videoCodec.EnableTmmbr(); + } } break; case SdpMediaSection::kText: