⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 base_video_render.h

📁 这是在PCA下的基于IPP库示例代码例子,在网上下了IPP的库之后,设置相关参数就可以编译该代码.
💻 H
字号:
/*////                  INTEL CORPORATION PROPRIETARY INFORMATION//     This software is supplied under the terms of a license agreement or//     nondisclosure agreement with Intel Corporation and may not be copied//     or disclosed except in accordance with the terms of that agreement.//       Copyright(c) 2003-2005 Intel Corporation. All Rights Reserved.//*/#ifndef ___BASE_VIDEO_RENDER_H___#define ___BASE_VIDEO_RENDER_H___#define MAX_FRAME_BUFFERS 8#define MIN_FRAME_BUFFERS 4#include "vm_debug.h"#include "umc_mutex.h"#include "umc_semaphore.h"#include "umc_video_render.h"namespace UMC{class BaseVideoRender : public VideoRender{public:    // Default constructor    BaseVideoRender();    // Destructor    virtual ~BaseVideoRender();    // Initialize the render, return false if failed, call Close anyway    virtual Status Init(MediaReceiverParams* pInit);    // Release all receiver resources    virtual Status Close();    // Lock input buffer    virtual Status LockInputBuffer(MediaData *in);    // Unlock input buffer    virtual Status UnLockInputBuffer(MediaData *in,                                        Status StreamStatus = UMC_OK);    // Break waiting(s)    virtual Status Stop();    // Warning:    // Outdated functions - don't use it, use MediaReceiver interface instead    //  Temporary stub, will be removed in future    virtual Status Init(VideoRenderParams& rInit)    {   return Init(static_cast<MediaReceiverParams*>(&rInit)); }    // Reserve a frame buffer for decoding the current frame    virtual int ReserveBuffer(unsigned char** ppucVidMem);    // Buffer the decoded frame    virtual Status BufferReserved(double frame_time, FrameType frame_type);    virtual void BufferEndOfClip();    // VideoRender interface extension above MediaReceiver    // Peek presentation of next frame, return presentation time    virtual double GetRenderFrame();    // Resize the display rectangular    virtual Status ResizeDisplay(UMC::RECT &disp, UMC::RECT &range);    // Show/Hide Surface    virtual void ShowSurface();    virtual void HideSurface();    virtual Status Reset();protected:    Status ResizeSource();    struct sFrameBuffer    {        double    frame_time;        FrameType frame_type;        void     *surface;    };    sFrameBuffer m_Buffers[MAX_FRAME_BUFFERS];    Semaphore    m_hDoneBufSema;    Semaphore    m_hFreeBufSema;    Mutex        m_SuncMut;    volatile int m_hFreeBufSemaCount;    int          m_iBuffersNum;    int          m_iReadIndex;    int          m_iWriteIndex;    bool         m_bPrevIp;    ClipInfo     m_SrcInfo;    bool         m_bShow;    UMC::RECT    m_src_rect;    UMC::RECT    m_dst_rect;    UMC::RECT     m_disp;    UMC::RECT     m_range;    bool         m_bReorder;    bool         m_bStop;    bool        m_bPrepareForReposition;};} // namespace UMC#endif // ___BASE_VIDEO_RENDER_H___

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -