当前位置: 首页>>代码示例>>C++>>正文


C++ PicturePtr::reset方法代码示例

本文整理汇总了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;
    }
开发者ID:death,项目名称:webwatch,代码行数:28,代码来源:Picture.cpp

示例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;
}
开发者ID:tiagovignatti,项目名称:libyami,代码行数:13,代码来源:vaapidecoder_base.cpp

示例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;
}
开发者ID:mypopydev,项目名称:libyami,代码行数:21,代码来源:vaapidecoder_h265.cpp


注:本文中的PicturePtr::reset方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。