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

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

?? curacao.cpp

?? sigmadesign smp8623 gui source code ,bingo
?? CPP
字號:
/***************************************** 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一区二区三区免费野_久草精品视频
欧美午夜影院一区| 国产在线播放一区三区四| 日韩免费高清av| 欧美日韩高清在线播放| 在线一区二区三区四区五区 | 欧美色视频一区| 在线观看日韩av先锋影音电影院| 成人av中文字幕| 成人app在线| 91国偷自产一区二区使用方法| 91久久一区二区| 欧美日韩成人综合| 日韩免费观看2025年上映的电影| 日韩久久免费av| 国产日韩综合av| 国产精品污www在线观看| 亚洲桃色在线一区| 亚洲一区二区美女| 老司机精品视频在线| 国产毛片一区二区| 91麻豆免费看| 欧美日本不卡视频| 亚洲精品在线网站| 国产精品久久一卡二卡| 一区二区三区在线看| 日韩和欧美一区二区三区| 韩国视频一区二区| 91麻豆精东视频| 91精品国产综合久久久久久漫画| 精品成a人在线观看| 国产精品久久免费看| 亚洲一区二区不卡免费| 激情综合色综合久久| 99精品视频一区| 日韩一区二区三区在线观看| 中文字幕 久热精品 视频在线| 亚洲裸体在线观看| 六月丁香婷婷色狠狠久久| 成人午夜电影小说| 欧美一区二区三区在线观看视频 | 国产欧美精品一区| 亚洲靠逼com| 黑人巨大精品欧美一区| 色婷婷综合激情| xnxx国产精品| 亚洲一区二区三区自拍| 成人深夜视频在线观看| 在线不卡a资源高清| 国产精品对白交换视频| 久久99九九99精品| 欧美亚洲国产一区在线观看网站| 久久精品无码一区二区三区| 亚洲一二三四久久| caoporm超碰国产精品| 欧美mv日韩mv| 婷婷开心久久网| 91极品美女在线| 亚洲另类色综合网站| 国产精品一区二区久久不卡| 欧美一区在线视频| 亚洲一二三四久久| 91久久精品一区二区三| 一色屋精品亚洲香蕉网站| 国产麻豆视频精品| www亚洲一区| 国产一区二区主播在线| 欧美一区二区福利视频| 亚洲福利视频三区| 欧美在线一区二区三区| 亚洲美腿欧美偷拍| 91同城在线观看| 综合av第一页| 99久久亚洲一区二区三区青草| 久久精品夜色噜噜亚洲aⅴ| 国产综合色产在线精品| 精品国产一区二区精华| 久久99热99| 久久久亚洲高清| 国产精品456| 中文在线一区二区| 97久久人人超碰| 亚洲综合图片区| 欧美日韩三级在线| 蜜桃一区二区三区在线| 日韩午夜中文字幕| 精品中文字幕一区二区小辣椒| 日韩欧美123| 国产a久久麻豆| 亚洲视频一二区| 欧洲av在线精品| 日韩成人伦理电影在线观看| 日韩女优毛片在线| 高清不卡一区二区| 最新不卡av在线| 欧美日韩电影在线播放| 免费观看91视频大全| 久久久久国色av免费看影院| av电影在线观看不卡| 亚洲午夜三级在线| 日韩欧美在线不卡| 成人午夜视频在线观看| 一区二区欧美国产| 欧美大片国产精品| 99在线精品观看| 日韩av电影天堂| 国产精品水嫩水嫩| 欧美日韩免费不卡视频一区二区三区| 日韩精品一级二级 | 欧美日韩精品久久久| 久久99精品一区二区三区| 国产精品久久久久一区二区三区共| 色综合久久综合网欧美综合网| 偷偷要91色婷婷| 欧美国产日产图区| 91精品视频网| av在线不卡免费看| 麻豆久久久久久久| 亚洲精品国产无套在线观| 日韩一区二区影院| 在线观看视频一区二区欧美日韩| 精油按摩中文字幕久久| 亚洲福利一区二区三区| 国产精品私房写真福利视频| 欧美日产在线观看| 99久久综合99久久综合网站| 久久66热re国产| 亚瑟在线精品视频| **性色生活片久久毛片| 欧美xingq一区二区| 欧美中文字幕一区二区三区亚洲| 国产高清不卡一区| 国产高清久久久久| 蜜桃一区二区三区在线| 亚洲一区在线看| 亚洲欧洲一区二区在线播放| 欧美成人伊人久久综合网| 日本电影欧美片| 色婷婷av一区| 99久久国产综合精品女不卡| 国产成人日日夜夜| 久久99久久久久久久久久久| 亚洲www啪成人一区二区麻豆| 成人免费视频在线观看| 亚洲国产精品国自产拍av| 亚洲精品在线免费观看视频| 欧美一区二区人人喊爽| 欧美人xxxx| 欧美偷拍一区二区| 欧美午夜影院一区| 精品1区2区3区| 欧美日韩国产一级片| 欧美日韩一二区| 91精品免费观看| 日韩一级免费一区| 日韩精品在线一区| 日韩精品一区二区三区四区视频| 7777精品伊人久久久大香线蕉经典版下载 | 欧美精品一区二区三区一线天视频| 欧美亚洲禁片免费| 欧美日韩黄色一区二区| 欧美欧美欧美欧美首页| 欧美国产日韩在线观看| 欧美激情中文不卡| 中文字幕在线不卡视频| 亚洲视频在线一区二区| 亚洲精品福利视频网站| 亚洲综合精品久久| 日本欧美一区二区| 美女视频免费一区| 国产精品综合二区| 91在线免费看| 欧美日韩一区视频| 欧美一级免费大片| 国产视频一区在线播放| 综合亚洲深深色噜噜狠狠网站| 亚洲欧美另类小说| 天天色 色综合| 国产精品77777| 欧美制服丝袜第一页| 日韩免费视频一区二区| 国产欧美日韩视频在线观看| 综合久久综合久久| 日本免费新一区视频| 国产精品99久久久久| 99精品桃花视频在线观看| 欧美日韩一级二级| 国产欧美精品一区aⅴ影院 | 国产成人精品一区二| 一本色道久久综合亚洲精品按摩| 在线不卡欧美精品一区二区三区| 欧美成人a∨高清免费观看| 国产精品家庭影院| 石原莉奈在线亚洲三区| 国产福利精品导航| 欧美裸体bbwbbwbbw| 国产精品久久久久精k8| 日韩高清电影一区| 一本色道久久综合亚洲精品按摩 | 中文字幕欧美日韩一区| 日韩一区精品视频|