From f1808e304834304122ebce9325eb997a673a9dc2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 27 Feb 2012 21:48:18 +0100 Subject: libpostproc: add pp=help support to print the help text via av_log() Signed-off-by: Michael Niedermayer --- libpostproc/postprocess.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libpostproc') diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c index ed5c240012..ef9cd44af9 100644 --- a/libpostproc/postprocess.c +++ b/libpostproc/postprocess.c @@ -723,6 +723,15 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality) struct PPMode *ppMode; char *filterToken; + if (!strcmp(name, "help")) { + const char *p; + for (p = pp_help; strchr(p, '\n'); p = strchr(p, '\n') + 1) { + av_strlcpy(temp, p, FFMIN(sizeof(temp), strchr(p, '\n') - p + 2)); + av_log(NULL, AV_LOG_INFO, "%s", temp); + } + return NULL; + } + ppMode= av_malloc(sizeof(PPMode)); ppMode->lumMode= 0; -- cgit v1.2.3