Bug 1063547 - Return no available devices where not supported, disable on Android. r=jesup

This commit is contained in:
Gian-Carlo Pascutto 2014-09-09 18:18:12 +02:00
Родитель ecf1650979
Коммит 59821a411b
2 изменённых файлов: 7 добавлений и 6 удалений

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

@ -64,7 +64,8 @@ int ViEInputManager::NumberOfCaptureDevices() {
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(engine_id_), "%s",
__FUNCTION__);
CriticalSectionScoped cs(device_info_cs_.get());
GetDeviceInfo();
if (!GetDeviceInfo())
return 0;
assert(capture_device_info_);
capture_device_info_->Refresh();
return capture_device_info_->NumberOfDevices();
@ -91,7 +92,8 @@ int ViEInputManager::NumberOfCaptureCapabilities(
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(engine_id_), "%s",
__FUNCTION__);
CriticalSectionScoped cs(device_info_cs_.get());
GetDeviceInfo();
if (!GetDeviceInfo())
return 0;
assert(capture_device_info_);
return capture_device_info_->NumberOfCapabilities(device_unique_idUTF8);
}

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

@ -373,13 +373,12 @@ pref("media.getusermedia.playout_delay", 50);
pref("media.peerconnection.capture_delay", 50);
pref("media.getusermedia.playout_delay", 50);
#endif
#else
#ifdef ANDROID
pref("media.navigator.enabled", true);
#endif
#endif
#if !defined(ANDROID)
pref("media.getusermedia.screensharing.enabled", true);
#endif
#ifdef RELEASE_BUILD
pref("media.getusermedia.screensharing.allowed_domains", "");
#else