libpostproc: add pp=help support to print the help text via av_log()
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 27 Feb 2012 20:48:18 +0000 (21:48 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 27 Feb 2012 22:07:25 +0000 (23:07 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libpostproc/postprocess.c

index ed5c240..ef9cd44 100644 (file)
@@ -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;