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

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

?? play_mp4.c

?? SigmDesign SMP8634 media decode chip development SDK
?? C
?? 第 1 頁 / 共 5 頁
字號:
			goto mainloop_noseek;				\		case LABEL_START_SENDING_DATA:				\			goto start_sending_data;			\		case LABEL_SIGNAL_EOS_AND_EXIT:				\			goto signal_EOS_and_exit_loop;			\		case LABEL_NONE:					\			RMDBGLOG((ENABLE, "warning unrecognised key pressed\n"));\			break;						\		}							\	}								\} while(0)#define ADTS_HEADER_SIZE 7static RMuint32 FindAdtsSRIndex(RMuint32 sr){	const RMuint32 adts_sample_rates[] = {96000,88200,64000,48000,44100,32000,24000,22050,16000,12000,11025,8000,7350,0,0,0};	RMuint32 i;		for (i = 0; i < 16; i++) {		if (sr == adts_sample_rates[i])			return i;	}	return 0xf;}static void FillAdtsHeader(RMuint8 *buf, RMuint32 framesize, RMuint32 samplerate, RMuint32 channelcount, RMuint32 objectID){	RMuint32 profile = (objectID - 1) & 0x3;	RMuint32 sr_index = FindAdtsSRIndex(samplerate);	framesize += ADTS_HEADER_SIZE;  /* add adts header size */	buf[0] = 0xFF; /* 8b: syncword */	buf[1] = 0xF1; /* 4b: syncword */	               /* 1b: mpeg id = 0 */	               /* 2b: layer = 0 */	               /* 1b: protection absent = 1 */		buf[2] = ((profile << 6) & 0xC0);  /* 2b: profile */	buf[2] += ((sr_index << 2) & 0x3C); /* 4b: sampling_frequency_index */	                                    /* 1b: private = 0 */	buf[2] += ((channelcount >> 2) & 0x1); /* 1b: channel_configuration */		buf[3] = ((channelcount << 6) & 0xC0); /* 2b: channel_configuration */	/* 1b: original = 0 */	/* 1b: home = 0 */	/* 1b: copyright_id = 0 */	/* 1b: copyright_id_start = 0 */	buf[3] += ((framesize >> 11) & 0x3); /* 2b: aac_frame_length */		buf[4] = ((framesize >> 3) & 0xFF); /* 8b: aac_frame_length */		buf[5] = ((framesize << 5) & 0xE0); /* 3b: aac_frame_length */	buf[5] += ((0x7FF >> 6) & 0x1F); /* 5b: adts_buffer_fullness */		buf[6] = ((0x7FF << 2) & 0xFC); /* 6b: adts_buffer_fullness */	/* 2b: num_raw_buf_blocks  = 0 */}/* prototypes */static RMuint64 round_int_div(RMuint64 numerator, RMuint32 divisor);static RMstatus mp4_select_audio_track(struct SendMP4DataContext *pSendContext, RMuint32 index);static RMstatus mp4_select_spu_track(struct SendMP4DataContext *pSendContext, RMuint32 index);static RMstatus mp4_select_subtitle_track(struct SendMP4DataContext *pSendContext, RMuint32 index);static void get_buffer(struct SendMP4DataContext *pSendContext, RMuint8 **buf);RMuint64 round_int_div(RMuint64 numerator, RMuint32 divisor) {	RMuint64 temp;	temp = numerator / divisor;	if ((numerator % divisor) * 2 > divisor)		temp++;	return temp;}static RMstatus init_private_options(struct priv_cmdline *options){	options->audio_track = 0;	options->internal_file_open = 0;	options->monitorFIFOs = FALSE;	#ifdef WITH_MONO	options->spuEnabled = TRUE;	options->subtitlesEnabled = TRUE;#else	options->spuEnabled = FALSE;	options->subtitlesEnabled = FALSE;#endif	return RM_OK;}#ifndef WITH_MONOstatic RMstatus parse_private_cmdline(struct SendMP4DataContext *pSendContext, int argc, char **argv, int *index, struct priv_cmdline *options){	RMstatus err = RM_PENDING;	int i = *index;	if (! strcmp(argv[i], "-at")) {		if (argc > i+1) {			options->audio_track = strtol(argv[i+1], NULL, 10);			i+=2;			err = RM_OK;		}		else			err = RM_ERROR;	} else if ( ! strcmp(argv[i], "-fopen")) {		if (argc > i+1) {			options->internal_file_open = strtol(argv[i+1], NULL, 10);			i+=2;			err = RM_OK;		}		else			err = RM_ERROR;	}	else if ( ! strcmp(argv[i], "-monitor")) {		options->monitorFIFOs = TRUE;		err = RM_OK;		i++;	}	else if ( ! strcmp(argv[i], "-subt")) {		options->subtitlesEnabled = TRUE;		err = RM_OK;		i++;	}		*index = i;		return err;}static void show_private_options(void){	fprintf(stderr, 		"MP4 OPTIONS (default values inside brackets)\n"		"\t-at track: Selects audio track number track [0]\n"		"\t-spu enable SPU (if present)\n"		"\t-subt enable Subtitles (if present)\n"		"\t-fopen <0|1>: use internal file open [0]\n");}static void show_usage(char *progname){	show_private_options();	show_playback_options();	show_display_options();	show_video_options();	show_audio_options();	fprintf(stderr, 		"--------------------------------\n"		"Minimum cmd line: %s <file name>\n"		"--------------------------------\n", 		progname);	exit(1);}static void parse_cmdline(struct SendMP4DataContext *pSendContext, int argc, char *argv[], RMuint32 *currentAudioInstance){	int i;	RMstatus err;	if (argc < 2) 		show_usage(argv[0]);		i = 1;	while ((argc > i)) {		if (argv[i][0] != '-') {			if (pSendContext->play_opt->filename == NULL) {				pSendContext->play_opt->filename = argv[i];				i++;			}			else				show_usage(argv[0]);		}		else {			err = parse_private_cmdline(pSendContext, argc, argv, &i, &(pSendContext->priv_opt));			if (err == RM_ERROR)				show_usage(argv[0]);			if (err != RM_PENDING)				continue;			err = parse_playback_cmdline(argc, argv, &i, pSendContext->play_opt);			if (err == RM_ERROR) 				show_usage(argv[0]);			if (err != RM_PENDING)				continue;			err = parse_display_cmdline(argc, argv, &i, pSendContext->disp_opt);			if (err == RM_ERROR) 				show_usage(argv[0]);			if (err != RM_PENDING)				continue;			err = parse_video_cmdline(argc, argv, &i, pSendContext->video_opt);			if (err == RM_ERROR) 				show_usage(argv[0]);			if (err != RM_PENDING)				continue;			RMDBGLOG((ENABLE, "option[%lu] %s\n", i, argv[i]));			err = parse_audio_cmdline2(argc, argv, &i, pSendContext->audio_opt, MAX_AUDIO_DECODER_INSTANCES, currentAudioInstance);			if (RMFAILED(err))				show_usage(argv[0]);		}	}	if (pSendContext->play_opt->filename == NULL)		show_usage(argv[0]);}#endif //WITH_MONOstatic void check_prebuf_state(struct SendMP4DataContext * pSendContext, RMuint32 buffersize);static RMstatus WaitForEOS(struct SendMP4DataContext *pSendContext, struct RM_PSM_Actions *pActions){	RMuint32 eos_bit_field = 0;	enum RM_PSM_State PlaybackStatus = RM_PSM_GetState(pSendContext->PSMcontext, &(pSendContext->dcc_info));	if (pSendContext == NULL || pActions == NULL)		return RM_ERROR;		if (pSendContext->SendVideoData) 		eos_bit_field |= EOS_BIT_FIELD_VIDEO;	if (pSendContext->SendAudioData && 	    ((PlaybackStatus == RM_PSM_Playing) ||	     (PlaybackStatus == RM_PSM_Prebuffering)))		eos_bit_field |= EOS_BIT_FIELD_AUDIO;		return WaitForEOSWithCommand(pSendContext->PSMcontext, &(pSendContext->dcc_info), pActions, eos_bit_field);}static RMstatus init_MP4_tracks(struct SendMP4DataContext *pSendContext){	RMuint32 videotrackID = 0;	RMstatus status;	RMDBGLOG((ENABLE, "initTracks\n"));#if 0	if (!pSendContext->play_opt->send_video) {		pSendContext->isAudioOnly = TRUE;		pSendContext->videoTracks = 0;		goto init_audio_track;	}#endif	pSendContext->videoTracks = RMGetMP4NumberOfVideoTracks(pSendContext->mp4c);	RMDBGLOG((ENABLE, "found %lu video tracks\n", pSendContext->videoTracks));	if (pSendContext->videoTracks > 0) {		/* so far, all files have only one video track, init the first video track found */		RMDBGLOG((ENABLE, "init mp4 video track\n"));		pSendContext->currentVideoTrack = 1;		pSendContext->mp4tV = (ExternalRMmp4Track) NULL;		videotrackID = RMGetMP4VideoTrackID(pSendContext->mp4c);		pSendContext->videodsiBuf = (RMuint8 *) NULL;		if (videotrackID > 0) {			RMmpeg4TrackType type;			pSendContext->mp4tV = RMOpenMP4Track(pSendContext->mp4c, videotrackID);			if (!pSendContext->mp4tV) {				RMDBGLOG((ENABLE, "couldnt open track!\n"));				goto disable_video;			}			RMDBGLOG((ENABLE, "video track ID is %lu\n", videotrackID));			RMGetMP4TrackWidth(pSendContext->mp4tV, &(pSendContext->videoWidth));			RMGetMP4TrackHeight(pSendContext->mp4tV, &(pSendContext->videoHeight));			pSendContext->videoWidth >>= 16;			pSendContext->videoHeight >>= 16;			RMDBGLOG((ENABLE, ">> video size %lu x %lu\n", pSendContext->videoWidth, pSendContext->videoHeight));			RMGetMP4TrackType(pSendContext->mp4tV, &type);			if (type == RM_VIDEO_H264_TRACK)				pSendContext->isH264 = TRUE;			else if (type == RM_VIDEO_MPEG4_TRACK)				pSendContext->isH264 = FALSE;			else {				RMDBGLOG((ENABLE, "unknown video!!\n"));				goto disable_video;			}			if (pSendContext->isH264) {				RMuint32 level, profile, lengthSize;				RMDBGLOG((ENABLE, ">> video track is H264\n"));				RMGetH264Level(pSendContext->mp4tV, &level);				RMGetH264Profile(pSendContext->mp4tV, &profile);				RMGetH264LengthSize(pSendContext->mp4tV, &lengthSize);				pSendContext->h264LengthSize = lengthSize;				RMDBGLOG((ENABLE, "level %lu, profile %lu, lengthSize %lu\n", level, profile, lengthSize));				if (level > 41) {					fprintf(stderr, "unsupported level, level %lu > max 41\n", level);					goto disable_video;				}				if (profile > 100) {					fprintf(stderr, "unsupported profile, profile %lu > max 100\n", profile);					goto disable_video;				}#ifdef WITH_MONO				RMDBGLOG((ENABLE, ">> set codec to H264 HD\n"));				pSendContext->video_opt->MPEGProfile = Profile_H264_HD;				pSendContext->video_opt->Codec = VideoDecoder_Codec_H264_HD;#endif			}			else {				RMDBGLOG((ENABLE, ">> video track is MPEG4\n"));#ifdef WITH_MONO				RMDBGLOG((ENABLE, ">> set codec to MPEG4\n"));				pSendContext->video_opt->MPEGProfile = Profile_MPEG4_HD;				pSendContext->video_opt->Codec = VideoDecoder_Codec_MPEG4_HD;#endif			}						pSendContext->videodsiBuf = RMGetMP4TrackDSI(pSendContext->mp4tV, &(pSendContext->videodsiSize));			RMDBGLOG((ENABLE, "got %lu bytes of video DSI, parsing...\n", pSendContext->videodsiSize));			if (pSendContext->videodsiSize > (RMuint32) (1<<pSendContext->dmaBufferSizeLog2)) {				RMDBGLOG((ENABLE, "video DSI too big!!\n"));				goto disable_video;			}			else if (pSendContext->videodsiSize == 0) {				RMDBGLOG((ENABLE, "video DSI size is zero!!\n"));				goto disable_video;			}						pSendContext->VideoCTSTimeScale = RMGetMP4TrackTimeScale(pSendContext->mp4tV);						switch (pSendContext->video_opt->MPEGProfile){			case Profile_FIRST_:			case Profile_LAST_:				break;							case Profile_MPEG2_SD:			case Profile_MPEG2_DVD:			case Profile_MPEG2_HD:			case Profile_MPEG2_SD_Packed:			case Profile_MPEG2_HD_Packed:			case Profile_MPEG2_DVD_Packed:			case Profile_MPEG2_SD_DeInt:			case Profile_MPEG2_DVD_DeInt:			case Profile_MPEG2_HD_DeInt:			case Profile_MPEG2_SD_Packed_DeInt:			case Profile_MPEG2_DVD_Packed_DeInt:			case Profile_MPEG2_HD_Packed_DeInt:				RMDBGLOG((ENABLE, "MPEG 2 video\n"));				pSendContext->video_vop_tir = 90000;				break;						case Profile_DIVX3_SD:			case Profile_DIVX3_HD:			case Profile_DIVX3_SD_Packed:			case Profile_DIVX3_HD_Packed:				RMDBGLOG((ENABLE, "DIVX3 video\n"));				pSendContext->video_vop_tir = pSendContext->VideoCTSTimeScale;				break;			case Profile_WMV_SD:			case Profile_WMV_816P:			case Profile_WMV_HD:				RMDBGLOG((ENABLE, "WMV9 video\n"));				pSendContext->video_vop_tir = 1000;				break;			case Profile_MPEG4_SD:			case Profile_MPEG4_HD:			case Profile_MPEG4_SD_Packed:			case Profile_MPEG4_HD_Packed:			case Profile_MPEG4_SD_DeInt:			case Profile_MPEG4_HD_DeInt:			case Profile_MPEG4_SD_Packed_DeInt:			case Profile_MPEG4_HD_Packed_DeInt:			case Profile_MPEG4_SD_Padding:			case Profile_MPEG4_HD_Padding:			case Profile_MPEG4_SD_DeInt_Padding:			case Profile_MPEG4_HD_DeInt_Padding:				RMDBGLOG((ENABLE, "MPEG4 video\n"));				ParseMP4VideoDSI(pSendContext->videodsiBuf, pSendContext->videodsiSize, (void *) &pSendContext->video_vop_tir, sizeof(RMuint32));				break;			case Profile_VC1_SD:			case Profile_VC1_HD:				RMDBGLOG((ENABLE, "VC1 video\n"));				pSendContext->video_vop_tir = pSendContext->VideoCTSTimeScale;				break;						case Profile_H264_SD:			case Profile_H264_HD:			case Profile_H264_SD_DeInt:			case Profile_H264_HD_DeInt:				RMDBGLOG((ENABLE, "H264 video\n"));				pSendContext->video_vop_tir = pSendContext->VideoCTSTimeScale;				break;			}					RMDBGLOG((ENABLE,"********** video VOP TIR %lu, VideoCTSTimeScale %lu\n", pSendContext->video_vop_tir, pSendContext->VideoCTSTimeScale));			if (!pSendContext->video_vop_tir) {				RMDBGLOG((ENABLE, "video_vop_tir = 0!!, reset to VideoCTSTimeScale\n"));				pSendContext->video_vop_tir = pSendContext->VideoCTSTimeScale;			}		}		else			goto disable_video;	}	else {	disable_video:		RMDBGLOG((ENABLE, ">> no video\n"));		pSendContext->SendVideoData = FALSE;		pSendContext->isAudioOnly = TRUE;		pSendContext->currentVideoTrack = 0;		if (pSendContext->mp4tV) {			RMDBGLOG((ENABLE, "closing video track\n"));			RMCloseMP4Track(pSendContext->mp4c, pSendContext->mp4tV);			pSendContext->mp4tV = (ExternalRMmp4Track) NULL;		}	}		// continue with other tracks#if 0	if (!pSendContext->play_opt->send_audio)		goto init_spu_track;#endif	RMDBGLOG((ENABLE, "init mp4 audio track(s)\n"));	pSendContext->mp4tA = (ExternalRMmp4Track) NULL;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩欧美精品电影三级在线| 精一区二区三区| 亚洲美女一区二区三区| 国产日韩精品一区二区浪潮av| 2欧美一区二区三区在线观看视频| 日韩一区二区中文字幕| 欧美mv日韩mv国产| 精品av久久707| 久久久天堂av| 欧美经典一区二区三区| 国产精品热久久久久夜色精品三区| 中文字幕精品一区| 成人欧美一区二区三区黑人麻豆| 亚洲视频香蕉人妖| 亚洲地区一二三色| 日本欧美韩国一区三区| 蜜桃在线一区二区三区| 久久不见久久见免费视频1| 韩国av一区二区三区四区| 国产盗摄视频一区二区三区| 成人动漫视频在线| 欧洲一区二区三区在线| 欧美一区二区三区在线视频| 久久综合狠狠综合久久综合88 | 一本到一区二区三区| 91福利精品第一导航| 欧美一区二区三区视频在线观看| 日韩欧美黄色影院| 亚洲国产精华液网站w| 亚洲精品乱码久久久久| 男人操女人的视频在线观看欧美| 激情五月激情综合网| 成人91在线观看| 欧美日韩国产成人在线91| 精品99999| 亚洲三级小视频| 欧美a级理论片| 成人国产精品视频| 欧美日韩国产成人在线91| 久久先锋资源网| 亚洲麻豆国产自偷在线| 久久国产欧美日韩精品| 99久久精品国产麻豆演员表| 7777精品伊人久久久大香线蕉完整版 | 日本成人在线视频网站| 国产成人av在线影院| 在线视频国内自拍亚洲视频| 欧美一区二区视频观看视频| 国产精品每日更新| 免费久久精品视频| 一本大道久久a久久精品综合| 91精品久久久久久久久99蜜臂| 中文字幕不卡一区| 日韩黄色免费网站| 91丨porny丨蝌蚪视频| 日韩视频免费观看高清完整版在线观看 | 一二三区精品福利视频| 精品一区二区三区免费播放| 91女人视频在线观看| 亚洲精品在线观看视频| 亚洲综合色婷婷| 处破女av一区二区| 日韩视频免费观看高清完整版| 亚洲三级在线看| 国产精品一区一区| 91精品国产麻豆国产自产在线 | 久久电影网电视剧免费观看| 91色婷婷久久久久合中文| 精品动漫一区二区三区在线观看| 亚洲综合色噜噜狠狠| 不卡视频在线看| xfplay精品久久| 麻豆精品视频在线观看视频| 色香蕉成人二区免费| 欧美高清一级片在线观看| 久久精品国产精品亚洲精品| 欧美日韩精品一区二区三区| 亚洲免费毛片网站| 成人国产精品免费观看视频| 精品国产青草久久久久福利| 亚洲成人黄色小说| 欧美视频自拍偷拍| 一区二区三区在线观看视频| 成人免费av网站| 欧美国产日韩一二三区| 韩国女主播一区| 日韩欧美国产综合在线一区二区三区| 亚洲激情网站免费观看| 色综合网站在线| 自拍偷自拍亚洲精品播放| 成人深夜福利app| 国产视频视频一区| 国产成人小视频| 久久久久久久一区| 国产精品夜夜嗨| 26uuu久久综合| 国产精品自拍av| 国产午夜精品久久久久久免费视| 久久精品国产澳门| 精品日韩av一区二区| 极品少妇一区二区| www久久久久| 国产精品亚洲午夜一区二区三区| 久久老女人爱爱| 高清免费成人av| 国产精品美女www爽爽爽| 99精品国产91久久久久久 | 国产精品一区二区久久精品爱涩 | 亚洲欧洲av在线| 91亚洲国产成人精品一区二区三| 136国产福利精品导航| 91免费观看视频| 亚洲国产一区二区三区青草影视| 欧美日韩一区二区在线观看| 午夜亚洲国产au精品一区二区| 欧美日韩成人在线一区| 蜜臀91精品一区二区三区| 精品国内片67194| 成人免费观看视频| 亚洲黄色性网站| 91精品国产综合久久香蕉麻豆| 日本不卡视频在线观看| 久久亚洲一级片| 99视频一区二区| 婷婷六月综合亚洲| 日韩女优电影在线观看| 国产精一区二区三区| 亚洲欧洲日产国产综合网| 欧美三级韩国三级日本一级| 日本一区中文字幕| 久久久99精品免费观看不卡| av电影在线观看完整版一区二区| 一个色妞综合视频在线观看| 欧美一区二区在线看| 国产福利一区在线| 亚洲一二三专区| 精品国产人成亚洲区| 91视频观看免费| 久久精品久久综合| 18欧美亚洲精品| 日韩精品一区二区三区视频在线观看 | 亚洲午夜国产一区99re久久| 欧美一区午夜精品| 成人国产视频在线观看| 婷婷夜色潮精品综合在线| 久久久久久麻豆| 欧美午夜影院一区| 国产精品亚洲专一区二区三区| 一区av在线播放| 久久久99精品久久| 欧美视频你懂的| 国产91精品免费| 天堂成人免费av电影一区| 久久精品一区二区三区不卡牛牛 | 欧美mv日韩mv| 色天天综合久久久久综合片| 免费人成精品欧美精品| 亚洲女人的天堂| 亚洲精品一区二区三区精华液| 色综合久久99| 国产一区二区三区免费| 无码av免费一区二区三区试看| 国产精品嫩草影院com| 日韩手机在线导航| 欧美视频一区二区在线观看| 国产成人综合网| 久久99精品国产| 亚洲高清一区二区三区| 国产精品成人在线观看| 精品999在线播放| 制服丝袜亚洲色图| 在线精品视频免费观看| 99久久伊人久久99| 国产精品一区二区三区网站| 日本特黄久久久高潮| 一区二区三区在线视频观看58| 国产女人aaa级久久久级 | 精品99久久久久久| 337p亚洲精品色噜噜狠狠| 日本黄色一区二区| av不卡在线观看| 高清久久久久久| 国产一本一道久久香蕉| 男人的j进女人的j一区| 午夜精品久久久久久久99樱桃 | 不卡的电影网站| 国产激情偷乱视频一区二区三区| 日精品一区二区| 性做久久久久久免费观看欧美| 亚洲精品成a人| 亚洲欧洲中文日韩久久av乱码| 国产日韩三级在线| 久久久精品影视| 久久蜜桃av一区精品变态类天堂| 欧美xxxxx裸体时装秀| 欧美久久久久久久久| 欧美日本一区二区三区| 欧美视频中文字幕| 欧美日韩亚洲另类| 欧美日本一区二区|