Copyright (c) 2001 Rainer Böhme <rfxswf@reflex-studio.de>
Copyright (c) 2002,2003 Matthias Kramm <kramm@quiss.org>
- This file is distributed under the GPL, see file COPYING for details
-
-*/
-
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
#include <stdio.h>
#include <math.h>
#include <fcntl.h>
struct {
int quality;
- int framerate;
+ float framerate;
int max_image_width;
int max_image_height;
int force_width;
VIDEOSTREAM stream;
-TAG *MovieStart(SWF * swf, int framerate, int dx, int dy)
+TAG *MovieStart(SWF * swf, float framerate, int dx, int dy)
{
TAG *t;
RGBA rgb;
memset(swf, 0x00, sizeof(SWF));
swf->fileVersion = 4;
- swf->frameRate = (25600 / framerate);
+ swf->frameRate = (int)(256.0 * framerate);
swf->movieSize.xmax = dx * 20;
swf->movieSize.ymax = dy * 20;
case 'r':
if (val)
- global.framerate = atoi(val);
- if ((global.framerate < 1) ||(global.framerate > 5000)) {
+ global.framerate = atof(val);
+ if ((global.framerate < 1.0/256) || (global.framerate >= 256.0)) {
if (VERBOSE(1))
fprintf(stderr,
"Error: You must specify a valid framerate between 1 and 10000.\n");
{"X", "width"},
{"Y", "height"},
{"V", "version"},
+{0, 0},
};
int args_callback_longoption(char *name, char *val)
printf
("-q quality --quality Set compression quality (1-100, 1=worst, 100=best)\n");
printf
- ("-r framerate --rate Set movie framerate (100/sec)\n");
+ ("-r framerate --rate Set movie framerate (frames per second)\n");
printf
("-o outputfile --output Set name for SWF output file\n");
printf
printf
("-V --version Print version information and exit\n");
printf
- ("The following options can be set independently for each image: -q -s\n");
+ ("The following options can be set independently for each image: -q\n");
}
memset(&global, 0x00, sizeof(global));
global.quality = 60;
- global.framerate = 100;
+ global.framerate = 1.0;
global.verbose = 1;
processargs(argc, argv);