Chromium Code Reviews| Index: media/video/capture/win/sink_filter_win.h |
| =================================================================== |
| --- media/video/capture/win/sink_filter_win.h (revision 0) |
| +++ media/video/capture/win/sink_filter_win.h (revision 0) |
| @@ -0,0 +1,60 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// Implement a DirectShow sink filter used for receiving captured frames from |
| +// a DirectShow Capture filter. |
| + |
| +#ifndef MEDIA_VIDEO_CAPTURE_WIN_SINK_FILTER_WIN_H_ |
| +#define MEDIA_VIDEO_CAPTURE_WIN_SINK_FILTER_WIN_H_ |
| + |
| +#include <windows.h> |
| + |
| +#include "media/video/capture/win/filter_base_win.h" |
| +#include "media/video/capture/video_capture_device.h" |
| + |
| +// Define GUID for I420. This is the color format we would like to support but |
| +// it is not defined in the DirectShow SDK. |
| +// http://msdn.microsoft.com/en-us/library/dd757532.aspx |
| +// 30323449-0000-0010-8000-00AA00389B71. |
| +extern GUID kMediaSubTypeI420; |
| + |
| +namespace media { |
| + |
| +static const REFERENCE_TIME kSecondsToReferenceTime = 10000000; |
|
scherkus (not reviewing)
2011/06/24 20:15:26
move to .cc
Per K
2011/06/27 11:47:50
Moved to header file for sink_input_pin.h. This is
|
| + |
| +class SinkInputPin; |
| + |
| +class __declspec(uuid("88cdbbdc-a73b-4afa-acbf-15d5e2ce12c3")) |
| + SinkFilter : public FilterBase { |
| + public: |
| + class SinkFilterObserver { |
|
scherkus (not reviewing)
2011/06/24 20:15:26
move to separate .h
Per K
2011/06/27 11:47:50
Done.
|
| + public: |
| + virtual void FrameReceived(const uint8* buffer, int length) = 0; |
| + protected: |
| + virtual ~SinkFilterObserver(); |
| + }; |
| + explicit SinkFilter(SinkFilterObserver* observer); |
| + virtual ~SinkFilter(); |
| + |
| + void SetRequestedMediaCapability( |
| + const VideoCaptureDevice::Capability& capability); |
| + // Returns the capability that is negotiated when this |
| + // filter is connected to a media filter. |
| + const VideoCaptureDevice::Capability& ResultingCapability(); |
| + |
| + // Implement FilterBase. |
| + virtual int NoOfPins(); |
| + virtual IPin* GetPin(int index); |
| + |
| + STDMETHOD(GetClassID)(CLSID* clsid); |
| + |
| + private: |
| + SinkInputPin* input_pin_; |
| + |
| + DISALLOW_IMPLICIT_CONSTRUCTORS(SinkFilter); |
| +}; |
| + |
| +} // namespace media |
| + |
| +#endif // MEDIA_VIDEO_CAPTURE_WIN_SINK_FILTER_WIN_H_ |