From: kramm Date: Sun, 3 Nov 2002 09:58:29 +0000 (+0000) Subject: new option -f. X-Git-Tag: old_makefiles2~23 X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;h=79754fc1e187365020989c8a2d1a1f6ac704e44f;p=swftools.git new option -f. --- diff --git a/src/swfdump.1 b/src/swfdump.1 index a73d676..39f3f18 100644 --- a/src/swfdump.1 +++ b/src/swfdump.1 @@ -35,6 +35,9 @@ Print out the vertical dimension of the movie, in a string of the form "-Y heigh \fB\-r\fR, \fB\-\-rate\fR Print out the frame rate of the movie, in a string of the form "-r rate" .TP +\fB\-f\fR, \fB\-\-frames\fR +Print out the number of frames in the movie, in a string of the form "-f frames" +.TP \fB\-d\fR, \fB\-\-hex\fR Print hex output of tag data, too. .TP diff --git a/src/swfdump.c b/src/swfdump.c index e776403..de52058 100644 --- a/src/swfdump.c +++ b/src/swfdump.c @@ -49,6 +49,7 @@ struct options_t options[] = {"t","text"}, {"X","width"}, {"Y","height"}, + {"f","frames"}, {"r","rate"}, {"e","html"}, {"u","used"}, @@ -89,6 +90,10 @@ int args_callback_option(char*name,char*val) xy |= 4; return 0; } + else if(name[0]=='f') { + xy |= 8; + return 0; + } else if(name[0]=='d') { hex = 1; return 0; @@ -115,6 +120,7 @@ void args_callback_usage(char*name) printf("\t-X , --width\t\t Prints out a string of the form \"-X width\"\n"); printf("\t-Y , --height\t\t Prints out a string of the form \"-Y height\"\n"); printf("\t-r , --rate\t\t Prints out a string of the form \"-r rate\"\n"); + printf("\t-f , --frames\t\t Prints out a string of the form \"-f framenum\"\n"); printf("\t-a , --action\t\t Disassemble action tags\n"); printf("\t-t , --text\t\t Show text data\n"); printf("\t-d , --hex\t\t Print hex output of tag data, too\n"); @@ -514,6 +520,12 @@ int main (int argc,char ** argv) if(xy&4) printf("-r %d", swf.frameRate*100/256); + if((xy&7) && (xy&8)) + printf(" "); + + if(xy&8) + printf("-f %d", swf.frameCount); + printf("\n"); return 0; }