📄 nonshow.c
字号:
/**********************************************************************/
/*************** MTK CONFIDENTIAL & COPYRIGHTED ****************/
/*************** ****************/
/*************** $Modtime:: 05/05/17 11:25a $ ****************/
/*************** $Revision:: 4 $ ****************/
/*************** ****************/
/*************** Description : OSD ****************/
/*************** ****************/
/*************** Company : MediaTek Inc. ****************/
/*************** Programmer : Peter Huang ****************/
/**********************************************************************/
#define _NONSHOW_C_
#pragma NOAREGS
#include "general.h"
#include "osdshow.h"
#ifdef MT1379_MANUFACTURE_TEST
extern void vOsdShowTestInfo(BYTE bIndex) large;
#endif
// *********************************************************************
// Function : void vOsdShowInitState(BYTE bInitState)
// Description :
// Parameter :
// Return : None
// Note :
// *********************************************************************
void vOsdShowInitState(BYTE bInitState) large
{
BYTE pbBmp[3];
switch (bInitState)
{
case SV_LOADING_DISC:
//vDelBmp(); /* to clear bitmap ICON */
/*
pbBmp[0] = 2;
pbBmp[1] = BMP_LOAD_0;
pbBmp[2] = BMP_LOAD_1;
vOsdShowBmpXY(0, 0, WB_NORMAL_HEAD1, pbBmp, 1, OSD_NO_DISAPPEAR);
*/
vOsdPosShow(OSD_POS_INIT, OSD_MSG_LOADING, OSD_NO_DISAPPEAR);
break;
case SV_TRAY_OPENING:
//vDelBmp(); /* to clear bitmap ICON */
/*
pbBmp[0] = 1;
pbBmp[1] = BMP_OPEN;
vOsdShowBmpXY(0, 0, WB_NORMAL_HEAD1, pbBmp, 0, OSD_NO_DISAPPEAR);
*/
vOsdPosShow(OSD_POS_INIT, OSD_MSG_OPEN, OSD_NO_DISAPPEAR);
break;
case SV_TRAY_CLOSING:
//vDelBmp(); /* to clear bitmap ICON */
/*
pbBmp[0] = 1;
pbBmp[1] = BMP_CLOSE;
vOsdShowBmpXY(0, 0, WB_NORMAL_HEAD1, pbBmp, 0, OSD_NO_DISAPPEAR);
*/
vOsdPosShow(OSD_POS_INIT, OSD_MSG_CLOSE, OSD_NO_DISAPPEAR);
break;
case SV_TRAY_ERROR:
vDelBmp(); /* to clear bitmap ICON */
vOsdPosShow(OSD_POS_INIT, OSD_MSG_TRAY_ERROR, OSD_NO_DISAPPEAR);
break;
case SV_NO_DISC:
#ifdef MT1379_MANUFACTURE_TEST
vOsdShowTestInfo(0x10);
_bPlayPostKey = IR_EJECT;
#endif
vDelBmp(); /* to clear bitmap ICON */
vOsdPosShow(OSD_POS_INIT, OSD_MSG_NO_DISC, OSD_NO_DISAPPEAR);
break;
case SV_UNKNOWN_DISC:
vDelBmp(); /* to clear bitmap ICON */
vOsdPosShow(OSD_POS_INIT, OSD_MSG_UNKNOWN_DISC, OSD_NO_DISAPPEAR);
break;
case SV_DISC_IDENTIFIED:
// HACK code: let the icon and message disappear at the same time
vOsdSetSt(OSD_ST_BURST);
vOsdPosClear(OSD_POS_INIT); /* the disc type show os moved to layer 2 */
vDelBmp(); /* to clear bitmap ICON */
// HACK code
vOsdSetSt(OSD_ST_NML);
break;
default:
vOsdPosClear(OSD_POS_INIT);
vDelBmp(); /* to clear bitmap ICON */
break;
}
}
// *********************************************************************
// Function : void vOsdShowPlayStatus(BYTE bStatus, BYTE bTime)
// Description :
// Parameter : bState
// Return : None
// *********************************************************************
void vOsdShowPlayStatus(BYTE bStatus, BYTE bTime) large
{
WORD wMsgIndex = 0;
#ifdef PLAYER_GOTO
BYTE pbStr[] = { 0 };
#endif
switch (bStatus)
{
case OSD_SHOW_PLAY:
wMsgIndex = OSD_MSG_ICON_PLAY;
break;
case OSD_SHOW_TRICK:
break;
#if 1
case OSD_SHOW_NEXT_TRK:
case OSD_SHOW_NEXT_CH:
case OSD_SHOW_NEXT_ITEM:
wMsgIndex = OSD_MSG_ICON_NEXT;
break;
case OSD_SHOW_PREV_TRK:
case OSD_SHOW_PREV_CH:
case OSD_SHOW_PREV_ITEM:
wMsgIndex = OSD_MSG_ICON_PREV;
break;
#else /* show message instead icon */
case OSD_SHOW_NEXT_TRK:
vOsdPosShow(OSD_POS_NORMAL, OSD_MSG_NEXT_TRACK, bTime);
break;
case OSD_SHOW_NEXT_CH:
vOsdPosShow(OSD_POS_NORMAL, OSD_MSG_NEXT_CHAPTER, bTime);
break;
case OSD_SHOW_NEXT_ITEM:
vOsdPosShow(OSD_POS_NORMAL, OSD_MSG_NEXT_ITEM, bTime);
break;
case OSD_SHOW_PREV_TRK:
vOsdPosShow(OSD_POS_NORMAL, OSD_MSG_PREVIOUS_TRACK, bTime);
break;
case OSD_SHOW_PREV_CH:
vOsdPosShow(OSD_POS_NORMAL, OSD_MSG_PREVIOUS_CHAPTER, bTime);
break;
case OSD_SHOW_PREV_ITEM:
vOsdPosShow(OSD_POS_NORMAL, OSD_MSG_PREVIOUS_ITEM, bTime);
break;
#endif
default:
bStatus = OSD_SHOW_CLEAR;
break;
}
if (wMsgIndex != 0)
{
vOsdCoreSetPlayStatus(bStatus, bTime);
}
if (bStatus == OSD_SHOW_CLEAR)
{
vOsdDisplayChange(DISP_TRICK, bSharedInfo(SI_PBC_STATE));
}
else if (wMsgIndex != 0)
{
#if 0
#ifdef PLAYER_FLMENU
if (fgFlVdoOn)
{
//vFlIpShowInfo(IP_INFO_PBC, bHiByte(wMsgIndex), bLoByte(wMsgIndex));
//vOsdPosShow(OSD_POS_NORMAL, wMsgIndex, bTime);
vOsdPosShow(OSD_POS_PLAY_STATUS, wMsgIndex, bTime);
}
else
#endif /* PLAYER_FLMENU */
#endif
{
vOsdPosShow(OSD_POS_PLAY_STATUS, wMsgIndex, bTime);
#ifdef PLAYER_GOTO
if (fgIsInGoto())
{
vGotoShowIcon(wMsgIndex, pbStr);
}
#endif /* PLAYER_GOTO */
}
}
}
#ifndef DROP_DUMMY_FUNC
struct _sPbcStateMsg
{
WORD wMsg;
WORD wIcon;
};
static code struct _sPbcStateMsg _rPbcStateMsg[SV_DIGEST+1] =
{
{ OSD_MSG_NULL, OSD_MSG_NULL },
{ OSD_MSG_STOP, OSD_MSG_ICON_STOP }, // SV_STOP
{ OSD_MSG_PLAY, OSD_MSG_ICON_PLAY }, // SV_PLAY
{ OSD_MSG_FFX, OSD_MSG_ICON_FFX}, // SV_FF
{ OSD_MSG_SFX, OSD_MSG_ICON_SFX}, // SV_SF
{ OSD_MSG_FRX, OSD_MSG_ICON_FRX}, // SV_FR
{ OSD_MSG_ICON_SRX, OSD_MSG_ICON_SRX }, // SV_SR
{ OSD_MSG_PAUSE, OSD_MSG_ICON_PAUSE }, // SV_PAUSE
{ OSD_MSG_STEP, OSD_MSG_ICON_STEP }, // SV_STEP
{ OSD_MSG_ICON_STEP_BACK, OSD_MSG_ICON_STEP_BACK }, // SV_STEP_BACK
{ OSD_MSG_NULL, OSD_MSG_NULL}, // SV_FREEZE
{ OSD_MSG_PLAY, OSD_MSG_ICON_PLAY }, // SV_STILL
{ OSD_MSG_NULL, OSD_MSG_NULL}, // SV_SETUP_PAUSE
{ OSD_MSG_STOP, OSD_MSG_ICON_STOP }, // SV_STOP_RESUME
{ OSD_MSG_PLAY, OSD_MSG_ICON_PLAY }, // SV_DIGEST9
{ OSD_MSG_PLAY, OSD_MSG_ICON_PLAY }, // SV_DIGEST4
{ OSD_MSG_PLAY, OSD_MSG_ICON_PLAY }, // SV_DIGEST
};
#else
static code WORD _wPbcStateMsg[SV_DIGEST+1] =
{
OSD_MSG_NULL,
OSD_MSG_ICON_STOP, // SV_STOP
OSD_MSG_ICON_PLAY, // SV_PLAY
OSD_MSG_ICON_FFX, // SV_FF
OSD_MSG_ICON_SFX, // SV_SF
OSD_MSG_ICON_FRX, // SV_FR
OSD_MSG_ICON_SRX, // SV_SR
OSD_MSG_ICON_PAUSE, // SV_PAUSE
OSD_MSG_ICON_STEP, // SV_STEP
OSD_MSG_ICON_STEP_BACK, // SV_STEP_BACK
OSD_MSG_NULL, // SV_FREEZE
OSD_MSG_ICON_PLAY, // SV_STILL
OSD_MSG_NULL, // SV_SETUP_PAUSE
OSD_MSG_ICON_STOP, // SV_STOP_RESUME
OSD_MSG_ICON_PLAY, // SV_DIGEST9
OSD_MSG_ICON_PLAY, // SV_DIGEST4
OSD_MSG_ICON_PLAY, // SV_DIGEST
};
#endif
void vGetPbcStateMsg(BYTE bState, BYTE bVal, WORD *wMsg, BYTE *pbStr) large
{
pbStr[0] = 2;
if ((bState == SV_FF) || (bState == SV_FR))
{
if (bVal == 0)
{
bState = SV_PLAY;
}
else
{
bVal = bHEXToBCD(bVal);
if (BCD_HI(bVal) > 0)
{
pbStr[1] = BCD_HI(bVal) + '0';
}
else
{
pbStr[1] = ' ';
}
pbStr[2] = BCD_LO(bVal) + '0';
}
}
//#if ((!defined DISABLE_SF) && (!defined DISABLE_SR))
else if ((bState == SV_SF) || (bState == SV_SR))
{
if (bVal == 0)
{
bState = SV_PLAY;
}
else
{
bVal = bHEXToBCD(bVal);
if (BCD_HI(bVal) > 0)
{
pbStr[1] = BCD_HI(bVal) + '0';
pbStr[2] = BCD_LO(bVal) + '0';
}
else
{
pbStr[1] = BCD_LO(bVal) + '0';
pbStr[2] = ' ';
}
}
}
//#endif
else
{
pbStr[0] = 0;
}
// 20050517, PL00000965, when bState == SV_PRE_PLAY, it's out of range and will show unexpected msg.
// So we add check if it's out of range, set msg as NULL
if (bState > SV_DIGEST)
{
*wMsg = OSD_MSG_NULL ;
return ;
}
#ifndef DROP_DUMMY_FUNC
*wMsg = _rPbcStateMsg[bState].wIcon;
#else
*wMsg = _wPbcStateMsg[bState];
#endif
// *wMsg = (fgFlCheckStatus(FL_STATUS_IN_MENU)) ? _rPbcStateMsg[bState].wIcon :
// _rPbcStateMsg[bState].wMsg;
}
// *********************************************************************
// Function : void vOsdShowPbcState(BYTE bState, BYTE bVal, BYTE bTime)
// Description :
// Parameter : bState
// - SV_STOP
// - SV_PLAY
// - SV_FF
// - SV_FR
// - SV_SF
// - SV_SR
// - SV_PAUSE
// - SV_STEP
// Return : None
// *********************************************************************
void vOsdShowPbcState(BYTE bState, BYTE bVal, BYTE bTime) large
{
BYTE pbStr[5];
WORD wMsgIndex = 0;
BYTE bPlayType = bOsdCoreCurrPlayType();
if (bPlayType != OSD_SHOW_CLEAR)
{
if (bPlayType != OSD_SHOW_PLAY)
{
// we must by pass user action here
if (fgIsTrickPlay(bState))
{
vOsdCoreSetPlayStatus(OSD_SHOW_TRICK, bTime);
}
else if ((bState == SV_PLAY) && (bPlayType == OSD_SHOW_TRICK))
{
// clear play status first, this should be moved to vChangePbcState()
vOsdCoreSetPlayStatus(OSD_SHOW_CLEAR, 0);
}
else
{
return;
}
}
else if (bState == SV_PLAY) // && (bPlayType == OSD_SHOW_PLAY)
{
return;
}
else
{
// clear play status first
vOsdCoreSetPlayStatus(OSD_SHOW_CLEAR, 0);
}
}
// start show play status
switch (bState)
{
case SV_PLAY:
case SV_STILL:
case SV_DIGEST9:
case SV_DIGEST4:
case SV_DIGEST:
// show "BLANK" for PLAY state
vOsdPosClear(OSD_POS_PLAY_STATUS);
#ifdef PLAYER_GOTO
// megaa Goto
if (fgIsInGoto())
{
pbStr[0] = 0;
vGotoShowIcon(OSD_MSG_ICON_PLAY, pbStr);
}
#endif
return;
default:
#ifdef SUPPORT_DATA_DISC
if (fgIsIsoPlay())
vGetPbcStateMsg(bFlGetFgPbcState(), bVal, &wMsgIndex, pbStr);
else
#endif
vGetPbcStateMsg(bState, bVal, &wMsgIndex, pbStr);
break;
}
if (wMsgIndex != 0)
{
#ifdef PLAYER_FLMENU
if (fgFlCheckStatus(FL_STATUS_IN_MENU))
{
// tmp solution
vFlIpShowInfo(IP_INFO_PBC, bVal, wMsgIndex);
//vOsdPosShowArg(OSD_POS_FS_PBC, wMsgIndex, OSD_NO_DISAPPEAR, pbStr);
}
else
#endif /* PLAYER_FLMENU */
{
// 20050516, PL00000968, clear OSD before showing PBC state.
vOsdPosClear(OSD_POS_NORMAL) ;
vOsdPosShowArg(OSD_POS_PLAY_STATUS, wMsgIndex, bTime, pbStr);
}
#ifdef PLAYER_GOTO
// megaa Goto
if (fgIsInGoto())
{
vGotoShowIcon(wMsgIndex, pbStr);
}
#endif
}
}
#if 0
void vOsdShowPbcState(BYTE bState, BYTE bVal, BYTE bTime) large
{
BYTE pbStr[5];
WORD wMsgIndex = 0;
WORD wMsg = 0;
BYTE bPlayType = bOsdCoreCurrPlayType();
BOOL fgFlMenuOn = fgFlCheckStatus(FL_STATUS_IN_MENU);
if (bPlayType != OSD_SHOW_CLEAR)
{
if (bPlayType != OSD_SHOW_PLAY)
{
/* we must by pass user action here */
if (fgIsTrickPlay(bState))
{
vOsdCoreSetPlayStatus(OSD_SHOW_TRICK, bTime);
}
else if ((bState == SV_PLAY) && (bPlayType == OSD_SHOW_TRICK))
{
/* clear play status first, this should be moved to vChangePbcState() */
vOsdCoreSetPlayStatus(OSD_SHOW_CLEAR, 0);
}
else
{
return;
}
}
else if (bState == SV_PLAY) /* && (bPlayType == OSD_SHOW_PLAY) */
{
return;
}
else
{
/* clear play status first */
vOsdCoreSetPlayStatus(OSD_SHOW_CLEAR, 0);
}
}
/* start show play status */
pbStr[0] = 2;
if ((bState == SV_FF) || (bState == SV_FR))
{
if (bVal == 0)
{
bState = SV_PLAY;
}
else
{
bVal = bHEXToBCD(bVal);
if (BCD_HI(bVal) > 0)
{
pbStr[1] = BCD_HI(bVal) + '0';
}
else
{
pbStr[1] = ' ';
}
pbStr[2] = BCD_LO(bVal) + '0';
}
}
else if ((bState == SV_SF) || (bState == SV_SR))
{
if (bVal == 0)
{
bState = SV_PLAY;
}
else
{
bVal = bHEXToBCD(bVal);
if (BCD_HI(bVal) > 0)
{
pbStr[1] = BCD_HI(bVal) + '0';
pbStr[2] = BCD_LO(bVal) + '0';
}
else
{
pbStr[1] = BCD_LO(bVal) + '0';
pbStr[2] = ' ';
}
}
}
switch (bState)
{
case SV_PLAY:
case SV_STILL:
case SV_DIGEST9:
case SV_DIGEST4:
case SV_DIGEST:
/* show "BLANK" for PLAY state */
vOsdPosClear(OSD_POS_PLAY_STATUS);
#ifdef PLAYER_GOTO
// megaa Goto
if (fgIsInGoto())
{
pbStr[0] = 0;
vGotoShowIcon(OSD_MSG_ICON_PLAY, pbStr);
}
#endif
return;
case SV_STOP:
case SV_STOP_RESUME:
pbStr[0] = 0;
wMsgIndex = fgFlMenuOn ? OSD_MSG_STOP : OSD_MSG_ICON_STOP;
break;
case SV_FF:
wMsgIndex = fgFlMenuOn ? OSD_MSG_FFX : OSD_MSG_ICON_FFX;
break;
case SV_FR:
wMsgIndex = fgFlMenuOn ? OSD_MSG_FRX : OSD_MSG_ICON_FRX;
break;
case SV_SF:
wMsgIndex = fgFlMenuOn ? OSD_MSG_SFX : OSD_MSG_ICON_SFX;
break;
case SV_SR:
wMsgIndex = fgFlMenuOn ? OSD_MSG_ICON_SRX : OSD_MSG_ICON_SRX;
break;
case SV_PAUSE:
pbStr[0] = 0;
wMsgIndex = fgFlMenuOn ? OSD_MSG_PAUSE : OSD_MSG_ICON_PAUSE;
break;
case SV_STEP:
pbStr[0] = 0;
wMsgIndex = fgFlMenuOn ? OSD_MSG_STEP : OSD_MSG_ICON_STEP;
break;
case SV_STEP_BACK:
pbStr[0] = 0;
wMsgIndex = fgFlMenuOn ? OSD_MSG_ICON_STEP_BACK : OSD_MSG_ICON_STEP_BACK;
break;
default:
break;
}
if (wMsgIndex != 0)
{
#ifdef PLAYER_FLMENU
if (fgFlCheckStatus(FL_STATUS_IN_MENU))
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -