📄 o_fta_program.c
字号:
{
// not valid parameters
return MS_OP_CLOSE_PARENT;
}
CoreAPI_FtaUpdateChannelList( pFtaPid->moParam.mwChIndex, &(pFtaPid->moParam.ciChannelInfo) );
MS_SendOperation((MSO_OBJECT __NEAR *)MS_FindAncestor(pThis, &oFtaProgramDescriptor), MS_OP_CLOSE_PARENT, 0);
// TODO: Send Refresh to Channel table. Focus problem Not easy to handle
MS_SendOperation((MSO_OBJECT __NEAR *)pChannelTab, MS_OP_REFRESH, 0);
}
else
{
MSO_OBJECT __NEAR* pTransportTab = MS_FindAncestor(pThis, &oDescriptorFTATransportTab);
if( INVALID_VALUE == pFtaPid->moParam.tiTransportInfo.info.ulFrequency
#ifdef FTA_SATELLITE
|| INVALID_VALUE == pFtaPid->moParam.tiTransportInfo.info.ulLnbSwitchFreq
|| INVALID_VALUE == pFtaPid->moParam.tiTransportInfo.info.uiWEPolModFec
|| INVALID_VALUE == pFtaPid->moParam.tiTransportInfo.info.ulSymbolRate
#endif
)
{
// not valid parameters
return MS_OP_CLOSE_PARENT;
}
CoreAPI_FtaUpdateTransportList( pFtaPid->moParam.mwChIndex, &(pFtaPid->moParam.tiTransportInfo) );
MS_SendOperation((MSO_OBJECT __NEAR *)MS_FindAncestor(pThis, &oFtaProgramDescriptor), MS_OP_CLOSE_PARENT, 0);
// TODO: Send Refresh to Transport table.
MS_SendOperation((MSO_OBJECT __NEAR *)pTransportTab, MS_OP_REFRESH, 0);
}
// return MS_OP_CLOSE_PARENT;
return MS_OP_NONE;
}
default:
break;
}
return OBUTTON_Operation(pThis, MsOp, lParam);
}
#endif // D_CUSTOM
/***************************************************************************************
* Function : _EditOperation
*
* In :
*
* Out :
*
* Desc :
****************************************************************************************/
#pragma argsused
#ifndef D_CUSTOM__EditOperation
STATIC MS_OP _EditOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam, UINT16 *uipEditParamPtr)
{
UINT16 uiMaxDecimal;
switch(MsOp)
{
case MS_OP_FOCUS_CHANGE:
MS_DisplayAddObject(pThis);
break;
case MS_OP_0: // Fall Through
case MS_OP_1: // Fall Through
case MS_OP_2: // Fall Through
case MS_OP_3: // Fall Through
case MS_OP_4: // Fall Through
case MS_OP_5: // Fall Through
case MS_OP_6: // Fall Through
case MS_OP_7: // Fall Through
case MS_OP_8: // Fall Through
case MS_OP_9:
{
UINT8 cValue = MsOp - MS_OP_0;
if( bIsChannelProg )
uiMaxDecimal = 1000;
else
uiMaxDecimal = 10000;
if(INVALID_VALUE == *uipEditParamPtr )
{
*uipEditParamPtr = cValue;
MS_DisplayAddObject(pThis);
}
else if(uiMaxDecimal > *uipEditParamPtr)
{
*uipEditParamPtr = (*uipEditParamPtr * 10) + cValue;
if(!_IsPidAllowed( *uipEditParamPtr )&& bIsChannelProg)
{
*uipEditParamPtr = INVALID_VALUE;
}
MS_DisplayAddObject(pThis);
}
}
return MS_OP_NONE;
case MS_OP_CLEAR:
{
if(INVALID_VALUE != *uipEditParamPtr)
{
*uipEditParamPtr = INVALID_VALUE;
MS_DisplayAddObject(pThis);
}
}
return MS_OP_NONE;
}
return MsOp;
}
#endif // D_CUSTOM
/***************************************************************************************
* Display functions
****************************************************************************************/
/***************************************************************************************
* Function : _FtaProgramFillOSDSeg
*
* In :
*
* Out :
*
* Desc : MSO_FTA_PROGRAM display function.
****************************************************************************************/
#ifndef D_CUSTOM__FtaProgramFillOSDSeg
STATIC BOOL _FtaProgramFillOSDSeg(MSO_OBJECT __NEAR* pThis, MS_AREA __NEAR* pAbsArea)
{
MS_DESCRIPTOR_FTA_PROGRAM* pDescriptor = (MS_DESCRIPTOR_FTA_PROGRAM*)pThis->mpDescriptor;
OSDR_FillOsdSegBitmapFitArea(pDescriptor->mpBgBmp, pAbsArea);
return FALSE;
}
#endif // D_CUSTOM
/***************************************************************************************
* Function : _FtaPidFillOSDSeg
*
* In :
*
* Out :
*
* Desc : Display function of the Title/Track/Chapter objects.
****************************************************************************************/
#ifndef D_CUSTOM__FtaPidFillOSDSeg
STATIC BOOL _FtaPidFillOSDSeg(MSO_OBJECT __NEAR* pThis, MS_AREA __NEAR* pAbsArea)
{
FORMATED_UNICODE_STRING oFormUniStr;
MS_DESCRIPTOR_FTA_PID* pDescriptor = (MS_DESCRIPTOR_FTA_PID*)pThis->mpDescriptor;
MSO_FTA_PROGRAM __NEAR* pFtaPid = (MSO_FTA_PROGRAM __NEAR*)MS_FindAncestor(pThis, &oFtaProgramDescriptor);
UINT16 wColor = (MS_IsFocusable(pThis)) ? pDescriptor->mwTextColor : CIDX_4;
UINT16 szBuffer[4];
UINT16 wValue = INVALID_VALUE;
switch( pDescriptor->mOsdLabel )
{
case S_CH_INDEX:
wValue = pFtaPid->moParam.mwChIndex;
break;
case S_PCR_PID:
wValue = pFtaPid->moParam.ciChannelInfo.uiPcrPID;
break;
case S_AUD_PID:
wValue = pFtaPid->moParam.ciChannelInfo.uiAudioPID;
break;
case S_VID_PID:
wValue = pFtaPid->moParam.ciChannelInfo.uiVideoPID;
break;
#ifdef FTA_SATELLITE
case S_LNB:
wValue = (UINT16)pFtaPid->moParam.tiTransportInfo.info.ulLnbSwitchFreq;
break;
#endif
case S_TRANSPORT_FREQ:
wValue = (UINT16)pFtaPid->moParam.tiTransportInfo.info.ulFrequency;
break;
#ifdef FTA_SATELLITE
case S_SYMBOL:
wValue = (UINT16)pFtaPid->moParam.tiTransportInfo.info.ulSymbolRate;
break;
case S_POLARITY:
wValue = pFtaPid->moParam.tiTransportInfo.info.uiWEPolModFec;
break;
#endif
}
OSDR_GetFormUniStr_OsdMessage((FORMATED_UNICODE_STRING __NEAR*)&oFormUniStr, pDescriptor->mOsdLabel);
if(INVALID_VALUE == wValue)
{
if( bIsChannelProg )
STR_GenerateRepeatChars('-', 4, szBuffer, 0, sizeof(szBuffer));
else
STR_GenerateRepeatChars('-', 5, szBuffer, 0, sizeof(szBuffer));
}
else
{
STR_GenerateNumericValue((INT32)wValue, szBuffer, 0, sizeof(szBuffer));
}
// The Label
OSDR_FillOsdSegUniString((FORMATED_UNICODE_STRING __NEAR*)&oFormUniStr,
pAbsArea,
(OPTION_XPADDING << 1),
(pAbsArea->mwH >> 1),
ALIGN_H_LEFT,
ALIGN_V_CENTER,
wColor);
// The Value.
OSDR_GetFormUniStr_Ram((FORMATED_UNICODE_STRING __NEAR*)&oFormUniStr, (UINT32)szBuffer);
OSDR_FillOsdSegUniString((FORMATED_UNICODE_STRING __NEAR*)&oFormUniStr,
pAbsArea,
(pAbsArea->mwW - (OPTION_XPADDING << 1)),
(pAbsArea->mwH >> 1),
ALIGN_H_RIGHT,
ALIGN_V_CENTER,
wColor);
if(MS_IsFocused(pThis))
OSDR_FillOsdSegBitmapFitArea(BMP_FG_FOCUS, pAbsArea);
return FALSE;
}
#endif // D_CUSTOM
/***************************************************************************************
* Function : _ChannelTypeChoiceOperation
*
* In :
*
* Out :
*
* Desc : The Karaoke On/Off choice operation function.
****************************************************************************************/
#pragma argsused
#ifndef D_CUSTOM__ChannelTypeChoiceOperation
STATIC MS_OP _ChannelTypeChoiceOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
MsOp=ChoiceNoExpandingOperation(pThis, MsOp, lParam);
// Post-processing
switch(MsOp)
{
case MS_OP_INIT: // Fall Through !!!
case MS_OP_REFRESH:
MS_DisplayAddObject(pThis);
return MS_OP_NONE;
default:
break;
}
return MsOp;
}
#endif // D_CUSTOM
/***************************************************************************************
* Function : _ChannelTypeChoiceAction
*
* In : pthis =
* eType = Getting or Setting the value
* wValue = 0 if value to get, or value to be set
*
* Out : None
*
* Return : None
*
* Desc : The channel type radio/video choice action function.
****************************************************************************************/
#pragma argsused
#ifndef D_CUSTOM__ChannelTypeChoiceAction
STATIC void _ChannelTypeChoiceAction(MSO_OBJECT __NEAR* pThis, enMutatorType eType, UINT16 wValue)
{
MSO_CHOICE __NEAR* pChoice = (MSO_CHOICE __NEAR*)pThis;
MSO_FTA_PROGRAM __NEAR* pFtaPid = (MSO_FTA_PROGRAM __NEAR*)MS_FindAncestor(pThis, &oFtaProgramDescriptor);
if(eMutatorGet == eType)
{
if( pFtaPid->moParam.ciChannelInfo.mwAttr == INVALID_VALUE )
pChoice->moParam.mwCurrValIndex = OCHOICE_GetIndexFromValue(pThis, FTA_CHANNEL_VIDEO_ATTR);
else
{
pChoice->moParam.mwCurrValIndex = OCHOICE_GetIndexFromValue(pThis, pFtaPid->moParam.ciChannelInfo.mwAttr & ~FTA_CHANNEL_FAVORITE_ATTR);
}
}
else
{
pFtaPid->moParam.ciChannelInfo.mwAttr &= 0xFFF9; // Clear Video and Radio Attr
pFtaPid->moParam.ciChannelInfo.mwAttr |= wValue;// Set new attr.
}
}
#endif // D_CUSTOM
/***************************************************************************************
* Function : _ChannelTypeChoiceOperation
*
* In :
*
* Out :
*
* Desc : The Karaoke On/Off choice operation function.
****************************************************************************************/
#pragma argsused
#ifdef FTA_SATELLITE
#ifndef D_CUSTOM__PolarityChoiceOperation
STATIC MS_OP _PolarityChoiceOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
MsOp=ChoiceNoExpandingOperation(pThis, MsOp, lParam);
// Post-processing
switch(MsOp)
{
case MS_OP_INIT: // Fall Through !!!
case MS_OP_REFRESH:
MS_DisplayAddObject(pThis);
return MS_OP_NONE;
default:
break;
}
return MsOp;
}
#endif // D_CUSTOM
#endif
/***************************************************************************************
* Function : _PolarityChoiceAction
*
* In : pthis =
* eType = Getting or Setting the value
* wValue = 0 if value to get, or value to be set
*
* Out : None
*
* Return : None
*
* Desc : The channel type radio/video choice action function.
****************************************************************************************/
#pragma argsused
#ifdef FTA_SATELLITE
#ifndef D_CUSTOM__ChannelTypeChoiceAction
STATIC void _PolarityChoiceAction(MSO_OBJECT __NEAR* pThis, enMutatorType eType, UINT16 wValue)
{
MSO_CHOICE __NEAR* pChoice = (MSO_CHOICE __NEAR*)pThis;
MSO_FTA_PROGRAM __NEAR* pFtaPid = (MSO_FTA_PROGRAM __NEAR*)MS_FindAncestor(pThis, &oFtaProgramDescriptor);
if(eMutatorGet == eType)
{
if( pFtaPid->moParam.tiTransportInfo.info.uiWEPolModFec == INVALID_VALUE )
pChoice->moParam.mwCurrValIndex = OCHOICE_GetIndexFromValue(pThis, 1 );
else
pChoice->moParam.mwCurrValIndex = OCHOICE_GetIndexFromValue(pThis, pFtaPid->moParam.tiTransportInfo.info.uiWEPolModFec );
}
else
{
pFtaPid->moParam.tiTransportInfo.info.uiWEPolModFec = wValue;
}
}
#endif // D_CUSTOM
#endif
/***************************************************************************************
* Public functions
****************************************************************************************/
#endif // FTA_SUPPORT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -