?? digest.c
字號:
{
UTL_GetCurrentTime ();
if ( (__dwTimeNow+ 375) > (__dwTimeEnd) )
{
__bTrackRepeat+= 100;
return FALSE;
}
}
if ( __bDigestModePlay & MODE_PLAYMOTION )
{
// Re-setting ( X, Y ) for different coordinate
// Be care to do it when Chip is moving Video Frame
i= 0;
if ((__bDVDDigest) && (__bTrackRepeat == 2))
{
if ((__bStyle & 0x0F) != DIGEST_STYLE_CHAPXX)
SERVO_ReadSectors(__dwTimeBegin , __dwTimeEnd );
}
// wyc.172, make a time out when check IFSC flag to avoid hang in this loop.
__dwCheckTime= UTL_GetSysTimer();
EX1 = 0;
if ((__bTrackRepeat >= 2) || (!__bDVDDigest))
while (1)
{
if (__bDVDDigest)
{
if ((UTL_GetSysTimer() - __dwCheckTime) > COUNT_100_MSEC)
break;
}
else
{
if ((UTL_GetSysTimer() - __dwCheckTime) > COUNT_4_SEC)
{
break;
}
}
// end ..
#ifndef NO_DVDDIGEST
//wyc.100
// if audio bitstream with one dvd still, only show one time
if ((__bStyle & 0x0F) == DIGEST_STYLE_CHAPXX)
{
__btDigestSetMode = TRUE;
NV_Trigger();
__btDigestSetMode = FALSE;
}
#endif // NO_DVDDIGEST
//LJY276
#ifdef SUPPORT_CDIF
if(__bServoAutoCtrl)
SERVO_Monitor();
else
MONITOR_CheckBuffer(); //LJY277.3rd
#else
SERVO_Monitor();
#endif
#ifndef NO_DVDDIGEST
if (__bDVDDigest)
{
#ifdef SYSTEM_8051
if ((__bStyle & 0x0F) == DIGEST_STYLE_CHAPXX)
#endif
//in emulator, the video buffer will full, so call digest command
//to avoid video full. In system, if digest from play and use NV,
//must call digest command to avoid digest command to be reset by
//other operation
HAL_DigestCommand();
}
#endif // NO_DVDDIGEST
if (HAL_CheckInterrupt(INT_IFSC))
{
__dwIFrames++;
// added by LLY on 12/21
// HAL_DigestPosition(__iXDigest, __iYDigest); //LJY277a marked, don't issue digest cmd here.
// HAL_DigestCommand(); //LJY277a
i++;
if ( i== 1 )
break;
} //
}
EX1 = 1;
#if 0 //jyliu.lumin.test
if ( ! i )
{
// added by LLY on 12/21
HAL_DigestPosition(__iXDigest, __iYDigest);
/////////////////////
HAL_DigestCommand();
}
#endif
/*
if ((! i) && (__bDVDDigest) && (__bTrackRepeat == 3) && ((__bStyle == DIGEST_STYLE_TITLE) || (__bStyle == DIGEST_STYLE_CHAP)))
__bNoDoDigest = TRUE;*/
}
//HAL_DigestPosition(__iXDigest, __iYDigest); // marked by LLY on 12/21
W99AV_EnableInterrupt(__dwIER);
}
#ifndef NO_CDDADIGEST
// LLY.274p, check playing mode method has updated
// ????? Must re-check ???
//if( __bDigestModePlay & MODE_PLAYCDDA )
if(__bAttrPlayNew == ATTR_CDDA)
{
if ( ((__bStyle & 0x0F)==DIGEST_STYLE_RANDOM) )
OSD_SetPosition(40, 30);
else
{
_iHor=__iXDigest*4+__iDigestHStart*4+__iDigestHor/2-__wFontW;
if (__btDigestMode==DIGEST_FRAME_4)
{
if(__wDiscType & BOOK_DVD)
{
//***** check more, must add for DVD title
}
else if(__wDiscType&BOOK_SVCD || __wDiscType&BOOK_CVD)
_iVer=__iYDigest*2+__iDigestVStart*2+__iDigestVer-8;
else
_iVer=__iYDigest*2+__iDigestVStart*2+__iDigestVer+4;
}
else // 9 Frames
{
_iVer=__iYDigest*2+__iDigestVStart*2+__iDigestVer+4;
}
////////////////////////////////////////////////////////
// following is added by LLY on 1999.04.14 for F/W 0.34
// fixed the SWOSD black edge bug
// the start point in horizontal direction
// must be the multiple of 8
///////////////////////////////////////////////////////
_iRem=_iHor%8;
if(_iRem>4) // choice larger number because it is near the desired value
_iHor+=7;
_iHor>>=3;
_iHor<<=3;
OSD_SetPosition(_iVer,_iHor);
}
_OSD_ShowCDDA();
}
#endif // NO_CDDADIGEST
if ( i )
return TRUE;
else
return FALSE;
}
// *********************************************************************
// Function : _DIGEST_ShowInfor
// Description :
// Arguments : bEnable : Display or clear the OSD
// Current is useless!
// Return :
// Side Effect :
// *********************************************************************
//char __cTestY= NULL;
void _DIGEST_ShowInfor ( )
{
// wyc.171, add NO_DIGEST define to reduce code when define it.
#ifndef DIGEST_TWO_MODE
if ((__bStyle & 0x0F)==DIGEST_STYLE_RANDOM)
{
// Show number in the left corner when play within Random Mode
if(__wDiscType & BOOK_DVD)
{
}
else if(__wDiscType&BOOK_SVCD)
//OSD_SetPosition ( 60, 60); // (y,x) , F/W 0.34
OSD_SetPosition ( 60, 64); // (y,x)
else if(__wDiscType&BOOK_CVD)
OSD_SetPosition ( 60, 88); // (y,x)
else // VCD
//OSD_SetPosition ( 60, 44); // (y,x)
OSD_SetPosition ( 60, 48); // (y,x) , F/W 0.34
}
else
#endif //#ifdef DIGEST_TWO_MODE
{
//LJY1.00, let SWOSD loacte at the middle of each frame.
if(__wDiscType&BOOK_SVCD || __wDiscType&BOOK_CVD)
{
_iHor=__iXDigest*4+__iDigestHStart*4+__iDigestHor/2-__wFontW;
}
else
{
_iHor=__iXDigest*4+__iDigestHStart*4+__iDigestHor/2-__wFontW*2;
}
if (__btDigestMode==DIGEST_FRAME_4)
{
if(__wDiscType & BOOK_DVD)
{
_iVer=__iYDigest*2+__iDigestVStart*2+__iDigestVer-8;
}
else if(__wDiscType&BOOK_SVCD || __wDiscType&BOOK_CVD)
_iVer=__iYDigest*2+__iDigestVStart*2+__iDigestVer-8;
else
_iVer=__iYDigest*2+__iDigestVStart*2+__iDigestVer+4;
}
else // 9 Frames
_iVer=__iYDigest*2+__iDigestVStart*2+__iDigestVer+4;
////////////////////////////////////////////////////////
// following is added by LLY on 1999.04.14 for F/W 0.34
// fixed the SWOSD black edge bug
// the start point in horizontal direction
// must be the multiple of 8
///////////////////////////////////////////////////////
_iRem=_iHor%8;
if(_iRem>4) // choice larger number because it is near the desired value
_iHor+=7;
_iHor>>=3;
_iHor<<=3;
OSD_SetPosition(_iVer,_iHor);
}
// wyc.100
#ifndef NO_DVDDIGEST
if (__bDVDDigest)
{
if ((__bStyle & 0x0F) == DIGEST_STYLE_CHAPXX)
__wTemp = __wChapter;
else
__wTemp = __bPlayOrder + 1;
}
else
#endif // NO_DVDDIGEST
{
//LJY2.81, for DVCD discview in stop mode
if (( (__bStyle & 0x0F) <= DIGEST_STYLE_PAGE ) || ((__bStyle & 0x0F)==DIGEST_STYLE_DISCVIEW) || (__bStyle & DIGEST_DVCD_DISCVIEW))
__wTemp= __bPlayOrder+ 1;
else
__wTemp= __bTrackNO- __wTrackBegin+ 1;
}
#ifdef DIGEST_NEXT_PAGE10 // for page mode , nexpage shown from 10
if ( (__bStyle & 0x0F) <= DIGEST_STYLE_PAGE)
__wTemp= __bTrackNO- __wTrackBegin+ 1;
#endif
//LJY0.87, using _OSD_ShowDigestNumber instead of OSD_OUTPUT_MACRO
// Dark Number First
_OSD_ShowDigestNumber(__wTemp | 0x800A );
_OSD_ShowDigestNumber(__wTemp);
return;
}
// *********************************************************************
// Function : DIGEST_Digest2Linear
// Description : Exit the DIGEST mode, and enter linear playing mode
// Arguments : bGoTime, dwFrom
// : TRUE, play a specified time value "dwFrom"
// : FALSE, play a specified track value "dwFrom"
// Return : NONE
// Side Effect :
// *********************************************************************
void DIGEST_Digest2Linear(BYTE bGoTime, DWORD dwFrom)
{
// Micky2.27, call CC_KeyCommand(KEY_STOP) to do DIGEST->exit.
CC_KeyCommand(KEY_STOP);
/*
// WYC.050a use __dwTemp to replace dwTemp
//DWORD dwTemp;
__dwIER=NULL;
// f/w 0.45
OSD_OUTPUT_MACRO ( MSG_DIGEST, NULL, 0 ); // clear Digest
//LJY1.24-3, DSP ucode restore.
#ifdef SUPPORT_4M_FLASH
UTL_DSPuCodeBackup(FALSE);
#endif
*/
// the play time is not from track begin
if (bGoTime)
{
__dwTemp=dwFrom; // play from time
// Get track number for this entry point
CDINFO_ParseInfo ( VCD_ENTRIES_TRACK, & __dwTemp, NULL );
}
else
{
__dwTemp=dwFrom; // play track
if ( __dwTemp > __wTrackEnd )
__dwTemp = __wTrackEnd;
}
__bTemp= UTL_CheckPlayItemMode ( (WORD)__dwTemp );
// the entry point is a CD-DA track
//LJY279, marked to show logo while exit digest to play CDDA track
//#ifndef NO_CDDADIGEST
// LLY.274p, check playing mode method has updated
//if (__bTemp & MODE_PLAYCDDA)
if(__bAttrPlayNew == ATTR_CDDA)
{
#ifdef NO_LOGO
UTL_SetPlayMode(MODE_PLAYMOTION);
#endif
OSD_Output (MSG_LOGO, NULL, 0xff);
//LJY279, added to clear __bAttrPlay for entering digest mode after played CDDA track(_OSD_FilterNonDisplayMessage())
__bLOGO=LOGO_NONE;
}
//#endif //#ifndef NO_CDDADIGEST
__bModePlay=MODE_PLAYUNKNOW;
//LJY1.26, Don't perform soft reset for digest. Clear __bLastModePlay to prevent __bNextHWReset was set to be FALSE in UTL_SetPlayMode(),
__bLastModePlay= MODE_PLAYUNKNOW;
// LJY1.21, wyc1.11, when vcd20 avtion then do H/W reset to avoid still <-> motion will have
// picture flash problem.
/* LJY1.26, no need.
{
extern BYTE __bNextHWReset;
__bNextHWReset = TRUE;
}
*/
}
// *********************************************************************
// Function : DIGEST_PreDVDDigest
// Description : Prepare the DVD digest in stop mode
// Arguments : None
//
// Return : NONE
// Change :
// Side Effect :
// *********************************************************************
void DIGEST_PreDVDDigest(void)
{
#ifndef NO_DVDDIGEST
//wyc.100
if (__bPreDVDDigest == 1)
{
// LLY2.37p, assign KEY_DIGEST from F/W
// To avoid IR and F/W key conflict issue
//__bISRKey = KEY_DIGEST;
__bFWKey = KEY_DIGEST;
__bPreDVDDigest = 2;
}
if ((__btPlaying == 0) && (__bISRKey ==KEY_DIGEST) && (__bPreDVDDigest == 0) && (__wDiscType & BOOK_DVD))
{
// LLY2.37p, assign KEY_PLAY from F/W
// To avoid IR and F/W key conflict issue
//__bISRKey = KEY_PLAY;
__bFWKey = KEY_PLAY;
__bPreDVDDigest = 1;
// set as real stop.
__bCountStop = 2;
}
#endif // NO_DVDDIGEST
}
// **********************************
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -