| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <limits> | 5 #include <limits> |
| 6 #include <queue> | 6 #include <queue> |
| 7 | 7 |
| 8 #include "base/base_paths.h" | 8 #include "base/base_paths.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 } | 376 } |
| 377 | 377 |
| 378 FilePath path; | 378 FilePath path; |
| 379 PathService::Get(base::DIR_MODULE, &path); | 379 PathService::Get(base::DIR_MODULE, &path); |
| 380 EXPECT_TRUE(InitializeMediaLibrary(path)) | 380 EXPECT_TRUE(InitializeMediaLibrary(path)) |
| 381 << "Could not initialize media library."; | 381 << "Could not initialize media library."; |
| 382 | 382 |
| 383 avcodec_init(); | 383 avcodec_init(); |
| 384 av_log_set_level(AV_LOG_FATAL); | 384 av_log_set_level(AV_LOG_FATAL); |
| 385 av_register_all(); | 385 av_register_all(); |
| 386 av_register_protocol(&kFFmpegFileProtocol); | 386 av_register_protocol2(&kFFmpegFileProtocol, sizeof(kFFmpegFileProtocol)); |
| 387 initialized = true; | 387 initialized = true; |
| 388 } | 388 } |
| 389 | 389 |
| 390 AVFormatContext* av_format_context_; | 390 AVFormatContext* av_format_context_; |
| 391 int audio_stream_index_; | 391 int audio_stream_index_; |
| 392 int video_stream_index_; | 392 int video_stream_index_; |
| 393 AVPacketQueue audio_packets_; | 393 AVPacketQueue audio_packets_; |
| 394 AVPacketQueue video_packets_; | 394 AVPacketQueue video_packets_; |
| 395 | 395 |
| 396 scoped_ptr_malloc<int16, media::ScopedPtrAVFree> audio_buffer_; | 396 scoped_ptr_malloc<int16, media::ScopedPtrAVFree> audio_buffer_; |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 SeekTo(0.4); | 619 SeekTo(0.4); |
| 620 ReadRemainingFile(); | 620 ReadRemainingFile(); |
| 621 EXPECT_TRUE(StepDecodeVideo()); | 621 EXPECT_TRUE(StepDecodeVideo()); |
| 622 LOG(INFO) << decoded_video_time(); | 622 LOG(INFO) << decoded_video_time(); |
| 623 | 623 |
| 624 CloseCodecs(); | 624 CloseCodecs(); |
| 625 CloseFile(); | 625 CloseFile(); |
| 626 } | 626 } |
| 627 | 627 |
| 628 } // namespace media | 628 } // namespace media |
| OLD | NEW |