Bug 1063547 - Return no available devices where not supported, disable on Android. r=jesup, a=bajaj
authorGian-Carlo Pascutto <gpascutto@mozilla.com>
Tue, 09 Sep 2014 18:18:12 +0200
changeset 217452 c161b0949fc346569c641d42352b972918e9a8ce
parent 217451 7eb878988c9f3cb4f0a3759a28030ceb7f424c02
child 217453 6af5dcb5d66c63e30713b29ebf8ccf269f009ac3
push id6818
push userryanvm@gmail.com
push dateThu, 11 Sep 2014 23:07:16 +0000
treeherdermozilla-aurora@6af5dcb5d66c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup, bajaj
bugs1063547
milestone34.0a2
Bug 1063547 - Return no available devices where not supported, disable on Android. r=jesup, a=bajaj
media/webrtc/trunk/webrtc/video_engine/vie_input_manager.cc
modules/libpref/init/all.js
--- a/media/webrtc/trunk/webrtc/video_engine/vie_input_manager.cc
+++ b/media/webrtc/trunk/webrtc/video_engine/vie_input_manager.cc
@@ -59,17 +59,18 @@ void ViEInputManager::SetModuleProcessTh
   assert(!module_process_thread_);
   module_process_thread_ = module_process_thread;
 }
 
 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();
 }
 
 int ViEInputManager::GetDeviceName(uint32_t device_number,
                                    char* device_nameUTF8,
                                    uint32_t device_name_length,
@@ -86,17 +87,18 @@ int ViEInputManager::GetDeviceName(uint3
                                              device_unique_idUTF8Length);
 }
 
 int ViEInputManager::NumberOfCaptureCapabilities(
   const char* device_unique_idUTF8) {
   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);
 }
 
 int ViEInputManager::GetCaptureCapability(
     const char* device_unique_idUTF8,
     const uint32_t device_capability_number,
     CaptureCapability& capability) {
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -368,23 +368,22 @@ pref("media.navigator.hardware.vp8_decod
 #elif defined(XP_LINUX)
 pref("media.peerconnection.capture_delay", 70);
 pref("media.getusermedia.playout_delay", 50);
 #else
 // *BSD, others - merely a guess for now
 pref("media.peerconnection.capture_delay", 50);
 pref("media.getusermedia.playout_delay", 50);
 #endif
-#else
-#ifdef ANDROID
-pref("media.navigator.enabled", true);
 #endif
+
+#if !defined(ANDROID)
+pref("media.getusermedia.screensharing.enabled", true);
 #endif
 
-pref("media.getusermedia.screensharing.enabled", true);
 #ifdef RELEASE_BUILD
 pref("media.getusermedia.screensharing.allowed_domains", "");
 #else
  // temporary value, not intended for release - bug 1049087
 pref("media.getusermedia.screensharing.allowed_domains", "mozilla.github.io");
 #endif
 // OS/X 10.6 and XP have screen/window sharing off by default due to various issues - Caveat emptor
 pref("media.getusermedia.screensharing.allow_on_old_platforms", false);