亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? spcaview.c

?? 一個可以實現嵌入式視頻監控系統的最新版客戶端軟件。
?? C
?? 第 1 頁 / 共 5 頁
字號:
		framecount = (int) AVI_video_frames (out_fd);		image_width = (int) AVI_video_width (out_fd);		image_height = (int) AVI_video_height (out_fd);		if(!owidth || !oheight){		owidth	= image_width;		oheight	= image_height;		}		printf ("frame: %d  width: %d height: %d \n",			framecount, image_width, image_height);		framerate = AVI_frame_rate (out_fd);		printf (" framerate : %f \n", framerate);		audiobits = AVI_audio_bits (out_fd);		audiorate = AVI_audio_rate (out_fd);		audioformat = AVI_audio_format (out_fd);		printf ("audio rate: %d audio bits: %d audio format: %d\n",			audiorate, audiobits, audioformat);		compressor = AVI_video_compressor (out_fd);		printf (" codec: %s \n", compressor);		if (strncmp (compressor, "RGB4", 4) == 0) {			format = VIDEO_PALETTE_RGB32;			bpp = 4;		} else if (strncmp (compressor, "RGB3", 4) == 0) {			format = VIDEO_PALETTE_RGB24;			bpp = 3;		} else if (strncmp (compressor, "RGB2", 4) == 0) {			format = VIDEO_PALETTE_RGB565;			bpp = 2;		} else if (strncmp (compressor, "I420", 4) == 0) {			format = VIDEO_PALETTE_YUV420P;			bpp = 3;		} else if (strncmp (compressor, "MJPG", 4) == 0) {			format = VIDEO_PALETTE_JPEG;			bpp = 3;		} else if (strncmp (compressor, "DPSH", 4) == 0) {			format = VIDEO_PALETTE_YUV420P;			videocomp = 1;			frame_size = (image_width*image_height*3) >> 1;			bpp = 3;		} else {			printf ("Cannot play this file try Mplayer or Xine \n");			AVI_close (out_fd);			exit (1);		}		/* Init the player */		printf ("bpp %d format %d\n", bpp, format);		//if (format == VIDEO_PALETTE_RAW_JPEG)		//	init_libjpeg_decoder (image_width, image_height);		//pscreen =			//SDL_SetVideoMode (image_width, image_height, bpp * 8,			//			//		  SDL_DOUBLEBUF | SDL_SWSURFACE);/* set the player screen always in 24 bits mode */		pscreen =			SDL_SetVideoMode (owidth, oheight, testbpp,					  SDL_DOUBLEBUF | SDL_SWSURFACE);		if (pscreen == NULL) {			printf ("Couldn't set %d*%dx%d video mode: %s\n",				image_width, image_height, bpp * 8,				SDL_GetError ());			exit (1);		}		/* No Cursor in Player */		SDL_ShowCursor (0);		SDL_WM_SetCaption ("Spcaview Player ", NULL);		p = pscreen->pixels;		synctime = 1000 / framerate;		printf ("Frame time %d ms\n", synctime);		if (AVI_audio_channels (out_fd) == 1) {						expect.format=AUDIO_FORMAT;  			expect.freq=audiorate;  			expect.callback=callback_play;  			expect.samples=AUDIO_SAMPLES;  			expect.channels=CHANNELS;  			expect.userdata=(void*)&RingBuffer;			if(SDL_OpenAudio(&expect,NULL)<0)  				{    				fprintf(stderr,"Couldn't open audio output device: %s\n",SDL_GetError());    				SDL_CloseAudio();    				SDL_Quit();  				}			/* Init the sound player */			bytes_per_read = 2 * audiorate / framerate;			maxsound = audiolength = AVI_audio_bytes (out_fd);			//printf ("bytes to read %d \n",bytes_per_read);			initAudio =1;			/* mute if not a raw PCM file */			if (audioformat == 1)				audioout = 1;		}		i = 0;			do {			if (run) {				intime = SDL_GetTicks ();				/* read frame read video and audio */				err =readFrame (out_fd, i,&jpegData,&jpegSize,&RingBuffer, maxsound,					   &audiolength, &bytes_per_read,					   audioout, 1,videocomp);				//printf("readframe %d audiolength %d position errors %d \n",i,audiolength,err);								if (initAudio ){					initAudio = 0;					SDL_PauseAudio(0); // start play				}				refresh_screen ( jpegData, p, format, image_width,image_height,owidth,oheight,jpegSize,0);				SDL_Flip (pscreen);	//switch the buffer and update screen				pictime = SDL_GetTicks () - intime;				//printf(" get pictimes %d expected %d  \n",pictime,synctime);				if (pictime < synctime)					SDL_Delay (synctime - pictime);				i++;			}			fflush (stdout);			switch (run){			case 1:			if (SDL_PollEvent (&sdlevent) == 1) {				switch (sdlevent.type) {					case SDL_KEYDOWN:						switch (sdlevent.key.keysym.sym) {														case SDLK_DOWN:								SDL_PauseAudio(1); // stop play								run = 0;								break;														case SDLK_s:								if (run == 0) {									getJpegPicture(jpegData,image_width,image_height,										format,jpegSize,PICTURE,NULL);									}								break;							case SDLK_SPACE:							if (fullsize ==								    0) {									pscreen = SDL_SetVideoMode (owidth, oheight, testbpp, 									SDL_DOUBLEBUF | SDL_FULLSCREEN | SDL_SWSURFACE);									fullsize = 1;								} else {									pscreen = SDL_SetVideoMode (owidth, oheight, testbpp, 									SDL_DOUBLEBUF | SDL_SWSURFACE);									fullsize = 0;								}								if (pscreen ==								    NULL) {									printf ("Couldn't set %d*%dx%d video mode: %s\n", owidth, oheight, testbpp, SDL_GetError ());									exit (1);								}																SDL_ShowCursor									(0);																							break;							default:								printf ("\nStop asked\n");								quit = 0;								break;						}						break;					case SDL_QUIT:						quit = 0;						break;				} 			} //end if poll			break;			case 0:			if (SDL_WaitEvent (&sdlevent) == 1) {				switch (sdlevent.type) {					case SDL_KEYDOWN:						switch (sdlevent.key.keysym.sym) {							case SDLK_UP:								initAudio = 1;								run = 1;								break;							case SDLK_RIGHT:								if (i <								    (framecount								     - 1)) {									i++;									err = readFrame										(out_fd, i,										&jpegData,&jpegSize,										 &RingBuffer,										 maxsound,										 &audiolength,										 &bytes_per_read,										 audioout,										 1,videocomp);									printf ("scanning up frame %d\n", i);									refresh_screen										(jpegData,										 p,										 format,										 image_width,										 image_height,										 owidth,										 oheight,										 jpegSize,0);									SDL_Flip (pscreen);	//switch the buffer and update screen								}								break;							case SDLK_LEFT:								if (i > 1) {									i--;									err = readFrame										(out_fd, i,										&jpegData,&jpegSize,										 &RingBuffer,										 maxsound,										 &audiolength,										 &bytes_per_read,										 audioout,										 0,videocomp);									printf ("scanning down frame %d\n", i);									refresh_screen										(jpegData,										 p,										 format,										 image_width,										 image_height,										 owidth,										 oheight,										 jpegSize,0);									SDL_Flip (pscreen);	//switch the buffer and update screen								}								break;							case SDLK_s:								if (run == 0) {									getJpegPicture(jpegData,image_width,image_height,										format,jpegSize,PICTURE,NULL);									}								break;							case SDLK_SPACE:															if (fullsize ==								    0) {									pscreen = SDL_SetVideoMode (owidth, oheight, testbpp, SDL_DOUBLEBUF | SDL_FULLSCREEN | SDL_SWSURFACE);									fullsize = 1;								} else {									pscreen = SDL_SetVideoMode (owidth, oheight, testbpp, SDL_DOUBLEBUF | SDL_SWSURFACE);									fullsize = 0;								}								if (pscreen ==								    NULL) {									printf ("Couldn't set %d*%dx%d video mode: %s\n", owidth, oheight, testbpp, SDL_GetError ());									exit (1);								}																SDL_ShowCursor(0);								refresh_screen(jpegData,										 p,										 format,										 image_width,										 image_height,										 owidth,										 oheight,										 jpegSize,0);									SDL_Flip (pscreen);	//switch the buffer and update screen								break;							default:								printf ("\nStop asked\n");								quit = 0;								break;						}						break;					case SDL_QUIT:						quit = 0;						break;				} 			} //end if wait			break;			} //end switch run		}		while (i < framecount && quit == 1);		free (jpegData);		//close_libjpeg_decoder ();		if (audioout) {				while ((RingBuffer.ptread != RingBuffer.ptwrite) && retry--){ 			SDL_Delay(10);  			//fprintf(stderr,"Waiting .. stop the player %d\n",retry); 			}			 SDL_CloseAudio(); // stop play						audioout = 0;				}		AVI_close (out_fd);		SDL_Quit ();return 0;} static void spcaPrintParam (int fd,struct video_param *videoparam);static void spcaSetAutoExpo(int fd, struct video_param * videoparam){	videoparam->chg_para = CHGABRIGHT;	videoparam->autobright = !videoparam->autobright;	if(ioctl(fd,SPCASVIDIOPARAM, videoparam) == -1){		printf ("autobright error !!\n");	} else		spcaPrintParam (fd,videoparam);	}static void spcaSetLightFrequency(int fd, struct video_param * videoparam, int light_freq){			       	videoparam->chg_para = CHGLIGHTFREQ;	videoparam->light_freq = light_freq;	if(ioctl(fd,SPCASVIDIOPARAM, videoparam) == -1){		printf ("light freqency error !!\n");	} else		spcaPrintParam (fd,videoparam);}static int spcaSwitchLightFrequency(int fd, struct video_param * videoparam){			       	int light_freq;        if(ioctl(fd,SPCAGVIDIOPARAM, videoparam) == -1){		printf ("wrong spca5xx device\n");	} else {	   light_freq = videoparam->light_freq;	   if(light_freq == 50)	      light_freq +=10;	   else if(light_freq == 60)               light_freq = 0;	   else if(light_freq == 0)   	      light_freq = 50;	   if(light_freq)	    printf ("Current light frequency filter: %d Hz\n", light_freq);	   else	    printf ("Current light frequency filter: NoFliker\n");	   spcaSetLightFrequency(fd,videoparam,light_freq);	}	return light_freq;}static void spcaSetTimeInterval(int fd, struct video_param *videoparam, unsigned short time){	if (time < 1000) {	videoparam->chg_para = CHGTINTER;	videoparam->time_interval = time;	if(ioctl(fd,SPCASVIDIOPARAM, videoparam) == -1){		printf ("frame_times error !!\n");	} else		spcaPrintParam (fd,videoparam);	}}static void spcaSetQuality(int fd, struct video_param *videoparam, unsigned char index){	if (index < 6) {	videoparam->chg_para = CHGQUALITY;	videoparam->quality = index;	if(ioctl(fd,SPCASVIDIOPARAM, videoparam) == -1){		printf ("quality error !!\n");	} else		spcaPrintParam (fd,videoparam);	}}static void spcaPrintParam (int fd, struct video_param *videoparam){	if(ioctl(fd,SPCAGVIDIOPARAM, videoparam) == -1){		printf ("wrong spca5xx device\n");	} else 		printf("quality %d autoexpo %d Timeframe %d lightfreq %d\n",			 videoparam->quality,videoparam->autobright,videoparam->time_interval, videoparam->light_freq);}static void qualityUp(int fd,struct video_param *videoparam){	unsigned char index = videoparam->quality;	index+=1;	spcaSetQuality(fd,videoparam,index);}static void qualityDown(int fd,struct video_param *videoparam){	unsigned char index = videoparam->quality;	if(index > 0) index--;	spcaSetQuality(fd,videoparam,index);}static void timeUp(int fd, struct video_param *videoparam){	unsigned short index = videoparam->time_interval;	index+=10;	spcaSetTimeInterval(fd,videoparam,index);}static void timeDown(int fd, struct video_param *videoparam){	unsigned short index = videoparam->time_interval;	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 grabMethod,int videoOn,int audioout,int videocomp,int autobright,int statOn,int decodeOn) {			/* Timing value used for statistic */	Uint32 total_decode_time = 0;	Uint32 time = 0;	Uint32 prevtime = 0;	Uint32 synctime = 0;	Uint32 decodetime = 0;	double average_decode_time = 0;	Uint32 intime = 0;	Uint32 pictime = 0;	Uint32 delaytime = 0;	Uint32 compresstime = 0;	/**********************************/	/*        video structures       */	int fd;	/* default mmap */	int i, j, k, nframes = 2000, f, status;	struct video_mmap vmmap;	struct video_capability videocap;	int mmapsize;	struct video_mbuf videombuf;	struct video_picture videopict;	struct video_window videowin;	struct video_channel videochan;	struct video_param videoparam;	int norme = 0;	int channel = 0;	/******** output screen pointer ***/	SDL_Surface *pscreen;	SDL_Event sdlevent;	unsigned char *p = NULL;	unsigned char *pp = NULL;	/**********************************/	/*        avi parametres          */	avi_t *out_fd;	unsigned char *pFramebuffer;	unsigned char *tmp = NULL;	// don't forget the Till lesson	unsigned char *dpshDest = NULL;	u_int8_t *jpegData = NULL;	// Till lesson a good pointer is a pointer NULL	int jpegSize;	int ff;	int framecount = 0;	/*********************************/	/*          Starting Flags       */	int run = 1;	int quit = 1;			int initAudio = 0; //flag start audio	int method = 1;	int streamid ;	int isVideoChannel = 1;	int frame_size = 0;	int len = 0; 			/*********************************/	/* data for SDL_audioin && SDL_audio */	SDL_AudioSpec spec, result;  	SDL_AudioSpec expect;  	struct Rbuffer RingBuffer;  	int retry = 100;  	int ptread ;	int ptwrite ;  	int err = 0; 		int bytes_per_read =0;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩不卡手机在线v区| 久久久久一区二区三区四区| 国产不卡视频在线观看| 国模套图日韩精品一区二区| 亚洲尤物在线视频观看| 亚洲免费观看高清完整版在线观看熊 | 欧美性视频一区二区三区| 欧美在线小视频| 欧美喷潮久久久xxxxx| 日韩一区二区在线观看视频| 欧美一区二区三区思思人| 在线成人av网站| 日韩欧美国产一区二区在线播放| 欧美一级黄色大片| 国产精品伦一区二区三级视频| 国产精品免费av| 国产精品嫩草影院com| 亚洲欧洲无码一区二区三区| 91精品国模一区二区三区| 欧美日韩精品三区| 亚洲欧美偷拍另类a∨色屁股| 婷婷久久综合九色国产成人| 99麻豆久久久国产精品免费| 精品精品国产高清a毛片牛牛 | 国产美女精品在线| 欧美岛国在线观看| 日本中文字幕不卡| 波多野结衣精品在线| 久久综合色一综合色88| 乱中年女人伦av一区二区| 777午夜精品视频在线播放| 中文字幕一区二区不卡| 成人97人人超碰人人99| 欧美不卡视频一区| 午夜精品久久久久久久久| 色哟哟亚洲精品| 亚洲午夜一区二区| 欧美三日本三级三级在线播放| 亚洲免费观看高清| 91精品国产综合久久小美女| 视频一区视频二区中文字幕| 日本精品一级二级| 亚洲成在人线在线播放| 337p亚洲精品色噜噜狠狠| 美国欧美日韩国产在线播放| 日韩免费一区二区三区在线播放| 日日夜夜免费精品| 久久久国产精华| 欧美日韩一区小说| 国产一区二区三区不卡在线观看| 国产精品久久久久婷婷二区次| 91视频观看视频| 日韩专区在线视频| 中文一区二区完整视频在线观看| 色婷婷久久99综合精品jk白丝| 亚洲成av人片一区二区三区| 精品国产一区二区三区四区四| 波多野结衣中文字幕一区| 午夜av区久久| 自拍偷自拍亚洲精品播放| 欧美成人激情免费网| 91麻豆swag| 成人性色生活片| 美国精品在线观看| 午夜精品一区二区三区三上悠亚| 国产精品污污网站在线观看| 91精品国产综合久久精品图片 | 欧美一三区三区四区免费在线看 | 日韩久久久精品| 欧美午夜精品一区| 99精品国产一区二区三区不卡| 国产在线精品一区二区夜色| 午夜精品免费在线| 亚洲gay无套男同| 欧美大胆一级视频| 天天综合色天天综合| 欧美岛国在线观看| 国产日韩v精品一区二区| 91九色最新地址| 国产欧美日韩精品一区| 国产白丝精品91爽爽久久 | 从欧美一区二区三区| 欧美日韩一区久久| 国产精品国产三级国产普通话三级| 香蕉乱码成人久久天堂爱免费| 国产激情偷乱视频一区二区三区| 欧美三级在线视频| 一区二区三区在线视频免费 | 亚洲特黄一级片| 国产精品一二三区| 精品国产乱码久久久久久久久| 三级不卡在线观看| 欧美日韩国产系列| 亚洲美女淫视频| 在线观看亚洲成人| 亚洲高清免费在线| 日韩一级黄色大片| 肉丝袜脚交视频一区二区| 欧美天堂亚洲电影院在线播放| 亚洲日本青草视频在线怡红院| 91老师片黄在线观看| 亚洲一区二区3| 日韩一区二区在线观看视频播放| 丝袜美腿亚洲一区| 2021国产精品久久精品| 激情综合五月天| 国产精品久久久久7777按摩| 国产精品一区二区不卡| 欧美国产亚洲另类动漫| 一本大道av伊人久久综合| 婷婷成人综合网| 精品国产3级a| 91日韩精品一区| 亚洲丰满少妇videoshd| 欧美刺激脚交jootjob| 国产不卡高清在线观看视频| 中文字幕日韩一区二区| 欧美日韩一区在线观看| 国产老妇另类xxxxx| 亚洲一区二区三区四区不卡| 一区二区在线观看av| 欧美一区二区三区性视频| 91色在线porny| 九色综合狠狠综合久久| 亚洲欧美福利一区二区| 国产午夜精品福利| 日韩丝袜美女视频| 欧美日韩中文一区| 91在线丨porny丨国产| 国产激情一区二区三区四区 | 日韩主播视频在线| 综合激情成人伊人| 国产亚洲短视频| 精品久久久久99| 91精品欧美综合在线观看最新| av亚洲产国偷v产偷v自拍| 国产一区不卡视频| 九色porny丨国产精品| 国产精品久久久久久久久快鸭| xfplay精品久久| 精品少妇一区二区三区在线视频| 9191精品国产综合久久久久久| av不卡免费在线观看| 高清久久久久久| 国内成人自拍视频| 韩日精品视频一区| 国产伦精一区二区三区| 国产一区二区精品久久| 成人午夜大片免费观看| 成人动漫中文字幕| 91黄色免费观看| 欧美一区二区精品在线| 欧美一区二区三区视频在线| 欧美一区二区三区的| 精品国产免费人成电影在线观看四季| 欧美一级二级三级乱码| 久久综合九色综合久久久精品综合 | 色综合天天综合网天天狠天天| 色天天综合久久久久综合片| 欧美日韩久久久久久| 精品盗摄一区二区三区| 国产精品天美传媒沈樵| 亚洲国产精品麻豆| 麻豆成人久久精品二区三区小说| 国产在线精品国自产拍免费| 波多野结衣一区二区三区| 欧美日韩国产美女| 国产三级精品视频| 亚洲高清中文字幕| 国模套图日韩精品一区二区| 成人av网站免费观看| 日韩一区二区在线看片| 亚洲免费在线看| 国产成人综合在线观看| 欧美精品在线观看一区二区| 国产精品欧美久久久久无广告| 亚洲精品欧美激情| 国产成人av一区二区三区在线观看| 欧美在线高清视频| 亚洲欧美在线视频| 国产成人亚洲精品青草天美| 7777精品伊人久久久大香线蕉的 | 福利电影一区二区| 日韩免费在线观看| 蜜臀av性久久久久蜜臀av麻豆| 91浏览器在线视频| 国产精品美女久久久久久2018| 狠狠色丁香婷综合久久| 欧美一区二区三区喷汁尤物| 亚洲精品高清在线| 色哟哟国产精品| 亚洲丰满少妇videoshd| 欧美日韩亚洲国产综合| 亚洲成人在线免费| 欧美日韩一区二区三区不卡| 亚洲国产一区在线观看| 欧美日韩视频第一区| 午夜电影一区二区| 欧美电影免费观看高清完整版| 国产曰批免费观看久久久|