ircmd_util.c
资源名称:8202s.rar [点击查看]
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:4k
源码类别:
DVD
开发平台:
C/C++
- // ============================================================================
- // Control flow
- // ============================================================================
- void invalid_key(void)
- {
- int id;
- int test_ready_ret;
- //we don't show any invalid_key when PROGRAM is active
- if (full_scrn & PROGRAM) return;
- if(play_state==VCD_STATE_IDLE)//zhongshan 20050121
- {
- test_ready_ret=atapi_p_test_unit_ready();
- if(test_ready_ret != ATAPI_NO_MEDIA)
- {
- OSD1000ISP_STATUS(OSDISP_ERR_DISC, OSDIR_GLOBAL);
- id=STR_OS_ERR_DISC;//nono 2-4-22 13:26 for fuss
- }else{
- OSD1000ISP_STATUS(OSDISP_NODISC, OSDIR_GLOBAL);
- id = STR_OS_NODISC;
- }
- #ifdef SHOW_SPECIAL_DISC_TYPE
- if(read_disc_state == 0x0f)
- id = STR_OS_ERR_DISC;
- #endif
- }
- else
- {
- OSD1000ISP_STATUS(OSDISP_INVAL, OSDIR_GLOBAL);
- id = STR_OS_NO;
- }
- #if defined( SDRAM_16Mb_Mode ) && !defined( SETUP_PROGRAM_IN_PLACE_UNDER_16M ) // 2004/12/27 yltseng
- if (prog_state==3)
- {
- prog_state=0;
- OSD1000ISP_STATUS(OSDISP_STOP, OSDIR_STOP);
- id = STR_OS_STOP;
- }
- #endif
- PrintOsdMsg(id,REGION1,1,0);
- }
- void chg2normal_play(UINT8 md,UINT8 realplay)
- {
- if (md&FAST2NORM)
- {
- if(adv_search_time)
- {
- if (adv_search_time<0) {
- //replace temp, Jeff 20020715
- //AudioSetStop();
- if (coding_mode_now==AUDIF_CODING_MODE_PCM) {
- AUDIF_Flush_Buffer();//2004AUDDRV AudioFlushBuffer();
- } else {
- AUDIF_Set_Stop();//2004AUDDRV AudioSetStop();
- }
- } else {
- AUDIF_Flush_Buffer();//2004AUDDRV AudioFlushBuffer();
- }
- adv_search_time =0;
- if (cd_type_loaded==CDROM) {
- AUDIF_Set_Continue();//2004AUDDRV AudioSetContinue();
- }
- }
- }
- if (md&PAUSE2NORM)
- {
- if(!Is_JPEG_STATE())
- if(play_state==VCD_STATE_PAUSE)
- {
- Continue();
- }
- }
- if (md&SLOW2NORM) {
- video_slow=0;
- avd_slow_state(video_slow);
- }
- if (realplay)
- {
- if(!Is_JPEG_STATE())
- {//terry,2002/7/18 08:36PM,avoid avd play cmd run many times
- avd_play_state();
- }
- AUDIF_Set_Continue();//2004AUDDRV AudioSetContinue();
- if(!user_mute)
- {
- AUDIF_Demute();//2004AUDDRV AudioDemute();
- if ( (cd_type_loaded!=CDROM) && mpeg_audio)
- {
- if( (play_state==VCD_STATE_FASTFORWARD)||(play_state==VCD_STATE_FASTBACKWARD) )
- {
- AUDIF_Set_VCDFF2PLAY();//2004AUDDRV AudioSetVCD_FF2PLAY();
- }
- }
- }
- if(realplay==REALPLAY)
- {
- extern void SetIDETimeOut(UINT16); //wanghaoying 2003-8-12 16:44 added
- OSD1000ISP_STATUS(OSDISP_PLAY, OSDIR_GLOBAL);
- PrintOsdMsg(STR_OS_PLAY,REGION1,1,0);
- play_state = VCD_STATE_NORMAL;
- SetIDETimeOut(PLAY_TMOUT);//printf("set srv timeout tm = %dn",PLAY_TMOUT);//terry,2003/7/17 11:17PM
- }
- }
- #ifdef IRCMD_DBG
- printf("play_st:%x search:%x slow:%xn", play_state, adv_search_time,video_slow);
- #endif
- }
- /*
- ** FUNCTION
- ** pre_slowmotion()
- **
- */
- UINT8 pre_slowmotion(void)
- {
- //printf("================= slow motion ==============n");
- if(audio_only||PE_DSI_novideo())
- {
- invalid_key();
- return 1;
- }
- chg2normal_play(FAST2NORM|PAUSE2NORM,TRANSFER);
- AUDIF_Set_Volume(0);//2004AUDDRV AudioSetVolume(0);
- AUDIF_Set_Pause();//2004AUDDRV AudioSetPause();
- play_state = VCD_STATE_SLOW;
- return 0;
- }
- //terry,move to ircmd_video,2003/8/20 09:04PM
- //setup_tv_out
- //search_ap_tv_out_id
- // ============================================================================
- // Audio Audio Audio Audio Audio
- // ============================================================================