p26001-store-acs-soc-fw-app/video/core/CodecCapabilityManager.h
2026-09-28 21:33:04 +08:00

42 lines
1.1 KiB
C++

#ifndef B88D46AC_14A3_4C6F_ADE1_2AF8BB03F51A
#define B88D46AC_14A3_4C6F_ADE1_2AF8BB03F51A
/*
*******************************************************************************
* INCLUDE
*******************************************************************************
*/
#include "util/HandlesManager.h"
#include <Poco/Mutex.h>
#include <map>
namespace Video
{
namespace Core
{
/*
*******************************************************************************
* CLASS DECLARE
*******************************************************************************
*/
class CodecCapabilityManager
{
public:
using Handle = int;
static const int INVALID_HANDLE;
public:
CodecCapabilityManager(uint64_t total);
public:
Handle alloc(uint32_t width, uint32_t height, uint32_t frameRate);
void free(Handle handle);
private:
uint64_t _total;
Util::HandlesManager<Handle> _handles;
std::map<Handle, uint64_t> _allocRecord;
Poco::FastMutex _lock;
};
}
}
#endif