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

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

?? curacao.cpp.svn-base

?? sigmadesign smp8623 gui source code ,bingo
?? SVN-BASE
字號:
/***************************************** Copyright (c) 2001-2003 Sigma Designs, Inc. All Rights Reserved Proprietary and Confidential *****************************************//**  @file curacao.cpp  @brief This is the main app for em86xx based dvdplayer  @date   2004-01-06*/#define ALLOW_OS_CODE 1#include "common.h"//#include "cddaplayer.h"//#include "vcdplayer.h"#include "fileplayer.h"//#include "dvdvideo/dvdplayer.h"//#include "dvdaudio/dvdaudioplayer.h"#include "gui/gui.h"#include "samples/main_apps.h"#ifdef CURACAO_EM86XX_BOARD	#include "em86xx.h"	#if (EM86XX_MODE==EM86XX_MODEID_STANDALONE)		#define TOTAL_MEMORY_NEEDED (4*1024*1024) // increased for 2 nero files		#define MAX_BOARDS 1 // Always 1 in standalone	#endif#endif#include <stdio.h>#include <stdlib.h>#include <string.h>#include <setjmp.h>#include <sys/time.h>// contains all system specific functions and callbacks for remote control#include "rmlocalremote.c"// for keyboard input//#include "rmlocalkeyboard.c"#ifdef WITH_MONO	#include "rmmemorymanager/include/rmmmhomemade.h"	#include "rmlibcw/include/rmcriticalsections.h"	#if 1//		extern struct mz *pZ0;	#else		static struct mz *pZ0 = (struct mz *) NULL;		void *RMMalloc(RMuint32 size) { return RMMallocInZone(NULL,pZ0,size); }		void RMFree(void *ptr) { RMFreeInZone(NULL,pZ0,ptr); }		void *RMCalloc(RMuint32 nmemb,RMuint32 size) { return RMCallocInZone(NULL,pZ0,nmemb,size); }		void *RMMemset(void *s, RMuint8 c, RMuint32 n) { return RMMemsetInZone(NULL,pZ0,s,c,n); }		void *RMMemcpy(void *dest, const void *src, RMuint32 n) { return RMMemcpyInZone(NULL,pZ0,dest,src,n); }		RMint32 RMMemcmp(const void *s1, const void *s2, RMuint32 n) { return RMMemcmpInZone(NULL,pZ0,s1,s2,n); }		#ifdef WITH_THREADS		void mzlock(void *mac,void *cookie) { RMEnterCriticalSection((RMcriticalsection)cookie); }		void mzunlock(void *mac,void *cookie) { RMLeaveCriticalSection((RMcriticalsection)cookie); }		#endif /* WITH_THREADS */	#endif#endifRMstatus InterpretCommand(RMremoteKey c, typeCuracaoContext *context);RMstatus CheckDriveStatus (typeCuracaoContext *context);RMstatus CreateMediaPlayer(/*RMdiscType *discType, */typeCuracaoContext *context);void UpdateFrontPanel(struct timeval *last_time, RMuint8 *currentFipSymbol, RMbool *show_disc, typeCuracaoContext *context);void UpdateGui(struct timeval *last_time, typeCuracaoContext *context);#ifdef WITH_RC5_REMOTE // RC5 buttons mappingRMremoteKey MapRC5RemoteKey(RMremoteKey c, typeCuracaoContext *context);#endif//RMbool g_useKeyboard = FALSE;typeCuracaoContext context = {0,};#if (EM86XX_MODE==EM86XX_MODEID_STANDALONE)RMascii MOUNT_POINT[_MAX_PATH] = "/mnt/";#elseRMascii MOUNT_POINT[_MAX_PATH] = "/mnt/cdrom/";#endif// this function create an instance of media player according to the disc typeRMstatus CreateMediaPlayer(/*RMdiscType *discType, */typeCuracaoContext *context){	RMstatus status;	fprintf(stderr, "CreateMediaPlayer start\n");	// create new player	if(context->player != 0){		delete (context->player);		context->player = 0;		fprintf(stderr, "Just killed the old player\n");	}	printf("DiscType : dir\n");	context->player = (RMmediaPlayerIface *) new RMfilePlayer(context);	status = RM_OK;	if(status == RM_OK){		if(context->player == 0)			status = RM_ERROR;		else if(context->gui){			context->gui->Notify(CURACAO_MESSAGE_CREATED_MEDIA_PLAYER, /*discType*/0);			fprintf(stderr, "CreateMediaPlayer ended successfully, now notifying GUI\n");		}	}	return status;}// this function check if the drive state has change (user pressed eject on the remote or on the drive),// in case of change, we need to detect again the media// and reset the current media player or create an other one.RMstatus CheckDriveStatus (typeCuracaoContext *context){//	if (context->disc == NULL) {		// a folder was specified (instead of a device)		if (context->isDiscDetected)			return RM_OK;		//fprintf(stderr, "None device playback detected\n");		context->isDiscDetected = TRUE;//		context->discType = RMFMediaDetect(MOUNT_POINT);		if(context->gui)			context->gui->DiscState();		// create a new media player		// (the current media player deletion is made inside this function)		return CreateMediaPlayer(/*&context->discType, */context);//	}	RMASSERT (FALSE);	return RM_ERROR_NO_DISC_IN_DRIVE;}void UpdateFrontPanel(struct timeval *last_time, RMuint8 *currentFipSymbol, RMbool *show_disc, typeCuracaoContext *context){}void UpdateGui(struct timeval *last_time, typeCuracaoContext *context){	RMuint64 diff_in_usec;	struct timeval current_time;	typeMediaPlayerSate state;	state = context->player->GetState();	if((state == STATE_PLAY) ||		(state == STATE_STEP) ||		(state == STATE_FAST_FORWARD) ||		(state == STATE_FAST_REWIND) ||		(state == STATE_SLOW_FORWARD)){		gettimeofday(&current_time, NULL);		diff_in_usec = (RMuint64)(((RMint64)current_time.tv_sec-(RMint64)(*last_time).tv_sec)*1000000LL +					  ((RMint64)current_time.tv_usec-(RMint64)(*last_time).tv_usec));		if(context->changeChannel)		{			printf("send key\n");			context->gui->SendKey((RMremoteKey)(161));			context->changeChannel = FALSE;		}		if(diff_in_usec > 500000LL){			context->player->UpdateMediaInfo();			*last_time = current_time;		}	}}void UpdateOutputs(struct timeval *last_time, typeCuracaoContext *context){	RMuint64 diff_in_usec;	struct timeval current_time;	gettimeofday(&current_time, NULL);	diff_in_usec = (RMuint64)(((RMint64)current_time.tv_sec-(RMint64)(*last_time).tv_sec)*1000000LL +				  ((RMint64)current_time.tv_usec-(RMint64)(*last_time).tv_usec));	if(diff_in_usec > 50000LL){		if (context->decoder){			if(context->gui){				RMbool autoswitch = context->gui->GetAutoSwitchState();				RMstatus status = context->decoder->UpdateOutputs(autoswitch);				if(status == RM_PENDING) {					context->gui->Notify(CURACAO_MESSAGE_VIDEOOUT_AUTO_CHANGE, NULL);				}#ifndef GUI_REFID_3				else if(status == RM_INVALIDMODE) {					RMbool useSaved = TRUE;					context->gui->Notify(CURACAO_MESSAGE_VIDEOOUT_AUTO_CHANGE, &useSaved);				}#endif			}			else				context->decoder->UpdateOutputs();		}		*last_time = current_time;	}}#ifdef WITH_RC5_REMOTE // RC5 buttons mappingRMremoteKey MapRC5RemoteKey(RMremoteKey c, typeCuracaoContext *context){	typeMediaPlayerSate state = STATE_CLOSE;	if (context->player != NULL)		state = context->player->GetState();	switch(c){	case RM_HW_FAST_FORWARD:		if (state == STATE_PAUSE || state == STATE_SLOW_FORWARD)			c = RM_HW_SLOW_FORWARD;		break;	case RM_HW_FAST_REWIND:		if (state == STATE_PAUSE || state == STATE_SLOW_FORWARD)			c = RM_HW_SLOW_REVERSE;		break;	case RM_HW_PAUSE_PLAY:		if (state != STATE_PAUSE && state != STATE_STEP)			c = RM_HW_TIMEOUT;		break;	default:		break;	}	return c;}#endifextern RMuint32 mem_status;extern void *Rmalloc(size_t size, const char *file);extern void *Rcalloc(size_t nelem, size_t size, const char *file);extern void *Rrealloc(void *p, size_t size, const char *file);extern void  Rfree(void *p, const char *file);int main(int argc, char **argv){	RMremoteKey c;	remoteHandleType *handle = 0;	RMstatus status = RM_OK;	struct timeval last_time;	RMbool show_disc;	RMuint8 currentFipSymbol;	struct timeval last_gui_update_time;	struct timeval last_output_update_time;	RMbool useHDProfile;	char *mediaDevice;	char *remoteDevice;	RMuint8 i;	RMuint8 *pStart = NULL;	mem_status = 0;	useHDProfile = TRUE;	mediaDevice = (char*) NULL;	remoteDevice = (char*) NULL;	// init context structure ... used by callbacks, decoders and media players	context.isDiscDetected = FALSE;//	context.disc = 0;	context.needToExit = FALSE;	context.needToStop = FALSE;	context.bufferedKey = RM_HW_TIMEOUT;	context.player = 0;	context.device = (RMnonAscii*)mediaDevice;	context.rh = 0;	context.remoteTimeout = MS_REMOTE_TIMEOUT;	context.boardNumber = 0;	context.modeChange = FALSE;	for (i=1 ; i<argc ; i++) {		if (! strcmp(argv[i], "-sd")) {			printf("Use SD profile ...\n");			useHDProfile = FALSE;		}		else if (! strcmp(argv[i], "-m")) {			if (i+1 < argc) {				context.boardNumber = strtol(argv[i+1], NULL, 0);				i++;				printf("board number %lu\n", context.boardNumber);			}		}		else if (argv[i][0] == '-') {			fprintf(stderr, "Unknown option : %s\n", argv[i]);		}		else			break;	}	if ((argc != 1) && (i<argc)) {		mediaDevice = argv[i];		context.device = (RMnonAscii*)mediaDevice;		if (i+1 < argc)			remoteDevice = argv[i+1];	}	else {		printf("Usage : %s [options] mediaDevice [remoteDevice] (if no remote device is specified, the keyboard is used\n", argv[0]);		printf("options: \n");		printf("\t-sd: to force SD profile\n");		printf("\t-m <board number>: to select a board index. Default is 0\n");		return -1;	}	printf("Allocating %d bytes ...\n", TOTAL_MEMORY_NEEDED*MAX_BOARDS);//	pStart=(RMuint8 *)malloc(TOTAL_MEMORY_NEEDED*MAX_BOARDS);//	if (pStart==NULL) {//		printf("Cannot allocate %d bytes.\n",TOTAL_MEMORY_NEEDED*MAX_BOARDS);//		goto cleanup;//	}//	printf("Succeeded\n");//	pZ0 = RMCreateZone(NULL, RM_MACHINEALIGNMENT, pStart, TOTAL_MEMORY_NEEDED);//	RMSetSyncCookie(NULL, pZ0, RMCreateCriticalSection()); // after this call//	RMobject::CreateLock();	printf("Creating Front panel handler ...\n");	// the board used is em86xx	printf("Creating Em86xx decoder ...\n");	context.decoder = (RMdecoderIface *) new RMem86xxDecoder(&context, useHDProfile);	context.gui = new RMcuracaoGui(&context);	status = context.gui->Initialize((RMnonAscii *) "curacao.xml");	if (status != RM_OK) {		fprintf(stderr,"Cannot Initialize gui -> EXIT\n");		goto cleanup;	}		// open remote control device		if (RMlocalRemoteOpen(remoteDevice,&handle)!=RM_OK) {			fprintf(stderr,"Cannot open remote control \"%s\"\n",remoteDevice);			goto cleanup;		}		context.rh = RMFremoteOpenEx((void *)handle, PseudoFileReadWithTimeout, RMFlushCallback, RMSleepCallback, PseudoFileAvailable);		if(context.rh != 0){			printf("remote device %s successfully opened\n", remoteDevice);		}		else {			fprintf(stderr,"Cannot open remote control \"%s\"\n",remoteDevice);			goto cleanup;		}		printf("Opening FOLDER : %s\n", mediaDevice);		// it's a media folder//		context.disc = NULL;		RMCopyAscii(MOUNT_POINT, mediaDevice);		RMAppendAscii(MOUNT_POINT, "/"); // an extra '/' wouldn't hurt	show_disc = TRUE;	currentFipSymbol = 0;	gettimeofday(&last_time, NULL);	gettimeofday(&last_gui_update_time, NULL);	gettimeofday(&last_output_update_time, NULL);	// this is the main loop	// it checks the drive, read the input command and pass it to the interpreters	while (1) {		status = CheckDriveStatus (&context);//		context.gui->DiscState();		context.gui->CheckVisualEvents();		if (context.bufferedKey == RM_HW_TIMEOUT){				c = RMFremoteWaitSymbol(context.rh, context.remoteTimeout);		}		else{			c = context.bufferedKey;			context.bufferedKey = RM_HW_TIMEOUT;		}		if(context.needToStop){			c = RM_HW_STOP;			context.needToStop = FALSE;		}//		printf("memory status: %lu\n", mem_status);#ifdef WITH_RC5_REMOTE // RC5 buttons mapping		c = MapRC5RemoteKey(c, &context);#endif		if(c > 0) {			printf("Got Symbol : %d\n", c);			status = context.gui->SendKey(c);			if(status == RM_ERROR_QUEUE_COMMAND) {				printf("The player temporarily can't accept the command, we'll try to send it again later.\n");				context.bufferedKey = c;			}		}		if(! context.needToExit && ! context.needToRestart) {			if(context.player != 0) {				context.player->ProcessData();				// recheck player for null because the user may eject at the dvd parental password prompt in ProcessData				if(context.player != NULL) {					UpdateFrontPanel(&last_time, &currentFipSymbol, &show_disc, &context);					UpdateGui(&last_gui_update_time, &context);				}			}			UpdateOutputs(&last_output_update_time, &context);		} else {#if (EM86XX_MODE==EM86XX_MODEID_WITHHOST)			break;#else			if(context.player != 0) {				if(context.player->Close() != RM_OK) {					continue;				}				delete (context.player);				context.player = 0;			}			if(context.gui != 0)				context.gui->ClearScreen();//#ifdef GUI_REFID_2			// disable output -- to be reenabled on restart			context.decoder->DisableVideoConnector(NULL);//#endif			// for stand-alone, we won't exit the application if the POWER button is pressed			RMbool restart = 0;#ifdef GUI_REFID_2			printf("\n\nStandby Mode: press POWER to restart\n");#else			{  // turn on panel with GPIO 14					struct SystemBlock_GPIO_type gpio;					gpio.Bit = 11;					gpio.Data = FALSE;					RUASetProperty(context.gui->m_pRua, SystemBlock, RMSystemBlockPropertyID_GPIO, &gpio, sizeof(gpio), 0);			}			RMuint8 n = 0;			static RMremoteKey exitSequence[4] = { RM_HW_KEY_0 };			printf("\n\nStandby Mode: press POWER to restart or 0 to quit\n");#endif			while(!restart){					c = RMFremoteWaitSymbol(context.rh, context.remoteTimeout);				if(context.needToExit || context.needToStop) {					context.needToRestart = FALSE;				}				// curacao might restart forever on decoder errors				// but it's no worse than exit(1)				// (could add a restart count...)				if(context.needToRestart) {					RMDBGLOG((ENABLE, "\n\n\t\tOMG!!\t\tWe need to restart!!\n\n"));					context.needToRestart = FALSE;					RMFlushCallback(context.rh);	// try to skip the commands that follow the error/restart					//c = RM_HW_ON_OFF;					c = RM_HW_EJECT;				}				if(c > 0){					printf("Got Symbol : %d\n", c);					switch(c){					case RM_HW_EJECT:					//	context.gui->SendKey(c);						// fall through to wake up player					//case RM_HW_ON_OFF:						context.isDiscDetected = FALSE;//						context.discType = RM_NO_DISC;						context.needToExit = FALSE;						context.needToStop = FALSE;//#ifdef GUI_REFID_2						context.gui->ReenableDisplay();//#endif						context.gui->DisplayMainPage();						restart = 1;						break;					default:						if (c != exitSequence[n]){							n = 0;						}						else if (++n == 1){							goto cleanup;						}						break;					}				}			}#endif //em86xx		}	} cleanup:	// exit	if(context.player != 0){		context.player->Close();		delete (context.player);		context.player = 0;	}		if(context.rh != 0)			RMFremoteRelease(context.rh);		if(handle != 0)			RMlocalRemoteClose(&handle);	if(context.gui != 0){		context.gui->Close();		delete context.gui;	}	delete context.decoder;//	RMGetZoneStats(NULL,pZ0,NULL,NULL,NULL,NULL);#ifdef WITH_THREADS	/* once the above lines begin only one thread must run! *///	RMDeleteCriticalSection((RMcriticalsection)RMGetSyncCookie(NULL,pZ0));	/* se what's left with: RMDumpMallocedBlocksInZone(pZ0); *///	RMSetSyncCookie(NULL,pZ0,0);//	RMobject::DeleteLock();#endif // WITH_THREADS//	status = RMDeleteZone(NULL,pZ0);	printf("memory status: %lu\n", mem_status);	if(RMSUCCEEDED(status))		printf("interface closed, no error\n");	else		printf("interface closed, unreleased memory error(s)\n");	if (pStart!=NULL) {		free(pStart);	}	return 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费va视频| 国产精品视频在线看| 久久精品视频网| 日韩精品亚洲专区| 99热精品国产| 国产日韩精品一区| 日韩二区在线观看| 色先锋aa成人| 综合久久久久久久| 国产不卡一区视频| 91精品国产欧美日韩| 夜夜爽夜夜爽精品视频| 福利一区在线观看| 久久亚洲一区二区三区明星换脸 | 欧美性大战久久久| 日本一区二区动态图| 国产在线视频一区二区| 日韩免费一区二区三区在线播放| 亚洲一区二区精品3399| 色综合久久88色综合天天免费| 欧美国产欧美综合| 国产成人综合亚洲网站| 日韩免费电影一区| 美国精品在线观看| 精品欧美久久久| 蜜臀精品一区二区三区在线观看| 制服丝袜中文字幕一区| 日韩电影在线一区| 日韩手机在线导航| 紧缚奴在线一区二区三区| 日韩欧美一区二区免费| 韩日av一区二区| 国产欧美久久久精品影院| 国产成人av一区二区三区在线观看| 久久久久久久久久久久久夜| 国产91精品精华液一区二区三区| 久久久国产精品不卡| 懂色av中文字幕一区二区三区| 亚洲国产岛国毛片在线| 99精品在线免费| 一区二区三区国产精华| 91精品欧美综合在线观看最新| 日产国产高清一区二区三区| 精品国一区二区三区| 国产成人在线网站| 亚洲麻豆国产自偷在线| 欧美日韩一区二区三区免费看| 日韩avvvv在线播放| 国产午夜亚洲精品不卡| 99re热这里只有精品视频| 亚洲综合网站在线观看| 日韩视频123| 国产精品白丝jk黑袜喷水| 国产精品成人一区二区三区夜夜夜| 91蜜桃视频在线| 视频一区二区不卡| 久久网这里都是精品| 色婷婷精品大在线视频| 日韩精彩视频在线观看| 欧美激情在线一区二区| 欧美日韩国产一级| 国产酒店精品激情| 亚洲精品水蜜桃| 欧美本精品男人aⅴ天堂| 丰满少妇久久久久久久| 亚洲第一福利一区| 久久久综合九色合综国产精品| eeuss鲁片一区二区三区在线看| 午夜精品一区二区三区电影天堂 | 日韩一区二区免费电影| 国产91丝袜在线18| 天天影视涩香欲综合网| 久久九九99视频| 欧美亚洲动漫另类| 国产激情精品久久久第一区二区 | 亚洲在线中文字幕| 久久久久久日产精品| 欧美日本免费一区二区三区| 国产69精品一区二区亚洲孕妇 | 欧美在线观看视频一区二区三区| 久久99精品网久久| 亚洲综合一区二区三区| 中文av一区特黄| 91.com在线观看| 91麻豆国产香蕉久久精品| 国内久久精品视频| 天天色 色综合| 亚洲欧美另类小说视频| 国产欧美日韩综合| 精品国产一区二区精华| 欧美伦理视频网站| 欧美性猛交一区二区三区精品| 北岛玲一区二区三区四区| 韩国v欧美v日本v亚洲v| 美女视频黄频大全不卡视频在线播放| 亚洲三级久久久| 日本一区二区三区在线不卡| 精品人伦一区二区色婷婷| 337p亚洲精品色噜噜| 欧美无砖砖区免费| 91久久精品网| 91丨porny丨国产| 99在线精品免费| 99久久国产综合精品女不卡| 成人爱爱电影网址| 不卡一卡二卡三乱码免费网站| 国产在线精品视频| 国产精品18久久久久| 国产精品中文有码| 国产成人精品免费网站| 成人在线视频一区二区| 国产精品一区在线观看你懂的| 国产一区二区三区日韩| 国内精品国产成人| 国产一区二区女| 国产成人高清视频| thepron国产精品| 色综合色综合色综合色综合色综合 | 久久久久99精品国产片| 久久久国产精品麻豆| 国产婷婷色一区二区三区四区 | 精品国产乱码久久久久久蜜臀| 在线观看91精品国产麻豆| 欧美剧情电影在线观看完整版免费励志电影 | 国产福利一区二区| 成人国产精品免费网站| 99久久久精品免费观看国产蜜| 色噜噜狠狠一区二区三区果冻| 一本久久综合亚洲鲁鲁五月天| 欧美日韩一区二区在线观看| 91精品国产一区二区| 精品精品欲导航| 国产精品福利影院| 亚洲视频一区在线观看| 亚洲高清免费观看高清完整版在线观看 | 亚洲乱码日产精品bd| 亚洲成人动漫在线观看| 免费国产亚洲视频| 成人性视频免费网站| 色妞www精品视频| 欧美一区二区大片| 欧美国产禁国产网站cc| 亚洲高清视频中文字幕| 精久久久久久久久久久| 91免费小视频| 欧美成人一区二区三区片免费| 国产日韩精品视频一区| 一级做a爱片久久| 国产综合久久久久影院| 91久久国产最好的精华液| 欧美成人三级电影在线| 成人欧美一区二区三区黑人麻豆| 亚洲妇女屁股眼交7| 国产一区二区三区av电影| 在线观看91视频| 国产亚洲一区二区三区四区| 亚洲午夜精品17c| 国产精品亚洲一区二区三区妖精| 一本色道久久加勒比精品| 久久麻豆一区二区| 亚洲一区二区三区四区在线免费观看 | 国产精品久久久久久久久果冻传媒| 丝袜诱惑制服诱惑色一区在线观看 | 亚洲精品中文字幕乱码三区| 久久99国产精品免费网站| 91极品视觉盛宴| 国产亚洲女人久久久久毛片| 天堂va蜜桃一区二区三区| 色婷婷久久久综合中文字幕| 久久综合视频网| 日韩成人精品在线| 91麻豆精品在线观看| 国产精品美日韩| 国产精品资源在线看| 日韩欧美精品在线| 亚洲最快最全在线视频| 99久久久国产精品| 久久久99精品免费观看不卡| 日本va欧美va精品发布| 欧美日韩国产综合久久| 亚洲黄色在线视频| 波多野结衣在线一区| 中文字幕欧美国产| 国产一区福利在线| 精品久久一区二区| 麻豆成人久久精品二区三区红| 欧美日韩精品综合在线| 亚洲午夜久久久久中文字幕久| 日本精品裸体写真集在线观看| 一区二区中文视频| 不卡区在线中文字幕| 国产精品久久久久久久久搜平片 | 视频一区视频二区在线观看| 一本久道久久综合中文字幕| 亚洲欧洲av色图| 色婷婷综合五月| 亚洲精品免费在线播放| 欧美自拍偷拍午夜视频| 亚洲一区在线观看视频| 欧美日本精品一区二区三区|