整理代码
This commit is contained in:
commit
c7b4e178ec
364 changed files with 59691 additions and 0 deletions
75
video/hisi/mpp5/ResourceManager.cpp
Normal file
75
video/hisi/mpp5/ResourceManager.cpp
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* INCLUDE
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include "ResourceManager.h"
|
||||
#include <hi_mpi_vpss.h>
|
||||
#include <hi_mpi_venc.h>
|
||||
|
||||
namespace Video
|
||||
{
|
||||
namespace MPP5
|
||||
{
|
||||
/*
|
||||
*******************************************************************************
|
||||
* CLASS DEFINE
|
||||
*******************************************************************************
|
||||
*/
|
||||
Util::HandlesManager<uint32_t> ResourceManager::_vpssGroupIDManager(HI_VPSS_MAX_GRP_NUM);
|
||||
Util::HandlesManager<uint32_t> ResourceManager::_vencChannelIDManager(HI_VENC_MAX_CHN_NUM);
|
||||
Util::HandlesManager<uint32_t> ResourceManager::_vdecChannelIDManager(HI_VDEC_MAX_CHN_NUM);
|
||||
Util::HandlesManager<uint32_t> ResourceManager::_aencChannelIDManager(HI_AENC_MAX_CHN_NUM);
|
||||
Util::HandlesManager<uint32_t> ResourceManager::_rgnHandleManager(HI_RGN_HANDLE_MAX);
|
||||
|
||||
uint32_t ResourceManager::allocVPSSGroupID()
|
||||
{
|
||||
return _vpssGroupIDManager.allocHandle();
|
||||
}
|
||||
|
||||
void ResourceManager::freeVPSSGroupID(uint32_t id)
|
||||
{
|
||||
_vpssGroupIDManager.freeHandle(id);
|
||||
}
|
||||
|
||||
uint32_t ResourceManager::allocVENCChannelID()
|
||||
{
|
||||
return _vencChannelIDManager.allocHandle();
|
||||
}
|
||||
|
||||
void ResourceManager::freeVENCChannelID(uint32_t id)
|
||||
{
|
||||
_vencChannelIDManager.freeHandle(id);
|
||||
}
|
||||
|
||||
uint32_t ResourceManager::allocVDECChannelID()
|
||||
{
|
||||
return _vdecChannelIDManager.allocHandle();
|
||||
}
|
||||
|
||||
void ResourceManager::freeVDECChannelID(uint32_t id)
|
||||
{
|
||||
_vdecChannelIDManager.freeHandle(id);
|
||||
}
|
||||
|
||||
uint32_t ResourceManager::allocAENCChannelID()
|
||||
{
|
||||
return _aencChannelIDManager.allocHandle();
|
||||
}
|
||||
|
||||
void ResourceManager::freeAENCChannelID(uint32_t id)
|
||||
{
|
||||
_aencChannelIDManager.freeHandle(id);
|
||||
}
|
||||
|
||||
uint32_t ResourceManager::allocRGNHandle()
|
||||
{
|
||||
return _rgnHandleManager.allocHandle();
|
||||
}
|
||||
|
||||
void ResourceManager::freeRGNHandle(uint32_t handle)
|
||||
{
|
||||
_rgnHandleManager.freeHandle(handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue