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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? play_mp4.c

?? SigmDesign SMP8634 media decode chip development SDK
?? C
?? 第 1 頁 / 共 5 頁
字號:
	RMDBGLOG((ENABLE, "video DSI sent, size %ld\n", pSendContext->videodsiSize));	status = dump_data_into_file(pSendContext->play_opt, RMVDEMUX_VIDEO, pSendContext->videosample.buf, pSendContext->videosample.size, 				     pSendContext->video_Info.TimeStamp, (pSendContext->video_Info.ValidFields & TIME_STAMP_INFO), 				     pSendContext->video_Info.FirstAccessUnitPointer);	if (RMFAILED(status)) {		RMDBGLOG((ENABLE, "Cannot dump data %d\n", status));		return status;	}	if (pSendContext->videosample.buf != NULL) {		RUAReleaseBuffer(pSendContext->pDMA, pSendContext->videosample.buf);		pSendContext->videosample.buf = NULL;	}	pSendContext->sendVideoDSI = FALSE;	return RM_OK;}static RMstatus Stop(struct SendMP4DataContext * pSendContext, RMuint32 devices){	RMstatus err = RM_OK;	struct dcc_context *dcc_info = pSendContext->dcc_info;		if (devices & RM_DEVICES_STC) {		RMDBGLOG((ENABLE, "STOP: stc\n"));		DCCSTCStop(dcc_info->pStcSource);	}	if (devices & RM_DEVICES_VIDEO) {		if (pSendContext->SendVideoData) {			RMDBGLOG((ENABLE, "STOP: video decoder\n"));			err = DCCStopVideoSource(dcc_info->pVideoSource, DCCStopMode_LastFrame);			if (RMFAILED(err)){				RMDBGLOG((ENABLE, "Error stopping video source %d\n", err));				return err;			}						pSendContext->lastVideoPTS = 0;			pSendContext->lastSPUPTS = 0;			pSendContext->sendVideoDSI = TRUE;		}	}	if (devices & RM_DEVICES_AUDIO) {		if ((pSendContext->SendAudioData) && (dcc_info->pMultipleAudioSource)) {			RMDBGLOG((ENABLE, "STOP: multiple audio decoders\n"));			err = DCCStopMultipleAudioSource(dcc_info->pMultipleAudioSource);			if (RMFAILED(err)){				RMDBGLOG((ENABLE,"Error stopping multiple audio source %d\n", err));				return err;			}			pSendContext->lastAudioPTS = 0;		}	}	if ((devices & RM_DEVICES_AUDIO) && (devices & RM_DEVICES_VIDEO)) {		pSendContext->FirstSystemTimeStamp = TRUE;	}		if (pSendContext->monitorFIFOs) {		RMDBGLOG((ENABLE, "FIFO STATUS after stop\n"));		monitorFIFO(pSendContext, TRUE);		RMDBGLOG((ENABLE, "**********************\n"));	}	return err;}static RMstatus Play(struct SendMP4DataContext * pSendContext, RMuint32 devices, enum DCCVideoPlayCommand mode){	RMstatus err = RM_OK;	struct dcc_context *dcc_info = pSendContext->dcc_info;	if (pSendContext->monitorFIFOs) {		RMDBGLOG((ENABLE, "FIFO STATUS before play\n"));		monitorFIFO(pSendContext, TRUE);		RMDBGLOG((ENABLE, "**********************\n"));	}		if (devices & RM_DEVICES_STC) {		RMDBGLOG((ENABLE, "PLAY: stc\n"));		DCCSTCPlay(dcc_info->pStcSource);	}	if (devices & RM_DEVICES_VIDEO) {		if (pSendContext->SendVideoData) {			RMDBGLOG((ENABLE, "PLAY: video decoder\n"));			err = DCCPlayVideoSource(dcc_info->pVideoSource, mode);			if (RMFAILED(err)) {				RMDBGLOG((ENABLE, "Cannot play video decoder %d\n", err));				return err;			}		}		send_videoDSI(pSendContext);	}	if (devices & RM_DEVICES_AUDIO) {		if ((pSendContext->SendAudioData) && (dcc_info->pMultipleAudioSource)) {			RMDBGLOG((ENABLE, "PLAY: multiple audio decoders\n"));			err = DCCPlayMultipleAudioSource(dcc_info->pMultipleAudioSource);			if (RMFAILED(err)) {				RMDBGLOG((ENABLE, "Cannot play video decoder %d\n", err));				return err;			}		}	}	return err;}// used for prebufferingstatic RMstatus Pause(struct SendMP4DataContext * pSendContext, RMuint32 devices){	RMstatus err = RM_OK;		if (devices & RM_DEVICES_STC) {		RMDBGLOG((ENABLE, "PAUSE: stc\n"));		DCCSTCStop(pSendContext->dcc_info->pStcSource);	}	if (devices & RM_DEVICES_VIDEO) {		if (pSendContext->SendVideoData) {			RMDBGLOG((ENABLE, "PAUSE: video decoder\n"));			err = DCCPauseVideoSource(pSendContext->dcc_info->pVideoSource);			if (RMFAILED(err)) {				RMDBGLOG((ENABLE, "Cannot pause video decoder %d\n", err));				return err;			}		}	}	if (devices & RM_DEVICES_AUDIO) {		if ((pSendContext->SendAudioData) && (pSendContext->dcc_info->pMultipleAudioSource)) {			RMDBGLOG((ENABLE, "PAUSE: audio decoder\n"));			err = DCCPauseMultipleAudioSource(pSendContext->dcc_info->pMultipleAudioSource);			if (RMFAILED(err)) {				RMDBGLOG((ENABLE, "Cannot pause video decoder %d\n", err));				return err;			}		}	}	return err;}#define PLAY_TIMERS 0static RMstatus send_MP4_audio(struct SendMP4DataContext * pSendContext){	RMstatus status;	RMuint64 pts;	RMuint8 *buf = NULL;	enum RM_PSM_State PlaybackStatus = RM_PSM_GetState(pSendContext->PSMcontext, &(pSendContext->dcc_info));	RMuint32 nextSampleSize = 0;	if (PlaybackStatus == RM_PSM_Stopped) {		return RM_OK;	}	if ((PlaybackStatus != RM_PSM_Playing) && (PlaybackStatus != RM_PSM_Paused) && (PlaybackStatus != RM_PSM_Prebuffering))		return RM_OK;	if (pSendContext->audioTransferPending)		goto send_data;	if (pSendContext->play_opt->disk_ctrl_state == DISK_CONTROL_STATE_SLEEPING)		RMDBGLOG((ENABLE, "trying to read from a suspended drive!!\n"));	pSendContext->audiosample.buf = pSendContext->audioDMABuffer + pSendContext->audioDMABufferOffset;		pSendContext->audiosample.size = (1<<pSendContext->dmaBufferSizeLog2) - pSendContext->audioDMABufferOffset;	if (pSendContext->isAACaudioPayload) {		buf = pSendContext->audiosample.buf;				pSendContext->audiosample.size -= ADTS_HEADER_SIZE;		pSendContext->audiosample.buf += ADTS_HEADER_SIZE;	}			if (!RMGetNextMP4Sample(pSendContext->mp4tA, &(pSendContext->audiosample), pSendContext->audiosample.size)) {		RMDBGLOG((ENABLE,"Failed to get Audio sample -> end of audio stream\n"));				pSendContext->audioEOS = TRUE;		return RM_EOS;	}		if (!pSendContext->audiosample.size)		RMDBGLOG((ENABLE, ">>> got an audio sample of size 0!\n"));		RMGetMP4TrackNextSampleSize(pSendContext->mp4tA, &nextSampleSize);		RMDBGLOG((DISABLE, "got audio sample of size %ld, nextSampleSize %lu, last audioDataSent %lu\n", pSendContext->audiosample.size, nextSampleSize, pSendContext->audioDataSent));		if (pSendContext->isAACaudioPayload) {		FillAdtsHeader(buf, pSendContext->audiosample.size, pSendContext->AAC_SampleRateFromDSI,			       pSendContext->AAC_ChannelsFromDSI, pSendContext->AAC_ObjectIDFromDSI);				pSendContext->audiosample.buf = buf;		pSendContext->audiosample.size += ADTS_HEADER_SIZE;	}			if (pSendContext->audiosample.flags & MP4_CTS_VALID) {		pSendContext->audio_Info.ValidFields = TIME_STAMP_INFO;		pts = RMuint64from2RMuint32(pSendContext->audiosample.CTS_MSB, pSendContext->audiosample.CTS_LSB);		pSendContext->audio_Info.TimeStamp = pts;				if (pSendContext->audio_vop_tir != pSendContext->AudioCTSTimeScale) {			pSendContext->audio_Info.TimeStamp = round_int_div(pts * pSendContext->audio_vop_tir, pSendContext->AudioCTSTimeScale);			RMDBGLOG((DISABLE, "audio pts scaling! old %lld => %lld thru a factor %ld/%ld\n",				  pts,				  pSendContext->audio_Info.TimeStamp,				  pSendContext->audio_vop_tir,				  pSendContext->AudioCTSTimeScale));		} 		else			RMDBGLOG((DISABLE, "setting pts to %llu\n", pts));				pSendContext->lastAudioPTS = (1000 * pSendContext->audio_Info.TimeStamp) / pSendContext->audio_vop_tir;	}		if (!pSendContext->SendAudioPts) {		pSendContext->audio_Info.TimeStamp = 0;		pSendContext->audio_Info.ValidFields = 0;	}		// happens only once	if (!pSendContext->audio_ptsScalingMsg) {		if (pSendContext->audio_vop_tir != pSendContext->AudioCTSTimeScale) {			RMDBGLOG((ENABLE, ">>> audio pts scaling! thru a factor %ld/%ld\n",				  pSendContext->audio_vop_tir,				  pSendContext->AudioCTSTimeScale));		}		else			RMDBGLOG((ENABLE, ">>> no audio pts scaling required\n"));		pSendContext->audio_ptsScalingMsg = TRUE;	}			if (pSendContext->FirstSystemTimeStamp && (pSendContext->audio_Info.ValidFields & TIME_STAMP_INFO)) {		RMuint64 dummyPTS = pSendContext->audio_Info.TimeStamp;					RMDBGLOG((ENABLE, "FirstSystemTimeStamp from audio = %lld(0x%llX) at %ld/sec = %llu s\n",			  dummyPTS,			  dummyPTS,			  pSendContext->audio_vop_tir,			  dummyPTS / pSendContext->audio_vop_tir));					pSendContext->FirstSystemTimeStamp = FALSE;					RMDBGLOG((ENABLE, "setting timers\n"));		DCCSTCSetTime(pSendContext->dcc_info->pStcSource, dummyPTS, pSendContext->audio_vop_tir);#if PLAY_TIMERS		if ((PlaybackStatus != RM_PSM_Prebuffering) && (PlaybackStatus != RM_PSM_Paused) && (PlaybackStatus != RM_PSM_Stopped))			DCCSTCPlay(pSendContext->dcc_info->pStcSource);#endif							} 	else if (pSendContext->FirstSystemTimeStamp) {		if (pSendContext->forceTimersToZero) {			RMDBGLOG((ENABLE, ">>> no pts, force timers to zero\n"));			DCCSTCSetTime(pSendContext->dcc_info->pStcSource, 0, pSendContext->audio_vop_tir);#if PLAY_TIMERS			if ((PlaybackStatus != RM_PSM_Prebuffering) && (PlaybackStatus != RM_PSM_Paused) && (PlaybackStatus != RM_PSM_Stopped))				DCCSTCPlay(pSendContext->dcc_info->pStcSource);#endif			pSendContext->FirstSystemTimeStamp = FALSE;		}		else {			RMDBGLOG((ENABLE, "waiting for first time stamp to be detected, timer not set!!!, audio skipped\n"));							return RM_OK;		}	}			RMDBGLOG((DISABLE, "about to send a packet audio dma 0x%08X, sample 0x%08X, size %ld, pts %lld(0x%llx) %s\n", 		  pSendContext->pDMA, 		  pSendContext->audiosample.buf, 		  pSendContext->audiosample.size, 		  pSendContext->audio_Info.TimeStamp,		  pSendContext->audio_Info.TimeStamp,		  (pSendContext->audio_Info.ValidFields & TIME_STAMP_INFO) ? "valid":""));			pSendContext->audioDMABufferOffset += pSendContext->audiosample.size; send_data:	if (pSendContext->audiosample.size != 0) {				if (pSendContext->SendAudioData) {			RMint32 lastOKinstance;			status = DCCMultipleAudioSendData(pSendContext->dcc_info->pMultipleAudioSource, 							  pSendContext->pDMA, 							  pSendContext->audiosample.buf, 							  pSendContext->audiosample.size, 							  &pSendContext->audio_Info, 							  sizeof(pSendContext->audio_Info), 							  &lastOKinstance);						if (status != RM_OK) {				if (status == RM_PENDING) {					RMDBGLOG((ENABLE, "audio transfer pending\n"));					pSendContext->audioTransferPending = TRUE;				}				return status;			}			pSendContext->audioTransferPending = FALSE;		}						status = dump_data_into_file(pSendContext->play_opt, 					     RMVDEMUX_AUDIO, 					     pSendContext->audiosample.buf, 					     pSendContext->audiosample.size, 					     pSendContext->audio_Info.TimeStamp, 					     (pSendContext->audio_Info.ValidFields & TIME_STAMP_INFO), 					     pSendContext->audio_Info.FirstAccessUnitPointer);				if (RMFAILED(status)) {			RMDBGLOG((ENABLE, "Cannot dump data %d\n", status));		}				if (pSendContext->SendAudioData) {			RMDBGLOG((SENDDBG, "sent a packet audio dma 0x%08X, sample 0x%08X, size %ld, total %ld, pts %lld(0x%llx) %s\n", 				  pSendContext->pDMA, 				  pSendContext->audiosample.buf, 				  pSendContext->audiosample.size,				  pSendContext->audioDataSent,				  pSendContext->audio_Info.TimeStamp,				  pSendContext->audio_Info.TimeStamp,				  (pSendContext->audio_Info.ValidFields & TIME_STAMP_INFO) ? "valid":""));		}			// required for prebuffering routine		pSendContext->audioDataSent += pSendContext->audiosample.size;					}	else {		RMDBGLOG((ENABLE, "got audio sample of size 0!\n"));	}			return RM_OK;}	static RMstatus send_video_payload(struct SendMP4DataContext *pSendContext){	RMstatus status;	RMuint32 sizeBuffer = (1 << pSendContext->dmaBufferSizeLog2);	RMmp4Sample *sample = &(pSendContext->videosample);	RMuint8 *videoDMAStartCodeBuffer;		if (pSendContext->isH264) {		// h264 streams packed into MP4 system files require startcode reinsertion.				RMDBGLOG((H264_SC_DBG, "send_video_payload (size %lu)\n", sample->size));		if (sample->size < 3)			RMDBGLOG((ENABLE, "warning read a sampleSize < 3\n"));		else {			RMuint32 nextSampleSize;			RMGetMP4TrackNextSampleSize(pSendContext->mp4tV, &nextSampleSize);								RMDBGLOG((H264_SC_DBG, "%02x %02x %02x %02x this sample size %6lu next %6lu flags %2lu\n", 				  sample->buf[0],				  sample->buf[1],				  sample->buf[2],				  sample->buf[3],				  sample->size,				  nextSampleSize,				  sample->flags));		}					if (sample->flags & MP4_AU_START) {						pSendContext->h264sendStartCode = TRUE;			pSendContext->h264readPacketSize = TRUE;			/* 			   clear the flag because if sending part of the sample returns pending, we'll get called again			   and we shouldn't send the startcode again			*/			sample->flags &= ~MP4_AU_START;		}				while (sample->size) {			RMuint32 sizeToSend;			RMDBGLOG((H264_SC_DBG, "available buffer count: %lu\n", RUAGetAvailableBufferCount(pSendContext->pDMA)));						// send startcode						if (pSendContext->h264sendStartCode) {				// get a DMA buffer				if (!pSendContext->startCodeDMABuffer) {					get_buffer(pSendContext, &(pSendContext->startCodeDMABuffer));					if (pSendContext->processKeyResultValid) {						RMDBGLOG((ENABLE, "a key was pressed during H264 startcode buffer wait"));						// a key was pressed, return to main_loop to process it						return RM_PENDING;					}					pSendContext->startCodeDMABufferOffset = 0;					RMDBGLOG((DBG, "setting new buffer for video startcodes 0x%lx\n", (RMuint32)pSendContext->startCodeDMABuffer));				}				videoDMAStartCodeBuffer = pSendContext->startCodeDMABuffer + pSendContext->startCodeDMABufferOffset;				pSendContext->videoTransferPending = FALSE;								// set StartCode (4bytes)				RMuint32ToBeBuf(0x00000001, videoDMAStartCodeBuffer);								if (pSendContext->SendVideoData) {					// send startcode with PTS from the sample					while (1) {						status = RUASendData(pSendContext->pRUA, 								     pSendContext->dcc_info->video_decoder, 								     pSendContext->pDMA, 								     videoDMAStartCodeBuffer, 								     4, 								     &pSendContext->video_Info, 								     sizeof(pSendContext->video_Info));						if (status == RM_OK) 							break;						/* handle end of prebufferisation here */						else if (status == RM_PENDING) {							struct RUAEvent e;														check_prebuf_state(pSendContext, 0);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日产亚洲精品系列| 欧美日韩成人在线| 91啦中文在线观看| 欧美日韩中文字幕精品| 欧美成人aa大片| 中文字幕不卡的av| 亚洲bdsm女犯bdsm网站| 国产综合久久久久影院| 91片在线免费观看| 日韩欧美国产一区二区三区| 欧美韩日一区二区三区四区| 亚洲成人综合在线| 国产成人综合精品三级| 欧美日韩一区二区三区免费看| 日韩欧美高清一区| 亚洲视频一区二区在线观看| 日韩和欧美一区二区| 高清在线观看日韩| 欧美婷婷六月丁香综合色| 国产性天天综合网| 午夜精品一区二区三区三上悠亚| 国产激情一区二区三区四区| 欧美在线你懂得| 久久久91精品国产一区二区精品| 亚洲在线视频网站| 福利一区福利二区| 欧美一区二区高清| 有码一区二区三区| 亚洲自拍偷拍九九九| 国产成人av资源| 欧美大片一区二区| 一区二区欧美精品| 暴力调教一区二区三区| 精品国产一区二区三区久久影院| 亚洲电影激情视频网站| 99久久久精品| 国产人成亚洲第一网站在线播放| 免费高清不卡av| 欧美群妇大交群中文字幕| 中文字幕字幕中文在线中不卡视频| 精品在线观看免费| 91精品国产高清一区二区三区 | 国产91精品在线观看| 欧美麻豆精品久久久久久| 国产精品灌醉下药二区| 国产精品一品二品| 日韩无一区二区| 午夜精品一区二区三区免费视频| 91在线精品一区二区| 中文字幕av一区 二区| 韩国欧美一区二区| 日韩美女视频在线| 免费在线观看日韩欧美| 欧美日韩你懂的| 亚洲一区二区三区中文字幕| 99精品视频一区二区三区| 日本一区二区三区视频视频| 国产精品一二三| 久久久久国产精品麻豆| 国内精品免费**视频| 欧美电影免费提供在线观看| 丝袜美腿亚洲一区| 91精品国产综合久久久久久漫画 | 色婷婷久久久久swag精品 | 97se亚洲国产综合自在线不卡| 国产欧美日韩视频一区二区| 国产乱码精品一区二区三区忘忧草 | 欧美精品一区二区在线播放 | 国产清纯美女被跳蛋高潮一区二区久久w| 日本强好片久久久久久aaa| 欧美色倩网站大全免费| 亚洲成人资源在线| 欧美精品日韩一区| 麻豆成人免费电影| 日韩一二三区视频| 久久精品国产成人一区二区三区| 91精品国产高清一区二区三区蜜臀| 香蕉影视欧美成人| 91精品国产aⅴ一区二区| 日韩av午夜在线观看| 欧美成人精品福利| 国产精品一区二区久激情瑜伽 | av在线不卡电影| 亚洲欧美一区二区三区国产精品| 91网站黄www| 亚洲午夜久久久久中文字幕久| 欧美三级电影精品| 六月丁香综合在线视频| 26uuu亚洲婷婷狠狠天堂| 成人深夜视频在线观看| 亚洲卡通欧美制服中文| 欧美日韩一区二区三区不卡| 麻豆精品一区二区av白丝在线| 久久影院午夜论| 99riav一区二区三区| 午夜免费欧美电影| www精品美女久久久tv| www.视频一区| 亚洲大尺度视频在线观看| 欧美成人性战久久| 99久久久免费精品国产一区二区| 亚洲国产aⅴ成人精品无吗| 欧美一二三区精品| 成人网在线免费视频| 亚洲制服欧美中文字幕中文字幕| 91精品欧美一区二区三区综合在| 国内精品视频666| 亚洲九九爱视频| 日韩女同互慰一区二区| 国产999精品久久| 一区二区三区丝袜| 精品国产伦一区二区三区免费| av电影在线观看一区| 日韩精品色哟哟| 国产精品久久久久久久久免费丝袜| 色欧美片视频在线观看在线视频| 免费在线观看一区| 亚洲欧洲美洲综合色网| 正在播放亚洲一区| 成人av电影在线| 麻豆精品久久精品色综合| 国产精品污网站| 91精品国产麻豆| 99国产精品久| 韩国精品在线观看| 亚洲电影一区二区三区| 中文字幕欧美国产| 欧美一区二区三区视频免费| 国产成人在线看| 日韩精品电影在线观看| 亚洲欧洲www| 日韩视频在线永久播放| 色呦呦一区二区三区| 国产精品自拍三区| 亚洲成人动漫一区| 亚洲三级小视频| 亚洲精品在线三区| 在线不卡中文字幕播放| 94色蜜桃网一区二区三区| 国产伦精品一区二区三区视频青涩| 亚洲自拍偷拍欧美| 国产精品黄色在线观看| 日韩视频一区在线观看| 91精彩视频在线| 成人高清免费观看| 久久99久国产精品黄毛片色诱| 亚洲一区在线观看视频| 国产精品国产馆在线真实露脸| 精品国产乱码久久久久久老虎| 欧美视频在线播放| 91免费在线播放| 不卡在线视频中文字幕| 国内精品视频666| 麻豆高清免费国产一区| 日韩国产在线一| 亚洲一区二区三区中文字幕 | 欧美性猛交一区二区三区精品| 成人涩涩免费视频| 国产在线不卡一区| 麻豆视频观看网址久久| 偷窥国产亚洲免费视频| 亚洲一区二区三区在线播放| 亚洲精品日韩综合观看成人91| 久久久亚洲综合| 亚洲精品一区二区三区影院| 日韩一卡二卡三卡四卡| 欧美一区二区不卡视频| 欧美日韩电影在线| 欧美日韩在线亚洲一区蜜芽| 91免费版在线| 色爱区综合激月婷婷| 99国产精品99久久久久久| 99精品久久只有精品| 成人精品免费视频| 懂色av中文一区二区三区| 国产99久久久国产精品潘金网站| 国产精品自拍av| 国产精品77777| 国产超碰在线一区| 高清视频一区二区| 成人免费电影视频| 成人国产在线观看| 91看片淫黄大片一级| 色av综合在线| 欧美日韩高清一区二区三区| 欧美日韩免费电影| 欧美亚洲动漫制服丝袜| 欧美三级一区二区| 欧美群妇大交群中文字幕| 欧美一级欧美三级在线观看| 欧美一区二区三区在线| 精品国产伦一区二区三区观看体验| 精品国产污网站| 久久精品视频一区| 国产精品视频免费| 一区二区高清免费观看影视大全| 亚洲精品视频在线观看网站| 亚洲成人手机在线| 蜜桃av一区二区三区| 国产精品综合网|