video_capture_ds.h 2.2 KB

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