| 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 // ffmpeg_unittests verify that the parts of the FFmpeg API that Chromium uses | 5 // ffmpeg_unittests verify that the parts of the FFmpeg API that Chromium uses |
| 6 // function as advertised for each media format that Chromium supports. This | 6 // function as advertised for each media format that Chromium supports. This |
| 7 // mostly includes stuff like reporting proper timestamps, seeking to | 7 // mostly includes stuff like reporting proper timestamps, seeking to |
| 8 // keyframes, and supporting certain features like reordered_opaque. | 8 // keyframes, and supporting certain features like reordered_opaque. |
| 9 // | 9 // |
| 10 // Known failures as of r53892: | 10 // Known failures as of r53892: |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 } | 394 } |
| 395 | 395 |
| 396 FilePath path; | 396 FilePath path; |
| 397 PathService::Get(base::DIR_MODULE, &path); | 397 PathService::Get(base::DIR_MODULE, &path); |
| 398 EXPECT_TRUE(InitializeMediaLibrary(path)) | 398 EXPECT_TRUE(InitializeMediaLibrary(path)) |
| 399 << "Could not initialize media library."; | 399 << "Could not initialize media library."; |
| 400 | 400 |
| 401 avcodec_init(); | 401 avcodec_init(); |
| 402 av_log_set_level(AV_LOG_FATAL); | 402 av_log_set_level(AV_LOG_FATAL); |
| 403 av_register_all(); | 403 av_register_all(); |
| 404 av_register_protocol2(&kFFmpegFileProtocol, sizeof(kFFmpegFileProtocol)); | 404 av_register_protocol(&kFFmpegFileProtocol); |
| 405 initialized = true; | 405 initialized = true; |
| 406 } | 406 } |
| 407 | 407 |
| 408 AVFormatContext* av_format_context_; | 408 AVFormatContext* av_format_context_; |
| 409 int audio_stream_index_; | 409 int audio_stream_index_; |
| 410 int video_stream_index_; | 410 int video_stream_index_; |
| 411 AVPacketQueue audio_packets_; | 411 AVPacketQueue audio_packets_; |
| 412 AVPacketQueue video_packets_; | 412 AVPacketQueue video_packets_; |
| 413 | 413 |
| 414 scoped_ptr_malloc<int16, media::ScopedPtrAVFree> audio_buffer_; | 414 scoped_ptr_malloc<int16, media::ScopedPtrAVFree> audio_buffer_; |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 SeekTo(0.4); | 637 SeekTo(0.4); |
| 638 ReadRemainingFile(); | 638 ReadRemainingFile(); |
| 639 EXPECT_TRUE(StepDecodeVideo()); | 639 EXPECT_TRUE(StepDecodeVideo()); |
| 640 LOG(INFO) << decoded_video_time(); | 640 LOG(INFO) << decoded_video_time(); |
| 641 | 641 |
| 642 CloseCodecs(); | 642 CloseCodecs(); |
| 643 CloseFile(); | 643 CloseFile(); |
| 644 } | 644 } |
| 645 | 645 |
| 646 } // namespace media | 646 } // namespace media |
| OLD | NEW |