1use std::os::raw::{c_char, c_int, c_uint, c_void};
14use std::ptr;
15
16pub type AVCodecID = c_uint;
19pub type AVPixelFormat = c_int;
20pub type AVSampleFormat = c_int;
21pub type AVMediaType = c_int;
22pub type AVColorPrimaries = c_uint;
23pub type AVColorRange = c_uint;
24pub type AVColorSpace = c_uint;
25pub type AVHWDeviceType = c_int;
26pub type AVChannelOrder = c_uint;
27pub type AVPictureType = c_int;
28
29pub struct AVDictionary(());
32pub struct AVCodec(());
33pub struct SwsContext(());
34pub struct SwrContext(());
35pub struct AVBufferRef(());
36pub struct AVIOContext(());
37pub struct AVOutputFormat(());
38
39pub struct AVInputFormat {
40 pub name: *const c_char,
41 pub long_name: *const c_char,
42}
43
44#[derive(Copy, Clone)]
47#[repr(C)]
48pub union AVChannelLayout__bindgen_ty_1 {
49 pub mask: u64,
50}
51
52impl Default for AVChannelLayout__bindgen_ty_1 {
53 fn default() -> Self {
54 Self { mask: 0 }
55 }
56}
57
58#[derive(Copy, Clone)]
59pub struct AVChannelLayout {
60 pub order: AVChannelOrder,
61 pub nb_channels: c_int,
62 pub u: AVChannelLayout__bindgen_ty_1,
63}
64
65impl Default for AVChannelLayout {
66 fn default() -> Self {
67 Self {
68 order: 0,
69 nb_channels: 0,
70 u: AVChannelLayout__bindgen_ty_1::default(),
71 }
72 }
73}
74
75#[derive(Copy, Clone)]
76pub struct AVRational {
77 pub num: c_int,
78 pub den: c_int,
79}
80
81pub struct AVDictionaryEntry {
82 pub key: *mut c_char,
83 pub value: *mut c_char,
84}
85
86pub struct AVChapter {
87 pub id: i64,
88 pub time_base: AVRational,
89 pub start: i64,
90 pub end: i64,
91 pub metadata: *mut AVDictionary,
92}
93
94pub struct AVCodecParameters {
95 pub codec_type: AVMediaType,
96 pub codec_id: AVCodecID,
97 pub codec_tag: c_uint,
98 pub extradata: *mut u8,
99 pub extradata_size: c_int,
100 pub format: c_int,
101 pub bit_rate: i64,
102 pub width: c_int,
103 pub height: c_int,
104 pub sample_rate: c_int,
105 pub ch_layout: AVChannelLayout,
106 pub sample_fmt: AVSampleFormat,
107 pub color_space: AVColorSpace,
108 pub color_range: AVColorRange,
109 pub color_primaries: AVColorPrimaries,
110}
111
112pub struct AVStream {
113 pub codecpar: *mut AVCodecParameters,
114 pub nb_frames: i64,
115 pub duration: i64,
116 pub time_base: AVRational,
117 pub avg_frame_rate: AVRational,
118 pub r_frame_rate: AVRational,
119 pub start_time: i64,
120 pub disposition: c_int,
121 pub metadata: *mut AVDictionary,
122}
123
124pub struct AVFormatContext {
125 pub nb_streams: c_uint,
126 pub streams: *mut *mut AVStream,
127 pub duration: i64,
128 pub metadata: *mut AVDictionary,
129 pub nb_chapters: c_uint,
130 pub chapters: *mut *mut AVChapter,
131 pub iformat: *mut AVInputFormat,
132 pub bit_rate: i64,
133 pub pb: *mut AVIOContext,
134}
135
136pub struct AVFrame {
137 pub data: [*mut u8; 8],
138 pub linesize: [c_int; 8],
139 pub width: c_int,
140 pub height: c_int,
141 pub nb_samples: c_int,
142 pub format: c_int,
143 pub key_frame: c_int,
144 pub pict_type: AVPictureType,
145 pub pts: i64,
146 pub pkt_dts: i64,
147 pub sample_rate: c_int,
148 pub ch_layout: AVChannelLayout,
149 pub duration: i64,
150 pub time_base: AVRational,
151 pub hw_frames_ctx: *mut AVBufferRef,
152}
153
154pub struct AVPacket {
155 pub pts: i64,
156 pub dts: i64,
157 pub data: *mut u8,
158 pub size: c_int,
159 pub stream_index: c_int,
160 pub flags: c_int,
161 pub duration: i64,
162}
163
164pub type AVColorTransferCharacteristic = c_uint;
165
166pub struct AVCodecContext {
167 pub codec_id: AVCodecID,
168 pub bit_rate: i64,
169 pub width: c_int,
170 pub height: c_int,
171 pub pix_fmt: AVPixelFormat,
172 pub sample_rate: c_int,
173 pub ch_layout: AVChannelLayout,
174 pub sample_fmt: AVSampleFormat,
175 pub time_base: AVRational,
176 pub framerate: AVRational,
177 pub gop_size: c_int,
178 pub max_b_frames: c_int,
179 pub qmin: c_int,
180 pub qmax: c_int,
181 pub thread_count: c_int,
182 pub hw_device_ctx: *mut AVBufferRef,
183 pub hw_frames_ctx: *mut AVBufferRef,
184 pub priv_data: *mut c_void,
185 pub color_primaries: AVColorPrimaries,
186 pub color_trc: AVColorTransferCharacteristic,
187 pub colorspace: AVColorSpace,
188}
189
190pub const AV_DICT_IGNORE_SUFFIX: u32 = 2;
193pub const AV_NUM_DATA_POINTERS: usize = 8;
194pub const AV_TIME_BASE: u32 = 1_000_000;
195
196pub const AVMediaType_AVMEDIA_TYPE_VIDEO: AVMediaType = 0;
197pub const AVMediaType_AVMEDIA_TYPE_AUDIO: AVMediaType = 1;
198pub const AVMediaType_AVMEDIA_TYPE_SUBTITLE: AVMediaType = 3;
199pub const AVMediaType_AVMEDIA_TYPE_ATTACHMENT: AVMediaType = 4;
200
201pub const AV_DISPOSITION_FORCED: u32 = 0x0040;
202pub const AV_DISPOSITION_ATTACHED_PIC: u32 = 0x0400;
203pub const AV_INPUT_BUFFER_PADDING_SIZE: u32 = 64;
204
205pub const AVChannelOrder_AV_CHANNEL_ORDER_UNSPEC: AVChannelOrder = 0;
206pub const AVChannelOrder_AV_CHANNEL_ORDER_NATIVE: AVChannelOrder = 1;
207
208pub const AVCodecID_AV_CODEC_ID_NONE: AVCodecID = 0;
210pub const AVCodecID_AV_CODEC_ID_MPEG2VIDEO: AVCodecID = 2;
211pub const AVCodecID_AV_CODEC_ID_MJPEG: AVCodecID = 7;
212pub const AVCodecID_AV_CODEC_ID_MPEG4: AVCodecID = 13;
213pub const AVCodecID_AV_CODEC_ID_H264: AVCodecID = 27;
214pub const AVCodecID_AV_CODEC_ID_THEORA: AVCodecID = 30;
215pub const AVCodecID_AV_CODEC_ID_VP8: AVCodecID = 139;
216pub const AVCodecID_AV_CODEC_ID_PRORES: AVCodecID = 147;
217pub const AVCodecID_AV_CODEC_ID_VP9: AVCodecID = 167;
218pub const AVCodecID_AV_CODEC_ID_HEVC: AVCodecID = 173;
219pub const AVCodecID_AV_CODEC_ID_AV1: AVCodecID = 226;
220pub const AVCodecID_AV_CODEC_ID_DNXHD: AVCodecID = 99;
221
222pub const AVCodecID_AV_CODEC_ID_PNG: AVCodecID = 61;
224pub const AVCodecID_AV_CODEC_ID_BMP: AVCodecID = 76;
225pub const AVCodecID_AV_CODEC_ID_TIFF: AVCodecID = 90;
226pub const AVCodecID_AV_CODEC_ID_WEBP: AVCodecID = 219;
227pub const AVCodecID_AV_CODEC_ID_EXR: AVCodecID = 178;
228
229pub const AVCodecID_AV_CODEC_ID_DVB_SUBTITLE: AVCodecID = 94209;
231pub const AVCodecID_AV_CODEC_ID_SSA: AVCodecID = 94212;
232pub const AVCodecID_AV_CODEC_ID_HDMV_PGS_SUBTITLE: AVCodecID = 94214;
233pub const AVCodecID_AV_CODEC_ID_SRT: AVCodecID = 94216;
234pub const AVCodecID_AV_CODEC_ID_SUBRIP: AVCodecID = 94248;
235pub const AVCodecID_AV_CODEC_ID_WEBVTT: AVCodecID = 94249;
236pub const AVCodecID_AV_CODEC_ID_ASS: AVCodecID = 94253;
237
238pub const AVCodecID_AV_CODEC_ID_BIN_DATA: AVCodecID = 98314;
240
241pub const AVCodecID_AV_CODEC_ID_PCM_S16LE: AVCodecID = 65536;
243pub const AVCodecID_AV_CODEC_ID_PCM_S16BE: AVCodecID = 65537;
244pub const AVCodecID_AV_CODEC_ID_PCM_U8: AVCodecID = 65542;
245pub const AVCodecID_AV_CODEC_ID_PCM_S24LE: AVCodecID = 65544;
246pub const AVCodecID_AV_CODEC_ID_PCM_S24BE: AVCodecID = 65545;
247pub const AVCodecID_AV_CODEC_ID_PCM_S32LE: AVCodecID = 65556;
248pub const AVCodecID_AV_CODEC_ID_PCM_S32BE: AVCodecID = 65557;
249pub const AVCodecID_AV_CODEC_ID_PCM_F32LE: AVCodecID = 65558;
250pub const AVCodecID_AV_CODEC_ID_PCM_F32BE: AVCodecID = 65559;
251pub const AVCodecID_AV_CODEC_ID_PCM_F64LE: AVCodecID = 65560;
252pub const AVCodecID_AV_CODEC_ID_PCM_F64BE: AVCodecID = 65561;
253pub const AVCodecID_AV_CODEC_ID_MP3: AVCodecID = 86017;
254pub const AVCodecID_AV_CODEC_ID_AAC: AVCodecID = 86018;
255pub const AVCodecID_AV_CODEC_ID_AC3: AVCodecID = 86019;
256pub const AVCodecID_AV_CODEC_ID_DTS: AVCodecID = 86020;
257pub const AVCodecID_AV_CODEC_ID_VORBIS: AVCodecID = 86021;
258pub const AVCodecID_AV_CODEC_ID_FLAC: AVCodecID = 86028;
259pub const AVCodecID_AV_CODEC_ID_ALAC: AVCodecID = 86032;
260pub const AVCodecID_AV_CODEC_ID_WMAV2: AVCodecID = 86047;
261pub const AVCodecID_AV_CODEC_ID_EAC3: AVCodecID = 86056;
262pub const AVCodecID_AV_CODEC_ID_OPUS: AVCodecID = 86076;
263
264pub const AVPixelFormat_AV_PIX_FMT_NONE: AVPixelFormat = -1;
266pub const AVPixelFormat_AV_PIX_FMT_YUV420P: AVPixelFormat = 0;
267pub const AVPixelFormat_AV_PIX_FMT_RGB24: AVPixelFormat = 2;
268pub const AVPixelFormat_AV_PIX_FMT_BGR24: AVPixelFormat = 3;
269pub const AVPixelFormat_AV_PIX_FMT_YUV422P: AVPixelFormat = 4;
270pub const AVPixelFormat_AV_PIX_FMT_YUV444P: AVPixelFormat = 5;
271pub const AVPixelFormat_AV_PIX_FMT_GRAY8: AVPixelFormat = 8;
272pub const AVPixelFormat_AV_PIX_FMT_PAL8: AVPixelFormat = 77;
273pub const AVPixelFormat_AV_PIX_FMT_NV12: AVPixelFormat = 23;
274pub const AVPixelFormat_AV_PIX_FMT_NV21: AVPixelFormat = 24;
275pub const AVPixelFormat_AV_PIX_FMT_RGBA: AVPixelFormat = 26;
276pub const AVPixelFormat_AV_PIX_FMT_BGRA: AVPixelFormat = 28;
277pub const AVPixelFormat_AV_PIX_FMT_YUVJ420P: AVPixelFormat = 12;
278pub const AVPixelFormat_AV_PIX_FMT_VAAPI: AVPixelFormat = 51;
279pub const AVPixelFormat_AV_PIX_FMT_DXVA2_VLD: AVPixelFormat = 53;
280pub const AV_OPT_SEARCH_CHILDREN: u32 = 1;
281pub const AVPixelFormat_AV_PIX_FMT_YUV420P10LE: AVPixelFormat = 66;
282pub const AVPixelFormat_AV_PIX_FMT_YUV422P10LE: AVPixelFormat = 64;
283pub const AVPixelFormat_AV_PIX_FMT_YUV444P10LE: AVPixelFormat = 68;
284pub const AVPixelFormat_AV_PIX_FMT_YUVA444P10LE: AVPixelFormat = 91;
285pub const AVPixelFormat_AV_PIX_FMT_VDPAU: AVPixelFormat = 101;
286pub const AVPixelFormat_AV_PIX_FMT_CUDA: AVPixelFormat = 119;
287pub const AVPixelFormat_AV_PIX_FMT_QSV: AVPixelFormat = 123;
288pub const AVPixelFormat_AV_PIX_FMT_VIDEOTOOLBOX: AVPixelFormat = 135;
289pub const AVPixelFormat_AV_PIX_FMT_MEDIACODEC: AVPixelFormat = 165;
290pub const AVPixelFormat_AV_PIX_FMT_P010LE: AVPixelFormat = 161;
291pub const AVPixelFormat_AV_PIX_FMT_GBRPF32LE: AVPixelFormat = 175;
292pub const AVPixelFormat_AV_PIX_FMT_D3D11: AVPixelFormat = 174;
293pub const AVPixelFormat_AV_PIX_FMT_OPENCL: AVPixelFormat = 180;
294pub const AVPixelFormat_AV_PIX_FMT_VULKAN: AVPixelFormat = 193;
295
296pub const AVSampleFormat_AV_SAMPLE_FMT_NONE: AVSampleFormat = -1;
298pub const AVSampleFormat_AV_SAMPLE_FMT_U8: AVSampleFormat = 0;
299pub const AVSampleFormat_AV_SAMPLE_FMT_S16: AVSampleFormat = 1;
300pub const AVSampleFormat_AV_SAMPLE_FMT_S32: AVSampleFormat = 2;
301pub const AVSampleFormat_AV_SAMPLE_FMT_FLT: AVSampleFormat = 3;
302pub const AVSampleFormat_AV_SAMPLE_FMT_DBL: AVSampleFormat = 4;
303pub const AVSampleFormat_AV_SAMPLE_FMT_U8P: AVSampleFormat = 5;
304pub const AVSampleFormat_AV_SAMPLE_FMT_S16P: AVSampleFormat = 6;
305pub const AVSampleFormat_AV_SAMPLE_FMT_S32P: AVSampleFormat = 7;
306pub const AVSampleFormat_AV_SAMPLE_FMT_FLTP: AVSampleFormat = 8;
307pub const AVSampleFormat_AV_SAMPLE_FMT_DBLP: AVSampleFormat = 9;
308pub const AVSampleFormat_AV_SAMPLE_FMT_S64: AVSampleFormat = 10;
309pub const AVSampleFormat_AV_SAMPLE_FMT_S64P: AVSampleFormat = 11;
310
311pub const AVColorPrimaries_AVCOL_PRI_BT709: AVColorPrimaries = 1;
313pub const AVColorPrimaries_AVCOL_PRI_UNSPECIFIED: AVColorPrimaries = 2;
314pub const AVColorPrimaries_AVCOL_PRI_BT470BG: AVColorPrimaries = 5;
315pub const AVColorPrimaries_AVCOL_PRI_SMPTE170M: AVColorPrimaries = 6;
316pub const AVColorPrimaries_AVCOL_PRI_BT2020: AVColorPrimaries = 9;
317
318pub const AVColorRange_AVCOL_RANGE_UNSPECIFIED: AVColorRange = 0;
320pub const AVColorRange_AVCOL_RANGE_MPEG: AVColorRange = 1;
321pub const AVColorRange_AVCOL_RANGE_JPEG: AVColorRange = 2;
322
323pub const AVColorSpace_AVCOL_SPC_RGB: AVColorSpace = 0;
325pub const AVColorSpace_AVCOL_SPC_BT709: AVColorSpace = 1;
326pub const AVColorSpace_AVCOL_SPC_UNSPECIFIED: AVColorSpace = 2;
327pub const AVColorSpace_AVCOL_SPC_BT470BG: AVColorSpace = 5;
328pub const AVColorSpace_AVCOL_SPC_SMPTE170M: AVColorSpace = 6;
329pub const AVColorSpace_AVCOL_SPC_BT2020_NCL: AVColorSpace = 9;
330pub const AVColorSpace_AVCOL_SPC_BT2020_CL: AVColorSpace = 10;
331
332pub const AVColorTransferCharacteristic_AVCOL_TRC_BT709: AVColorTransferCharacteristic = 1;
334pub const AVColorTransferCharacteristic_AVCOL_TRC_UNSPECIFIED: AVColorTransferCharacteristic = 2;
335pub const AVColorTransferCharacteristic_AVCOL_TRC_LINEAR: AVColorTransferCharacteristic = 8;
336pub const AVColorTransferCharacteristic_AVCOL_TRC_BT2020_10: AVColorTransferCharacteristic = 14;
337pub const AVColorTransferCharacteristic_AVCOL_TRC_BT2020_12: AVColorTransferCharacteristic = 15;
338pub const AVColorTransferCharacteristic_AVCOL_TRC_SMPTEST2084: AVColorTransferCharacteristic = 16;
339pub const AVColorTransferCharacteristic_AVCOL_TRC_ARIB_STD_B67: AVColorTransferCharacteristic = 18;
340
341pub type AVPacketSideDataType = c_uint;
343pub const AVPacketSideDataType_AV_PKT_DATA_MASTERING_DISPLAY_METADATA: AVPacketSideDataType = 20;
344pub const AVPacketSideDataType_AV_PKT_DATA_CONTENT_LIGHT_LEVEL: AVPacketSideDataType = 22;
345
346pub const AVHWDeviceType_AV_HWDEVICE_TYPE_CUDA: AVHWDeviceType = 2;
348pub const AVHWDeviceType_AV_HWDEVICE_TYPE_VAAPI: AVHWDeviceType = 4;
349pub const AVHWDeviceType_AV_HWDEVICE_TYPE_QSV: AVHWDeviceType = 5;
350pub const AVHWDeviceType_AV_HWDEVICE_TYPE_VIDEOTOOLBOX: AVHWDeviceType = 7;
351pub const AVHWDeviceType_AV_HWDEVICE_TYPE_D3D11VA: AVHWDeviceType = 8;
352
353pub unsafe fn av_strerror(_errnum: c_int, _errbuf: *mut c_char, _errbuf_size: usize) -> c_int {
360 0
361}
362
363pub unsafe fn av_dict_get(
364 _m: *const AVDictionary,
365 _key: *const c_char,
366 _prev: *const AVDictionaryEntry,
367 _flags: c_int,
368) -> *mut AVDictionaryEntry {
369 std::ptr::null_mut()
370}
371
372pub unsafe fn av_dict_set(
373 _pm: *mut *mut AVDictionary,
374 _key: *const c_char,
375 _value: *const c_char,
376 _flags: c_int,
377) -> c_int {
378 0
379}
380
381pub unsafe fn av_dict_free(_m: *mut *mut AVDictionary) {}
382
383pub unsafe fn av_find_input_format(_short_name: *const c_char) -> *const AVInputFormat {
384 std::ptr::null()
385}
386
387pub unsafe fn avcodec_get_name(_id: AVCodecID) -> *const c_char {
388 std::ptr::null()
389}
390
391pub unsafe fn av_frame_alloc() -> *mut AVFrame {
392 std::ptr::null_mut()
393}
394
395pub unsafe fn av_frame_free(_frame: *mut *mut AVFrame) {}
396
397pub unsafe fn av_frame_get_buffer(_frame: *mut AVFrame, _align: c_int) -> c_int {
398 0
399}
400
401pub unsafe fn av_frame_move_ref(_dst: *mut AVFrame, _src: *mut AVFrame) {}
402
403pub unsafe fn av_frame_unref(_frame: *mut AVFrame) {}
404
405pub unsafe fn av_packet_alloc() -> *mut AVPacket {
406 std::ptr::null_mut()
407}
408
409pub unsafe fn av_packet_free(_pkt: *mut *mut AVPacket) {}
410
411pub unsafe fn av_packet_unref(_pkt: *mut AVPacket) {}
412
413pub unsafe fn av_packet_new_side_data(
414 _pkt: *mut AVPacket,
415 _type_: AVPacketSideDataType,
416 _size: usize,
417) -> *mut u8 {
418 std::ptr::null_mut()
419}
420
421pub unsafe fn av_buffer_ref(_buf: *mut AVBufferRef) -> *mut AVBufferRef {
422 std::ptr::null_mut()
423}
424
425pub unsafe fn av_buffer_unref(_buf: *mut *mut AVBufferRef) {}
426
427pub unsafe fn av_hwdevice_ctx_create(
428 _device_ctx: *mut *mut AVBufferRef,
429 _type_: AVHWDeviceType,
430 _device: *const c_char,
431 _opts: *mut AVDictionary,
432 _flags: c_int,
433) -> c_int {
434 -1
435}
436
437pub unsafe fn av_hwframe_transfer_data(
438 _dst: *mut AVFrame,
439 _src: *const AVFrame,
440 _flags: c_int,
441) -> c_int {
442 -1
443}
444
445pub unsafe fn av_opt_set(
446 _obj: *mut c_void,
447 _name: *const c_char,
448 _val: *const c_char,
449 _search_flags: c_int,
450) -> c_int {
451 0
452}
453
454pub unsafe fn av_read_frame(_s: *mut AVFormatContext, _pkt: *mut AVPacket) -> c_int {
455 -1
456}
457
458pub unsafe fn av_write_trailer(_s: *mut AVFormatContext) -> c_int {
459 0
460}
461
462pub unsafe fn av_interleaved_write_frame(
463 _s: *mut AVFormatContext,
464 _pkt: *mut AVPacket,
465) -> c_int {
466 0
467}
468
469pub unsafe fn avcodec_receive_frame(_avctx: *mut AVCodecContext, _frame: *mut AVFrame) -> c_int {
470 -1
471}
472
473pub unsafe fn avcodec_send_packet(
474 _avctx: *mut AVCodecContext,
475 _avpkt: *const AVPacket,
476) -> c_int {
477 -1
478}
479
480pub unsafe fn avformat_alloc_output_context2(
481 _ctx: *mut *mut AVFormatContext,
482 _oformat: *mut AVOutputFormat,
483 _format_name: *const c_char,
484 _filename: *const c_char,
485) -> c_int {
486 -1
487}
488
489pub unsafe fn avformat_free_context(_s: *mut AVFormatContext) {}
490
491pub unsafe fn avformat_new_stream(
492 _s: *mut AVFormatContext,
493 _c: *const AVCodec,
494) -> *mut AVStream {
495 std::ptr::null_mut()
496}
497
498pub unsafe fn avformat_write_header(
499 _s: *mut AVFormatContext,
500 _options: *mut *mut AVDictionary,
501) -> c_int {
502 -1
503}
504
505pub unsafe fn swr_alloc_set_opts2(
506 _ps: *mut *mut SwrContext,
507 _out_ch_layout: *const AVChannelLayout,
508 _out_sample_fmt: AVSampleFormat,
509 _out_sample_rate: c_int,
510 _in_ch_layout: *const AVChannelLayout,
511 _in_sample_fmt: AVSampleFormat,
512 _in_sample_rate: c_int,
513 _log_offset: c_int,
514 _log_ctx: *mut c_void,
515) -> c_int {
516 -1
517}
518
519pub unsafe fn swr_convert(
520 _s: *mut SwrContext,
521 _out: *mut *mut u8,
522 _out_count: c_int,
523 _in_: *const *const u8,
524 _in_count: c_int,
525) -> c_int {
526 -1
527}
528
529pub unsafe fn swr_free(_s: *mut *mut SwrContext) {}
530
531pub unsafe fn swr_get_out_samples(_s: *mut SwrContext, _in_samples: c_int) -> c_int {
532 0
533}
534
535pub unsafe fn swr_init(_s: *mut SwrContext) -> c_int {
536 -1
537}
538
539pub unsafe fn av_channel_layout_default(_ch_layout: *mut AVChannelLayout, _nb_channels: c_int) {}
540
541pub unsafe fn av_channel_layout_uninit(_ch_layout: *mut AVChannelLayout) {}
542
543pub unsafe fn av_mallocz(_size: usize) -> *mut c_void {
544 std::ptr::null_mut()
545}
546
547pub unsafe fn av_malloc(_size: usize) -> *mut c_void {
548 std::ptr::null_mut()
549}
550
551pub unsafe fn av_free(_ptr: *mut c_void) {}
552
553pub unsafe fn av_new_packet(_pkt: *mut AVPacket, _size: c_int) -> c_int {
554 -1
555}
556
557pub unsafe fn avcodec_parameters_copy(
558 _dst: *mut AVCodecParameters,
559 _src: *const AVCodecParameters,
560) -> c_int {
561 0
562}
563
564pub unsafe fn av_packet_rescale_ts(
565 _pkt: *mut AVPacket,
566 _tb_src: AVRational,
567 _tb_dst: AVRational,
568) {
569}
570
571pub struct AVFilterGraph(());
579pub struct AVFilterContext(());
580pub struct AVFilter(());
581
582pub const AV_BUFFERSRC_FLAG_KEEP_REF: c_int = 8;
586
587pub unsafe fn avfilter_graph_alloc() -> *mut AVFilterGraph {
592 ptr::null_mut()
593}
594
595pub unsafe fn avfilter_graph_free(_graph: *mut *mut AVFilterGraph) {}
596
597pub unsafe fn avfilter_get_by_name(_name: *const c_char) -> *const AVFilter {
598 ptr::null()
599}
600
601pub unsafe fn avfilter_graph_create_filter(
602 _filt_ctx: *mut *mut AVFilterContext,
603 _filt: *const AVFilter,
604 _name: *const c_char,
605 _args: *const c_char,
606 _opaque: *mut c_void,
607 _graph_ctx: *mut AVFilterGraph,
608) -> c_int {
609 0
610}
611
612pub unsafe fn avfilter_link(
613 _src: *mut AVFilterContext,
614 _srcpad: c_uint,
615 _dst: *mut AVFilterContext,
616 _dstpad: c_uint,
617) -> c_int {
618 0
619}
620
621pub unsafe fn avfilter_graph_config(
622 _graphctx: *mut AVFilterGraph,
623 _log_ctx: *mut c_void,
624) -> c_int {
625 0
626}
627
628pub unsafe fn avfilter_graph_set_auto_convert(_graph: *mut AVFilterGraph, _flags: c_uint) {}
629
630pub unsafe fn av_buffersrc_add_frame_flags(
631 _ctx: *mut AVFilterContext,
632 _frame: *mut AVFrame,
633 _flags: c_int,
634) -> c_int {
635 0
636}
637
638pub unsafe fn av_buffersink_get_frame(
639 _ctx: *mut AVFilterContext,
640 _frame: *mut AVFrame,
641) -> c_int {
642 -11
644}
645
646pub mod avformat {
648 use std::os::raw::c_int;
649 use std::path::Path;
650
651 use super::{AVFormatContext, AVIOContext, AVPacket};
652
653 pub unsafe fn open_input(_path: &Path) -> Result<*mut AVFormatContext, c_int> {
654 Err(-1)
655 }
656
657 pub unsafe fn open_input_image_sequence(
658 _path: &Path,
659 _framerate: u32,
660 ) -> Result<*mut AVFormatContext, c_int> {
661 Err(-1)
662 }
663
664 pub unsafe fn close_input(_ctx: *mut *mut AVFormatContext) {}
665
666 pub unsafe fn find_stream_info(_ctx: *mut AVFormatContext) -> Result<(), c_int> {
667 Err(-1)
668 }
669
670 pub unsafe fn seek_frame(
671 _ctx: *mut AVFormatContext,
672 _stream_index: c_int,
673 _timestamp: i64,
674 _flags: c_int,
675 ) -> Result<(), c_int> {
676 Err(-1)
677 }
678
679 pub unsafe fn seek_file(
680 _ctx: *mut AVFormatContext,
681 _stream_index: c_int,
682 _min_ts: i64,
683 _ts: i64,
684 _max_ts: i64,
685 _flags: c_int,
686 ) -> Result<(), c_int> {
687 Err(-1)
688 }
689
690 pub unsafe fn read_frame(
691 _ctx: *mut AVFormatContext,
692 _pkt: *mut AVPacket,
693 ) -> Result<(), c_int> {
694 Err(-1)
695 }
696
697 pub unsafe fn write_frame(
698 _ctx: *mut AVFormatContext,
699 _pkt: *mut AVPacket,
700 ) -> Result<(), c_int> {
701 Err(-1)
702 }
703
704 pub unsafe fn open_output(_path: &Path, _flags: c_int) -> Result<*mut AVIOContext, c_int> {
705 Err(-1)
706 }
707
708 pub unsafe fn close_output(_pb: *mut *mut AVIOContext) {}
709
710 pub mod avio_flags {
711 use std::os::raw::c_int;
712 pub const READ: c_int = 1;
713 pub const WRITE: c_int = 2;
714 pub const READ_WRITE: c_int = 3;
715 }
716
717 pub mod seek_flags {
718 pub const BACKWARD: i32 = 1;
719 pub const BYTE: i32 = 2;
720 pub const ANY: i32 = 4;
721 pub const FRAME: i32 = 8;
722 }
723}
724
725pub mod avcodec {
727 use std::os::raw::c_int;
728
729 use super::{AVCodec, AVCodecContext, AVCodecID, AVCodecParameters, AVDictionary, AVFrame, AVPacket};
730
731 pub unsafe fn find_decoder(_codec_id: AVCodecID) -> Option<*const AVCodec> {
732 None
733 }
734
735 pub unsafe fn find_decoder_by_name(_name: *const i8) -> Option<*const AVCodec> {
736 None
737 }
738
739 pub unsafe fn find_encoder(_codec_id: AVCodecID) -> Option<*const AVCodec> {
740 None
741 }
742
743 pub unsafe fn find_encoder_by_name(_name: *const i8) -> Option<*const AVCodec> {
744 None
745 }
746
747 pub unsafe fn alloc_context3(_codec: *const AVCodec) -> Result<*mut AVCodecContext, c_int> {
748 Err(-1)
749 }
750
751 pub unsafe fn free_context(_ctx: *mut *mut AVCodecContext) {}
752
753 pub unsafe fn parameters_to_context(
754 _codec_ctx: *mut AVCodecContext,
755 _par: *const AVCodecParameters,
756 ) -> Result<(), c_int> {
757 Err(-1)
758 }
759
760 pub unsafe fn open2(
761 _avctx: *mut AVCodecContext,
762 _codec: *const AVCodec,
763 _options: *mut *mut AVDictionary,
764 ) -> Result<(), c_int> {
765 Err(-1)
766 }
767
768 pub unsafe fn send_packet(
769 _ctx: *mut AVCodecContext,
770 _pkt: *const AVPacket,
771 ) -> Result<(), c_int> {
772 Err(-1)
773 }
774
775 pub unsafe fn receive_frame(
776 _ctx: *mut AVCodecContext,
777 _frame: *mut AVFrame,
778 ) -> Result<(), c_int> {
779 Err(-1)
780 }
781
782 pub unsafe fn send_frame(
783 _ctx: *mut AVCodecContext,
784 _frame: *const AVFrame,
785 ) -> Result<(), c_int> {
786 Err(-1)
787 }
788
789 pub unsafe fn receive_packet(
790 _ctx: *mut AVCodecContext,
791 _pkt: *mut AVPacket,
792 ) -> Result<(), c_int> {
793 Err(-1)
794 }
795
796 pub unsafe fn flush_buffers(_ctx: *mut AVCodecContext) {}
797
798 pub unsafe fn parameters_from_context(
799 _par: *mut AVCodecParameters,
800 _ctx: *const AVCodecContext,
801 ) -> Result<(), c_int> {
802 Err(-1)
803 }
804
805 pub mod codec_caps {
806 pub const EXPERIMENTAL: u32 = 1 << 9;
807 pub const HARDWARE: u32 = 1 << 10;
808 pub const HYBRID: u32 = 1 << 11;
809 pub const VARIABLE_FRAME_SIZE: u32 = 1 << 16;
810 pub const AVOID_PROBING: u32 = 1 << 17;
811 }
812}
813
814pub mod swresample {
816 use std::os::raw::c_int;
817
818 use super::{AVChannelLayout, AVSampleFormat, SwrContext};
819
820 pub unsafe fn alloc() -> Result<*mut SwrContext, c_int> {
821 Err(-1)
822 }
823
824 pub unsafe fn alloc_set_opts2(
825 _out_ch_layout: *const AVChannelLayout,
826 _out_sample_fmt: AVSampleFormat,
827 _out_sample_rate: c_int,
828 _in_ch_layout: *const AVChannelLayout,
829 _in_sample_fmt: AVSampleFormat,
830 _in_sample_rate: c_int,
831 ) -> Result<*mut SwrContext, c_int> {
832 Err(-1)
833 }
834
835 pub unsafe fn init(_ctx: *mut SwrContext) -> Result<(), c_int> {
836 Err(-1)
837 }
838
839 pub unsafe fn is_initialized(_ctx: *const SwrContext) -> bool {
840 false
841 }
842
843 pub unsafe fn free(_ctx: *mut *mut SwrContext) {}
844
845 pub unsafe fn convert(
846 _s: *mut SwrContext,
847 _out: *mut *mut u8,
848 _out_count: c_int,
849 _in_: *const *const u8,
850 _in_count: c_int,
851 ) -> Result<c_int, c_int> {
852 Err(-1)
853 }
854
855 pub unsafe fn get_delay(_ctx: *mut SwrContext, _base: i64) -> i64 {
856 0
857 }
858
859 pub fn estimate_output_samples(
860 _out_sample_rate: i32,
861 _in_sample_rate: i32,
862 _in_samples: i32,
863 ) -> i32 {
864 0
865 }
866
867 pub mod channel_layout {
868 use super::super::AVChannelLayout;
869
870 pub unsafe fn set_default(_ch_layout: *mut AVChannelLayout, _nb_channels: i32) {}
871 pub unsafe fn uninit(_ch_layout: *mut AVChannelLayout) {}
872 pub unsafe fn copy(
873 _dst: *mut AVChannelLayout,
874 _src: *const AVChannelLayout,
875 ) -> Result<(), i32> {
876 Err(-1)
877 }
878 pub unsafe fn is_equal(
879 _chl: *const AVChannelLayout,
880 _chl1: *const AVChannelLayout,
881 ) -> bool {
882 false
883 }
884 pub fn mono() -> AVChannelLayout {
885 AVChannelLayout::default()
886 }
887 pub fn stereo() -> AVChannelLayout {
888 AVChannelLayout::default()
889 }
890 pub fn with_channels(_nb_channels: i32) -> AVChannelLayout {
891 AVChannelLayout::default()
892 }
893 pub fn is_valid(ch_layout: &AVChannelLayout) -> bool {
894 ch_layout.nb_channels > 0
895 }
896 pub fn nb_channels(ch_layout: &AVChannelLayout) -> i32 {
897 ch_layout.nb_channels
898 }
899 pub fn is_native_order(_ch_layout: &AVChannelLayout) -> bool {
900 false
901 }
902 }
903
904 pub mod sample_format {
905 use super::super::{
906 AVSampleFormat, AVSampleFormat_AV_SAMPLE_FMT_NONE, AVSampleFormat_AV_SAMPLE_FMT_U8,
907 AVSampleFormat_AV_SAMPLE_FMT_S16, AVSampleFormat_AV_SAMPLE_FMT_S32,
908 AVSampleFormat_AV_SAMPLE_FMT_FLT, AVSampleFormat_AV_SAMPLE_FMT_DBL,
909 AVSampleFormat_AV_SAMPLE_FMT_U8P, AVSampleFormat_AV_SAMPLE_FMT_S16P,
910 AVSampleFormat_AV_SAMPLE_FMT_S32P, AVSampleFormat_AV_SAMPLE_FMT_FLTP,
911 AVSampleFormat_AV_SAMPLE_FMT_DBLP, AVSampleFormat_AV_SAMPLE_FMT_S64,
912 AVSampleFormat_AV_SAMPLE_FMT_S64P,
913 };
914
915 pub const NONE: AVSampleFormat = AVSampleFormat_AV_SAMPLE_FMT_NONE;
916 pub const U8: AVSampleFormat = AVSampleFormat_AV_SAMPLE_FMT_U8;
917 pub const S16: AVSampleFormat = AVSampleFormat_AV_SAMPLE_FMT_S16;
918 pub const S32: AVSampleFormat = AVSampleFormat_AV_SAMPLE_FMT_S32;
919 pub const FLT: AVSampleFormat = AVSampleFormat_AV_SAMPLE_FMT_FLT;
920 pub const DBL: AVSampleFormat = AVSampleFormat_AV_SAMPLE_FMT_DBL;
921 pub const U8P: AVSampleFormat = AVSampleFormat_AV_SAMPLE_FMT_U8P;
922 pub const S16P: AVSampleFormat = AVSampleFormat_AV_SAMPLE_FMT_S16P;
923 pub const S32P: AVSampleFormat = AVSampleFormat_AV_SAMPLE_FMT_S32P;
924 pub const FLTP: AVSampleFormat = AVSampleFormat_AV_SAMPLE_FMT_FLTP;
925 pub const DBLP: AVSampleFormat = AVSampleFormat_AV_SAMPLE_FMT_DBLP;
926 pub const S64: AVSampleFormat = AVSampleFormat_AV_SAMPLE_FMT_S64;
927 pub const S64P: AVSampleFormat = AVSampleFormat_AV_SAMPLE_FMT_S64P;
928
929 pub fn bytes_per_sample(_sample_fmt: AVSampleFormat) -> i32 {
930 0
931 }
932 pub fn is_planar(_sample_fmt: AVSampleFormat) -> bool {
933 false
934 }
935 }
936}
937
938pub mod swscale {
940 use std::os::raw::c_int;
941
942 use super::{AVPixelFormat, SwsContext};
943
944 pub unsafe fn get_context(
945 _src_w: c_int,
946 _src_h: c_int,
947 _src_fmt: AVPixelFormat,
948 _dst_w: c_int,
949 _dst_h: c_int,
950 _dst_fmt: AVPixelFormat,
951 _flags: c_int,
952 ) -> Result<*mut SwsContext, c_int> {
953 Err(-1)
954 }
955
956 pub unsafe fn free_context(_ctx: *mut SwsContext) {}
957
958 pub unsafe fn scale(
959 _ctx: *mut SwsContext,
960 _src: *const *const u8,
961 _src_stride: *const c_int,
962 _src_slice_y: c_int,
963 _src_slice_h: c_int,
964 _dst: *const *mut u8,
965 _dst_stride: *const c_int,
966 ) -> Result<c_int, c_int> {
967 Err(-1)
968 }
969
970 pub unsafe fn is_supported_input(_pix_fmt: AVPixelFormat) -> bool {
971 false
972 }
973
974 pub unsafe fn is_supported_output(_pix_fmt: AVPixelFormat) -> bool {
975 false
976 }
977
978 pub unsafe fn is_supported_endianness_conversion(_pix_fmt: AVPixelFormat) -> bool {
979 false
980 }
981
982 pub mod scale_flags {
983 pub const FAST_BILINEAR: i32 = 1;
984 pub const BILINEAR: i32 = 2;
985 pub const BICUBIC: i32 = 4;
986 pub const X: i32 = 8;
987 pub const POINT: i32 = 16;
988 pub const AREA: i32 = 32;
989 pub const BICUBLIN: i32 = 64;
990 pub const GAUSS: i32 = 128;
991 pub const SINC: i32 = 256;
992 pub const LANCZOS: i32 = 512;
993 pub const SPLINE: i32 = 1024;
994 }
995}