⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frntp.c

📁 M3355的源代码
💻 C
📖 第 1 页 / 共 5 页
字号:
#if 0

    PLAYPOINT CurPoint;
#endif
    // End for LG#722

#if(_DEALER_LOCK_MODE == _DEALER_LOCK_ENABLE_)
	//MAGGIE40210
	if(bDealerLockTimer||bDealerUnlockTimer)
		return;
	//MAGGIE40210
#endif

    if(g_VFD_ShowInfo.MenuChk==C_ON)
    {
        tt =0;
		bFPLastplay = FALSE;
        Pre_FPState=g_VFD_ShowInfo.FPState;
        return ;
    }

    switch(g_VFD_ShowInfo.FPState)
    {
    case C_FP_PLAY:
        if(MachineState == C_MACHINE_ST_OPENING || MachineState == C_MACHINE_ST_UNCLOSED)
            return;


        if(Pre_FPState != C_FP_PLAY && Pre_FPState != C_FP_RESUME_STOP )
        {
            if(!bFPLastplay)
                tt =0;
            //301020-04Mi
            if(bFPLastplay)
           	{
           		//maggie add for VFD show
           		tt = DISCLASTPLAYINFO.LASTPLAYPOINT.dwVideoPlayTime;
                bFPLastplay = FALSE;
            }
        }
        /* If playing DVD and current NV Play status is STOP, then Refreshing time is forbidded. */
        if(cReadTime>GetTimeRate)
        {
            if(!(bNVRefreshTime == FALSE && g_VFD_ShowInfo.FileType != C_JPGFILE))
                tt=NVGetVideoTime(bVFDShowTimeMode);//g_VFD_ShowInfo.TimeShowMd);
            //	         FPUpdateTime(tt);
            cReadTime=0;
        }
        else
            cReadTime++;

        // Start for LG#722
#if 0

        NVGetCurInfo(&CurPoint);
        if( (g_VFD_ShowInfo.DiscType==C_SVCD||g_VFD_ShowInfo.DiscType==C_VCD20)&&\
                IsVCD20SVCDSelectionList()==TRUE )
        {
            if(g_VFD_ShowInfo.PBCChk == C_OFF)
            {
                tt = NVGetTotalTime();
                FPUpdateTime(tt);
            }
        }
#else
        if ((g_VFD_ShowInfo.DiscType==C_SVCD||g_VFD_ShowInfo.DiscType==C_VCD20))
        {
            //if (NVIsVCDTimeValidPBCON()&&NVIsVCDStillPicSlideShow())
           //if(!IsVCD20SVCDSelectionList())
           if(IsVCD20SVCDSelectionList()&&NVIsVCDTimeValidPBCON())
                FPUpdateTime(tt);
           else if(!IsVCD20SVCDSelectionList()&&(NVIsVCDStillPicSlideShow()||NVIsVCDTimeValidPBCON()))
                FPUpdateTime(tt);
        }
#endif
        // End for LG#722
        else if(!(g_VFD_ShowInfo.DiscType == C_FILEOPENDISC && g_VFD_ShowInfo.FileType == C_JPGFILE))
            FPUpdateTime(tt);
        break;
    case C_FP_STANDBY:
        break;
    case C_FP_RESUME_STOP:
#if(_DEALER_LOCK_MODE == _DEALER_LOCK_ENABLE_)
              if(g_VFD_ShowInfo.DiscType == C_HDCDDA ||\
                      g_VFD_ShowInfo.DiscType == C_CDDA  ||\
                      g_VFD_ShowInfo.DiscType == C_VCD10 ||\
                      g_VFD_ShowInfo.DiscType == C_DVD  ||\
                      (g_VFD_ShowInfo.DiscType == C_FILEOPENDISC &&
                       g_VFD_ShowInfo.FileType != C_JPGFILE))
              {
                  FPUpdateTime(tt);
              }
              else if( g_VFD_ShowInfo.DiscType == C_VCD20 || \
                       g_VFD_ShowInfo.DiscType == C_SVCD)
              {
                  if(g_VFD_ShowInfo.PBCChk == C_OFF)
                  {
                      FPUpdateTime(tt);
                  }
              }
              else
                  ;
#endif
        break;
    case C_FP_STOP:
        if(bNeedRestore == FALSE)
        {

            //30107-03mi
            if(g_VFD_ShowInfo.DiscType == C_HDCDDA ||\
                    g_VFD_ShowInfo.DiscType == C_CDDA  ||\
                    g_VFD_ShowInfo.DiscType == C_VCD10||g_VFD_ShowInfo.DiscType==C_DTSCD)
            {
                tt = NVGetTotalTime();
                FPUpdateTime(tt);
            }
            else if( g_VFD_ShowInfo.DiscType == C_VCD20 || \
                     g_VFD_ShowInfo.DiscType == C_SVCD)
            {
                if(g_VFD_ShowInfo.PBCChk == C_OFF)
                {
                    tt = NVGetTotalTime();
                    FPUpdateTime(tt);
                }
            }
            //31101-Du

            else if(g_VFD_ShowInfo.DiscType==C_FILEOPENDISC)
            {
                tt=0;
            }
            else if(bIsSecondStop||!DISCLASTPLAYINFO.LASTPLAYPOINT.bPlayEnable)
                tt=0;
            else
                ;
#ifdef _MPLAY_ENABLE_
			if(g_VFD_ShowInfo.DiscType==C_FILEOPENDISC)
			{
				MPO_GetPositionInfo(&tMPFCurPosition);
				if(tMPFCurPosition.iPlayerFocused == MPLR_MOVIE||tMPFCurPosition.iPlayerFocused == MPLR_MUSIC)
				{
					tt = 0;
	               // FPUpdateTime(tt);
	            	PnlDisplayTime(0,0,0);
				}
			}
#endif
        }
        break;
    case C_FP_LOAD:
        break;

    case C_FP_DTEND:
        //30107-03mi
        if(g_VFD_ShowInfo.DiscType==C_CDDA||g_VFD_ShowInfo.DiscType==C_DTSCD\
                ||g_VFD_ShowInfo.DiscType==C_HDCDDA||g_VFD_ShowInfo.DiscType==C_PICTURE_CD)
        {
            tt = NVGetTotalTime();
            FPUpdateTime(tt);
        }
        if (!bFPLastplay&&(g_VFD_ShowInfo.DiscType==C_SVCD||g_VFD_ShowInfo.DiscType==C_VCD20))
			tt = 0;
#ifdef _MPLAY_ENABLE_
		if(g_VFD_ShowInfo.DiscType==C_FILEOPENDISC)
		{
			MPO_GetPositionInfo(&tMPFCurPosition);
			if(tMPFCurPosition.iPlayerFocused == MPLR_MOVIE||tMPFCurPosition.iPlayerFocused == MPLR_MUSIC)
			{
				tt = 0;
	           // FPUpdateTime(tt);
	        	PnlDisplayTime(0,0,0);
			}
		}
#endif
        break;
        //31101-Du
    case C_FP_OPEN:
        if(g_VFD_ShowInfo.DiscType==C_FILEOPENDISC)
        {
            tt=0;
        }
        break;
    default:
        break;
    }
    Pre_FPState=g_VFD_ShowInfo.FPState;

}
/*****************************************************************************
 Function     : VFDPart2Clear
 Description  : clear VFD part2 
 Arguments    : None
 Return value : None
 2003/04/24  Jane Liao Added
*****************************************************************************/
void VFDPart2Clear()
{
    if(bNeedRestore == TRUE)
    {
        PnlReStore();
        bNeedRestore = FALSE;
    }
    PnlDisplayTime(PNL_DISPLAY_OFF, 0, 0);
}


/*---------------------------------------------------------------
 * Function_Name:VFDProcShowMsg
 * Arguments:
 * Return Value: 
 * Remarks:Receive and Process message from UI
 * 2003/04/25  Added by jane and brook
 *--------------------------------------------------------------*/
void VFDProcShowMsg(void)
{
    VFDMSG Msg;

    if((prcv_mbf( (VP)&Msg, (INT *) &RSize, FP_mbfid) == E_OK))
    {
        //PRINTF("FrontPanel:VFDProcShowMsg 0x%x\n",MsgType);
    }
    else
        //PRINTF("VFD Receive message error!\n");
        return;
    if(Msg.MSG_Type== VFD_REFRESH_PART1_SHOW)
    {
        VFDPart1Show();
    }
    else if(Msg.MSG_Type== VFD_REFRESH_PART2_SHOW)
    {
        switch(g_VFD_ShowInfo.TimeState)
        {
        case C_SENDTIMEOK:
            SendTime2UI=TRUE;
            break;
        case C_UNSENDTIME:
            SendTime2UI=FALSE;
            break;
            /*case C_OFFTIME:
            TimeONFlg=FALSE;
            break;
            case C_ONTIME:
            TimeONFlg=TRUE;
            	break;*/
        }
    }
    else if(Msg.MSG_Type== VFD_CLEAR_PART1_SHOW)
        VFDPart1Clear();
    else if(Msg.MSG_Type== VFD_CLEAR_PART2_SHOW)
        VFDPart2Clear();
    else if(Msg.MSG_Type== VFD_SYSTEM_SHOW)
        VFDSystemShow(Msg.MSG_DATA1);
    else if(Msg.MSG_Type==VFD_EPROM_SHOW)
        VFDEpromShow(Msg.MSG_DATA1, Msg.MSG_DATA2);
    else if(Msg.MSG_Type==VFD_P_CLR_SHOW)
        VFDPClrShow();
    else if(Msg.MSG_Type==VFD_UPGRADE_SHOW)
        VFDUpgradeShow(Msg.MSG_DATA1);
    else if(Msg.MSG_Type==VFD_REGIONCODE_SHOW)
        VFDRegionCodeShow(Msg.MSG_DATA1);
    else if(Msg.MSG_Type==VFD_RESTORE)
        VFDRestore();
    else
        PRINTF("The message get from UI is error!\n");
}


#if ( STANDBY_MODE==StandBy_Enable )
void sleep_standby(void)  //30210-01jf
{
    //30316-01ho move to here
    halMuteOnOff(TRUE,80,125); // 30304-01 ji Audio Noise when Power on/off digital output
    //30316-01ho move to here
    StopATATask();
    // 30317-01Ji Power on/off close tray error  Begin
    if (BEject)
    {
        CloseTray(1);/*close tray immediately*/
        //BEject = FALSE;
        while(g_vATADoorStatus() && (g_iServoCloseTrayTime<8))
            delay(450);
        if (g_iServoCloseTrayTime==8)
        {
            //            OpenTraySong(0);
            delay(500);
        }
    }
    g_iServoCloseTrayTime = 0;//20030620 Tom Yang for standby
    // 30317-01Ji Power on/off close tray error  End
    //CloseTray(1);
    //while(g_vATADoorStatus()) delay(250);
    //g_bStopDisc(1);//20030620 Tom Yang for standby removed

    MachineState = C_MACHINE_ST_STDBY;
    FP_StopAll();
    /* TM can add device power down into ChipsPowerDown() here. Mel 10/9/2000 */
    //ChipsPowerDown(TRUE); remove by Tom yang for stantby 20021226
    //TPE Edmund and Sean for tray open, close tray first 20021107
    ATAShutDown();//TPE Sean mark 20021208

    g_vATAPIStandbyImmediate();//20030620 Tom Yang for standby

#if(_FP==91)

    VfdSetLed(0x02);//set mustek LED to red
#endif

    VfdDisplayOff();/*VFD LED Off*/
    /* Set TVEncoder Standby, this cause no signal output to TV, David */
    halTVEncoderStandby(TRUE);
    // Let audio mute ; tomgao
    //DecSetMute(TRUE); // 30304-01 ji Audio Noise when Power on/off digital output
    //halMuteOnOff(TRUE); // 30304-01 ji Audio Noise when Power on/off digital output
    //SET_GPIO_W(AUDIO_MUTE); // 30304-01 ji Audio Noise when Power on/off digital output
    //Set_GPIO_Mute(FALSE);   // 30304-01 ji Audio Noise when Power on/off digital output

    //SET_GPIO_W(STAND_BY);
    //SET_GPIO_LOW(STAND_BY);/* pull STAND_BY low */

#if (_TRANSFER_ALI_BOARD_ == _TRANSFER_ALI_BOARD_DISABLE_)
#else
    SET_GPIO_W(Power_SW);
    SET_GPIO_LOW(Power_SW);
#endif

    //maggie for vfd show wrong after key power on
#if (_TRANSFER_ALI_BOARD_ == _TRANSFER_ALI_BOARD_DISABLE_)
#else
    STB_main();
#endif    
    while(1)
    {
        ;
    }
    //maggie for vfd show wrong after key power on
}
#endif

/*****************************************************************************
 Function     : FpReceiveKey
 Description  : To receive key message from panel
 Arguments    : None
 Return value : None
*****************************************************************************/
void FpReceiveKey(KEYPAD* key)
{
    MSG2UI        FpKeyCode2UI;
    LoaderStatus loader_status;

    PRINTOUT( ER_FpReceiveKey | ER_PNL_Enter);

    if(bPowerOff)   //Added by brook,if power off,don't receive any key
        return;

    if (key->count > 2)
    {
        key->count=0;
        key->code = PnlGetKey();

#if(_DEALER_LOCK_MODE == _DEALER_LOCK_ENABLE_)        
        if(bDealerLock)
        {
        	//maggie40212
           // if ( (key->code == C_KEY_OPEN) || (key->code == C_KEY_POWER) )
           //if(key->code != C_KEY_POWER)
           if (key->code == C_KEY_OPEN)
                return;
        	//maggie40212
        }
#endif        

        if ((key->code != 0xff) && (key->code != 0xfe) && (key->code != key->lastcode) )
        {
            if(DiscType == C_ALICDROM)
            {
                if ((g_UpgradeWaitUserKey_UP==1)&&(key->code==C_KEY_UP) )
                    g_flag_AllowUpgrade=1;
                if ((g_UpgradeWaitUserKey_OpenPower==1)&&( (key->code==C_KEY_OPEN)||(key->code==C_KEY_POWER)) )
                    g_flag_AllowCloseTray=1;
                PnlSetKey(0xFF);

            }
            else
            {

#if(_CUSTOM == CYBERHOME)
                if (TrayIsOutOfFP() && (key->code == C_KEY_PAUSE ||key->code == C_KEY_PLAY || key->code == C_KEY_ENTERPLAY))
                    key->code=C_KEY_OPEN;
                //030904-01lily:for play key should play the role of close and play together when tray open
#else

                if(TrayIsOutOfFP()&&(key->code==C_KEY_PLAY||key->code==C_KEY_ENTERPLAY))
                {
                    bPlayClose=TRUE;
                    key->code=C_KEY_OPEN;
                }
#endif


                if ( (key->code == C_KEY_OPEN || key->code == C_KEY_POWER) && g_UiCrntSubFunc == UI_SUBFUNC_PL)
                {
                    NVSetPWRes(FALSE);
                    OpenTrayInPL=1;
                }

                FpKeyCode2UI.Type=C_FP_KEY;
                FpKeyCode2UI.Input=key->code;

                PRINTF("FrontPanel:Keypad code:0x%x\n",key->code);

                if ((key->code==C_KEY_OPEN))
                {
                #if ( _SETUP_MODE==_SETUP_MENU_Enable )

                    if(g_UiCrntFunc == UI_FUNC_SETUP&&GetSetupWarnMode())
                    {
#if (_TRANSFER_ALI_BOARD_ == _TRANSFER_ALI_BOARD_DISABLE_)
                        PnlSetIR(0xFE);
#else
                        PnlSetIR(0xFF);
#endif
                    }
     

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -