OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Implement a DirectShow input pin used for receiving captured frames from |
| 6 // a DirectShow Capture filter. |
| 7 |
| 8 #ifndef MEDIA_VIDEO_CAPTURE_WIN_SINK_INPUT_PIN_WIN_H_ |
| 9 #define MEDIA_VIDEO_CAPTURE_WIN_SINK_INPUT_PIN_WIN_H_ |
| 10 #pragma once |
| 11 |
| 12 #include "media/video/capture/video_capture_device.h" |
| 13 #include "media/video/capture/win/pin_base_win.h" |
| 14 #include "media/video/capture/win/sink_filter_win.h" |
| 15 |
| 16 namespace media { |
| 17 |
| 18 // Const used for converting Seconds to REFERENCE_TIME. |
| 19 extern const REFERENCE_TIME kSecondsToReferenceTime; |
| 20 |
| 21 // Input pin of the SinkFilter. |
| 22 class SinkInputPin : public PinBase { |
| 23 public: |
| 24 SinkInputPin(IBaseFilter* filter, SinkFilterObserver* observer); |
| 25 virtual ~SinkInputPin(); |
| 26 |
| 27 void SetRequestedMediaCapability( |
| 28 const VideoCaptureDevice::Capability& capability); |
| 29 // Returns the capability that is negotiated when this |
| 30 // pin is connected to a media filter. |
| 31 const VideoCaptureDevice::Capability& ResultingCapability(); |
| 32 |
| 33 // Implement PinBase. |
| 34 virtual bool IsMediaTypeValid(const AM_MEDIA_TYPE* media_type); |
| 35 virtual bool GetValidMediaType(int index, AM_MEDIA_TYPE* media_type); |
| 36 |
| 37 STDMETHOD(Receive)(IMediaSample* media_sample); |
| 38 |
| 39 private: |
| 40 VideoCaptureDevice::Capability requested_capability_; |
| 41 VideoCaptureDevice::Capability resulting_capability_; |
| 42 SinkFilterObserver* observer_; |
| 43 |
| 44 DISALLOW_IMPLICIT_CONSTRUCTORS(SinkInputPin); |
| 45 }; |
| 46 |
| 47 } // namespace media |
| 48 |
| 49 #endif // MEDIA_VIDEO_CAPTURE_WIN_SINK_INPUT_PIN_WIN_H_ |
OLD | NEW |