Backed out changeset 67833fc7a708 (bug 1221587)

This commit is contained in:
Wes Kocher 2016-01-21 17:28:20 -08:00
parent 839d8f5ddf
commit 418f36b923
2 changed files with 2 additions and 11 deletions

View File

@ -45,7 +45,6 @@ GetUserMediaLog()
namespace mozilla {
cubeb_device_collection* AudioInputCubeb::mDevices = nullptr;
bool AudioInputCubeb::mAnyInUse = false;
MediaEngineWebRTC::MediaEngineWebRTC(MediaEnginePrefs &aPrefs)
: mMutex("mozilla::MediaEngineWebRTC"),

View File

@ -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<int> mDeviceIndexes;
int mSelectedDevice;
static cubeb_device_collection *mDevices;
bool mInUse; // for assertions about listener lifetime
static bool mAnyInUse;
};
class AudioInputWebRTC final : public AudioInput