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

Side by Side Diff: media/test/ffmpeg_tests/ffmpeg_tests.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 // Software qualification test for FFmpeg. This test is used to certify that 5 // Software qualification test for FFmpeg. This test is used to certify that
6 // software decoding quality and performance of FFmpeg meets a mimimum 6 // software decoding quality and performance of FFmpeg meets a mimimum
7 // standard. 7 // standard.
8 8
9 #include <iomanip> 9 #include <iomanip>
10 #include <iostream> 10 #include <iostream>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 const std::vector<CommandLine::StringType>& filenames = cmd_line->args(); 74 const std::vector<CommandLine::StringType>& filenames = cmd_line->args();
75 75
76 if (filenames.empty()) { 76 if (filenames.empty()) {
77 std::cerr << "Usage: " << argv[0] << " MEDIAFILE" << std::endl; 77 std::cerr << "Usage: " << argv[0] << " MEDIAFILE" << std::endl;
78 return 1; 78 return 1;
79 } 79 }
80 80
81 // Initialize our media library (try loading DLLs, etc.) before continuing. 81 // Initialize our media library (try loading DLLs, etc.) before continuing.
82 // We use an empty file path as the parameter to force searching of the 82 // We use an empty file path as the parameter to force searching of the
83 // default locations for necessary DLLs and DSOs. 83 // default locations for necessary DLLs and DSOs.
84 if (media::InitializeMediaLibrary(FilePath()) == false) { 84 media::InitializeMediaLibrary(FilePath());
85 if (media::IsMediaLibraryInitialized() == false) {
85 std::cerr << "Unable to initialize the media library."; 86 std::cerr << "Unable to initialize the media library.";
86 return 1; 87 return 1;
87 } 88 }
88 89
89 // Retrieve command line options. 90 // Retrieve command line options.
90 FilePath in_path(filenames[0]); 91 FilePath in_path(filenames[0]);
91 FilePath out_path; 92 FilePath out_path;
92 if (filenames.size() > 1) 93 if (filenames.size() > 1)
93 out_path = FilePath(filenames[1]); 94 out_path = FilePath(filenames[1]);
94 95
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 #if defined(ENABLE_WINDOWS_EXCEPTIONS) 493 #if defined(ENABLE_WINDOWS_EXCEPTIONS)
493 } __except(EXCEPTION_EXECUTE_HANDLER) { 494 } __except(EXCEPTION_EXECUTE_HANDLER) {
494 *log_out << " Exception:" << std::setw(11) << GetExceptionCode() 495 *log_out << " Exception:" << std::setw(11) << GetExceptionCode()
495 << " " << in_path.value() << std::endl; 496 << " " << in_path.value() << std::endl;
496 return 1; 497 return 1;
497 } 498 }
498 #endif 499 #endif
499 CommandLine::Reset(); 500 CommandLine::Reset();
500 return 0; 501 return 0;
501 } 502 }
502
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698