2017-12-12 22:12:07 +08:00
|
|
|
#ifndef FRAMES_H
|
|
|
|
#define FRAMES_H
|
|
|
|
|
|
|
|
#include <SDL2/SDL.h>
|
|
|
|
|
|
|
|
// forward declarations
|
|
|
|
typedef struct AVFrame AVFrame;
|
|
|
|
|
|
|
|
struct frames {
|
|
|
|
AVFrame *decoding_frame;
|
|
|
|
AVFrame *rendering_frame;
|
|
|
|
SDL_mutex *mutex;
|
|
|
|
SDL_cond *rendering_frame_consumed_cond;
|
|
|
|
SDL_bool rendering_frame_consumed;
|
|
|
|
};
|
|
|
|
|
2017-12-15 18:27:11 +08:00
|
|
|
SDL_bool frames_init(struct frames *frames);
|
2017-12-12 22:12:07 +08:00
|
|
|
void frames_destroy(struct frames *frames);
|
|
|
|
|
|
|
|
void frames_swap(struct frames *frames);
|
|
|
|
|
|
|
|
#endif
|