#include "../config.h"
-#ifdef HAVE_SIGNAL_H
-#ifdef HAVE_PTHREAD_H
-#include <pthread.h>
-#include <signal.h>
-#define DO_SIGNALS
-#endif
-#endif
-
-extern "C" {
#include "../lib/args.h"
-}
#include "v2swf.h"
#include "videoreader_avifile.hh"
return toabuf;
}
-static int shutdown_avi2swf = 0;
-static int frameno = 0;
-
#ifdef DO_SIGNALS
pthread_t main_thread;
static void sigterm(int sig)
video.getimage(&video, buf);
video.getsamples(&video, buf, (int)((video.rate/video.fps)*video.channels*2));
if(!verbose) {
- printf("\rSkipping frame %d", frameno);fflush(stdout);
+ printf("\rSkipping frame %d", video.frame);fflush(stdout);
}
}
free(buf);
if(!l)
break;
if(!verbose) {
- printf("\rConverting frame %d", frameno);fflush(stdout);
+ printf("\rConverting frame %d", video.frame);fflush(stdout);
}
}
if(!verbose)
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <stdlib.h>
+#include <stdio.h>
+#include <memory.h>
#include "../config.h"
-extern "C" {
-#include "../lib/args.h"
-}
-#include "v2swf.h"
-#include "../lib/q.h"
-
#undef HAVE_CONFIG_H
#ifdef HAVE_VERSION_H
#define Bpp bpp
#endif
+#ifdef HAVE_SIGNAL_H
+#ifdef HAVE_PTHREAD_H
+#include <pthread.h>
+#include <signal.h>
+#define DO_SIGNALS
+#endif
+#endif
+
+#include "../lib/q.h"
#include "videoreader.h"
+static int shutdown_avi2swf = 0;
+static int verbose = 0;
+static int flip = 0;
+
typedef struct _videoreader_avifile_internal
{
IAviReadFile* player;
img = img2;
}
-
- frameno++;
+ v->frame++;
i->frame++;
unsigned char*data = img->Data();
int bpp = img->Bpp();
memset(i, 0, sizeof(videoreader_avifile_internal));
memset(v, 0, sizeof(videoreader_t));
v->getsamples = videoreader_avifile_getsamples;
- v->getinfo = videoreader_avifile_getinfo;
v->close = videoreader_avifile_close;
v->eof = videoreader_avifile_eof;
v->getimage = videoreader_avifile_getimage;
v->getsamples = videoreader_avifile_getsamples;
v->setparameter = videoreader_avifile_setparameter;
v->internal = i;
+ v->frame = 0;
i->do_video = 1;
i->do_audio = 1;