📄 linear.c
字号:
__bSearchMode=SEARCH_MODE_OFF;//alex1.23,20040218 combine gototime , search,bookmark
OSD_OUTPUT_MACRO ( MSG_SETGOTOTIME, OSD_CANCEL_TIME, 0 );
}
return FALSE;
}
*/
// ** 0.17; Move from above "EX0= 1";
// Must clear GoToTime input mode
//if (__btGoToTime)
if (__bSearchMode==SEARCH_MODE_TIME)//alex1.23,20040218 combine gototime , search,bookmark
{
//LJY1.20, clear it later in _PlayTimeA for fixing GOTOTIME OSD time incorrect issue.
// __btGoToTime= FALSE;
OSD_OUTPUT_MACRO ( MSG_SETGOTOTIME, OSD_COMPLETE_TIME, 0 );
}
//enable GOTOTIME for any mode, special processing pause mode
// wyc1.21
/*if ( __bModeCmd == KEY_FF ) //must slow down CDROM speed
{
UTL_ChangeCDROMSpeed (1);
}*/
// Micky1.10, Fix JVC-> segmeny play item-> resume-> will play wrong range begin
// Only need to query PlayItem number for Track/ Entries
if (__wPlayItem <= 599)
{
__dwTemp=dwParam;
// Get track number and new Play Range
CDINFO_ParseInfo ( VCD_ENTRIES_TRACK, & __dwTemp, 0 );
UTL_GetPlayRange ( (WORD)__dwTemp );
}
else
__dwTemp = __wPlayItem;
// Micky1.08, Fix JVC-> segmeny play item-> resume-> will play wrong range end
// f/w 0.45, remove these
// since in VCD2.0, this process will have problem
// In PBC mode, when __dwTimeBegin==__dwGoToTime, can't treas as KEY_Nx
// it will destroy PBC info.(in KEY_PRACTICE)
// go time cross another track
// or go time from stop mode
if ( (__wPlayItem != __dwTemp) || !__btPlaying )
{
if (__wPlayItem != __dwTemp )
{
// Cross different track
__btPlayFromBegin=TRUE;
__btFromStopMode=TRUE;
}
else
{
if ( ! __btPause ) // From stop mode
{
__btPlayFromBegin=TRUE;
__btFromStopMode=TRUE;
__bModeCmd=KEY_PLAY;
}
else
{
__btPlayFromBegin=FALSE;
__btFromStopMode=FALSE;
}
}
}
else //go time within same track
{
__btPlayFromBegin=FALSE;
__btFromStopMode=FALSE;
}
__wPlayItem=(WORD)__dwTemp;
__btNewTime=TRUE;
return TRUE;
}
case KEY_REPEAT_AB:
// only work in NPF and SF
if (__btPlaying && ( (__bModeCmd == KEY_PLAY) || (__bModeCmd== KEY_SF) ) )
{
// Do not allow repeat AB for still picture and GOTOTIME
//alex1.23,20040218 combine gototime , search,bookmark, Remove __btGotoTime , use __bSearhMode in Linear_Acction function (Key_Repeat AB)
// if ( ( __bModePlay & MODE_STILL) || __btGoToTime )
if ( ( __bModePlay & MODE_STILL) || __bSearchMode)
{
return FALSE;
}
}
else
return FALSE;
switch ( __bRepeatAB )
{
case REPEAT_NONE:
default:
// first time
__bRepeatAB= REPEAT_A;
__dwTimeB= 0;
UTL_GetCurrentTime ();
#if 0 //LJY1.24a, remove it, using UTL_EstimateBufferTime() for code refinement.
//Begin, LJY1.22, LJY1.11b, LJY1.21, fix repeatAB time incorrect issue for anti-shock mode.
__dwTimeA= __dwTimeNow;
W99AV_ReadInfo (W99AV_INFO_VIDEO_REMAIN, &__dwTemp) ;
W99AV_ReadInfo (W99AV_INFO_AUDIO_REMAIN, &__dwTimeA) ;
__dwTemp += __dwTimeA;
if(__bCDDA_DTS & CDDA_BITSTREAM_PURE)
{
#ifdef SUPPORT_ANTISHOCK
__dwTimeA = W99AV_ReadRegDW (ABUFBAKREMR) ;
__dwTimeA <<= 4;
__dwTemp += __dwTimeA;
W99AV_ReadDM(W99AV_DM_AUDIO2_REMAIN, &__dwTimeA); // aframe2
__dwTemp += __dwTimeA;
#endif
__dwTemp /= SECTOR_CDDA; //LJY1.23, use SECTOR_CDDA instead of 588 or 784
}
//LJY1.24, use NO_CDG to determine whether CDG is supported.
#ifndef NO_CDG
else if(__bCDDA_DTS & CDDA_BITSTREAM_CDG)
{
__dwTemp /= SECTOR_784; // with subcode
}
#endif
else
{
__dwTemp /= SECTOR_588;
}
#endif
//LJY1.24a, using UTL_EstimateBufferTime() for code refinement.
__dwTemp = UTL_EstimateBufferTime();
__dwTimeA = __dwTimeNow - __dwTemp;
//End...
#if 0 //LJY1.22, LJY1.11b, un-needed??
//12.18.98
if (__dwTimeA > (__dwTimeBegin+75L))
__dwTimeA -= 75L;
#endif
//DVD_031, REPEATAB
#ifdef _WINDVD
if (__wDiscType & BOOK_DVD)
{
#ifdef REPEATAB_BY_CELL
void CELL_RepeatAB(BYTE bRepeat);
CELL_RepeatAB(REPEAT_A);
#else
// ** TCH1.61a;
NV_Action ( ACTION_REPEATAB, __bRepeatAB );
#endif
}
#endif
OSD_OUTPUT_MACRO ( MSG_REPEATAB, REPEAT_A, 0xFF );
break;
case REPEAT_A:
__bRepeatAB= REPEAT_AB;
//DVD_042A-REPEATAB
#ifdef _WINDVD
if (__wDiscType & BOOK_DVD)
{
#ifdef REPEATAB_BY_CELL
CELL_RepeatAB(REPEAT_AB);
#else
NV_Action ( ACTION_REPEATAB, __bRepeatAB ); // ** TCH1.61a;
#endif
}
else
#endif
{
UTL_GetCurrentTime ();
#if 0 //LJY1.24a, remove it, using UTL_EstimateBufferTime() for code refinement.
//Begin, LJY1.22, LJY1.11b, LJY1.21, fix repeatAB time incorrect issue for anti-shock mode.
__dwTimeB= __dwTimeNow;
W99AV_ReadInfo (W99AV_INFO_VIDEO_REMAIN, &__dwTemp) ;
W99AV_ReadInfo (W99AV_INFO_AUDIO_REMAIN, &__dwTimeB) ;
__dwTemp += __dwTimeB;
if(__bCDDA_DTS & CDDA_BITSTREAM_PURE)
{
#ifdef SUPPORT_ANTISHOCK
__dwTimeB = W99AV_ReadRegDW (ABUFBAKREMR) ;
__dwTimeB <<= 4;
__dwTemp += __dwTimeB;
W99AV_ReadDM(W99AV_DM_AUDIO2_REMAIN, &__dwTimeB); // aframe2
__dwTemp += __dwTimeB;
#endif
__dwTemp /= SECTOR_CDDA; //LJY1.23, use SECTOR_CDDA instead of 588 or 784
}
//LJY1.24, use NO_CDG to determine whether CDG is supported.
#ifndef NO_CDG
else if(__bCDDA_DTS & CDDA_BITSTREAM_CDG)
{
__dwTemp /= SECTOR_784; // with subcode
}
#endif
else
{
__dwTemp /= SECTOR_588;
}
#endif
//LJY1.24a, using UTL_EstimateBufferTime() for code refinement.
__dwTemp = UTL_EstimateBufferTime();
__dwTimeB = __dwTimeNow - __dwTemp;
//End...
// since in B point need do more check
// add time torelence
// so it's possible that the __dwTimeB < __dwTimeA for same track
// __dwTimeB-=105L;
__dwTimeB-=30L;
}
__btPlayFromBegin=FALSE;
__dwGoToTime=__dwTimeA;
//DVD_042A-REPEATAB
/*
//DVD_031, REPEATAB
#ifdef _WINDVD
if (__wDiscType & BOOK_DVD)
CELL_RepeatAB(REPEAT_AB);
#endif
*/
OSD_OUTPUT_MACRO(MSG_REPEATAB, REPEAT_AB, 0xFF);
break;
case REPEAT_AB:
__bRepeatAB= REPEAT_NONE;
OSD_OUTPUT_MACRO(MSG_REPEATAB, REPEAT_NONE, 1);
break;
}
return TRUE;
}
return FALSE;
}
// *********************************************************************
// Function : LINEAR_Program
// Description : It will process PROGRAM mode ON/OFF, Add/Clear Entry
// Arguments : bFunction : the Program Function
// Return :
// Side Effect : It will use the value __wNumberPrevious
// *********************************************************************
BIT LINEAR_Program(BYTE bFunction, BYTE bKey)
{
#ifndef CT908_UI //Kevin0.86, for font mode Program UI use only
BYTE bMoveCursor = TRUE, bMaxEntry;
#endif
// **** TCH1.01b-XQ,
BYTE bRet= TRUE;
switch(bFunction)
{
case LINEAR_PROGRAM_MODE:
// wyc1.07, support KEY_PROGRAM when JPG slide show.
if ( __btPBC ||
#ifndef NO_DIGEST //LJY1.20, support 4M flash, remove digest
__btDIGEST ||
#endif
((__wDiscType & BOOK_DVD)&&(__bNVPlayMode)) )
// wyc.101_2nd , add define FORCE_SWITCH_NONPBC and add code to support FORCE_SWITCH_NONPBC
#ifdef FORCE_SWITCH_NONPBC
// wyc.160
#ifndef NO_DIGEST //LJY1.20, support 4M flash, remove digest
if (__btDIGEST) return FALSE;
#endif
#else
return FALSE;
#endif // FORCE_SWITCH_NONPBC
// clear auto stop mode
// to avoid auto stop before end input program mode
//DVD_050Micky
// remove KEY_AUTOSTOP
/*
__btAutoStop=0;
OSD_OUTPUT_MACRO( MSG_AUTOSTOP, __btAutoStop, 0 );
*/
#ifndef CT908_UI //Kevin0.86, GDI mode Program UI doesn't process number keys
// wyc.102, every enter program input modem, clear program digit array
LINEAR_ClearProgramEntry(LINEAR_CLEARNUMBER,0,3);
#endif
// clear time key
// disable key 10+ before entering PROGRAM mode
__dwTimeKey=0;
// PROGRAM / GOTIME can't exist at the same time
//alex1.23,20040218 combine gototime , search,bookmark, Remove __btGotoTime , use __bSearhMode in Linear_Program function
//if (__btGoToTime)
if(__bSearchMode)
{ // Clear GOTIME
//__btGoToTime= FALSE;
__bSearchMode=SEARCH_MODE_OFF;
OSD_OUTPUT_MACRO(MSG_SETGOTOTIME, OSD_CANCEL_TIME, 0);
}
#ifdef PRESTOP_BEFORE_SETUP_AND_PROGRAM //XuLi.230
if(!(__wDiscType&CDROM_M1))
{
if(__btPlaying || __btPause)
{
if((__bModeCmd!=KEY_PLAY
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -