diff -ru a/spcaview.c b/spcaview.c --- a/spcaview.c 2007-12-24 16:46:11.000000000 +0000 +++ b/spcaview.c 2010-09-11 04:58:39.816575641 +0000 @@ -212,7 +212,7 @@ int spcaClient (char *Ip, short port,int owidth, int oheight ,int statOn); int spcaPlay (char* inputfile, int width, int height); -int spcaGrab (char *outputfile,char fourcc[4] , const char *videodevice, int image_width,int image_height, int format, int owidth, int oheight, +int spcaGrab (char *outputfile,char (*fourcc)[8] , const char *videodevice, int image_width,int image_height, int format, int owidth, int oheight, int grabMethod,int videoOn,int audioout,int videocomp,int autobright,int statOn,int decodeOn); void *waitandshoot(void* ptr) @@ -308,7 +308,7 @@ /* avi parametres */ char *inputfile = NULL; char *outputfile = NULL; - char fourcc[4] = "MJPG"; + char fourcc[8] = "MJPG"; char *sizestring = NULL; int use_libjpeg = 1; @@ -586,7 +586,7 @@ case GRABBER: { /* spcaview grabber */ - spcaGrab (outputfile,fourcc , videodevice, image_width,image_height, format, owidth, oheight, + spcaGrab (outputfile,&fourcc , videodevice, image_width,image_height, format, owidth, oheight, grabMethod, videoOn, audioout, videocomp, autobright, statOn, decodeOn); } break; @@ -900,7 +900,6 @@ /* file input output */ char *outputfile = NULL; static char Picture[80]; - char fourcc[4] = "MJPG"; FILE *foutpict; /*********************************/ /* Starting Flags */ @@ -1354,7 +1353,7 @@ if(index > 0) index -=10; spcaSetTimeInterval(fd,videoparam,index); } -int spcaGrab (char *outputfile,char fourcc[4] , const char *videodevice, int image_width,int image_height, int format, int owidth, int oheight, +int spcaGrab (char *outputfile,char (*fourcc)[8] , const char *videodevice, int image_width,int image_height, int format, int owidth, int oheight, int grabMethod,int videoOn,int audioout,int videocomp,int autobright,int statOn,int decodeOn) { @@ -1453,12 +1452,12 @@ if(!videoOn) { /* acquire raw data force palette to raw */ printf ("VideoOn = 0\n"); - snprintf (fourcc, 5, "RAWD"); + snprintf (*fourcc, 5, "RAWD"); format = VIDEO_PALETTE_RAW_JPEG; } if(videocomp) { /* acquire yuv420p and compress diff pixels static huffman */ - snprintf (fourcc, 5, "DPSH"); + snprintf (*fourcc, 5, "DPSH"); format = VIDEO_PALETTE_YUV420P; } if (videodevice == NULL || *videodevice == 0) { @@ -1644,7 +1643,7 @@ mypict.out_fd = out_fd; } else { AVI_set_video (out_fd, image_width, image_height, 20, - fourcc); + *fourcc); } if (audioout && !interval) { /* init the sound recorder if no picture*/