📄 player.c
字号:
}
#endif
/* note the _bIRKey0 is put in the IR interrupt */
else if (EXIST_IR_KEY())
{
#ifdef IR_CHECK_KEY_LOCK
if (fgIsIrKeyLock())
{
if (_bIRKeyPressCnt == 0)
{
// already timeoute
vIrKeyForceRelease();
GET_IR_KEY(_bIRKey);
_bIRKey = bHandleIRKeyPressTimeout(TRUE, _bIRKey);
}
else // not timeout yet
{
if (bHandleIRKeyPressTimeout(FALSE, _bIRKey0) != IR_NONE)
{
// no need to wait timeout
vIrKeyForceRelease();
GET_IR_KEY(_bIRKey);
}
}
}
else
#endif // IR_CHECK_KEY_LOCK
{
// original routine
GET_IR_KEY(_bIRKey);
}
}
#ifdef SUPPORT_HDVD_CHANNEL_CHANGE //linshangbo 040505 bg
if( fgIsDvdPlay() )
{
if(_bAudioKeyTime>_bAudioKeyTimeOut)
{
_bIRKey=IR_AUDIO;
_fgIRAudio=0;
_bAudioKeyTime=0;
}
}
else
{
if(_fgIRAudio)
{
_bIRKey=IR_AUDIO;
_fgIRAudio=0;
}
}
#endif //linshangbo 040505 end
}
}
/***************************************************************************
Function : void vUIInit(BOOL fgInit)
Dsecription : called from Timer task before RISC start
Parameter : None
Return : None
***************************************************************************/
void vUIInit(BOOL fgInit) large
{
// Harrison's modified
_bKeyState = KEY_INIT;
vUserInit(fgInit);
// - Reset Player
vPlayerInit();
SmInit();
}
/***************************************************************************
Function : void vUITimer(void)
Dsecription : called from Timer task
Parameter : None
Return : None
***************************************************************************/
void vUITimer(void) large
{
/* non-key dependant event for play module */
vPlayerTimer();
/* VFD */
#ifndef HYNIX_VFD
// vVfdTimerState(FALSE);
#endif
#ifdef FLNAME_CIRCLE_DISPLAY
if(fgIsIsoPlay())
{
_bFlNameTimer++;
if(_bFlNameTimer>=100)
{
vFlNameCircleDisplay(FALSE);
_bFlNameTimer=70;
}
}
#endif //linshangbo 041405 end
/* note this must be placed after VfdTimer() and before vIrTimer() */
vGetCurrKey();
#ifdef SUPPORT_SACD
if (_fgPsedoTrayIn)
{
vSendUopCmd(UOP_OPEN_CLOSE, SV_PSEUDO_CLOSE, 0, 0);
_fgPsedoTrayIn = FALSE;
}
#endif
/* TODO: check if it is safe to execute UOP command here */
#ifdef BBK_LAST_MEMORY //BillDen
if(_fgAutoJY)
{
_bIRKey = IR_PLAY;
_fgAutoJY = FALSE;
}
#endif
if (_bIRKey != IR_NONE)
{
vIrTimer();
}
#ifdef BBK_NEW_GUI
if((bKeyState()==KEY_SETUP) && (_bMoveCter <= STP_MOVE_TIMES))
{
vDynShowMenu();
}
#endif
/* Take care share memory here */
#ifdef ACCEL_SI_PROC
_bShmUpdCnt = SHM_PROC_CNT;
#endif
#ifdef ACCEL_SI_PROC
while (_bShmUpdCnt > 0)
#endif
{
SmTimer();
}
/* Handle OSD return here */
vOsdCoreTimer();
#ifdef GUI_DC_SELECT
vDCTimer();
#endif
/* check player error code */
if (_bPlayerErrCode != PLAYER_ERR_NO_ERROR)
{
#ifdef SHOW_ERROR_CODE
vOsdShowError(OSD_ERROR_CODE, _bPlayerErrCode);
#endif
_bPlayerErrCode = PLAYER_ERR_NO_ERROR;
}
}
#ifdef PLAYER_POWERDOWN
/***************************************************************************
Function : void vUIPowerDownTimer(void)
Dsecription : called from Timer task when power down
Parameter : None
Return : None
***************************************************************************/
void vUIPowerDownTimer(void) large
{
/* VFD */
//bywhy 04/06/24
#ifdef DL333_T100_PIC
if(_bOSDClearCounter != 251) {
if(_bOSDClearCounter == 0) {
_bOSDClearCounter = 251;
_fgInPictureMode = FALSE;
#ifdef OSD_EN
_bPictureMode1 = 0xff;
OSDDisable();
#endif
#ifdef DL339_MENU
_fgInBBKMenuMode = 0;
if(BBKBackLight)
{
BBKTFTSetBackLight(TRUE);
}else
if(cStandard == 0xff)
{
BBKTFTSetBackLight(TRUE);
}
#endif
}
else if(_bOSDClearCounter > 251)
_bOSDClearCounter = 251;
#ifdef DIRECT_Adjust_VCOM
else if((VCOM_ENTER_EN !=0xff)&&(VCOM_ENTER_EN!=0x0f)&&(_bOSDClearCounter > 0))
#else
else if(_bOSDClearCounter > 0)
#endif
_bOSDClearCounter --;
}
#endif
/* get current key */
//bywhy 04/06/24
#ifdef VFD_SUPPORT
if (_bVfdKeyScan != IR_NONE)
{
_bIRKey = _bVfdKeyScan;
_bVfdKeyScan = IR_NONE;
}
/* note the _bIRKey0 is put in the IR interrupt */
else
#endif
if (EXIST_IR_KEY())
{
GET_IR_KEY(_bIRKey);
#ifdef DL333_EXT_VIDEO
if ((_bIRKey != IR_FUNCTION)
#ifdef DL333_T100_PIC
#ifdef DL339
&& (_bIRKey != IR_UP) && (_bIRKey != IR_DOWN)&& (_bIRKey != IR_PLAY_ENTER)
#endif
&& (_bIRKey != IR_LEFT) && (_bIRKey != IR_RIGHT) && (_bIRKey != IR_PICTURE_Q)
#endif
)
#endif
{
_bIRKey = IR_NONE;
}
}
/* only power key and eject key is valid */
#ifdef DL333_EXT_VIDEO
if ((_bIRKey != IR_FUNCTION)
#ifdef DL333_T100_PIC
#ifdef DL339
&& (_bIRKey != IR_UP) && (_bIRKey != IR_DOWN)&& (_bIRKey != IR_PLAY_ENTER)
#endif
&& (_bIRKey != IR_LEFT) && (_bIRKey != IR_RIGHT) && (_bIRKey != IR_PICTURE_Q)
#endif
)
{
_bIRKey = IR_NONE;
}
else /* if (_bIRKey == IR_POWER) */
#endif
{
/* update VFD immediately */
#if !(defined(DL333_T100))
/* stop UI task */
vUIStop();
#endif
}
}
#endif
/***************************************************************************
Function : void vUIStart(void)
Dsecription : called from Timer task after RISC start
Parameter : None
Return : None
***************************************************************************/
void vUIStart(void) large
{
#ifdef PLAY_AUDIO_CLIP
/* vSendUopCmd(UOP_AUDIO_CLIP, SV_ACLIP_FLASH, ACLIP_TADA, 0); */
#endif
vOsdCoreInit();
vOsdSetLang(bEepromReadByte(OSD_LANG_POSITION));
/* power on is mute, remember turn on volume */
#ifdef BBK_NEW_GUI
_bVolLimit = bEepromReadByte(MAX_VOL_LTD_POS);
vAdspVolume(bEepromReadByte(MAIN_VOLUME_POS));
#else
vAdspVolume(AUD_DEFAULT_VOL);
#endif
// Check EEPROM size
#ifdef I2C_EEPROM
if (EEPROM_TOTAL_SIZE > EEPROM_MAX_SIZE)
{
_bPlayerErrCode = PLAYER_ERR_EEPROM_CONFIG;
}
#endif
// Check user share memory size
if ((SH_USER_DATA_MAX - SI_USER_START) >= SI_USER_DATA_GRP_NO * 32)
{
_bPlayerErrCode = PLAYER_ERR_USER_DATA;
}
}
/***************************************************************************
Function : void vUIStop(void)
Dsecription : called from Timer task before RISC stop
Parameter : None
Return : None
***************************************************************************/
void vUIStop(void) large
{
_rUI.bState = UI_STOP;
}
/***************************************************************************
Function : void vUIExit(void)
Dsecription : called from Timer task after RISC stop
Parameter : None
Return : None
***************************************************************************/
void vUIExit(void) large
{
// vVfdBrightSwitch(VFD_BRIGHT_OFF);
}
/***************************************************************************
Function : BYTE bGetPlayPostKeyPriority(BYTE bKey)
Dsecription :
Parameter : None
Return : None
***************************************************************************/
static BYTE bGetPlayPostKeyPriority(BYTE bKey)
{
BYTE bPriority = 0xff;
switch (bKey)
{
case IR_POWER:
case IR_EJECT:
case IR_MANUAL_EJECT:
bPriority = 0;
case IR_PASSWORD:
case IR_HDN_PASSWORD:
bPriority = 1;
break;
case IR_CMD_DONE:
case IR_TIME_OUT:
case IR_DONE:
case IR_UPG:
case IR_SELECT_DONE:
bPriority = 2;
break;
default:
if (bKey < IR_KEY_MAX)
{
bPriority = 3;
}
break;
}
return (bPriority);
}
/***************************************************************************
Function : void fgSetPlayPostKey(BYTE bKey)
Dsecription :
Parameter : None
Return : None
***************************************************************************/
BOOL fgSetPlayPostKey(BYTE bKey) large
{
BYTE bNewPri, bCurrPri;
if (bKey == _bPlayPostKey)
{
return (TRUE);
}
bNewPri = bGetPlayPostKeyPriority(bKey);
bCurrPri = bGetPlayPostKeyPriority(_bPlayPostKey);
if (bNewPri > bCurrPri)
{
return (FALSE);
}
if (fgIsNoInputState() == FALSE)
{
if (bNewPri == 1)
{
vSetExitInputState();
}
}
_bPlayPostKey = bKey;
return (TRUE);
}
#ifdef AUDIO_STREAM_CHANGE_MUTE
/***************************************************************************
Function : void vSetAudioStreamChange(BYTE bOpt1, BYTE bOpt2, BYTE bOpt3) large
Dsecription :
Parameter : None
Return : None
***************************************************************************/
void vSetAudioStreamChange(BYTE bCnt, BYTE bOpt1, BYTE bOpt2, BYTE bOpt3) large
{
vSetSharedInfo(SH_CHG_AST_CNT, bCnt);
vSetSharedInfo(SH_CHG_AST_OPT1, bOpt1);
vSetSharedInfo(SH_CHG_AST_OPT2, bOpt2);
vSetSharedInfo(SH_CHG_AST_OPT3, bOpt3);
_fgAstChg = TRUE;
}
#endif /* AUDIO_STREAM_CHANGE_MUTE */
#ifdef EN_DISC_ID_CHK
/***************************************************************************
Function : void vSetAudioStreamChange(BYTE bOpt1, BYTE bOpt2, BYTE bOpt3) large
Dsecription : call from main loop
Parameter : fgFound, TRUE: ID is found, FALSE: ID is not found
Return : None
***************************************************************************/
#pragma disable
void vSetDiscIDCheckResult(BOOL fgFound) large
{
vSetDiscInitFlag(DISC_INIT_LOCK_CHK);
if (fgFound)
{
_rOsdStateCtx.bDiscIDFound = TRUE;
}
else
{
_rOsdStateCtx.bDiscIDFound = FALSE;
// since no ID id found, no need to check password
vSetDiscInitFlag(DISC_INIT_WAIT_PWD_IN);
vSetDiscInitFlag(DISC_INIT_PWD_OK);
}
}
#endif /* EN_DISC_ID_CHK */
#ifdef PORTABLEDVD
void vBBKTimer(void) large {
#ifdef DL333_T100_PIC
if(_bOSDClearCounter != 251) {
if(_bOSDClearCounter == 0) {
#ifdef AUDIOIN_DETECT
if(BBK_MUTE_FLAG == 1)
{
vOsdShowAudioIn(OSD_MUTE_ON);
}else
#endif
if(_rAudioCtrl.sVol.fgIsMute == TRUE)
{
vOsdShowMute(OSD_MUTE_ON);
}
_bOSDClearCounter = 251;
_fgInPictureMode = FALSE;
#ifdef T112_Adjust_VCOM
_bTFTChgIdx = 0;
#endif
#ifdef DL333_T100_T
_bOSDClearCounter = 250;
_fgInPictureMode = TRUE;
if(_bPictureMode == 0xff)
{
_bOSDClearCounter = 251;
_fgInPictureMode = FALSE;
_bPictureMode = 0;
vOsdPosClear(OSD_POS_FS_INFO_BAR);
vOsdPosClear(OSD_POS_AUD_CTRL);
}
#endif
#ifdef DL339_MENU
_fgInBBKMenuMode = 0;
if(BBKBackLight)
{
BBKTFTSetBackLight(TRUE);
}
#endif
#ifdef OSD_EN
_bPictureMode1 = 0xff;
OSDDisable();
#endif
}
else if(_bOSDClearCounter > 251)
_bOSDClearCounter = 251;
#ifdef DIRECT_Adjust_VCOM
else if(((VCOM_ENTER_EN !=0xff)&&(VCOM_ENTER_EN!=0x0f))&&(_bOSDClearCounter > 0))
#else
else if(_bOSDClearCounter > 0)
#endif
{
#ifdef T112_Adjust_VCOM
if(_bTFTChgIdx == 0xf)//here must greater than size of password length(4)
{
if(_bOSDClearCounter == 1)
{
_bOSDClearCounter = 250;
}
}
#endif
_bOSDClearCounter --;
}
}
#endif
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -