| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 const std::string& filename, | 560 const std::string& filename, |
| 561 bool raw_h264, | 561 bool raw_h264, |
| 562 const base::Closure& eos_cb) { | 562 const base::Closure& eos_cb) { |
| 563 CHECK(backend); | 563 CHECK(backend); |
| 564 | 564 |
| 565 VideoConfig video_config; | 565 VideoConfig video_config; |
| 566 BufferList buffers; | 566 BufferList buffers; |
| 567 if (raw_h264) { | 567 if (raw_h264) { |
| 568 base::FilePath file_path = GetTestDataFilePath(filename); | 568 base::FilePath file_path = GetTestDataFilePath(filename); |
| 569 base::MemoryMappedFile video_stream; | 569 base::MemoryMappedFile video_stream; |
| 570 CHECK(video_stream.Initialize(file_path)) << "Couldn't open stream file: " | 570 // Couldn't open stream file. |
| 571 << file_path.MaybeAsASCII(); | 571 CHECK(video_stream.Initialize(file_path)); |
| 572 buffers = H264SegmenterForTest(video_stream.data(), video_stream.length()); | 572 buffers = H264SegmenterForTest(video_stream.data(), video_stream.length()); |
| 573 | 573 |
| 574 // TODO(erickung): Either pull data from stream or make caller specify value | 574 // TODO(erickung): Either pull data from stream or make caller specify value |
| 575 video_config.codec = kCodecH264; | 575 video_config.codec = kCodecH264; |
| 576 video_config.profile = kH264Main; | 576 video_config.profile = kH264Main; |
| 577 video_config.additional_config = nullptr; | 577 video_config.additional_config = nullptr; |
| 578 video_config.encryption_scheme = Unencrypted(); | 578 video_config.encryption_scheme = Unencrypted(); |
| 579 } else { | 579 } else { |
| 580 base::FilePath file_path = GetTestDataFilePath(filename); | 580 base::FilePath file_path = GetTestDataFilePath(filename); |
| 581 DemuxResult demux_result = FFmpegDemuxForTest(file_path, false /* audio */); | 581 DemuxResult demux_result = FFmpegDemuxForTest(file_path, false /* audio */); |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 set_sync_type(MediaPipelineDeviceParams::kModeSyncPts); | 1176 set_sync_type(MediaPipelineDeviceParams::kModeSyncPts); |
| 1177 ConfigureForFile("bear-640x360.webm"); | 1177 ConfigureForFile("bear-640x360.webm"); |
| 1178 PauseBeforeEos(); | 1178 PauseBeforeEos(); |
| 1179 AddEffectsStreams(); | 1179 AddEffectsStreams(); |
| 1180 Start(); | 1180 Start(); |
| 1181 base::RunLoop().Run(); | 1181 base::RunLoop().Run(); |
| 1182 } | 1182 } |
| 1183 | 1183 |
| 1184 } // namespace media | 1184 } // namespace media |
| 1185 } // namespace chromecast | 1185 } // namespace chromecast |
| OLD | NEW |