ircmd.c
资源名称:8202s.rar [点击查看]
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:309k
源码类别:
DVD
开发平台:
C/C++
- /*************************************************************
- ** FILE
- ** ircmd.c
- **
- ** DESCRIPTION
- ** splitted from ir.c, now all the IR (or global) functions
- ** are implemented here.
- **
- ** Create: JJ
- ** Maintain: Kenny 2000/09/29
- ** Terry 2003.02.24 move file header to ircmd_h.h
- ** move util code to ircmd_util.c
- ** move amp. code to ircmd_amp.c
- **
- ****************************************************************/
- #include "ircmd_h.h"
- #include "gpio.h"
- #include "asf_if.h"
- #include "lbaif.h"
- #include "sinf.h"
- #include "timer.h"
- //#ifdef OP_UI
- //#include "menu_func.h"
- //#include "infobanner_func.h"
- //#include "infobanner_def.h"
- //#endif//
- #ifdef JPG_EFFECT
- #include "jpegeffect.h"
- #endif
- #ifdef USER_LOGO
- #include "userlogo.h"
- #endif
- #ifdef SDRAM_16Mb_Mode
- #include "memmap.h"
- #include "memmap0.h"
- #endif
- #ifdef SPHE8202_ALL_TYPE_CARD_WRITE
- extern BYTE card_browse_sign;//dingzhy 4-11-18 9:40
- #endif
- //dtb in 20030915
- #ifdef SUPPORT_MIDI
- #include "fsmidi.h"
- #ifdef SUPPORT_MIDI_MENU_SEL
- #include "fsMidiUI.h"
- #endif
- #endif
- #ifdef SUPPORT_MP4
- //#include "drm.h"
- #ifdef DIVX_DRM
- #include "DRM_UI.h"
- #endif
- #include "avi_if.h"
- #endif
- #ifdef SUPPORT_MULTI_PARTITION//liweihua 2004-11-2 20:45
- #include "playmode.h"
- #endif
- #ifdef DVB1000_OSD_MENU //Maoyong 2004-10-19 14:32
- #include "dvbmenu.h"
- #include "sp_dtv.h"
- #endif
- #ifdef VOL_LED//HIMAGE1251
- BYTE nLed_index=0;
- #endif
- #ifdef UPGRADE_TRAYOUT //joshua add 04-07-13
- extern int trayout_flag;
- #endif
- #ifdef ONLY_SOUND_FIELD_KEY//zhaoyanhua add 03-10-29 15:37
- #include "dsp3_if.h"
- #define MAX_PAGE_ITEM 4
- #define MAX_ITEM_SEL 11
- BYTE surround_type = 0;
- extern const UINT8 sound_item[MAX_PAGE_ITEM][MAX_ITEM_SEL];//include in sound.c
- #endif
- #ifdef ONLY_EQ_KEY//zhaoyanhua add 03-10-29 15:34
- #include "dsp3_if.h"
- #define MAX_PAGE_ITEM 4
- #define MAX_ITEM_SEL 11
- #define MAX_BAND 7
- #define MAX_MUSIC 7
- BYTE EQ_type = 0;
- extern const UINT8 sound_item[MAX_PAGE_ITEM][MAX_ITEM_SEL];//include in sound.c
- extern const UINT8 music_osd_set[MAX_MUSIC][MAX_BAND];
- extern void SettingEqLevel(BYTE *);
- extern void SettingEQType(BYTE type);
- void SetEQ(void);
- #endif
- #if 0//def CNTR_5SPK_VOLUME
- static int tVolumeL,tVolumeR; //wangfeng 2004-2-9 16:16
- #endif
- #ifdef MODIFY_OSD_SHOW_NEW_STYLE_WINDOW
- extern void osd_init_newstyle_window_NTSC(void);
- extern void osd_init_newstyle_window_PAL(void);
- #endif
- #ifdef IR_SWITCH_CD_USB_CF_OTHER //dingzhy 04-10-22
- EXTERN BYTE now_valid_type;
- #endif
- #ifdef SUPPORT_PROLOGIC_II//zhaoyanhua add 2004-2-11 13:51
- extern void setup_OffPrologic_II(void); //setup_tab.c
- extern int setup_IsPrologicOn();
- #endif// ifdef SUPPORT_PROLOGIC_II
- #ifdef AUDIO_2CH_5_1CH//zhaoyanhua add 03-10-29 15:30
- #define AUDIO_2CH 1
- #define AUDIO_5_1CH 2
- BYTE ChannelFlag = AUDIO_2CH;
- extern void AudioSet2chOutput(void);//setup_tab.c
- extern void AudioSet5_1chOutput(void);//setup_tab.c
- extern void AudioSetPrologic_IIOutput(void);//setup_tab.c
- extern int setup_IsSpkDownmixOff(void);
- extern int setup_IsSpkStereo(void);
- extern UINT8 setup_GetPrologicII(void);
- #endif
- #ifdef DIV_GOTO_DISPLAY//zhaoyanhua add 03-10-24 20:12
- BYTE SearchPage = 0;
- extern void ShowSearchPage(BYTE page,BYTE need_hi);
- #endif
- #ifdef HANYANG_LR_CHANGE_PAGE
- extern void FSGUI_File2DirArea(void);
- #endif
- #ifdef SETUP_ON_OPEN_VALID
- BYTE OpenFlag=0; //dingzhy for real open sign
- #endif
- #ifdef OFF_PROLIGIC_WHEN_TURN_KEY//zhaoyanhua add 2003-12-11 11:14
- extern UINT8 setup_GetPrologicII(void);
- #endif
- #ifdef TWO_KEY_SWITCH_TWO_SUBTITLE //added by wangwei,2004-9-29 13:47
- extern void sup_select_subtitles(int n);
- extern void sup_select_channel_2(int chn);
- int twoSubTTFlag = 0;
- int IDTWO = 0;
- #endif //TWO_KEY_SWITCH_TWO_SUBTITLE
- #ifdef DYNAMIC_SPECTRUM //fengjl 3-10-29 20:56
- extern BYTE band_onoff;
- #endif
- #ifdef NEW_PARENTAL_GUI//zhaoyanhua 2003-11-29 9:40
- BYTE one_key_pass_play = 0;
- #endif
- #ifdef ROTATE_NOT_ZOOM//zhaoyanhua 2003-12-9 16:38
- extern UINT8 Is_Rotate_State(void);
- #endif
- #if defined(SUPPORT_BASS_TREBLE)//xyy 2004-3-8
- extern void ddx_ircmd_BassAdjust(int updown);
- extern void ddx_ircmd_TrebleAdjust(int updown);
- #endif
- #ifdef JPEG_THUMBNAIL_MENU //Maoyong 2004-8-13 20:09
- extern BYTE ThunmnailChkValidPrevNext(BYTE rx);
- #endif
- #ifdef USER_MPEG_LOGO //maoyong 2004.02.20
- extern BYTE mpeg_logo_onoff;
- #endif
- #ifdef POLLING_10MS_SAVE_RESUME //Maoyong 2004.03.01
- #define DVD_RSM_WRITE_SIZE (sizeof(same_disc_vob11_pos) + sizeof(pDSV->rsm_info[0]) + sizeof(resumeMSF) )
- BYTE rsm_I2c_write_cnt = DVD_RSM_WRITE_SIZE;
- #endif
- #ifndef DVDRELEASE
- //#define IRCMD_DBG 1
- #endif
- #ifndef IRCMD_DBG
- #undef printf
- #undef print_block
- #define printf(f, a...) do {} while (0)
- #define print_block(x,y) do {} while (0)
- #endif
- #include "ircmd_util.c"
- #include "rsm_util.h"
- #ifdef SUPPORT_REP_READ //Maoyong 2004.06.07
- #include "read.h"
- #include "func.h"
- #endif
- #ifdef DYNAMIC_SPECTRUM //zhaoyanhua add 03-11-1 15:30
- void ClearShowSpectrum(void);
- #endif
- #ifdef NEWSTYLE_WINDOW
- #include "osd_arc.h"
- #endif
- #if defined(SUPPORT_CARD_STORAGE)||defined(SUPPORT_USB)||defined(SPHE8202_CARD_STORAGE)
- #include "cardfs.h"
- extern CARD_FILE cardFile;//liweihua 2004-4-5
- extern CARD_INFO cardP;
- #if defined(CF_CARD_WRITE) || defined(FAT_Write_UI)//|| defined(WRITE_USB)//liweihua mod 20031219
- BYTE Select_Media;
- BYTE pressnum_flag;
- extern void show_switch(BYTE Select_Media); //wuxiaofeng
- //extern void show_switch(void); //wuxiaofeng
- #endif
- #endif
- #ifdef FAT_FILE_MODE
- extern UINT16 fat_play_mode;
- extern BYTE mode_menu_id;
- #endif
- #ifdef SUPPORT_SPI
- #include "spi.h"
- #endif
- extern int setup_IsSpkDownmixOff(void);
- extern void osd_init_prog(void);
- extern void sound_init(void);
- extern void sound_init_2(void);//wanghaoying 20030910
- extern void run_save_total_sel(void);
- extern void run_set_variable(void);
- extern void run_set_variable(void);
- extern void set_default_value(void);
- extern void setup_SetPScan(void);
- extern void SetIDETimeOut(UINT); //wanghaoying 2003-8-12 16:08 to declaration
- extern void setup_eq_display(UINT8 val);
- extern void sound_set_EQ_again(void);//nono 4-7-22 18:09
- #ifdef NEWSTYLE_WINDOW
- extern void browse_DrawRightItem(void);
- extern void osd_draw_region_arc(ARC_REGION_LOC *loc_var,BYTE updown);
- extern void osd_init_newstyle_window(void);
- extern void exe_show_time(void);
- extern void osd_draw_rect(UINT32 xStart, UINT32 yStart, UINT32 xLen, UINT32 yLen, BYTE bkColor);
- extern void exit_browse_func(void);
- //zhaoyanhua add 2003-12-7 19:01
- extern void updateAudioLanguage(void);
- extern void updateSubtitle(void);
- extern void updateRepeatMode(void);
- extern void UpdateAngleInfo(void);
- #ifdef CLEAR_KEY_IN_WINDOW //Maoyong add 2004.02.18
- extern void browse_func_clear(void);
- #endif
- #endif
- #ifdef CD_PLAYER //liweihua add 2003-8-19 20:25
- extern void show_cdplayer(void);
- extern void osd_init_cdplayer(void);
- #endif
- #ifdef VIRTUAL_KEYBOARD //liweihua 2003-9-16
- extern void show_virtual_keyboard(void);
- extern void hl_keyboard_button(BYTE SelectID);
- extern void osd_draw_virtual_keyboard(int xStart, int yStart,BYTE r);
- #endif
- #ifdef USE_PROLOGIC_II_KEY
- extern BYTE prologic_val;//clead 2003-8-7
- extern set_prologic_val(BYTE prologic_mode);
- #endif
- #ifdef IR_KEY_SET_VIDEO_MODE
- extern void set_video_val(BYTE video_mode);
- #endif//IR_KEY_SET_VIDEO_MODE
- #ifdef CF_GPIO_CONTROL_COLOR
- BYTE vfd_color; //wangap 20031031
- #endif
- #if defined(DISPLAY_REMAIN_TIME) //shawn 0227
- int display_and_time=0;
- BYTE display_flag = 0;
- #endif
- #ifdef SUPPORT_MIDI
- extern int iMidiSpeed;
- #endif
- #ifdef DVD_SEQ_PLAY
- extern BYTE dvd_menu_play;//wanghaoying for warning msg//terry,2002/5/2 04:02PM,new dvd play mode
- #endif
- #ifdef DOUBLE_TITLE//susu add 2003-8-22 9:03
- extern void exe_double_title(void);
- extern void exit_double_title(void);
- #endif
- #ifdef SPHE1000
- extern BYTE from4189;
- extern BYTE support_dvb_flag;
- #endif
- #ifdef DVB_SETUP
- extern void SP_SetVolume(UINT8 volume);
- #endif
- #ifdef EASTWIN
- extern UINT8 bINVERTER_POWER , bAMP_IS_ON, bPOWER_ON_MUTE_EXE;
- #endif
- /*Here deleted by xyy 2004-8-5*/
- #if defined(NEXT_FORWARD_IN_A_KEY)||defined(NEW_NEXT_FORWARD_IN_A_KEY)
- extern int rep_ir_times;
- extern BYTE key_data_flag;
- #endif
- #ifdef SUPPORT_MP4
- #include "irconfig.h"
- int IsUserControlDisabledByTrickyPlay( UINT32 uiKey )
- { // 2004/10/07 yltseng
- if( ( GetCurrentFileType() == CDROM_MP4 ) && ( !AVI_SUPPORT_TRICKY_PLAY() ) &&
- ( ( play_state >= VCD_STATE_NORMAL ) && ( play_state <= VCD_STATE_SLOW ) ) )
- {
- UINT16 aInvalidKey[] = {
- IRC_BW_SLOW, IRC_AB, IRC_GOTO
- #ifdef TWO_FUN_IN_ONE_VFD_KEY
- IRC_VFD_NEXT, IRC_VFD_PREV,
- #endif
- };
- int i = 0;
- for( ; i <(int)(sizeof( aInvalidKey ) / sizeof( UINT16 )); i++ )
- {
- if( uiKey == aInvalidKey[i] )
- return 1;
- }
- }
- return 0;
- }
- #endif
- /*Marked by maoyong 2004-9-24 9:51
- //terry,2004/1/30 03:14PM
- void call_full_scrn_fun(IRCMDFUNC *fun)
- {
- UINT32 i = 0x01, j;
- for(j = 0; i < FULLOSD_MASK;)
- {
- #ifdef SUPPORT_FUNCTION_MENU
- if((full_scrn & SETUP_PLUS) || (setup_menu_plus_timer))
- {
- fun[2]();
- return;
- }
- else
- #endif //end #ifdef SUPPORT_FUNCTION_MENU
- if(full_scrn & i)
- {
- fun[j]();
- return;
- }
- j++;
- i <<= 1;
- }
- }
- */
- /*
- ** IRCMD
- */
- UINT32 ircmd_callback_check_generic(UINT32 func)
- {
- return func;
- }
- /*
- ** FUNCTION
- ** ircmd_post_func(UINT32 func)
- **
- ** DESCRIPTION
- ** post a system command.
- */
- //static void ircmd_post_func(UINT32 func)//kenny 2001/5/16 mark it
- void ircmd_post_func(UINT32 func)
- {
- SetIDETimeOut(SHORT_TMOUT);//printf("set srv timeout tm = %dn",SHORT_TMOUT);//terry,2003/7/17 11:17PM
- #ifdef DISP_REGION_BOTTOM// feeling ,these funcs would change the disp region
- if(func == ( (CMD_FUNC|CMD_FUNC_SELECT) )//these func would cause the display bottom to up, or up to bottom
- ||(func == (CMD_FUNC|CMD_FUNC_PLAY))
- ||(func == (CMD_FUNC|CMD_FUNC_MENU))
- ||(func == (CMD_FUNC|CMD_FUNC_STOP))
- ||(func == (CMD_FUNC|CMD_FUNC_RETURN)) )
- {
- /*if ((pFsJpeg->ControlArea == CNT_AREA_FILE) &&
- ((pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG)
- #ifdef SUPPORT_NESGAME
- || (pFsJpeg->gifsFuncBtn == FS_FUNC_GAME)
- #endif
- #ifdef SUPPORT_FILE_SYSTEM_MODE
- || (pFsJpeg->gifsFuncBtn == FS_FUNC_OTHER)
- #endif
- #ifdef SUPPORT_MIDI
- || (pFsJpeg->gifsFuncBtn==FS_FUNC_MIDI)
- #endif
- ))*/
- {
- if(t_disp)
- {
- osd_init();
- DispCookOSD0(1);
- }
- }
- }//end if(func == ( (CMD_FUNC|CMD_FUNC_SELECT) )
- #endif
- if (func)
- {
- if (ircmd_callback_check==NULL)
- ircmd_callback_check = ircmd_callback_check_generic;
- func = ircmd_callback_check(func);
- #ifdef SUPPORT_MIDI_MENU_SEL //dtb
- if(gIsMidiSelMenu) //(Is_MIDI_STATE())&&
- {
- //xlluo add for show invaild flag 04-5-9
- extern BYTE bIsShowInvalid;
- if(bIsShowInvalid==TRUE)
- {
- ir_select_number=0;
- bIsShowInvalid =0;
- invalid_key();
- show_dvd_err();
- }else if (bIsShowInvalid ==2)
- {//show nothing
- ir_osd_post_show =0;
- bIsShowInvalid =0;
- return;
- }
- // ;//null //ouyang 2004.07.31
- } else
- #endif
- if(func==0)
- {
- ir_select_number=0;
- invalid_key();
- show_dvd_err();
- }
- }
- if( (func)&&(!(func&0x20000)) )
- {
- if(cd_type_loaded==CDROM)
- e_msf=0;
- #ifdef SUPPORT_WMA
- #if defined(SUPPORT_CARD_STORAGE)||defined(SUPPORT_USB)||defined(SPHE8202_CARD_STORAGE)//liweihua 2004-9-7 11:27
- if((GetCurrentFileType() == CDROM_WMA) && (media_type == MEDIA_CARD))
- AVD_SetMediaTimeout();
- #endif
- if (GetCurrentFileType() != CDROM_WMA)
- #endif
- AVD_SetMediaTimeout();//terry,2001/6/8 03:15PM ,we wait kernel code finish
- #ifdef MONE_TIMEOUR_SRC
- printf("ircmd_post_func timeoutn");
- #endif
- if(play_state==VCD_STATE_PAUSE){ //Jeff 20011004
- chg2normal_play(PAUSE2NORM,TRANSFER);
- }
- if(!(func&0x10000))
- PostCommand(func);
- }
- SetIDETimeOut(PLAY_TMOUT);//printf("set srv timeout tm = %dn",PLAY_TMOUT);//terry,2003/7/17 11:17PM
- }
- //terry,2004/4/6 07:44PM
- //void ircmd_sub_picture(void)
- #include "ircmd_subtitle.c"
- #ifdef NEW_INPUT_MENU
- extern void input_str_clear_variable(void);
- #endif
- #ifdef CNTR_5SPK_VOLUME //linrc add 2004-10-11 11:02 -->when main volume change,other volume change too
- #ifdef CNTR_5SPK_TYPE_2 //but the other volume can change to big sound
- inline void Set_5SPK(void) //ESS is like this type
- {
- if(IS_AUDIF_CODING_MODE_LPCM || IS_AUDIF_CODING_MODE_DTS
- || IS_AUDIF_CODING_MODE_PCM || IS_AUDIF_CODING_MODE_WMA
- || IS_AUDIF_CODING_MODE_DTSCD)
- {
- AUDIF_Set_Volume(volume_5SPK[0]);//2004AUDDRV AudioSetVolume(volume_5SPK[0]);
- }
- else AUDIF_Set_Volume(15);//2004AUDDRV AudioSetVolume(15);
- }
- #endif
- #endif
- void ircmd_angle(void)
- {
- // printf("===================ircmd_angle=============n");
- #ifdef ANGLE_GOTO_IN_A_KEY
- if( (bIrSkipState1!=1) )//2004-5-5 15:16
- {
- bIrSkipState1 = 1;
- rep_ir_times = 0;
- bIrSkipCnt1 = 0;
- return;
- }
- else
- {
- bIrSkipState1 = 0;
- rep_ir_times = 0;
- bIrSkipCnt1 = 0;
- }
- #endif//NEXT_FORWARD_IN_A_KEY
- #if defined(DIVX_DRM) && !defined(DIVX_DRM_AES_ONLY)
- if( cd_type_loaded == CDROM )
- {
- if( ( play_state == VCD_STATE_MP3_FILELIST )&&(GetCurrentFileType()== CDROM_MP4) )
- {
- osd_divx_drm_display(1,0);
- return;
- }else
- {
- invalid_key();
- return;
- }
- }
- #endif
- UINT16 id;
- #ifdef USE_ANGLE_SWITCH_CHANNEL//xyy 2004-8-5
- /*huziqin 2004-4-29.set channel volume*/
- #ifdef SUPPORT_APOGEE_AMP
- #ifdef DOLBY_AMP_VOLUME_CTRL
- subvol_next_channel();
- return;
- #endif //DOLBY_AMP_VOLUME_CTRL
- #endif
- #endif
- #if defined(FAT_Write_UI)||defined(CF_CARD_WRITE)//||defined(WRITE_USB)//liweihua 2003-10-30 10:30
- if((cd_type_loaded==CDROM)&&(pFsJpeg->ControlArea == CNT_AREA_FILE))
- {
- if (full_scrn & PERIPHERAL)
- {
- #ifdef NEW_INPUT_MENU
- input_str_clear_variable();
- #endif
- full_scrn &= (~PERIPHERAL);
- osd_init();
- pressnum_flag=0;
- #ifdef SPHE8202_ALL_TYPE_CARD_WRITE
- card_browse_sign = 1; //dingzhy
- #endif
- }
- else
- {
- full_scrn |= PERIPHERAL;
- #if defined(SUPPORT_FILE_SYSTEM_MODE)||defined(SUPPORT_MP4) //sunzhh add 041124
- if(IsOtherStatePlayMode())
- ircmd_return();
- #endif
- #if defined(FAT_Write_UI)//sunzhh 20041126
- if ((pFsJpeg->gbfsSlide)&& (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG))
- {
- ircmd_return();
- FSChangeGraphMode();
- FS_Return2Menu();
- }
- #endif
- #if defined(STORAGE_WRITE_GUI)||defined(CARD_WRITE_GUI)
- if((((detect_type&USB_DEVICE)&&(detect_type&0x1E)) //||((detect_type&CF_CARD_DEVICE!=0)&&(detect_type&0x1C!=0)))&&(media_type == MEDIA_CD))
- #ifdef CARD_SETUP_TYPE_3
- ||((detect_type&CF_CARD_DEVICE)&&(detect_type&0x1C))
- #endif
- )&&(media_type != MEDIA_CARD))
- {
- show_mediaswitch();
- }
- else
- #endif
- show_switch(Select_Media);
- //Maoyong added for IR U/D/L/R/Sel proc func setting 2004-9-24 9:54
- SetFullscrnCmdFuncPtr( switch_up, switch_down, switch_left,
- switch_right, switch_select);
- }
- return;
- }
- #endif
- /*
- #if defined(ADJUSTING_ACTION_VALID_RIGHT_NOW)
- #ifdef NEWSTYLE_WINDOW
- if ( (full_scrn&MESSAGE) && (action_click==2) ) // alan, 2003/8/28 05:32PM
- action_click = 0;
- else
- #endif
- action_click = 1; //Jeff 20030506
- #endif
- */
- #if defined(ADJUSTING_ACTION_VALID_RIGHT_NOW)
- #ifdef NEWSTYLE_WINDOW
- if ( (full_scrn&MESSAGE) && (action_click==2) )
- action_click = 0;
- else
- #endif
- action_click = 1; //Jeff 20030506
- #else
- #ifdef NEWSTYLE_WINDOW
- if ( (full_scrn&MESSAGE) && (action_click==2) ) // alan, 2003/8/28 05:32PM
- action_click = 0;
- #endif
- #endif
- #ifdef NEW_SEARCH_OSD //yw 021007
- if(key_up_down==0)
- id=Angle_Chg(action_click,-1); //Jeff 20021008
- else
- #endif
- id=Angle_Chg(action_click,1);
- if(id)
- {
- //wanghaoying marked 2004-7-13 10:39, for they are the same
- //#if defined(MUSTEK_ESS_DVD)||defined(GBM_DVD)
- OSD1000ISP_STATUS(Angle_Chg(0,1), OSDIR_ANGLE);
- PrintOsdMsg(STR_OS_ANGLE|(0x0a<<OSDSTR_ID_TOTL_BIT),REGION1,1|(((Angle_Chg(0,1)-1)<<8)),4);
- //#else
- // PrintOsdMsg(STR_OS_ANGLE|(0x0a<<OSDSTR_ID_TOTL_BIT),REGION1,1|(((Angle_Chg(0,1)-1)<<8)),4);
- //#endif
- }
- else {
- #ifdef NEWSTYLE_WINDOW
- if(full_scrn&MESSAGE)//xyy 2003-7-29 15:08
- psprintf(linebuf,"%s",_OsdMessegeFont1[osd_font_mode][STR_OS_NONE]);
- else
- #endif
- invalid_key();
- }
- #ifdef NEWSTYLE_WINDOW
- if(full_scrn&MESSAGE)//xyy 2003-7-29 15:08
- UpdateAngleInfo();
- #endif //not apogee amplifier
- }
- #ifdef USE_PROLOGIC_II_KEY //clead 2003-8-7
- void ircmd_prologic(void)
- {
- UINT8 id=0;
- AUDIF_Set_Volume(0);//2004AUDDRV AudioSetVolume(0); // cmhuang, 2003/8/28 11:58PM
- #ifndef ADJUSTING_ACTION_VALID_RIGHT_NOW // alan, 2003/8/27 11:36AM
- if(action_click)
- #endif
- prologic_val++;
- if(prologic_val>2)
- prologic_val=0;
- switch(prologic_val)
- {
- case 0:
- id=STR_OS_PL_MOVIE;
- break;
- case 1:
- id=STR_OS_PL_MUSIC;
- break;
- case 2:
- id=STR_OS_OFF;
- break;
- }
- OSD1000ISP_STATUS(OSDISP_IGNORE, OSDIR_GLOBAL);
- PrintOsdMsg(STR_OS_PROLOGIC|(id<<OSDSTR_ID_TOTL_BIT),REGION1,1,4);
- set_prologic_val(prologic_val);
- AUDIF_Demute();//2004AUDDRV AudioDemute(); // cmhuang, 2003/8/28 11:58PM
- }
- #endif
- #ifdef IR_KEY_SET_VIDEO_MODE
- #ifndef SET_4_VIDEO_MODE
- void ircmd_set_video_mode(void)
- {
- UINT8 id=0;
- ReadFromI2c(0xa0, VIDEO_MODE_I2C_ADDRESS,(BYTE *)&video_mode_val,1);//CLEAD_VIDEO_MODE
- switch(video_mode_val)
- {
- case 0:
- id=STR_OS_DEFAULT_SETUP;
- break;
- case 1:
- id=STR_OS_STANDARD;
- break;
- case 2:
- id=STR_OS_LIVELY;
- break;
- case 3:
- id=STR_OS_SHOWPLACE;
- break;
- case 4:
- id=STR_OS_BRIGHTNESS;
- break;
- case 5:
- id=STR_OS_MILD;
- break;
- case 6:
- id=STR_OS_RESUME;
- break;
- }
- OSD1000ISP_STATUS(OSDISP_IGNORE, OSDIR_GLOBAL);
- PrintOsdMsg(id,REGION1,1,0);
- set_video_val(video_mode_val);
- #ifndef ADJUSTING_ACTION_VALID_RIGHT_NOW
- if(action_click)
- #endif//ADJUSTING_ACTION_VALID_RIGHT_NOW
- video_mode_val++;
- if(video_mode_val>6) video_mode_val=0;
- WriteToI2c(0xa0, VIDEO_MODE_I2C_ADDRESS,(BYTE *)&video_mode_val,1);
- }
- #else//#ifndef SET_4_VIDEO_MODE
- void ircmd_set_video_mode(void)
- {
- UINT8 id=0;
- ReadFromI2c(0xa0, VIDEO_MODE_I2C_ADDRESS,(BYTE *)&video_mode_val,1);//CLEAD_VIDEO_MODE
- switch(video_mode_val)
- {
- #if 0
- case 0:
- id=STR_OS_DEFAULT_SETUP;
- break;
- #endif
- case 0:
- id=STR_OS_STANDARD;
- break;
- case 1:
- id=STR_OS_DYNAMIC;//STR_OS_LIVELY;
- break;
- #if 0
- case 3:
- id=STR_OS_SHOWPLACE;
- break;
- case 4:
- id=STR_OS_BRIGHTNESS;
- break;
- #endif
- case 2:
- id=STR_OS_MILD;
- break;
- case 3:
- id=STR_OS_MEMORY;//STR_OS_RESUME;
- break;
- }
- OSD1000ISP_STATUS(OSDISP_IGNORE, OSDIR_GLOBAL);
- PrintOsdMsg(id,REGION1,1,0);
- set_video_val(video_mode_val);
- #ifndef ADJUSTING_ACTION_VALID_RIGHT_NOW
- if(action_click)
- #endif//ADJUSTING_ACTION_VALID_RIGHT_NOW
- video_mode_val++;
- if(video_mode_val>3) video_mode_val=0;
- WriteToI2c(0xa0, VIDEO_MODE_I2C_ADDRESS,(BYTE *)&video_mode_val,1);
- }
- #endif//#ifndef SET_4_VIDEO_MODE
- #endif//#ifdef IR_KEY_SET_VIDEO_MODE
- //void ircmd_audio_language(void);
- #include "ircmd_audio.c"
- //
- #ifdef USER_MPEG_LOGO
- //#include "..\setup\setup_page.h"//20040217
- void ircmd_mpeg_logo(void)
- {
- #ifdef SUPPORT_MIDI_MENU_SEL //ouyang add for not ircmd_mpeg_logo in midi2004-10-13 15:16
- if (Is_MIDI_STATE())
- {
- invalid_key();
- return;
- }
- #endif
- #ifdef JIEKE_MIDI_STATE //ouyang add for jieke state 2005-1-6 9:43
- if((system_state==SYSTEM_NODISC)||(system_state==SYSTEM_OPEN))
- {
- invalid_key();
- return;
- }
- #endif
- //extern UINT8 setup_sel[SysNextPage][MPEG_LOGO_ITEM];//Item number
- // extern UINT8 setup_sel[7][8]; // alan, 2003/9/16 05:03PM
- // extern BYTE mpeg_logo_onoff;
- //nono mark It can add in inv_tbl_nintaus.h 2004-3-8 20:36
- #if 0//def MENU_CAPTURE_LOGO_INVALID //Maoyong 2004.02.20
- if(is_menu()){
- invalid_key();
- return;
- }
- #endif
- #ifdef JIEKE_DVD//wangfeng 2003-12-16 16:53
- if(setup_GetMPEGLogoItem()==2){
- // if(setup_sel[7][2]==2){
- invalid_key();
- return;
- }
- if((full_scrn&SETUP)||(full_scrn&PROGRAM)){
- //invalid_key();
- return;
- }
- #endif
- counter_down = 100;//terry,2003/9/12 03:55PM
- if(pFsJpeg->gifsState == FS_STATE_JPEG)
- {
- #if 0//def STOP_LOADER//nono 3-12-4 13:35
- abort_play();
- delay_srv_10ms(100);//nono 3-12-4 13:35
- #endif//#ifdef STOP_LOADER//terry,2003/8/23 08:58PM
- OSD1000ISP_STATUS(OSDISP_SAVELOGO, OSDIR_GLOBAL);
- psprintf(RegionValStr[REGION2], "");//wangfeng 2003/12/12
- PrintOsdMsg(STR_OS_SAVELOGO, REGION2, 1, 1);
- Save_Mpeg_Logo();
- printf("Save logo...n");
- }
- else
- {
- watchdog_onoff(0); // alan, 2003/9/23 03:05PM
- run_pause_setting();
- OSD1000ISP_STATUS(OSDISP_SAVELOGO, OSDIR_GLOBAL);
- // psprintf(RegionValStr[REGION2], "SAVING LOGO..."); // alan, 2003/9/22 02:13PM
- psprintf(RegionValStr[REGION2], "");//wangfeng 2003/12/12
- PrintOsdMsg(STR_OS_SAVELOGO, REGION2, 1, 1);
- #if 0//def STOP_LOADER//nono 3-12-4 13:32
- abort_play();
- #endif//#ifdef STOP_LOADER//terry,2003/8/23 08:58PM
- //delay(2500);
- delay_srv_10ms(250);//nono 3-12-4 13:32
- LoadModual(MODUAL_CDROM);
- Save_Mpeg_Logo();
- delay_srv_10ms(100);//terry,2003/9/12 04:33PM
- ircmd_play();
- }
- setup_SetMPEGLogo();
- //exe_setup_function(STR_OS_SELECT_LOGO,STR_OS_DEFAULT_SETUP,0); // alan, 2003/9/16 05:03PM
- // exe_setup_function(STR_OS_SELECT_LOGO,STR_OS_MPEG_LOGO,0); //NONO 2004-2-17 17:02
- //setup_sel[7][2]=3;
- //SETUP_MPEG_LOGO=3;//nono 2004-2-17 17:02
- // setup_sel[SysNextPage][MPEG_LOGO_ITEM]=3;
- // run_save_sel_cmd(SysNextPage, MPEG_LOGO_ITEM);//nono 2004-2-17 17:02
- counter_down = 10;//terry,2003/9/12 03:55PM
- }
- #endif
- //
- /***********************************************/
- /* Kenny add it for selection key */
- /* */
- /***********************************************/
- void ircmd_select(void)
- {
- #ifdef FILE_MODE_WRITE //lijd 2005-1-5 19:22
- if(pFsJpeg->gifsState == FS_STATE_MEDIA)
- {
- FileModeGUI_select();
- return;
- }
- #endif
- #ifdef SUPPORT_MIDIDISK_TITLE
- if (bIsPlayMidiTitle)//xlluo for midi title
- {
- invalid_key();
- return;
- }
- #endif
- #ifdef MOVE_HIGH_LIGHT_IN_PROG_MODE
- if((!full_scrn)&&(cd_type_loaded== CDROM)){ //wsf 2004-7-20 14:55 changed for cancel program when select other ,just in CDROM DISC
- if(!Is_OTHER_STATE()){
- prog_cnt=0;
- prog_func_off();
- prog_func_clear();
- }
- }
- #endif
- #ifdef PROGRAM_SHOW_DISPLAY //dingzhy
- if ((full_scrn & PROGRAM)&&(t_disp))
- DispFadeOut();
- #endif
- #ifdef CARD_VCD_DISPLAY_GOTO_FIRST_TIME_PAGE //liumzh 2004-9-4 2:24
- if((pFsJpeg->gifsFuncBtn == FS_FUNC_MP3)&&(media_type==MEDIA_CARD))
- {
- remain = 0;
- }
- #endif
- #ifdef IRCMD_DBG
- printf("=================================ircmd_select========================n");
- #endif
- #ifdef SUPPORT_MULTI_PARTITION//liweihua mod 2004-11-2 21:46
- if((pFsJpeg->gifsState == FS_STATE_HDD)
- #ifdef FAT_FILE_MODE
- ||(pFsJpeg->gifsState == FS_STATE_MODE)
- ||(fat_play_mode == 1)
- #endif
- )
- {
- HDDCard_select();
- return;
- }
- #endif
- #ifndef IR_10_PLUS
- //printf("now_num_ns:%xn",now_num_ns);
- if(now_num_ns)
- {
- ir_num_select(ir_select_number);
- }else
- #endif
- //#ifdef USER_MPEG_LOGO
- // if(pFsJpeg->gifsState == FS_STATE_JPEG)
- // {
- // Save_Mpeg_Logo();
- // printf("Save logo...n");
- // return;
- // }
- //#endif
- #ifdef SUPPORT_FUNCTION_MENU
- if(full_scrn || setup_menu_plus_timer)
- #else
- if(full_scrn)
- #endif //end #ifdef SUPPORT_FUNCTION_MENU
- {
- //call_full_scrn_fun((IRCMDFUNC *)ircmd_select_table);
- ircmd_full_scrn_select(); //Maoyong marked above line and chg 2004-9-24 11:02
- //terry,2002/6/17 11:06PM
- //panasonic test disc, title 8 ,hl select on pasue stae
- //prohibit it!!
- }
- else if( (HL_exist)&&(!is_dvd_prohibit_key())&&(play_state!=VCD_STATE_PAUSE) )
- {//terry,2002/5/22 07:10PM,
- ircmd_post_func(CMD_FUNC|CMD_FUNC_SELECT);
- //3-12-9 19:04 NONO MARKED.uopdate dsp code.
- //setup_SetDTSDOWNMIXConfig();//NONO force set downmix 2003-11-24 14:23
- //terry,2002/6/3 10:38AM
- //bug:Press select 2nd times quickly on Panasonic's menu
- //Sol:Waiting for new vobu data
- if(IsAVDMediaTimeout())
- HL_exist=0;
- } else if ( cd_type_loaded == CDROM ) //Jeff 20010802
- {
- if( play_state == VCD_STATE_PAUSE )//nono 2003-9-12 10:07
- {
- #ifdef SUPPORT_MIDI //ouyang 2004-8-16 11:00 first enter "pause" then "select",lyric stop
- if((midiState == MIDI_STATE_PAYLOAD)||(gIsMidiSelMenu))
- ircmd_play();
- #endif
- chg2normal_play( PAUSE2NORM, REALPLAY );
- }
- #ifdef ZOOM_DIRECT_STOP_SLIDE //wanghaoying 2003-08-25 21:56
- else if(Is_JPEG_PLAY_STATE())
- {
- jpg_slide_time = JPEG_SLIDE_TIME;
- /*
- // marked by Robert 031021.
- if(vpp_zoom!=0)
- {
- vpp_zoom = 0;
- show_zoom(1);
- }
- */
- ircmd_post_func(CMD_FUNC|CMD_FUNC_PLAY);
- }
- #endif // 2004/04/16 yltseng, in order to prevent showing "Invalid Key" when Pause -> Select
- else
- {
- #ifdef EASTWIN_PORTABLE_DVD
- if( (cd_type_loaded==CDROM )&&( Is_MP3_STATE()) )//tulijuan040907 from other states back not FF/FR
- {
- adv_search_time = 0;
- play_state = VCD_STATE_NORMAL;
- }
- #endif
- ircmd_post_func(CMD_FUNC|CMD_FUNC_SELECT); //Jeff 20010814
- }
- }else if( psd_state==(PSD_SEL_LIST|PSD_PLAY_SEG) )
- {
- #ifdef CONTINUOUS_NUM_KEY_SELECT//Jack added 04/11/13
- ircmd_post_func(CMD_SELECT | (1));
- #else
- ircmd_1();
- #endif
- }else if( (play_state==VCD_STATE_PREVIEW) ||(play_state==VCD_STATE_9FRAMES) )
- {
- ircmd_play();
- }else if( (cd_type_loaded==CDDVD)&& (play_state!=VCD_STATE_STOP)&&still_timer )
- {
- AVD_SetMediaTimeout();
- timeout_playback=0;
- #ifdef VALID_SELECT_IN_SOME_MODES
- }else if((play_state==VCD_STATE_SLOW)||(play_state==VCD_STATE_PAUSE)||
- (play_state==VCD_STATE_FASTBACKWARD)||(play_state==VCD_STATE_FASTFORWARD)) //alex, Linkconcept. 20030219
- {
- ircmd_play();
- }else if(play_state==VCD_STATE_STOP) //alex, Linkconcept. 20030219
- {
- ircmd_resume();
- #endif
- }
- else
- //#ifndef USER_MPEG_LOGO
- invalid_key();
- //#else
- // {
- //
- // run_pause_setting();
- // LoadModual(MODUAL_CDROM);
- // Save_Mpeg_Logo();
- // ircmd_play();
- // }
- //#endif
- /* alan marked 02-05-13 */
- //if( (RegionOnOff[1][2]==STR_OS_NO)&&(timeout_osd[1])&&IsAVDMediaTimeout() )
- //{//terry,cls invalid osd msg , 0511
- // timeout_osd[1]=1;
- //}
- }
- void ircmd_title_menu(void)
- {
- #ifdef SUPPORT_MIDI_MENU_SEL//xlluo for midi title
- if (Is_MIDI_STATE())
- {
- invalid_key();
- return;
- }
- #endif
- #ifdef SUPPORT_MIDIDISK_TITLE
- if (bIsPlayMidiTitle)//xlluo for midi title
- {
- invalid_key();
- return;
- }
- #endif
- #ifdef TITLE_PBC_IN_ONE_KEY //wanghaoying 2003-8-28 2:36 added
- if(cd_type_loaded!=CDDVD)
- {
- ircmd_playmode_toggle();
- return;
- }
- #endif
- #if defined(USE_TITLEMENU_TO_JPG_RETURN)
- #ifdef SUPPORT_FILE_SYSTEM_MODE // nono 20030807
- if( (Is_MP3_STATE())||(Is_OTHER_STATE()) )
- #else
- if(Is_MP3_STATE())
- #endif
- {
- invalid_key();
- return;
- }
- if(pFsJpeg->gifsState == FS_STATE_JPEG||Is_JPEG_STATE())
- {
- ircmd_return();
- }
- if(Is_JPEG_STATE())
- return;
- #endif//USE_TITLEMENU_TO_JPG_RETURN
- #if defined(JPG_EFFECT)&&defined(USE_TITLE_KEY_TO_CALL_JPGEFFECT_HELP)&&defined(CALL_JPGEFFECT_HELP)
- // jpeg_use_key_to_call_help();
- #ifdef SUPPORT_FILE_SYSTEM_MODE // nono 20030807
- if( (Is_MP3_STATE())||(Is_OTHER_STATE()) )
- #else
- if(Is_MP3_STATE())
- #endif
- {
- invalid_key();
- return;
- }
- #ifdef SUPPORT_GIF//when play GIF pic, cannot display "USE_TITLE_KEY_TO_CALL_JPGEFFECT_HELP "effect ,suqiaoli add 2004-2-27
- if( GetCurrentFileType() == CDROM_GIF)
- {
- invalid_key();
- return;
- }
- #endif
- if(pFsJpeg->gifsState == FS_STATE_JPEG||Is_JPEG_STATE())
- {
- if (pFsJpeg->gbfsSlide == 1)
- return;
- Jpg_Show_Usage_Flag=1;
- //ircmd_post_func(CMD_FUNC | CMD_FUNC_PREVIEW);
- Jpg_Show_Usage();
- return;
- }
- if(Is_JPEG_STATE())
- return;
- #endif
- #ifdef JPG_LOGO // 2004/10/07 yltseng
- if(Is_JPEG_STATE())
- {
- Fetch_Jpg_Logo();
- return;
- }
- #endif
- #ifdef SUPPORT_MP4 //sunzhh add 2004-9-10
- if (GetCurrentFileType() == CDROM_MP4)
- {
- invalid_key();
- return;
- }
- #endif
- #if defined(JIEKE_DVD) && defined(DVD_SEQ_PLAY)//add by wangfeng 2003-11-28 18:01
- if((dvd_menu_play==0)&&(cd_type_loaded==CDDVD)){
- invalid_key();
- }
- else
- #endif
- #ifdef USE_TITLE_RESUME//2004-6-2 22:48
- if(is_menu()==1 && cd_type_loaded==CDDVD )
- {
- ircmd_post_func(CMD_FUNC | CMD_FUNC_RESUME);
- return;
- }
- else
- #endif//USE_TITLE_RESUME
- {
- OSD1000ISP_STATUS(OSDISP_TITLE, OSDIR_TITLE);
- PrintOsdMsg(STR_OS_TITLE,REGION1,1,0);
- ircmd_post_func(CMD_FUNC | CMD_FUNC_TITLE);
- #ifdef INVALID_ZOOM_IN_DVD_MENU//XLJ2004-3-26
- //cancel zoom when return to short film in DVD menu by pressing title key. heqiang, 2004-4-23 9:52
- ircmd_cancel(C_SHOW | C_PLAY | C_ZOOM);
- #endif//INVALID_ZOOM_IN_DVD_MENU
- }
- #if 1//def FUSS_DVD
- if(RegionOnOff[REGION1][2]==STR_OS_TITLE)
- {
- #ifdef IRCMD_DBG
- printf("rep canceln");
- #endif
- cancel_rep();
- }
- #endif
- #ifdef EASTWIN
- #if defined(SUPPORT_CARD_STORAGE) || defined(SUPPORT_USB)||defined(SPHE8202_CARD_STORAGE)//liweihua add 20040129
- if((media_type != MEDIA_CARD)&&(cd_type_loaded!=CDDVD ))//tulijuan040909
- ircmd_9frames();
- #else
- ircmd_9frames();//tulijuan
- #endif
- #endif
- }
- #if defined(TAS3001_AMP)||defined(NO_AMP_ONLY_TUNER)
- void ircmd_clear(void)
- {
- //dvd-6-0 con1 pin2 ddxcs (ca720 pin 112 gpio22 )set high for power off
- ircmd_power();//2002 0918
- // regs0->gpio_sel|=(3<<0);
- regs0->gpio_out[22/16]|=(1<<(22%16));
- // regs0->gpio_oe[22/16]|=(1<<(22%16));
- }
- #elif defined(USE_CLEAR_KEY_AS_ONLY_P_SCAN) //gerry,2004-1-30 20:02
- void ircmd_clear(void)
- {
- // printf("-----------P_SCAN---n");
- /*
- //tv_out_id = P_SCAN;
- //if(tv_out_id== P_SCAN)
- setup_tv_out(TV_SVIDEO);
- //else
- setup_tv_out(P_SCAN);
- //setup_tv_out(P_SCAN);
- setup_SetPScan();
- */
- extern UINT8 ap_tv_out_id;
- extern const UINT8 tv_out_map[MODE_MAX_PSCAN];
- if(full_scrn&SETUP)
- return;
- if(MODE_MAX_PSCAN==0x02)
- {
- ap_tv_out_id=P_SCAN-1;
- }
- else
- {
- ap_tv_out_id=P_SCAN;
- }
- if (ap_tv_out_id>=MODE_MAX_PSCAN) ap_tv_out_id=0;
- tv_out_id=tv_out_map[ap_tv_out_id];
- setup_tv_out(tv_out_id);
- setup_SetPScan();
- PrintOsdMsg(STR_OS_P_SCAN_YUV, REGION1, 1, 0);
- }
- #else//#elif defined(USE_CLEAR_KEY_AS_ONLY_P_SAN) //gerry,2004-1-30 20:02
- void ircmd_clear(void)
- {
- extern UINT8 bMouseDown; //xlluo add for midi 2004.09.24
- #ifdef IRCMD_DBG
- printf("================= clear =================n");
- #endif
- if(!full_scrn)
- {
- if(ir_select_number)
- {
- ir_select_number=0;
- osd_tog_region(REGION1, OSD_OFF);
- }else
- #ifdef SUPPORT_MIDI//axel for seprate clear function from UP/0 keys 2004/9/4
- if(gIsMidiSelMenu)
- {
- if (!bMouseDown)
- {
- if (MenuState >= MENU_MULTI_INDEX_SEL)
- MultiSel_DelCurSong();
- else
- MidiUI_Sel_Clear_OSD();
- }
- #ifdef SUPPORT_MIDIUI_IME
- if(MenuState==MENU_MULTI_INDEX_SEL)
- Ime_RefreshFirstPage(0);
- #endif//SUPPORT_MIDIUI_IME
- }else
- #endif//SUPPORT_MIDI
- {
- invalid_key();
- }
- return;
- }
- #ifdef CLEAR_KEY_QUIT_CUST_SETUP // linrc 2004-6-10 21:40
- if((full_scrn&CUSTM)||(full_scrn&SETUP))
- {
- ExitSetupPage(1);
- }
- #endif
- #ifdef SUPPORT_BOOK
- if(full_scrn&MARK)
- {
- book_func_clear();
- return;
- }
- else
- #endif
- if(full_scrn&GOTO)
- {
- search_func_clear();
- return;
- }else if(full_scrn&PROGRAM)
- {
- // #ifdef OP_UI//zhaoyanhua add 2004-4-12 15:51
- // prog_func_clear();
- // #else
- prog_func_input(11); //clear
- // #endif
- }
- else if(full_scrn&SETUP)
- {
- #ifdef KONKA_DVD //clead 20020904
- setup_func_clear();
- #endif
- if(digit_cnt!=0)
- show_password(CLREAR_PASSWD);
- }
- #if defined(CLEAR_KEY_IN_WINDOW) && defined(NEWSTYLE_WINDOW) //Maoyong 2004.02.18
- else if(full_scrn & MESSAGE)
- {
- browse_func_clear();
- }
- #endif
- }
- #endif
- //void ircmd_setup(void)
- #include "ircmd_setup.c"
- void ircmd_karaoke(void)//2-7-6 16:02
- {
- #ifdef KARAOKE_USE_IR_CRT
- #ifdef SDRAM_16Mb_Mode
- invalid_key();
- return;
- #endif
- #ifdef ADJUSTING_ACTION_VALID_RIGHT_NOW
- setup_MIC(1);
- #elif defined(KARAOKE_MENU)//wangfeng 2003-10-31 11:36
- printf("<>:full_scrn=>%dn",full_scrn);
- if(full_scrn&SETUP)
- return;
- else
- setup_KARAOKE();
- printf("<>:full_scrn2=>%dn",full_scrn);
- #else
- setup_MIC(action_click);
- #endif
- #endif// KARAOKE_USE_IR_CRT
- }
- void ircmd_bk_slow(void)
- {//need to implement
- #ifdef SUPPORT_MP4 // 2004/07/27 yltseng
- if( IsUserControlDisabledByTrickyPlay( IRC_BW_SLOW ) )
- {
- invalid_key();
- return;
- }
- #endif
- #ifdef SUPPORT_SLOWBACKWARD //gerry for backward slow function,3-8-19 23:45
- if(rep_ab_mode != REPEAT_AB_IDLE)
- {
- invalid_key();
- return;
- }
- //if( (cd_type_loaded!=CDDVD)||PE_DSI_novideo() )
- if(cd_type_loaded!=CDDVD)
- {
- invalid_key();
- return;
- }
- if(pre_slowmotion())
- return;
- #ifdef SF_PLAY_SR
- if(video_slow<0) //wsf add 040205
- {
- video_slow=0;
- ircmd_play();
- return;
- }
- #endif
- //add DVD multiple slow backward, Jeff 20030417
- if (video_slow >= 0) {//zhaoyanhua modify 2003-4-18 15:08
- video_slow = -2;
- } else {
- #ifdef FUSS_DVD
- video_slow-=2;
- #else
- video_slow--;
- #endif
- }
- #ifdef FUSS_DVD
- if (video_slow >= -8)
- #else
- if (video_slow > -8)
- #endif
- {
- int idSlow;
- idSlow = (-1) * video_slow;
- avd_slow_state(video_slow+1);
- #ifdef ALWAYSE_SHOW_SLOW //dingzhy for TONIC
- PrintOsdMsg(STR_OS_SB|(idSlow<<OSDSTR_ID_TOTL_BIT),REGION1,0,7);
- #else
- PrintOsdMsg(STR_OS_SB|(idSlow<<OSDSTR_ID_TOTL_BIT),REGION1,1,7);
- #endif
- }
- else
- {
- video_slow=0;
- ircmd_play();
- }
- #endif //SUPPORT_SLOWBACKWARD
- }
- void ircmd_reading(void)
- {
- #ifdef SUPPORT_REP_READ
- #ifdef IRCMD_DBG
- printf("============== ircmd_reading ================n");
- #endif
- //if in no volume state not, can't do repeat read
- if(user_mute || (audio_volume == 0) ){
- invalid_key();
- return;
- }
- if(full_scrn&READ){
- CancelRead();
- if(rep_ab_mode == REPEAT_FIND_B)
- ircmd_post_func(CMD_FUNC|CMD_FUNC_REPAB);
- }else{
- full_scrn=READ;
- ShowReadPage();
- //Maoyong added for IR U/D/L/R/Sel proc func setting 2004-9-24 9:19
- SetFullscrnCmdFuncPtr(read_func_up, read_func_down, read_func_left,
- read_func_right, read_func_select);
- }
- #endif //SUPPORT_REP_READ
- }
- void ircmd_resume(void)
- {
- #ifdef SUPPORT_CDG
- UINT8 cdg=0;
- if ( (cd_type_loaded==CDDA) && (cd_subtype==CD_DA) && bReadSubChannel )
- {
- cdg=1;
- #if 1//def HUAJIA_DVD
- if ( CDG_IsCDGNow() ) {
- #if defined(NEW_STYLE_SETUP)||defined(SDRAM_16Mb_Mode)
- ircmd_play();
- #else
- invalid_key();
- #endif//NEW_STYLE_SETUP
- return;
- }
- #endif
- }
- #endif
- #ifdef DISABLE_PLAY_AT_DVDREGIONERR //oujx for tonic
- if(cd_type_loaded==CDDVD)
- if(dvd_error==REGION_ERR)
- {
- invalid_key();
- return;
- }
- #endif
- if( resumeMSF == 0 )
- {
- #if defined(NEW_STYLE_SETUP)||defined(SDRAM_16Mb_Mode)
- ircmd_play();
- #else
- invalid_key();
- #endif//NEW_STYLE_SETUP
- return;
- }
- if((cd_type_loaded != CDDA)&&(cd_type_loaded !=CDROM)&&(cd_type_loaded !=CDDVD))
- {
- if(IsPBCOn())
- {
- if ( (pFsJpeg->List.s.header!=LIST_PLAY) && (pFsJpeg->List.s.header!=LIST_SELECTION) ) //Jeff 20020520
- {
- invalid_key();
- return;
- }
- }
- }
- #ifdef SUPPORT_CDG
- if(cdg)
- if ( CDG_IsCDGNow() && bReadSubChannel ) {
- CDG_Pause();
- }
- #endif
- OSD1000ISP_STATUS(OSDISP_RESUME, OSDIR_GLOBAL);
- //PrintOsdMsg(STR_OS_RESUME,REGION0,2,0);
- PrintOsdMsg(STR_OS_RESUME,REGION1,2,0);
- cancel_rep();
- ircmd_post_func(CMD_FUNC | CMD_FUNC_RESUME);
- if (!user_mute) { //Jeff 20010904
- AUDIF_Demute();//2004AUDDRV AudioDemute();
- }
- }
- #include "ircmd_num.c" //terry,2004/1/14 02:42PM
- #include "ircmd_zoom.c"//terry,2004/1/14 02:40PM
- //void ircmd_zoom(void)
- #ifdef CF_GPIO_CONTROL_COLOR
- #include "ircmd_vfd_gpio.c"
- #endif
- //void ircmd_up(void)
- //void ircmd_down(void)
- //void ircmd_left(void)
- //void ircmd_right(void)
- #include "ircmd_dir.c" //terry,2004/1/30 04:14PM
- void pbcoff_init()
- {
- if( (cd_type_loaded==CDROM)||(cd_type_loaded==CDDVD) )
- return;
- if(!IsPBCOn())
- return;
- //pbc_black_enable=0;//jhuang 891108
- psd_st.psd_list_id = 0xffff;
- ircmd_callback_check = NULL;
- if((play_state!=VCD_STATE_STOP)&&((psd_state&PSD_PLAY_SEG)!=PSD_PLAY_SEG)&&(timeout_playback==0))
- bPbcOff=1;
- else
- ircmd_post_func(CMD_FUNC | CMD_FUNC_PBC);
- psd_state = 0;
- }
- void pbcon_init()
- {
- psd_st.psd_list_id = 0x0;
- ircmd_cancel(C_SHOW|C_PLAY);
- playmode_sel(CLEAR_ALL); //0-11-17 12:15
- ircmd_post_func(CMD_FUNC | CMD_FUNC_PBC);
- // DispCookOSD0(1);
- }
- /*
- ** playmode.
- */
- #ifdef FUSS_DVD
- void ircmd_playmode_toggle(void)
- {//pbc on/off
- int id;
- #ifdef SUPPORT_MIDI_MENU_SEL
- extern UINT8 gIsMidiSelMenu;
- if((gIsMidiSelMenu))
- {
- ircmd_post_func(CMD_FUNC | CMD_FUNC_MENU);
- return ;
- }
- #endif
- ircmd_cancel(C_SHOW|C_PLAY);
- if((cd_type_loaded!=CDDVD)&&(action_click))//nono 20020708
- {
- #ifdef IRCMD_DBG
- printf("rep canceln");
- #endif
- cancel_rep();
- }
- if(cd_type_loaded!=CDDVD)
- {
- if(action_click)
- {
- if (IsPBCOn())
- {
- disc_st_time = M2I(gettrkmsf(cd_trk_lo_now));
- pbcoff_init();
- }
- else
- {
- shuffle_flag = 0;
- pbcon_init();
- AVD_SetMediaTimeout();
- #ifdef MONE_TIMEOUR_SRC
- printf(__FUNCTION__" timeoutn");
- #endif
- }
- }
- if (IsPBCOn())
- id=STR_OS_ON;
- else
- id=STR_OS_OFF;
- OSD1000ISP_STATUS(OSDISP_MENUPLAY, OSDIR_MENU);
- //PrintOsdMsg(STR_OS_MENUPLAY|(id<<8),REGION1,1,4);
- PrintOsdMsg(STR_OS_MENUPLAY|(id<<OSDSTR_ID_TOTL_BIT),REGION1,1,4);
- }else
- {
- #ifdef ONLY_PBC//nono 20020708
- {
- invalid_key();
- return;
- }
- #else
- ircmd_root_menu(); //terry,0508, revise seq.
- #endif
- }
- }
- #else
- void ircmd_playmode_toggle(void)
- {
- //pbc on/off
- int id;
- #ifdef REPEAT_AB_REPEAT_IN_ONE_EKY
- extern int repeat_key;
- #endif
- #ifdef SUPPORT_MIDIDISK_TITLE
- if (bIsPlayMidiTitle)//xlluo for midi title
- {
- invalid_key();
- return;
- }
- #endif
- #ifdef INVALID_MENUKEY_WHEN_PROG_PLAY
- if(prog_cnt) //hq,for ngailik, 2004-3-6 22:07
- {
- invalid_key();
- return;
- }
- #endif//INVALID_MENUKEY_WHEN_PROG_PLAY
- #ifdef SUPPORT_MIDI_MENU_SEL
- extern UINT8 gIsMidiSelMenu;
- if((gIsMidiSelMenu))
- {
- ircmd_post_func(CMD_FUNC | CMD_FUNC_MENU);
- return ;
- }
- #endif
- #ifdef MENU_STOP_EXCHANGE //xulf 2003-12-06 for menu and PBC 2-key.
- if(cd_type_loaded == CDROM) // Added by Robert for JPEG thumbnail previewing mode. 2002/05/07
- {
- if(JPEG_NORMAL_MODE == pFsJpeg->g_nJpegMode)
- {
- OSD1000ISP_STATUS(OSDISP_MENUPLAY, OSDIR_MENU);
- PrintOsdMsg(STR_OS_MENUPLAY,REGION1,1,0);
- return;
- }
- }
- #endif
- #if defined(USE_PBC_TO_JPG_RETURN)//add by wangfeng 2003-12-13 10:49
- #ifdef SUPPORT_FILE_SYSTEM_MODE // nono 20030807
- if( (Is_MP3_STATE())||(Is_OTHER_STATE()) )
- #else
- if(Is_MP3_STATE())
- #endif
- {
- invalid_key();
- return;
- }
- //if(pFsJpeg->gifsState == FS_STATE_JPEG||Is_JPEG_STATE())
- if(Is_JPEG_PLAY_STATE()==1)//nono 3-12-17 19:42
- {
- ircmd_return();
- return;
- }
- // if(Is_JPEG_STATE())
- #endif//USE_PBC_TO_JPG_RETURN)
- #ifdef INVALID_ZOOM_IN_DVD_MENU//XLJ2004-3-26
- //cancel zoom when return to choosing Menu by pressing menu key. heqiang, 2004-4-23 9:52
- ircmd_cancel(C_SHOW | C_PLAY | C_ZOOM);
- #else//INVALID_ZOOM_IN_DVD_MENU
- ircmd_cancel(C_SHOW | C_PLAY);
- #endif//INVALID_ZOOM_IN_DVD_MENU
- #if defined(ADJUSTING_ACTION_VALID_RIGHT_NOW)
- action_click = 1;
- #endif
- #if defined(SUPPORT_FILE_SYSTEM_MODE)
- if((cd_type_loaded!=CDDVD)&&(action_click)&&(Is_MP3_STATE()==0)&&(Is_OTHER_STATE()==0)&&(Is_JPEG_STATE()==0) )//nono edit it 2004-03-01 13:41
- #else
- if((cd_type_loaded!=CDDVD)&&(action_click)&&(Is_MP3_STATE()==0) )//nono 20020708
- #endif//#if defined(SUPPORT_FILE_SYSTEM_MODE)
- #ifdef SKYWORTH_DVD
- if(cd_type_loaded!=CDROM)
- #endif
- {
- #ifdef IRCMD_DBG
- printf("rep canceln");
- #endif
- cancel_rep();
- }
- if (cd_type_loaded == CDROM) // Added by Robert for JPEG thumbnail previewing mode. 2002/05/07
- {
- if (Is_JPEG_STATE())
- {
- ircmd_callback_check = fs_callback_check;
- ircmd_post_func(CMD_FUNC | CMD_FUNC_MENU);
- }
- else
- invalid_key();
- }
- else if (cd_type_loaded != CDDVD)
- {
- #ifndef ADJUSTING_ACTION_VALID_RIGHT_NOW
- if (action_click)
- #endif
- {
- if (IsPBCOn())
- {
- disc_st_time = M2I(gettrkmsf(cd_trk_lo_now));
- pbcoff_init();
- }else
- {
- shuffle_flag = 0;
- pbcon_init();
- #ifdef PBC_ON_NO_REPEAT
- repeat_key=0;
- #endif
- AVD_SetMediaTimeout();
- #ifdef MONE_TIMEOUR_SRC
- printf(__FUNCTION__" timeoutn");
- #endif
- }
- }
- if (IsPBCOn())
- {
- OSD1000ISP_STATUS(OSDISP_MENUON, OSDIR_MENU);
- id = STR_OS_ON;
- }
- else
- {
- OSD1000ISP_STATUS(OSDISP_MENUOFF, OSDIR_MENU);
- id = STR_OS_OFF;
- }
- //PrintOsdMsg(STR_OS_MENUPLAY | (id << 8), REGION1, 1, 4);
- #ifdef VCD_SHOW_PBC_NOT_MENUPLAY
- PrintOsdMsg(STR_OS_PBC | (id << OSDSTR_ID_TOTL_BIT),REGION1,1,4);
- #else
- PrintOsdMsg(STR_OS_MENUPLAY | (id << OSDSTR_ID_TOTL_BIT), REGION1, 1, 4);
- #endif
- }
- else
- {
- #ifndef DVD_SEQ_PLAY
- #if defined(ONLY_PBC)||defined(SETUP_DONGLI459)//nono 20020708
- {
- invalid_key(); //2-6-18 23:04 for jcg_dvd
- return;
- }
- #else
- ircmd_root_menu(); //terry,0508, revise seq.
- #endif
- #else
- //terry,2002/5/2 04:09PM
- //add new dvd play mode
- //use pbc key to toggle play mode
- UINT32 cmd;
- #ifndef ADJUSTING_ACTION_VALID_RIGHT_NOW
- if(action_click)//toggle to on/off
- #endif
- dvd_menu_play = (++dvd_menu_play) % 2;
- if(dvd_menu_play)
- {
- id = STR_OS_ON;
- cmd = CMD_FUNC | CMD_FUNC_MENU;
- }
- else
- {
- id = STR_OS_OFF;
- cmd = CMD_FUNC | CMD_FUNC_PLAY;
- }
- //PrintOsdMsg(STR_OS_MENUPLAY | (id << 8), REGION1, 1, 4);
- #ifdef VCD_SHOW_PBC_NOT_MENUPLAY
- PrintOsdMsg(STR_OS_PBC | (id << OSDSTR_ID_TOTL_BIT),REGION1,1,4);
- #else
- {
- OSD1000ISP_STATUS(OSDISP_MENUPLAY, OSDIR_MENU);
- PrintOsdMsg(STR_OS_MENUPLAY | (id << OSDSTR_ID_TOTL_BIT), REGION1, 1, 4);
- }
- #endif
- #ifndef ADJUSTING_ACTION_VALID_RIGHT_NOW
- if(action_click)//toggle to on/off
- #endif
- {
- dvd_title = 1;
- dvd_chapter = 1;
- ircmd_post_func(cmd);
- }
- #endif
- }
- }
- #endif
- #ifdef DEACTIVATE_PSCAN
- extern BYTE enter_deactivate_pscan;
- extern BYTE pscan_count;
- extern BYTE Pscan_on;
- #endif
- void ircmd_root_menu(void)
- {
- #ifdef DEACTIVATE_PSCAN
- if((play_state==VCD_STATE_OPEN)&&(Pscan_on==1))
- {
- enter_deactivate_pscan=1;
- pscan_count=0;
- }
- #endif
- #ifdef SUPPORT_MIDIDISK_TITLE
- if (bIsPlayMidiTitle)//xlluo for midi title
- {
- invalid_key();
- return;
- }
- #endif
- #if defined(USE_ROOTMENU_TO_JPG_RETURN)
- #if defined(SUPPORT_FILE_SYSTEM_MODE)&&!defined(MENU_RETURN_INONE) // nono 20030807
- if( (Is_MP3_STATE())||(Is_OTHER_STATE()) )
- #elif defined(MENU_RETURN_INONE)//nono 4-8-7 3:37 for eastech
- if(Is_MP3_STATE()||(play_state == VCD_STATE_STOP))
- #else
- if(Is_MP3_STATE())
- #endif
- {
- invalid_key();
- return;
- }
- if(pFsJpeg->gifsState == FS_STATE_JPEG||Is_JPEG_STATE()||Is_OTHER_STATE()) //wsf 0802
- {
- ircmd_return();
- return; //wsf 0802
- }
- if(Is_JPEG_STATE())
- return;
- #endif//USE_TITLEMENU_TO_JPG_RETURN
- #ifdef SDRAM_16Mb_Mode //gerry,2004-4-7 15:00
- if((full_scrn==SETUP)||(full_scrn==PROGRAM))
- {
- invalid_key();
- return;
- }
- #endif//SDRAM_16Mb_Mode
- //printf("1.ROOT MENUn");
- ircmd_cancel(C_SHOW|C_PLAY);
- #ifdef DVD_AUDIO // alan, 2002/11/13 02:58