[PATCH 4/4] Add support to -vfilters_file.
Stefano Sabatini
stefano.sabatini-lala
Sun Mar 28 16:47:27 CEST 2010
---
ffplay.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index 03da896..aedc71c 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2920,6 +2920,21 @@ static int opt_debug(const char *opt, const char *arg)
return 0;
}
+static int opt_vfilters_file(const char *opt, const char *arg)
+{
+ int size;
+
+ if (vfilters)
+ av_free(vfilters);
+
+ if (read_file(arg, &vfilters, &size) < 0) {
+ fprintf(stderr, "Cannot read vfilters file '%s'\n", arg);
+ exit(1);
+ }
+
+ return 0;
+}
+
static int opt_vismv(const char *opt, const char *arg)
{
debug_mv = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX);
@@ -2973,6 +2988,7 @@ static const OptionDef options[] = {
{ "window_title", OPT_STRING | HAS_ARG, {(void*)&window_title}, "set window title", "window title" },
#if CONFIG_AVFILTER
{ "vfilters", OPT_STRING | HAS_ARG, {(void*)&vfilters}, "video filters", "filter list" },
+ { "vfilters_file", OPT_FUNC2 | HAS_ARG, {(void*)opt_vfilters_file}, "read the video filters from a file", "video_filters_filename" },
#endif
{ "rdftspeed", OPT_INT | HAS_ARG| OPT_AUDIO | OPT_EXPERT, {(void*)&rdftspeed}, "rdft speed", "msecs" },
{ "default", OPT_FUNC2 | HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" },
--
1.7.0
--Izn7cH1Com+I3R9J--
More information about the ffmpeg-devel
mailing list