| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chromecast/media/cma/test/mock_frame_provider.h" | 5 #include "chromecast/media/cma/test/mock_frame_provider.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 ASSERT_TRUE(buffer.get()); | 72 ASSERT_TRUE(buffer.get()); |
| 73 | 73 |
| 74 ::media::AudioDecoderConfig audio_config; | 74 ::media::AudioDecoderConfig audio_config; |
| 75 ::media::VideoDecoderConfig video_config; | 75 ::media::VideoDecoderConfig video_config; |
| 76 if (has_config) { | 76 if (has_config) { |
| 77 gfx::Size coded_size(640, 480); | 77 gfx::Size coded_size(640, 480); |
| 78 gfx::Rect visible_rect(640, 480); | 78 gfx::Rect visible_rect(640, 480); |
| 79 gfx::Size natural_size(640, 480); | 79 gfx::Size natural_size(640, 480); |
| 80 video_config = ::media::VideoDecoderConfig( | 80 video_config = ::media::VideoDecoderConfig( |
| 81 ::media::kCodecH264, ::media::VIDEO_CODEC_PROFILE_UNKNOWN, | 81 ::media::kCodecH264, ::media::VIDEO_CODEC_PROFILE_UNKNOWN, |
| 82 ::media::PIXEL_FORMAT_YV12, coded_size, visible_rect, natural_size, | 82 ::media::PIXEL_FORMAT_YV12, ::media::COLOR_SPACE_UNSPECIFIED, |
| 83 NULL, 0, false); | 83 coded_size, visible_rect, natural_size, NULL, 0, false); |
| 84 | 84 |
| 85 audio_config = ::media::AudioDecoderConfig( | 85 audio_config = ::media::AudioDecoderConfig( |
| 86 ::media::kCodecAAC, | 86 ::media::kCodecAAC, |
| 87 ::media::kSampleFormatS16, | 87 ::media::kSampleFormatS16, |
| 88 ::media::CHANNEL_LAYOUT_STEREO, | 88 ::media::CHANNEL_LAYOUT_STEREO, |
| 89 44100, | 89 44100, |
| 90 NULL, 0, | 90 NULL, 0, |
| 91 false); | 91 false); |
| 92 } | 92 } |
| 93 | 93 |
| 94 read_cb.Run(buffer, audio_config, video_config); | 94 read_cb.Run(buffer, audio_config, video_config); |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace media | 97 } // namespace media |
| 98 } // namespace chromecast | 98 } // namespace chromecast |
| OLD | NEW |