本文整理汇总了C++中OMX_COMPONENTTYPE::FreeBuffer方法的典型用法代码示例。如果您正苦于以下问题:C++ OMX_COMPONENTTYPE::FreeBuffer方法的具体用法?C++ OMX_COMPONENTTYPE::FreeBuffer怎么用?C++ OMX_COMPONENTTYPE::FreeBuffer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OMX_COMPONENTTYPE
的用法示例。
在下文中一共展示了OMX_COMPONENTTYPE::FreeBuffer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: vcil_in_free_buffer
void vcil_in_free_buffer(ILCS_COMMON_T *st, void *call, int clen, void *resp, int *rlen)
{
IL_FREE_BUFFER_EXECUTE_T *exe = call;
IL_RESPONSE_HEADER_T *ret = resp;
OMX_COMPONENTTYPE *pComp = exe->reference;
OMX_BUFFERHEADERTYPE *pHeader;
OMX_U8 *buffer;
OMX_PARAM_PORTDEFINITIONTYPE def;
OMX_ERRORTYPE error;
def.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE);
def.nVersion.nVersion = OMX_VERSION;
def.nPortIndex = exe->port;
error = pComp->GetParameter(pComp, OMX_IndexParamPortDefinition, &def);
vc_assert(error == OMX_ErrorNone);
if (def.eDir == OMX_DirInput)
pHeader = exe->inputPrivate;
else
pHeader = exe->outputPrivate;
buffer = pHeader->pBuffer;
*rlen = sizeof(IL_RESPONSE_HEADER_T);
ret->func = IL_FREE_BUFFER;
ret->err = pComp->FreeBuffer(pComp, exe->port, pHeader);
if (ret->err == OMX_ErrorNone)
vcos_free(buffer);
}