Backed out changeset ef2bf9308ed7 (bug 1056213)

This commit is contained in:
Randell Jesup 2014-08-30 12:11:27 -04:00
parent 4c10ef5484
commit 6d0bd79ea8
3 changed files with 1 additions and 22 deletions

View File

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

View File

@ -214,8 +214,6 @@ public:
return NS_OK;
}
void Refresh(int aIndex);
protected:
~MediaEngineWebRTCVideoSource() { Shutdown(); }

View File

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