Commit d6345dd7 authored by bcoudurier's avatar bcoudurier

add loglevel option to set libav* logging level, -v does not set it anymore

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17973 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7b053aa1
...@@ -2321,10 +2321,15 @@ static int opt_me_threshold(const char *opt, const char *arg) ...@@ -2321,10 +2321,15 @@ static int opt_me_threshold(const char *opt, const char *arg)
return 0; return 0;
} }
static void opt_loglevel(const char *opt, const char *arg)
{
int level = parse_number_or_die(opt, arg, OPT_INT, INT_MIN, INT_MAX);
av_log_set_level(level);
}
static int opt_verbose(const char *opt, const char *arg) static int opt_verbose(const char *opt, const char *arg)
{ {
verbose = parse_number_or_die(opt, arg, OPT_INT64, -10, 10); verbose = parse_number_or_die(opt, arg, OPT_INT64, -10, 10);
av_log_set_level(verbose);
return 0; return 0;
} }
...@@ -3806,7 +3811,8 @@ static const OptionDef options[] = { ...@@ -3806,7 +3811,8 @@ static const OptionDef options[] = {
{ "re", OPT_BOOL | OPT_EXPERT, {(void*)&rate_emu}, "read input at native frame rate", "" }, { "re", OPT_BOOL | OPT_EXPERT, {(void*)&rate_emu}, "read input at native frame rate", "" },
{ "loop_input", OPT_BOOL | OPT_EXPERT, {(void*)&loop_input}, "loop (current only works with images)" }, { "loop_input", OPT_BOOL | OPT_EXPERT, {(void*)&loop_input}, "loop (current only works with images)" },
{ "loop_output", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&loop_output}, "number of times to loop output in formats that support looping (0 loops forever)", "" }, { "loop_output", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&loop_output}, "number of times to loop output in formats that support looping (0 loops forever)", "" },
{ "v", HAS_ARG | OPT_FUNC2, {(void*)opt_verbose}, "set the logging verbosity level", "number" }, { "v", HAS_ARG | OPT_FUNC2, {(void*)opt_verbose}, "set ffmpeg verbosity level", "number" },
{ "loglevel", HAS_ARG | OPT_FUNC2, {(void*)opt_loglevel}, "set libav* logging level", "number" },
{ "target", HAS_ARG, {(void*)opt_target}, "specify target file type (\"vcd\", \"svcd\", \"dvd\", \"dv\", \"dv50\", \"pal-vcd\", \"ntsc-svcd\", ...)", "type" }, { "target", HAS_ARG, {(void*)opt_target}, "specify target file type (\"vcd\", \"svcd\", \"dvd\", \"dv\", \"dv50\", \"pal-vcd\", \"ntsc-svcd\", ...)", "type" },
{ "threads", OPT_FUNC2 | HAS_ARG | OPT_EXPERT, {(void*)opt_thread_count}, "thread count", "count" }, { "threads", OPT_FUNC2 | HAS_ARG | OPT_EXPERT, {(void*)opt_thread_count}, "thread count", "count" },
{ "vsync", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&video_sync_method}, "video sync method", "" }, { "vsync", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&video_sync_method}, "video sync method", "" },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment