diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-04 19:29:53 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-04 19:29:53 +0000 |
commit | 26997934da78f15792ee179b58f97025d3d67c1d (patch) | |
tree | 4ab397128009e236f842463583c2b4f305bd949c /media/base/video_decoder_config.h | |
parent | 2639e1ff9e5d9d6905467abdb9da80681c68585b (diff) | |
download | chromium_src-26997934da78f15792ee179b58f97025d3d67c1d.zip chromium_src-26997934da78f15792ee179b58f97025d3d67c1d.tar.gz chromium_src-26997934da78f15792ee179b58f97025d3d67c1d.tar.bz2 |
Fix support for yuv_422 pixel format.
Added pix_fmt field to the VideoDecoderConfig class. The pixel format is passed to the
codec_context_ and used to correctly initialize VideoFrames.
Patch by shadi@chromium.org:
http://codereview.chromium.org/8052002/
BUG=95642
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103961 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/video_decoder_config.h')
-rw-r--r-- | media/base/video_decoder_config.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/media/base/video_decoder_config.h b/media/base/video_decoder_config.h index 305bad6..44182df4 100644 --- a/media/base/video_decoder_config.h +++ b/media/base/video_decoder_config.h @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "media/base/media_export.h" +#include "media/base/video_frame.h" #include "ui/gfx/rect.h" #include "ui/gfx/size.h" @@ -36,7 +37,9 @@ class MEDIA_EXPORT VideoDecoderConfig { // Constructs an initialized object. It is acceptable to pass in NULL for // |extra_data|, otherwise the memory is copied. - VideoDecoderConfig(VideoCodec codec, const gfx::Size& coded_size, + VideoDecoderConfig(VideoCodec codec, + VideoFrame::Format format, + const gfx::Size& coded_size, const gfx::Rect& visible_rect, int frame_rate_numerator, int frame_rate_denominator, const uint8* extra_data, size_t extra_data_size); @@ -44,7 +47,9 @@ class MEDIA_EXPORT VideoDecoderConfig { ~VideoDecoderConfig(); // Resets the internal state of this object. - void Initialize(VideoCodec codec, const gfx::Size& coded_size, + void Initialize(VideoCodec codec, + VideoFrame::Format format, + const gfx::Size& coded_size, const gfx::Rect& visible_rect, int frame_rate_numerator, int frame_rate_denominator, const uint8* extra_data, size_t extra_data_size); @@ -55,6 +60,9 @@ class MEDIA_EXPORT VideoDecoderConfig { VideoCodec codec() const; + // Video format used to determine YUV buffer sizes. + VideoFrame::Format format() const; + // Width and height of video frame immediately post-decode. Not all pixels // in this region are valid. gfx::Size coded_size() const; @@ -75,6 +83,8 @@ class MEDIA_EXPORT VideoDecoderConfig { private: VideoCodec codec_; + VideoFrame::Format format_; + gfx::Size coded_size_; gfx::Rect visible_rect_; |