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

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

?? av_play.c

?? ESS3890+SL原代碼(1*16內存)
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* Copyright 1996, ESS Technology, Inc.                                 *//* SCCSID @(#)av_play.c	4.67 03/16/05 *//* * $Log$ */#include <stdlib.h>#include <ctype.h>#include "vcxi.h"#include "av_play.h"#include "const.h"#include "buffer.h"#include "dsa.h"#include "display.h"#include "mpeg1vid.h"#include "tdm.h"#include "timedef.h"#include "util.h"#include "xport.h"#include "mpgaudio.h"#include "memmap.h"#include "filesys.h"#include "debug.h"#include "play.h"#include "cd.h"#include "low.h"#if defined(ABNORMAL_VCD ) || defined(ANTI_SHOCK)#include "pts.h"#include "vcd.h"#endif#ifdef ECHO#include "echo.h"#endif#ifdef EQUALIZER#include "eq.h"#endif#ifdef MP3#include "mp3.h"#endif#ifdef SERVO#include "servo.h"#endif#ifdef TWO_FIELDS_OSD#include "cg.h"#else#include "fsosd.h"#endif#ifdef JPEG_THUMBNAILextern int JPG_digest;extern int g_jpeg_SOI;extern int g_jpeg_filesize;#endif#ifdef CDG#include "cdg.h"#include "cd_text.h"#endif/*------------------------------------------------------------------------ * Debugging macros *------------------------------------------------------------------------*/#if 0int bpt;#define BREAKPOINT(x) {bpt=x;while(bpt) VCX_service();}#else#define BREAKPOINT(x) #endif#ifdef DEBUG_OSDextern int osdreg;#define CPRINTF(a,b) {osdreg+=3;if(osdreg>13)osdreg=1;debug_osd(a,b,osdreg);}#else#define CPRINTF(a,b)#endif/*------------------------------------------------------------------------  External Variables------------------------------------------------------------------------*/extern int play_sector_state;#ifdef WMA_DECextern int wma_seek_size,wma_smpl_num,wma_byterate,wma_freq;extern int play_item_begin_time;extern ushort sample_rate[];#endif/*------------------------------------------------------------------------  Function Prototypes------------------------------------------------------------------------*/static int play_speed_start();/*------------------------------------------------------------------------  Definitions------------------------------------------------------------------------*/#define VIDEO_DATA_TYPE			0#define AUDIO_DATA_TYPE			1#define TurnOffTDM system_reset/*------------------------------------------------------------------------  Local functions------------------------------------------------------------------------*/static void AV_near_track_end_init(uint);static int start_play_still(void);/*------------------------------------------------------------------------  Global Variables------------------------------------------------------------------------*/uint	AV_near_track_end_time; /* ~10 seconds before end of track */int	vcx_fast_speed_done;static int previous_sector;	/* stored the cd sector that will be used				   to start later.			*/static int skip_mmssff;     /* The skip time for FF/FR      */static int fast_speed_time_limit; /* the end time of FF/FR mode.	*/static int av_timeout;static int play_start_time;static int play_end_time;static int still_type;		/* e1 or e2 */static char data_type=0;		/* VIDEO or AUDIO */int video_state;	        /* state of av play state machine.	*/int cd_pause;		 /* 1 -> in pause mode.			*/static unsigned int	cdda_track_start_time;static int av_in_trick_mode=0;	/* for jumping errors in FF/FR *//*------------------------------------------------------------------------  Function:  Description: In some cases, ther servo will stop and we do not notice.               We have to avoid program hangs in the while loop.------------------------------------------------------------------------*/void turn_off_data(){    int time_out;    /* Set RISC stat bit so XPORT will before at the next SYNC */    mvd[xport_input_mode] = XPORT_input_mode | 0x4;        time_out = glbTimer + TWO_SECOND;    while (XPORT_active) {	if (glbTimer >= time_out) {	    /* force XPORT_active to 0 to get out the loop. */	    TDM_force_stop(1);	/* save stopCDtime */	}#ifdef ECHO	MIC_service();#endif	/* Don't need AUD_service() here...	 * we are stopping data stream(xport) 	 * and don't need to decode audio.	 */    }}#if defined(ABNORMAL_VCD) || defined(ANTI_SHOCK)static void mem_config_restore(int mode){    if (mode & TRACK_IS_ABVCD) {	ABV_start = VCD_ABV_start;	ABV_size = ABNORMAL_ABV_size;	ABV_end = ABV_start + ABV_size;	VBV_end = ISO_end;	VBV_size = ABNORMAL_VBV_size;	VBV_start = VBV_end - VBV_size;    } else#ifdef ANTI_SHOCK    if (mode & ESP_FOR_VCD) {	ABV_start = SHARE_start;	ABV_size = AS_VCD_ABV_size;	ABV_end = ABV_start + ABV_size;	VBV_start = ABV_end;	VBV_size = AS_VCD_VBV_size;	VBV_end = VBV_start + VBV_size;    } else#endif    {	VBV_ABV_default();    }    ABV_wrptr = ABV_rdptr = ABV_start;    VBV_wrptr = VBV_rdptr = VBV_start;}#endif#ifdef ABNORMAL_VCDstatic int sample_stream(int mmssff,uint *pts, uint *time){    int start_time;    clear_dec();     *pts = PTS_vid = 0;    endCDtime = adjCDtime(mmssff, 0x300, 1);    end_of_play = 0;    if (!fuzzyPlaySector(mmssff, 2324)) {        end_of_play = 1;        return (0);    } else {        start_time = glbTimer;        while (1) {            VCX_service();            if (PTS_vid != *pts) {                *pts = PTS_vid;                *time = currCDtime;                break;            }            else if (end_of_play || (currCDtime == endCDtime))                 return (0);            else if ((glbTimer - 240) > start_time)                return (0);        }    }    TDM_force_stop(0);    return (1);}int calc_bitrate(int start_mmssff, int end_mmssff){    uint track_length;    int sample1, sample2, sample3;     uint first_pts, second_pts;    uint firstCDtime, secondCDtime;    track_length = adjCDtime(end_mmssff, start_mmssff, 0);    if ((track_length >> 8) < MIN_TRACK_LEN_CALC) return (600);    sample1 = start_mmssff;    if ((track_length >> 16) >= 5) /* sector time >= 5 minutes */         sample2 = adjCDtime(start_mmssff, 0x0430<<8, 1); /* msf=4:30:00 */    else        sample2 = adjCDtime(end_mmssff, 0x0300, 0);    if (!(sample_stream(sample2, &second_pts, &secondCDtime))) {        sample2 = adjCDtime(end_mmssff, 0x0600, 0);        if (!(sample_stream(sample2, &second_pts, &secondCDtime)))            return (600);     }    if (!(sample_stream(sample1, &first_pts, &firstCDtime))) {        sample1 = adjCDtime(start_mmssff, 0x0300, 1);        if (!(sample_stream(sample1, &first_pts, &firstCDtime)))            return (600);     }    if ((second_pts == first_pts) || (secondCDtime == firstCDtime))        return(600);    mpeg_mux_rate = (second_pts - first_pts) /                      (msf2sectors(secondCDtime) - msf2sectors(firstCDtime));    return (mpeg_mux_rate);}#endif/*------------------------------------------------------------------------  Function: av_play_cdda_audio  Parameters:      start_mmssff :           the start time in BCD's minute, second and frame format.      end_mmssff:          the end time in BCD's minute, second and frame format.  Description:      This function will play a section of audio CD from start_mmssff      to end_mmssff. When this section is finish, the end_of_play      variable will be set to 1.------------------------------------------------------------------------*/int av_play_cdda_audio(int track_mmssff, int start_mmssff, int end_mmssff){#if (defined(CDG) && !defined(ANTI_SHOCK) && !defined(HOST_SLAVE))    if ((track_mmssff==start_mmssff) && (!repeat_a2b)) CDG_init(1);#endif    reset_video_normal_mode(0);    clear_dec();    /* Do this *after* clear_dec() */#ifdef ANTI_SHOCK    PLAY_set_2x_speed = 1; /* fill ABV faster at 2X speed */    /* Get extra space for ABV from VBV */    ABV_size = VCD_ABV_size+32*VBV_write;     ABV_end = ABV_start+ABV_size;    VBV_start = ABV_end;    VBV_size = VCD_VBV_size-32*VBV_write;     VBV_end = VBV_start+VBV_size;#endif    cdda_track_start_time = track_mmssff;    endCDtime = end_mmssff;    if (!playCDDA(track_mmssff, start_mmssff, end_mmssff)) {	end_of_play = 1;	CPRINTF("PLAYCDDA DEAD", start_mmssff);	BREAKPOINT(0);	return (0);    }        /* initialize "near track end" timer */    AV_near_track_end_init(adjCDtime(end_mmssff, track_mmssff, -1));#ifdef DAE_SPATIAL    if (DAE_mode_save > 0) {	/* restore DAE effects processing */	DAE_mode = DAE_mode_save;    }#endif/* Victor: just add a end_of_play reset here to be safe and in sync with other   operation like play_motion and etc. This should be redundente because play.c   will reset end_of_play when each playitem is played. And I already reset it    in dsa.c when end_of_play is set by TDM.c when we read PSD sectors. But I    still got a false end_of_play set by somebody once ?! */    end_of_play = 0;    play_start_time = start_mmssff;    data_type = AUDIO_DATA_TYPE;#ifdef ANTI_SHOCK    video_state = AUDIO_ESP; #else    video_state = AUDIO_NORMAL;#endif}/*------------------------------------------------------------------------  Function: av_play_motion_video  Parameters:      start_mmssff :           the start time in BCD's minute, second and frame format.      end_mmssff:          the end time in BCD's minute, second and frame format.  Description:      This function will play a section of motion video from start_mmssff      to end_mmssff. When this section is finish, the end_of_play      variable will be set to 1.------------------------------------------------------------------------*/int av_play_motion_video(int start_mmssff, int end_mmssff){    ushort *track_muxrate;    #ifdef ANTI_SHOCK    PLAY_set_2x_speed = 1; /* fill buffers quicker at start */#endif /* ANTI_SHOCK */#ifdef ABNORMAL_VCD    if ((vcx_bitstream_type == MPEG1_PS) && iso9660_file_cnt) {        track_muxrate = (ushort *)dram_cached(TRACK_MUXRATE_OFFSET);        if (track_muxrate[cur_track_number] == 0xffff) {            track_muxrate[cur_track_number] =  calc_bitrate(start_mmssff,                                                             end_mmssff);        }        mpeg_mux_rate = track_muxrate[cur_track_number];        if (mpeg_mux_rate >= (600 + MAX_RATE_DIFF)) {	    PLAY_set_2x_speed = 0; /* lower than normal..1X is enough */            abnormal_vcd |= (TRACK_IS_ABVCD | DISC_IS_ABVCD);        } else if (mpeg_mux_rate <= (600 - MAX_RATE_DIFF)) {	    PLAY_set_2x_speed = 1; /* higher than normal..need 2X */	                abnormal_vcd |= (TRACK_IS_ABVCD | DISC_IS_ABVCD);        } else {#ifdef ANTI_SHOCK	    PLAY_set_2x_speed = 1; /* fill buffers quicker at start */#else	    PLAY_set_2x_speed = 0; /* lower than normal..1X is enough */#endif /* ANTI_SHOCK */	    abnormal_vcd &= ~TRACK_IS_ABVCD; /* normal muxrate */	}		PLAY_adj_abvcd_ref_times(); /* adjust some reference times */    }#endif /* ABNORMAL_VCD */        /* set relative variables */    endCDtime = end_mmssff;    end_of_play = 0;    av_in_trick_mode = 0;        /* clear buffers and reset some variables */    reset_video_normal_mode(1);    clear_dec();    data_type = VIDEO_DATA_TYPE;    video_state = VIDEO_NORMAL;#if defined(ABNORMAL_VCD) || defined(ANTI_SHOCK)    if (CDinfo.type == CD_VCD) {        if (abnormal_vcd) {	    if (play_item_begin_time == start_mmssff) {		PTS_vid = 0; /* reset at track begin */	    }            video_state = VIDEO_ABNORMAL;        }    }#endif#ifdef MP3    if (vcx_bitstream_type == MP3_PS) {	video_state = MP3_NORMAL;    }#endif /* MP3 */#ifdef WMA_DEC    if (STREAM_type == WMA_ID) {	video_state = MP3_NORMAL;    	wma_seek_size =( msf2sectors(start_mmssff) -         	msf2sectors(play_item_begin_time) )<<11;    	if ( wma_byterate )            wma_smpl_num = wma_seek_size/wma_byterate * sample_rate[wma_freq];    }#endif /*WMA_DEC*/#ifdef JPEG_DEC    /*     * For jpeg pictures, by the time we see endCDtime, we won't see EOR.     * We'll force a flush to kick out all the data.     */      if (is_jpeg == 1) {         TDM_needs_flush = 1;         video_state = JPEG_NORMAL;    }#endif    if (!playSectors(start_mmssff, 0xe0, 2324)) {	end_of_play = 1;	CPRINTF("PLAYSECTORS DEAD", start_mmssff);	BREAKPOINT(0);	return (0);    }    /* initialize "near track end" time */    AV_near_track_end_init(adjCDtime(end_mmssff, play_item_begin_time, -1));#ifdef DAE_SPATIAL    if (DAE_mode_save > 0) {	/* restore DAE effects processing */	DAE_mode = DAE_mode_save;    }#endif    return (1);}#if defined (WMA_DEC) && defined(FAST_MODE_CONTROL)/* Required for FR across WMA tracks.. * WMA needs to parse header at beginning of the file. */int av_play_init_wma(int start_mmssff, int end_mmssff){    /* set relative variables */    previous_sector = endCDtime = end_mmssff;    end_of_play = 0;        /* clear buffers and reset some variables */    reset_video_normal_mode(1);    clear_dec();    data_type = VIDEO_DATA_TYPE;    video_state = VIDEO_INIT_STATE;    playSectors(start_mmssff, 0xe0, 2324);    return (1);}#endif /* WMA_DEC && FAST_MODE_CONTROL *//*------------------------------------------------------------------------  Function: av_play_still  Parameters:      start_mmssff :           the start time in BCD's minute, second and frame format.      end_mmssff:          the end time in BCD's minute, second and frame format.      type : value should be "0xe1" or "0xe2".  Description:      This function will play a section of still video from start_mmssff      to end_mmssff. When this section is finish, the end_of_play      variable will be set to 1.------------------------------------------------------------------------*/int av_play_still(int start_mmssff, int end_mmssff, int type){    /* store variables used later */    play_start_time = start_mmssff;    play_end_time = end_mmssff;    still_type = type;    end_of_play = 0;    /* clear buffers */    reset_video_normal_mode(1);    /* clear buffers */    clear_dec();    if (!start_play_still()){        TDM_hw_error = 1;        end_of_play = 1;    }    /*     * For still pictures, by the time we see endCDtime, if we have not     * see an EOR, we'll force a flush to kick out all the data.     */    TDM_needs_flush = 1;    return (1);}static int start_play_still(){    endCDtime = play_end_time & x00ffff00;    end_of_play = 0;    VID_frame_count = 0; /* for slide-show detection */    data_type = VIDEO_DATA_TYPE;    video_state = VIDEO_STILL;    /* reset decoder to reset mode */    return (playSectors(play_start_time & x00ffff00, still_type, 2324));}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久久久久久看片| 欧美视频一区二区在线观看| 日韩一区精品字幕| 免费日本视频一区| 精品国产乱码久久久久久免费| 国产高清久久久久| 亚洲一区二区五区| 麻豆精品一区二区综合av| 国产一区二区三区在线观看免费 | 国产一区二区三区| 亚洲国产成人在线| 中文字幕免费不卡| 欧美日韩一区二区在线观看 | 一区二区在线观看不卡| 精品免费日韩av| 欧美在线制服丝袜| 精品国产一区二区三区av性色| 99r国产精品| 国模套图日韩精品一区二区| 亚洲一区国产视频| 国产三级一区二区| 欧美视频一区二| 99天天综合性| www国产精品av| 欧美区一区二区三区| 国产成人免费在线观看不卡| 午夜国产不卡在线观看视频| 中文字幕永久在线不卡| 精品黑人一区二区三区久久| 精品视频一区二区三区免费| 成人动漫精品一区二区| 另类专区欧美蜜桃臀第一页| 亚洲综合视频网| 国产精品成人免费| 久久免费午夜影院| 欧美电影免费观看高清完整版在线 | 波多野结衣精品在线| 精品乱人伦一区二区三区| 99精品欧美一区二区蜜桃免费| 天天综合色天天| 亚洲欧美日韩中文字幕一区二区三区| xvideos.蜜桃一区二区| 欧美一区欧美二区| 91精品在线免费观看| 欧美三级电影网站| 日本精品裸体写真集在线观看| 欧美国产视频在线| 精品欧美久久久| 欧美欧美欧美欧美| 欧美日韩午夜在线视频| 精品视频1区2区3区| 在线观看亚洲精品视频| 色婷婷亚洲精品| 国产高清精品久久久久| 奇米在线7777在线精品 | 色老汉av一区二区三区| 91免费看`日韩一区二区| www.性欧美| 91美女蜜桃在线| 91麻豆蜜桃一区二区三区| 91精品国产91久久综合桃花| 91丨porny丨户外露出| 国产剧情一区二区| www久久精品| 国产日韩欧美一区二区三区综合 | 色哟哟欧美精品| 91视视频在线观看入口直接观看www | 欧美日韩国产高清一区二区| 欧美日韩一级二级三级| 91精品国产综合久久婷婷香蕉| 欧美一二区视频| 欧美视频第二页| 日韩美女视频一区二区在线观看| 久久日一线二线三线suv| 国产人久久人人人人爽| 中文字幕不卡在线观看| 亚洲男帅同性gay1069| 亚洲成人黄色影院| 捆绑变态av一区二区三区| 国产一区二区三区免费看| 成人国产一区二区三区精品| 91网站黄www| 欧美精品一级二级| 久久久久久久久岛国免费| 亚洲欧美一区二区在线观看| 亚洲欧美日韩一区二区三区在线观看| 亚洲日本一区二区三区| 亚洲男人电影天堂| 天堂久久久久va久久久久| 精品一二三四区| 91免费看片在线观看| 91精品国产91热久久久做人人| 久久久久九九视频| 亚洲综合在线五月| 免费成人在线影院| 成人免费精品视频| 91精品国产入口在线| 国产欧美一区二区三区在线看蜜臀| 中文字幕日本不卡| 日韩精品国产欧美| 国产成人精品影院| 欧美日韩国产成人在线91| 久久久午夜电影| 亚洲精品第一国产综合野| 久久精工是国产品牌吗| 91丨porny丨国产| 欧美大尺度电影在线| 综合色天天鬼久久鬼色| 激情综合一区二区三区| 欧美亚洲禁片免费| 国产日韩成人精品| 蜜臀av一区二区三区| 97成人超碰视| 久久久久久久久久电影| 天堂蜜桃一区二区三区| 欧美一区二区三区免费视频| 欧美经典一区二区| 婷婷丁香久久五月婷婷| 高清成人免费视频| 日韩美女主播在线视频一区二区三区| 国产欧美日韩另类视频免费观看| 中文欧美字幕免费| 另类人妖一区二区av| 色偷偷久久人人79超碰人人澡 | 99久久久久久99| 日韩精品一区二区三区四区| 夜夜嗨av一区二区三区| 国产91精品一区二区麻豆网站| 91视频在线观看| 国产片一区二区三区| 六月丁香婷婷久久| 欧美精品久久久久久久多人混战 | 欧美日韩高清在线| 亚洲天堂成人网| 国产91丝袜在线18| 久久久久久久久伊人| 免费精品99久久国产综合精品| 欧美视频在线观看一区| 亚洲精品第1页| 99r国产精品| 中文字幕一区二区三区精华液| 精品亚洲国内自在自线福利| 欧美一区二区三区精品| 亚洲va韩国va欧美va精品| 99国产精品久久久久| 国产精品午夜在线观看| 国产91精品露脸国语对白| 精品欧美一区二区久久| 免费看黄色91| 欧美大片免费久久精品三p | 国产一本一道久久香蕉| 精品免费一区二区三区| 美女尤物国产一区| 日韩一区二区免费在线观看| 亚洲综合999| 色国产综合视频| 亚洲伊人色欲综合网| 色天天综合久久久久综合片| 亚洲男人都懂的| 在线观看日韩精品| 亚洲国产综合视频在线观看| 欧美天堂一区二区三区| 亚洲国产美女搞黄色| 欧美久久高跟鞋激| 日本网站在线观看一区二区三区| 欧美日韩久久不卡| 视频在线观看一区二区三区| 91精品在线观看入口| 人人狠狠综合久久亚洲| 久久精品亚洲麻豆av一区二区 | 欧美日韩精品三区| 精品一二线国产| 亚洲日本va午夜在线影院| 91精品国产色综合久久| 成人丝袜18视频在线观看| 一区二区三区在线视频观看| 欧美一区二区三区公司| 99国内精品久久| 美女网站在线免费欧美精品| 中文字幕亚洲成人| 欧美一级在线观看| 99久久国产综合精品麻豆| 日本中文字幕一区二区有限公司| 2017欧美狠狠色| 欧美在线免费播放| 国产高清精品在线| 日本欧美在线观看| 日韩理论片中文av| 久久精品人人做人人综合| 精品视频一区三区九区| 成人av网站大全| 精品影视av免费| 亚洲va在线va天堂| 亚洲视频电影在线| 国产色一区二区| 91精品国产全国免费观看| 91久久精品一区二区二区| 国产精华液一区二区三区| 天使萌一区二区三区免费观看| 中文字幕中文字幕一区|