mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 67833fc7a708 (bug 1221587)
This commit is contained in:
parent
839d8f5ddf
commit
418f36b923
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user