Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: media/video/capture/win/sink_input_pin_win.h

Issue 7229013: This is the VideoCaptureDevice implementation for windows. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Fixed reference count issue found by Tommi. Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 REFERENCE_TIME kSecondsToReferenceTime = 10000000;
scherkus (not reviewing) 2011/06/27 19:24:01 can you move the actual = 10000000; part to .cc fi
Per K 2011/06/28 10:14:07 Done.
19
20 // Input pin of the SinkFilter.
21 class SinkInputPin : public PinBase {
22 public:
23 SinkInputPin(IBaseFilter* filter, SinkFilterObserver* observer);
24 virtual ~SinkInputPin();
25
26 void SetRequestedMediaCapability(
27 const VideoCaptureDevice::Capability& capability);
28 // Returns the capability that is negotiated when this
29 // pin is connected to a media filter.
30 const VideoCaptureDevice::Capability& ResultingCapability();
31
32 // Implement PinBase.
33 virtual bool IsMediaTypeValid(const AM_MEDIA_TYPE* media_type);
34 virtual bool GetValidMediaType(int index, AM_MEDIA_TYPE* media_type);
35
36 STDMETHOD(Receive)(IMediaSample* media_sample);
37
38 private:
39 VideoCaptureDevice::Capability requested_capability_;
40 VideoCaptureDevice::Capability resulting_capability_;
41 SinkFilterObserver* observer_;
42
43 DISALLOW_IMPLICIT_CONSTRUCTORS(SinkInputPin);
44 };
45
46 } // namespace media
47
48 #endif // MEDIA_VIDEO_CAPTURE_WIN_SINK_INPUT_PIN_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698