Bug 1164061 - WebRTC - move TMMBR behind pref r=jesup
authorEthan Hugg <ethanhugg@gmail.com>
Tue, 12 May 2015 08:33:48 -0700
changeset 244153 18b0d062f5dd9af3138913e9ad09e63eff4add32
parent 244152 05306872093afaf8591ae63c73519b3151c56870
child 244154 beb2c4d01135febca797f77c87e04c012c3cd773
push id59854
push userrjesup@wgate.com
push dateSat, 16 May 2015 06:18:15 +0000
treeherdermozilla-inbound@beb2c4d01135 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1164061
milestone41.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 1164061 - WebRTC - move TMMBR behind pref r=jesup
media/webrtc/signaling/src/jsep/JsepCodecDescription.h
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
--- a/media/webrtc/signaling/src/jsep/JsepCodecDescription.h
+++ b/media/webrtc/signaling/src/jsep/JsepCodecDescription.h
@@ -319,18 +319,20 @@ struct JsepVideoCodecDescription : publi
   AddRtcpFbs(SdpRtcpFbAttributeList& rtcpfb) const override
   {
     // Just hard code for now
     rtcpfb.PushEntry(mDefaultPt, SdpRtcpFbAttributeList::kNack);
     rtcpfb.PushEntry(
         mDefaultPt, SdpRtcpFbAttributeList::kNack, SdpRtcpFbAttributeList::pli);
     rtcpfb.PushEntry(
         mDefaultPt, SdpRtcpFbAttributeList::kCcm, SdpRtcpFbAttributeList::fir);
-    rtcpfb.PushEntry(
-        mDefaultPt, SdpRtcpFbAttributeList::kCcm, SdpRtcpFbAttributeList::tmmbr);
+    if (mUseTmmbr) {
+      rtcpfb.PushEntry(
+          mDefaultPt, SdpRtcpFbAttributeList::kCcm, SdpRtcpFbAttributeList::tmmbr);
+    }
   }
 
   SdpFmtpAttributeList::H264Parameters
   GetH264Parameters(const std::string& pt,
                     const SdpMediaSection& msection) const
   {
     // Will contain defaults if nothing else
     SdpFmtpAttributeList::H264Parameters result;
@@ -663,16 +665,17 @@ struct JsepVideoCodecDescription : publi
   // H264-specific stuff
   uint32_t mProfileLevelId;
   uint32_t mMaxFr;
   uint32_t mPacketizationMode;
   uint32_t mMaxMbps;
   uint32_t mMaxCpb;
   uint32_t mMaxDpb;
   uint32_t mMaxBr;
+  bool     mUseTmmbr;
   std::string mSpropParameterSets;
 };
 
 struct JsepApplicationCodecDescription : public JsepCodecDescription {
   JsepApplicationCodecDescription(const std::string& defaultPt,
                                   const std::string& name,
                                   uint16_t channels,
                                   bool enabled = true)
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -961,16 +961,20 @@ PeerConnectionImpl::ConfigureJsepSession
             int32_t maxFr = 0;
             branch->GetIntPref("media.navigator.video.max_fr", &maxFr);
             if (maxFr <= 0) {
               maxFr = 60; // We must specify something other than 0
             }
             videoCodec.mMaxFr = maxFr;
 
           }
+
+          videoCodec.mUseTmmbr = false;
+          branch->GetBoolPref("media.navigator.video.use_tmmbr",
+            &videoCodec.mUseTmmbr);
         }
         break;
       case SdpMediaSection::kText:
       case SdpMediaSection::kApplication:
       case SdpMediaSection::kMessage:
         {} // Nothing to configure for these.
     }
   }