📄 mrgtmp0
字号:
__bSTCRunning=FALSE; __bSkip1Sec = SKIP_NONE; //CLEAR highlight HAL_ControlHighlight(HAL_HLI_ACTION_TURNOFF, 0); // clear the highlight/button info. __bBTN_Ns=0; __bSELBTN_Ns=0; __bForceActiveBTNN=0; __bCellActiveBTN=FALSE; // DVD_160Micky // reference VI3-66, once transferred to Action state, any transfer shall not allowed _bButtonState = CELL_BUTTON_NONE; // clear CELL still state __bStillTime=0; //Aron2.37, clear start & end of presentation time here. __dwVOBU_S_PTM = 0; __dwVOBU_E_PTM = 0; __bCellState=CELL_SEARCH_1ST_NV; // Micky2.80, review global variables init. _dwPreScanPosition=0xffffffff; // Micky1.02, fix time search forward, will hang at below loop(after total reset) // video wait pic size to become positive value // but cell wait STC to reach VOBU_E_PTM to send next VOBU // need investigate why can't detect 1st video pts // must force to update STC before play dedicated VOBU. // can remove the force reset STC when the problem is cleared _bForceResetSTC = 0; // LLY2.32, porting Micky's code for using time map table // Micky07312006 begin, for TMAP // LLY2.38, remove it since it will be done earily within CELL_CellInitial() //_bUpdateSCR = FALSE; // Micky07312006 end ...#ifdef CELL_FORCE_LINEAR_PLAY_TEST _bLinearNPFFlags = CELL_LINEAR_NPF_OK; DVD_ParseInfo ( DVD_TT_PB_TY, &__dwTemp, __bTitle ); if((__dwTemp & 0x40) || // Not an One_Sequential_PGC title __bVOBUStill || __bInterleaved || (__bAGL_Ns > 1) || (__bDomain != TT_DOM)) { _bLinearNPFFlags = 0; }#endif // #ifdef CELL_FORCE_LINEAR_PLAY_TEST // LLY2.32, must always disable NV_PAUSE command while playback a new cell range //Ming0.80, If run the previous cell in linear mode. The NV pause is opened. // Must close it before playing the next cell. PARSER_ActionFilter(0, PARSER_ENABLE_NV_PAUSE, FALSE);#endif //#ifndef NO_DVD // Suppose the setting should be ready before playing CELL // if bEnableRunning=TRUE, must call SrcFilter_Stop to set it as FALSE. // or SrcFilter_ReadSectors won't do the action. // put at UTL_PlayFromTime??? // wyc2.53-909P, SrcFilter_Stop(__dwSFStreamID); // set NV buffer address // Chuan0.85, Use DS_NV_BUF_ADDR_ST/DS_NV_BUF_ADDR_END // LLY2.17, remove it since it will be done @ HAL_SetDiscType() //PARSER_SetOutBufferAddress(PARSER_ES_NV, DS_NV_BUF_ADDR_ST, DS_NV_BUF_ADDR_END); // enable parsing NV PARSER_ActionFilter(0, PARSER_ENABLE_NV, TRUE); return TRUE;}//DVD_036GOTOTIME beginBYTE CELL_TimeSearch(BYTE bFunction, DWORD dwTime){#ifndef NO_DVD switch(bFunction) { case CELL_TIME_FREEZE: // DVD_171-2Micky, re-define the parameter for _bEnableTimeSearch // force CELL to stay at end of VOBU _bEnableTimeSearch=CELL_TIMESEARCH_FREEZE; break; case CELL_TIME_PLAY:#ifdef DUMP_CELL_INFO DBG_Printf(DBG_THREAD_CHEERDVD, DBG_INFO_PRINTF, "\nTimeSearch, __bCellState=0x%hx, __dwVOBUSA=0x%lx", __bCellState, __dwVOBUSA);#endif //#ifdef DUMP_CELL_INFO // DVD_171-2Micky, re-define the parameter for _bEnableTimeSearch // will search VOBU time till specified time is found _bEnableTimeSearch=CELL_TIMESEARCH_TIME; _dwSearchTime=dwTime; // LLY2.32, porting Micky's code for using time map table // Micky07312006 begin, for TMAP // will do TMAP search first#ifdef SUPPORT_TMAP_SEARCH __bCellAction = TIME_SEARCH;#endif //#ifdef SUPPORT_TMAP_SEARCH // Micky07312006 end ... break; case CELL_TIME_VOBU: // directly play from specified VOBUSA. __dwVOBUSA=dwTime; // DVD_171-2Micky, when time search from specified VOBUSA // and not from 1st VOBU, will force to read 1st NV for __dw1stSCR value // (<=170, was done by CellInitial whenever it's called) // Can test GoldenEye-> menu->play(action is resume), display time. // Dinosaur title is same. if (__dwVOBUSA != 0) { // LLY2.55, enable update SCR flag to find 1stSCR while SCB mode crossing cell // And, remove old procedure: dump 1st NV sector within the cell. _bUpdateSCR=TRUE;#if 0 __dwTimeBegin = __dwCellFVOBUSA ; __dwTimeEnd = __dwCellFVOBUSA ; // LLY2.35, give start and end time for UTL_PlayFromTime() since the API is updated UTL_PlayFromTime (__dwCellFVOBUSA, __dwTimeEnd) ; // Ming0.68-909, Must wait for NV to update the SCR. // Micky1.01, Fix "The Man with the golden gun"-> 1/2-> root menu-> play(resume) // the display time will show chapter begin then real resume time. // must enlarge the time out to 2s. if(!_WaitParserEventNV(COUNT_2_SEC) ) //COUNT_500_MSEC)) { __dw1stSCR = 0; // LLY1.01, clear break here, since following flow must be done continue. //break; } else { //Micky0.68, get SCR from DSI //HAL_ReadInfo(HAL_INFO_SCR, &__dw1stSCR); //Ming0.80, use PCI and DSI directly. //HAL_CopyDRAM (DSI_GI_BASE, (DWORD)&__dw1stSCR, 4); __dw1stSCR = COMUTL_ReadBufferDWORD ( (char *)&(_pDSI->DSI_GI.NVPCK_SCR), 0);//_pDSI->DSI_GI.NVPCK_SCR; }#endif // #if 0 // Micky1.00-2, Fix "Chocolate" Menu-> 2nd highlight-> play film(resume) can't play. // The DPS will wait STC to reach the resumed position's STC then continue decoding // need let video update 1st PTS from parser(video pts) // after RISC update, it will set the value as 0x11xxxx. // COMMAND_NEWSTC will auto set DRAM_STC_UPDTAE as 0 too. // Micky1.02, fix time search forward, will hang at below loop(after total reset) // video wait pic size to become positive value // but cell wait STC to reach VOBU_E_PTM to send next VOBU // need investigate why can't detect 1st video pts // must force to update STC before play dedicated VOBU. // can remove the force reset STC when the problem is cleared HAL_ControlAVSync (HAL_AVSYNC_VIDEOMASTER, 1); // ** TCH1.00-908; Enable Video Master Mode. _bForceResetSTC = TRUE; // Micky1.01, fix resume play, sometimes will play from cell begin. // The reason: __dwCurrentVOBUSA is used to keep resume information. // When resume play, CELL_CellInitial() will be called and __dwCurrentVOBUSA will be clear as zero. // And, assign the proper value to __dwCurrentVOBUSA when NV sector is found. // So, if it's too late to find NV sector done, the value is zero and is un-expected. // For resuem play case, we will call CELL_CellInitial() + CELL_TimeSearch(CELL_TIME_VOBU, dwTime) // Suppose, we can assign __dwCurrentVOBUSA w/ dwTime to solve this problem. __dwCurrentVOBUSA = __dwVOBUSA; } //Aron2.38, check system supports still resuming or not if(UTL_QueryCapability(QUERY_SUPPORT_STILLRSM)) { //Aron2.38, It means we will do the still resuming and prepare to do SCAN I picture //This is the 1st stage of still resuming. if(__bStillRSM) { UTL_TransferCommandID(KEY_SCF); DISP_STCFreeze(0, DISP_FORCE_FREEZE_STC); //UTL_OutputShowTime(); } } break; }#endif //#ifndef NO_DVD return TRUE;}//DVD_036GOTOTIME end// LLY1.50, collect force linear playback testing code into a API// **********************************************************************************************// Function : _ForceLinearPlayback// Description : Force enter linear playback mode, the playback range is 1st VOBU to last VOBU// Arguments : None// Return : TRUE, enter force linear playback mode// FALSE, don't enter force linear playback mode, ie VOBU by VOBU// **********************************************************************************************BYTE _ForceLinearPlayback(void){// DVD_172Micky, debug performance codes.#ifdef FORCE_LINEAR // for test performance // Micky0.66-909. let each go the linear path if(__dwVOBUSA==0) // __dwVOBUSA == 0, means 1st VOBU of current cell. { // Give range from 1st VOBU to last VOBU within this cell __dwVOBUStart = __dwCellFVOBUSA + __dwVOBUSA; __dwVOBUEnd = __dwCellLVOBUEA; __dwTimeBegin = __dwVOBUStart; __dwTimeEnd = __dwVOBUEnd; // LLY2.35, give start and end time for UTL_PlayFromTime() since the API is updated UTL_PlayFromTime(__dwVOBUStart, __dwTimeEnd); // Change Cell action to VOBU_PLAYING to continue playback to end. __bCellAction=VOBU_PLAYING; DBG_Printf(DBG_THREAD_CHEERDVD, DBG_INFO_PRINTF, "Force enter linear playback mode\n"); return TRUE; }#endif //#ifdef FORCE_LINEAR return FALSE;}// Aron 2.30, add for VOBU time control error concealment mechanism usageDWORD __dwVOBUTIMECheck;DWORD __dwVOBUTIMECheckInterval = 0;DWORD __dwSTCBlockChecking = 0;//**********************************************************************// Function : CELL_Trigger// Description : Called when the state machine is changed to CELL_STATE// :// return : HIBYTE, The next state (CELL_STATE, NV_COMMAND_STATE, PGC_STATE)// : LOBYTE, the parameter for the state//DVD_039-1// : VOBU_PAYING , means still playing a VOBU/ILVU range// : VOBU_END , means the VOBU is playing to end// : ILVU_END , means the ILVU is playing to end// Parameters : bParame, not used//**********************************************************************WORD CELL_Trigger(BYTE bParam){#ifndef NO_DVD DWORD dwSTC;#ifdef CELL_FORCE_LINEAR_PLAY_TEST// _SwitchLinearPlayAndNVPlay(FALSE);#endif // #ifdef CELL_FORCE_LINEAR_PLAY_TEST if(__bCellAction==VOBU_PLAYING) { __bCellAction=_CheckVOBUEnd(); } // LLY2.77, move following procedure outside // (old is put within if(__bCellAction==VOBU_PLAYING) routine // Otherwise, CELL_Trigger() will continue go while waiting time-out for issue next SCAN // And, F/W will send more data during this period. // The bug: SCBx2 is same as SCF while playback DVD title "み
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -