blob: 7e63e56cd191bc0c0d3ae53913244dbf6cc60350 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
mflodman@webrtc.org8df26002012-02-24 10:06:30 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00003 *
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.org81878772012-11-20 13:35:33 +000011#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.com470e71d2011-07-07 08:21:25 +000013
pbos@webrtc.orga9b74ad2013-07-12 10:03:52 +000014#include "webrtc/modules/video_capture/video_capture_impl.h"
15#include "webrtc/modules/video_capture/windows/device_info_ds.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000016
17#define CAPTURE_FILTER_NAME L"VideoCaptureFilter"
18#define SINK_FILTER_NAME L"SinkFilter"
19
20namespace webrtc
21{
22namespace videocapturemodule
23{
24// Forward declaraion
25class CaptureSinkFilter;
26
27class VideoCaptureDS: public VideoCaptureImpl
28{
29public:
nisseb29b9c82016-12-12 00:22:56 -080030 VideoCaptureDS();
niklase@google.com470e71d2011-07-07 08:21:25 +000031
nisseb29b9c82016-12-12 00:22:56 -080032 virtual int32_t Init(const char* deviceUniqueIdUTF8);
niklase@google.com470e71d2011-07-07 08:21:25 +000033
34 /*************************************************************************
35 *
36 * Start/Stop
37 *
38 *************************************************************************/
pbos@webrtc.orgdfc5bb92013-04-10 08:23:13 +000039 virtual int32_t
niklase@google.com470e71d2011-07-07 08:21:25 +000040 StartCapture(const VideoCaptureCapability& capability);
pbos@webrtc.orgdfc5bb92013-04-10 08:23:13 +000041 virtual int32_t StopCapture();
niklase@google.com470e71d2011-07-07 08:21:25 +000042
43 /**************************************************************************
44 *
45 * Properties of the set device
46 *
47 **************************************************************************/
48
49 virtual bool CaptureStarted();
pbos@webrtc.orgdfc5bb92013-04-10 08:23:13 +000050 virtual int32_t CaptureSettings(VideoCaptureCapability& settings);
niklase@google.com470e71d2011-07-07 08:21:25 +000051
52protected:
53 virtual ~VideoCaptureDS();
54
55 // Help functions
56
pbos@webrtc.orgdfc5bb92013-04-10 08:23:13 +000057 int32_t
niklase@google.com470e71d2011-07-07 08:21:25 +000058 SetCameraOutput(const VideoCaptureCapability& requestedCapability);
pbos@webrtc.orgdfc5bb92013-04-10 08:23:13 +000059 int32_t DisconnectGraph();
niklase@google.com470e71d2011-07-07 08:21:25 +000060 HRESULT VideoCaptureDS::ConnectDVCamera();
61
tommi@webrtc.org81878772012-11-20 13:35:33 +000062 DeviceInfoDS _dsInfo;
niklase@google.com470e71d2011-07-07 08:21:25 +000063
64 IBaseFilter* _captureFilter;
65 IGraphBuilder* _graphBuilder;
66 IMediaControl* _mediaControl;
67 CaptureSinkFilter* _sinkFilter;
68 IPin* _inputSendPin;
69 IPin* _outputCapturePin;
70
niklase@google.com470e71d2011-07-07 08:21:25 +000071 // Microsoft DV interface (external DV cameras)
72 IBaseFilter* _dvFilter;
73 IPin* _inputDvPin;
74 IPin* _outputDvPin;
75
76};
pbos@webrtc.orgd900e8b2013-07-03 15:12:26 +000077} // namespace videocapturemodule
78} // namespace webrtc
tommi@webrtc.org81878772012-11-20 13:35:33 +000079#endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_VIDEO_CAPTURE_DS_H_