blob: 39847ea012df72a0f844fa7e1e1285231c6e96ff [file] [log] [blame]
andrew@webrtc.orga7b57da2012-10-22 18:19:23 +00001/*
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#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_MAC_QTKIT_VIDEO_CAPTURE_QTKIT_INFO_H_
12#define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_MAC_QTKIT_VIDEO_CAPTURE_QTKIT_INFO_H_
13
14#include "../../video_capture_impl.h"
15#include "../../device_info_impl.h"
16#include "video_capture_qtkit_utility.h"
17
18#include "map_wrapper.h"
19
20
21@class VideoCaptureMacQTKitInfoObjC;
22
23namespace webrtc
24{
25namespace videocapturemodule
26{
27
28class VideoCaptureMacQTKitInfo: public DeviceInfoImpl
29{
30public:
31
32 VideoCaptureMacQTKitInfo(const WebRtc_Word32 id);
33 virtual ~VideoCaptureMacQTKitInfo();
34
35 WebRtc_Word32 Init();
36
37 virtual WebRtc_UWord32 NumberOfDevices();
38
39 /*
40 * Returns the available capture devices.
41 * deviceNumber -[in] index of capture device
42 * deviceNameUTF8 - friendly name of the capture device
43 * deviceUniqueIdUTF8 - unique name of the capture device if it exist.
44 * Otherwise same as deviceNameUTF8
45 * productUniqueIdUTF8 - unique product id if it exist. Null terminated
46 * otherwise.
47 */
48 virtual WebRtc_Word32 GetDeviceName(
49 WebRtc_UWord32 deviceNumber, char* deviceNameUTF8,
50 WebRtc_UWord32 deviceNameLength, char* deviceUniqueIdUTF8,
51 WebRtc_UWord32 deviceUniqueIdUTF8Length,
52 char* productUniqueIdUTF8 = 0,
53 WebRtc_UWord32 productUniqueIdUTF8Length = 0);
54
55 /*
56 * Returns the number of capabilities for this device
57 */
58 virtual WebRtc_Word32 NumberOfCapabilities(
59 const char* deviceUniqueIdUTF8);
60
61 /*
62 * Gets the capabilities of the named device
63 */
64 virtual WebRtc_Word32 GetCapability(
65 const char* deviceUniqueIdUTF8,
66 const WebRtc_UWord32 deviceCapabilityNumber,
67 VideoCaptureCapability& capability);
68
69 /*
70 * Gets the capability that best matches the requested width, height and frame rate.
71 * Returns the deviceCapabilityNumber on success.
72 */
73 virtual WebRtc_Word32 GetBestMatchedCapability(
74 const char* deviceUniqueIdUTF8,
75 const VideoCaptureCapability& requested,
76 VideoCaptureCapability& resulting);
77
78 /*
79 * Display OS /capture device specific settings dialog
80 */
81 virtual WebRtc_Word32 DisplayCaptureSettingsDialogBox(
82 const char* deviceUniqueIdUTF8,
83 const char* dialogTitleUTF8, void* parentWindow,
84 WebRtc_UWord32 positionX, WebRtc_UWord32 positionY);
85
86protected:
87 virtual WebRtc_Word32 CreateCapabilityMap(
88 const char* deviceUniqueIdUTF8);
89
90 VideoCaptureMacQTKitInfoObjC* _captureInfo;
91};
92} // namespace videocapturemodule
93} // namespace webrtc
94
95#endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_MAC_QTKIT_VIDEO_CAPTURE_QTKIT_INFO_H_