Chromium Code Reviews| Index: media/base/video_decoder_config.h |
| diff --git a/media/base/video_decoder_config.h b/media/base/video_decoder_config.h |
| index b02bee8ae5154626336a2f80bf0a38e1460cae76..28b11061d58713cdf1ac26c25bc1cab8b4ae0692 100644 |
| --- a/media/base/video_decoder_config.h |
| +++ b/media/base/video_decoder_config.h |
| @@ -14,7 +14,7 @@ |
| namespace media { |
| -enum VideoCodec { |
| +enum MEDIA_EXPORT VideoCodec { |
| // These values are histogrammed over time; do not change their ordinal |
| // values. When deleting a codec replace it with a dummy value; when adding a |
| // codec, do so at the bottom (and update kVideoCodecMax). |
| @@ -33,6 +33,28 @@ enum VideoCodec { |
| kVideoCodecMax = kCodecVP8 // Must equal the last "real" codec above. |
| }; |
| +// Video stream profile. This *must* match PP_VideoDecoder_Profile. |
|
scherkus (not reviewing)
2011/12/06 00:27:44
I can't recall but I thought we didn't want to hav
Ami GONE FROM CHROMIUM
2011/12/07 00:03:04
The dependency we couldn't take was an explicit on
|
| +enum MEDIA_EXPORT VideoCodecProfile { |
| + // Keep the values in this enum unique, as they imply format (h.264 vs. VP8, |
| + // for example), and keep the values for a particular format grouped |
| + // together for clarity. |
| + VIDEO_CODEC_PROFILE_UNKNOWN = -1, |
|
scherkus (not reviewing)
2011/12/06 00:27:44
we're mixing up kStyle and ENUM_STYLE
Ami GONE FROM CHROMIUM
2011/12/07 00:03:04
Yeah, we are. Style guide prefers kStyle (newer)
|
| + H264PROFILE_MIN = 0, |
| + H264PROFILE_BASELINE = H264PROFILE_MIN, |
| + H264PROFILE_MAIN, |
| + H264PROFILE_EXTENDED, |
| + H264PROFILE_HIGH, |
| + H264PROFILE_HIGH10PROFILE, |
| + H264PROFILE_HIGH422PROFILE, |
| + H264PROFILE_HIGH444PREDICTIVEPROFILE, |
| + H264PROFILE_SCALABLEBASELINE, |
| + H264PROFILE_SCALABLEHIGH, |
| + H264PROFILE_STEREOHIGH, |
| + H264PROFILE_MULTIVIEWHIGH, |
| + H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH, |
| + VIDEO_CODEC_PROFILE_MAX = H264PROFILE_MAX, |
| +}; |
| + |
| class MEDIA_EXPORT VideoDecoderConfig { |
| public: |
| // Constructs an uninitialized object. Clients should call Initialize() with |
| @@ -42,6 +64,7 @@ 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, |
| + VideoCodecProfile profile, |
| VideoFrame::Format format, |
| const gfx::Size& coded_size, |
| const gfx::Rect& visible_rect, |
| @@ -53,6 +76,7 @@ class MEDIA_EXPORT VideoDecoderConfig { |
| // Resets the internal state of this object. |
| void Initialize(VideoCodec codec, |
| + VideoCodecProfile profile, |
| VideoFrame::Format format, |
| const gfx::Size& coded_size, |
| const gfx::Rect& visible_rect, |
| @@ -64,7 +88,12 @@ class MEDIA_EXPORT VideoDecoderConfig { |
| // otherwise. |
| bool IsValidConfig() const; |
| + // Returns a human-readable string describing |*this|. For debugging & test |
| + // output only. |
| + std::string AsHumanReadableString() const; |
| + |
| VideoCodec codec() const; |
| + VideoCodecProfile profile() const; |
| // Video format used to determine YUV buffer sizes. |
| VideoFrame::Format format() const; |
| @@ -102,6 +131,7 @@ class MEDIA_EXPORT VideoDecoderConfig { |
| private: |
| VideoCodec codec_; |
| + VideoCodecProfile profile_; |
| VideoFrame::Format format_; |