OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/modules/video_capture/windows/video_capture_ds.h" | 11 #include "webrtc/modules/video_capture/windows/video_capture_ds.h" |
12 #include "webrtc/modules/video_capture/windows/video_capture_mf.h" | 12 #include "webrtc/modules/video_capture/windows/video_capture_mf.h" |
13 #include "webrtc/system_wrappers/interface/ref_count.h" | 13 #include "webrtc/system_wrappers/include/ref_count.h" |
14 | 14 |
15 namespace webrtc { | 15 namespace webrtc { |
16 namespace videocapturemodule { | 16 namespace videocapturemodule { |
17 | 17 |
18 // static | 18 // static |
19 VideoCaptureModule::DeviceInfo* VideoCaptureImpl::CreateDeviceInfo( | 19 VideoCaptureModule::DeviceInfo* VideoCaptureImpl::CreateDeviceInfo( |
20 const int32_t id) { | 20 const int32_t id) { |
21 // TODO(tommi): Use the Media Foundation version on Vista and up. | 21 // TODO(tommi): Use the Media Foundation version on Vista and up. |
22 return DeviceInfoDS::Create(id); | 22 return DeviceInfoDS::Create(id); |
23 } | 23 } |
24 | 24 |
25 VideoCaptureModule* VideoCaptureImpl::Create(const int32_t id, | 25 VideoCaptureModule* VideoCaptureImpl::Create(const int32_t id, |
26 const char* device_id) { | 26 const char* device_id) { |
27 if (device_id == NULL) | 27 if (device_id == NULL) |
28 return NULL; | 28 return NULL; |
29 | 29 |
30 // TODO(tommi): Use Media Foundation implementation for Vista and up. | 30 // TODO(tommi): Use Media Foundation implementation for Vista and up. |
31 RefCountImpl<VideoCaptureDS>* capture = new RefCountImpl<VideoCaptureDS>(id); | 31 RefCountImpl<VideoCaptureDS>* capture = new RefCountImpl<VideoCaptureDS>(id); |
32 if (capture->Init(id, device_id) != 0) { | 32 if (capture->Init(id, device_id) != 0) { |
33 delete capture; | 33 delete capture; |
34 capture = NULL; | 34 capture = NULL; |
35 } | 35 } |
36 | 36 |
37 return capture; | 37 return capture; |
38 } | 38 } |
39 | 39 |
40 } // namespace videocapturemodule | 40 } // namespace videocapturemodule |
41 } // namespace webrtc | 41 } // namespace webrtc |
OLD | NEW |