Bug 1506884 - Remove capture_delay pref; r=padenot
authorDan Minor <dminor@mozilla.com>
Tue, 26 Mar 2019 14:12:00 -0400
changeset 525646 6de9b9ab5d2278200c89bf91300e3f05802a5b81
parent 525645 938699e324d1e7aa5d26e8a2e5ffbf31c896f30f
child 525647 4526b65c502ed7838db645761c0468d6637c112b
child 525728 ad39ab246fc081dd16ff8af35f3704b49272240d
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1506884
milestone68.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 1506884 - Remove capture_delay pref; r=padenot This is no longer used. Differential Revision: https://phabricator.services.mozilla.com/D25057
media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
media/webrtc/signaling/src/media-conduit/AudioConduit.h
modules/libpref/init/all.js
--- a/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
+++ b/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
@@ -359,28 +359,16 @@ MediaConduitErrorCode WebrtcAudioConduit
 
   if (!CodecConfigToWebRTCCodec(codecConfig, mSendStreamConfig)) {
     CSFLogError(LOGTAG, "%s CodecConfig to WebRTC Codec Failed ", __FUNCTION__);
     return kMediaConduitMalformedArgument;
   }
 
   mDtmfEnabled = codecConfig->mDtmfEnabled;
 
-  // TEMPORARY - see bug 694814 comment 2
-  nsresult rv;
-  nsCOMPtr<nsIPrefService> prefs =
-      do_GetService("@mozilla.org/preferences-service;1", &rv);
-  if (NS_SUCCEEDED(rv)) {
-    nsCOMPtr<nsIPrefBranch> branch = do_QueryInterface(prefs);
-
-    if (branch) {
-      branch->GetIntPref("media.peerconnection.capture_delay", &mCaptureDelay);
-    }
-  }
-
   condError = StartTransmitting();
   if (condError != kMediaConduitNoError) {
     return condError;
   }
 
   return kMediaConduitNoError;
 }
 
@@ -566,17 +554,16 @@ MediaConduitErrorCode WebrtcAudioConduit
   }
 
   // if transmission is not started .. conduit cannot insert frames
   if (!mEngineTransmitting) {
     CSFLogError(LOGTAG, "%s Engine not transmitting ", __FUNCTION__);
     return kMediaConduitSessionNotInited;
   }
 
-  capture_delay = mCaptureDelay;
   // Insert the samples
   mPtrVoEBase->audio_transport()->PushCaptureData(
       mSendChannel, audio_data,
       sizeof(audio_data[0]) * 8,  // bits
       samplingFreqHz, channels, lengthSamples);
   // we should be good here
   return kMediaConduitNoError;
 }
--- a/media/webrtc/signaling/src/media-conduit/AudioConduit.h
+++ b/media/webrtc/signaling/src/media-conduit/AudioConduit.h
@@ -186,17 +186,16 @@ class WebrtcAudioConduit : public AudioS
         mSendStream(nullptr),
         mRecvSSRC(0),
         mEngineTransmitting(false),
         mEngineReceiving(false),
         mRecvChannel(-1),
         mSendChannel(-1),
         mDtmfEnabled(false),
         mMutex("WebrtcAudioConduit::mMutex"),
-        mCaptureDelay(150),
         mStsThread(aStsThread) {}
 
   virtual ~WebrtcAudioConduit();
 
   virtual MediaConduitErrorCode Init();
 
   int GetRecvChannel() { return mRecvChannel; }
   webrtc::VoiceEngine* GetVoiceEngine() {
@@ -337,20 +336,16 @@ class WebrtcAudioConduit : public AudioS
   // Accessed on main thread and from audio thread.
   int mSendChannel;
 
   // Accessed only on main thread.
   bool mDtmfEnabled;
 
   Mutex mMutex;
 
-  // Current "capture" delay (really output plus input delay)
-  // Written from main thread. Read from audio thread.
-  int32_t mCaptureDelay;
-
   // Accessed from audio thread.
   webrtc::AudioFrame mAudioFrame;  // for output pulls
 
   // Accessed from both main and mStsThread. Uses locks internally.
   RtpSourceObserver mRtpSourceObserver;
 
   // Socket transport service thread. Any thread.
   const nsCOMPtr<nsIEventTarget> mStsThread;
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -523,29 +523,18 @@ pref("media.getusermedia.aec_enabled", t
 pref("media.getusermedia.noise_enabled", true);
 #endif
 pref("media.getusermedia.use_aec_mobile", false);
 pref("media.getusermedia.aec", 1); // kModerateSuppression
 pref("media.getusermedia.aec_extended_filter", true);
 pref("media.getusermedia.noise", 1); // kModerate
 pref("media.getusermedia.agc_enabled", true);
 pref("media.getusermedia.agc", 1); // kAdaptiveDigital
-// capture_delay: Adjustments for OS-specific input delay (lower bound)
-// playout_delay: Adjustments for OS-specific AudioStream+cubeb+output delay (lower bound)
 // full_duplex: enable cubeb full-duplex capture/playback
 pref("media.navigator.audio.full_duplex", true);
-#if defined(XP_MACOSX)
-pref("media.peerconnection.capture_delay", 50);
-#elif defined(XP_WIN)
-pref("media.peerconnection.capture_delay", 50);
-#elif defined(ANDROID)
-pref("media.peerconnection.capture_delay", 100);
-#else
-pref("media.peerconnection.capture_delay", 70);
-#endif
 #endif
 
 pref("dom.webaudio.enabled", true);
 
 // Exposes the navigator.webdriver attribute.
 pref("dom.webdriver.enabled", true);
 
 #if !defined(ANDROID)