📄 player.~c
字号:
#if defined(PSCAN_EN)
#if !defined(K990)
#if defined(DAV935)
if (_bIRKey == IR_AUTO_SEARCH_TEMP)
_bIRKey = IR_COMPONENT; //I-Scan
else if (_bIRKey == IR_STORE_BAND)
_bIRKey = IR_PSCAN; //P-Scan
#else
#if !defined(ER1500)
if (_bIRKey == IR_BAND)
_bIRKey = IR_NONE; //I-Scan
else if (_bIRKey == IR_AUTO_MAN)
#else
if (_bIRKey == IR_AUTO_MAN)
#endif
_bIRKey = IR_NONE; //P-Scan
#if defined(DVR979)
else if (_bIRKey == IR_STORE_BAND)
_bIRKey = IR_EQUALIZER;
#endif
#endif
#else
if (_bIRKey == IR_COMPONENT_TEMP)
_bIRKey = IR_NONE; //I-Scan
else if (_bIRKey == IR_PSCAN_TEMP)
_bIRKey = IR_NONE; //P-Scan
#endif
#endif
//XIAO 03-06-19 FOR L/R key
#if !defined(BBK940S) && !defined(BBK950S) && !defined(DVD_AMP) //XIAO 03-08-25
if (IS_SVCD_TYPE(bDiscType) || (bDiscType == SV_CVD))
{
if (_bIRKey == IR_OSD_LANGUAGE)
{
_bIRKey = IR_VOCAL_ASSIST;
}
}
else if ( ((bDiscType >= SV_VCD3_0) && (bDiscType <= SV_VCD6_1)) ||
((bDiscType >= SV_CDDA) && (bDiscType <= SV_HDCD)))
{
if (_bIRKey == IR_OSD_LANGUAGE)
_bIRKey = IR_AUDIO;
else if (_bIRKey == IR_AUDIO)
_bIRKey = IR_NONE;
}
else //DVD
{
if (_bIRKey == IR_OSD_LANGUAGE)
_bIRKey = IR_NONE;
}
#endif
#endif
}
}
}
#if defined(DVD_AMP)//when mute on ,every key can mute off
if(_bPlayerMute &&_bIRKey != IR_NONE&&_bIRKey != IR_FUNCTION)
_bIRKey = IR_MUTE;
#endif
}
/***************************************************************************
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();
#ifdef HK_OnlyCD
{
vSetSharedInfo(wSIItemPos(SI_SHM_CFG_GRP, 30), bSharedInfo(SI_TVE_OUT_MODE));
vSetSharedInfo(SI_TVE_OUT_MODE, 0xff);
vNotifySharedInfo(SI_TVE_OUT_MODE, 0, 0);
}
#endif
}
/***************************************************************************
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
/* note this must be placed after VfdTimer() and before vIrTimer() */
vGetCurrKey();
#ifdef SLEEP_FUNCTION //XIAO 03-04-14
if(_fgPowerDown == TRUE)
{
_fgPowerDown = FALSE;
_bSetSleepState = SLEEP_OFF;
_bIRKey = IR_POWER;
}
#endif
#ifdef PLAYER_GOTO
if (fgIsInGoto())
{
if( (_bPrevNtscPal != bSharedInfo(SI_NTSC_PAL)) && (_bIRKey == IR_NONE) )
{
_bIRKey = IR_GOTO;
fgSetPlayPostKey(IR_GOTO);
}
}
else
_bPrevNtscPal = bSharedInfo(SI_NTSC_PAL);
#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)
{
#if 0//defined(DVD_RECEIVER) //XIAO 03-09-24
if (fgIsScrSaverOn() && _bIRKey == IR_RE_FUN)
_bIRKey = IR_AUDIO; //唤醒屏保
#endif
vIrTimer();
}
/* 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();
/* 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 */
vVfdTimerState(TRUE);
/* get current key */
if (_bVfdKeyScan != IR_NONE)
{
_bIRKey = _bVfdKeyScan;
_bVfdKeyScan = IR_NONE;
}
/* note the _bIRKey0 is put in the IR interrupt */
else if (EXIST_IR_KEY())
{
GET_IR_KEY(_bIRKey);
#if !defined(DVD_RECEIVER) //xiao 03-04-29
if (_bIRKey != IR_POWER)
{
_bIRKey = IR_NONE;;
}
}
/* only power key and eject key is valid */
// if ((_bIRKey != IR_POWER) && (_bIRKey != IR_EJECT))
if ((_bIRKey != IR_POWER)
{
_bIRKey = IR_NONE;
}
else /* if (_bIRKey == IR_POWER) */
{
/* update VFD immediately */
/* stop UI task */
vUIStop();
}
#else
} //if (EXIST_IR_KEY())
#if defined(DVD_AMP)//when mute on ,every key can mute off
if(_bPlayerMute &&_bIRKey != IR_NONE&&_bIRKey != IR_FUNCTION) _bIRKey = IR_MUTE;
#endif
//======================================================
if (_bSysState != PD_STATE) //Temp Message show time
{
#ifdef USE_RDS
if(_bTimeCnt!=0xff)
{
if(_bTimeCnt!=0)//about rds
{
_bTimeCnt--;
}
}
#endif
#ifdef DEL_NOISE
if(Lag_Timer>0&&Lag_Timer!=0xff)
{
Lag_Timer--;
if(Lag_Timer==0)
{
Lag_Timer =0xff;
}
}
#endif
if (_bChCount != 0)
{
if (_bChTimer != 0)
{
_bChTimer--;
if (_bChTimer == 0)
{
_bChCount--;
_bChTimer = CH_OSD_TIMER;
}
}
}
}
else
{
//==============Key Shift in PowerDown statue==============
// if (_bIRKey == IR_EJECT)// || _bIRKey == IR_PLAY_ENTER)
// _bIRKey = IR_POWER;
}
#endif
}
#endif
#ifdef MT1379_MANUFACTURE_TEST
extern void vShowTestVer() large;
#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
#ifdef MT1379_MANUFACTURE_TEST
vShowTestVer();
#endif
vOsdCoreInit();
vOsdSetLang(bEepromReadByte(OSD_LANG_POSITION));
/* power on is mute, remember turn on volume */
vAdspVolume(AUD_DEFAULT_VOL);
// 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 PICTURE_QULITY_KEY
void vBBKTimer(void) large
{
if(_bOSDClearCounter != 120) {
if(_bOSDClearCounter == 0) {
vOsdPosClear(OSD_POS_AUD_CTRL);
_bOSDClearCounter = 120;
_bPictureMode = EV_PICTURE_OFF;
_fgInPictureMode = FALSE;
}
else if(_bOSDClearCounter > 120)
_bOSDClearCounter = 120;
else if(_bOSDClearCounter > 0)
_bOSDClearCounter --;
}
}
#endif
#ifdef SCART_SELECTION
void vScartSet(void) large
{
WriteBIM(0x68, (bReadBIM(0x68) & 0xbf)|0x40);
WriteBIM(0x6b,(bReadBIM(0x6b) & 0xbf)|( 0x40));
}
void vScartClr(void) large
{
WriteBIM(0x68, (bReadBIM(0x68) & 0xbf)|0x40);
WriteBIM(0x6b,(bReadBIM(0x6b) & 0xbf)|(0));
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -