本文整理汇总了C++中PicturePtr::reset方法的典型用法代码示例。如果您正苦于以下问题:C++ PicturePtr::reset方法的具体用法?C++ PicturePtr::reset怎么用?C++ PicturePtr::reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PicturePtr
的用法示例。
在下文中一共展示了PicturePtr::reset方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FromResource
PicturePtr Picture::FromResource(HWND hwnd,
HINSTANCE instance,
const char *type,
const char *name)
{
PicturePtr result;
if (IStream *stream = StreamFromResource(instance, type, name)) {
IPicture *pic = PictureFromStream(stream);
stream->Release();
if (pic) {
if (HDC hdc = GetDC(hwnd)) {
int width = MakeWidth(hdc, pic);
int height = MakeHeight(hdc, pic);
ReleaseDC(hwnd, hdc);
if (width && height)
result.reset(new Picture(pic, width, height));
}
if (!result)
pic->Release();
}
}
return result;
}
示例2: createPicture
PicturePtr VaapiDecoderBase::createPicture(int64_t timeStamp /* , VaapiPictureStructure structure = VAAPI_PICTURE_STRUCTURE_FRAME */)
{
PicturePtr picture;
/*accquire one surface from m_surfacePool in base decoder */
SurfacePtr surface = createSurface();
if (!surface) {
ERROR("create surface failed");
return picture;
}
picture.reset(new VaapiDecPicture(m_context, surface, timeStamp));
return picture;
}
示例3: createSurface
PicturePtr VaapiDecoderH265::createPicture(const H265SliceHdr* const slice,
const H265NalUnit* const nalu)
{
PicturePtr picture;
SurfacePtr surface = createSurface();
if (!surface)
return picture;
picture.reset(new VaapiDecPictureH265(m_context, surface, m_currentPTS));
picture->m_noRaslOutputFlag = isIdr(nalu) || isBla(nalu) ||
m_newStream || m_endOfSequence;
m_noRaslOutputFlag = picture->m_noRaslOutputFlag;
if (isIrap(nalu))
m_associatedIrapNoRaslOutputFlag = picture->m_noRaslOutputFlag;
picture->m_picOutputFlag
= (isRasl(nalu) && m_associatedIrapNoRaslOutputFlag) ? false : slice->pic_output_flag;
getPoc(picture, slice, nalu);
return picture;
}