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

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

Issue 913183006: Use BITMAPINFOHEADER from capture capability enumeration when using MJPG (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed a nit. Created 5 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Implement a DirectShow input pin used for receiving captured frames from 5 // Implement a DirectShow input pin used for receiving captured frames from
6 // a DirectShow Capture filter. 6 // a DirectShow Capture filter.
7 7
8 #ifndef MEDIA_VIDEO_CAPTURE_WIN_SINK_INPUT_PIN_WIN_H_ 8 #ifndef MEDIA_VIDEO_CAPTURE_WIN_SINK_INPUT_PIN_WIN_H_
9 #define MEDIA_VIDEO_CAPTURE_WIN_SINK_INPUT_PIN_WIN_H_ 9 #define MEDIA_VIDEO_CAPTURE_WIN_SINK_INPUT_PIN_WIN_H_
10 10
11 #include "media/video/capture/video_capture_device.h" 11 #include "media/video/capture/video_capture_device.h"
12 #include "media/video/capture/video_capture_types.h" 12 #include "media/video/capture/video_capture_types.h"
13 #include "media/video/capture/win/pin_base_win.h" 13 #include "media/video/capture/win/pin_base_win.h"
14 #include "media/video/capture/win/sink_filter_win.h" 14 #include "media/video/capture/win/sink_filter_win.h"
15 15
16 namespace media { 16 namespace media {
17 17
18 // Const used for converting Seconds to REFERENCE_TIME. 18 // Const used for converting Seconds to REFERENCE_TIME.
19 extern const REFERENCE_TIME kSecondsToReferenceTime; 19 extern const REFERENCE_TIME kSecondsToReferenceTime;
20 20
21 // Input pin of the SinkFilter. 21 // Input pin of the SinkFilter.
22 class SinkInputPin : public PinBase { 22 class SinkInputPin : public PinBase {
23 public: 23 public:
24 SinkInputPin(IBaseFilter* filter, SinkFilterObserver* observer); 24 SinkInputPin(IBaseFilter* filter, SinkFilterObserver* observer);
25 virtual ~SinkInputPin(); 25 virtual ~SinkInputPin();
26 26
27 void SetRequestedMediaFormat(const VideoCaptureFormat& format); 27 void SetRequestedMediaFormat(VideoPixelFormat pixel_format,
28 float frame_rate,
29 const BITMAPINFOHEADER& info_header);
28 // Returns the capability that is negotiated when this 30 // Returns the capability that is negotiated when this
29 // pin is connected to a media filter. 31 // pin is connected to a media filter.
30 const VideoCaptureFormat& ResultingFormat(); 32 const VideoCaptureFormat& ResultingFormat();
31 33
32 // Implement PinBase. 34 // Implement PinBase.
33 virtual bool IsMediaTypeValid(const AM_MEDIA_TYPE* media_type); 35 virtual bool IsMediaTypeValid(const AM_MEDIA_TYPE* media_type);
34 virtual bool GetValidMediaType(int index, AM_MEDIA_TYPE* media_type); 36 virtual bool GetValidMediaType(int index, AM_MEDIA_TYPE* media_type);
35 37
36 STDMETHOD(Receive)(IMediaSample* media_sample); 38 STDMETHOD(Receive)(IMediaSample* media_sample);
37 39
38 private: 40 private:
39 VideoCaptureFormat requested_format_; 41 VideoPixelFormat requested_pixel_format_;
42 float requested_frame_rate_;
43 BITMAPINFOHEADER requested_info_header_;
40 VideoCaptureFormat resulting_format_; 44 VideoCaptureFormat resulting_format_;
41 SinkFilterObserver* observer_; 45 SinkFilterObserver* observer_;
42 46
43 DISALLOW_IMPLICIT_CONSTRUCTORS(SinkInputPin); 47 DISALLOW_IMPLICIT_CONSTRUCTORS(SinkInputPin);
44 }; 48 };
45 49
46 } // namespace media 50 } // namespace media
47 51
48 #endif // MEDIA_VIDEO_CAPTURE_WIN_SINK_INPUT_PIN_WIN_H_ 52 #endif // MEDIA_VIDEO_CAPTURE_WIN_SINK_INPUT_PIN_WIN_H_
OLDNEW
« no previous file with comments | « media/video/capture/win/sink_filter_win.cc ('k') | media/video/capture/win/sink_input_pin_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698