📄 pe_iconfig.cpp
字号:
* @notes What do we return if arbitrary is supported? For now we will just return not implemented.
*/
PE_STATUS PEiConfigureGetHorizontalScalingFactors(BOOLEAN primary, float *pScaleFactorArray, size_t arraysize)
{
return (PE_NOT_IMPLEMENTED);
}
/**
*
*/
PE_STATUS PEiConfigureGetInputVideoSize(BOOLEAN primary, unsigned int *uiHeight, unsigned int *uiWidth)
{
PE_STATUS status = PE_SUCCESS;
if (TRUE != primary)
{
status = PE_NOT_IMPLEMENTED;
goto err_out;
}
if ( (uiHeight == NULL) || (uiWidth == NULL) )
{
status = PE_NULL_POINTER;
goto err_out;
}
*uiWidth = 1920; /* Width in pixels of source video. */
*uiHeight = 1080; /* Height in pixels of source video. */
err_out:
return (status);
}
/**
* @notes decode api supports full positioning. The enumeration needs to be defined for returning the capability.
*/
PE_STATUS PEiConfigureGetPositioningCapability(BOOLEAN primary, unsigned int *uiPosCap)
{
/* @todo the enumeration needs to be accessible for full position capability */
*uiPosCap = 0;
return (PE_NOT_IMPLEMENTED);
}
/**
*
*/
PE_STATUS PEiConfigureGetTotalVideoArea(BOOLEAN primary, unsigned int *uiLeft, unsigned int *uiTop,
unsigned int *uiRight, unsigned int *uiBottom)
{
PE_STATUS status = PE_FAILURE;
if (TRUE != primary)
{
status = PE_NOT_IMPLEMENTED;
goto err_out;
}
if ( (uiLeft == NULL) || (uiTop == NULL) || (uiRight == NULL) || (uiBottom == NULL) )
{
status = PE_NULL_POINTER;
goto err_out;
}
/* SDK TODO: get total video area */
*uiLeft = 0; //x;
*uiTop = 0; //y;
*uiRight = 1920; //x+width;
*uiBottom = 1080; //y+height;
status = PE_SUCCESS;
err_out:
return (status);
}
/**
*
*/
PE_STATUS PEiConfigureGetTotalVideoAreaOnScreen(BOOLEAN primary, unsigned int *uiLeft, unsigned int *uiTop,
unsigned int *uiRight, unsigned int *uiBottom)
{
PE_STATUS status = PE_FAILURE;
if (TRUE != primary)
{
status = PE_NOT_IMPLEMENTED;
goto err_out;
}
if ( (uiLeft == NULL) || (uiTop == NULL) || (uiRight == NULL) || (uiBottom == NULL) )
{
status = PE_NULL_POINTER;
goto err_out;
}
/* SDK TODO: get total video area on screen */
*uiLeft = 0; //x;
*uiTop = 0; //y;
*uiRight = 1920; //x + width;
*uiBottom = 1080; //y + height;
status = PE_SUCCESS;
err_out:
return (status);
}
/**
* @notes What if we do support arbitrary scaling? For now we will just return not implemented.
*/
PE_STATUS PEiConfigureGetVerticalScalingFactors(BOOLEAN primary, float *pScaleFactorArray, size_t arraysize)
{
return (PE_NOT_IMPLEMENTED);
}
/**
* Return the resolution of the video output.
*/
PE_STATUS PEiConfigureGetVideoSize(BOOLEAN primary, unsigned int *uiHeight, unsigned int *uiWidth)
{
PE_STATUS status;
if (TRUE != primary)
{
status = PE_NOT_IMPLEMENTED;
goto err_out;
}
if ( (uiHeight == NULL) || (uiWidth == NULL) )
{
status = PE_NULL_POINTER;
goto err_out;
}
*uiWidth = 1920; /* Width of video format in pixels. */
*uiHeight = 1080; /* Height of video format in pixels. */
status = PE_SUCCESS;
err_out:
return (status);
}
/**
*
*/
PE_STATUS PEiConfigureSetClipRegion(BOOLEAN primary, unsigned int uiLeft, unsigned int uiTop,
unsigned int uiRight, unsigned int uiBottom)
{
PE_STATUS status = PE_FAILURE;
if (TRUE != primary)
{
status = PE_NOT_IMPLEMENTED;
goto err_out;
}
// x = uiLeft;
// y = uiTop;
// width = uiRight - x;
// height = uiBottom - y;
status = PE_SUCCESS;
err_out:
return (status);
}
/**
* @notes Need information on decode api capabilities
*/
PE_STATUS PEiConfigureGetSupportsArbitraryHorizontalScaling(BOOLEAN primary, BOOLEAN *fSupported,
float *flMinScale, float *flMaxScale)
{
if (TRUE != primary)
{
return(PE_NOT_IMPLEMENTED);
}
*fSupported = TRUE;
*flMinScale = 1/32;
*flMaxScale = 32;
return (PE_SUCCESS);
}
/**
* @notes Need more information on decode api capabilities.
*/
PE_STATUS PEiConfigureGetSupportsArbitraryVerticalScaling(BOOLEAN primary, BOOLEAN *fSupported,
float *flMinScale, float *flMaxScale)
{
if (TRUE != primary)
{
return(PE_NOT_IMPLEMENTED);
}
*fSupported = TRUE;
*flMinScale = 1/32;
*flMaxScale = 32;
return (PE_SUCCESS);
}
/**
* @notes Need information on decode api capabilities
*/
PE_STATUS PEiConfigureGetSupportsClipping(BOOLEAN primary, BOOLEAN *fSupported)
{
if (TRUE != primary)
{
return(PE_NOT_IMPLEMENTED);
}
*fSupported = TRUE;
return (PE_SUCCESS);
}
/**
*
*/
PE_STATUS PEiConfigureGetIsPanAndScan(BOOLEAN primary, BOOLEAN *fIsPanScan)
{
PE_STATUS status;
if (TRUE != primary)
{
status = PE_NOT_IMPLEMENTED;
goto err_out;
}
*fIsPanScan = FALSE;
err_out:
return (status);
}
/**
*
*/
PE_STATUS PEiConfigureCanScaleSourceWindowToDestination(BOOLEAN primary, unsigned int sX, unsigned int sY, unsigned int sW, unsigned int sH,
unsigned int dX, unsigned int dY, unsigned int dW, unsigned int dH,
unsigned int *sXOut, unsigned int *sYOut, unsigned int *sWOut, unsigned int *sHOut,
unsigned int *dXOut, unsigned int *dYOut, unsigned int *dWOut, unsigned int *dHOut)
{
PE_STATUS status = PE_SUCCESS;
if (TRUE != primary)
{
status = PE_NOT_IMPLEMENTED;
goto err_out;
}
status = PE_FAILURE;
goto err_out;
err_out:
*dXOut = dX;
*dYOut = dY;
*dWOut = dW;
*dHOut = dH;
*sXOut = sX;
*sYOut = sY;
*sWOut = sW;
*sHOut = sH;
return (status);
}
/**
*
*/
PE_STATUS PEiConfigureScaleSourceWindowToDestination(BOOLEAN primary, unsigned int sX, unsigned int sY, unsigned int sW, unsigned int sH, unsigned int dX, unsigned int dY, unsigned int dW, unsigned int dH)
{
PE_STATUS status;
if (TRUE != primary)
{
status = PE_NOT_IMPLEMENTED;
goto err_out;
}
status = PE_FAILURE;
goto err_out;
err_out:
return (status);
}
/**
*
*/
PE_STATUS PEiConfigureSetScalingFactors(BOOLEAN primary, float flHorizontalScalingFactor, float flVerticalScalingFactor)
{
PE_STATUS status;
if (TRUE != primary)
{
status = PE_NOT_IMPLEMENTED;
goto err_out;
}
status = PE_FAILURE;
goto err_out;
err_out:
return (status);
}
/**
*
*/
PE_STATUS PEiConfigureGetScalingFactors(BOOLEAN primary, float *flHorizontalScalingFactor, float *flVerticalScalingFactor)
{
PE_STATUS status = PE_FAILURE;
if (TRUE != primary)
{
status = PE_NOT_IMPLEMENTED;
goto err_out;
}
if ( (flHorizontalScalingFactor == NULL) || (flVerticalScalingFactor == NULL) )
{
status = PE_NULL_POINTER;
goto err_out;
}
status = PE_FAILURE;
goto err_out;
err_out:
return (status);
}
/**
*
*/
PE_STATUS PEiConfigureGetVideoPosition(BOOLEAN primary, unsigned int *uiX, unsigned int *uiY)
{
PE_STATUS status = PE_FAILURE;
if (TRUE != primary)
{
status = PE_NOT_IMPLEMENTED;
goto err_out;
}
if ( (uiX == NULL) || (uiY == NULL) )
{
status = PE_NULL_POINTER;
goto err_out;
}
*uiX = 0; //x;
*uiY = 0; //y;
status = PE_SUCCESS;
err_out:
return (status);
}
/**
*
*/
PE_STATUS PEiConfigureSetVideoPosition(BOOLEAN primary, unsigned int uiX, unsigned int uiY)
{
PE_STATUS status = PE_FAILURE;
if (TRUE != primary)
{
status = PE_NOT_IMPLEMENTED;
goto err_out;
}
// x = uiX;
// y = uiY;
status = PE_SUCCESS;
err_out:
return (status);
}
/**
* Display sub pictures.
*
* @param handle - iConfigure handle.
*
* @return PE_STATUS - Error code.
*/
PE_STATUS PEiConfigureShowSubPic(PE_HANDLE handle)
{
ISTREAMCTRLHANDLE *pStrmCtrl;
PE_STATUS status;
if (handle == NULL)
{
return (PE_INVALID_HANDLE);
}
pStrmCtrl = ((PEHANDLE *)handle)->iStreamCtrl;
if (pStrmCtrl->StreamType == STREAM_TYPE_MPEG2_VOB)
{
if (SPUShow(pStrmCtrl->m_decoders.spu) == SPU_SUCCESS)
{
status = PE_SUCCESS;
}
else
{
status = PE_FAILURE;
}
}
#if BDROM_ENABLE
else if (pStrmCtrl->StreamType == STREAM_TYPE_MPEG2_BDTS)
{
PG_STATE pg_state = PGGetState(pStrmCtrl->m_decoders.pg_dec);
/* Either textst decoder or pg decoder is running */
if (pg_state == PG_STATE_RUNNING)
{
if (PGShowHide(pStrmCtrl->m_decoders.pg_dec, PG_SHOW_GRAPHICS) == PG_STATUS_SUCCESS)
{
status = PE_SUCCESS;
}
else
{
status = PE_FAILURE;
}
}
else
{
if (TextSTShow(pStrmCtrl->m_decoders.st_dec) != TEXTST_SUCCESS)
{
status = PE_SUCCESS;
}
else
{
status = PE_FAILURE;
}
}
}
#endif
else
{
status = PE_INVALID_STATE;
}
return (status);
}
/**
* Hide sub pictures.
*
* @param handle - iConfigure handle.
*
* @return PE_STATUS - Error code.
*/
PE_STATUS PEiConfigureHideSubPic(PE_HANDLE handle)
{
ISTREAMCTRLHANDLE *pStrmCtrl;
PE_STATUS status;
if (handle == NULL)
{
return (PE_INVALID_HANDLE);
}
pStrmCtrl = ((PEHANDLE *)handle)->iStreamCtrl;
if (pStrmCtrl->StreamType == STREAM_TYPE_MPEG2_VOB)
{
if (SPUHide(pStrmCtrl->m_dec
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -