?? digest.c
字號:
__bPageNO= NULL;
return bTemp;
}
// *********************************************************************
// Function : DIGEST_Trigger
// Description : It's a function that call by CC,
// DIGEST module will do the action itself
// Arguments : NONE
// Return :
// Side Effect :
// *********************************************************************
BIT DIGEST_Trigger ()
{
switch ( (__bStyle & 0x0F) )
{
// Entering digest mode from the end point of PLAYING mode
// This digest mode will play the whole track and change to next track
// If user press KEY_NX ,then will play the NX track
// If user press KEY_PLAY ,then resume the playing from this digest
// leaving point
#ifndef NO_DVDDIGEST
case DIGEST_STYLE_CHAPXX:
// f/w 0.31, do not enable interrupt, let a position show only 1 frame.
// Micky
//wyc.100
__dwIER=NULL;
if (!__bTrackRepeat)
{
// only do once for each track
// start a new track
__bTemp= __bPlayOrder % 3;
__iXDigest= __bTableX[__bTemp];
__bTemp= __bPlayOrder / 3;
__iYDigest= __bTableY[__bTemp];
// enable the audio output
__btDigestEnableAudio= TRUE;
_DIGEST_DisplayFrame ( (BYTE)__wChapter );
__bTrackRepeat = 2 ;
_DIGEST_DisplayFrame ( (BYTE)__wChapter );
_DIGEST_ShowInfor ( );
__bTrackRepeat++;
}
else
{
// playing within track range
UTL_GetCurrentTime ();
if ((__dwTimeNow+1000) < (__dwTimeEnd))
{
// do many times for one track
// change to next grid
__bPlayOrder++;
if ( __bPlayOrder > 8 )
__bPlayOrder= NULL;
__bTemp= __bPlayOrder % 3;
__iXDigest= __bTableX[__bTemp];
__bTemp= __bPlayOrder / 3;
__iYDigest= __bTableY[__bTemp];
_DIGEST_DisplayFrame ( (BYTE)__wChapter );
_DIGEST_ShowInfor ( );
UTL_DelayTime ( COUNT_500_MSEC, TRUE );
_DIGEST_DisplayFrame ( (BYTE)__wChapter );
//same number, can do this only once ???
_DIGEST_ShowInfor ( );
}
else
{
// prepare for next track
__bPlayOrder=0;
__bTrackRepeat= NULL;
W99AV_EnableInterrupt(NULL);
__btDigestEnableAudio= FALSE;
// show new number, can be removed???
//_DIGEST_ShowInfor ( );
// reset to the first grid
// next title or chapter number
// wyc.100
DVD_ParseInfo ( DVD_TOTAL_CHAPTERS, & __dwTemp, __bTitle );
if (__bRepeat != REPEAT_CHAPTER)
__wChapter++;
if (__wChapter > __dwTemp)
{
if (__bRepeat == REPEAT_NONE)
{
__bTitle = 0;
__wChapter = 0;
__wTotChapTime = 0;
// LLY2.37p, assign KEY_STOP from F/W
// To avoid IR and F/W conflict issue
//__bISRKey = KEY_STOP;
__bFWKey = KEY_STOP;
}
else if ((__bRepeat == REPEAT_TITLE) || (__bRepeat == REPEAT_DISC))
{
__wChapter = 1;
__wTotChapTime = 0;
__wTimeChapter = 0;
}
}
}
}
break;
case DIGEST_STYLE_TITLE:
case DIGEST_STYLE_CHAP:
//wyc.100
if (!__bDigestStop)
{
__dwIER=NULL;
if ( __bTrackRepeat <= 5 )
{
if ( ! __bTrackRepeat )
{
// Record the System Count
//__dwTimeDigestBegin= __dwCountSystem;
// WYC.051
__dwTimeDigestBegin = UTL_GetSysTimer();
__bTemp= __bPlayOrder % __bGrid;
__iXDigest= __bTableX[__bTemp];
__bTemp= __bPlayOrder / __bGrid;
__iYDigest= __bTableY[__bTemp];
__btDigestEnableAudio= TRUE;
if ((__bStyle & 0x0F) == DIGEST_STYLE_TITLE)
{
__bTitle++;
DVD_ParseInfo ( DVD_TOTAL_TITLES, & __dwTemp, NULL );
if (__bTitle > __dwTemp)
__bTitle = 1;
__wChapter = 1;
}
else if ((__bStyle & 0x0F) == DIGEST_STYLE_CHAP)
{
DVD_ParseInfo ( DVD_TOTAL_CHAPTERS, & __dwTemp, __bTitle );
__wChapter++;
if (__wChapter > __dwTemp)
{
__wChapter = 1;
}
} //if (__bStyle == DIGEST_STYLE_TITLE)
_DIGEST_DisplayFrame ( (BYTE)__wChapter );
__bTrackRepeat++;
}
else
{
// wyc.100
_DIGEST_DisplayFrame ( (BYTE)__wChapter );
__bTrackRepeat++;
_DIGEST_DisplayFrame ( (BYTE)__wChapter );
__bTrackRepeat++;
// let interrupt handle the IFSC only
// should be the same action???
_DIGEST_ShowInfor ( );
}
}
else
{
// Recover to first image
__btDigestEnableAudio= FALSE;
__bTrackRepeat= NULL;
W99AV_EnableInterrupt(NULL);
// same number, not show???
// Preapre next track playing
__bPlayOrder++;
if ( __bPlayOrder > (__bGrid* __bGrid- 1 ) )
{
__bDigestStop = TRUE;
// LLY2.37p, why need this statement ??
__bISRKey = KEY_NO_KEY;
__btPlaying = 0;
__bPreDVDDigest = 0;
SERVO_EnableRunning(FALSE);
//gbServoRunning = FALSE;
}
if ((__bStyle & 0x0F) == DIGEST_STYLE_TITLE)
{
DVD_ParseInfo ( DVD_TOTAL_TITLES, & __dwTemp, NULL );
if (__bTitle >= __dwTemp)
{
__bTitle= __bPlayOrder+ __bPageNO* (__bGrid* __bGrid);
__bDigestStop = TRUE;
// LLY2.37p, why need this statement ??
__bISRKey = KEY_NO_KEY;
__btPlaying = 0;
__bPreDVDDigest = 0;
SERVO_EnableRunning(FALSE);
//gbServoRunning = FALSE;
}
}
else if ((__bStyle & 0x0F) == DIGEST_STYLE_CHAP)
{
DVD_ParseInfo ( DVD_TOTAL_CHAPTERS, & __dwTemp, __bTitle );
if (__wChapter >= __dwTemp)
{
__wChapter = 0;
__bDigestStop = TRUE;
// LLY2.37p, why need this statement ??
__bISRKey = KEY_NO_KEY;
__btPlaying = 0;
__bPreDVDDigest = 0;
SERVO_EnableRunning(FALSE);
//gbServoRunning = FALSE;
}
}
}
} // __bDigestStop
break;
#endif // NO_DVDDIGEST
case DIGEST_STYLE_TRACK:
// f/w 0.31, do not enable interrupt, let a position show only 1 frame.
// Micky
__dwIER=NULL;
if (!__bTrackRepeat)
{
// only do once for each track
// start a new track
__bTemp= __bPlayOrder % 3;
__iXDigest= __bTableX[__bTemp];
__bTemp= __bPlayOrder / 3;
__iYDigest= __bTableY[__bTemp];
// enable the audio output
__btDigestEnableAudio= TRUE;
_DIGEST_DisplayFrame ( __bTrackNO );
__bTrackRepeat++;
//CDDA is needed, jyliu.digest
//LJY276
#ifdef SUPPORT_CDIF
if(__bServoAutoCtrl)
UTL_DelayTime (COUNT_100_MSEC, TRUE );
#else
// UTL_DelayTime (COUNT_500_MSEC, TRUE ); //LJY1.24-3, to avoid buffer overflow.
#endif // #ifdef SUPPORT_CDIF
//LJY2.78b-3, try one more time to show first frame
_DIGEST_DisplayFrame ( __bTrackNO );
_DIGEST_ShowInfor ( );
}
else
{
// playing within track range
UTL_GetCurrentTime ();
if ((__dwTimeNow+375) < (__dwTimeEnd))
{
// do many times for one track
// change to next grid
__bPlayOrder++;
if ( __bPlayOrder > 8 )
__bPlayOrder= NULL;
__bTemp= __bPlayOrder % 3;
__iXDigest= __bTableX[__bTemp];
__bTemp= __bPlayOrder / 3;
__iYDigest= __bTableY[__bTemp];
_DIGEST_DisplayFrame ( __bTrackNO );
// marked by LLY on 1999.02.22 for number showing first problem
//same number
// _DIGEST_ShowInfor ( );
//LJY276
#ifdef SUPPORT_CDIF
if(__bServoAutoCtrl)
UTL_DelayTime (COUNT_100_MSEC, TRUE );
#else
// UTL_DelayTime (COUNT_500_MSEC, TRUE ); //LJY1.24-3, to avoid buffer overflow
#endif // SUPPORT_CDIF
// _DIGEST_DisplayFrame ( __bTrackNO );
//same number, can do this only once ???
_DIGEST_ShowInfor ( );
}
else
{
// prepare for next track
__bPlayOrder=0;
__bTrackRepeat= NULL;
W99AV_EnableInterrupt(NULL);
__btDigestEnableAudio= FALSE;
// show new number, can be removed???
// _DIGEST_ShowInfor ( ); marked 2002/4/15
// reset to the first grid
__bPlayOrder= NULL;
// next track number
__bTrackNO++;
if ( __bTrackNO > __wTrackEnd )
__bTrackNO= (BYTE)__wTrackBegin;
//LJY2.27, use BACKUP_FW_DSPBUFFER instead of USE_32M_SDRAM
#ifdef BACKUP_FW_DSPBUFFER
// LJY1.21, Brian1.11, DSP backup area doesn't exist under BE Digest mode
// so MUST NOT change DSP code ==> ignore CDDA track
if(UTL_CheckPlayItemMode ( __bTrackNO ) == MODE_PLAYAUDIO)
__bTrackNO= (BYTE)__wTrackBegin;
#endif
}
}
break;
#ifndef DIGEST_TWO_MODE
case DIGEST_STYLE_TRACKVIEW:
{
if ( ! __bTrackRepeat )
{
// Get the X-Y coordination depend on __bPlayOrder
// P0 P1 P2 <--- __bPlayOrder in the Screen
// P3 P4 P5
// P6 P7 P8
__bTemp= __bPlayOrder % 3;
__iXDigest= __bTableX[__bTemp];
__bTemp= __bPlayOrder / 3;
__iYDigest= __bTableY[__bTemp];
__btDigestEnableAudio= FALSE;
_DIGEST_DisplayFrame ( __bTrackNO );
_DIGEST_ShowInfor ( );
__bTrackRepeat++;
}
else
{
__bTrackRepeat= NULL;
W99AV_EnableInterrupt(NULL);
// Preapre next track playing
__bPlayOrder++;
if ( __bPlayOrder > 8 )
__bPlayOrder= NULL;
__bTrackNO= __bPlayOrder+ __bPageNO* (__bGrid* __bGrid)+ (BYTE)__wTrackBegin;
if ( __bTrackNO > __wTrackEnd )
{
__bPlayOrder= NULL;
__bTrackNO= __bPlayOrder+ __bPageNO* (__bGrid* __bGrid)+ (BYTE)__wTrackBegin;
}
}
}
break;
case DIGEST_STYLE_RANDOM:
{
////////// following is modified by LLY on 88.01.07
// f/w 0.31, do not enable interrupt, let a position show only 1 frame.
// Micky
__dwIER=NULL;
if(__wDiscType & BOOK_DVD)
{
//***** check more, must add for DVD title
}
else if(__wDiscType&BOOK_SVCD)
__iXDigest=(int)((__dwCountSystem % 61) + 10);
else if(__wDiscType&BOOK_CVD)
__iXDigest=(int)((__dwCountSystem % 51) + 20);
else
__iXDigest=(int)((__dwCountSystem % 111) + 10);
__iXDigest+=7; // make sure that X coordinate is the multiple of 8
__iXDigest>>=3;
__iXDigest<<=3;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -