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

Side by Side Diff: media/tools/media_bench/media_bench.cc

Issue 3007022: Merge 54053 - ffmpeg roll for chromium source and windows binaries... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/src/
Patch Set: Created 10 years, 4 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
« no previous file with comments | « media/test/ffmpeg_tests/ffmpeg_tests.cc ('k') | media/tools/omx_test/omx_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 std::ostream* log_out = &std::cout; 221 std::ostream* log_out = &std::cout;
222 #if defined(ENABLE_WINDOWS_EXCEPTIONS) 222 #if defined(ENABLE_WINDOWS_EXCEPTIONS)
223 // Catch exceptions so this tool can be used in automated testing. 223 // Catch exceptions so this tool can be used in automated testing.
224 __try { 224 __try {
225 #endif 225 #endif
226 226
227 // Register FFmpeg and attempt to open file. 227 // Register FFmpeg and attempt to open file.
228 avcodec_init(); 228 avcodec_init();
229 av_log_set_level(verbose_level); 229 av_log_set_level(verbose_level);
230 av_register_all(); 230 av_register_all();
231 av_register_protocol(&kFFmpegFileProtocol); 231 av_register_protocol2(&kFFmpegFileProtocol, sizeof(kFFmpegFileProtocol));
232 AVFormatContext* format_context = NULL; 232 AVFormatContext* format_context = NULL;
233 int result = av_open_input_file(&format_context, in_path.c_str(), 233 int result = av_open_input_file(&format_context, in_path.c_str(),
234 NULL, 0, NULL); 234 NULL, 0, NULL);
235 if (result < 0) { 235 if (result < 0) {
236 switch (result) { 236 switch (result) {
237 case AVERROR_NOFMT: 237 case AVERROR_NOFMT:
238 std::cerr << "Error: File format not supported " 238 std::cerr << "Error: File format not supported "
239 << in_path << std::endl; 239 << in_path << std::endl;
240 break; 240 break;
241 default: 241 default:
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 #if defined(ENABLE_WINDOWS_EXCEPTIONS) 567 #if defined(ENABLE_WINDOWS_EXCEPTIONS)
568 } __except(EXCEPTION_EXECUTE_HANDLER) { 568 } __except(EXCEPTION_EXECUTE_HANDLER) {
569 *log_out << " Exception:" << std::setw(11) << GetExceptionCode() 569 *log_out << " Exception:" << std::setw(11) << GetExceptionCode()
570 << " " << in_path << std::endl; 570 << " " << in_path << std::endl;
571 return 1; 571 return 1;
572 } 572 }
573 #endif 573 #endif
574 CommandLine::Reset(); 574 CommandLine::Reset();
575 return 0; 575 return 0;
576 } 576 }
OLDNEW
« no previous file with comments | « media/test/ffmpeg_tests/ffmpeg_tests.cc ('k') | media/tools/omx_test/omx_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698