Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: media/ffmpeg/ffmpeg_unittest.cc

Issue 6537022: Move media library path resolution into Chrome path provider. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: And again, this time with working tests... Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 r54591: 10 // Known failures as of r54591:
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 393
394 private: 394 private:
395 void InitializeFFmpeg() { 395 void InitializeFFmpeg() {
396 static bool initialized = false; 396 static bool initialized = false;
397 if (initialized) { 397 if (initialized) {
398 return; 398 return;
399 } 399 }
400 400
401 FilePath path; 401 FilePath path;
402 PathService::Get(base::DIR_MODULE, &path); 402 PathService::Get(base::DIR_MODULE, &path);
403 EXPECT_TRUE(InitializeMediaLibrary(path)) 403 InitializeMediaLibrary(path);
404 EXPECT_TRUE(IsMediaLibraryInitialized())
404 << "Could not initialize media library."; 405 << "Could not initialize media library.";
405 406
406 avcodec_init(); 407 avcodec_init();
407 av_log_set_level(AV_LOG_FATAL); 408 av_log_set_level(AV_LOG_FATAL);
408 av_register_all(); 409 av_register_all();
409 av_register_protocol2(&kFFmpegFileProtocol, sizeof(kFFmpegFileProtocol)); 410 av_register_protocol2(&kFFmpegFileProtocol, sizeof(kFFmpegFileProtocol));
410 initialized = true; 411 initialized = true;
411 } 412 }
412 413
413 AVFormatContext* av_format_context_; 414 AVFormatContext* av_format_context_;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 SeekTo(0.4); 648 SeekTo(0.4);
648 ReadRemainingFile(); 649 ReadRemainingFile();
649 EXPECT_TRUE(StepDecodeVideo()); 650 EXPECT_TRUE(StepDecodeVideo());
650 VLOG(1) << decoded_video_time(); 651 VLOG(1) << decoded_video_time();
651 652
652 CloseCodecs(); 653 CloseCodecs();
653 CloseFile(); 654 CloseFile();
654 } 655 }
655 656
656 } // namespace media 657 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698