diff options
author | dongseong.hwang <dongseong.hwang@intel.com> | 2015-07-13 09:01:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-13 16:01:56 +0000 |
commit | 11edd34b171b78462c1a27ac6587d977833122ea (patch) | |
tree | c7496bf802d36cb29c6fa4e5351c08af48680232 /chromecast | |
parent | b50a7cbab0df3cc66f1881dcb08e4cef18f96835 (diff) | |
download | chromium_src-11edd34b171b78462c1a27ac6587d977833122ea.zip chromium_src-11edd34b171b78462c1a27ac6587d977833122ea.tar.gz chromium_src-11edd34b171b78462c1a27ac6587d977833122ea.tar.bz2 |
media: extract Format and ColorSpace enum from VideoFrame.
These enums are used in IPC as well as many classes. It's too big to include
video_frame.h for only these enums.
BUG=489744
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1165003008
Cr-Commit-Position: refs/heads/master@{#338514}
Diffstat (limited to 'chromecast')
7 files changed, 14 insertions, 23 deletions
diff --git a/chromecast/common/media/cma_param_traits.cc b/chromecast/common/media/cma_param_traits.cc index 8849be1..d459040 100644 --- a/chromecast/common/media/cma_param_traits.cc +++ b/chromecast/common/media/cma_param_traits.cc @@ -23,8 +23,7 @@ IPC_ENUM_TRAITS_MIN_MAX_VALUE(media::ChannelLayout, IPC_ENUM_TRAITS_MIN_MAX_VALUE(media::VideoCodecProfile, media::VIDEO_CODEC_PROFILE_MIN, media::VIDEO_CODEC_PROFILE_MAX) -IPC_ENUM_TRAITS_MAX_VALUE(media::VideoFrame::Format, - media::VideoFrame::FORMAT_MAX) +IPC_ENUM_TRAITS_MAX_VALUE(media::VideoPixelFormat, media::PIXEL_FORMAT_MAX) namespace IPC { @@ -98,7 +97,7 @@ bool ParamTraits<media::VideoDecoderConfig>::Read( media::VideoDecoderConfig* r) { media::VideoCodec codec; media::VideoCodecProfile profile; - media::VideoFrame::Format format; + media::VideoPixelFormat format; gfx::Size coded_size; gfx::Rect visible_rect; gfx::Size natural_size; diff --git a/chromecast/media/cma/filters/hole_frame_factory.cc b/chromecast/media/cma/filters/hole_frame_factory.cc index caad188..54923cc 100644 --- a/chromecast/media/cma/filters/hole_frame_factory.cc +++ b/chromecast/media/cma/filters/hole_frame_factory.cc @@ -63,7 +63,7 @@ scoped_refptr<::media::VideoFrame> HoleFrameFactory::CreateHoleFrame( scoped_refptr<::media::VideoFrame> frame = ::media::VideoFrame::WrapNativeTexture( - ::media::VideoFrame::XRGB, + ::media::PIXEL_FORMAT_XRGB, gpu::MailboxHolder(mailbox_, GL_TEXTURE_2D, sync_point_), ::media::VideoFrame::ReleaseMailboxCB(), size, // coded_size diff --git a/chromecast/media/cma/ipc_streamer/video_decoder_config_marshaller.cc b/chromecast/media/cma/ipc_streamer/video_decoder_config_marshaller.cc index d6ec43e..58fa2f3 100644 --- a/chromecast/media/cma/ipc_streamer/video_decoder_config_marshaller.cc +++ b/chromecast/media/cma/ipc_streamer/video_decoder_config_marshaller.cc @@ -73,7 +73,7 @@ void VideoDecoderConfigMarshaller::Write( MediaMessage* msg) { ::media::VideoCodec codec; ::media::VideoCodecProfile profile; - ::media::VideoFrame::Format format; + ::media::VideoPixelFormat format; gfx::Size coded_size; gfx::Rect visible_rect; gfx::Size natural_size; @@ -94,8 +94,8 @@ void VideoDecoderConfigMarshaller::Write( CHECK_LE(codec, ::media::kVideoCodecMax); CHECK_GE(profile, ::media::VIDEO_CODEC_PROFILE_UNKNOWN); CHECK_LE(profile, ::media::VIDEO_CODEC_PROFILE_MAX); - CHECK_GE(format, ::media::VideoFrame::UNKNOWN); - CHECK_LE(format, ::media::VideoFrame::FORMAT_MAX); + CHECK_GE(format, ::media::PIXEL_FORMAT_UNKNOWN); + CHECK_LE(format, ::media::PIXEL_FORMAT_MAX); CHECK_LT(extra_data_size, kMaxExtraDataSize); if (extra_data_size > 0) { extra_data.reset(new uint8[extra_data_size]); diff --git a/chromecast/media/cma/pipeline/audio_video_pipeline_impl_unittest.cc b/chromecast/media/cma/pipeline/audio_video_pipeline_impl_unittest.cc index 9b9dc12..5a7328c 100644 --- a/chromecast/media/cma/pipeline/audio_video_pipeline_impl_unittest.cc +++ b/chromecast/media/cma/pipeline/audio_video_pipeline_impl_unittest.cc @@ -95,13 +95,9 @@ void AudioVideoPipelineImplTest::Initialize( NULL, 0, false); std::vector<::media::VideoDecoderConfig> video_configs; video_configs.push_back(::media::VideoDecoderConfig( - ::media::kCodecH264, - ::media::H264PROFILE_MAIN, - ::media::VideoFrame::I420, - gfx::Size(640, 480), - gfx::Rect(0, 0, 640, 480), - gfx::Size(640, 480), - NULL, 0, false)); + ::media::kCodecH264, ::media::H264PROFILE_MAIN, + ::media::PIXEL_FORMAT_I420, gfx::Size(640, 480), + gfx::Rect(0, 0, 640, 480), gfx::Size(640, 480), NULL, 0, false)); // Frame generation on the producer side. std::vector<FrameGeneratorForTest::FrameSpec> frame_specs; diff --git a/chromecast/media/cma/pipeline/av_pipeline_impl.cc b/chromecast/media/cma/pipeline/av_pipeline_impl.cc index 5c6c695..ab0a2a7 100644 --- a/chromecast/media/cma/pipeline/av_pipeline_impl.cc +++ b/chromecast/media/cma/pipeline/av_pipeline_impl.cc @@ -21,6 +21,7 @@ #include "chromecast/media/cma/pipeline/decrypt_util.h" #include "media/base/audio_decoder_config.h" #include "media/base/bind_to_current_loop.h" +#include "media/base/buffers.h" #include "media/base/decrypt_config.h" namespace chromecast { diff --git a/chromecast/media/cma/test/demuxer_stream_for_test.cc b/chromecast/media/cma/test/demuxer_stream_for_test.cc index 145e5d4..3d64540 100644 --- a/chromecast/media/cma/test/demuxer_stream_for_test.cc +++ b/chromecast/media/cma/test/demuxer_stream_for_test.cc @@ -54,7 +54,7 @@ void DemuxerStreamForTest::Read(const ReadCB& read_cb) { gfx::Size natural_size(640, 480); return ::media::VideoDecoderConfig( ::media::kCodecH264, ::media::VIDEO_CODEC_PROFILE_UNKNOWN, - ::media::VideoFrame::YV12, coded_size, visible_rect, natural_size, NULL, + ::media::PIXEL_FORMAT_YV12, coded_size, visible_rect, natural_size, NULL, 0, false); } diff --git a/chromecast/media/cma/test/mock_frame_provider.cc b/chromecast/media/cma/test/mock_frame_provider.cc index c1de898..4e88849 100644 --- a/chromecast/media/cma/test/mock_frame_provider.cc +++ b/chromecast/media/cma/test/mock_frame_provider.cc @@ -78,14 +78,9 @@ void MockFrameProvider::DoRead(const ReadCB& read_cb) { gfx::Rect visible_rect(640, 480); gfx::Size natural_size(640, 480); video_config = ::media::VideoDecoderConfig( - ::media::kCodecH264, - ::media::VIDEO_CODEC_PROFILE_UNKNOWN, - ::media::VideoFrame::YV12, - coded_size, - visible_rect, - natural_size, - NULL, 0, - false); + ::media::kCodecH264, ::media::VIDEO_CODEC_PROFILE_UNKNOWN, + ::media::PIXEL_FORMAT_YV12, coded_size, visible_rect, natural_size, + NULL, 0, false); audio_config = ::media::AudioDecoderConfig( ::media::kCodecAAC, |