niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
mflodman@webrtc.org | 8df2600 | 2012-02-24 10:06:30 +0000 | [diff] [blame] | 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +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 | |
tommi@webrtc.org | 8187877 | 2012-11-20 13:35:33 +0000 | [diff] [blame] | 11 | #ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_VIDEO_CAPTURE_DS_H_ |
| 12 | #define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_VIDEO_CAPTURE_DS_H_ |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 13 | |
pbos@webrtc.org | a9b74ad | 2013-07-12 10:03:52 +0000 | [diff] [blame] | 14 | #include "webrtc/modules/video_capture/video_capture_impl.h" |
| 15 | #include "webrtc/modules/video_capture/windows/device_info_ds.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 16 | |
| 17 | #define CAPTURE_FILTER_NAME L"VideoCaptureFilter" |
| 18 | #define SINK_FILTER_NAME L"SinkFilter" |
| 19 | |
| 20 | namespace webrtc |
| 21 | { |
| 22 | namespace videocapturemodule |
| 23 | { |
| 24 | // Forward declaraion |
| 25 | class CaptureSinkFilter; |
| 26 | |
| 27 | class VideoCaptureDS: public VideoCaptureImpl |
| 28 | { |
| 29 | public: |
nisse | b29b9c8 | 2016-12-12 00:22:56 -0800 | [diff] [blame] | 30 | VideoCaptureDS(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 31 | |
nisse | b29b9c8 | 2016-12-12 00:22:56 -0800 | [diff] [blame] | 32 | virtual int32_t Init(const char* deviceUniqueIdUTF8); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 33 | |
| 34 | /************************************************************************* |
| 35 | * |
| 36 | * Start/Stop |
| 37 | * |
| 38 | *************************************************************************/ |
pbos@webrtc.org | dfc5bb9 | 2013-04-10 08:23:13 +0000 | [diff] [blame] | 39 | virtual int32_t |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 40 | StartCapture(const VideoCaptureCapability& capability); |
pbos@webrtc.org | dfc5bb9 | 2013-04-10 08:23:13 +0000 | [diff] [blame] | 41 | virtual int32_t StopCapture(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 42 | |
| 43 | /************************************************************************** |
| 44 | * |
| 45 | * Properties of the set device |
| 46 | * |
| 47 | **************************************************************************/ |
| 48 | |
| 49 | virtual bool CaptureStarted(); |
pbos@webrtc.org | dfc5bb9 | 2013-04-10 08:23:13 +0000 | [diff] [blame] | 50 | virtual int32_t CaptureSettings(VideoCaptureCapability& settings); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 51 | |
| 52 | protected: |
| 53 | virtual ~VideoCaptureDS(); |
| 54 | |
| 55 | // Help functions |
| 56 | |
pbos@webrtc.org | dfc5bb9 | 2013-04-10 08:23:13 +0000 | [diff] [blame] | 57 | int32_t |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 58 | SetCameraOutput(const VideoCaptureCapability& requestedCapability); |
pbos@webrtc.org | dfc5bb9 | 2013-04-10 08:23:13 +0000 | [diff] [blame] | 59 | int32_t DisconnectGraph(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 60 | HRESULT VideoCaptureDS::ConnectDVCamera(); |
| 61 | |
tommi@webrtc.org | 8187877 | 2012-11-20 13:35:33 +0000 | [diff] [blame] | 62 | DeviceInfoDS _dsInfo; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 63 | |
| 64 | IBaseFilter* _captureFilter; |
| 65 | IGraphBuilder* _graphBuilder; |
| 66 | IMediaControl* _mediaControl; |
| 67 | CaptureSinkFilter* _sinkFilter; |
| 68 | IPin* _inputSendPin; |
| 69 | IPin* _outputCapturePin; |
| 70 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 71 | // Microsoft DV interface (external DV cameras) |
| 72 | IBaseFilter* _dvFilter; |
| 73 | IPin* _inputDvPin; |
| 74 | IPin* _outputDvPin; |
| 75 | |
| 76 | }; |
pbos@webrtc.org | d900e8b | 2013-07-03 15:12:26 +0000 | [diff] [blame] | 77 | } // namespace videocapturemodule |
| 78 | } // namespace webrtc |
tommi@webrtc.org | 8187877 | 2012-11-20 13:35:33 +0000 | [diff] [blame] | 79 | #endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_VIDEO_CAPTURE_DS_H_ |