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