Move video_buffer to screen

The video buffer is now an internal detail of the screen component.

Since the screen is plugged to the decoder via the frame sink trait, the
decoder does not access to the video buffer anymore.
This commit is contained in:
Romain Vimont
2021-04-11 15:01:05 +02:00
parent 6f5ad21f57
commit e91acdb0c4
3 changed files with 18 additions and 25 deletions

View File

@@ -10,13 +10,12 @@
#include "coords.h"
#include "opengl.h"
#include "trait/frame_sink.h"
struct video_buffer;
#include "video_buffer.h"
struct screen {
struct sc_frame_sink frame_sink; // frame sink trait
struct video_buffer *vb;
struct video_buffer vb;
struct fps_counter *fps_counter;
SDL_Window *window;
@@ -63,8 +62,7 @@ struct screen_params {
// initialize screen, create window, renderer and texture (window is hidden)
bool
screen_init(struct screen *screen, struct video_buffer *vb,
struct fps_counter *fps_counter,
screen_init(struct screen *screen, struct fps_counter *fps_counter,
const struct screen_params *params);
// destroy window, renderer and texture (if any)