blob: 0c3d4d77bc37007145be028108b78fbea09ee529 (
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
|
#pragma once
#include <libavcodec/avcodec.h>
#include "../codec.h"
#if defined CAMU_TRY_HWACCEL && !defined CAMU_SINK_NO_VIDEO
#define CAMU_FF_DECODER_HWACCEL
#endif
struct camu_ff_decoder {
struct camu_decoder dec;
AVCodecParameters *codecpar;
AVCodecContext *codec_context;
s32 thread_count;
#ifdef CAMU_FF_DECODER_HWACCEL
struct camu_renderer *renderer;
array(const AVCodec *) supported_hw_codecs;
array(enum AVHWDeviceType) supported_hw_devices;
AVBufferRef *hw_context;
enum AVHWDeviceType hw_device_type;
enum AVPixelFormat hw_pix_fmt;
bool use_frames_context;
AVCodecContext *errored_hw_context;
#endif
void (*callback)(void *, struct camu_codec_frame *);
void *userdata;
};
struct camu_decoder *camu_ff_decoder_create(void);
|