DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
 
av_backend_libav.c
Go to the documentation of this file.
1/*
2Copyright (C) 2020 David Knapp (Cloudwalk)
3
4This program is free software; you can redistribute it and/or
5modify it under the terms of the GNU General Public License
6as published by the Free Software Foundation; either version 2
7of the License, or (at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19*/
20
21#include "darkplaces.h"
22
23#include "libavcodec/avcodec.h"
24#include "libavformat/avformat.h"
25
26// Decoding functions
27AVCodec *(*qavcodec_find_decoder) (enum AVCodecID id);
28AVCodec *(*qavcodec_find_decoder_by_name) (const char *name);
29int (*qavcodec_default_get_buffer2) (AVCodecContext *s, AVFrame *frame, int flags);
30void (*qavcodec_align_dimensions) (AVCodecContext *s, int *width, int *height);
31void (*qavcodec_align_dimensions2) (AVCodecContext *s, int *width, int *height, int linesize_align[AV_NUM_DATA_POINTERS]);
32int (*qavcodec_enum_to_chroma_pos) (int *xpos, int *ypos, enum AVChromaLocation pos);
33enum AVChromaLocation (*qavcodec_chroma_pos_to_enum) (int xpos, int ypos);
34int (*qavcodec_send_packet) (AVCodecContext *avctx, const AVPacket *avpkt);
35int (*qavcodec_receive_frame) (AVCodecContext *avctx, AVFrame *frame);
36int (*qavcodec_send_frame) (AVCodecContext *avctx, const AVFrame *frame);
37int (*qavcodec_receive_packet) (AVCodecContext *avctx, AVPacket *avpkt);
38int (*qavcodec_get_hw_frames_parameters) (AVCodecContext *avctx, AVBufferRef *device_ref, enum AVPixelFormat hw_pix_fmt, AVBufferRef **out_frames_ref);
39
40// Encoding functions
41AVCodec *(*qavcodec_find_encoder) (enum AVCodecID id);
42AVCodec *(*qavcodec_find_encoder_by_name) (const char *name);
43int (*qavcodec_encode_subtitle) (AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVSubtitle *sub);
44
45// Core functions
46const AVCodecHWConfig *(*qavcodec_get_hw_config) (const AVCodec *codec, int index);
47const AVCodec *(*qav_codec_iterate) (void **opaque);
48unsigned (*qavcodec_version) (void);
49const char *(*qavcodec_configuration) (void);
50const char *(*qavcodec_license) (void);
51AVCodecContext *(*qavcodec_alloc_context3) (const AVCodec *codec);
52void (*qavcodec_free_context) (AVCodecContext **avctx);
53int (*qavcodec_get_context_defaults3) (AVCodecContext *s, const AVCodec *codec);
54const AVClass *(*qavcodec_get_class) (void);
55const AVClass *(*qavcodec_get_frame_class) (void);
56const AVClass *(*qavcodec_get_subtitle_rect_class) (void);
57AVCodecParameters *(*qavcodec_parameters_alloc) (void);
58void (*qavcodec_parameters_free) (AVCodecParameters **par);
59int (*qavcodec_parameters_copy) (AVCodecParameters *dst, const AVCodecParameters *src);
60int (*qavcodec_parameters_from_context) (AVCodecParameters *par, const AVCodecContext *codec);
61int (*qavcodec_parameters_to_context) (AVCodecContext *codec, const AVCodecParameters *par);
62int (*qavcodec_open2) (AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
63int (*qavcodec_close) (AVCodecContext *avctx);
64void (*qavsubtitle_free) (AVSubtitle *sub);
65
66// Demuxing functions
67AVInputFormat *(*qav_find_input_format) (const char *short_name);
68AVInputFormat *(*qav_probe_input_format) (AVProbeData *pd, int is_opened);
69AVInputFormat *(*qav_probe_input_format2) (AVProbeData *pd, int is_opened, int *score_max);
70AVInputFormat *(*qav_probe_input_format3) (AVProbeData *pd, int is_opened, int *score_ret);
71int (*qav_probe_input_buffer2) (AVIOContext *pb, AVInputFormat **fmt, const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size);
72int (*qav_probe_input_buffer) (AVIOContext *pb, AVInputFormat **fmt, const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size);
73int (*qavformat_open_input) (AVFormatContext **ps, const char *url, AVInputFormat *fmt, AVDictionary **options);
74int (*qavformat_find_stream_info) (AVFormatContext *ic, AVDictionary **options);
75AVProgram *(*qav_find_program_from_stream) (AVFormatContext *ic, AVProgram *last, int s);
76void (*qav_program_add_stream_index) (AVFormatContext *ac, int progid, unsigned int idx);
77int (*qav_find_best_stream) (AVFormatContext *ic, enum AVMediaType type, int wanted_stream_nb, int related_stream, AVCodec **decoder_ret, int flags);
78int (*qav_read_frame) (AVFormatContext *s, AVPacket *pkt);
79int (*qav_seek_frame) (AVFormatContext *s, int stream_index, int64_t timestamp, int flags);
80int (*qavformat_seek_file) (AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
81int (*qavformat_flush) (AVFormatContext *s);
82int (*qav_read_play) (AVFormatContext *s);
83int (*qav_read_pause) (AVFormatContext *s);
84void (*qavformat_close_input) (AVFormatContext **s);
85
86// Muxing functions
87av_warn_unused_result int (*qavformat_write_header) (AVFormatContext *s, AVDictionary **options);
88av_warn_unused_result int (*qavformat_init_output) (AVFormatContext *s, AVDictionary **options);
89int (*qav_write_frame) (AVFormatContext *s, AVPacket *pkt);
90int (*qav_interleaved_write_frame) (AVFormatContext *s, AVPacket *pkt);
91int (*qav_write_uncoded_frame) (AVFormatContext *s, int stream_index, AVFrame *frame);
92int (*qav_interleaved_write_uncoded_frame) (AVFormatContext *s, int stream_index, AVFrame *frame);
93int (*qav_write_uncoded_frame_query) (AVFormatContext *s, int stream_index);
94int (*qav_write_trailer) (AVFormatContext *s);
95AVOutputFormat *(*qav_guess_format) (const char *short_name, const char *filename, const char *mime_type);
96enum AVCodecID (*qav_guess_codec) (AVOutputFormat *fmt, const char *short_name, const char *filename, const char *mime_type, enum AVMediaType type);
97int (*qav_get_output_timestamp) (struct AVFormatContext *s, int stream, int64_t *dts, int64_t *wall);
98
99// Core functions
101const char *(*qavformat_configuration) (void);
102const char *(*qavformat_license) (void);
108AVInputFormat *(*qav_iformat_next) (const AVInputFormat *f);
109AVOutputFormat *(*qav_oformat_next) (const AVOutputFormat *f);
110AVFormatContext *(*qavformat_alloc_context) (void);
111void (*qavformat_free_context) (AVFormatContext *s);
112const AVClass *(*qavformat_get_class) (void);
113AVStream *(*qavformat_new_stream) (AVFormatContext *s, const AVCodec *c);
114uint8_t *(*qav_stream_new_side_data) (AVStream *stream, enum AVPacketSideDataType type, int size);
115uint8_t *(*qav_stream_get_side_data) (const AVStream *stream, enum AVPacketSideDataType type, int *size);
116AVProgram *(*qav_new_program) (AVFormatContext *s, int id);
117
118// Utility functions
119void (*qav_hex_dump) (FILE *f, const uint8_t *buf, int size);
120void (*qav_hex_dump_log) (void *avcl, int level, const uint8_t *buf, int size);
121void (*qav_pkt_dump2) (FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st);
122void (*qav_pkt_dump_log2) (void *avcl, int level, const AVPacket *pkt, int dump_payload, const AVStream *st);
123enum AVCodecID (*qav_codec_get_id) (const struct AVCodecTag *const *tags, unsigned int tag);
124unsigned int (*qav_codec_get_tag) (const struct AVCodecTag *const *tags, enum AVCodecID id);
125int (*qav_codec_get_tag2) (const struct AVCodecTag *const *tags, enum AVCodecID id, unsigned int *tag);
126int (*qav_find_default_stream_index) (AVFormatContext *s);
127int (*qav_index_search_timestamp) (AVStream *st, int64_t timestamp, int flags);
128int (*qav_add_index_entry) (AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags);
129void (*qav_url_split) (char *proto, int proto_size, char *authorization, int authorization_size, char *hostname, int hostname_size, int *port_ptr, char *path, int path_size, const char *url);
130void (*qav_dump_format) (AVFormatContext *ic, int index, const char *url, int is_output);
131int (*qav_get_frame_filename2) (char *buf, int buf_size, const char *path, int number, int flags);
132int (*qav_get_frame_filename) (char *buf, int buf_size, const char *path, int number);
133int (*qav_filename_number_test) (const char *filename);
134int (*qav_sdp_create) (AVFormatContext *ac[], int n_files, char *buf, int size);
135int (*qav_match_ext) (const char *filename, const char *extensions);
136int (*qavformat_query_codec) (const AVOutputFormat *ofmt, enum AVCodecID codec_id, int std_compliance);
137AVRational (*qav_guess_sample_aspect_ratio) (AVFormatContext *format, AVStream *stream, AVFrame *frame);
138AVRational (*qav_guess_frame_rate) (AVFormatContext *ctx, AVStream *stream, AVFrame *frame);
139int (*qavformat_match_stream_specifier) (AVFormatContext *s, AVStream *st, const char *spec);
141int (*qavformat_transfer_internal_stream_timing_info) (const AVOutputFormat *ofmt, AVStream *ost, const AVStream *ist, enum AVTimebaseSource copy_tb);
142AVRational (*qav_stream_get_codec_timebase) (const AVStream *st);
143
145{
146 {"avcodec_find_decoder", (void **) &qavcodec_find_decoder},
147 {"avcodec_find_decoder_by_name", (void **) &qavcodec_find_decoder_by_name},
148 {"avcodec_default_get_buffer2", (void **) &qavcodec_default_get_buffer2},
149 {"avcodec_align_dimensions", (void **) &qavcodec_align_dimensions},
150 {"avcodec_align_dimensions2", (void **) &qavcodec_align_dimensions},
151 {"avcodec_enum_to_chroma_pos", (void **) &qavcodec_enum_to_chroma_pos},
152 {"avcodec_chroma_pos_to_enum", (void **) &qavcodec_chroma_pos_to_enum},
153 {"avcodec_send_packet", (void **) &qavcodec_send_packet},
154 {"avcodec_receive_frame", (void **) &qavcodec_receive_frame},
155 {"avcodec_send_frame", (void **) &qavcodec_send_frame},
156 {"avcodec_receive_packet", (void **) &qavcodec_receive_packet},
157 {"avcodec_get_hw_frames_parameters", (void **) &qavcodec_get_hw_frames_parameters},
158 {"avcodec_get_hw_config", (void **) &qavcodec_get_hw_config},
159 {"av_codec_iterate", (void **) &qav_codec_iterate},
160 {"avcodec_version", (void **) &qavcodec_version},
161 {"avcodec_configuration", (void **) &qavcodec_configuration},
162 {"avcodec_license", (void **) &qavcodec_license},
163 {"avcodec_alloc_context3", (void **) &qavcodec_alloc_context3},
164 {"avcodec_free_context", (void **) &qavcodec_free_context},
165 {"avcodec_get_context_defaults3", (void **) &qavcodec_get_context_defaults3},
166 {"avcodec_get_class", (void **) &qavcodec_get_class},
167 {"avcodec_get_frame_class", (void **) &qavcodec_get_frame_class},
168 {"avcodec_get_subtitle_rect_class", (void **) &qavcodec_get_subtitle_rect_class},
169 {"avcodec_parameters_alloc", (void **) &qavcodec_parameters_alloc},
170 {"avcodec_parameters_free", (void **) &qavcodec_parameters_free},
171 {"avcodec_parameters_copy", (void **) &qavcodec_parameters_copy},
172 {"avcodec_parameters_from_context", (void **) &qavcodec_parameters_from_context},
173 {"avcodec_parameters_to_context", (void **) &qavcodec_parameters_to_context},
174 {"avcodec_open2", (void **) &qavcodec_open2},
175 {"avcodec_close", (void **) &qavcodec_close},
176 {"avsubtitle_free", (void **) &qavsubtitle_free},
177 {NULL, NULL}
178};
179
181{
182 {"av_find_input_format", (void **) &qav_find_input_format},
183 {"av_probe_input_format", (void **) &qav_probe_input_format},
184 {"av_probe_input_format2", (void **) &qav_probe_input_format2},
185 {"av_probe_input_format3", (void **) &qav_probe_input_format3},
186 {"av_probe_input_buffer2", (void **) &qav_probe_input_buffer2},
187 {"av_probe_input_buffer", (void **) &qav_probe_input_buffer},
188 {"avformat_open_input", (void **) &qavformat_open_input},
189 {"avformat_find_stream_info", (void **) &qavformat_find_stream_info},
190 {"av_find_program_from_stream", (void **) &qav_find_program_from_stream},
191 {"av_program_add_stream_index", (void **) &qav_program_add_stream_index},
192 {"av_find_best_stream", (void **) &qav_find_best_stream},
193 {"av_read_frame", (void **) &qav_read_frame},
194 {"av_seek_frame", (void **) &qav_seek_frame},
195 {"avformat_seek_file", (void **) &qavformat_seek_file},
196 {"avformat_flush", (void **) &qavformat_flush},
197 {"av_read_play", (void **) &qav_read_play},
198 {"av_read_pause", (void **) &qav_read_pause},
199 {"avformat_close_input", (void **) &qavformat_close_input},
200 {"avformat_write_header", (void **) &qavformat_write_header},
201 {"avformat_init_output", (void **) &qavformat_init_output},
202 {"av_write_frame", (void **) &qav_write_frame},
203 {"av_interleaved_write_frame", (void **) &qav_interleaved_write_frame},
204 {"av_write_uncoded_frame", (void **) &qav_write_uncoded_frame},
205 {"av_interleaved_write_uncoded_frame", (void **) &qav_interleaved_write_uncoded_frame},
206 {"av_write_uncoded_frame_query", (void **) &qav_write_uncoded_frame_query},
207 {"av_write_trailer", (void **) &qav_write_trailer},
208 {"av_guess_format", (void **) &qav_guess_format},
209 {"av_guess_codec", (void **) &qav_guess_codec},
210 {"av_get_output_timestamp", (void **) &qav_get_output_timestamp},
211 {"avformat_version", (void **) &qavformat_version},
212 {"avformat_configuration", (void **) &qavformat_configuration},
213 {"avformat_license", (void **) &qavformat_license},
214 {"av_register_all", (void **) &qav_register_all},
215 {"av_register_input_format", (void **) &qav_register_input_format},
216 {"av_register_output_format", (void **) &qav_register_output_format},
217 {"avformat_network_init", (void **) &qavformat_network_init},
218 {"avformat_network_deinit", (void **) &qavformat_network_deinit},
219 {"av_iformat_next", (void **) &qav_iformat_next},
220 {"av_oformat_next", (void **) &qav_oformat_next},
221 {"avformat_alloc_context", (void **) &qavformat_alloc_context},
222 {"avformat_free_context", (void **) &qavformat_free_context},
223 {"avformat_get_class", (void **) &qavformat_get_class},
224 {"avformat_new_stream", (void **) &qavformat_new_stream},
225 {"av_stream_new_side_data", (void **) &qav_stream_new_side_data},
226 {"av_stream_get_side_data", (void **) &qav_stream_get_side_data},
227 {"av_new_program", (void **) &qav_new_program},
228 {"av_hex_dump", (void **) &qav_hex_dump},
229 {"av_hex_dump_log", (void **) &qav_hex_dump_log},
230 {"av_pkt_dump2", (void **) &qav_pkt_dump2},
231 {"av_pkt_dump_log2", (void **) &qav_pkt_dump_log2},
232 {"av_codec_get_id", (void **) &qav_codec_get_id},
233 {"av_codec_get_tag", (void **) &qav_codec_get_tag},
234 {"av_codec_get_tag2", (void **) &qav_codec_get_tag2},
235 {"av_find_default_stream_index", (void **) &qav_find_default_stream_index},
236 {"av_index_search_timestamp", (void **) &qav_index_search_timestamp},
237 {"av_add_index_entry", (void **) &qav_add_index_entry},
238 {"av_url_split", (void **) &qav_url_split},
239 {"av_dump_format", (void **) &qav_dump_format},
240 {"av_get_frame_filename2", (void **) &qav_get_frame_filename2},
241 {"av_get_frame_filename", (void **) &qav_get_frame_filename},
242 {"av_filename_number_test", (void **) &qav_filename_number_test},
243 {"av_sdp_create", (void **) &qav_sdp_create},
244 {"av_match_ext", (void **) &qav_match_ext},
245 {"avformat_query_codec", (void **) &qavformat_query_codec},
246 {"av_guess_sample_aspect_ratio", (void **) &qav_guess_sample_aspect_ratio},
247 {"av_guess_frame_rate", (void **) &qav_guess_frame_rate},
248 {"avformat_match_stream_specifier", (void **) &qavformat_match_stream_specifier},
249 {"avformat_queue_attached_pictures", (void **) &qavformat_queue_attached_pictures},
250 {"avformat_transfer_internal_stream_timing_info", (void **) &qavformat_transfer_internal_stream_timing_info},
251 {"av_stream_get_codec_timebase", (void **) &qav_stream_get_codec_timebase},
252 {NULL, NULL}
253};
254
257
259{
260 const char* dllnames_libavcodec [] =
261 {
262#if defined(WIN32)
263 "libavcodec.dll",
264#elif defined(MACOSX)
265 "libavcodec.dylib",
266#else
267 "libavcodec.so",
268#endif
269 NULL
270 };
271
272 const char* dllnames_libavformat [] =
273 {
274#if defined(WIN32)
275 "libavformat.dll",
276#elif defined(MACOSX)
277 "libavformat.dylib",
278#else
279 "libavformat.so",
280#endif
281 NULL
282 };
283
284 if (libavcodec_dll && libavformat_dll) // Already loaded?
285 return true;
286
287// COMMANDLINEOPTION: -nolibav disables libav support
288 if (Sys_CheckParm("-nolibav"))
289 return false;
290
291 // Load the DLL
292 if (Sys_LoadDependency (dllnames_libavcodec, &libavcodec_dll, libavcodecfuncs))
293 {
294 if(Sys_LoadDependency(dllnames_libavformat, &libavformat_dll, libavformatfuncs))
295 return true;
296 Con_Printf(CON_ERROR "Failed to load the libavformat library. Cannot use libavcodec without it\n");
298 }
299
300 return false;
301}
int(* qavcodec_default_get_buffer2)(AVCodecContext *s, AVFrame *frame, int flags)
int(* qavformat_transfer_internal_stream_timing_info)(const AVOutputFormat *ofmt, AVStream *ost, const AVStream *ist, enum AVTimebaseSource copy_tb)
void(* qav_dump_format)(AVFormatContext *ic, int index, const char *url, int is_output)
AVCodecParameters *(* qavcodec_parameters_alloc)(void)
int(* qav_codec_get_tag2)(const struct AVCodecTag *const *tags, enum AVCodecID id, unsigned int *tag)
int(* qav_find_default_stream_index)(AVFormatContext *s)
int(* qav_match_ext)(const char *filename, const char *extensions)
int(* qavcodec_enum_to_chroma_pos)(int *xpos, int *ypos, enum AVChromaLocation pos)
AVRational(* qav_stream_get_codec_timebase)(const AVStream *st)
AVFormatContext *(* qavformat_alloc_context)(void)
void(* qav_pkt_dump2)(FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st)
int(* qavformat_open_input)(AVFormatContext **ps, const char *url, AVInputFormat *fmt, AVDictionary **options)
enum AVCodecID(* qav_guess_codec)(AVOutputFormat *fmt, const char *short_name, const char *filename, const char *mime_type, enum AVMediaType type)
int(* qavformat_query_codec)(const AVOutputFormat *ofmt, enum AVCodecID codec_id, int std_compliance)
void(* qav_program_add_stream_index)(AVFormatContext *ac, int progid, unsigned int idx)
av_warn_unused_result int(* qavformat_init_output)(AVFormatContext *s, AVDictionary **options)
uint8_t *(* qav_stream_new_side_data)(AVStream *stream, enum AVPacketSideDataType type, int size)
int(* qav_write_uncoded_frame_query)(AVFormatContext *s, int stream_index)
void(* qavcodec_free_context)(AVCodecContext **avctx)
int(* qavcodec_parameters_from_context)(AVCodecParameters *par, const AVCodecContext *codec)
AVProgram *(* qav_new_program)(AVFormatContext *s, int id)
enum AVCodecID(* qav_codec_get_id)(const struct AVCodecTag *const *tags, unsigned int tag)
AVRational(* qav_guess_sample_aspect_ratio)(AVFormatContext *format, AVStream *stream, AVFrame *frame)
const AVCodecHWConfig *(* qavcodec_get_hw_config)(const AVCodec *codec, int index)
const AVClass *(* qavformat_get_class)(void)
AVCodecContext *(* qavcodec_alloc_context3)(const AVCodec *codec)
AVCodec *(* qavcodec_find_decoder)(enum AVCodecID id)
int(* qav_read_pause)(AVFormatContext *s)
enum AVChromaLocation(* qavcodec_chroma_pos_to_enum)(int xpos, int ypos)
int(* qav_interleaved_write_frame)(AVFormatContext *s, AVPacket *pkt)
int(* qav_read_play)(AVFormatContext *s)
static dllfunction_t libavformatfuncs[]
const AVCodec *(* qav_codec_iterate)(void **opaque)
int(* qavcodec_send_packet)(AVCodecContext *avctx, const AVPacket *avpkt)
int(* qavcodec_close)(AVCodecContext *avctx)
void(* qavformat_close_input)(AVFormatContext **s)
int(* qavcodec_parameters_to_context)(AVCodecContext *codec, const AVCodecParameters *par)
int(* qavcodec_parameters_copy)(AVCodecParameters *dst, const AVCodecParameters *src)
void(* qav_url_split)(char *proto, int proto_size, char *authorization, int authorization_size, char *hostname, int hostname_size, int *port_ptr, char *path, int path_size, const char *url)
AVInputFormat *(* qav_probe_input_format)(AVProbeData *pd, int is_opened)
const char *(* qavcodec_configuration)(void)
int(* qav_write_frame)(AVFormatContext *s, AVPacket *pkt)
const char *(* qavformat_license)(void)
void(* qav_hex_dump_log)(void *avcl, int level, const uint8_t *buf, int size)
void(* qavcodec_parameters_free)(AVCodecParameters **par)
int(* qavformat_queue_attached_pictures)(AVFormatContext *s)
int(* qavcodec_send_frame)(AVCodecContext *avctx, const AVFrame *frame)
qbool LibAV_LoadLibrary(void)
void(* qav_register_output_format)(AVOutputFormat *format)
const char *(* qavformat_configuration)(void)
static dllhandle_t libavcodec_dll
const char *(* qavcodec_license)(void)
AVOutputFormat *(* qav_oformat_next)(const AVOutputFormat *f)
void(* qavcodec_align_dimensions)(AVCodecContext *s, int *width, int *height)
int(* qavcodec_receive_frame)(AVCodecContext *avctx, AVFrame *frame)
int(* qav_read_frame)(AVFormatContext *s, AVPacket *pkt)
AVInputFormat *(* qav_find_input_format)(const char *short_name)
const AVClass *(* qavcodec_get_class)(void)
void(* qav_register_input_format)(AVInputFormat *format)
void(* qav_register_all)(void)
AVStream *(* qavformat_new_stream)(AVFormatContext *s, const AVCodec *c)
int(* qav_index_search_timestamp)(AVStream *st, int64_t timestamp, int flags)
int(* qav_find_best_stream)(AVFormatContext *ic, enum AVMediaType type, int wanted_stream_nb, int related_stream, AVCodec **decoder_ret, int flags)
int(* qavcodec_get_context_defaults3)(AVCodecContext *s, const AVCodec *codec)
void(* qavcodec_align_dimensions2)(AVCodecContext *s, int *width, int *height, int linesize_align[AV_NUM_DATA_POINTERS])
int(* qav_get_frame_filename)(char *buf, int buf_size, const char *path, int number)
void(* qavformat_free_context)(AVFormatContext *s)
int(* qavformat_find_stream_info)(AVFormatContext *ic, AVDictionary **options)
int(* qavformat_network_deinit)(void)
int(* qavcodec_receive_packet)(AVCodecContext *avctx, AVPacket *avpkt)
unsigned(* qavcodec_version)(void)
int(* qavcodec_get_hw_frames_parameters)(AVCodecContext *avctx, AVBufferRef *device_ref, enum AVPixelFormat hw_pix_fmt, AVBufferRef **out_frames_ref)
int(* qavformat_match_stream_specifier)(AVFormatContext *s, AVStream *st, const char *spec)
int(* qavformat_network_init)(void)
AVRational(* qav_guess_frame_rate)(AVFormatContext *ctx, AVStream *stream, AVFrame *frame)
AVProgram *(* qav_find_program_from_stream)(AVFormatContext *ic, AVProgram *last, int s)
void(* qavsubtitle_free)(AVSubtitle *sub)
AVInputFormat *(* qav_probe_input_format3)(AVProbeData *pd, int is_opened, int *score_ret)
const AVClass *(* qavcodec_get_subtitle_rect_class)(void)
int(* qavformat_flush)(AVFormatContext *s)
int(* qav_write_uncoded_frame)(AVFormatContext *s, int stream_index, AVFrame *frame)
int(* qav_probe_input_buffer)(AVIOContext *pb, AVInputFormat **fmt, const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size)
int(* qav_sdp_create)(AVFormatContext *ac[], int n_files, char *buf, int size)
int(* qav_filename_number_test)(const char *filename)
static dllfunction_t libavcodecfuncs[]
int(* qav_add_index_entry)(AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags)
AVInputFormat *(* qav_probe_input_format2)(AVProbeData *pd, int is_opened, int *score_max)
int(* qav_interleaved_write_uncoded_frame)(AVFormatContext *s, int stream_index, AVFrame *frame)
av_warn_unused_result int(* qavformat_write_header)(AVFormatContext *s, AVDictionary **options)
void(* qav_hex_dump)(FILE *f, const uint8_t *buf, int size)
unsigned(* qavformat_version)(void)
int(* qavcodec_open2)(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
static dllhandle_t libavformat_dll
AVCodec *(* qavcodec_find_decoder_by_name)(const char *name)
int(* qavformat_seek_file)(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
int(* qav_seek_frame)(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
int(* qav_probe_input_buffer2)(AVIOContext *pb, AVInputFormat **fmt, const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size)
const AVClass *(* qavcodec_get_frame_class)(void)
unsigned int(* qav_codec_get_tag)(const struct AVCodecTag *const *tags, enum AVCodecID id)
int(* qav_get_frame_filename2)(char *buf, int buf_size, const char *path, int number, int flags)
int(* qav_write_trailer)(AVFormatContext *s)
int(* qavcodec_encode_subtitle)(AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVSubtitle *sub)
void(* qav_pkt_dump_log2)(void *avcl, int level, const AVPacket *pkt, int dump_payload, const AVStream *st)
AVOutputFormat *(* qav_guess_format)(const char *short_name, const char *filename, const char *mime_type)
AVInputFormat *(* qav_iformat_next)(const AVInputFormat *f)
int(* qav_get_output_timestamp)(struct AVFormatContext *s, int stream, int64_t *dts, int64_t *wall)
uint8_t *(* qav_stream_get_side_data)(const AVStream *stream, enum AVPacketSideDataType type, int *size)
void Con_Printf(const char *fmt,...)
Prints to all appropriate console targets.
Definition console.c:1514
#define CON_ERROR
Definition console.h:102
vector size
float flags
void() predraw
float frame
static int(ZEXPORT *qz_inflate)(z_stream *strm
static int level
Definition fs.c:481
GLenum GLuint id
Definition glquake.h:657
GLenum GLsizei width
Definition glquake.h:622
GLenum GLsizei GLsizei height
Definition glquake.h:622
GLint GLint GLint GLsizei GLsizei GLenum format
Definition glquake.h:649
GLuint GLuint GLintptr offset
Definition glquake.h:632
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition glquake.h:657
const GLchar * name
Definition glquake.h:601
GLuint index
Definition glquake.h:629
GLenum type
Definition glquake.h:656
cvar_t hostname
Definition netconn.c:88
prvm_eval_t * src
#define NULL
Definition qtypes.h:12
bool qbool
Definition qtypes.h:9
float f
void * dllhandle_t
Definition sys.h:169
qbool Sys_LoadDependency(const char **dllnames, dllhandle_t *handle, const dllfunction_t *fcts)
Definition sys_shared.c:131
void Sys_FreeLibrary(dllhandle_t *handle)
Definition sys_shared.c:245
int Sys_CheckParm(const char *parm)
Definition sys_shared.c:327