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/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 base::MemoryMappedFile video_stream; | 215 base::MemoryMappedFile video_stream; |
216 ASSERT_TRUE(video_stream.Initialize(file_path)) | 216 ASSERT_TRUE(video_stream.Initialize(file_path)) |
217 << "Couldn't open stream file: " << file_path.MaybeAsASCII(); | 217 << "Couldn't open stream file: " << file_path.MaybeAsASCII(); |
218 video_buffers_ = | 218 video_buffers_ = |
219 H264SegmenterForTest(video_stream.data(), video_stream.length()); | 219 H264SegmenterForTest(video_stream.data(), video_stream.length()); |
220 | 220 |
221 // TODO(erickung): Either pull data from stream or make caller specify value | 221 // TODO(erickung): Either pull data from stream or make caller specify value |
222 video_config.codec = kCodecH264; | 222 video_config.codec = kCodecH264; |
223 video_config.profile = kH264Main; | 223 video_config.profile = kH264Main; |
224 video_config.additional_config = NULL; | 224 video_config.additional_config = NULL; |
225 video_config.is_encrypted = false; | 225 video_config.encryption_scheme = EncryptionScheme(false); |
226 } else { | 226 } else { |
227 base::FilePath file_path = GetTestDataFilePath(filename); | 227 base::FilePath file_path = GetTestDataFilePath(filename); |
228 DemuxResult demux_result = FFmpegDemuxForTest(file_path, | 228 DemuxResult demux_result = FFmpegDemuxForTest(file_path, |
229 /*audio*/ false); | 229 /*audio*/ false); |
230 video_buffers_ = demux_result.frames; | 230 video_buffers_ = demux_result.frames; |
231 video_config = DecoderConfigAdapter::ToCastVideoConfig( | 231 video_config = DecoderConfigAdapter::ToCastVideoConfig( |
232 kPrimary, demux_result.video_config); | 232 kPrimary, demux_result.video_config); |
233 } | 233 } |
234 | 234 |
235 video_decoder_ = backend_->CreateVideoDecoder(); | 235 video_decoder_ = backend_->CreateVideoDecoder(); |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 TEST_F(AudioVideoPipelineDeviceTest, WebmPlayback) { | 488 TEST_F(AudioVideoPipelineDeviceTest, WebmPlayback) { |
489 scoped_ptr<base::MessageLoop> message_loop(new base::MessageLoop()); | 489 scoped_ptr<base::MessageLoop> message_loop(new base::MessageLoop()); |
490 | 490 |
491 ConfigureForFile("bear-640x360.webm"); | 491 ConfigureForFile("bear-640x360.webm"); |
492 Start(); | 492 Start(); |
493 message_loop->Run(); | 493 message_loop->Run(); |
494 } | 494 } |
495 | 495 |
496 } // namespace media | 496 } // namespace media |
497 } // namespace chromecast | 497 } // namespace chromecast |
OLD | NEW |