DvppSourceManager.h
508 Bytes
#include<map>
#include<string>
#include "dvpp_headers.h"
using namespace std;
class DvppSourceManager{
public:
static DvppSourceManager* getInstance(){
static DvppSourceManager* singleton = nullptr;
if (singleton == nullptr){
singleton = new DvppSourceManager();
}
return singleton;
}
int getChannel(int devId);
void releaseChannel(int devId, int channel);
private:
DvppSourceManager(){}
~DvppSourceManager();
private:
map<string, int> m_channelMap;
mutex m_channelMap_mtx;
};