summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
Diffstat (limited to 'media')
-rw-r--r--media/filters/ffmpeg_video_decode_engine.cc4
-rw-r--r--media/tools/media_bench/media_bench.cc12
-rw-r--r--media/tools/omx_test/omx_test.cc10
-rw-r--r--media/tools/scaler_bench/scaler_bench.cc14
-rw-r--r--media/tools/wav_ola_test/wav_ola_test.cc4
5 files changed, 24 insertions, 20 deletions
diff --git a/media/filters/ffmpeg_video_decode_engine.cc b/media/filters/ffmpeg_video_decode_engine.cc
index 2413b7f..34d05bf 100644
--- a/media/filters/ffmpeg_video_decode_engine.cc
+++ b/media/filters/ffmpeg_video_decode_engine.cc
@@ -5,7 +5,7 @@
#include "media/filters/ffmpeg_video_decode_engine.h"
#include "base/command_line.h"
-#include "base/string_util.h"
+#include "base/string_number_conversions.h"
#include "base/task.h"
#include "media/base/buffers.h"
#include "media/base/callback.h"
@@ -69,7 +69,7 @@ void FFmpegVideoDecodeEngine::Initialize(
const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
std::string threads(cmd_line->GetSwitchValueASCII(switches::kVideoThreads));
if ((!threads.empty() &&
- !StringToInt(threads, &decode_threads)) ||
+ !base::StringToInt(threads, &decode_threads)) ||
decode_threads < 0 || decode_threads > kMaxDecodeThreads) {
decode_threads = kDecodeThreads;
}
diff --git a/media/tools/media_bench/media_bench.cc b/media/tools/media_bench/media_bench.cc
index dae6921..51af940 100644
--- a/media/tools/media_bench/media_bench.cc
+++ b/media/tools/media_bench/media_bench.cc
@@ -25,7 +25,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/md5.h"
-#include "base/string_util.h"
+#include "base/string_number_conversions.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
#include "media/base/djb2.h"
@@ -150,7 +150,7 @@ int main(int argc, const char** argv) {
int video_threads = 0;
std::string threads(cmd_line->GetSwitchValueASCII(switches::kVideoThreads));
if (!threads.empty() &&
- !StringToInt(threads, &video_threads)) {
+ !base::StringToInt(threads, &video_threads)) {
video_threads = 0;
}
@@ -158,7 +158,7 @@ int main(int argc, const char** argv) {
int verbose_level = AV_LOG_FATAL;
std::string verbose(cmd_line->GetSwitchValueASCII(switches::kVerbose));
if (!verbose.empty() &&
- !StringToInt(verbose, &verbose_level)) {
+ !base::StringToInt(verbose, &verbose_level)) {
verbose_level = AV_LOG_FATAL;
}
@@ -166,7 +166,7 @@ int main(int argc, const char** argv) {
int max_frames = 0;
std::string frames_opt(cmd_line->GetSwitchValueASCII(switches::kFrames));
if (!frames_opt.empty() &&
- !StringToInt(frames_opt, &max_frames)) {
+ !base::StringToInt(frames_opt, &max_frames)) {
max_frames = 0;
}
@@ -174,7 +174,7 @@ int main(int argc, const char** argv) {
int max_loops = 0;
std::string loop_opt(cmd_line->GetSwitchValueASCII(switches::kLoop));
if (!loop_opt.empty() &&
- !StringToInt(loop_opt, &max_loops)) {
+ !base::StringToInt(loop_opt, &max_loops)) {
max_loops = 0;
}
@@ -209,7 +209,7 @@ int main(int argc, const char** argv) {
int skip = 0;
if (cmd_line->HasSwitch(switches::kSkip)) {
std::string skip_opt(cmd_line->GetSwitchValueASCII(switches::kSkip));
- if (!StringToInt(skip_opt, &skip)) {
+ if (!base::StringToInt(skip_opt, &skip)) {
skip = 0;
}
}
diff --git a/media/tools/omx_test/omx_test.cc b/media/tools/omx_test/omx_test.cc
index 777f55a..8740f57 100644
--- a/media/tools/omx_test/omx_test.cc
+++ b/media/tools/omx_test/omx_test.cc
@@ -13,8 +13,9 @@
#include "base/command_line.h"
#include "base/message_loop.h"
#include "base/scoped_ptr.h"
-#include "base/string_util.h"
+#include "base/string_number_conversions.h"
#include "base/time.h"
+#include "base/utf_string_conversions.h"
#include "media/base/data_buffer.h"
#include "media/base/media.h"
#include "media/base/video_frame.h"
@@ -219,8 +220,11 @@ static bool HasSwitch(const char* name) {
}
static int GetIntSwitch(const char* name) {
- if (HasSwitch(name))
- return StringToInt(GetStringSwitch(name));
+ if (HasSwitch(name)) {
+ int val;
+ base::StringToInt(GetStringSwitch(name), &val);
+ return val;
+ }
return 0;
}
diff --git a/media/tools/scaler_bench/scaler_bench.cc b/media/tools/scaler_bench/scaler_bench.cc
index 2208a17..8c3570b 100644
--- a/media/tools/scaler_bench/scaler_bench.cc
+++ b/media/tools/scaler_bench/scaler_bench.cc
@@ -11,7 +11,7 @@
#include "base/command_line.h"
#include "base/scoped_vector.h"
-#include "base/string_util.h"
+#include "base/string_number_conversions.h"
#include "base/time.h"
#include "media/base/video_frame.h"
#include "media/base/yuv_convert.h"
@@ -156,37 +156,37 @@ int main(int argc, const char** argv) {
std::string source_width_param(cmd_line->GetSwitchValueASCII("src-w"));
if (!source_width_param.empty() &&
- !StringToInt(source_width_param, &source_width)) {
+ !base::StringToInt(source_width_param, &source_width)) {
source_width = 0;
}
std::string source_height_param(cmd_line->GetSwitchValueASCII("src-h"));
if (!source_height_param.empty() &&
- !StringToInt(source_height_param, &source_height)) {
+ !base::StringToInt(source_height_param, &source_height)) {
source_height = 0;
}
std::string dest_width_param(cmd_line->GetSwitchValueASCII("dest-w"));
if (!dest_width_param.empty() &&
- !StringToInt(dest_width_param, &dest_width)) {
+ !base::StringToInt(dest_width_param, &dest_width)) {
dest_width = 0;
}
std::string dest_height_param(cmd_line->GetSwitchValueASCII("dest-h"));
if (!dest_height_param.empty() &&
- !StringToInt(dest_height_param, &dest_height)) {
+ !base::StringToInt(dest_height_param, &dest_height)) {
dest_height = 0;
}
std::string frames_param(cmd_line->GetSwitchValueASCII("frames"));
if (!frames_param.empty() &&
- !StringToInt(frames_param, &num_frames)) {
+ !base::StringToInt(frames_param, &num_frames)) {
num_frames = 0;
}
std::string buffers_param(cmd_line->GetSwitchValueASCII("buffers"));
if (!buffers_param.empty() &&
- !StringToInt(buffers_param, &num_buffers)) {
+ !base::StringToInt(buffers_param, &num_buffers)) {
num_buffers = 0;
}
diff --git a/media/tools/wav_ola_test/wav_ola_test.cc b/media/tools/wav_ola_test/wav_ola_test.cc
index 0c6b214..633f849 100644
--- a/media/tools/wav_ola_test/wav_ola_test.cc
+++ b/media/tools/wav_ola_test/wav_ola_test.cc
@@ -16,7 +16,7 @@
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/ref_counted.h"
-#include "base/string_util.h"
+#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
#include "media/base/data_buffer.h"
#include "media/filters/audio_renderer_algorithm_ola.h"
@@ -90,7 +90,7 @@ int main(int argc, const char** argv) {
#else
const std::string& filename_str = filenames[0];
#endif
- if (!StringToDouble(filename_str, &playback_rate))
+ if (!base::StringToDouble(filename_str, &playback_rate))
playback_rate = 0.0;
// Open input file.