summaryrefslogtreecommitdiff
path: root/src/render/queue_libplacebo.h
blob: 0d4900085b8b115ba5e59c16f0e51b90e96124fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once

#include <libplacebo/utils/frame_queue.h>
#ifdef CAMU_HAVE_FFMPEG
#include <al/lib.h>
AL_IGNORE_WARNING("-Wswitch")
AL_IGNORE_WARNING("-Wunused-parameter")
// PL_LIBAV_IMPLEMENTATION defined in queue_libplacebo.c.
#include <libplacebo/utils/libav.h>
AL_IGNORE_WARNING_END
#endif
#ifdef CAMU_HAVE_SUBTITLES
#include <ass/ass.h>
#endif

#include "../buffer/frame_queue.h"

struct camu_frame_queue_lp {
    struct camu_frame_queue q;
    pl_gpu gpu;
    pl_queue queue;
    struct pl_queue_params params;
#ifdef CAMU_HAVE_FFMPEG
    bool copy_frame_fallback;
    AVFrame *swframe;
#endif
#ifdef CAMU_HAVE_SUBTITLES
    ASS_Library *ass;
    ASS_Renderer *ass_renderer;
    ASS_Track *ass_track;
    struct nn_mutex subtitle_lock;
    struct camu_overlay *last_subtitle;
    array(struct camu_overlay *) subtitles;
    bool has_subtitles;
#endif
};

struct camu_frame_queue *camu_frame_queue_lp_create(void);