Home | History | Annotate | Download | only in external
      1 /*
      2  *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
      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 
     11 #include "webrtc/modules/video_capture/device_info_impl.h"
     12 #include "webrtc/modules/video_capture/video_capture_impl.h"
     13 
     14 namespace webrtc {
     15 
     16 namespace videocapturemodule {
     17 
     18 class ExternalDeviceInfo : public DeviceInfoImpl {
     19  public:
     20   ExternalDeviceInfo(const int32_t id)
     21       : DeviceInfoImpl(id) {
     22   }
     23   virtual ~ExternalDeviceInfo() {}
     24   virtual uint32_t NumberOfDevices() { return 0; }
     25   virtual int32_t DisplayCaptureSettingsDialogBox(
     26       const char* /*deviceUniqueIdUTF8*/,
     27       const char* /*dialogTitleUTF8*/,
     28       void* /*parentWindow*/,
     29       uint32_t /*positionX*/,
     30       uint32_t /*positionY*/) { return -1; }
     31   virtual int32_t GetDeviceName(
     32       uint32_t deviceNumber,
     33       char* deviceNameUTF8,
     34       uint32_t deviceNameLength,
     35       char* deviceUniqueIdUTF8,
     36       uint32_t deviceUniqueIdUTF8Length,
     37       char* productUniqueIdUTF8=0,
     38       uint32_t productUniqueIdUTF8Length=0) {
     39     return -1;
     40   }
     41   virtual int32_t CreateCapabilityMap(
     42       const char* deviceUniqueIdUTF8) { return 0; }
     43   virtual int32_t Init() { return 0; }
     44 };
     45 
     46 VideoCaptureModule::DeviceInfo* VideoCaptureImpl::CreateDeviceInfo(
     47     const int32_t id) {
     48   return new ExternalDeviceInfo(id);
     49 }
     50 
     51 }  // namespace videocapturemodule
     52 
     53 }  // namespace webrtc
     54