mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 22:32:51 +00:00
Backed out changeset ef2bf9308ed7 (bug 1056213)
This commit is contained in:
parent
f36ccb7397
commit
10774030a9
@ -267,8 +267,7 @@ MediaEngineWebRTC::EnumerateVideoDevices(MediaSourceType aMediaSource,
|
||||
nsRefPtr<MediaEngineWebRTCVideoSource> vSource;
|
||||
NS_ConvertUTF8toUTF16 uuid(uniqueId);
|
||||
if (mVideoSources.Get(uuid, getter_AddRefs(vSource))) {
|
||||
// We've already seen this device, just refresh and append.
|
||||
vSource->Refresh(i);
|
||||
// We've already seen this device, just append.
|
||||
aVSources->AppendElement(vSource.get());
|
||||
} else {
|
||||
vSource = new MediaEngineWebRTCVideoSource(videoEngine, i, aMediaSource);
|
||||
|
@ -214,8 +214,6 @@ public:
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void Refresh(int aIndex);
|
||||
|
||||
protected:
|
||||
~MediaEngineWebRTCVideoSource() { Shutdown(); }
|
||||
|
||||
|
@ -700,24 +700,6 @@ MediaEngineWebRTCVideoSource::Shutdown()
|
||||
mInitDone = false;
|
||||
}
|
||||
|
||||
void MediaEngineWebRTCVideoSource::Refresh(int aIndex) {
|
||||
mCaptureIndex = aIndex;
|
||||
#ifdef MOZ_B2G_CAMERA
|
||||
// Caller looked up this source by uniqueId; since deviceName == uniqueId nothing else changes
|
||||
#else
|
||||
// Caller looked up this source by uniqueId, so it shouldn't change
|
||||
const uint32_t KMaxDeviceNameLength = 128;
|
||||
char deviceName[KMaxDeviceNameLength];
|
||||
if (mViECapture->GetCaptureDevice(mCaptureIndex,
|
||||
deviceName, KMaxDeviceNameLength,
|
||||
nullptr, 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
CopyUTF8toUTF16(deviceName, mDeviceName);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef MOZ_B2G_CAMERA
|
||||
|
||||
// All these functions must be run on MainThread!
|
||||
|
Loading…
x
Reference in New Issue
Block a user