📄 keyproc.c
字号:
BYTE bPbcState = bSharedInfo(SI_PBC_STATE);
if (!fgIsDiscPlay(bPbcState))
{
vOsdShowError(SV_ERR_PLAYBACK_ONLY, OSD_TIMEOUT_SHORT);
return (UOP_OK);
}
if(!fgIsDvdPlay() && !fgIsVcdPlay() && !fgIsCddaPlay())
return (UOP_FAIL);
#ifdef SUPPORT_DVD_AUDIO
if(bSharedInfo(SI_DISC_TYPE) == SV_DVD_AUDIO)
return (UOP_FAIL);
#endif
#ifdef BBK_LAST_MEMORY
_fgJYPress = TRUE; //BillDen
#endif
#if 0 //def MEMORY_SCREENOFF
if(!(fgIsCddaPlay()&&(_bResetState ==PLAYER_SOFTWARE_RESET)))
#endif
vSendUopCmd(UOP_MEMORY, 0, 0, 0);
#ifdef BBK_LAST_MEMORY
_fgPlayFromMemory = TRUE;
#endif
return (UOP_OK);
}
static BOOL fgNonISORecallKey(void) large
{
#if 0 //def MEMORY_SCREENOFF
if(fgIsCddaPlay()&&(_bResetState ==PLAYER_SOFTWARE_RESET))
vSendUopCmd(UOP_PLAY, 0, 0, 0);
else
#endif
// vSendUopCmd(UOP_MEMORY_PLAY, 0, 0, 0);
vSendUopCmd(UOP_MEMORY_PLAY, 0, 0, 0);
return (UOP_OK);
}
#endif
static BOOL fgNonISOTvModeKey(void) large
{
if ( fgIsDvdPlay() )
{
return ( fgDVDTvModeKey() );
}
else
{
return (UOP_OK);
}
}
static BOOL fgNonISOZoomInKey(void) large
{
if( fgIsDvdPlay() )
{
return (fgDVDZoomInKey());
}
else if ( fgIsVcdPlay() )
{
return (fgVCDZoomInKey());
}
else if ( fgIsCddaPlay())
{
return (fgCDDAZoomInKey());
}
else
{
return (UOP_OK);
}
}
static BOOL fgNonISOZoomOutKey(void) large
{
if( fgIsDvdPlay() )
{
return (fgDVDZoomOutKey());
}
else if ( fgIsVcdPlay() )
{
return (fgVCDZoomOutKey());
}
else if ( fgIsCddaPlay())
{
return (fgCDDAZoomOutKey());
}
else
{
return (UOP_OK);
}
}
#ifdef ENABLE_ZOOM_USER_MODE
static BOOL fgNonISOZoomUsrKey(void) large
{
if( fgIsDvdPlay() )
{
return (fgDVDZoomUsrKey());
}
else if ( fgIsVcdPlay() )
{
return (fgVCDZoomUsrKey());
}
else if ( fgIsCddaPlay())
{
return (fgCDDAZoomUsrKey());
}
else
{
return (UOP_OK);
}
}
#endif
static BOOL fgNonFunctionKey(void) large
{
#ifdef AUDIO_IN_EN
if ( fgIsAinPlay() )
{/////////////////////////////
// #ifdef FAN_CONTROL
// CLR_4094_PIN(SET_VDATA3); //外部输入风扇不转
// #endif
//////////////////////////////
return ( fgAINFunctionKey() );
}
else
#endif
{
return (UOP_OK);
}
}
static BOOL fgNonISOPasswordKey(void) large
{
if ( fgIsDvdPlay() )
{
return ( fgDVDPasswordKey() );
}
else
{
return (UOP_OK);
}
}
#ifdef SUPPORT_DVD_AUDIO
static BOOL fgNonISODANextDlist(void) large
{
return ( fgDANextDlist());
}
static BOOL fgNonISODAPrevDlist(void) large
{
return ( fgDAPrevDlist());
}
static BOOL fgNonISODAHdnPasswordKey(void) large
{
return ( fgDAHdnPasswordKey() );
}
#endif
// *********************************************************************
// Common key dispatch function
// *********************************************************************
BOOL fgComKeyFunc(void) large
{
BOOL fgRet = UOP_OK;
switch (_bIRKey)
{
/* case IR_NUM0: */
/* case IR_NUM1: */
/* case IR_NUM2: */
/* case IR_NUM3: */
/* case IR_NUM4: */
/* case IR_NUM5: */
/* case IR_NUM6: */
/* case IR_NUM7: */
/* case IR_NUM8: */
/* case IR_NUM9: */
/* case IR_ADD10: */
/* case IR_ADD20: */
/* case IR_ADD5: */
#ifdef ENABLE_ZOOM_USER_MODE
case IR_UP:
case IR_LEFT:
case IR_RIGHT:
case IR_DOWN:
fgRet = fgCOMDirKey();
break;
#endif /* ENABLE_ZOOM_USER_MODE */
/* case IR_ENTER: */
/* case IR_PLAY: */
/* case IR_PAUSE: */
/* case IR_STOP: */
/* case IR_NEXT: */
/* case IR_PREV: */
/* case IR_REPEAT: */
/* case IR_FF: */
/* case IR_FR: */
/* case IR_SF: */
/* case IR_SR: */
/* case IR_STEPF: */
/* case IR_STEPR: */
/* case IR_REVERSE: */
/* case IR_SET_A: */
/* case IR_SET_B: */
/* case IR_TITLE_MENU: */
/* case IR_ROOT_MENU: */
/* case IR_RETURN: */
/* case IR_NEXT_DLIST: */
/* case IR_PREV_DLIST: */
/* case IR_HOME_DLIST: */
/* case IR_AUDIO: */
/* case IR_SUB_TITLE: */
/* case IR_SUB_TITLE_OFF: */
/* case IR_ANGLE: */
/* case IR_DISPLAY: */
/* case IR_RESUME: */
/* case IR_GOTO: */
/* case IR_MARK: */
/* case IR_CLEAR: */
/* case IR_PBC: */
/* case IR_DIGEST: */
/* case IR_PROGRAM: */
/* case IR_RANDOM: */
/* case IR_VRMT: */
/* case IR_MEMORY: */
/* case IR_PLAY_MODE: */
case IR_PAL_NTSC:
fgRet = fgCOMTvFormatKey();
break;
#ifdef ID_NO
case IR_DISPLAY:
if(bSharedInfo(SI_INIT_STATE)==SV_TRAY_OPENING)
fgRet = bNONIDShowKey();
else
fgRet = UOP_OK;
break;
case IR_READ:
fgRet = bNONIDShowKey();
break;
case IR_WRITE:
fgRet = bNONIDInputKey();
break;
#endif
/* case IR_TV_MODE: */ /* handled in play_dvd.c */
case IR_COMPONENT:
fgRet = fgCOMCompKey();
break;
#ifdef PSCAN_EN
case IR_PSCAN:
fgRet = fgCOMPScanKey();
break;
case IR_VGA:
fgRet = fgCOMVGAKey();
break;
#endif
/* case IR_ZOOM_IN: */
/* case IR_ZOOM_OUT: */
/* case IR_ZOOM_USER: */
#ifdef SUPPORT_CAPTURE_LOGO
case IR_CAPTURE:
fgRet = fgCOMCaptureKey();
break;
#endif /* SUPPORT_CAPTURE_LOGO */
case IR_AUD_KEY_PLUS:
case IR_AUD_KEY_MINUS:
case IR_AUD_KEY_RESUME:
fgRet = fgCOMAudKeyShift();
break;
case IR_ECHO_PLUS:
fgRet = fgCOMEchoPlusKey();
break;
case IR_ECHO_MINUS:
fgRet = fgCOMEchoMinusKey();
break;
case IR_SURROUND:
fgRet = fgCOMSurroundKey();
break;
#ifdef PLAYER_KARAOKE
case IR_VOCAL_ASSIST:
fgRet = fgCOMVocalAssistKey();
break;
#endif
case IR_KARAOKE:
fgRet = fgCOMKaraokeKey();
break;
case IR_ECHO_TYPE:
fgRet = fgCOMEchoTypeKey();
break;
case IR_EQUALIZER:
fgRet = fgCOMEqualizerKey();
break;
/* case IR_VOICE_CANCEL: */
case IR_SPK_CFG:
fgRet = fgCOMSpkCfgKey();
break;
/* case IR_SPDIF: */
#if defined(SUPPORT_VOLUME_ADJUST)&&!defined(DVD_RECEIVER)
case IR_MUTE:
fgRet = fgCOMMuteKey();
break;
case IR_VOLUME_UP:
fgRet = fgCOMVolumeUpKey();
break;
case IR_VOLUME_DOWN:
fgRet = fgCOMVolumeDownKey();
break;
#endif
/* case IR_AUD_LR: */
case IR_SETUP:
#ifdef DEBUG_KEY
DRS232LogS("set\n");
#endif
if(!fgIsInSetupMenu())
{
fgRet = fgCOMSetupKey();
}
else
{
fgRet = UOP_OK;
}
break;
/* case IR_PLAY_TYPE: */
#ifdef BBK_NEW_MENU
case IR_GAME:
{
BYTE bInitState = bSharedInfo(SI_INIT_STATE);
#if !defined(DVD_DECODE)
if((bInitState != SV_LOADING_DISC) && (bInitState != SV_TRAY_CLOSING) && (bInitState !=SV_TRAY_ERROR))
#else
if((bInitState != SV_LOADING_DISC) && (bInitState != SV_TRAY_CLOSING) && (bInitState !=SV_TRAY_ERROR)&&(fgIsFuncDvd()))
#endif
{
//10/13am
if ((bSharedInfo(SI_OSD_STATE) == OSD_ST_INIT) ||
(bSharedInfo(SI_OSD_CMD_BUF_FULL) == TRUE)
#ifdef PLAYER_FLMENU
|| (fgFlCheckStatus(FL_STATUS_IN_HELP))
#endif
#ifdef MP3_AUTO_PLAY
|| (IsoFileCmdTimer > 0)
#endif
)
{
_bIRKey= IR_NONE;
fgRet = UOP_FAIL;
}
//10/13am end
#if 0//def SUPPORT_ASIAN //Del@08-04-04
#ifdef MPEG4_TXT_SP
else if((fgIsIsoPlay() && bSharedInfo(SI_ISO_ITEM_TYPE) == SV_ISO_AVI && bSharedInfo(SI_PBC_STATE) == SV_FF)
|| (fgIsIsoPlay() && bSharedInfo(SI_ISO_ITEM_TYPE) == SV_ISO_AVI && bSharedInfo(SI_PBC_STATE) == SV_FR))
{
_bIRKey= IR_NONE;
fgRet = UOP_FAIL;
}
#endif
#endif
#ifdef SUPPORT_ASIAN //Add by Tide@08-04-04
#ifdef MPEG4_TXT_SP
else if (bSharedInfo(SI_PBC_SPEED) != 0 && fgIsIsoPlay() && bSharedInfo(SI_ISO_ITEM_TYPE) == SV_ISO_AVI )
{
_bIRKey= IR_NONE;
fgRet = UOP_FAIL;
}
#endif
#endif
else if((!_fgIsInBBKNewMenu) && (!fgIsInSetupMenu())){
vEnterBBKMenu();
_bIRKey = IR_NONE;
fgRet = UOP_OK;
}
else if((!_fgIsInBBKNewMenu) && (fgIsInSetupMenu())){
_bIRKey = IR_NONE;
_bPlayPostKey = IR_SETUP;
fgRet = UOP_OK;
}
else if((_fgIsInBBKNewMenu) && (fgIsInSetupMenu())){
_bIRKey = IR_NONE;
vExitBBKMenu();
fgRet = UOP_OK;
}
else {
_bIRKey = IR_NONE;
fgRet = UOP_OK;
}
break;
}
else {
_bIRKey= IR_NONE;
fgRet = UOP_FAIL;
}
break;
}
#endif
case IR_OSD_LANGUAGE:
fgRet = fgCOMOsdLangKey();
break;
/* case IR_DEFAULT: */
// case IR_GAME:
// fgRet = fgCOMGameKey();
// break;
case IR_FUNCTION:
fgRet = fgCOMFunctionKey();
break;
case IR_VFD_DARK:
fgRet = fgCOMVfdDark();
break;
case IR_VFD_BRIGHT:
fgRet = fgCOMVfdBright();
break;
/* case IR_VFD_MODE: */
#ifdef EASY_SWITCH_CHANNEL
case IR_VFD_MODE:
fgRet = bNONChannelKey();
break;
#endif
case IR_POWER:
fgRet = fgCOMPowerKey();
break;
case IR_EJECT:
fgRet = fgCOMOpenCloseKey();
break;
#ifdef DVD_RECEIVER
/*case IR_3D:
fgRet = fgCOM3D();
break;*/
#if !defined(DVD_TUNER)
#if defined(DAV935)
case IR_AMP_DEFAULT:
fgRet = fgCOMAmpDefault();
break;
#endif
case IR_MUTE:
fgRet = fgCOMMuteKey();
break;
case IR_VOLUME_UP:
fgRet = fgCOMVolumeUpKey();
break;
case IR_VOLUME_DOWN:
fgRet = fgCOMVolumeDownKey();
break;
case IR_CH_VOL_ADD:
// fgRet = fgCOMMuteKey();
fgRet = fgCOMChannelVolAdd();
break;
case IR_CH_VOL_SUB:
// fgRet = fgCOMMuteKey();
fgRet = fgCOMChannelVolSub();
break;
#if 0
case IR_BASS_UP:
fgRet = fgCOMBassUp();
break;
case IR_BASS_DOWN:
fgRet = fgCOMBassDown();
break;
case IR_TREBLE_UP:
fgRet = fgCOMTrebleUp();
break;
case IR_TREBLE_DOWN:
fgRet = fgCOMTrebleDown();
break;
#endif
#if defined(DVR938)
case IR_BASS_MODE:
fgRet = fgCOMBassModeKey();
break;
case IR_TREBLE_MODE:
fgRet = fgCOMTrebleModeKey();
break;
#elif defined(DVR979)
case IR_TONE_MODE:
fgRet = fgCOMToneModeKey();
break;
#endif
#if defined(BASS_BOOST_DRIVER)
case IR_BASS_BOOST:
fgRet = fgCOMBassBoostKey();
break;
#endif
case IR_CH_MODE:
fgRet = fgCOMChModeKey();
break;
#if defined(USE_PT2399)
case IR_MIC_MODE:
fgRet = fgCOMMicModeKey();
break;
#endif
#endif
#ifndef DVD_DECODE
case IR_RE_FUN: // IR_RE_FUN will switch to next state;(state cycle: dvd--->tuner--->av in--->dvd);
fgRet = fgCOMReFun();
break;
#else
case IR_RE_FUN_FF:
fgRet = fgCOMReFun(0);
break;
case IR_RE_FUN_FR:
fgRet = fgCOMReFun(1);
break;
#endif
#endif
#ifdef SLEEP_FUNCTION
case IR_SET_SLEEP:
/*
ClrBitBIM(0x3B,0x80);
WriteBIM(0x04,0x84);
WriteBIM(0x05,0x84);
WriteBIM(0x06,0x84);
WriteBIM(0x07,0x84);
WriteBIM(0x08,0x84);
WriteBIM(0x09,0x84);
WriteBIM(0xB8,0x0c);
WriteBIM(0xB9,0x00);
WriteBIM(0xB8,0x10);*/
//DRS232LogB(0, bReadBIM(0xB9),0, 0);
fgRet = bNONDVDSetSleep();
break;
#endif
/* case IR_PLAY_PAUSE: */
/* case IR_PAUSE_STEP: */
/* case IR_STOP_RESUME: */
/* case IR_PLAY_ENTER: */
/* case IR_MENU_PBC: */
/* case IR_TITLE_PBC: */
/* case IR_CMD_DONE: */
/* case IR_TIME_OUT: */
/* case IR_DONE: */
/* case IR_PASSWORD: */
//fgRet = bCOMPasswordKey();
//break;
/* case IR_UPG: */
/* case IR_SELECT_DONE: */
#if defined(INTERNAL_KARA)
case IR_INTERNAL_KARA:
fgRet = fgCOMInternalKaraKey();
break;
case IR_BBK_INTERNALKARA: //
fgRet = fgCOMBbkInternalKaraKey();
break;
case IR_MIC_UP:
fgRet = fgNONMicUpKey();
break;
case IR_MIC_DOWN:
fgRet = fgNONMicDownKey();
break;
case IR_SSN_UP:
fgRet = fgNONSSNUpKey();
break;
case IR_SSN_DOWN:
fgRet = fgNONSSNDownKey();
break;
#endif
default:
fgRet = UOP_OK;
break;
}
return (fgRet);
}
// *********************************************************************
// Common key pre-handle function
// *********************************************************************
BOOL fgComKeyProc(void) large
{
BOOL fgRet = UOP_OK;
/* handle multi-function key */
if (fgIsMultiFuncKey(_bIRKey))
{
fgRet = fgHandleMultiKey();
}
/* execute non-stacked input state */
if (_bIRKey != IR_NONE)
{
vNonStatckInputState();
}
/* process common key */
if (_bIRKey != IR_NONE)
{
fgRet = fgComKeyFunc();
}
vResendInputState();
return(fgRet);
}
// *********************************************************************
// Init(no disc) key dispatch function
// *********************************************************************
BOOL fgInitKeyProc(void) large
{
BOOL fgRet = UOP_OK;
/* process Init Key */
if (_bIRKey < IR_KEY_MAX)
{
switch (_bIRKey)
{
/* case IR_NUM0: */
/* case IR_NUM1: */
/* case IR_NUM2: */
/* case IR_NUM3: */
/* case IR_NUM4: */
/* case IR_NUM5: */
/* case IR_NUM6: */
/* case IR_NUM7: */
/* case IR_NUM8: */
/* case IR_NUM9: */
/* case IR_ADD10: */
/* case IR_ADD20: */
/* case IR_ADD5: */
/* case IR_UP: */
/* case IR_LEFT: */
/* case IR_RIGHT: */
/* case IR_DOWN: */
/* case IR_ENTER: */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -