| Index: talk/app/webrtc/objc/RTCVideoCapturer.mm
|
| diff --git a/talk/app/webrtc/objc/RTCVideoCapturer.mm b/talk/app/webrtc/objc/RTCVideoCapturer.mm
|
| index 50e1cef4a0044f002fcca7ee1a636451e8d56652..9dbc201a677cd0ebd3ad7112bf47be9d8b9f2078 100644
|
| --- a/talk/app/webrtc/objc/RTCVideoCapturer.mm
|
| +++ b/talk/app/webrtc/objc/RTCVideoCapturer.mm
|
| @@ -34,25 +34,16 @@
|
| #include <memory>
|
|
|
| #include "webrtc/media/base/videocapturer.h"
|
| -#include "webrtc/media/devices/devicemanager.h"
|
| +#include "webrtc/media/engine/webrtcvideocapturerfactory.h"
|
|
|
| @implementation RTCVideoCapturer {
|
| std::unique_ptr<cricket::VideoCapturer> _capturer;
|
| }
|
|
|
| + (RTCVideoCapturer*)capturerWithDeviceName:(NSString*)deviceName {
|
| - const std::string& device_name = std::string([deviceName UTF8String]);
|
| - std::unique_ptr<cricket::DeviceManagerInterface> device_manager(
|
| - cricket::DeviceManagerFactory::Create());
|
| - bool initialized = device_manager->Init();
|
| - NSAssert(initialized, @"DeviceManager::Init() failed");
|
| - cricket::Device device;
|
| - if (!device_manager->GetVideoCaptureDevice(device_name, &device)) {
|
| - LOG(LS_ERROR) << "GetVideoCaptureDevice failed";
|
| - return 0;
|
| - }
|
| - std::unique_ptr<cricket::VideoCapturer> capturer(
|
| - device_manager->CreateVideoCapturer(device));
|
| + cricket::WebRtcVideoDeviceCapturerFactory factory;
|
| + cricket::Device device(std::string(deviceName.UTF8String), 0);
|
| + rtc::scoped_ptr<cricket::VideoCapturer> capturer(factory.Create(device));
|
| RTCVideoCapturer* rtcCapturer =
|
| [[RTCVideoCapturer alloc] initWithCapturer:capturer.release()];
|
| return rtcCapturer;
|
|
|