From 90ee9c25bac1aeafbe679a4ea9a62aa745c535d3 Mon Sep 17 00:00:00 2001 From: Wes Kocher Date: Thu, 21 Jan 2016 17:28:20 -0800 Subject: [PATCH] Backed out changeset 67833fc7a708 (bug 1221587) --HG-- extra : commitid : HCZiFKeQCGp --- dom/media/webrtc/MediaEngineWebRTC.cpp | 1 - dom/media/webrtc/MediaEngineWebRTC.h | 12 ++---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/dom/media/webrtc/MediaEngineWebRTC.cpp b/dom/media/webrtc/MediaEngineWebRTC.cpp index ca4f840bca94..db1dbcbf7cf6 100644 --- a/dom/media/webrtc/MediaEngineWebRTC.cpp +++ b/dom/media/webrtc/MediaEngineWebRTC.cpp @@ -45,7 +45,6 @@ GetUserMediaLog() namespace mozilla { cubeb_device_collection* AudioInputCubeb::mDevices = nullptr; -bool AudioInputCubeb::mAnyInUse = false; MediaEngineWebRTC::MediaEngineWebRTC(MediaEnginePrefs &aPrefs) : mMutex("mozilla::MediaEngineWebRTC"), diff --git a/dom/media/webrtc/MediaEngineWebRTC.h b/dom/media/webrtc/MediaEngineWebRTC.h index 0a9557621d65..2a982c363149 100644 --- a/dom/media/webrtc/MediaEngineWebRTC.h +++ b/dom/media/webrtc/MediaEngineWebRTC.h @@ -159,7 +159,7 @@ class AudioInputCubeb final : public AudioInput { public: explicit AudioInputCubeb(webrtc::VoiceEngine* aVoiceEngine) : - AudioInput(aVoiceEngine), mSelectedDevice(0), mInUse(false) + AudioInput(aVoiceEngine), mSelectedDevice(0) { // Force calculation of the indexes. We could keep them global // too... cleanup would be annoying @@ -242,15 +242,11 @@ public: ptrVoERender->SetExternalRecordingStatus(true); } aGraph->OpenAudioInput(mDevices->device[mSelectedDevice]->devid, aListener); - mInUse = true; - mAnyInUse = true; } void StopRecording(MediaStreamGraph *aGraph, AudioDataListener *aListener) { aGraph->CloseAudioInput(aListener); - mInUse = false; - mAnyInUse = false; } int SetRecordingDevice(int aIndex) @@ -264,16 +260,12 @@ public: } protected: - ~AudioInputCubeb() { - MOZ_RELEASE_ASSERT(!mInUse); - } + ~AudioInputCubeb() {} private: nsTArray mDeviceIndexes; int mSelectedDevice; static cubeb_device_collection *mDevices; - bool mInUse; // for assertions about listener lifetime - static bool mAnyInUse; }; class AudioInputWebRTC final : public AudioInput