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

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

Issue 16519003: Define a LoggingSettings struct to use for InitLogging() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error Created 7 years, 6 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 | « jingle/glue/logging_unittest.cc ('k') | media/tools/player_x11/player_x11.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) 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 // 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 <iomanip> 10 #include <iomanip>
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 void LeaveTimingSection() { 86 void LeaveTimingSection() {
87 } 87 }
88 #endif 88 #endif
89 89
90 int main(int argc, const char** argv) { 90 int main(int argc, const char** argv) {
91 base::AtExitManager exit_manager; 91 base::AtExitManager exit_manager;
92 92
93 CommandLine::Init(argc, argv); 93 CommandLine::Init(argc, argv);
94 94
95 logging::InitLogging( 95 logging::LoggingSettings settings;
96 NULL, 96 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
97 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, 97 logging::InitLogging(settings);
98 logging::LOCK_LOG_FILE, // Ignored.
99 logging::DELETE_OLD_LOG_FILE, // Ignored.
100 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
101 98
102 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 99 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
103 const CommandLine::StringVector& filenames = cmd_line->GetArgs(); 100 const CommandLine::StringVector& filenames = cmd_line->GetArgs();
104 if (filenames.empty()) { 101 if (filenames.empty()) {
105 std::cerr << "Usage: " << argv[0] << " [OPTIONS] FILE [DUMPFILE]\n" 102 std::cerr << "Usage: " << argv[0] << " [OPTIONS] FILE [DUMPFILE]\n"
106 << " --stream=[audio|video] " 103 << " --stream=[audio|video] "
107 << "Benchmark either the audio or video stream\n" 104 << "Benchmark either the audio or video stream\n"
108 << " --video-threads=N " 105 << " --video-threads=N "
109 << "Decode video using N threads\n" 106 << "Decode video using N threads\n"
110 << " --frames=N " 107 << " --frames=N "
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 #if defined(ENABLE_WINDOWS_EXCEPTIONS) 579 #if defined(ENABLE_WINDOWS_EXCEPTIONS)
583 } __except(EXCEPTION_EXECUTE_HANDLER) { 580 } __except(EXCEPTION_EXECUTE_HANDLER) {
584 *log_out << " Exception:" << std::setw(11) << GetExceptionCode() 581 *log_out << " Exception:" << std::setw(11) << GetExceptionCode()
585 << " " << in_path.value() << std::endl; 582 << " " << in_path.value() << std::endl;
586 return 1; 583 return 1;
587 } 584 }
588 #endif 585 #endif
589 CommandLine::Reset(); 586 CommandLine::Reset();
590 return 0; 587 return 0;
591 } 588 }
OLDNEW
« no previous file with comments | « jingle/glue/logging_unittest.cc ('k') | media/tools/player_x11/player_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698