FFCuContextManager.h 457 Bytes

#include<map>
#include<string>

using namespace std;

struct AVBufferRef;

class FFCuContextManager{
public:
    static FFCuContextManager* getInstance(){
		static FFCuContextManager* singleton = nullptr;
		if (singleton == nullptr){
			singleton = new FFCuContextManager();
		}
		return singleton;
	}

    AVBufferRef *getCuCtx(string gpuid);

private:
    FFCuContextManager(){}
	~FFCuContextManager();

private:
    map<string,AVBufferRef *> ctxMap;

};