Files
scrcpy/app/src/video_buffer.h
Romain Vimont ed2ac27596 Extract current video_buffer to frame_buffer
The current video buffer only stores one pending frame.

In order to add a new buffering feature, move this part to a separate
"frame buffer". Keep the video_buffer, which currently delegates all its
calls to the frame_buffer.
2021-07-14 00:39:35 +02:00

31 lines
549 B
C

#ifndef SC_VIDEO_BUFFER_H
#define SC_VIDEO_BUFFER_H
#include "common.h"
#include <stdbool.h>
#include "frame_buffer.h"
// forward declarations
typedef struct AVFrame AVFrame;
struct sc_video_buffer {
struct sc_frame_buffer fb;
};
bool
sc_video_buffer_init(struct sc_video_buffer *vb);
void
sc_video_buffer_destroy(struct sc_video_buffer *vb);
bool
sc_video_buffer_push(struct sc_video_buffer *vb, const AVFrame *frame,
bool *skipped);
void
sc_video_buffer_consume(struct sc_video_buffer *vb, AVFrame *dst);
#endif