\r
This file is distributed under the GPL, see file COPYING for details */\r
\r
+#include <sys/stat.h>\r
+#include <sys/types.h>\r
+#include <unistd.h>\r
#include <stdio.h>\r
#include <fcntl.h>\r
#include "../lib/rfxswf.h"\r
{ \r
SWF swf;\r
TAG*tag;\r
+ struct stat statbuf;\r
int f;\r
char prefix[128];\r
prefix[0] = 0;\r
processargs(argc, argv);\r
\r
f = open(filename,O_RDONLY);\r
+ fstat(f, &statbuf);\r
\r
if (f<0)\r
{ \r
}\r
close(f);\r
\r
+ printf("[HEADER] File version: %d\n", swf.FileVersion);\r
+ printf("[HEADER] File size: %d\n", swf.FileSize);\r
+ if(statbuf.st_size != swf.FileSize)\r
+ fprintf(stderr, "Error: Real Filesize (%d) doesn't match header Filesize (%d)",\r
+ statbuf.st_size, swf.FileSize);\r
+ printf("[HEADER] Frame rate: %f\n",swf.FrameRate/256.0);\r
+ printf("[HEADER] Frame count: %d\n",swf.FrameCount);\r
+ printf("[HEADER] Movie width: %.3f\n",(swf.MovieSize.xmax-swf.MovieSize.xmin)/20.0);\r
+ printf("[HEADER] Movie height: %.3f\n",(swf.MovieSize.ymax-swf.MovieSize.ymin)/20.0);\r
+\r
tag = swf.FirstTag;\r
\r
while(tag) {\r
- printf("[%02x] %9d %s%s", tag->id, tag->len, prefix, getTagName(tag));\r
+ printf("[%03x] %9d %s%s", tag->id, tag->len, prefix, getTagName(tag));\r
if(isDefiningTag(tag)) {\r
U16 id = GetDefineID(tag);\r
printf(" defines id %04x", id);\r