整理代码
This commit is contained in:
commit
c7b4e178ec
364 changed files with 59691 additions and 0 deletions
73
video/hisi/mpp5/VideoFrame.h
Normal file
73
video/hisi/mpp5/VideoFrame.h
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
#ifndef B9B55BBA_D4EA_459D_AB14_BEB06E1FB74A
|
||||
#define B9B55BBA_D4EA_459D_AB14_BEB06E1FB74A
|
||||
/*
|
||||
*******************************************************************************
|
||||
* INCLUDE
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include <hi_mpi_ive.h>
|
||||
#include <hi_mpi_vb.h>
|
||||
#include <Poco/SharedPtr.h>
|
||||
|
||||
namespace Video
|
||||
{
|
||||
namespace MPP5
|
||||
{
|
||||
/*
|
||||
*******************************************************************************
|
||||
* CLASS DECLARE
|
||||
*******************************************************************************
|
||||
*/
|
||||
class VideoFrame
|
||||
{
|
||||
public:
|
||||
using Ptr = Poco::SharedPtr<VideoFrame>;
|
||||
|
||||
private:
|
||||
VideoFrame(hi_video_frame_info* pInfo, uint32_t size, uint8_t* pVirAddr, uint32_t phyAddr, uint32_t handle,
|
||||
uint32_t chn);
|
||||
|
||||
public:
|
||||
~VideoFrame();
|
||||
|
||||
public:
|
||||
const hi_video_frame_info* info() const;
|
||||
const uint32_t width() const;
|
||||
const uint32_t height() const;
|
||||
const hi_pixel_format pixelFormat() const;
|
||||
|
||||
private:
|
||||
hi_video_frame_info* _pInfo;
|
||||
uint32_t _size;
|
||||
uint8_t* _pVirAddr;
|
||||
uint32_t _phyAddr;
|
||||
uint32_t _handle;
|
||||
uint32_t _chn;
|
||||
|
||||
public:
|
||||
static Ptr create(hi_pixel_format format, uint32_t width, uint32_t height, const uint8_t* pData);
|
||||
static Ptr create(hi_pixel_format format, uint32_t width, uint32_t height, const std::string& path);
|
||||
};
|
||||
|
||||
inline const hi_video_frame_info* VideoFrame::info() const
|
||||
{
|
||||
return _pInfo;
|
||||
}
|
||||
|
||||
inline const uint32_t VideoFrame::width() const
|
||||
{
|
||||
return _pInfo->video_frame.width;
|
||||
}
|
||||
|
||||
inline const uint32_t VideoFrame::height() const
|
||||
{
|
||||
return _pInfo->video_frame.height;
|
||||
}
|
||||
|
||||
inline const hi_pixel_format VideoFrame::pixelFormat() const
|
||||
{
|
||||
return _pInfo->video_frame.pixel_format;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue