SnapShotFrameCache.h
412 Bytes
#pragma once
#include "../FFNvDecoder/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;
};