本文整理汇总了C++中SurfacePtr::getID方法的典型用法代码示例。如果您正苦于以下问题:C++ SurfacePtr::getID方法的具体用法?C++ SurfacePtr::getID怎么用?C++ SurfacePtr::getID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SurfacePtr
的用法示例。
在下文中一共展示了SurfacePtr::getID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: output
bool VaapiDecSurfacePool::output(const SurfacePtr& surface, int64_t timeStamp)
{
VASurfaceID id = surface->getID();
AutoLock lock(m_lock);
const Allocated::iterator it = m_allocated.find(id);
if (it == m_allocated.end())
return false;
assert(it->second == SURFACE_DECODING);
it->second |= SURFACE_TO_RENDER;
VideoRenderBuffer* buffer = m_renderMap[id];;
m_output.push_back(buffer);
return true;
}
示例2: derive
ImagePtr VaapiImage::derive(const SurfacePtr& surface)
{
ImagePtr image;
if (!surface)
return image;
DisplayPtr display = surface->getDisplay();
VAImagePtr vaImage(new VAImage);
VAStatus status = vaDeriveImage(display->getID(), surface->getID(), vaImage.get());
if (!checkVaapiStatus(status, "vaDeriveImage()")) {
return image;
}
image.reset(new VaapiImage(display, surface, vaImage));
return image;
}
示例3: initQP
/* Fills in VA picture parameter buffer */
bool VaapiEncoderH264::fill(VAEncPictureParameterBufferH264* picParam, const PicturePtr& picture,
const SurfacePtr& surface) const
{
uint32_t i = 0;
/* reference list, */
picParam->CurrPic.picture_id = surface->getID();
picParam->CurrPic.TopFieldOrderCnt = picture->m_poc;
if (picture->m_type != VAAPI_PICTURE_TYPE_I) {
for (i = 0; i < m_refList.size(); i++) {
picParam->ReferenceFrames[i].picture_id = m_refList[i]->m_pic->getID();
picParam->ReferenceFrames[i].TopFieldOrderCnt = m_refList[i]->m_poc;
picParam->ReferenceFrames[i].flags |= VA_PICTURE_H264_SHORT_TERM_REFERENCE;
}
}
for (; i < 16; ++i) {
picParam->ReferenceFrames[i].picture_id = VA_INVALID_ID;
}
picParam->coded_buf = picture->m_codedBuffer->getID();
picParam->pic_parameter_set_id = 0;
picParam->seq_parameter_set_id = 0;
picParam->last_picture = 0; /* means last encoding picture */
picParam->frame_num = picture->m_frameNum;
picParam->pic_init_qp = initQP();
picParam->num_ref_idx_l0_active_minus1 =
(m_maxRefList0Count ? (m_maxRefList0Count - 1) : 0);
picParam->num_ref_idx_l1_active_minus1 =
(m_maxRefList1Count ? (m_maxRefList1Count - 1) : 0);
picParam->chroma_qp_index_offset = 0;
picParam->second_chroma_qp_index_offset = 0;
/* set picture fields */
picParam->pic_fields.bits.idr_pic_flag = picture->isIdr();
picParam->pic_fields.bits.reference_pic_flag = (picture->m_type != VAAPI_PICTURE_TYPE_B);
picParam->pic_fields.bits.entropy_coding_mode_flag = m_useCabac;
picParam->pic_fields.bits.transform_8x8_mode_flag = m_useDct8x8;
/* enable debloking */
picParam->pic_fields.bits.deblocking_filter_control_present_flag = TRUE;
return TRUE;
}