Add runtime option to render expired frames
Replace the compilation flag SKIP_FRAMES by a runtime flag to force rendering of expired frames. By default, the expired frames are skipped.
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
#include <stdbool.h>
|
||||
#include <SDL2/SDL_mutex.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "fps_counter.h"
|
||||
|
||||
// forward declarations
|
||||
@@ -14,16 +13,15 @@ struct video_buffer {
|
||||
AVFrame *decoding_frame;
|
||||
AVFrame *rendering_frame;
|
||||
SDL_mutex *mutex;
|
||||
#ifndef SKIP_FRAMES
|
||||
bool render_expired_frames;
|
||||
bool interrupted;
|
||||
SDL_cond *rendering_frame_consumed_cond;
|
||||
#endif
|
||||
bool rendering_frame_consumed;
|
||||
struct fps_counter fps_counter;
|
||||
};
|
||||
|
||||
bool
|
||||
video_buffer_init(struct video_buffer *vb);
|
||||
video_buffer_init(struct video_buffer *vb, bool render_expired_frames);
|
||||
|
||||
void
|
||||
video_buffer_destroy(struct video_buffer *vb);
|
||||
|
||||
Reference in New Issue
Block a user