📄 o_display.c
字号:
#ifdef DVD_AUDIO_SUPPORT
/**************************************************************************
* Function :
* In :
* Out :
* Desc :
***************************************************************************/
#pragma argsused
static void _GetPos9Str(FORMATED_UNICODE_STRING __NEAR* pFormUniStr, UINT32 lParam)
{
// Determine the disc type:
switch(CoreAPI_GetCurrentMediaType())
{
#ifdef DVD_AUDIO_SUPPORT
case MEDIA_TYPE_DVD_AUDIO:
if(CoreAPI_IsInAOTTDomain())
{
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_ANGLE);
break;
}
#endif//DVD_AUDIO_SUPPORT
default: // nothing to display in this position
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_NULL);
break;
}
return;
}
#endif //DVD_AUDIO_SUPPORT
#ifdef DVD_AUDIO_SUPPORT
/**************************************************************************
* Function :
* In :
* Out :
* Desc :
***************************************************************************/
#pragma argsused
static void _GetPos9ValueStr(FORMATED_UNICODE_STRING __NEAR* pFormUniStr, UINT32 lParam)
{
// Determine the disc type:
switch(CoreAPI_GetCurrentMediaType())
{
#ifdef DVD_AUDIO_SUPPORT
UINT16 wCurrentAngleNum;
UINT16 wTotalAngleNum;
case MEDIA_TYPE_DVD_AUDIO:
if(CoreAPI_IsInAOTTDomain())
{
wCurrentAngleNum = CoreAPI_GetCurrentAngleNum();
wTotalAngleNum = CoreAPI_GetTotalAngleNum();
if(ERROR_ANGLE_NUM == wCurrentAngleNum)
wCurrentAngleNum= 1;
if(ERROR_ANGLE_NUM == wTotalAngleNum)
wTotalAngleNum = 1;
STR_GenerateNumericAndTotalNumeric(wCurrentAngleNum,
wTotalAngleNum,
(UINT16*)&(pFormUniStr->mszUniStr),
0,
UNISTR_LENGTH_MAX+1);
OSDR_FormatUniString(pFormUniStr);
break;
}
#endif//DVD_AUDIO_SUPPORT
default: // nothing to display in this position
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_NULL);
break;
}
return;
}
#endif //DVD_AUDIO_SUPPORT
#ifdef DVD_AUDIO_SUPPORT
/**************************************************************************
* Function :
* In :
* Out :
* Desc :
***************************************************************************/
#pragma argsused
static void _GetPos10Str(FORMATED_UNICODE_STRING __NEAR* pFormUniStr, UINT32 lParam)
{
// Determine the disc type:
switch(CoreAPI_GetCurrentMediaType())
{
#ifdef DVD_AUDIO_SUPPORT
case MEDIA_TYPE_DVD_AUDIO:
if(CoreAPI_IsInAOTTDomain())
{
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_PAGE);
break;
}
#endif//DVD_AUDIO_SUPPORT
default: // nothing to display in this position
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_NULL);
break;
}
return;
}
#endif //DVD_AUDIO_SUPPORT
#ifdef DVD_AUDIO_SUPPORT
/**************************************************************************
* Function :
* In :
* Out :
* Desc :
***************************************************************************/
#pragma argsused
static void _GetPos10ValueStr(FORMATED_UNICODE_STRING __NEAR* pFormUniStr, UINT32 lParam)
{
// Determine the disc type:
switch(CoreAPI_GetCurrentMediaType())
{
#ifdef DVD_AUDIO_SUPPORT
case MEDIA_TYPE_DVD_AUDIO:
if(CoreAPI_IsInAOTTDomain())
{
// Display the current and total page count:
STR_GenerateNumericAndTotalNumeric(CoreAPI_GetDVDAudioCurrPageNum(),
CoreAPI_GetDVDAudioTotalASVNum(),
(UINT16*)&(pFormUniStr->mszUniStr),
0,
UNISTR_LENGTH_MAX+1);
OSDR_FormatUniString(pFormUniStr);
break;
}
#endif
default: // nothing to display in this position
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_NULL);
break;
}
return;
}
#endif //DVD_AUDIO_SUPPORT
/**************************************************************************
* Function : _GetDiscTypeStr
* In :
* Out :
* Desc : This function get the string for the disc type.
***************************************************************************/
#pragma argsused
static void _GetDiscTypeStr(FORMATED_UNICODE_STRING __NEAR* pFormUniStr, UINT32 lParam)
{
OSD_MESSAGES eMsg = S_NULL;
// Determine the disc type:
switch(CoreAPI_GetCurrentMediaType())
{
case MEDIA_TYPE_DVD_VIDEO:
#ifdef D_MINI_DVD
if(CoreAPI_IsDiscTypeMiniDVD())
eMsg = S_MINI_DVD;
else
#endif // D_MINI_DVD
eMsg = S_DVD;
break;
#ifdef DVD_AUDIO_SUPPORT
case MEDIA_TYPE_DVD_AUDIO:
eMsg = S_DVD_AUDIO;
break;
#endif // DVD_AUDIO_SUPPORT
#ifdef DVD_VR_SUPPORT
case MEDIA_TYPE_DVDVR:
eMsg = S_DVD_VR;
break;
#endif // DVD_VR_SUPPORT
case MEDIA_TYPE_SVCD:
eMsg = S_SVCD;
break;
case MEDIA_TYPE_VCD:
{
if ( CoreAPI_IsVCD20())
{
eMsg = S_VCD2P0;
}
else
{
eMsg = S_VCD1P1;
}
}
break;
case MEDIA_TYPE_NOMEDIA:
eMsg = S_NO_DISK;
break;
case MEDIA_TYPE_UNKNOWN:
eMsg = S_BAD_DISK;
break;
case MEDIA_TYPE_CLIPS:
{
switch(CoreAPI_GetCurrentClipType())
{
case eClipType_CDDA:
eMsg = S_CDDA;
break;
case eClipType_JPEG:
eMsg = S_JPEG;
break;
case eClipType_MP3:
eMsg = S_MP3;
break;
case eClipType_WMA:
eMsg = S_WMA;
break;
#ifdef D_ENABLE_AAC_SUPPORT
case eClipType_M4A:
eMsg = S_M4A;
break;
#endif // D_ENABLE_AAC_SUPPORT
case eClipType_MPEG:
eMsg = S_MPEG;
break;
#if 0
case eClipType_MP2:
eMsg = S_MP2;
break;
#endif
case eClipType_AVI:
{
#ifdef D_DIVX6_SUPPORT
if(CoreAPI_IsCurrItemDivX6())
{
eMsg = S_DIVX;
break;
}
#endif
switch (CoreAPI_GetDivxVersion())
{
case DIVX_3_11:
eMsg = S_DIVX3P11;
break;
case DIVX_4_12:
eMsg = S_DIVX4P12;
break;
case DIVX_5_0:
eMsg = S_DIVX5PX;
break;
case XVID:
eMsg = S_XVID;
break;
default:
eMsg = S_AVI;
break;
}
}
break;
case eClipType_SUBTITLE:
eMsg = S_SUBTITLE;
break;
#ifdef D_OGG_VORBIS
case eClipType_OGG:
eMsg = S_OGG;
break;
#endif
#ifdef IS_ASF_CAPABLE
case eClipType_ASF:
eMsg = S_ASF;
break;
#endif
#ifdef IS_MP4_CAPABLE
case eClipType_MP4:
eMsg = S_MP4V;
break;
#endif//IS_MP4_CAPABLE
}
}
}
if (CoreAPI_IsSimultaneousMode())
eMsg = S_JPEG;
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, eMsg);
}
/**************************************************************************
* Function : _GetDiscNameStr
* In :
* Out :
* Desc :
***************************************************************************/
#ifdef DVD_VR_SUPPORT
#pragma argsused
static void _GetDiscNameStr(FORMATED_UNICODE_STRING __NEAR* pFormUniStr, UINT32 lParam)
{
#define NUM_DISC_NAME_CHAR 64
UINT8 szStr[NUM_DISC_NAME_CHAR+1];
switch(CoreAPI_GetCurrentMediaType())
{
case MEDIA_TYPE_DVDVR:
CoreAPI_GetDiscName((LPWSTR)szStr, NUM_DISC_NAME_CHAR);
STR_GenerateConstString((UINT16*)szStr, pFormUniStr->mszUniStr, 0,UNISTR_LENGTH_MAX+1);
OSDR_FormatUniString(pFormUniStr);
break;
default: // nothing to display in this position
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_NULL);
break;
}
return;
}
#pragma argsused
static void _GetORGTitleStr(FORMATED_UNICODE_STRING __NEAR* pFormUniStr, UINT32 lParam)
{
switch(CoreAPI_GetCurrentMediaType())
{
case MEDIA_TYPE_DVDVR:
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, (UINT32)S_ORG_TITLE);
break;
default: // nothing to display in this position
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_NULL);
break;
}
return;
}
#pragma argsused
static void _GetORGTitleValueStr(FORMATED_UNICODE_STRING __NEAR* pFormUniStr, UINT32 lParam)
{
switch(CoreAPI_GetCurrentMediaType())
{
case MEDIA_TYPE_DVDVR:
STR_GenerateNumericValue(CoreAPI_GetDVDVRCurrtProgramNum(),
(UINT16*)&(pFormUniStr->mszUniStr),
0,
UNISTR_LENGTH_MAX+1);
OSDR_FormatUniString(pFormUniStr);
break;
default: // nothing to display in this position
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_NULL);
break;
}
return;
}
#endif// DVD_VR_SUPPORT
/**************************************************************************
* Function : _GetTimeStr
* In : lParam: MS_ATTR_GET_REMAINING_TIME or MS_ATTR_GET_ELAPSED_TIME
* Out :
* Desc : This function displays the elapsed/remaining playback time for the
* current disc/title/track (depending on the disc type and parameter).
***************************************************************************/
static void _GetTimeStr(FORMATED_UNICODE_STRING __NEAR* pFormUniStr, UINT32 lParam)
{
UINT16 wTime = 0;
// Determine the disc type:
switch(CoreAPI_GetCurrentMediaType())
{
case MEDIA_TYPE_DVD_VIDEO:
#ifdef DVD_AUDIO_SUPPORT
case MEDIA_TYPE_DVD_AUDIO:
#endif
#ifdef DVD_VR_SUPPORT
case MEDIA_TYPE_DVDVR:
#endif
case MEDIA_TYPE_SVCD:
case MEDIA_TYPE_VCD:
//case MSG_DEVICE_MEDIA_VCD1P1:
//case MSG_DEVICE_MEDIA_VCD2P0:
if(lParam == GET_PLAYBACK_TIME_ELAPSED)
{
wTime = CoreAPI_GetElapseTime();
}
else
{
if (CoreAPI_IsFullStop())
wTime = CoreAPI_GetTotalTime();
else
wTime = CoreAPI_GetRemainingTime();
}
STR_GeneratePlaybackTime(wTime, (UINT16*)&(pFormUniStr->mszUniStr), 0, UNISTR_LENGTH_MAX+1);
OSDR_FormatUniString(pFormUniStr);
break;
case MEDIA_TYPE_CLIPS:
{
enClipType tClipType = CoreAPI_GetCurrentClipType();
if (eClipType_MPEG == tClipType
||eClipType_AVI == tClipType
#ifdef IS_MP4_CAPABLE
||eClipType_MP4 == tClipType
#endif //IS_MP4_CAPABLE
#ifdef IS_ASF_CAPABLE
|| eClipType_ASF == tClipType
#endif // IS_ASF_CAPABLE
)
{
if(lParam == GET_PLAYBACK_TIME_ELAPSED)
{
wTime = CoreAPI_GetElapseTime();
}
else
{
if (CoreAPI_IsFullStop())
wTime = CoreAPI_GetTotalTime();
else
wTime = CoreAPI_GetRemainingTime();
}
STR_GeneratePlaybackTime(wTime, (UINT16*)&(pFormUniStr->mszUniStr), 0, UNISTR_LENGTH_MAX+1);
OSDR_FormatUniString(pFormUniStr);
break;
}
else
{
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_NULL);
break;
}
}
default:
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_NULL);
break;
}
}
/**************************************************************************
* Function : _ComponentFillOsdSeg
* In :
* Out :
* Desc : Fill the container with the specified background image.
***************************************************************************/
#pragma argsused
static BOOL _ComponentFillOsdSeg(MSO_OBJECT __NEAR* pThis, MS_AREA __NEAR* pThisAbsArea)
{
#ifdef DISPLAY_BG
// Fill the container with the specified background image.
OSDR_FillOsdSegBitmap( DISPLAY_BG,
pThisAbsArea,
0,0,
ALIGN_H_LEFT,
ALIGN_V_TOP,
((MS_AREA __NEAR*)pThisAbsArea)->mwW,
((MS_AREA __NEAR*)pThisAbsArea)->mwH);
#endif // DISPLAY_BG
return TRUE;
}
#endif //D_GUI_COMPONENT_DISPLAY
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -