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 #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_
13 
14 #include "webrtc/modules/video_capture/video_capture_impl.h"
15 #include "webrtc/modules/video_capture/windows/device_info_ds.h"
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:
30     VideoCaptureDS(const int32_t id);
31 
32     virtual int32_t Init(const int32_t id, const char* deviceUniqueIdUTF8);
33 
34     /*************************************************************************
35      *
36      *   Start/Stop
37      *
38      *************************************************************************/
39     virtual int32_t
40         StartCapture(const VideoCaptureCapability& capability);
41     virtual int32_t StopCapture();
42 
43     /**************************************************************************
44      *
45      *   Properties of the set device
46      *
47      **************************************************************************/
48 
49     virtual bool CaptureStarted();
50     virtual int32_t CaptureSettings(VideoCaptureCapability& settings);
51 
52 protected:
53     virtual ~VideoCaptureDS();
54 
55     // Help functions
56 
57     int32_t
58         SetCameraOutput(const VideoCaptureCapability& requestedCapability);
59     int32_t DisconnectGraph();
60     HRESULT VideoCaptureDS::ConnectDVCamera();
61 
62     DeviceInfoDS _dsInfo;
63 
64     IBaseFilter* _captureFilter;
65     IGraphBuilder* _graphBuilder;
66     IMediaControl* _mediaControl;
67     CaptureSinkFilter* _sinkFilter;
68     IPin* _inputSendPin;
69     IPin* _outputCapturePin;
70 
71     // Microsoft DV interface (external DV cameras)
72     IBaseFilter* _dvFilter;
73     IPin* _inputDvPin;
74     IPin* _outputDvPin;
75 
76 };
77 }  // namespace videocapturemodule
78 }  // namespace webrtc
79 #endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_VIDEO_CAPTURE_DS_H_
80