Backed out changeset 67833fc7a708 (bug 1221587)

--HG--
extra : commitid : HCZiFKeQCGp
This commit is contained in:
Wes Kocher 2016-01-21 17:28:20 -08:00
Родитель e8203da294
Коммит 90ee9c25ba
2 изменённых файлов: 2 добавлений и 11 удалений

Просмотреть файл

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

Просмотреть файл

@ -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