📄 play_non.c
字号:
}
fgSetPlayPostKey(IR_EJECT);
_bIRKey = IR_NONE;
return (UOP_OK);
}
#endif /* AUDIO_IN_EN */
/* before any action, make sure the player in a known state */
if (bInitState == SV_DISC_IDENTIFIED)
{
vPlayerReset();
#ifdef EEPROM_LASTMEM_EJECT_WR_BACK
_rOsdStateCtx.fgLastMemWrBack = TRUE;
#endif
}
bMode = 0;
if (bInitState == SV_TRAY_OPENING)
{
bMode = DO_CLOSE;
}
else if (bInitState == SV_TRAY_ERROR)
{
bMode = DO_OPEN | DO_OPEN_CLOSE_FORCE;
}
else
{
bMode = DO_OPEN;
}
if ((bInitState != SV_TRAY_OPENING) && (bInitState != SV_TRAY_CLOSING))
{
bMode |= DO_OPEN_CLOSE_DING;
}
else if ((bInitState == SV_TRAY_OPENING) && fgIsTrayOutside())
{
bMode |= DO_OPEN_CLOSE_DING;
}
vDoEject(bMode);
_bIRKey = IR_NONE;
return (UOP_OK);
}
static BYTE bNONPowerKey(void) large
{
//[runma] add block for power key problem
#ifdef AUDIO_IN_EN
vAinChSel(AIN_SEL_OFF);
#endif
#ifdef PLAYER_POWERDOWN
vAdspMute(ADSP_ON, 0); // do soft mute ASAP
/* update VFD immediately */
vVfdDirectClrAll();
vVfdDirectMessage(VFD_MESSAGE_OFF);
/* stop UI task */
vUIStop();
/* this will make RISC to stop running */
vSendUopCmd(UOP_POWER, SV_PWR_STANDBY, 0, 0);
#endif /* PLAYER_POWERDOWN */
_bIRKey = IR_NONE;
return (UOP_OK);
}
static BYTE bNONPasswordKey(void) large
{
#ifdef EN_DISC_ID_CHK
if (fgIsNonPlay())
{
vChangeInputState(INPUT_STATE_DISC_LOCK_PWD, FALSE);
}
else
#endif
{
vChangeInputState(INPUT_STATE_PASSWORD, FALSE);
}
_bIRKey = IR_NONE;
return (UOP_OK);
}
#ifdef SUPPORT_DVD_AUDIO
BYTE bDAHdnPasswordKey(void) large
{
vChangeInputState(INPUT_STATE_DA_HIDDEN_PWD, FALSE);
_bIRKey = IR_NONE;
return (UOP_OK);
}
#endif
static BYTE bNONUpgradeKey(void) large
{
#ifdef DISC_UPDATE_CODE
vChangeInputState(INPUT_STATE_UPG, FALSE);
#endif
_bIRKey = IR_NONE;
return (UOP_OK);
}
// *********************************************************************
// *********************************************************************
static BYTE bNONPlayPauseKey(void) large
{
BYTE bTmp = bSharedInfo(SI_PBC_STATE);
if (fgIsNoInputState() && fgIsNonPlay() &&
(bSharedInfo(SI_INIT_STATE) == SV_TRAY_OPENING))
{
/* when tray is open, PLAY key is eject key */
_bIRKey = IR_PLAY;
}
#ifdef PLAY_PAUSE_TRICK_PLAY
else if (bTmp == SV_PLAY)
#else /* trick pause for play pause */
else if ((bTmp == SV_PLAY) || (bTmp == SV_FF) || (bTmp == SV_SF) ||
(bTmp == SV_FR) || (bTmp == SV_SR))
#endif
{
_bIRKey = IR_PAUSE;
}
else /* default is PLAY key */
{
_bIRKey = IR_PLAY;
}
return (UOP_OK);
}
static BYTE bNONPauseStepKey(void) large
{
BYTE bPbcState = bSharedInfo(SI_PBC_STATE);
BYTE bDiscType = bSharedInfo(SI_DISC_TYPE);
if (fgIsNonPlay())
{
// 20050328, IS00001944, show prohibit for non-supported keys
return (UOP_FAIL);
// _bIRKey = IR_NONE;
}
else if (fgIsCddaPlay()
#ifdef ISO_PAUSE_STEP_NO_STEP
|| fgIsIsoPlay() || fgIsPcdPlay()
#endif
)
{
if (fgIsIsoPlay() || fgIsPcdPlay())
{
_bIRKey = IR_PAUSE;
}
#if 1
// bPbcState = bFlGetFgPbcState();
if(fgIsCddaPlay())
{
if (bPbcState == SV_PAUSE)
{
_bIRKey = IR_PLAY;
}
else
{
_bIRKey = IR_PAUSE;
}
}
#endif
}
else if ((bPbcState == SV_PAUSE) || (bPbcState == SV_STEP))
{
_bIRKey = IR_STEP;
}
else
{
_bIRKey = IR_PAUSE;
}
return (UOP_OK);
}
static BYTE bNONStopResumeKey(void) large
{
BYTE bState = bSharedInfo(SI_PBC_SWITCH);
if (fgIsVcdPlay())
{
if (bState == SV_PBC_ON)
{
_bIRKey = IR_RETURN;
}
else
{
_bIRKey = IR_STOP;
}
}
else /* fgIsDvdPlay() || fgIsIsoPlay() */
{
_bIRKey = IR_STOP;
}
return (UOP_OK);
}
static BYTE bNONPlayEnterKey(void) large
{
BYTE bHliState = bSharedInfo(SI_HLI_STATE);
BYTE bState = bSharedInfo(SI_PBC_STATE);
if (fgIsNonPlay())
{
/* when tray is open, PLAY key is eject key */
if (fgIsNoInputState() && (bSharedInfo(SI_INIT_STATE) == SV_TRAY_OPENING))
{
_bIRKey = IR_PLAY;
}
}
else /* DVD/VCD/ISO */
{
if(fgIsInputStateValid(INPUT_STATE_VREMOTE))
{
_bIRKey = IR_ENTER;
}
else
{
if (bHliState == SV_OFF)
{
_bIRKey = IR_PLAY;
}
else
{
/* if in trick mode, back to normal play first */
if (fgIsTrickPlay(bState))
{
_bIRKey = IR_PLAY;
}
else
{
_bIRKey = IR_ENTER;
}
}
}
}
return (UOP_OK);
}
static BYTE bNONMenuPbcKey(void) large
{
if (fgIsVcdPlay())
{
_bIRKey = IR_PBC;
}
else
{
_bIRKey = IR_ROOT_MENU;
}
return (UOP_OK);
}
static BYTE bNONTitlePbcKey(void) large
{
if (fgIsVcdPlay())
{
_bIRKey = IR_PBC;
}
else
{
_bIRKey = IR_TITLE_MENU;
}
return (UOP_OK);
}
static BYTE bNONManualEjectKey(void) large
{
_bIRKey = IR_EJECT;
return (UOP_OK);
}
#ifdef IR_CHECK_KEY_LOCK
// *********************************************************************
// Function :
// Description :
// Parameter :
// Return :
// *********************************************************************
BYTE bHandleIRKeyPressTimeout(BOOL fgTimeout, BYTE bKey) large
{
switch (bKey)
{
#ifdef ENABLE_ZOOM_USER_MODE
case IR_ZOOM_IN:
if (fgTimeout == TRUE)
{
bKey = IR_ZOOM_USER;
}
else // not tiemout yet, no key to return
{
bKey = IR_NONE;
}
break;
#endif
default:
break;
}
return (bKey);
}
#endif /* IR_CHECK_KEY_LOCK */
// *********************************************************************
// Function :
// Description :
// Parameter :
// Return :
// *********************************************************************
BOOL fgHandleMultiKey(void) large
{
BYTE bRet = UOP_OK;
switch (_bIRKey)
{
case IR_PLAY_PAUSE:
bRet = bNONPlayPauseKey();
break;
case IR_PAUSE_STEP:
bRet = bNONPauseStepKey();
break;
case IR_STOP_RESUME:
bRet = bNONStopResumeKey();
break;
case IR_PLAY_ENTER:
bRet = bNONPlayEnterKey();
break;
case IR_MENU_PBC:
bRet = bNONMenuPbcKey();
break;
case IR_TITLE_PBC:
bRet = bNONTitlePbcKey();
break;
case IR_MANUAL_EJECT:
bRet = bNONManualEjectKey();
break;
/* no need default handle here! */
}
return (bRet);
}
BYTE bNONKeyMap(BYTE bKey) large
{
BYTE bRet;
switch (bKey)
{
/* 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:
bRet = bNONDirKey();
break;
#endif /* ENABLE_ZOOM_USER_MODE */
/* case IR_ENTER: */
case IR_PLAY:
bRet = bNONPlayKey();
break;
/* case IR_PAUSE: */
#ifdef NO_DISC_STOP_CLEAR
case IR_STOP:
bRet = bNONStopKey();
break;
#endif
/* 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:
bRet = bNONTvFormatKey();
break;
/* case IR_TV_MODE: */ /* handled in play_dvd.c */
case IR_COMPONENT:
bRet = bNONCompKey();
break;
#ifdef PSCAN_EN
case IR_PSCAN:
bRet = bNONPScanKey();
break;
case IR_VGA:
bRet = bNONVGAKey();
break;
#endif
/* case IR_ZOOM_IN: */
/* case IR_ZOOM_OUT: */
/* case IR_ZOOM_USER: */
#ifdef SUPPORT_CAPTURE_LOGO
case IR_CAPTURE:
bRet = bNONCaptureKey();
break;
#endif /* SUPPORT_CAPTURE_LOGO */
case IR_AUD_KEY_PLUS:
case IR_AUD_KEY_MINUS:
case IR_AUD_KEY_RESUME:
bRet = bNONAudKeyShift();
break;
case IR_ECHO_PLUS:
bRet = bNONEchoPlusKey();
break;
case IR_ECHO_MINUS:
bRet = bNONEchoMinusKey();
break;
case IR_SURROUND:
bRet = bNONSurroundKey();
break;
case IR_VOCAL_ASSIST:
bRet = bNON_VocalAssistKey();
break;
case IR_KARAOKE:
bRet = bNONKaraokeKey();
break;
case IR_ECHO_TYPE:
bRet = bNONEchoTypeKey();
break;
case IR_EQUALIZER:
bRet = bNONEqualizerKey();
break;
/* case IR_VOICE_CANCEL: */
case IR_SPK_CFG:
bRet = bNONSpkCfgKey();
break;
/* case IR_SPDIF: */
#ifdef SUPPORT_VOLUME_ADJUST
case IR_MUTE:
bRet = bNONMuteKey();
break;
case IR_VOLUME_UP:
bRet = bNONVolumeUpKey();
break;
case IR_VOLUME_DOWN:
bRet = bNONVolumeDownKey();
break;
#endif
/* case IR_AUD_LR: */
case IR_SETUP:
bRet = bNONSetupKey();
break;
/* case IR_PLAY_TYPE: */
case IR_OSD_LANGUAGE:
bRet = bNONOsdLangKey();
break;
/* case IR_DEFAULT: */
case IR_GAME:
bRet = bNONGameKey();
break;
case IR_FUNCTION:
bRet = bNONFunctionKey();
break;
case IR_VFD_DARK:
bRet = bNONVfdDark();
break;
case IR_VFD_BRIGHT:
bRet = bNONVfdBright();
break;
/* case IR_VFD_MODE: */
case IR_POWER:
bRet = bNONPowerKey();
break;
case IR_EJECT:
bRet = bNONOpenCloseKey();
break;
/* 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:
bRet = bNONPasswordKey();
break;
#ifdef SUPPORT_DVD_AUDIO
case IR_HDN_PASSWORD:
bRet = bDAHdnPasswordKey();
break;
#endif
case IR_UPG:
bRet = bNONUpgradeKey();
break;
/* case IR_SELECT_DONE: */
default:
bRet = UOP_OK;
break;
}
return (bRet);
}
BOOL fgNONHandleCmd(void) large
{
BOOL fgRet = UOP_OK;
/* process common key (non-play key) */
if (_bIRKey < IR_KEY_MAX)
{
fgRet = bNONKeyMap(_bIRKey);
}
return (fgRet);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -