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 // Standalone benchmarking application based on FFmpeg. This tool is used to | 5 // Standalone benchmarking application based on FFmpeg. This tool is used to |
6 // measure decoding performance between different FFmpeg compile and run-time | 6 // measure decoding performance between different FFmpeg compile and run-time |
7 // options. We also use this tool to measure performance regressions when | 7 // options. We also use this tool to measure performance regressions when |
8 // testing newer builds of FFmpeg from trunk. | 8 // testing newer builds of FFmpeg from trunk. |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
115 << " --md5 " | 115 << " --md5 " |
116 << "Hash decoded buffers (MD5)\n" | 116 << "Hash decoded buffers (MD5)\n" |
117 << " --skip=[1|2|3] " | 117 << " --skip=[1|2|3] " |
118 << "1=loop nonref, 2=loop, 3= frame nonref\n" << std::endl; | 118 << "1=loop nonref, 2=loop, 3= frame nonref\n" << std::endl; |
119 return 1; | 119 return 1; |
120 } | 120 } |
121 | 121 |
122 // Initialize our media library (try loading DLLs, etc.) before continuing. | 122 // Initialize our media library (try loading DLLs, etc.) before continuing. |
123 // We use an empty file path as the parameter to force searching of the | 123 // We use an empty file path as the parameter to force searching of the |
124 // default locations for necessary DLLs and DSOs. | 124 // default locations for necessary DLLs and DSOs. |
125 if (media::InitializeMediaLibrary(FilePath()) == false) { | 125 media::InitializeMediaLibrary(FilePath()); |
126 if (media::IsMediaLibraryInitialized() == false) { | |
awong
2011/02/25 02:41:59
if (!media::IsMediaLibraryInitialized()) {
| |
126 std::cerr << "Unable to initialize the media library."; | 127 std::cerr << "Unable to initialize the media library."; |
127 return 1; | 128 return 1; |
128 } | 129 } |
129 | 130 |
130 // Retrieve command line options. | 131 // Retrieve command line options. |
131 FilePath in_path(filenames[0]); | 132 FilePath in_path(filenames[0]); |
132 FilePath out_path; | 133 FilePath out_path; |
133 if (filenames.size() > 1) | 134 if (filenames.size() > 1) |
134 out_path = FilePath(filenames[1]); | 135 out_path = FilePath(filenames[1]); |
135 CodecType target_codec = CODEC_TYPE_UNKNOWN; | 136 CodecType target_codec = CODEC_TYPE_UNKNOWN; |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
586 #if defined(ENABLE_WINDOWS_EXCEPTIONS) | 587 #if defined(ENABLE_WINDOWS_EXCEPTIONS) |
587 } __except(EXCEPTION_EXECUTE_HANDLER) { | 588 } __except(EXCEPTION_EXECUTE_HANDLER) { |
588 *log_out << " Exception:" << std::setw(11) << GetExceptionCode() | 589 *log_out << " Exception:" << std::setw(11) << GetExceptionCode() |
589 << " " << in_path.value() << std::endl; | 590 << " " << in_path.value() << std::endl; |
590 return 1; | 591 return 1; |
591 } | 592 } |
592 #endif | 593 #endif |
593 CommandLine::Reset(); | 594 CommandLine::Reset(); |
594 return 0; | 595 return 0; |
595 } | 596 } |
OLD | NEW |