Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / libjingle / source / talk / media / devices / macdevicemanager.cc
index e92408e..8f777b4 100644 (file)
 #include <CoreAudio/CoreAudio.h>
 #include <QuickTime/QuickTime.h>
 
-#include "talk/base/logging.h"
-#include "talk/base/stringutils.h"
-#include "talk/base/thread.h"
 #include "talk/media/base/mediacommon.h"
+#include "webrtc/base/logging.h"
+#include "webrtc/base/stringutils.h"
+#include "webrtc/base/thread.h"
 
 class DeviceWatcherImpl;
 
@@ -65,14 +65,13 @@ static const char* const kFilteredVideoDevicesName[] =  {
     "Sonix SN9C201p",          // Crashes in OpenAComponent and CloseComponent
     NULL,
 };
-static const int kVideoDeviceOpenAttempts = 3;
 static const UInt32 kAudioDeviceNameLength = 64;
 // Obj-C functions defined in macdevicemanagermm.mm
 // TODO(ronghuawu): have a shared header for these function defines.
 extern DeviceWatcherImpl* CreateDeviceWatcherCallback(
     DeviceManagerInterface* dm);
 extern void ReleaseDeviceWatcherCallback(DeviceWatcherImpl* impl);
-extern bool GetQTKitVideoDevices(std::vector<Device>* out);
+extern bool GetAVFoundationVideoDevices(std::vector<Device>* out);
 static bool GetAudioDeviceIDs(bool inputs, std::vector<AudioDeviceID>* out);
 static bool GetAudioDeviceName(AudioDeviceID id, bool input, std::string* out);
 
@@ -85,7 +84,7 @@ MacDeviceManager::~MacDeviceManager() {
 
 bool MacDeviceManager::GetVideoCaptureDevices(std::vector<Device>* devices) {
   devices->clear();
-  if (!GetQTKitVideoDevices(devices)) {
+  if (!GetAVFoundationVideoDevices(devices)) {
     return false;
   }
   return FilterDevices(devices, kFilteredVideoDevicesName);
@@ -120,7 +119,7 @@ static bool GetAudioDeviceIDs(bool input,
   }
 
   size_t num_devices = propsize / sizeof(AudioDeviceID);
-  talk_base::scoped_ptr<AudioDeviceID[]> device_ids(
+  rtc::scoped_ptr<AudioDeviceID[]> device_ids(
       new AudioDeviceID[num_devices]);
 
   err = AudioHardwareGetProperty(kAudioHardwarePropertyDevices,