Blame view

src/VPT-1/snapshot_analysis/SnapShotFrameCache.h 393 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
  #pragma once
  #include "../DxDecoder/DxDecoderWrap.h"
  #include <queue>
  #define SHOT_CACHE_SIZE 
  #define VEHICLE_WIDTH 320
  class SnapShotFrameCache
  {
  public:
  	void init_cache(unsigned int cache_len, unsigned int cache_count);
  	void * get_frame();
  	void release(void * frame);
  	void free();
  private:
  	bool alloc();
  	std::queue<void *> cache;
  	unsigned int cache_len;
  	unsigned int cache_count;
  };