diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-21 22:49:44 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-21 22:49:44 +0000 |
commit | a6fb2d6387b558db727f7c3d421cde0e1e092aa7 (patch) | |
tree | d82af5b1f6c8429eb0e748c6c906b373002cfda4 /media/bench | |
parent | 6892d42b987764bc802c3782ad47e877e8e56da7 (diff) | |
download | chromium_src-a6fb2d6387b558db727f7c3d421cde0e1e092aa7.zip chromium_src-a6fb2d6387b558db727f7c3d421cde0e1e092aa7.tar.gz chromium_src-a6fb2d6387b558db727f7c3d421cde0e1e092aa7.tar.bz2 |
Hacked up delay load code for ffmpeg in posix systems. This is
a temporary solution. We need to find a more sustainable way to
do this.
Review URL: http://codereview.chromium.org/87018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14150 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/bench')
-rw-r--r-- | media/bench/bench.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/media/bench/bench.cc b/media/bench/bench.cc index 9e8f032..3494600 100644 --- a/media/bench/bench.cc +++ b/media/bench/bench.cc @@ -7,16 +7,18 @@ // options. We also use this tool to measure performance regressions when // testing newer builds of FFmpeg from trunk. -#include <windows.h> #include <iomanip> #include <iostream> +#include <string> #include "base/at_exit.h" #include "base/basictypes.h" #include "base/command_line.h" +#include "base/file_path.h" #include "base/logging.h" #include "base/string_util.h" #include "base/time.h" +#include "media/base/media.h" #include "media/filters/ffmpeg_common.h" namespace switches { @@ -46,6 +48,8 @@ int main(int argc, const char** argv) { return 1; } + media::InitializeMediaLibrary(FilePath()); + // Retrieve command line options. std::string path(WideToUTF8(filenames[0])); CodecType target_codec = CODEC_TYPE_UNKNOWN; @@ -66,7 +70,8 @@ int main(int argc, const char** argv) { // Determine number of threads to use for video decoding (optional). std::wstring threads(cmd_line->GetSwitchValue(switches::kVideoThreads)); - if (!threads.empty() && !StringToInt(threads, &video_threads)) { + if (!threads.empty() && + !StringToInt(WideToUTF16Hack(threads), &video_threads)) { video_threads = 0; } @@ -78,7 +83,7 @@ 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(skip_opt, &skip)) { + if (!StringToInt(WideToUTF16Hack(skip_opt), &skip)) { skip = 0; } } |