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

📄 mobile_video_render.cpp

📁 这是在PCA下的基于IPP库示例代码例子,在网上下了IPP的库之后,设置相关参数就可以编译该代码.
💻 CPP
字号:
/*////                  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.//*/#include "mobile_video_render.h"#include "umc_video_data.h"namespace UMC{MobileVideoRender::MobileVideoRender() :    m_dfFrameTime(0.0),    m_bStopFlag(false){} // MobileVideoRender::MobileVideoRender() :Status MobileVideoRender::Init(MediaReceiverParams* pInit){    Status umcRes = UMC_OK;    if (UMC_OK == umcRes)        umcRes = m_ReadySema.Init(1);    if (UMC_OK == umcRes)        umcRes = m_DoneSema.Init(0);    m_bStopFlag = false;    m_dfFrameTime = 0.0;    return umcRes;} // Status MobileVideoRender::Init(MediaReceiverParams* pInit)int MobileVideoRender::ReserveBuffer(unsigned char** ppucVidMem){    int iRes = 1;    VideoData Data;    if (UMC_OK == LockInputBuffer(&Data))    {        iRes = Data.m_lPitch[0];        if (NULL != ppucVidMem)            *ppucVidMem = Data.m_lpDest[0];    }    return iRes;} // int MobileVideoRender::ReserveBuffer(unsigned char** ppucVidMem)Status MobileVideoRender::BufferReserved(double frame_time, FrameType frame_type){    VideoData VideoData;    VideoData.SetFrameType(frame_type);    VideoData.SetTime(frame_time);    return UnLockInputBuffer(&VideoData);} // Status MobileVideoRender::BufferReserved(double frame_time, FrameType frame_type)Status MobileVideoRender::Stop(){    m_bStopFlag = true;    m_dfFrameTime = -1.0;    m_DoneSema.Signal();    m_ReadySema.Signal();    return UMC_OK;} // Status MobileVideoRender::Stop()void MobileVideoRender::BufferEndOfClip(){    Stop();} // void MobileVideoRender::BufferEndOfClip()double MobileVideoRender::GetRenderFrame(){    while (!m_bStopFlag && UMC_TIMEOUT == m_DoneSema.Wait(100))    {        if (m_bStopFlag || (m_dfFrameTime == -1.0))            return -1.0;    }    return m_dfFrameTime;} // double MobileVideoRender::GetRenderFrame()Status MobileVideoRender::RenderFrame(){    return m_ReadySema.Signal();} // Status MobileVideoRender::RenderFrame()// Set/Reset full screen playbackStatus MobileVideoRender::SetFullScreen(ModuleContext& /*rContext*/, bool full){    return UMC_NOT_IMPLEMENTED;} // Status MobileVideoRender::SetFullScreen(ModuleContext &, bool full)// Resize the display rectangularStatus MobileVideoRender::ResizeDisplay(UMC::RECT &disp, UMC::RECT &range){    return UMC_NOT_IMPLEMENTED;} // Status MobileVideoRender::ResizeDisplay(UMC::RECT &disp, UMC::RECT &range)// Show/Hide Surfacevoid MobileVideoRender::ShowSurface(){} // void MobileVideoRender::ShowSurface()void MobileVideoRender::HideSurface(){} // void MobileVideoRender::HideSurface()} // namespace UMC

⌨️ 快捷键说明

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