本文整理汇总了C++中PicturePtr::editMVBuffer方法的典型用法代码示例。如果您正苦于以下问题:C++ PicturePtr::editMVBuffer方法的具体用法?C++ PicturePtr::editMVBuffer怎么用?C++ PicturePtr::editMVBuffer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PicturePtr
的用法示例。
在下文中一共展示了PicturePtr::editMVBuffer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: locker
Encode_Status VaapiEncoderH264::encodePicture(const PicturePtr& picture)
{
Encode_Status ret = ENCODE_FAIL;
SurfacePtr reconstruct = createSurface();
if (!reconstruct)
return ret;
{
AutoLock locker(m_paramLock);
#ifdef __BUILD_GET_MV__
uint32_t size;
void *buffer = NULL;
getMVBufferSize(&size);
if (!picture->editMVBuffer(buffer, &size))
return ret;
#endif
if (!ensureSequence (picture))
return ret;
if (!ensureMiscParams (picture.get()))
return ret;
if (!ensurePicture(picture, reconstruct))
return ret;
if (!ensureSlices (picture))
return ret;
}
if (!picture->encode())
return ret;
if (!referenceListUpdate (picture, reconstruct))
return ret;
return ENCODE_SUCCESS;
}
示例2: getOutput
Encode_Status VaapiEncoderBase::getOutput(VideoEncOutputBuffer * outBuffer, VideoEncMVBuffer * MVBuffer, bool withWait)
{
void *data = NULL;
uint32_t mappedSize;
bool isEmpty;
PicturePtr picture;
Encode_Status ret;
FUNC_ENTER();
ret = checkEmpty(outBuffer, &isEmpty);
if (isEmpty)
return ret;
getPicture(picture);
ret = picture->getOutput(outBuffer);
if (ret != ENCODE_SUCCESS)
return ret;
if (!picture->editMVBuffer(data, &mappedSize))
return ret;
if (data)
memcpy(MVBuffer->data, data, mappedSize);
checkCodecData(outBuffer);
return ENCODE_SUCCESS;
}