mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Backed out changeset 4b22bd7b7a73 (bug 1221587)
--HG-- extra : commitid : K0g4NPkKZW6
This commit is contained in:
parent
b8d7a67ec2
commit
e8203da294
@ -845,7 +845,6 @@ public:
|
||||
bool mEchoOn;
|
||||
bool mAgcOn;
|
||||
bool mNoiseOn;
|
||||
bool mFullDuplex;
|
||||
uint32_t mEcho;
|
||||
uint32_t mAgc;
|
||||
uint32_t mNoise;
|
||||
@ -1520,7 +1519,6 @@ MediaManager::MediaManager()
|
||||
mPrefs.mHeight = 0; // adaptive default
|
||||
mPrefs.mFPS = MediaEngine::DEFAULT_VIDEO_FPS;
|
||||
mPrefs.mMinFPS = MediaEngine::DEFAULT_VIDEO_MIN_FPS;
|
||||
mPrefs.mFullDuplex = false;
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPrefService> prefs = do_GetService("@mozilla.org/preferences-service;1", &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
@ -1529,9 +1527,8 @@ MediaManager::MediaManager()
|
||||
GetPrefs(branch, nullptr);
|
||||
}
|
||||
}
|
||||
LOG(("%s: default prefs: %dx%d @%dfps (min %d), %dHz test tones, %sfull-duplex", __FUNCTION__,
|
||||
mPrefs.mWidth, mPrefs.mHeight, mPrefs.mFPS, mPrefs.mMinFPS, mPrefs.mFreq,
|
||||
mPrefs.mFullDuplex ? "" : "not "));
|
||||
LOG(("%s: default prefs: %dx%d @%dfps (min %d), %dHz test tones", __FUNCTION__,
|
||||
mPrefs.mWidth, mPrefs.mHeight, mPrefs.mFPS, mPrefs.mMinFPS, mPrefs.mFreq));
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(MediaManager, nsIMediaManagerService, nsIObserver)
|
||||
@ -1593,8 +1590,6 @@ MediaManager::Get() {
|
||||
prefs->AddObserver("media.navigator.video.default_height", sSingleton, false);
|
||||
prefs->AddObserver("media.navigator.video.default_fps", sSingleton, false);
|
||||
prefs->AddObserver("media.navigator.video.default_minfps", sSingleton, false);
|
||||
prefs->AddObserver("media.navigator.audio.fake_frequency", sSingleton, false);
|
||||
prefs->AddObserver("media.navigator.audio.full_duplex", sSingleton, false);
|
||||
}
|
||||
|
||||
// Prepare async shutdown
|
||||
@ -2628,7 +2623,6 @@ MediaManager::GetPrefs(nsIPrefBranch *aBranch, const char *aData)
|
||||
GetPref(aBranch, "media.navigator.video.default_fps", aData, &mPrefs.mFPS);
|
||||
GetPref(aBranch, "media.navigator.video.default_minfps", aData, &mPrefs.mMinFPS);
|
||||
GetPref(aBranch, "media.navigator.audio.fake_frequency", aData, &mPrefs.mFreq);
|
||||
GetPrefBool(aBranch, "media.navigator.audio.full_duplex", aData, &mPrefs.mFullDuplex);
|
||||
}
|
||||
|
||||
void
|
||||
@ -2655,7 +2649,6 @@ MediaManager::Shutdown()
|
||||
prefs->RemoveObserver("media.navigator.video.default_fps", this);
|
||||
prefs->RemoveObserver("media.navigator.video.default_minfps", this);
|
||||
prefs->RemoveObserver("media.navigator.audio.fake_frequency", this);
|
||||
prefs->RemoveObserver("media.navigator.audio.full_duplex", this);
|
||||
}
|
||||
|
||||
// Close off any remaining active windows.
|
||||
@ -3129,10 +3122,10 @@ MediaManager::IsActivelyCapturingOrHasAPermission(uint64_t aWindowId)
|
||||
|
||||
void
|
||||
GetUserMediaCallbackMediaStreamListener::AudioConfig(bool aEchoOn,
|
||||
uint32_t aEcho,
|
||||
bool aAgcOn, uint32_t aAGC,
|
||||
bool aNoiseOn, uint32_t aNoise,
|
||||
int32_t aPlayoutDelay)
|
||||
uint32_t aEcho,
|
||||
bool aAgcOn, uint32_t aAGC,
|
||||
bool aNoiseOn, uint32_t aNoise,
|
||||
int32_t aPlayoutDelay)
|
||||
{
|
||||
if (mAudioDevice) {
|
||||
#ifdef MOZ_WEBRTC
|
||||
|
@ -216,7 +216,6 @@ public:
|
||||
, mFPS(0)
|
||||
, mMinFPS(0)
|
||||
, mFreq(0)
|
||||
, mFullDuplex(false)
|
||||
{}
|
||||
|
||||
int32_t mWidth;
|
||||
@ -224,7 +223,6 @@ public:
|
||||
int32_t mFPS;
|
||||
int32_t mMinFPS;
|
||||
int32_t mFreq; // for test tones (fake:true)
|
||||
bool mFullDuplex;
|
||||
|
||||
// mWidth and/or mHeight may be zero (=adaptive default), so use functions.
|
||||
|
||||
|
@ -51,8 +51,7 @@ MediaEngineWebRTC::MediaEngineWebRTC(MediaEnginePrefs &aPrefs)
|
||||
: mMutex("mozilla::MediaEngineWebRTC"),
|
||||
mVoiceEngine(nullptr),
|
||||
mAudioInput(nullptr),
|
||||
mAudioEngineInit(false),
|
||||
mFullDuplex(aPrefs.mFullDuplex)
|
||||
mAudioEngineInit(false)
|
||||
{
|
||||
#ifndef MOZ_B2G_CAMERA
|
||||
nsCOMPtr<nsIComponentRegistrar> compMgr;
|
||||
@ -288,8 +287,7 @@ MediaEngineWebRTC::EnumerateAudioDevices(dom::MediaSourceEnum aMediaSource,
|
||||
}
|
||||
|
||||
if (!mAudioInput) {
|
||||
if (mFullDuplex) {
|
||||
// The platform_supports_full_duplex.
|
||||
if (true /*platform_supports_full_duplex*/) {
|
||||
mAudioInput = new mozilla::AudioInputCubeb(mVoiceEngine);
|
||||
} else {
|
||||
mAudioInput = new mozilla::AudioInputWebRTC(mVoiceEngine);
|
||||
@ -332,10 +330,8 @@ MediaEngineWebRTC::EnumerateAudioDevices(dom::MediaSourceEnum aMediaSource,
|
||||
aASources->AppendElement(aSource.get());
|
||||
} else {
|
||||
AudioInput* audioinput = mAudioInput;
|
||||
if (mFullDuplex) {
|
||||
// The platform_supports_full_duplex.
|
||||
|
||||
// For cubeb, it has state (the selected ID)
|
||||
if (true /*platform_supports_full_duplex*/) {
|
||||
// For cubeb, it has state (the selected ID
|
||||
// XXX just use the uniqueID for cubeb and support it everywhere, and get rid of this
|
||||
// XXX Small window where the device list/index could change!
|
||||
audioinput = new mozilla::AudioInputCubeb(mVoiceEngine);
|
||||
|
@ -526,7 +526,7 @@ private:
|
||||
webrtc::VoiceEngine* mVoiceEngine;
|
||||
RefPtr<mozilla::AudioInput> mAudioInput;
|
||||
bool mAudioEngineInit;
|
||||
bool mFullDuplex;
|
||||
|
||||
bool mHasTabVideoSource;
|
||||
|
||||
// Store devices we've already seen in a hashtable for quick return.
|
||||
|
@ -202,11 +202,10 @@ MediaEngineWebRTCMicrophoneSource::Config(bool aEchoOn, uint32_t aEcho,
|
||||
bool aNoiseOn, uint32_t aNoise,
|
||||
int32_t aPlayoutDelay)
|
||||
{
|
||||
LOG(("Audio config: aec: %d, agc: %d, noise: %d, delay: %d",
|
||||
LOG(("Audio config: aec: %d, agc: %d, noise: %d",
|
||||
aEchoOn ? aEcho : -1,
|
||||
aAgcOn ? aAGC : -1,
|
||||
aNoiseOn ? aNoise : -1,
|
||||
aPlayoutDelay));
|
||||
aNoiseOn ? aNoise : -1));
|
||||
|
||||
bool update_echo = (mEchoOn != aEchoOn);
|
||||
bool update_agc = (mAgcOn != aAgcOn);
|
||||
|
@ -438,33 +438,27 @@ pref("media.getusermedia.aec_delay_agnostic", true);
|
||||
pref("media.getusermedia.noise", 1);
|
||||
pref("media.getusermedia.agc_enabled", false);
|
||||
pref("media.getusermedia.agc", 1);
|
||||
// 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
|
||||
// Adjustments for OS-specific input delay (lower bound)
|
||||
// Adjustments for OS-specific AudioStream+cubeb+output delay (lower bound)
|
||||
#if defined(XP_MACOSX)
|
||||
pref("media.peerconnection.capture_delay", 50);
|
||||
pref("media.getusermedia.playout_delay", 10);
|
||||
pref("media.navigator.audio.full_duplex", false);
|
||||
#elif defined(XP_WIN)
|
||||
pref("media.peerconnection.capture_delay", 50);
|
||||
pref("media.getusermedia.playout_delay", 40);
|
||||
pref("media.navigator.audio.full_duplex", false);
|
||||
#elif defined(ANDROID)
|
||||
pref("media.peerconnection.capture_delay", 100);
|
||||
pref("media.getusermedia.playout_delay", 100);
|
||||
pref("media.navigator.audio.full_duplex", false);
|
||||
// Whether to enable Webrtc Hardware acceleration support
|
||||
pref("media.navigator.hardware.vp8_encode.acceleration_enabled", false);
|
||||
pref("media.navigator.hardware.vp8_decode.acceleration_enabled", false);
|
||||
#elif defined(XP_LINUX)
|
||||
pref("media.peerconnection.capture_delay", 70);
|
||||
pref("media.getusermedia.playout_delay", 50);
|
||||
pref("media.navigator.audio.full_duplex", false);
|
||||
#else
|
||||
// *BSD, others - merely a guess for now
|
||||
pref("media.peerconnection.capture_delay", 50);
|
||||
pref("media.getusermedia.playout_delay", 50);
|
||||
pref("media.navigator.audio.full_duplex", false);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user