Blame view

src/decoder/dvpp/DvppSourceManager.h 700 Bytes
0b4cd5d5   Hu Chunming   完成轨迹定时抓拍
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  
  #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();
  			// int ret = aclInit(nullptr);
  			// if (ret != ACL_ERROR_NONE) { 
  			// 	cout << "aclInit failed" << endl; 
  			// 	return nullptr;
  			// }
  		}
  		return singleton;
  	}
  
      aclrtContext getContext(int devId);
  
  	int getChannel(int devId);
  	void releaseChannel(int devId, int channel);
  
  private:
      DvppSourceManager(){}
  	~DvppSourceManager();
  
  private:
      map<int, aclrtContext> ctxMap;
  	map<string, int> channelMap;
  };