• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_VIDEO_CAPTURE_DS_H_
12 #define MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_VIDEO_CAPTURE_DS_H_
13 
14 #include "api/scoped_refptr.h"
15 #include "modules/video_capture/video_capture_impl.h"
16 #include "modules/video_capture/windows/device_info_ds.h"
17 
18 #define CAPTURE_FILTER_NAME L"VideoCaptureFilter"
19 #define SINK_FILTER_NAME L"SinkFilter"
20 
21 namespace webrtc {
22 namespace videocapturemodule {
23 // Forward declaraion
24 class CaptureSinkFilter;
25 
26 class VideoCaptureDS : public VideoCaptureImpl {
27  public:
28   VideoCaptureDS();
29 
30   virtual int32_t Init(const char* deviceUniqueIdUTF8);
31 
32   /*************************************************************************
33    *
34    *   Start/Stop
35    *
36    *************************************************************************/
37   int32_t StartCapture(const VideoCaptureCapability& capability) override;
38   int32_t StopCapture() override;
39 
40   /**************************************************************************
41    *
42    *   Properties of the set device
43    *
44    **************************************************************************/
45 
46   bool CaptureStarted() override;
47   int32_t CaptureSettings(VideoCaptureCapability& settings) override;
48 
49  protected:
50   ~VideoCaptureDS() override;
51 
52   // Help functions
53 
54   int32_t SetCameraOutput(const VideoCaptureCapability& requestedCapability);
55   int32_t DisconnectGraph();
56   HRESULT ConnectDVCamera();
57 
58   DeviceInfoDS _dsInfo;
59 
60   IBaseFilter* _captureFilter;
61   IGraphBuilder* _graphBuilder;
62   IMediaControl* _mediaControl;
63   rtc::scoped_refptr<CaptureSinkFilter> sink_filter_;
64   IPin* _inputSendPin;
65   IPin* _outputCapturePin;
66 
67   // Microsoft DV interface (external DV cameras)
68   IBaseFilter* _dvFilter;
69   IPin* _inputDvPin;
70   IPin* _outputDvPin;
71 };
72 }  // namespace videocapturemodule
73 }  // namespace webrtc
74 #endif  // MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_VIDEO_CAPTURE_DS_H_
75