| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 76 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
| 77 | 77 |
| 78 const CommandLine::StringVector& filenames = cmd_line->GetArgs(); | 78 const CommandLine::StringVector& filenames = cmd_line->GetArgs(); |
| 79 | 79 |
| 80 if (filenames.empty()) { | 80 if (filenames.empty()) { |
| 81 std::cerr << "Usage: " << argv[0] << " MEDIAFILE" << std::endl; | 81 std::cerr << "Usage: " << argv[0] << " MEDIAFILE" << std::endl; |
| 82 return 1; | 82 return 1; |
| 83 } | 83 } |
| 84 | 84 |
| 85 // Initialize our media library (try loading DLLs, etc.) before continuing. | 85 // Initialize our media library (try loading DLLs, etc.) before continuing. |
| 86 FilePath media_path; | 86 base::FilePath media_path; |
| 87 PathService::Get(base::DIR_MODULE, &media_path); | 87 PathService::Get(base::DIR_MODULE, &media_path); |
| 88 if (!media::InitializeMediaLibrary(media_path)) { | 88 if (!media::InitializeMediaLibrary(media_path)) { |
| 89 std::cerr << "Unable to initialize the media library."; | 89 std::cerr << "Unable to initialize the media library."; |
| 90 return 1; | 90 return 1; |
| 91 } | 91 } |
| 92 | 92 |
| 93 // Retrieve command line options. | 93 // Retrieve command line options. |
| 94 FilePath in_path(filenames[0]); | 94 base::FilePath in_path(filenames[0]); |
| 95 FilePath out_path; | 95 base::FilePath out_path; |
| 96 if (filenames.size() > 1) | 96 if (filenames.size() > 1) |
| 97 out_path = FilePath(filenames[1]); | 97 out_path = base::FilePath(filenames[1]); |
| 98 | 98 |
| 99 // Default flags that match Chrome defaults. | 99 // Default flags that match Chrome defaults. |
| 100 int video_threads = 2; | 100 int video_threads = 2; |
| 101 int max_frames = 0; | 101 int max_frames = 0; |
| 102 int max_loops = 0; | 102 int max_loops = 0; |
| 103 bool flush = false; | 103 bool flush = false; |
| 104 | 104 |
| 105 unsigned int hash_value = 5381u; // Seed for DJB2. | 105 unsigned int hash_value = 5381u; // Seed for DJB2. |
| 106 bool hash_djb2 = false; | 106 bool hash_djb2 = false; |
| 107 | 107 |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 #if defined(ENABLE_WINDOWS_EXCEPTIONS) | 490 #if defined(ENABLE_WINDOWS_EXCEPTIONS) |
| 491 } __except(EXCEPTION_EXECUTE_HANDLER) { | 491 } __except(EXCEPTION_EXECUTE_HANDLER) { |
| 492 *log_out << " Exception:" << std::setw(11) << GetExceptionCode() | 492 *log_out << " Exception:" << std::setw(11) << GetExceptionCode() |
| 493 << " " << in_path.value() << std::endl; | 493 << " " << in_path.value() << std::endl; |
| 494 return 1; | 494 return 1; |
| 495 } | 495 } |
| 496 #endif | 496 #endif |
| 497 CommandLine::Reset(); | 497 CommandLine::Reset(); |
| 498 return 0; | 498 return 0; |
| 499 } | 499 } |
| OLD | NEW |