} videoreader_vfw_internal_t;
static int avifile_initialized = 0;
+static int verbose;
-#define _TRACE_ {printf("%s: %d (%s)\n",__FILE__,__LINE__,__func__);fflush(stdout);}
+#define _TRACE_ {printf("vfw: %s: %d (%s)\n",__FILE__,__LINE__,__func__);fflush(stdout);}
static bool videoreader_vfw_eof(videoreader_t* vr)
{
const int endy = flip? dest_height : -1;
const int yinc = flip? 1 : -1;
+ if(verbose) {
+ printf("vfw: Convering scanlines %d to %d from bpp %d, %d stepping, flip=%d\n", starty, endy, bi->biBitCount, yinc, flip);
+ }
+
if(bi->biBitCount==1) {
UCHAR*img = data;
int y;
videoreader_vfw_internal_t* i = (videoreader_vfw_internal_t*)vr->internal;
if(!strcmp(name, "flip")) {
i->flip = atoi(value);
+ } else if(!strcmp(name, "verbose")) {
+ verbose = atoi(value);
}
}
/* calculate framerate */
i->fps = (double)info.dwRate/(double)info.dwScale;
+ if(verbose) {
+ printf("vfw: file %s has %f fps, and %d streams\n", i->fps, info.dwStreams);
+ }
+
unsigned int t=0;
while(t<info.dwStreams) {
PAVISTREAM stream;
}
if(i->vs) {
+ if(verbose) {
+ printf("vfw: video stream: %dx%d, %.2f\n", i->width, i->height, i->fps);
+ }
vr->width = i->width;
vr->height = i->height;
vr->fps = i->fps;
fprintf(stderr, "AVIReader: Warning: No video stream\n");
}
if(i->as) {
+ if(verbose) {
+ printf("vfw: audio stream: %d channels, %d samples/sec", i->channels, i->samplerate);
+ }
vr->channels = i->channels;
vr->samplerate = i->samplerate;
} else {