Chromium Code Reviews| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 | 74 |
| 75 void AudioVideoPipelineImplTest::Initialize( | 75 void AudioVideoPipelineImplTest::Initialize( |
| 76 const base::Closure& done_cb, | 76 const base::Closure& done_cb, |
| 77 ::media::PipelineStatus status, | 77 ::media::PipelineStatus status, |
| 78 bool is_audio) { | 78 bool is_audio) { |
| 79 ::media::AudioDecoderConfig audio_config( | 79 ::media::AudioDecoderConfig audio_config( |
| 80 ::media::kCodecMP3, | 80 ::media::kCodecMP3, |
| 81 ::media::kSampleFormatS16, | 81 ::media::kSampleFormatS16, |
| 82 ::media::CHANNEL_LAYOUT_STEREO, | 82 ::media::CHANNEL_LAYOUT_STEREO, |
| 83 44100, | 83 44100, |
| 84 ::media::EmptyExtraData(), false); | 84 ::media::EmptyExtraData(), ::media::EncryptionScheme(false)); |
|
halliwell
2016/01/13 03:29:41
another example.
dougsteed
2016/02/09 22:58:53
Done.
| |
| 85 std::vector<::media::VideoDecoderConfig> video_configs; | 85 std::vector<::media::VideoDecoderConfig> video_configs; |
| 86 video_configs.push_back(::media::VideoDecoderConfig( | 86 video_configs.push_back(::media::VideoDecoderConfig( |
| 87 ::media::kCodecH264, ::media::H264PROFILE_MAIN, | 87 ::media::kCodecH264, ::media::H264PROFILE_MAIN, |
| 88 ::media::PIXEL_FORMAT_I420, ::media::COLOR_SPACE_UNSPECIFIED, | 88 ::media::PIXEL_FORMAT_I420, ::media::COLOR_SPACE_UNSPECIFIED, |
| 89 gfx::Size(640, 480), gfx::Rect(0, 0, 640, 480), gfx::Size(640, 480), | 89 gfx::Size(640, 480), gfx::Rect(0, 0, 640, 480), gfx::Size(640, 480), |
| 90 ::media::EmptyExtraData(), false)); | 90 ::media::EmptyExtraData(), ::media::EncryptionScheme(false))); |
|
halliwell
2016/01/13 03:29:41
ditto
dougsteed
2016/02/09 22:58:53
Done.
| |
| 91 | 91 |
| 92 // Frame generation on the producer side. | 92 // Frame generation on the producer side. |
| 93 std::vector<FrameGeneratorForTest::FrameSpec> frame_specs; | 93 std::vector<FrameGeneratorForTest::FrameSpec> frame_specs; |
| 94 frame_specs.resize(100); | 94 frame_specs.resize(100); |
| 95 for (size_t k = 0; k < frame_specs.size() - 1; k++) { | 95 for (size_t k = 0; k < frame_specs.size() - 1; k++) { |
| 96 frame_specs[k].has_config = (k == 0); | 96 frame_specs[k].has_config = (k == 0); |
| 97 frame_specs[k].timestamp = base::TimeDelta::FromMilliseconds(40) * k; | 97 frame_specs[k].timestamp = base::TimeDelta::FromMilliseconds(40) * k; |
| 98 frame_specs[k].size = 512; | 98 frame_specs[k].size = 512; |
| 99 frame_specs[k].has_decrypt_config = false; | 99 frame_specs[k].has_decrypt_config = false; |
| 100 } | 100 } |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 199 | 199 |
| 200 message_loop_->PostTask(FROM_HERE, | 200 message_loop_->PostTask(FROM_HERE, |
| 201 base::Bind(&AudioVideoPipelineImplTest::Initialize, | 201 base::Bind(&AudioVideoPipelineImplTest::Initialize, |
| 202 base::Unretained(this), base::Closure(), | 202 base::Unretained(this), base::Closure(), |
| 203 ::media::PIPELINE_OK, is_audio)); | 203 ::media::PIPELINE_OK, is_audio)); |
| 204 message_loop_->Run(); | 204 message_loop_->Run(); |
| 205 }; | 205 }; |
| 206 | 206 |
| 207 } // namespace media | 207 } // namespace media |
| 208 } // namespace chromecast | 208 } // namespace chromecast |
| OLD | NEW |