]> git.sesse.net Git - vlc/commitdiff
Overlay - Updated test program
authorSøren Bøg <avacore@videolan.org>
Sun, 19 Aug 2007 20:52:54 +0000 (22:52 +0200)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>
Wed, 9 Apr 2008 08:42:16 +0000 (10:42 +0200)
Overlay - Updated test program

extras/misc/overlay-test.c

index 4b0f10b838b000d94dde58cb3a02493498da4f68..0d8189e935357b90d0c07b1e31cbe64d23d15cd4 100644 (file)
@@ -27,6 +27,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdarg.h>
+#include <errno.h>
 #include <string.h>
 #include <math.h>
 
@@ -235,9 +236,26 @@ int main( int i_argc, char *ppsz_argv[] ) {
     DataCreate();
     printf( " done\n" );
 
+    printf( "Making FIFOs..." );
+    if( mkfifo( ppsz_argv[1], S_IRWXU ) ) {
+        if( errno != EEXIST ) {
+            printf( " failed\n" );
+            exit( -1 );
+        }
+        printf( " input already exists..." );
+    }
+    if( mkfifo( ppsz_argv[2], S_IRWXU ) ) {
+        if( errno != EEXIST ) {
+            printf( " failed\n" );
+            exit( -1 );
+        }
+        printf( " output already exists..." );
+    }
+    printf( " done\n" );
+
     printf( "Please make sure vlc is running.\n"
             "You should append parameters similar to the following:\n"
-            "--sub-filter overlay --overlay-input %s --overlay-output %s\n",
+            "--sub-filter overlay{input=%s,output=%s}\n",
             ppsz_argv[1], ppsz_argv[2] );
 
     printf( "Opening FIFOs..." );