整理代码
This commit is contained in:
commit
c7b4e178ec
364 changed files with 59691 additions and 0 deletions
42
video/core/CodecCapabilityManager.h
Normal file
42
video/core/CodecCapabilityManager.h
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue