diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 19:55:16 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 19:55:16 +0000 |
commit | c4e52f0d8fa148f543d3e7b2562164e9bf5605aa (patch) | |
tree | 86a455dd54d4542026ff3059ac939dc809a09b26 /media | |
parent | 2fd94bbeefa87a83a96c65ff998add7d7fb0f908 (diff) | |
download | chromium_src-c4e52f0d8fa148f543d3e7b2562164e9bf5605aa.zip chromium_src-c4e52f0d8fa148f543d3e7b2562164e9bf5605aa.tar.gz chromium_src-c4e52f0d8fa148f543d3e7b2562164e9bf5605aa.tar.bz2 |
Use GetSwitchValueASCII.
BUG=24672
TEST=None
Original patch by Thiago Farina <thiago.farina@gmail.com> at
http://codereview.chromium.org/296004
Review URL: http://codereview.chromium.org/373013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31269 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/bench/bench.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/media/bench/bench.cc b/media/bench/bench.cc index 03e1294..dc994a7 100644 --- a/media/bench/bench.cc +++ b/media/bench/bench.cc @@ -139,33 +139,33 @@ int main(int argc, const char** argv) { // Determine number of threads to use for video decoding (optional). int video_threads = 0; - std::wstring threads(cmd_line->GetSwitchValue(switches::kVideoThreads)); + std::string threads(cmd_line->GetSwitchValueASCII(switches::kVideoThreads)); if (!threads.empty() && - !StringToInt(WideToUTF16Hack(threads), &video_threads)) { + !StringToInt(threads, &video_threads)) { video_threads = 0; } // FFmpeg verbosity. See libavutil/log.h for values: -8 quiet..48 verbose. int verbose_level = AV_LOG_FATAL; - std::wstring verbose(cmd_line->GetSwitchValue(switches::kVerbose)); + std::string verbose(cmd_line->GetSwitchValueASCII(switches::kVerbose)); if (!verbose.empty() && - !StringToInt(WideToUTF16Hack(verbose), &verbose_level)) { + !StringToInt(verbose, &verbose_level)) { verbose_level = AV_LOG_FATAL; } // Determine number of frames to decode (optional). int max_frames = 0; - std::wstring frames_opt(cmd_line->GetSwitchValue(switches::kFrames)); + std::string frames_opt(cmd_line->GetSwitchValueASCII(switches::kFrames)); if (!frames_opt.empty() && - !StringToInt(WideToUTF16Hack(frames_opt), &max_frames)) { + !StringToInt(frames_opt, &max_frames)) { max_frames = 0; } // Determine number of times to loop (optional). int max_loops = 0; - std::wstring loop_opt(cmd_line->GetSwitchValue(switches::kLoop)); + std::string loop_opt(cmd_line->GetSwitchValueASCII(switches::kLoop)); if (!loop_opt.empty() && - !StringToInt(WideToUTF16Hack(loop_opt), &max_loops)) { + !StringToInt(loop_opt, &max_loops)) { max_loops = 0; } @@ -194,8 +194,8 @@ int main(int argc, const char** argv) { int skip = 0; if (cmd_line->HasSwitch(switches::kSkip)) { - std::wstring skip_opt(cmd_line->GetSwitchValue(switches::kSkip)); - if (!StringToInt(WideToUTF16Hack(skip_opt), &skip)) { + std::string skip_opt(cmd_line->GetSwitchValueASCII(switches::kSkip)); + if (!StringToInt(skip_opt, &skip)) { skip = 0; } } |