ircmd_util.c
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:4k
源码类别:

DVD

开发平台:

C/C++

  1. // ============================================================================
  2. // Control flow
  3. // ============================================================================
  4. void invalid_key(void)
  5. {
  6.     int id;
  7.     int test_ready_ret;
  8.     //we don't show any invalid_key when PROGRAM  is active
  9.     if (full_scrn & PROGRAM) return;
  10.             
  11. if(play_state==VCD_STATE_IDLE)//zhongshan 20050121
  12. {
  13.        test_ready_ret=atapi_p_test_unit_ready();
  14.              if(test_ready_ret != ATAPI_NO_MEDIA)
  15.              {
  16.                  OSD1000ISP_STATUS(OSDISP_ERR_DISC, OSDIR_GLOBAL);
  17.                   id=STR_OS_ERR_DISC;//nono 2-4-22 13:26 for fuss
  18.              }else{
  19.         OSD1000ISP_STATUS(OSDISP_NODISC, OSDIR_GLOBAL);
  20.         id = STR_OS_NODISC;
  21.              }
  22.         #ifdef SHOW_SPECIAL_DISC_TYPE
  23.         if(read_disc_state == 0x0f)
  24.           id = STR_OS_ERR_DISC;
  25.         #endif
  26.             
  27. }
  28. else
  29. {
  30.         OSD1000ISP_STATUS(OSDISP_INVAL, OSDIR_GLOBAL);
  31. id = STR_OS_NO;
  32. }
  33. #if defined( SDRAM_16Mb_Mode ) && !defined( SETUP_PROGRAM_IN_PLACE_UNDER_16M )  // 2004/12/27 yltseng
  34.     if (prog_state==3)
  35.     {
  36.         prog_state=0;
  37.         OSD1000ISP_STATUS(OSDISP_STOP, OSDIR_STOP);
  38.         id = STR_OS_STOP;
  39.     }
  40. #endif
  41. PrintOsdMsg(id,REGION1,1,0);
  42. }
  43. void chg2normal_play(UINT8 md,UINT8 realplay)
  44. {
  45. if (md&FAST2NORM)
  46.     {
  47. if(adv_search_time)
  48. {
  49.             if (adv_search_time<0) {
  50. //replace temp, Jeff 20020715
  51. //AudioSetStop();
  52. if (coding_mode_now==AUDIF_CODING_MODE_PCM) {
  53. AUDIF_Flush_Buffer();//2004AUDDRV AudioFlushBuffer();
  54. } else {
  55. AUDIF_Set_Stop();//2004AUDDRV AudioSetStop();
  56. }
  57. } else {
  58. AUDIF_Flush_Buffer();//2004AUDDRV AudioFlushBuffer();
  59. }
  60. adv_search_time =0;
  61. if (cd_type_loaded==CDROM) {
  62.                 AUDIF_Set_Continue();//2004AUDDRV AudioSetContinue();
  63.             }
  64. }
  65. }
  66.     if (md&PAUSE2NORM)
  67.     {
  68.      if(!Is_JPEG_STATE())           
  69.         if(play_state==VCD_STATE_PAUSE)
  70.         {
  71.             Continue();
  72.         }
  73.     }
  74.     if (md&SLOW2NORM) {
  75. video_slow=0;
  76. avd_slow_state(video_slow);
  77.     }
  78. if (realplay)
  79. {
  80. if(!Is_JPEG_STATE())           
  81. {//terry,2002/7/18 08:36PM,avoid avd play cmd run many times
  82. avd_play_state();       
  83. }
  84. AUDIF_Set_Continue();//2004AUDDRV AudioSetContinue();
  85. if(!user_mute)
  86. {
  87. AUDIF_Demute();//2004AUDDRV AudioDemute();
  88.             if ( (cd_type_loaded!=CDROM) && mpeg_audio)
  89. {
  90. if( (play_state==VCD_STATE_FASTFORWARD)||(play_state==VCD_STATE_FASTBACKWARD) )
  91. {
  92. AUDIF_Set_VCDFF2PLAY();//2004AUDDRV AudioSetVCD_FF2PLAY();
  93. }
  94. }
  95. }
  96. if(realplay==REALPLAY)
  97. {
  98.     extern void SetIDETimeOut(UINT16);      //wanghaoying 2003-8-12 16:44 added
  99.             OSD1000ISP_STATUS(OSDISP_PLAY, OSDIR_GLOBAL);
  100. PrintOsdMsg(STR_OS_PLAY,REGION1,1,0);
  101. play_state = VCD_STATE_NORMAL;
  102. SetIDETimeOut(PLAY_TMOUT);//printf("set srv timeout tm = %dn",PLAY_TMOUT);//terry,2003/7/17 11:17PM
  103. }
  104.     }
  105.     #ifdef IRCMD_DBG
  106.     printf("play_st:%x search:%x slow:%xn", play_state, adv_search_time,video_slow);
  107.     #endif
  108. }
  109. /*
  110. ** FUNCTION
  111. ** pre_slowmotion()
  112. **
  113. */
  114. UINT8 pre_slowmotion(void)
  115. {
  116. //printf("================= slow motion ==============n");
  117. if(audio_only||PE_DSI_novideo())
  118. {
  119. invalid_key();
  120. return 1;
  121. }
  122. chg2normal_play(FAST2NORM|PAUSE2NORM,TRANSFER);
  123. AUDIF_Set_Volume(0);//2004AUDDRV AudioSetVolume(0);
  124. AUDIF_Set_Pause();//2004AUDDRV AudioSetPause();
  125. play_state = VCD_STATE_SLOW;
  126. return 0;
  127. }
  128. //terry,move to ircmd_video,2003/8/20 09:04PM
  129. //setup_tv_out
  130. //search_ap_tv_out_id
  131. // ============================================================================
  132. // Audio  Audio  Audio  Audio  Audio
  133. // ============================================================================