added numframes parameter
authorkramm <kramm>
Sat, 23 Jul 2005 08:23:03 +0000 (08:23 +0000)
committerkramm <kramm>
Sat, 23 Jul 2005 08:23:03 +0000 (08:23 +0000)
avi2swf/avi2swf.cc

index 7f6efe0..8662605 100644 (file)
@@ -48,6 +48,7 @@ static int skip = 0;
 static float audio_adjust = 0;
 static int mp3_bitrate = 32;
 static int samplerate = 11025;
+static int numframes = 0;
 
 static struct options_t options[] = {
 {"h", "help"},
@@ -76,6 +77,10 @@ int args_callback_option(char*name,char*val)
        outputfilename = val;
        return 1;
     }
+    else if(!strcmp(name, "n")) {
+       numframes = atoi(val);
+       return 1;
+    }
     else if(!strcmp(name, "q")) {
        quality = atoi(val);
        if(quality<0)
@@ -258,6 +263,8 @@ int main (int argc,char ** argv)
     ret = v2swf_init(&v2swf, &video);
     if(verbose)
        v2swf_setparameter(&v2swf, "verbose", "1");
+    if(numframes)
+       v2swf_setparameter(&v2swf, "numframes", itoa(numframes));
     v2swf_setparameter(&v2swf, "quality", itoa(quality));
     v2swf_setparameter(&v2swf, "blockdiff", "0");
     v2swf_setparameter(&v2swf, "blockdiff_mode", "exact");