wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 1 | /* |
leozwang@webrtc.org | 1745e93 | 2012-03-01 16:30:40 +0000 | [diff] [blame] | 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
sergeyu@chromium.org | 099b8c9 | 2013-07-25 18:41:43 +0000 | [diff] [blame] | 11 | #include "webrtc/modules/video_capture/device_info_impl.h" |
| 12 | #include "webrtc/modules/video_capture/video_capture_impl.h" |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 13 | |
| 14 | namespace webrtc { |
| 15 | |
| 16 | namespace videocapturemodule { |
| 17 | |
| 18 | class ExternalDeviceInfo : public DeviceInfoImpl { |
| 19 | public: |
nisse | b29b9c8 | 2016-12-12 00:22:56 -0800 | [diff] [blame] | 20 | ExternalDeviceInfo() {} |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 21 | virtual ~ExternalDeviceInfo() {} |
pbos@webrtc.org | dfc5bb9 | 2013-04-10 08:23:13 +0000 | [diff] [blame] | 22 | virtual uint32_t NumberOfDevices() { return 0; } |
| 23 | virtual int32_t DisplayCaptureSettingsDialogBox( |
leozwang@webrtc.org | 3a39230 | 2012-03-12 21:03:38 +0000 | [diff] [blame] | 24 | const char* /*deviceUniqueIdUTF8*/, |
| 25 | const char* /*dialogTitleUTF8*/, |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 26 | void* /*parentWindow*/, |
pbos@webrtc.org | dfc5bb9 | 2013-04-10 08:23:13 +0000 | [diff] [blame] | 27 | uint32_t /*positionX*/, |
| 28 | uint32_t /*positionY*/) { return -1; } |
| 29 | virtual int32_t GetDeviceName( |
| 30 | uint32_t deviceNumber, |
leozwang@webrtc.org | 1745e93 | 2012-03-01 16:30:40 +0000 | [diff] [blame] | 31 | char* deviceNameUTF8, |
pbos@webrtc.org | dfc5bb9 | 2013-04-10 08:23:13 +0000 | [diff] [blame] | 32 | uint32_t deviceNameLength, |
leozwang@webrtc.org | 1745e93 | 2012-03-01 16:30:40 +0000 | [diff] [blame] | 33 | char* deviceUniqueIdUTF8, |
pbos@webrtc.org | dfc5bb9 | 2013-04-10 08:23:13 +0000 | [diff] [blame] | 34 | uint32_t deviceUniqueIdUTF8Length, |
leozwang@webrtc.org | 1745e93 | 2012-03-01 16:30:40 +0000 | [diff] [blame] | 35 | char* productUniqueIdUTF8=0, |
pbos@webrtc.org | dfc5bb9 | 2013-04-10 08:23:13 +0000 | [diff] [blame] | 36 | uint32_t productUniqueIdUTF8Length=0) { |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 37 | return -1; |
| 38 | } |
pbos@webrtc.org | dfc5bb9 | 2013-04-10 08:23:13 +0000 | [diff] [blame] | 39 | virtual int32_t CreateCapabilityMap( |
leozwang@webrtc.org | 1745e93 | 2012-03-01 16:30:40 +0000 | [diff] [blame] | 40 | const char* deviceUniqueIdUTF8) { return 0; } |
pbos@webrtc.org | dfc5bb9 | 2013-04-10 08:23:13 +0000 | [diff] [blame] | 41 | virtual int32_t Init() { return 0; } |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 42 | }; |
| 43 | |
nisse | b29b9c8 | 2016-12-12 00:22:56 -0800 | [diff] [blame] | 44 | VideoCaptureModule::DeviceInfo* VideoCaptureImpl::CreateDeviceInfo() { |
| 45 | return new ExternalDeviceInfo(); |
wu@webrtc.org | f3f2f6a | 2011-10-19 18:42:17 +0000 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | } // namespace videocapturemodule |
| 49 | |
| 50 | } // namespace webrtc |