| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 ::media::AudioDecoderConfig audio_config( | 90 ::media::AudioDecoderConfig audio_config( |
| 91 ::media::kCodecMP3, | 91 ::media::kCodecMP3, |
| 92 ::media::kSampleFormatS16, | 92 ::media::kSampleFormatS16, |
| 93 ::media::CHANNEL_LAYOUT_STEREO, | 93 ::media::CHANNEL_LAYOUT_STEREO, |
| 94 44100, | 94 44100, |
| 95 NULL, 0, false); | 95 NULL, 0, false); |
| 96 std::vector<::media::VideoDecoderConfig> video_configs; | 96 std::vector<::media::VideoDecoderConfig> video_configs; |
| 97 video_configs.push_back(::media::VideoDecoderConfig( | 97 video_configs.push_back(::media::VideoDecoderConfig( |
| 98 ::media::kCodecH264, ::media::H264PROFILE_MAIN, | 98 ::media::kCodecH264, ::media::H264PROFILE_MAIN, |
| 99 ::media::PIXEL_FORMAT_I420, gfx::Size(640, 480), | 99 ::media::PIXEL_FORMAT_I420, ::media::COLOR_SPACE_UNSPECIFIED, |
| 100 gfx::Rect(0, 0, 640, 480), gfx::Size(640, 480), NULL, 0, false)); | 100 gfx::Size(640, 480), gfx::Rect(0, 0, 640, 480), gfx::Size(640, 480), NULL, |
| 101 0, false)); |
| 101 | 102 |
| 102 // Frame generation on the producer side. | 103 // Frame generation on the producer side. |
| 103 std::vector<FrameGeneratorForTest::FrameSpec> frame_specs; | 104 std::vector<FrameGeneratorForTest::FrameSpec> frame_specs; |
| 104 frame_specs.resize(100); | 105 frame_specs.resize(100); |
| 105 for (size_t k = 0; k < frame_specs.size() - 1; k++) { | 106 for (size_t k = 0; k < frame_specs.size() - 1; k++) { |
| 106 frame_specs[k].has_config = (k == 0); | 107 frame_specs[k].has_config = (k == 0); |
| 107 frame_specs[k].timestamp = base::TimeDelta::FromMilliseconds(40) * k; | 108 frame_specs[k].timestamp = base::TimeDelta::FromMilliseconds(40) * k; |
| 108 frame_specs[k].size = 512; | 109 frame_specs[k].size = 512; |
| 109 frame_specs[k].has_decrypt_config = false; | 110 frame_specs[k].has_decrypt_config = false; |
| 110 } | 111 } |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 FROM_HERE, | 202 FROM_HERE, |
| 202 base::Bind(&AudioVideoPipelineImplTest::Initialize, | 203 base::Bind(&AudioVideoPipelineImplTest::Initialize, |
| 203 base::Unretained(this), | 204 base::Unretained(this), |
| 204 base::Closure(), | 205 base::Closure(), |
| 205 ::media::PIPELINE_OK, is_audio)); | 206 ::media::PIPELINE_OK, is_audio)); |
| 206 message_loop->Run(); | 207 message_loop->Run(); |
| 207 }; | 208 }; |
| 208 | 209 |
| 209 } // namespace media | 210 } // namespace media |
| 210 } // namespace chromecast | 211 } // namespace chromecast |
| OLD | NEW |