Chromium Code Reviews| Index: chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc |
| diff --git a/chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc b/chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc |
| index f4f419cd4c3ff97e3c79b95172bcfa0c1c021e3f..3c209943bf205ac3eea6f6a876fee17236792653 100644 |
| --- a/chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc |
| +++ b/chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc |
| @@ -25,8 +25,10 @@ |
| #include "chromecast/media/cma/backend/video_pipeline_device.h" |
| #include "chromecast/media/cma/base/decoder_buffer_adapter.h" |
| #include "chromecast/media/cma/base/decoder_buffer_base.h" |
| +#include "chromecast/media/cma/base/decoder_config_adapter.h" |
| #include "chromecast/media/cma/test/frame_segmenter_for_test.h" |
| #include "chromecast/media/cma/test/media_component_device_feeder_for_test.h" |
| +#include "chromecast/public/media/decoder_config.h" |
| #include "media/base/audio_decoder_config.h" |
| #include "media/base/buffers.h" |
| #include "media/base/decoder_buffer.h" |
| @@ -154,7 +156,8 @@ void AudioVideoPipelineDeviceTest::LoadAudioStream(std::string filename) { |
| AudioPipelineDevice* audio_pipeline_device = |
| media_pipeline_device_->GetAudioPipelineDevice(); |
| - bool success = audio_pipeline_device->SetConfig(demux_result.audio_config); |
| + bool success = audio_pipeline_device->SetConfig( |
| + DecoderConfigAdapter::ToAudioConfig(demux_result.audio_config)); |
| ASSERT_TRUE(success); |
| VLOG(2) << "Got " << frames.size() << " audio input frames"; |
| @@ -174,7 +177,7 @@ void AudioVideoPipelineDeviceTest::LoadAudioStream(std::string filename) { |
| void AudioVideoPipelineDeviceTest::LoadVideoStream(std::string filename, |
| bool raw_h264) { |
| BufferList frames; |
| - ::media::VideoDecoderConfig video_config; |
| + VideoConfig video_config; |
| if (raw_h264) { |
| base::FilePath file_path = GetTestDataFilePath(filename); |
| @@ -183,26 +186,18 @@ void AudioVideoPipelineDeviceTest::LoadVideoStream(std::string filename, |
| << "Couldn't open stream file: " << file_path.MaybeAsASCII(); |
| frames = H264SegmenterForTest(video_stream.data(), video_stream.length()); |
| - // Use arbitraty sizes. |
| - gfx::Size coded_size(320, 240); |
| - gfx::Rect visible_rect(0, 0, 320, 240); |
| - gfx::Size natural_size(320, 240); |
|
lcwu1
2015/05/05 23:46:22
I assume the size info (as well as the video frame
erickung1
2015/05/06 01:17:11
no existing vendors are needed. Actually they can
|
| - |
| - // TODO(kjoswiak): Either pull data from stream or make caller specify value |
| - video_config = ::media::VideoDecoderConfig( |
| - ::media::kCodecH264, |
| - ::media::H264PROFILE_MAIN, |
| - ::media::VideoFrame::I420, |
| - coded_size, |
| - visible_rect, |
| - natural_size, |
| - NULL, 0, false); |
| + // TODO(erickung): Either pull data from stream or make caller specify value |
| + video_config.codec = kCodecH264; |
| + video_config.profile = kH264Main; |
| + video_config.additional_config = NULL; |
| + video_config.is_encrypted = false; |
| } else { |
| base::FilePath file_path = GetTestDataFilePath(filename); |
| DemuxResult demux_result = FFmpegDemuxForTest(file_path, |
| /*audio*/ false); |
| frames = demux_result.frames; |
| - video_config = demux_result.video_config; |
| + video_config = |
| + DecoderConfigAdapter::ToVideoConfig(demux_result.video_config); |
| } |
| VideoPipelineDevice* video_pipeline_device = |