DvppSourceManager.h 516 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<int, aclrtContext> ctxMap;
	map<string, int> channelMap;
};