Blame view

src/VPT/ImageSaveCache.h 541 Bytes
e30d6793   Zou XiKun   v0.0.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  #pragma once
  #include <map>
  #include <vector>
  #include "common.h"
  #include <mutex>
  #include "../DxDecoder/DxDecoderWrap.h"
  using std::map;
  using std::vector;
  class ImageSaveCache
  {
  public:
  	
  	void insert(const OBJ_KEY & snaphot_id, const FRAME_KEY & frame_id, const DxGPUFrame & frame);
  	void release(const OBJ_KEY & snaphot_id);
  	DxGPUFrame* get_frame(const OBJ_KEY & snaphot_id);
  	void show();
  private:
  	vector<std::pair<FRAME_KEY, DxGPUFrame>> mp_frame;     //´óͼmap
  	map<OBJ_KEY, FRAME_KEY> mp_key;						   //Ë÷Òýmap
  	std::mutex tx;
  };