📄 o_display.c
字号:
{// AVI or MP4 type Fall thru:
if(eClipType_AVI == CoreAPI_GetCurrentClipType()
#ifdef IS_MP4_CAPABLE
||eClipType_MP4 == CoreAPI_GetCurrentClipType()
#endif //IS_MP4_CAPABLE
)
{
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, (UINT32)S_AUDIO);
break;
}
else
{
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, (UINT32)S_NULL);
break;
}
}
case MEDIA_TYPE_SVCD:
case MEDIA_TYPE_DVD_VIDEO:
#ifdef DVD_VR_SUPPORT
case MEDIA_TYPE_DVDVR:
#endif
#ifdef DVD_AUDIO_SUPPORT
case MEDIA_TYPE_DVD_AUDIO:
#endif
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, (UINT32)S_AUDIO);
break;
default: // nothing to display in this position
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, (UINT32)S_NULL);
break;
}
return;
}
/**************************************************************************
* Function :
* In :
* Out :
* Desc :
***************************************************************************/
#pragma argsused
static void _GetPos3ValueStr(FORMATED_UNICODE_STRING __NEAR* pFormUniStr, UINT32 lParam)
{
UINT8 cCurrentAudioNum;
// Determine the disc type:
switch(CoreAPI_GetCurrentMediaType())
{
case MEDIA_TYPE_CLIPS:
{// AVI or MP4 type Fall thru:
if(eClipType_AVI == CoreAPI_GetCurrentClipType()
#ifdef IS_MP4_CAPABLE
||eClipType_MP4 == CoreAPI_GetCurrentClipType()
#endif //IS_MP4_CAPABLE
)
{
cCurrentAudioNum = CoreAPI_GetCurrentAudioNum();
if( (cCurrentAudioNum == ERROR_AUDIO_NUM) ||(cCurrentAudioNum == 0))
{
// If the value is valid but zero, display it as audio stream 1.
cCurrentAudioNum = 1;
}
// Display the current and total audio stream values:
STR_GenerateAudioInfo(cCurrentAudioNum,
(UINT16*)&(pFormUniStr->mszUniStr),
0,
UNISTR_LENGTH_MAX+1);
OSDR_FormatUniString(pFormUniStr);
break;
}
else
{
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, (UINT32)S_NULL);
break;
}
}
case MEDIA_TYPE_SVCD:
case MEDIA_TYPE_DVD_VIDEO:
#ifdef DVD_VR_SUPPORT
case MEDIA_TYPE_DVDVR:
#endif
#ifdef DVD_AUDIO_SUPPORT
case MEDIA_TYPE_DVD_AUDIO:
#endif
cCurrentAudioNum = CoreAPI_GetCurrentAudioNum();
if( (cCurrentAudioNum == ERROR_AUDIO_NUM) ||(cCurrentAudioNum == 0))
{
// If the value is valid but zero, display it as audio stream 1.
cCurrentAudioNum = 1;
}
// Display the current and total audio stream values:
STR_GenerateAudioInfo(cCurrentAudioNum,
(UINT16*)&(pFormUniStr->mszUniStr),
0,
UNISTR_LENGTH_MAX+1);
OSDR_FormatUniString(pFormUniStr);
break;
default: // nothing to display in this position
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, (UINT32)S_NULL);
break;
}
return;
}
/**************************************************************************
* Function :
* In :
* Out :
* Desc :
***************************************************************************/
#pragma argsused
static void _GetPos4Str(FORMATED_UNICODE_STRING __NEAR* pFormUniStr, UINT32 lParam)
{
// Determine the disc type:
switch(CoreAPI_GetCurrentMediaType())
{
case MEDIA_TYPE_CLIPS:
{// AVI or MP4 type Fall thru:
if(eClipType_AVI == CoreAPI_GetCurrentClipType()
#ifdef IS_MP4_CAPABLE
||eClipType_MP4 == CoreAPI_GetCurrentClipType()
#endif //IS_MP4_CAPABLE
)
{
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_SUBTITLE);
break;
}
else
{
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_NULL);
break;
}
}
#ifdef DVD_AUDIO_SUPPORT
case MEDIA_TYPE_DVD_AUDIO:
if(CoreAPI_IsInAOTTDomain())
{
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_NULL);
break;
}
// if DVD_AUDIO is not AOTT
//Do nothing , just fall through
//***********Note******************************
// share the same code with DVD_VIDEO and DVDVR.
// if we add other case ,be careful to not effect this one.
//********** End *******************************
#endif//DVD_AUDIO_SUPPORT
case MEDIA_TYPE_DVD_VIDEO:
#ifdef DVD_VR_SUPPORT
case MEDIA_TYPE_DVDVR:
#endif
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_SUBTITLE);
break;
default: // nothing to display in this position
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_NULL);
break;
}
return;
}
/**************************************************************************
* Function :
* In :
* Out :
* Desc :
***************************************************************************/
#pragma argsused
static void _GetPos4ValueStr(FORMATED_UNICODE_STRING __NEAR* pFormUniStr, UINT32 lParam)
{
// Determine the disc type:
switch(CoreAPI_GetCurrentMediaType())
{
case MEDIA_TYPE_CLIPS:
{// AVI or MP4 type Fall thru:
if(eClipType_AVI == CoreAPI_GetCurrentClipType()
#ifdef IS_MP4_CAPABLE
||eClipType_MP4 == CoreAPI_GetCurrentClipType()
#endif //IS_MP4_CAPABLE
)
{
STR_GenerateSubtitleInfo(CoreAPI_GetCurrentSubtitleNum(),
(UINT16*)&(pFormUniStr->mszUniStr),
0,
UNISTR_LENGTH_MAX+1);
OSDR_FormatUniString(pFormUniStr);
break;
}
else
{
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_NULL);
break;
}
}
#ifdef DVD_AUDIO_SUPPORT
case MEDIA_TYPE_DVD_AUDIO:
if(CoreAPI_IsInAOTTDomain())
{
STR_GenerateDVDAInfo(CoreAPI_GetCurrentAudioNum(),
1,
(UINT16*)&(pFormUniStr->mszUniStr),
0,
UNISTR_LENGTH_MAX+1);
OSDR_FormatUniString(pFormUniStr);
break;
}
// if DVD_AUDIO is not AOTT
//Do nothing , just fall through
//***********Note******************************
// share the same code with DVD_VIDEO and DVDVR.
// if we add other case ,be careful to not effect this one.
//********** End *******************************
#endif// DVD_AUDIO_SUPPORT
case MEDIA_TYPE_DVD_VIDEO:
#ifdef DVD_VR_SUPPORT
case MEDIA_TYPE_DVDVR:
#endif
STR_GenerateSubtitleInfo(CoreAPI_GetCurrentSubtitleNum(),
(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;
}
/**************************************************************************
* Function :
* In :
* Out :
* Desc :
***************************************************************************/
#pragma argsused
static void _GetPos5Str(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_NULL);
break;
}
// if DVD_AUDIO is not AOTT
//Do nothing , just fall through
//***********Note******************************
// share the same code with DVD_VIDEO and DVDVR.
// if we add other case ,be careful to not effect this one.
//********** End *******************************
#endif//DVD_AUDIO_SUPPORT
case MEDIA_TYPE_DVD_VIDEO:
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_ANGLE);
break;
default: // nothing to display in this position
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_NULL);
break;
}
return;
}
/**************************************************************************
* Function :
* In :
* Out :
* Desc :
***************************************************************************/
#pragma argsused
static void _GetPos5ValueStr(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())
{
STR_GenerateDVDAInfo(CoreAPI_GetCurrentAudioNum(),
2,
(UINT16*)&(pFormUniStr->mszUniStr),
0,
UNISTR_LENGTH_MAX+1);
OSDR_FormatUniString(pFormUniStr);
break;
}
// if DVD_AUDIO is not AOTT
//Do nothing , just fall through
//***********Note******************************
// share the same code with DVD_VIDEO and DVDVR.
// if we add other case ,be careful to not effect this one.
//********** End *******************************
#endif
case MEDIA_TYPE_DVD_VIDEO:
STR_GenerateAngle(CoreAPI_GetCurrentAngleNum(),
(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;
}
/**************************************************************************
* Function :
* In :
* Out :
* Desc :
***************************************************************************/
#pragma argsused
static void _GetPos8Str(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_NULL);
break;
}
// if DVD_AUDIO is not AOTT
//Do nothing , just fall through
//***********Note******************************
// share the same code with DVD_VIDEO and DVDVR.
// if we add other case ,be careful to not effect this one.
//********** End *******************************
#endif//DVD_AUDIO_SUPPORT
case MEDIA_TYPE_DVD_VIDEO:
#ifdef DVD_VR_SUPPORT
case MEDIA_TYPE_DVDVR:
#endif
#ifdef READ_BIT_RATE
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_BITRATE);
break;
#endif
default: // nothing to display in this position
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_NULL);
break;
}
return;
}
/**************************************************************************
* Function :
* In :
* Out :
* Desc :
***************************************************************************/
#pragma argsused
static void _GetPos8ValueStr(FORMATED_UNICODE_STRING __NEAR* pFormUniStr, UINT32 lParam)
{
#ifdef READ_BIT_RATE
UINT16 uiBitrate;
UINT8 ucStrPos;
#endif
// Determine the disc type:
switch(CoreAPI_GetCurrentMediaType())
{
#ifdef DVD_AUDIO_SUPPORT
case MEDIA_TYPE_DVD_AUDIO:
if(CoreAPI_IsInAOTTDomain())
{
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_NULL);
break;
}
// if DVD_AUDIO is not AOTT
//Do nothing , just fall through
//***********Note******************************
// share the same code with DVD_VIDEO and DVDVR.
// if we add other case ,be careful to not effect this one.
//********** End *******************************
#endif//DVD_AUDIO_SUPPORT
case MEDIA_TYPE_DVD_VIDEO:
#ifdef DVD_VR_SUPPORT
case MEDIA_TYPE_DVDVR:
#endif
#ifdef READ_BIT_RATE
uiBitrate = drv_get_bit_rate();
ucStrPos = 0;
if ( uiBitrate >= 10000 )
{
ucStrPos = STR_GenerateNumericValue((uiBitrate/10000), pFormUniStr->mszUniStr, ucStrPos, UNISTR_LENGTH_MAX+1);
uiBitrate = uiBitrate%10000;
}
if ( uiBitrate >= 1000 )
{
ucStrPos = STR_GenerateNumericValue((uiBitrate/1000), pFormUniStr->mszUniStr, ucStrPos, UNISTR_LENGTH_MAX+1);
uiBitrate = uiBitrate%1000;
}
else
{
pFormUniStr->mszUniStr[ucStrPos++] = '0';
}
if ( 0 == ucStrPos )
{
pFormUniStr->mszUniStr[ucStrPos++] = '0';
}
pFormUniStr->mszUniStr[ucStrPos++] = '.';
if ( uiBitrate >= 100 )
{
ucStrPos = STR_GenerateNumericValue((uiBitrate/100), pFormUniStr->mszUniStr, ucStrPos, UNISTR_LENGTH_MAX+1);
uiBitrate = uiBitrate%100;
}
else
{
pFormUniStr->mszUniStr[ucStrPos++] = '0';
}
if ( uiBitrate >= 10 )
{
ucStrPos = STR_GenerateNumericValue((uiBitrate/10), pFormUniStr->mszUniStr, ucStrPos, UNISTR_LENGTH_MAX+1);
uiBitrate = uiBitrate%10;
}
else
{
pFormUniStr->mszUniStr[ucStrPos++] = '0';
}
ucStrPos = STR_GenerateNumericValue(uiBitrate, pFormUniStr->mszUniStr, ucStrPos, UNISTR_LENGTH_MAX+1);
pFormUniStr->mszUniStr[ucStrPos++] = 'M';
pFormUniStr->mszUniStr[ucStrPos++] = 'b';
pFormUniStr->mszUniStr[ucStrPos++] = 'p';
pFormUniStr->mszUniStr[ucStrPos++] = 's';
pFormUniStr->mszUniStr[ucStrPos++] = '\0';
OSDR_FormatUniString(pFormUniStr);
#endif
break;
default: // nothing to display in this position
OSDR_GetFormUniStr_OsdMessage(pFormUniStr, S_NULL);
break;
}
return;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -