summaryrefslogtreecommitdiff
path: root/src/render/queue_libplacebo.h
blob: f72cb882cee4eacfbadf46cbaee77e949141c46c (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
39
40
41
#pragma once

#include <libplacebo/utils/frame_queue.h>
#ifdef CAMU_HAVE_FFMPEG
#include <al/lib.h>
AL_IGNORE_WARNING("-Wswitch")
// 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
    struct {
        bool are_present;
        bool conversion_needed;
        AVCodecContext *converter;
        ASS_Library *ass;
        ASS_Renderer *renderer;
        ASS_Track *track;
        struct camu_overlay *last;
        array(struct camu_overlay *) overlays;
        struct nn_mutex lock;
    } subs;
#endif
};

struct camu_frame_queue *camu_frame_queue_lp_create(void);