diff --git a/Cargo.toml b/Cargo.toml index d1ae73f..0021717 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rusty_ffmpeg" -version = "0.15.0+ffmpeg.7.0" +version = "0.16.0+ffmpeg.7.0" authors = ["ldm0 "] edition = "2021" description = "A library that provides Rust bindings for FFmpeg" @@ -25,21 +25,18 @@ doctest = false libc = "0.2" [build-dependencies] -bindgen = "0.69" -camino = "1.0.9" +bindgen = "0.70" +camino = "1.1" once_cell = "1.12" vcpkg = { version = "0.2", optional = true } [target.'cfg(not(windows))'.build-dependencies] pkg-config = "0.3" -[target.'cfg(windows)'.build-dependencies] -vcpkg = "0.2" - [features] -# linking system ffmpeg as fallback. +# Probe and link FFmpeg with pkg-config link_system_ffmpeg = [] -# link against vcpkg ffmpeg +# Probe and link FFmpeg with vcpkg link_vcpkg_ffmpeg = ["vcpkg"] # FFmpeg 5.* support ffmpeg5 = [] diff --git a/build.rs b/build.rs index 488b000..dad36f0 100644 --- a/build.rs +++ b/build.rs @@ -404,7 +404,7 @@ fn static_linking(env_vars: &EnvVars) { output_binding_path: &Path, ) -> Result<(), pkg_config::Error> { // Probe libraries(enable emitting cargo metadata) - let include_paths = linking_with_pkg_config(&*LIBS)?; + let include_paths = pkg_config_linking::linking_with_pkg_config(&*LIBS)?; if let Some(ffmpeg_binding_path) = env_vars.ffmpeg_binding_path.as_ref() { use_prebuilt_binding(ffmpeg_binding_path, output_binding_path); } else if let Some(ffmpeg_include_dir) = env_vars.ffmpeg_include_dir.as_ref() { @@ -419,7 +419,6 @@ fn static_linking(env_vars: &EnvVars) { } Ok(()) } - use pkg_config_linking::*; // Hint: set PKG_CONFIG_PATH to some placeholder value will let pkg_config probing system library. if let Some(ffmpeg_pkg_config_path) = env_vars.ffmpeg_pkg_config_path.as_ref() { if !Path::new(ffmpeg_pkg_config_path).exists() { @@ -447,9 +446,9 @@ fn static_linking(env_vars: &EnvVars) { panic!( " !!!!!!! rusty_ffmpeg: No linking method set! -Use FFMPEG_PKG_CONFIG_PATH or FFMPEG_LIBS_DIR if you have prebuilt FFmpeg libraries. -Enable `link_system_ffmpeg` feature if you want to link ffmpeg libraries install in system path. -Enable `link_vcpkg_ffmpeg` feature if you want to link ffmpeg provided by vcpkg. +Use `FFMPEG_PKG_CONFIG_PATH` or `FFMPEG_LIBS_DIR` if you have prebuilt FFmpeg libraries. +Enable `link_system_ffmpeg` feature if you want to link ffmpeg libraries installed in system path(which can be probed by pkg-config). +Enable `link_vcpkg_ffmpeg` feature if you want to link ffmpeg libraries installed by vcpkg. " ); #[cfg(any(feature = "link_system_ffmpeg", feature = "link_vcpkg_ffmpeg"))] diff --git a/src/binding.rs b/src/binding.rs index 679ed7a..bc85606 100644 --- a/src/binding.rs +++ b/src/binding.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.70.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -689,8 +689,8 @@ pub const AVERROR_EXPERIMENTAL: i32 = -733130664; pub const AVERROR_INPUT_CHANGED: i32 = -1668179713; pub const AVERROR_OUTPUT_CHANGED: i32 = -1668179714; pub const AV_ERROR_MAX_STRING_SIZE: u32 = 64; -pub const LIBAVUTIL_VERSION_MAJOR: u32 = 58; -pub const LIBAVUTIL_VERSION_MINOR: u32 = 29; +pub const LIBAVUTIL_VERSION_MAJOR: u32 = 59; +pub const LIBAVUTIL_VERSION_MINOR: u32 = 8; pub const LIBAVUTIL_VERSION_MICRO: u32 = 100; pub const M_Ef: f64 = 2.718281828459045; pub const M_LN2f: f64 = 0.6931471805599453; @@ -721,9 +721,11 @@ pub const AV_LOG_SKIP_REPEATED: u32 = 1; pub const AV_LOG_PRINT_LEVEL: u32 = 2; pub const AVPALETTE_SIZE: u32 = 1024; pub const AVPALETTE_COUNT: u32 = 256; +pub const AV_VIDEO_MAX_PLANES: u32 = 4; pub const AV_FOURCC_MAX_STRING_SIZE: u32 = 32; pub const AV_BUFFER_FLAG_READONLY: u32 = 1; -pub const AV_CH_LAYOUT_NATIVE: i64 = -9223372036854775808; +pub const AV_CHANNEL_LAYOUT_RETYPE_FLAG_LOSSLESS: u32 = 1; +pub const AV_CHANNEL_LAYOUT_RETYPE_FLAG_CANONICAL: u32 = 2; pub const AV_DICT_MATCH_CASE: u32 = 1; pub const AV_DICT_IGNORE_SUFFIX: u32 = 2; pub const AV_DICT_DONT_STRDUP_KEY: u32 = 4; @@ -741,7 +743,8 @@ pub const FF_DECODE_ERROR_INVALID_BITSTREAM: u32 = 1; pub const FF_DECODE_ERROR_MISSING_REFERENCE: u32 = 2; pub const FF_DECODE_ERROR_CONCEALMENT_ACTIVE: u32 = 4; pub const FF_DECODE_ERROR_DECODE_SLICES: u32 = 8; -pub const LIBAVCODEC_VERSION_MAJOR: u32 = 60; +pub const AV_FRAME_SIDE_DATA_FLAG_UNIQUE: u32 = 1; +pub const LIBAVCODEC_VERSION_MAJOR: u32 = 61; pub const AV_CODEC_CAP_DRAW_HORIZ_BAND: u32 = 1; pub const AV_CODEC_CAP_DR1: u32 = 2; pub const AV_CODEC_CAP_DELAY: u32 = 32; @@ -888,8 +891,8 @@ pub const AV_PKT_FLAG_CORRUPT: u32 = 2; pub const AV_PKT_FLAG_DISCARD: u32 = 4; pub const AV_PKT_FLAG_TRUSTED: u32 = 8; pub const AV_PKT_FLAG_DISPOSABLE: u32 = 16; -pub const LIBAVCODEC_VERSION_MINOR: u32 = 31; -pub const LIBAVCODEC_VERSION_MICRO: u32 = 102; +pub const LIBAVCODEC_VERSION_MINOR: u32 = 3; +pub const LIBAVCODEC_VERSION_MICRO: u32 = 100; pub const AV_CODEC_PROP_INTRA_ONLY: u32 = 1; pub const AV_CODEC_PROP_LOSSY: u32 = 2; pub const AV_CODEC_PROP_LOSSLESS: u32 = 4; @@ -935,7 +938,9 @@ pub const AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS: u32 = 4; pub const AV_CODEC_EXPORT_DATA_FILM_GRAIN: u32 = 8; pub const AV_GET_BUFFER_FLAG_REF: u32 = 1; pub const AV_GET_ENCODE_BUFFER_FLAG_REF: u32 = 1; -pub const FF_COMPRESSION_DEFAULT: i32 = -1; +pub const SLICE_FLAG_CODED_ORDER: u32 = 1; +pub const SLICE_FLAG_ALLOW_FIELD: u32 = 2; +pub const SLICE_FLAG_ALLOW_PLANE: u32 = 4; pub const FF_CMP_SAD: u32 = 0; pub const FF_CMP_SSE: u32 = 1; pub const FF_CMP_SATD: u32 = 2; @@ -953,12 +958,10 @@ pub const FF_CMP_DCTMAX: u32 = 13; pub const FF_CMP_DCT264: u32 = 14; pub const FF_CMP_MEDIAN_SAD: u32 = 15; pub const FF_CMP_CHROMA: u32 = 256; -pub const SLICE_FLAG_CODED_ORDER: u32 = 1; -pub const SLICE_FLAG_ALLOW_FIELD: u32 = 2; -pub const SLICE_FLAG_ALLOW_PLANE: u32 = 4; pub const FF_MB_DECISION_SIMPLE: u32 = 0; pub const FF_MB_DECISION_BITS: u32 = 1; pub const FF_MB_DECISION_RD: u32 = 2; +pub const FF_COMPRESSION_DEFAULT: i32 = -1; pub const FF_BUG_AUTODETECT: u32 = 1; pub const FF_BUG_XVID_ILACE: u32 = 4; pub const FF_BUG_UMP4: u32 = 8; @@ -1010,7 +1013,6 @@ pub const FF_IDCT_SIMPLEARMV5TE: u32 = 16; pub const FF_IDCT_SIMPLEARMV6: u32 = 17; pub const FF_IDCT_FAAN: u32 = 20; pub const FF_IDCT_SIMPLENEON: u32 = 22; -pub const FF_IDCT_NONE: u32 = 24; pub const FF_IDCT_SIMPLEAUTO: u32 = 128; pub const FF_THREAD_FRAME: u32 = 1; pub const FF_THREAD_SLICE: u32 = 2; @@ -1123,13 +1125,13 @@ pub const FF_PROFILE_KLVA_ASYNC: u32 = 1; pub const FF_PROFILE_EVC_BASELINE: u32 = 0; pub const FF_PROFILE_EVC_MAIN: u32 = 1; pub const FF_LEVEL_UNKNOWN: i32 = -99; +pub const FF_CODEC_PROPERTY_LOSSLESS: u32 = 1; +pub const FF_CODEC_PROPERTY_CLOSED_CAPTIONS: u32 = 2; +pub const FF_CODEC_PROPERTY_FILM_GRAIN: u32 = 4; pub const FF_SUB_CHARENC_MODE_DO_NOTHING: i32 = -1; pub const FF_SUB_CHARENC_MODE_AUTOMATIC: u32 = 0; pub const FF_SUB_CHARENC_MODE_PRE_DECODER: u32 = 1; pub const FF_SUB_CHARENC_MODE_IGNORE: u32 = 2; -pub const FF_CODEC_PROPERTY_LOSSLESS: u32 = 1; -pub const FF_CODEC_PROPERTY_CLOSED_CAPTIONS: u32 = 2; -pub const FF_CODEC_PROPERTY_FILM_GRAIN: u32 = 4; pub const AV_HWACCEL_CODEC_CAP_EXPERIMENTAL: u32 = 512; pub const AV_HWACCEL_FLAG_IGNORE_LEVEL: u32 = 1; pub const AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH: u32 = 2; @@ -1164,10 +1166,10 @@ pub const DV_PROFILE_BYTES: u32 = 480; pub const VORBIS_FLAG_HEADER: u32 = 1; pub const VORBIS_FLAG_COMMENT: u32 = 2; pub const VORBIS_FLAG_SETUP: u32 = 4; -pub const LIBAVDEVICE_VERSION_MAJOR: u32 = 60; -pub const LIBAVDEVICE_VERSION_MINOR: u32 = 3; +pub const LIBAVDEVICE_VERSION_MAJOR: u32 = 61; +pub const LIBAVDEVICE_VERSION_MINOR: u32 = 1; pub const LIBAVDEVICE_VERSION_MICRO: u32 = 100; -pub const LIBAVFORMAT_VERSION_MAJOR: u32 = 60; +pub const LIBAVFORMAT_VERSION_MAJOR: u32 = 61; pub const FF_API_R_FRAME_RATE: u32 = 1; pub const AVIO_SEEKABLE_NORMAL: u32 = 1; pub const AVIO_SEEKABLE_TIME: u32 = 2; @@ -1178,7 +1180,7 @@ pub const AVIO_FLAG_WRITE: u32 = 2; pub const AVIO_FLAG_READ_WRITE: u32 = 3; pub const AVIO_FLAG_NONBLOCK: u32 = 8; pub const AVIO_FLAG_DIRECT: u32 = 32768; -pub const LIBAVFORMAT_VERSION_MINOR: u32 = 16; +pub const LIBAVFORMAT_VERSION_MINOR: u32 = 1; pub const LIBAVFORMAT_VERSION_MICRO: u32 = 100; pub const AVPROBE_SCORE_EXTENSION: u32 = 50; pub const AVPROBE_SCORE_MIME: u32 = 75; @@ -1258,8 +1260,8 @@ pub const AVSEEK_FLAG_FRAME: u32 = 8; pub const AVSTREAM_INIT_IN_WRITE_HEADER: u32 = 0; pub const AVSTREAM_INIT_IN_INIT_OUTPUT: u32 = 1; pub const AV_FRAME_FILENAME_FLAGS_MULTIPLE: u32 = 1; -pub const LIBAVFILTER_VERSION_MAJOR: u32 = 9; -pub const LIBAVFILTER_VERSION_MINOR: u32 = 12; +pub const LIBAVFILTER_VERSION_MAJOR: u32 = 10; +pub const LIBAVFILTER_VERSION_MINOR: u32 = 1; pub const LIBAVFILTER_VERSION_MICRO: u32 = 100; pub const AVFILTER_FLAG_DYNAMIC_INPUTS: u32 = 1; pub const AVFILTER_FLAG_DYNAMIC_OUTPUTS: u32 = 2; @@ -1347,7 +1349,7 @@ pub const AV_CPU_FLAG_RVB_ADDR: u32 = 256; pub const AV_DETECTION_BBOX_LABEL_NAME_MAX_SIZE: u32 = 64; pub const AV_NUM_DETECTION_BBOX_CLASSIFY: u32 = 4; pub const AV_DOVI_MAX_PIECES: u32 = 8; -pub const FFMPEG_VERSION: &[u8; 8] = b"5e45c27\0"; +pub const FFMPEG_VERSION: &[u8; 8] = b"7e69129\0"; pub const AV_FIFO_FLAG_AUTO_GROW: u32 = 1; pub const AV_HASH_MAX_SIZE: u32 = 64; pub const AV_HDR_PLUS_MAX_PAYLOAD_SIZE: u32 = 907; @@ -1360,6 +1362,7 @@ pub const AV_PIX_FMT_FLAG_RGB: u32 = 32; pub const AV_PIX_FMT_FLAG_ALPHA: u32 = 128; pub const AV_PIX_FMT_FLAG_BAYER: u32 = 256; pub const AV_PIX_FMT_FLAG_FLOAT: u32 = 512; +pub const AV_PIX_FMT_FLAG_XYZ: u32 = 1024; pub const FF_LOSS_RESOLUTION: u32 = 1; pub const FF_LOSS_DEPTH: u32 = 2; pub const FF_LOSS_COLORSPACE: u32 = 4; @@ -1397,12 +1400,12 @@ pub const AV_TS_MAX_STRING_SIZE: u32 = 32; pub const AV_PRI_UUID : & [u8 ; 101] = b"%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx\0" ; pub const AV_PRI_URN_UUID : & [u8 ; 110] = b"urn:uuid:%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx\0" ; pub const AV_UUID_LEN: u32 = 16; -pub const LIBSWRESAMPLE_VERSION_MAJOR: u32 = 4; -pub const LIBSWRESAMPLE_VERSION_MINOR: u32 = 12; +pub const LIBSWRESAMPLE_VERSION_MAJOR: u32 = 5; +pub const LIBSWRESAMPLE_VERSION_MINOR: u32 = 1; pub const LIBSWRESAMPLE_VERSION_MICRO: u32 = 100; pub const SWR_FLAG_RESAMPLE: u32 = 1; -pub const LIBSWSCALE_VERSION_MAJOR: u32 = 7; -pub const LIBSWSCALE_VERSION_MINOR: u32 = 5; +pub const LIBSWSCALE_VERSION_MAJOR: u32 = 8; +pub const LIBSWSCALE_VERSION_MINOR: u32 = 1; pub const LIBSWSCALE_VERSION_MICRO: u32 = 100; pub const SWS_FAST_BILINEAR: u32 = 1; pub const SWS_BILINEAR: u32 = 2; @@ -1443,41 +1446,15 @@ pub struct max_align_t { pub __bindgen_padding_0: u64, pub __clang_max_align_nonce2: u128, } -#[test] -fn bindgen_test_layout_max_align_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(max_align_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 16usize, - concat!("Alignment of ", stringify!(max_align_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce1) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce2) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of max_align_t"][::std::mem::size_of::() - 32usize]; + ["Alignment of max_align_t"][::std::mem::align_of::() - 16usize]; + ["Offset of field: max_align_t::__clang_max_align_nonce1"] + [::std::mem::offset_of!(max_align_t, __clang_max_align_nonce1) - 0usize]; + ["Offset of field: max_align_t::__clang_max_align_nonce2"] + [::std::mem::offset_of!(max_align_t, __clang_max_align_nonce2) - 16usize]; +}; pub type __u_char = ::std::os::raw::c_uchar; pub type __u_short = ::std::os::raw::c_ushort; pub type __u_int = ::std::os::raw::c_uint; @@ -1517,31 +1494,12 @@ pub type __pid_t = ::std::os::raw::c_int; pub struct __fsid_t { pub __val: [::std::os::raw::c_int; 2usize], } -#[test] -fn bindgen_test_layout___fsid_t() { - const UNINIT: ::std::mem::MaybeUninit<__fsid_t> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__fsid_t>(), - 8usize, - concat!("Size of: ", stringify!(__fsid_t)) - ); - assert_eq!( - ::std::mem::align_of::<__fsid_t>(), - 4usize, - concat!("Alignment of ", stringify!(__fsid_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__fsid_t), - "::", - stringify!(__val) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __fsid_t"][::std::mem::size_of::<__fsid_t>() - 8usize]; + ["Alignment of __fsid_t"][::std::mem::align_of::<__fsid_t>() - 4usize]; + ["Offset of field: __fsid_t::__val"][::std::mem::offset_of!(__fsid_t, __val) - 0usize]; +}; pub type __clock_t = ::std::os::raw::c_long; pub type __rlim_t = ::std::os::raw::c_ulong; pub type __rlim64_t = ::std::os::raw::c_ulong; @@ -1803,41 +1761,13 @@ pub struct imaxdiv_t { pub quot: ::std::os::raw::c_long, pub rem: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_imaxdiv_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(imaxdiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(imaxdiv_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of imaxdiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of imaxdiv_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: imaxdiv_t::quot"][::std::mem::offset_of!(imaxdiv_t, quot) - 0usize]; + ["Offset of field: imaxdiv_t::rem"][::std::mem::offset_of!(imaxdiv_t, rem) - 8usize]; +}; extern "C" { pub fn imaxabs(__n: intmax_t) -> intmax_t; } @@ -3215,82 +3145,31 @@ pub union __mbstate_t__bindgen_ty_1 { pub __wch: ::std::os::raw::c_uint, pub __wchb: [::std::os::raw::c_char; 4usize], } -#[test] -fn bindgen_test_layout___mbstate_t__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__mbstate_t__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__mbstate_t__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(__mbstate_t__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<__mbstate_t__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(__mbstate_t__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__wch) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t__bindgen_ty_1), - "::", - stringify!(__wch) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__wchb) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t__bindgen_ty_1), - "::", - stringify!(__wchb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __mbstate_t__bindgen_ty_1"] + [::std::mem::size_of::<__mbstate_t__bindgen_ty_1>() - 4usize]; + ["Alignment of __mbstate_t__bindgen_ty_1"] + [::std::mem::align_of::<__mbstate_t__bindgen_ty_1>() - 4usize]; + ["Offset of field: __mbstate_t__bindgen_ty_1::__wch"] + [::std::mem::offset_of!(__mbstate_t__bindgen_ty_1, __wch) - 0usize]; + ["Offset of field: __mbstate_t__bindgen_ty_1::__wchb"] + [::std::mem::offset_of!(__mbstate_t__bindgen_ty_1, __wchb) - 0usize]; +}; impl ::std::fmt::Debug for __mbstate_t__bindgen_ty_1 { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "__mbstate_t__bindgen_ty_1 {{ union }}") } } -#[test] -fn bindgen_test_layout___mbstate_t() { - const UNINIT: ::std::mem::MaybeUninit<__mbstate_t> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__mbstate_t>(), - 8usize, - concat!("Size of: ", stringify!(__mbstate_t)) - ); - assert_eq!( - ::std::mem::align_of::<__mbstate_t>(), - 4usize, - concat!("Alignment of ", stringify!(__mbstate_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__count) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t), - "::", - stringify!(__count) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__value) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t), - "::", - stringify!(__value) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __mbstate_t"][::std::mem::size_of::<__mbstate_t>() - 8usize]; + ["Alignment of __mbstate_t"][::std::mem::align_of::<__mbstate_t>() - 4usize]; + ["Offset of field: __mbstate_t::__count"] + [::std::mem::offset_of!(__mbstate_t, __count) - 0usize]; + ["Offset of field: __mbstate_t::__value"] + [::std::mem::offset_of!(__mbstate_t, __value) - 4usize]; +}; impl ::std::fmt::Debug for __mbstate_t { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!( @@ -3306,41 +3185,13 @@ pub struct _G_fpos_t { pub __pos: __off_t, pub __state: __mbstate_t, } -#[test] -fn bindgen_test_layout__G_fpos_t() { - const UNINIT: ::std::mem::MaybeUninit<_G_fpos_t> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_G_fpos_t>(), - 16usize, - concat!("Size of: ", stringify!(_G_fpos_t)) - ); - assert_eq!( - ::std::mem::align_of::<_G_fpos_t>(), - 8usize, - concat!("Alignment of ", stringify!(_G_fpos_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pos) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_G_fpos_t), - "::", - stringify!(__pos) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__state) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_G_fpos_t), - "::", - stringify!(__state) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _G_fpos_t"][::std::mem::size_of::<_G_fpos_t>() - 16usize]; + ["Alignment of _G_fpos_t"][::std::mem::align_of::<_G_fpos_t>() - 8usize]; + ["Offset of field: _G_fpos_t::__pos"][::std::mem::offset_of!(_G_fpos_t, __pos) - 0usize]; + ["Offset of field: _G_fpos_t::__state"][::std::mem::offset_of!(_G_fpos_t, __state) - 8usize]; +}; impl ::std::fmt::Debug for _G_fpos_t { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!( @@ -3357,41 +3208,14 @@ pub struct _G_fpos64_t { pub __pos: __off64_t, pub __state: __mbstate_t, } -#[test] -fn bindgen_test_layout__G_fpos64_t() { - const UNINIT: ::std::mem::MaybeUninit<_G_fpos64_t> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_G_fpos64_t>(), - 16usize, - concat!("Size of: ", stringify!(_G_fpos64_t)) - ); - assert_eq!( - ::std::mem::align_of::<_G_fpos64_t>(), - 8usize, - concat!("Alignment of ", stringify!(_G_fpos64_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pos) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_G_fpos64_t), - "::", - stringify!(__pos) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__state) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_G_fpos64_t), - "::", - stringify!(__state) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _G_fpos64_t"][::std::mem::size_of::<_G_fpos64_t>() - 16usize]; + ["Alignment of _G_fpos64_t"][::std::mem::align_of::<_G_fpos64_t>() - 8usize]; + ["Offset of field: _G_fpos64_t::__pos"][::std::mem::offset_of!(_G_fpos64_t, __pos) - 0usize]; + ["Offset of field: _G_fpos64_t::__state"] + [::std::mem::offset_of!(_G_fpos64_t, __state) - 8usize]; +}; impl ::std::fmt::Debug for _G_fpos64_t { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!( @@ -3453,311 +3277,58 @@ pub struct _IO_FILE { pub _mode: ::std::os::raw::c_int, pub _unused2: [::std::os::raw::c_char; 20usize], } -#[test] -fn bindgen_test_layout__IO_FILE() { - const UNINIT: ::std::mem::MaybeUninit<_IO_FILE> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_IO_FILE>(), - 216usize, - concat!("Size of: ", stringify!(_IO_FILE)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_FILE>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_FILE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_ptr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_end) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_base) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_base) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_ptr) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_end) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_base) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_end) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_base) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_backup_base) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_backup_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_end) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._markers) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_markers) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._chain) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_chain) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._fileno) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_fileno) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._flags2) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._old_offset) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_old_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._cur_column) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_cur_column) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._vtable_offset) as usize - ptr as usize }, - 130usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_vtable_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._shortbuf) as usize - ptr as usize }, - 131usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_shortbuf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._lock) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_lock) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._offset) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._codecvt) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_codecvt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._wide_data) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_wide_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._freeres_list) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_freeres_list) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._freeres_buf) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_freeres_buf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pad5) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad5) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._mode) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr)._unused2) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_unused2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _IO_FILE"][::std::mem::size_of::<_IO_FILE>() - 216usize]; + ["Alignment of _IO_FILE"][::std::mem::align_of::<_IO_FILE>() - 8usize]; + ["Offset of field: _IO_FILE::_flags"][::std::mem::offset_of!(_IO_FILE, _flags) - 0usize]; + ["Offset of field: _IO_FILE::_IO_read_ptr"] + [::std::mem::offset_of!(_IO_FILE, _IO_read_ptr) - 8usize]; + ["Offset of field: _IO_FILE::_IO_read_end"] + [::std::mem::offset_of!(_IO_FILE, _IO_read_end) - 16usize]; + ["Offset of field: _IO_FILE::_IO_read_base"] + [::std::mem::offset_of!(_IO_FILE, _IO_read_base) - 24usize]; + ["Offset of field: _IO_FILE::_IO_write_base"] + [::std::mem::offset_of!(_IO_FILE, _IO_write_base) - 32usize]; + ["Offset of field: _IO_FILE::_IO_write_ptr"] + [::std::mem::offset_of!(_IO_FILE, _IO_write_ptr) - 40usize]; + ["Offset of field: _IO_FILE::_IO_write_end"] + [::std::mem::offset_of!(_IO_FILE, _IO_write_end) - 48usize]; + ["Offset of field: _IO_FILE::_IO_buf_base"] + [::std::mem::offset_of!(_IO_FILE, _IO_buf_base) - 56usize]; + ["Offset of field: _IO_FILE::_IO_buf_end"] + [::std::mem::offset_of!(_IO_FILE, _IO_buf_end) - 64usize]; + ["Offset of field: _IO_FILE::_IO_save_base"] + [::std::mem::offset_of!(_IO_FILE, _IO_save_base) - 72usize]; + ["Offset of field: _IO_FILE::_IO_backup_base"] + [::std::mem::offset_of!(_IO_FILE, _IO_backup_base) - 80usize]; + ["Offset of field: _IO_FILE::_IO_save_end"] + [::std::mem::offset_of!(_IO_FILE, _IO_save_end) - 88usize]; + ["Offset of field: _IO_FILE::_markers"][::std::mem::offset_of!(_IO_FILE, _markers) - 96usize]; + ["Offset of field: _IO_FILE::_chain"][::std::mem::offset_of!(_IO_FILE, _chain) - 104usize]; + ["Offset of field: _IO_FILE::_fileno"][::std::mem::offset_of!(_IO_FILE, _fileno) - 112usize]; + ["Offset of field: _IO_FILE::_flags2"][::std::mem::offset_of!(_IO_FILE, _flags2) - 116usize]; + ["Offset of field: _IO_FILE::_old_offset"] + [::std::mem::offset_of!(_IO_FILE, _old_offset) - 120usize]; + ["Offset of field: _IO_FILE::_cur_column"] + [::std::mem::offset_of!(_IO_FILE, _cur_column) - 128usize]; + ["Offset of field: _IO_FILE::_vtable_offset"] + [::std::mem::offset_of!(_IO_FILE, _vtable_offset) - 130usize]; + ["Offset of field: _IO_FILE::_shortbuf"] + [::std::mem::offset_of!(_IO_FILE, _shortbuf) - 131usize]; + ["Offset of field: _IO_FILE::_lock"][::std::mem::offset_of!(_IO_FILE, _lock) - 136usize]; + ["Offset of field: _IO_FILE::_offset"][::std::mem::offset_of!(_IO_FILE, _offset) - 144usize]; + ["Offset of field: _IO_FILE::_codecvt"][::std::mem::offset_of!(_IO_FILE, _codecvt) - 152usize]; + ["Offset of field: _IO_FILE::_wide_data"] + [::std::mem::offset_of!(_IO_FILE, _wide_data) - 160usize]; + ["Offset of field: _IO_FILE::_freeres_list"] + [::std::mem::offset_of!(_IO_FILE, _freeres_list) - 168usize]; + ["Offset of field: _IO_FILE::_freeres_buf"] + [::std::mem::offset_of!(_IO_FILE, _freeres_buf) - 176usize]; + ["Offset of field: _IO_FILE::__pad5"][::std::mem::offset_of!(_IO_FILE, __pad5) - 184usize]; + ["Offset of field: _IO_FILE::_mode"][::std::mem::offset_of!(_IO_FILE, _mode) - 192usize]; + ["Offset of field: _IO_FILE::_unused2"][::std::mem::offset_of!(_IO_FILE, _unused2) - 196usize]; +}; pub type off_t = __off_t; pub type fpos_t = __fpos_t; extern "C" { @@ -4207,123 +3778,39 @@ pub struct div_t { pub quot: ::std::os::raw::c_int, pub rem: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_div_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(div_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(div_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of div_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of div_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: div_t::quot"][::std::mem::offset_of!(div_t, quot) - 0usize]; + ["Offset of field: div_t::rem"][::std::mem::offset_of!(div_t, rem) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ldiv_t { pub quot: ::std::os::raw::c_long, pub rem: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_ldiv_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ldiv_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ldiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of ldiv_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ldiv_t::quot"][::std::mem::offset_of!(ldiv_t, quot) - 0usize]; + ["Offset of field: ldiv_t::rem"][::std::mem::offset_of!(ldiv_t, rem) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct lldiv_t { pub quot: ::std::os::raw::c_longlong, pub rem: ::std::os::raw::c_longlong, } -#[test] -fn bindgen_test_layout_lldiv_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(lldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(lldiv_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of lldiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of lldiv_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: lldiv_t::quot"][::std::mem::offset_of!(lldiv_t, quot) - 0usize]; + ["Offset of field: lldiv_t::rem"][::std::mem::offset_of!(lldiv_t, rem) - 8usize]; +}; extern "C" { pub fn __ctype_get_mb_cur_max() -> usize; } @@ -4441,31 +3928,12 @@ pub type register_t = ::std::os::raw::c_long; pub struct __sigset_t { pub __val: [::std::os::raw::c_ulong; 16usize], } -#[test] -fn bindgen_test_layout___sigset_t() { - const UNINIT: ::std::mem::MaybeUninit<__sigset_t> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__sigset_t>(), - 128usize, - concat!("Size of: ", stringify!(__sigset_t)) - ); - assert_eq!( - ::std::mem::align_of::<__sigset_t>(), - 8usize, - concat!("Alignment of ", stringify!(__sigset_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sigset_t), - "::", - stringify!(__val) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sigset_t"][::std::mem::size_of::<__sigset_t>() - 128usize]; + ["Alignment of __sigset_t"][::std::mem::align_of::<__sigset_t>() - 8usize]; + ["Offset of field: __sigset_t::__val"][::std::mem::offset_of!(__sigset_t, __val) - 0usize]; +}; pub type sigset_t = __sigset_t; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -4473,82 +3941,26 @@ pub struct timeval { pub tv_sec: __time_t, pub tv_usec: __suseconds_t, } -#[test] -fn bindgen_test_layout_timeval() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timeval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timeval)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timeval"][::std::mem::size_of::() - 16usize]; + ["Alignment of timeval"][::std::mem::align_of::() - 8usize]; + ["Offset of field: timeval::tv_sec"][::std::mem::offset_of!(timeval, tv_sec) - 0usize]; + ["Offset of field: timeval::tv_usec"][::std::mem::offset_of!(timeval, tv_usec) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct timespec { pub tv_sec: __time_t, pub tv_nsec: __syscall_slong_t, } -#[test] -fn bindgen_test_layout_timespec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timespec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timespec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timespec"][::std::mem::size_of::() - 16usize]; + ["Alignment of timespec"][::std::mem::align_of::() - 8usize]; + ["Offset of field: timespec::tv_sec"][::std::mem::offset_of!(timespec, tv_sec) - 0usize]; + ["Offset of field: timespec::tv_nsec"][::std::mem::offset_of!(timespec, tv_nsec) - 8usize]; +}; pub type suseconds_t = __suseconds_t; pub type __fd_mask = ::std::os::raw::c_long; #[repr(C)] @@ -4556,31 +3968,12 @@ pub type __fd_mask = ::std::os::raw::c_long; pub struct fd_set { pub __fds_bits: [__fd_mask; 16usize], } -#[test] -fn bindgen_test_layout_fd_set() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(fd_set)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(fd_set)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__fds_bits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(__fds_bits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of fd_set"][::std::mem::size_of::() - 128usize]; + ["Alignment of fd_set"][::std::mem::align_of::() - 8usize]; + ["Offset of field: fd_set::__fds_bits"][::std::mem::offset_of!(fd_set, __fds_bits) - 0usize]; +}; pub type fd_mask = __fd_mask; extern "C" { pub fn select( @@ -4617,81 +4010,27 @@ pub struct __atomic_wide_counter__bindgen_ty_1 { pub __low: ::std::os::raw::c_uint, pub __high: ::std::os::raw::c_uint, } -#[test] -fn bindgen_test_layout___atomic_wide_counter__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<__atomic_wide_counter__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__atomic_wide_counter__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(__atomic_wide_counter__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<__atomic_wide_counter__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__atomic_wide_counter__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__low) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__atomic_wide_counter__bindgen_ty_1), - "::", - stringify!(__low) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__high) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__atomic_wide_counter__bindgen_ty_1), - "::", - stringify!(__high) - ) - ); -} -#[test] -fn bindgen_test_layout___atomic_wide_counter() { - const UNINIT: ::std::mem::MaybeUninit<__atomic_wide_counter> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__atomic_wide_counter>(), - 8usize, - concat!("Size of: ", stringify!(__atomic_wide_counter)) - ); - assert_eq!( - ::std::mem::align_of::<__atomic_wide_counter>(), - 8usize, - concat!("Alignment of ", stringify!(__atomic_wide_counter)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__value64) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__atomic_wide_counter), - "::", - stringify!(__value64) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__value32) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__atomic_wide_counter), - "::", - stringify!(__value32) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __atomic_wide_counter__bindgen_ty_1"] + [::std::mem::size_of::<__atomic_wide_counter__bindgen_ty_1>() - 8usize]; + ["Alignment of __atomic_wide_counter__bindgen_ty_1"] + [::std::mem::align_of::<__atomic_wide_counter__bindgen_ty_1>() - 4usize]; + ["Offset of field: __atomic_wide_counter__bindgen_ty_1::__low"] + [::std::mem::offset_of!(__atomic_wide_counter__bindgen_ty_1, __low) - 0usize]; + ["Offset of field: __atomic_wide_counter__bindgen_ty_1::__high"] + [::std::mem::offset_of!(__atomic_wide_counter__bindgen_ty_1, __high) - 4usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __atomic_wide_counter"][::std::mem::size_of::<__atomic_wide_counter>() - 8usize]; + ["Alignment of __atomic_wide_counter"] + [::std::mem::align_of::<__atomic_wide_counter>() - 8usize]; + ["Offset of field: __atomic_wide_counter::__value64"] + [::std::mem::offset_of!(__atomic_wide_counter, __value64) - 0usize]; + ["Offset of field: __atomic_wide_counter::__value32"] + [::std::mem::offset_of!(__atomic_wide_counter, __value32) - 0usize]; +}; impl ::std::fmt::Debug for __atomic_wide_counter { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "__atomic_wide_counter {{ union }}") @@ -4703,74 +4042,31 @@ pub struct __pthread_internal_list { pub __prev: *mut __pthread_internal_list, pub __next: *mut __pthread_internal_list, } -#[test] -fn bindgen_test_layout___pthread_internal_list() { - const UNINIT: ::std::mem::MaybeUninit<__pthread_internal_list> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__pthread_internal_list>(), - 16usize, - concat!("Size of: ", stringify!(__pthread_internal_list)) - ); - assert_eq!( - ::std::mem::align_of::<__pthread_internal_list>(), - 8usize, - concat!("Alignment of ", stringify!(__pthread_internal_list)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__prev) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_list), - "::", - stringify!(__prev) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__next) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_list), - "::", - stringify!(__next) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __pthread_internal_list"][::std::mem::size_of::<__pthread_internal_list>() - 16usize]; + ["Alignment of __pthread_internal_list"] + [::std::mem::align_of::<__pthread_internal_list>() - 8usize]; + ["Offset of field: __pthread_internal_list::__prev"] + [::std::mem::offset_of!(__pthread_internal_list, __prev) - 0usize]; + ["Offset of field: __pthread_internal_list::__next"] + [::std::mem::offset_of!(__pthread_internal_list, __next) - 8usize]; +}; pub type __pthread_list_t = __pthread_internal_list; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __pthread_internal_slist { pub __next: *mut __pthread_internal_slist, } -#[test] -fn bindgen_test_layout___pthread_internal_slist() { - const UNINIT: ::std::mem::MaybeUninit<__pthread_internal_slist> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__pthread_internal_slist>(), - 8usize, - concat!("Size of: ", stringify!(__pthread_internal_slist)) - ); - assert_eq!( - ::std::mem::align_of::<__pthread_internal_slist>(), - 8usize, - concat!("Alignment of ", stringify!(__pthread_internal_slist)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__next) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_slist), - "::", - stringify!(__next) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __pthread_internal_slist"] + [::std::mem::size_of::<__pthread_internal_slist>() - 8usize]; + ["Alignment of __pthread_internal_slist"] + [::std::mem::align_of::<__pthread_internal_slist>() - 8usize]; + ["Offset of field: __pthread_internal_slist::__next"] + [::std::mem::offset_of!(__pthread_internal_slist, __next) - 0usize]; +}; pub type __pthread_slist_t = __pthread_internal_slist; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -4784,101 +4080,27 @@ pub struct __pthread_mutex_s { pub __elision: ::std::os::raw::c_short, pub __list: __pthread_list_t, } -#[test] -fn bindgen_test_layout___pthread_mutex_s() { - const UNINIT: ::std::mem::MaybeUninit<__pthread_mutex_s> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__pthread_mutex_s>(), - 40usize, - concat!("Size of: ", stringify!(__pthread_mutex_s)) - ); - assert_eq!( - ::std::mem::align_of::<__pthread_mutex_s>(), - 8usize, - concat!("Alignment of ", stringify!(__pthread_mutex_s)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__lock) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__lock) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__count) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__count) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__owner) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__owner) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__nusers) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__nusers) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__kind) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__kind) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__spins) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__spins) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__elision) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__elision) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__list) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__list) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __pthread_mutex_s"][::std::mem::size_of::<__pthread_mutex_s>() - 40usize]; + ["Alignment of __pthread_mutex_s"][::std::mem::align_of::<__pthread_mutex_s>() - 8usize]; + ["Offset of field: __pthread_mutex_s::__lock"] + [::std::mem::offset_of!(__pthread_mutex_s, __lock) - 0usize]; + ["Offset of field: __pthread_mutex_s::__count"] + [::std::mem::offset_of!(__pthread_mutex_s, __count) - 4usize]; + ["Offset of field: __pthread_mutex_s::__owner"] + [::std::mem::offset_of!(__pthread_mutex_s, __owner) - 8usize]; + ["Offset of field: __pthread_mutex_s::__nusers"] + [::std::mem::offset_of!(__pthread_mutex_s, __nusers) - 12usize]; + ["Offset of field: __pthread_mutex_s::__kind"] + [::std::mem::offset_of!(__pthread_mutex_s, __kind) - 16usize]; + ["Offset of field: __pthread_mutex_s::__spins"] + [::std::mem::offset_of!(__pthread_mutex_s, __spins) - 20usize]; + ["Offset of field: __pthread_mutex_s::__elision"] + [::std::mem::offset_of!(__pthread_mutex_s, __elision) - 22usize]; + ["Offset of field: __pthread_mutex_s::__list"] + [::std::mem::offset_of!(__pthread_mutex_s, __list) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __pthread_rwlock_arch_t { @@ -4895,142 +4117,36 @@ pub struct __pthread_rwlock_arch_t { pub __pad2: ::std::os::raw::c_ulong, pub __flags: ::std::os::raw::c_uint, } -#[test] -fn bindgen_test_layout___pthread_rwlock_arch_t() { - const UNINIT: ::std::mem::MaybeUninit<__pthread_rwlock_arch_t> = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__pthread_rwlock_arch_t>(), - 56usize, - concat!("Size of: ", stringify!(__pthread_rwlock_arch_t)) - ); - assert_eq!( - ::std::mem::align_of::<__pthread_rwlock_arch_t>(), - 8usize, - concat!("Alignment of ", stringify!(__pthread_rwlock_arch_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__readers) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__readers) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__writers) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__writers) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__wrphase_futex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__wrphase_futex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__writers_futex) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__writers_futex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pad3) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad3) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pad4) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad4) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__cur_writer) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__cur_writer) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__shared) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__shared) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__rwelision) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__rwelision) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pad1) as usize - ptr as usize }, - 33usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__pad2) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__flags) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __pthread_rwlock_arch_t"][::std::mem::size_of::<__pthread_rwlock_arch_t>() - 56usize]; + ["Alignment of __pthread_rwlock_arch_t"] + [::std::mem::align_of::<__pthread_rwlock_arch_t>() - 8usize]; + ["Offset of field: __pthread_rwlock_arch_t::__readers"] + [::std::mem::offset_of!(__pthread_rwlock_arch_t, __readers) - 0usize]; + ["Offset of field: __pthread_rwlock_arch_t::__writers"] + [::std::mem::offset_of!(__pthread_rwlock_arch_t, __writers) - 4usize]; + ["Offset of field: __pthread_rwlock_arch_t::__wrphase_futex"] + [::std::mem::offset_of!(__pthread_rwlock_arch_t, __wrphase_futex) - 8usize]; + ["Offset of field: __pthread_rwlock_arch_t::__writers_futex"] + [::std::mem::offset_of!(__pthread_rwlock_arch_t, __writers_futex) - 12usize]; + ["Offset of field: __pthread_rwlock_arch_t::__pad3"] + [::std::mem::offset_of!(__pthread_rwlock_arch_t, __pad3) - 16usize]; + ["Offset of field: __pthread_rwlock_arch_t::__pad4"] + [::std::mem::offset_of!(__pthread_rwlock_arch_t, __pad4) - 20usize]; + ["Offset of field: __pthread_rwlock_arch_t::__cur_writer"] + [::std::mem::offset_of!(__pthread_rwlock_arch_t, __cur_writer) - 24usize]; + ["Offset of field: __pthread_rwlock_arch_t::__shared"] + [::std::mem::offset_of!(__pthread_rwlock_arch_t, __shared) - 28usize]; + ["Offset of field: __pthread_rwlock_arch_t::__rwelision"] + [::std::mem::offset_of!(__pthread_rwlock_arch_t, __rwelision) - 32usize]; + ["Offset of field: __pthread_rwlock_arch_t::__pad1"] + [::std::mem::offset_of!(__pthread_rwlock_arch_t, __pad1) - 33usize]; + ["Offset of field: __pthread_rwlock_arch_t::__pad2"] + [::std::mem::offset_of!(__pthread_rwlock_arch_t, __pad2) - 40usize]; + ["Offset of field: __pthread_rwlock_arch_t::__flags"] + [::std::mem::offset_of!(__pthread_rwlock_arch_t, __flags) - 48usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct __pthread_cond_s { @@ -5042,91 +4158,25 @@ pub struct __pthread_cond_s { pub __wrefs: ::std::os::raw::c_uint, pub __g_signals: [::std::os::raw::c_uint; 2usize], } -#[test] -fn bindgen_test_layout___pthread_cond_s() { - const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__pthread_cond_s>(), - 48usize, - concat!("Size of: ", stringify!(__pthread_cond_s)) - ); - assert_eq!( - ::std::mem::align_of::<__pthread_cond_s>(), - 8usize, - concat!("Alignment of ", stringify!(__pthread_cond_s)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__wseq) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__wseq) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__g1_start) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g1_start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__g_refs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g_refs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__g_size) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__g1_orig_size) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g1_orig_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__wrefs) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__wrefs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__g_signals) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g_signals) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __pthread_cond_s"][::std::mem::size_of::<__pthread_cond_s>() - 48usize]; + ["Alignment of __pthread_cond_s"][::std::mem::align_of::<__pthread_cond_s>() - 8usize]; + ["Offset of field: __pthread_cond_s::__wseq"] + [::std::mem::offset_of!(__pthread_cond_s, __wseq) - 0usize]; + ["Offset of field: __pthread_cond_s::__g1_start"] + [::std::mem::offset_of!(__pthread_cond_s, __g1_start) - 8usize]; + ["Offset of field: __pthread_cond_s::__g_refs"] + [::std::mem::offset_of!(__pthread_cond_s, __g_refs) - 16usize]; + ["Offset of field: __pthread_cond_s::__g_size"] + [::std::mem::offset_of!(__pthread_cond_s, __g_size) - 24usize]; + ["Offset of field: __pthread_cond_s::__g1_orig_size"] + [::std::mem::offset_of!(__pthread_cond_s, __g1_orig_size) - 32usize]; + ["Offset of field: __pthread_cond_s::__wrefs"] + [::std::mem::offset_of!(__pthread_cond_s, __wrefs) - 36usize]; + ["Offset of field: __pthread_cond_s::__g_signals"] + [::std::mem::offset_of!(__pthread_cond_s, __g_signals) - 40usize]; +}; impl ::std::fmt::Debug for __pthread_cond_s { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write ! (f , "__pthread_cond_s {{ __wseq: {:?}, __g1_start: {:?}, __g_refs: {:?}, __g_size: {:?}, __g1_orig_size: {:?}, __wrefs: {:?}, __g_signals: {:?} }}" , self . __wseq , self . __g1_start , self . __g_refs , self . __g_size , self . __g1_orig_size , self . __wrefs , self . __g_signals) @@ -5139,31 +4189,12 @@ pub type __thrd_t = ::std::os::raw::c_ulong; pub struct __once_flag { pub __data: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout___once_flag() { - const UNINIT: ::std::mem::MaybeUninit<__once_flag> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__once_flag>(), - 4usize, - concat!("Size of: ", stringify!(__once_flag)) - ); - assert_eq!( - ::std::mem::align_of::<__once_flag>(), - 4usize, - concat!("Alignment of ", stringify!(__once_flag)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__once_flag), - "::", - stringify!(__data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __once_flag"][::std::mem::size_of::<__once_flag>() - 4usize]; + ["Alignment of __once_flag"][::std::mem::align_of::<__once_flag>() - 4usize]; + ["Offset of field: __once_flag::__data"][::std::mem::offset_of!(__once_flag, __data) - 0usize]; +}; pub type pthread_t = ::std::os::raw::c_ulong; #[repr(C)] #[derive(Copy, Clone)] @@ -5171,41 +4202,15 @@ pub union pthread_mutexattr_t { pub __size: [::std::os::raw::c_char; 4usize], pub __align: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_pthread_mutexattr_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(pthread_mutexattr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_mutexattr_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutexattr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutexattr_t), - "::", - stringify!(__align) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_mutexattr_t"][::std::mem::size_of::() - 4usize]; + ["Alignment of pthread_mutexattr_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_mutexattr_t::__size"] + [::std::mem::offset_of!(pthread_mutexattr_t, __size) - 0usize]; + ["Offset of field: pthread_mutexattr_t::__align"] + [::std::mem::offset_of!(pthread_mutexattr_t, __align) - 0usize]; +}; impl ::std::fmt::Debug for pthread_mutexattr_t { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "pthread_mutexattr_t {{ union }}") @@ -5217,41 +4222,15 @@ pub union pthread_condattr_t { pub __size: [::std::os::raw::c_char; 4usize], pub __align: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_pthread_condattr_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(pthread_condattr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_condattr_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_condattr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_condattr_t), - "::", - stringify!(__align) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_condattr_t"][::std::mem::size_of::() - 4usize]; + ["Alignment of pthread_condattr_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_condattr_t::__size"] + [::std::mem::offset_of!(pthread_condattr_t, __size) - 0usize]; + ["Offset of field: pthread_condattr_t::__align"] + [::std::mem::offset_of!(pthread_condattr_t, __align) - 0usize]; +}; impl ::std::fmt::Debug for pthread_condattr_t { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "pthread_condattr_t {{ union }}") @@ -5265,41 +4244,15 @@ pub union pthread_attr_t { pub __size: [::std::os::raw::c_char; 56usize], pub __align: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_pthread_attr_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(pthread_attr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_attr_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(__align) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_attr_t"][::std::mem::size_of::() - 56usize]; + ["Alignment of pthread_attr_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_attr_t::__size"] + [::std::mem::offset_of!(pthread_attr_t, __size) - 0usize]; + ["Offset of field: pthread_attr_t::__align"] + [::std::mem::offset_of!(pthread_attr_t, __align) - 0usize]; +}; impl ::std::fmt::Debug for pthread_attr_t { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "pthread_attr_t {{ union }}") @@ -5312,51 +4265,17 @@ pub union pthread_mutex_t { pub __size: [::std::os::raw::c_char; 40usize], pub __align: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_pthread_mutex_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(pthread_mutex_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_mutex_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__align) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_mutex_t"][::std::mem::size_of::() - 40usize]; + ["Alignment of pthread_mutex_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_mutex_t::__data"] + [::std::mem::offset_of!(pthread_mutex_t, __data) - 0usize]; + ["Offset of field: pthread_mutex_t::__size"] + [::std::mem::offset_of!(pthread_mutex_t, __size) - 0usize]; + ["Offset of field: pthread_mutex_t::__align"] + [::std::mem::offset_of!(pthread_mutex_t, __align) - 0usize]; +}; impl ::std::fmt::Debug for pthread_mutex_t { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "pthread_mutex_t {{ union }}") @@ -5369,51 +4288,17 @@ pub union pthread_cond_t { pub __size: [::std::os::raw::c_char; 48usize], pub __align: ::std::os::raw::c_longlong, } -#[test] -fn bindgen_test_layout_pthread_cond_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(pthread_cond_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_cond_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__align) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_cond_t"][::std::mem::size_of::() - 48usize]; + ["Alignment of pthread_cond_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_cond_t::__data"] + [::std::mem::offset_of!(pthread_cond_t, __data) - 0usize]; + ["Offset of field: pthread_cond_t::__size"] + [::std::mem::offset_of!(pthread_cond_t, __size) - 0usize]; + ["Offset of field: pthread_cond_t::__align"] + [::std::mem::offset_of!(pthread_cond_t, __align) - 0usize]; +}; impl ::std::fmt::Debug for pthread_cond_t { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "pthread_cond_t {{ union }}") @@ -5426,51 +4311,17 @@ pub union pthread_rwlock_t { pub __size: [::std::os::raw::c_char; 56usize], pub __align: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_pthread_rwlock_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(pthread_rwlock_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_rwlock_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__align) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_rwlock_t"][::std::mem::size_of::() - 56usize]; + ["Alignment of pthread_rwlock_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_rwlock_t::__data"] + [::std::mem::offset_of!(pthread_rwlock_t, __data) - 0usize]; + ["Offset of field: pthread_rwlock_t::__size"] + [::std::mem::offset_of!(pthread_rwlock_t, __size) - 0usize]; + ["Offset of field: pthread_rwlock_t::__align"] + [::std::mem::offset_of!(pthread_rwlock_t, __align) - 0usize]; +}; impl ::std::fmt::Debug for pthread_rwlock_t { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "pthread_rwlock_t {{ union }}") @@ -5482,41 +4333,15 @@ pub union pthread_rwlockattr_t { pub __size: [::std::os::raw::c_char; 8usize], pub __align: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_pthread_rwlockattr_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(pthread_rwlockattr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_rwlockattr_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlockattr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlockattr_t), - "::", - stringify!(__align) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_rwlockattr_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of pthread_rwlockattr_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_rwlockattr_t::__size"] + [::std::mem::offset_of!(pthread_rwlockattr_t, __size) - 0usize]; + ["Offset of field: pthread_rwlockattr_t::__align"] + [::std::mem::offset_of!(pthread_rwlockattr_t, __align) - 0usize]; +}; impl ::std::fmt::Debug for pthread_rwlockattr_t { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "pthread_rwlockattr_t {{ union }}") @@ -5529,41 +4354,15 @@ pub union pthread_barrier_t { pub __size: [::std::os::raw::c_char; 32usize], pub __align: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_pthread_barrier_t() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(pthread_barrier_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_barrier_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__align) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_barrier_t"][::std::mem::size_of::() - 32usize]; + ["Alignment of pthread_barrier_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_barrier_t::__size"] + [::std::mem::offset_of!(pthread_barrier_t, __size) - 0usize]; + ["Offset of field: pthread_barrier_t::__align"] + [::std::mem::offset_of!(pthread_barrier_t, __align) - 0usize]; +}; impl ::std::fmt::Debug for pthread_barrier_t { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "pthread_barrier_t {{ union }}") @@ -5575,42 +4374,16 @@ pub union pthread_barrierattr_t { pub __size: [::std::os::raw::c_char; 4usize], pub __align: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_pthread_barrierattr_t() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(pthread_barrierattr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_barrierattr_t)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrierattr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrierattr_t), - "::", - stringify!(__align) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_barrierattr_t"][::std::mem::size_of::() - 4usize]; + ["Alignment of pthread_barrierattr_t"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_barrierattr_t::__size"] + [::std::mem::offset_of!(pthread_barrierattr_t, __size) - 0usize]; + ["Offset of field: pthread_barrierattr_t::__align"] + [::std::mem::offset_of!(pthread_barrierattr_t, __align) - 0usize]; +}; impl ::std::fmt::Debug for pthread_barrierattr_t { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "pthread_barrierattr_t {{ union }}") @@ -5643,91 +4416,22 @@ pub struct random_data { pub rand_sep: ::std::os::raw::c_int, pub end_ptr: *mut i32, } -#[test] -fn bindgen_test_layout_random_data() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(random_data)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(random_data)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fptr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(fptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rptr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rand_type) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rand_deg) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_deg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rand_sep) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_sep) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).end_ptr) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(end_ptr) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of random_data"][::std::mem::size_of::() - 48usize]; + ["Alignment of random_data"][::std::mem::align_of::() - 8usize]; + ["Offset of field: random_data::fptr"][::std::mem::offset_of!(random_data, fptr) - 0usize]; + ["Offset of field: random_data::rptr"][::std::mem::offset_of!(random_data, rptr) - 8usize]; + ["Offset of field: random_data::state"][::std::mem::offset_of!(random_data, state) - 16usize]; + ["Offset of field: random_data::rand_type"] + [::std::mem::offset_of!(random_data, rand_type) - 24usize]; + ["Offset of field: random_data::rand_deg"] + [::std::mem::offset_of!(random_data, rand_deg) - 28usize]; + ["Offset of field: random_data::rand_sep"] + [::std::mem::offset_of!(random_data, rand_sep) - 32usize]; + ["Offset of field: random_data::end_ptr"] + [::std::mem::offset_of!(random_data, end_ptr) - 40usize]; +}; extern "C" { pub fn random_r(__buf: *mut random_data, __result: *mut i32) -> ::std::os::raw::c_int; } @@ -5796,71 +4500,18 @@ pub struct drand48_data { pub __init: ::std::os::raw::c_ushort, pub __a: ::std::os::raw::c_ulonglong, } -#[test] -fn bindgen_test_layout_drand48_data() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(drand48_data)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(drand48_data)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__old_x) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__old_x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__c) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__c) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__init) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__init) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__a) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__a) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of drand48_data"][::std::mem::size_of::() - 24usize]; + ["Alignment of drand48_data"][::std::mem::align_of::() - 8usize]; + ["Offset of field: drand48_data::__x"][::std::mem::offset_of!(drand48_data, __x) - 0usize]; + ["Offset of field: drand48_data::__old_x"] + [::std::mem::offset_of!(drand48_data, __old_x) - 6usize]; + ["Offset of field: drand48_data::__c"][::std::mem::offset_of!(drand48_data, __c) - 12usize]; + ["Offset of field: drand48_data::__init"] + [::std::mem::offset_of!(drand48_data, __init) - 14usize]; + ["Offset of field: drand48_data::__a"][::std::mem::offset_of!(drand48_data, __a) - 16usize]; +}; extern "C" { pub fn drand48_r(__buffer: *mut drand48_data, __result: *mut f64) -> ::std::os::raw::c_int; } @@ -6307,71 +4958,21 @@ pub struct __locale_struct { pub __ctype_toupper: *const ::std::os::raw::c_int, pub __names: [*const ::std::os::raw::c_char; 13usize], } -#[test] -fn bindgen_test_layout___locale_struct() { - const UNINIT: ::std::mem::MaybeUninit<__locale_struct> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__locale_struct>(), - 232usize, - concat!("Size of: ", stringify!(__locale_struct)) - ); - assert_eq!( - ::std::mem::align_of::<__locale_struct>(), - 8usize, - concat!("Alignment of ", stringify!(__locale_struct)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__locales) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__locale_struct), - "::", - stringify!(__locales) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__ctype_b) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__locale_struct), - "::", - stringify!(__ctype_b) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__ctype_tolower) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(__locale_struct), - "::", - stringify!(__ctype_tolower) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__ctype_toupper) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__locale_struct), - "::", - stringify!(__ctype_toupper) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).__names) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(__locale_struct), - "::", - stringify!(__names) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __locale_struct"][::std::mem::size_of::<__locale_struct>() - 232usize]; + ["Alignment of __locale_struct"][::std::mem::align_of::<__locale_struct>() - 8usize]; + ["Offset of field: __locale_struct::__locales"] + [::std::mem::offset_of!(__locale_struct, __locales) - 0usize]; + ["Offset of field: __locale_struct::__ctype_b"] + [::std::mem::offset_of!(__locale_struct, __ctype_b) - 104usize]; + ["Offset of field: __locale_struct::__ctype_tolower"] + [::std::mem::offset_of!(__locale_struct, __ctype_tolower) - 112usize]; + ["Offset of field: __locale_struct::__ctype_toupper"] + [::std::mem::offset_of!(__locale_struct, __ctype_toupper) - 120usize]; + ["Offset of field: __locale_struct::__names"] + [::std::mem::offset_of!(__locale_struct, __names) - 128usize]; +}; pub type __locale_t = *mut __locale_struct; pub type locale_t = __locale_t; extern "C" { @@ -6589,12 +5190,6 @@ extern "C" { errbuf_size: usize, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn av_log2(v: ::std::os::raw::c_uint) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn av_log2_16bit(v: ::std::os::raw::c_uint) -> ::std::os::raw::c_int; -} extern "C" { #[doc = " Allocate a memory block with alignment suitable for all memory accesses\n (including vectors if available on the CPU).\n\n @param size Size in bytes for the memory block to be allocated\n @return Pointer to the allocated block, or `NULL` if the block cannot\n be allocated\n @see av_mallocz()"] pub fn av_malloc(size: usize) -> *mut ::std::os::raw::c_void; @@ -6725,6 +5320,12 @@ extern "C" { #[doc = " Set the maximum size that may be allocated in one block.\n\n The value specified with this function is effective for all libavutil's @ref\n lavu_mem_funcs \"heap management functions.\"\n\n By default, the max value is defined as `INT_MAX`.\n\n @param max Value to be set as the new maximum size\n\n @warning Exercise extreme caution when using this function. Don't touch\n this if you do not understand the full consequence of doing so."] pub fn av_max_alloc(max: usize); } +extern "C" { + pub fn av_log2(v: ::std::os::raw::c_uint) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn av_log2_16bit(v: ::std::os::raw::c_uint) -> ::std::os::raw::c_int; +} #[doc = " Rational number (pair of numerator and denominator)."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -6734,41 +5335,13 @@ pub struct AVRational { #[doc = "< Denominator"] pub den: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVRational() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AVRational)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVRational)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).num) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVRational), - "::", - stringify!(num) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).den) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVRational), - "::", - stringify!(den) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVRational"][::std::mem::size_of::() - 8usize]; + ["Alignment of AVRational"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVRational::num"][::std::mem::offset_of!(AVRational, num) - 0usize]; + ["Offset of field: AVRational::den"][::std::mem::offset_of!(AVRational, den) - 4usize]; +}; extern "C" { #[doc = " Reduce a fraction.\n\n This is useful for framerate calculations.\n\n @param[out] dst_num Destination numerator\n @param[out] dst_den Destination denominator\n @param[in] num Source numerator\n @param[in] den Source denominator\n @param[in] max Maximum allowed values for `dst_num` & `dst_den`\n @return 1 if the operation is exact, 0 otherwise"] pub fn av_reduce( @@ -6796,7 +5369,7 @@ extern "C" { pub fn av_sub_q(b: AVRational, c: AVRational) -> AVRational; } extern "C" { - #[doc = " Convert a double precision floating point number to a rational.\n\n In case of infinity, the returned value is expressed as `{1, 0}` or\n `{-1, 0}` depending on the sign.\n\n @param d `double` to convert\n @param max Maximum allowed numerator and denominator\n @return `d` in AVRational form\n @see av_q2d()"] + #[doc = " Convert a double precision floating point number to a rational.\n\n In case of infinity, the returned value is expressed as `{1, 0}` or\n `{-1, 0}` depending on the sign.\n\n In general rational numbers with |num| <= 1<<26 && |den| <= 1<<26\n can be recovered exactly from their double representation.\n (no exceptions were found within 1B random ones)\n\n @param d `double` to convert\n @param max Maximum allowed numerator and denominator\n @return `d` in AVRational form\n @see av_q2d()"] pub fn av_d2q(d: f64, max: ::std::os::raw::c_int) -> AVRational; } extern "C" { @@ -6827,41 +5400,13 @@ pub union av_intfloat32 { pub i: u32, pub f: f32, } -#[test] -fn bindgen_test_layout_av_intfloat32() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(av_intfloat32)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(av_intfloat32)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(av_intfloat32), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(av_intfloat32), - "::", - stringify!(f) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of av_intfloat32"][::std::mem::size_of::() - 4usize]; + ["Alignment of av_intfloat32"][::std::mem::align_of::() - 4usize]; + ["Offset of field: av_intfloat32::i"][::std::mem::offset_of!(av_intfloat32, i) - 0usize]; + ["Offset of field: av_intfloat32::f"][::std::mem::offset_of!(av_intfloat32, f) - 0usize]; +}; impl ::std::fmt::Debug for av_intfloat32 { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "av_intfloat32 {{ union }}") @@ -6873,41 +5418,13 @@ pub union av_intfloat64 { pub i: u64, pub f: f64, } -#[test] -fn bindgen_test_layout_av_intfloat64() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(av_intfloat64)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(av_intfloat64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(av_intfloat64), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(av_intfloat64), - "::", - stringify!(f) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of av_intfloat64"][::std::mem::size_of::() - 8usize]; + ["Alignment of av_intfloat64"][::std::mem::align_of::() - 8usize]; + ["Offset of field: av_intfloat64::i"][::std::mem::offset_of!(av_intfloat64, i) - 0usize]; + ["Offset of field: av_intfloat64::f"][::std::mem::offset_of!(av_intfloat64, f) - 0usize]; +}; impl ::std::fmt::Debug for av_intfloat64 { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "av_intfloat64 {{ union }}") @@ -7044,131 +5561,27 @@ pub struct AVClass { unsafe extern "C" fn(iter: *mut *mut ::std::os::raw::c_void) -> *const AVClass, >, } -#[test] -fn bindgen_test_layout_AVClass() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(AVClass)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVClass)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).class_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVClass), - "::", - stringify!(class_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).item_name) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVClass), - "::", - stringify!(item_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).option) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVClass), - "::", - stringify!(option) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVClass), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).log_level_offset_offset) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AVClass), - "::", - stringify!(log_level_offset_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).parent_log_context_offset) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVClass), - "::", - stringify!(parent_log_context_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).category) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(AVClass), - "::", - stringify!(category) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).get_category) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVClass), - "::", - stringify!(get_category) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).query_ranges) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVClass), - "::", - stringify!(query_ranges) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).child_next) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVClass), - "::", - stringify!(child_next) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).child_class_iterate) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVClass), - "::", - stringify!(child_class_iterate) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVClass"][::std::mem::size_of::() - 72usize]; + ["Alignment of AVClass"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVClass::class_name"][::std::mem::offset_of!(AVClass, class_name) - 0usize]; + ["Offset of field: AVClass::item_name"][::std::mem::offset_of!(AVClass, item_name) - 8usize]; + ["Offset of field: AVClass::option"][::std::mem::offset_of!(AVClass, option) - 16usize]; + ["Offset of field: AVClass::version"][::std::mem::offset_of!(AVClass, version) - 24usize]; + ["Offset of field: AVClass::log_level_offset_offset"] + [::std::mem::offset_of!(AVClass, log_level_offset_offset) - 28usize]; + ["Offset of field: AVClass::parent_log_context_offset"] + [::std::mem::offset_of!(AVClass, parent_log_context_offset) - 32usize]; + ["Offset of field: AVClass::category"][::std::mem::offset_of!(AVClass, category) - 36usize]; + ["Offset of field: AVClass::get_category"] + [::std::mem::offset_of!(AVClass, get_category) - 40usize]; + ["Offset of field: AVClass::query_ranges"] + [::std::mem::offset_of!(AVClass, query_ranges) - 48usize]; + ["Offset of field: AVClass::child_next"][::std::mem::offset_of!(AVClass, child_next) - 56usize]; + ["Offset of field: AVClass::child_class_iterate"] + [::std::mem::offset_of!(AVClass, child_class_iterate) - 64usize]; +}; extern "C" { #[doc = " Send the specified message to the log if the level is less than or equal\n to the current av_log_level. By default, all logging messages are sent to\n stderr. This behavior can be altered by setting a different logging callback\n function.\n @see av_log_set_callback\n\n @param avcl A pointer to an arbitrary struct of which the first field is a\n pointer to an AVClass struct or NULL if general log.\n @param level The importance level of the message expressed using a @ref\n lavu_log_constants \"Logging Constant\".\n @param fmt The format string (printf-compatible) that specifies how\n subsequent arguments are converted to output."] pub fn av_log( @@ -7306,7 +5719,7 @@ pub const AV_PIX_FMT_BGR8: AVPixelFormat = 17; pub const AV_PIX_FMT_BGR4: AVPixelFormat = 18; #[doc = "< packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)"] pub const AV_PIX_FMT_BGR4_BYTE: AVPixelFormat = 19; -#[doc = "< packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)"] +#[doc = "< packed RGB 3:3:2, 8bpp, (msb)3R 3G 2B(lsb)"] pub const AV_PIX_FMT_RGB8: AVPixelFormat = 20; #[doc = "< packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits"] pub const AV_PIX_FMT_RGB4: AVPixelFormat = 21; @@ -7573,160 +5986,160 @@ pub const AV_PIX_FMT_BAYER_GBRG16BE: AVPixelFormat = 148; pub const AV_PIX_FMT_BAYER_GRBG16LE: AVPixelFormat = 149; #[doc = "< bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, big-endian"] pub const AV_PIX_FMT_BAYER_GRBG16BE: AVPixelFormat = 150; -#[doc = "< XVideo Motion Acceleration via common packet passing"] -pub const AV_PIX_FMT_XVMC: AVPixelFormat = 151; #[doc = "< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian"] -pub const AV_PIX_FMT_YUV440P10LE: AVPixelFormat = 152; +pub const AV_PIX_FMT_YUV440P10LE: AVPixelFormat = 151; #[doc = "< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian"] -pub const AV_PIX_FMT_YUV440P10BE: AVPixelFormat = 153; +pub const AV_PIX_FMT_YUV440P10BE: AVPixelFormat = 152; #[doc = "< planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian"] -pub const AV_PIX_FMT_YUV440P12LE: AVPixelFormat = 154; +pub const AV_PIX_FMT_YUV440P12LE: AVPixelFormat = 153; #[doc = "< planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian"] -pub const AV_PIX_FMT_YUV440P12BE: AVPixelFormat = 155; +pub const AV_PIX_FMT_YUV440P12BE: AVPixelFormat = 154; #[doc = "< packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), little-endian"] -pub const AV_PIX_FMT_AYUV64LE: AVPixelFormat = 156; +pub const AV_PIX_FMT_AYUV64LE: AVPixelFormat = 155; #[doc = "< packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), big-endian"] -pub const AV_PIX_FMT_AYUV64BE: AVPixelFormat = 157; +pub const AV_PIX_FMT_AYUV64BE: AVPixelFormat = 156; #[doc = "< hardware decoding through Videotoolbox"] -pub const AV_PIX_FMT_VIDEOTOOLBOX: AVPixelFormat = 158; +pub const AV_PIX_FMT_VIDEOTOOLBOX: AVPixelFormat = 157; #[doc = "< like NV12, with 10bpp per component, data in the high bits, zeros in the low bits, little-endian"] -pub const AV_PIX_FMT_P010LE: AVPixelFormat = 159; +pub const AV_PIX_FMT_P010LE: AVPixelFormat = 158; #[doc = "< like NV12, with 10bpp per component, data in the high bits, zeros in the low bits, big-endian"] -pub const AV_PIX_FMT_P010BE: AVPixelFormat = 160; +pub const AV_PIX_FMT_P010BE: AVPixelFormat = 159; #[doc = "< planar GBR 4:4:4:4 48bpp, big-endian"] -pub const AV_PIX_FMT_GBRAP12BE: AVPixelFormat = 161; +pub const AV_PIX_FMT_GBRAP12BE: AVPixelFormat = 160; #[doc = "< planar GBR 4:4:4:4 48bpp, little-endian"] -pub const AV_PIX_FMT_GBRAP12LE: AVPixelFormat = 162; +pub const AV_PIX_FMT_GBRAP12LE: AVPixelFormat = 161; #[doc = "< planar GBR 4:4:4:4 40bpp, big-endian"] -pub const AV_PIX_FMT_GBRAP10BE: AVPixelFormat = 163; +pub const AV_PIX_FMT_GBRAP10BE: AVPixelFormat = 162; #[doc = "< planar GBR 4:4:4:4 40bpp, little-endian"] -pub const AV_PIX_FMT_GBRAP10LE: AVPixelFormat = 164; +pub const AV_PIX_FMT_GBRAP10LE: AVPixelFormat = 163; #[doc = "< hardware decoding through MediaCodec"] -pub const AV_PIX_FMT_MEDIACODEC: AVPixelFormat = 165; +pub const AV_PIX_FMT_MEDIACODEC: AVPixelFormat = 164; #[doc = "< Y , 12bpp, big-endian"] -pub const AV_PIX_FMT_GRAY12BE: AVPixelFormat = 166; +pub const AV_PIX_FMT_GRAY12BE: AVPixelFormat = 165; #[doc = "< Y , 12bpp, little-endian"] -pub const AV_PIX_FMT_GRAY12LE: AVPixelFormat = 167; +pub const AV_PIX_FMT_GRAY12LE: AVPixelFormat = 166; #[doc = "< Y , 10bpp, big-endian"] -pub const AV_PIX_FMT_GRAY10BE: AVPixelFormat = 168; +pub const AV_PIX_FMT_GRAY10BE: AVPixelFormat = 167; #[doc = "< Y , 10bpp, little-endian"] -pub const AV_PIX_FMT_GRAY10LE: AVPixelFormat = 169; +pub const AV_PIX_FMT_GRAY10LE: AVPixelFormat = 168; #[doc = "< like NV12, with 16bpp per component, little-endian"] -pub const AV_PIX_FMT_P016LE: AVPixelFormat = 170; +pub const AV_PIX_FMT_P016LE: AVPixelFormat = 169; #[doc = "< like NV12, with 16bpp per component, big-endian"] -pub const AV_PIX_FMT_P016BE: AVPixelFormat = 171; +pub const AV_PIX_FMT_P016BE: AVPixelFormat = 170; #[doc = " Hardware surfaces for Direct3D11.\n\n This is preferred over the legacy AV_PIX_FMT_D3D11VA_VLD. The new D3D11\n hwaccel API and filtering support AV_PIX_FMT_D3D11 only.\n\n data[0] contains a ID3D11Texture2D pointer, and data[1] contains the\n texture array index of the frame as intptr_t if the ID3D11Texture2D is\n an array texture (or always 0 if it's a normal texture)."] -pub const AV_PIX_FMT_D3D11: AVPixelFormat = 172; +pub const AV_PIX_FMT_D3D11: AVPixelFormat = 171; #[doc = "< Y , 9bpp, big-endian"] -pub const AV_PIX_FMT_GRAY9BE: AVPixelFormat = 173; +pub const AV_PIX_FMT_GRAY9BE: AVPixelFormat = 172; #[doc = "< Y , 9bpp, little-endian"] -pub const AV_PIX_FMT_GRAY9LE: AVPixelFormat = 174; +pub const AV_PIX_FMT_GRAY9LE: AVPixelFormat = 173; #[doc = "< IEEE-754 single precision planar GBR 4:4:4, 96bpp, big-endian"] -pub const AV_PIX_FMT_GBRPF32BE: AVPixelFormat = 175; +pub const AV_PIX_FMT_GBRPF32BE: AVPixelFormat = 174; #[doc = "< IEEE-754 single precision planar GBR 4:4:4, 96bpp, little-endian"] -pub const AV_PIX_FMT_GBRPF32LE: AVPixelFormat = 176; +pub const AV_PIX_FMT_GBRPF32LE: AVPixelFormat = 175; #[doc = "< IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, big-endian"] -pub const AV_PIX_FMT_GBRAPF32BE: AVPixelFormat = 177; +pub const AV_PIX_FMT_GBRAPF32BE: AVPixelFormat = 176; #[doc = "< IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, little-endian"] -pub const AV_PIX_FMT_GBRAPF32LE: AVPixelFormat = 178; +pub const AV_PIX_FMT_GBRAPF32LE: AVPixelFormat = 177; #[doc = " DRM-managed buffers exposed through PRIME buffer sharing.\n\n data[0] points to an AVDRMFrameDescriptor."] -pub const AV_PIX_FMT_DRM_PRIME: AVPixelFormat = 179; +pub const AV_PIX_FMT_DRM_PRIME: AVPixelFormat = 178; #[doc = " Hardware surfaces for OpenCL.\n\n data[i] contain 2D image objects (typed in C as cl_mem, used\n in OpenCL as image2d_t) for each plane of the surface."] -pub const AV_PIX_FMT_OPENCL: AVPixelFormat = 180; +pub const AV_PIX_FMT_OPENCL: AVPixelFormat = 179; #[doc = "< Y , 14bpp, big-endian"] -pub const AV_PIX_FMT_GRAY14BE: AVPixelFormat = 181; +pub const AV_PIX_FMT_GRAY14BE: AVPixelFormat = 180; #[doc = "< Y , 14bpp, little-endian"] -pub const AV_PIX_FMT_GRAY14LE: AVPixelFormat = 182; +pub const AV_PIX_FMT_GRAY14LE: AVPixelFormat = 181; #[doc = "< IEEE-754 single precision Y, 32bpp, big-endian"] -pub const AV_PIX_FMT_GRAYF32BE: AVPixelFormat = 183; +pub const AV_PIX_FMT_GRAYF32BE: AVPixelFormat = 182; #[doc = "< IEEE-754 single precision Y, 32bpp, little-endian"] -pub const AV_PIX_FMT_GRAYF32LE: AVPixelFormat = 184; +pub const AV_PIX_FMT_GRAYF32LE: AVPixelFormat = 183; #[doc = "< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, big-endian"] -pub const AV_PIX_FMT_YUVA422P12BE: AVPixelFormat = 185; +pub const AV_PIX_FMT_YUVA422P12BE: AVPixelFormat = 184; #[doc = "< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, little-endian"] -pub const AV_PIX_FMT_YUVA422P12LE: AVPixelFormat = 186; +pub const AV_PIX_FMT_YUVA422P12LE: AVPixelFormat = 185; #[doc = "< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, big-endian"] -pub const AV_PIX_FMT_YUVA444P12BE: AVPixelFormat = 187; +pub const AV_PIX_FMT_YUVA444P12BE: AVPixelFormat = 186; #[doc = "< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, little-endian"] -pub const AV_PIX_FMT_YUVA444P12LE: AVPixelFormat = 188; +pub const AV_PIX_FMT_YUVA444P12LE: AVPixelFormat = 187; #[doc = "< planar YUV 4:4:4, 24bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V)"] -pub const AV_PIX_FMT_NV24: AVPixelFormat = 189; +pub const AV_PIX_FMT_NV24: AVPixelFormat = 188; #[doc = "< as above, but U and V bytes are swapped"] -pub const AV_PIX_FMT_NV42: AVPixelFormat = 190; +pub const AV_PIX_FMT_NV42: AVPixelFormat = 189; #[doc = " Vulkan hardware images.\n\n data[0] points to an AVVkFrame"] -pub const AV_PIX_FMT_VULKAN: AVPixelFormat = 191; +pub const AV_PIX_FMT_VULKAN: AVPixelFormat = 190; #[doc = "< packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, big-endian"] -pub const AV_PIX_FMT_Y210BE: AVPixelFormat = 192; +pub const AV_PIX_FMT_Y210BE: AVPixelFormat = 191; #[doc = "< packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, little-endian"] -pub const AV_PIX_FMT_Y210LE: AVPixelFormat = 193; +pub const AV_PIX_FMT_Y210LE: AVPixelFormat = 192; #[doc = "< packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), little-endian, X=unused/undefined"] -pub const AV_PIX_FMT_X2RGB10LE: AVPixelFormat = 194; +pub const AV_PIX_FMT_X2RGB10LE: AVPixelFormat = 193; #[doc = "< packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), big-endian, X=unused/undefined"] -pub const AV_PIX_FMT_X2RGB10BE: AVPixelFormat = 195; +pub const AV_PIX_FMT_X2RGB10BE: AVPixelFormat = 194; #[doc = "< packed BGR 10:10:10, 30bpp, (msb)2X 10B 10G 10R(lsb), little-endian, X=unused/undefined"] -pub const AV_PIX_FMT_X2BGR10LE: AVPixelFormat = 196; +pub const AV_PIX_FMT_X2BGR10LE: AVPixelFormat = 195; #[doc = "< packed BGR 10:10:10, 30bpp, (msb)2X 10B 10G 10R(lsb), big-endian, X=unused/undefined"] -pub const AV_PIX_FMT_X2BGR10BE: AVPixelFormat = 197; +pub const AV_PIX_FMT_X2BGR10BE: AVPixelFormat = 196; #[doc = "< interleaved chroma YUV 4:2:2, 20bpp, data in the high bits, big-endian"] -pub const AV_PIX_FMT_P210BE: AVPixelFormat = 198; +pub const AV_PIX_FMT_P210BE: AVPixelFormat = 197; #[doc = "< interleaved chroma YUV 4:2:2, 20bpp, data in the high bits, little-endian"] -pub const AV_PIX_FMT_P210LE: AVPixelFormat = 199; +pub const AV_PIX_FMT_P210LE: AVPixelFormat = 198; #[doc = "< interleaved chroma YUV 4:4:4, 30bpp, data in the high bits, big-endian"] -pub const AV_PIX_FMT_P410BE: AVPixelFormat = 200; +pub const AV_PIX_FMT_P410BE: AVPixelFormat = 199; #[doc = "< interleaved chroma YUV 4:4:4, 30bpp, data in the high bits, little-endian"] -pub const AV_PIX_FMT_P410LE: AVPixelFormat = 201; +pub const AV_PIX_FMT_P410LE: AVPixelFormat = 200; #[doc = "< interleaved chroma YUV 4:2:2, 32bpp, big-endian"] -pub const AV_PIX_FMT_P216BE: AVPixelFormat = 202; +pub const AV_PIX_FMT_P216BE: AVPixelFormat = 201; #[doc = "< interleaved chroma YUV 4:2:2, 32bpp, little-endian"] -pub const AV_PIX_FMT_P216LE: AVPixelFormat = 203; +pub const AV_PIX_FMT_P216LE: AVPixelFormat = 202; #[doc = "< interleaved chroma YUV 4:4:4, 48bpp, big-endian"] -pub const AV_PIX_FMT_P416BE: AVPixelFormat = 204; +pub const AV_PIX_FMT_P416BE: AVPixelFormat = 203; #[doc = "< interleaved chroma YUV 4:4:4, 48bpp, little-endian"] -pub const AV_PIX_FMT_P416LE: AVPixelFormat = 205; +pub const AV_PIX_FMT_P416LE: AVPixelFormat = 204; #[doc = "< packed VUYA 4:4:4, 32bpp, VUYAVUYA..."] -pub const AV_PIX_FMT_VUYA: AVPixelFormat = 206; +pub const AV_PIX_FMT_VUYA: AVPixelFormat = 205; #[doc = "< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., big-endian"] -pub const AV_PIX_FMT_RGBAF16BE: AVPixelFormat = 207; +pub const AV_PIX_FMT_RGBAF16BE: AVPixelFormat = 206; #[doc = "< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., little-endian"] -pub const AV_PIX_FMT_RGBAF16LE: AVPixelFormat = 208; +pub const AV_PIX_FMT_RGBAF16LE: AVPixelFormat = 207; #[doc = "< packed VUYX 4:4:4, 32bpp, Variant of VUYA where alpha channel is left undefined"] -pub const AV_PIX_FMT_VUYX: AVPixelFormat = 209; +pub const AV_PIX_FMT_VUYX: AVPixelFormat = 208; #[doc = "< like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, little-endian"] -pub const AV_PIX_FMT_P012LE: AVPixelFormat = 210; +pub const AV_PIX_FMT_P012LE: AVPixelFormat = 209; #[doc = "< like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, big-endian"] -pub const AV_PIX_FMT_P012BE: AVPixelFormat = 211; +pub const AV_PIX_FMT_P012BE: AVPixelFormat = 210; #[doc = "< packed YUV 4:2:2 like YUYV422, 24bpp, data in the high bits, zeros in the low bits, big-endian"] -pub const AV_PIX_FMT_Y212BE: AVPixelFormat = 212; +pub const AV_PIX_FMT_Y212BE: AVPixelFormat = 211; #[doc = "< packed YUV 4:2:2 like YUYV422, 24bpp, data in the high bits, zeros in the low bits, little-endian"] -pub const AV_PIX_FMT_Y212LE: AVPixelFormat = 213; +pub const AV_PIX_FMT_Y212LE: AVPixelFormat = 212; #[doc = "< packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), big-endian, variant of Y410 where alpha channel is left undefined"] -pub const AV_PIX_FMT_XV30BE: AVPixelFormat = 214; +pub const AV_PIX_FMT_XV30BE: AVPixelFormat = 213; #[doc = "< packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), little-endian, variant of Y410 where alpha channel is left undefined"] -pub const AV_PIX_FMT_XV30LE: AVPixelFormat = 215; +pub const AV_PIX_FMT_XV30LE: AVPixelFormat = 214; #[doc = "< packed XVYU 4:4:4, 48bpp, data in the high bits, zeros in the low bits, big-endian, variant of Y412 where alpha channel is left undefined"] -pub const AV_PIX_FMT_XV36BE: AVPixelFormat = 216; +pub const AV_PIX_FMT_XV36BE: AVPixelFormat = 215; #[doc = "< packed XVYU 4:4:4, 48bpp, data in the high bits, zeros in the low bits, little-endian, variant of Y412 where alpha channel is left undefined"] -pub const AV_PIX_FMT_XV36LE: AVPixelFormat = 217; +pub const AV_PIX_FMT_XV36LE: AVPixelFormat = 216; #[doc = "< IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., big-endian"] -pub const AV_PIX_FMT_RGBF32BE: AVPixelFormat = 218; +pub const AV_PIX_FMT_RGBF32BE: AVPixelFormat = 217; #[doc = "< IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., little-endian"] -pub const AV_PIX_FMT_RGBF32LE: AVPixelFormat = 219; +pub const AV_PIX_FMT_RGBF32LE: AVPixelFormat = 218; #[doc = "< IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., big-endian"] -pub const AV_PIX_FMT_RGBAF32BE: AVPixelFormat = 220; +pub const AV_PIX_FMT_RGBAF32BE: AVPixelFormat = 219; #[doc = "< IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., little-endian"] -pub const AV_PIX_FMT_RGBAF32LE: AVPixelFormat = 221; +pub const AV_PIX_FMT_RGBAF32LE: AVPixelFormat = 220; #[doc = "< interleaved chroma YUV 4:2:2, 24bpp, data in the high bits, big-endian"] -pub const AV_PIX_FMT_P212BE: AVPixelFormat = 222; +pub const AV_PIX_FMT_P212BE: AVPixelFormat = 221; #[doc = "< interleaved chroma YUV 4:2:2, 24bpp, data in the high bits, little-endian"] -pub const AV_PIX_FMT_P212LE: AVPixelFormat = 223; +pub const AV_PIX_FMT_P212LE: AVPixelFormat = 222; #[doc = "< interleaved chroma YUV 4:4:4, 36bpp, data in the high bits, big-endian"] -pub const AV_PIX_FMT_P412BE: AVPixelFormat = 224; +pub const AV_PIX_FMT_P412BE: AVPixelFormat = 223; #[doc = "< interleaved chroma YUV 4:4:4, 36bpp, data in the high bits, little-endian"] -pub const AV_PIX_FMT_P412LE: AVPixelFormat = 225; +pub const AV_PIX_FMT_P412LE: AVPixelFormat = 224; #[doc = "< planar GBR 4:4:4:4 56bpp, big-endian"] -pub const AV_PIX_FMT_GBRAP14BE: AVPixelFormat = 226; +pub const AV_PIX_FMT_GBRAP14BE: AVPixelFormat = 225; #[doc = "< planar GBR 4:4:4:4 56bpp, little-endian"] -pub const AV_PIX_FMT_GBRAP14LE: AVPixelFormat = 227; +pub const AV_PIX_FMT_GBRAP14LE: AVPixelFormat = 226; +#[doc = " Hardware surfaces for Direct3D 12.\n\n data[0] points to an AVD3D12VAFrame"] +pub const AV_PIX_FMT_D3D12: AVPixelFormat = 227; #[doc = "< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions"] pub const AV_PIX_FMT_NB: AVPixelFormat = 228; #[doc = " Pixel format.\n\n @note\n AV_PIX_FMT_RGB32 is handled in an endian-specific manner. An RGBA\n color is put together as:\n (A << 24) | (R << 16) | (G << 8) | B\n This is stored as BGRA on little-endian CPU architectures and ARGB on\n big-endian CPUs.\n\n @note\n If the resolution is not a multiple of the chroma subsampling factor\n then the chroma plane resolution must be rounded up.\n\n @par\n When the pixel format is palettized RGB32 (AV_PIX_FMT_PAL8), the palettized\n image data is stored in AVFrame.data[0]. The palette is transported in\n AVFrame.data[1], is 1024 bytes long (256 4-byte entries) and is\n formatted the same as in AV_PIX_FMT_RGB32 described above (i.e., it is\n also endian-specific). Note also that the individual RGB32 palette\n components stored in AVFrame.data[1] should be in the range 0..255.\n This is important as many custom PAL8 video codecs that were designed\n to run on the IBM VGA graphics adapter use 6-bit palette components.\n\n @par\n For all the 8 bits per pixel formats, an RGB32 palette is in data[1] like\n for pal8. This palette is filled in automatically by the function\n allocating the picture."] @@ -7867,13 +6280,6 @@ extern "C" { term: u64, ) -> ::std::os::raw::c_uint; } -extern "C" { - #[doc = " Open a file using a UTF-8 filename.\n The API of this function matches POSIX fopen(), errors are returned through\n errno.\n @deprecated Avoid using it, as on Windows, the FILE* allocated by this\n function may be allocated with a different CRT than the caller\n who uses the FILE*. No replacement provided in public API."] - pub fn av_fopen_utf8( - path: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - ) -> *mut FILE; -} extern "C" { #[doc = " Return the fractional representation of the internal time base."] pub fn av_get_time_base_q() -> AVRational; @@ -7900,51 +6306,14 @@ pub struct AVBufferRef { #[doc = " Size of data in bytes."] pub size: usize, } -#[test] -fn bindgen_test_layout_AVBufferRef() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AVBufferRef)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVBufferRef)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVBufferRef), - "::", - stringify!(buffer) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVBufferRef), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVBufferRef), - "::", - stringify!(size) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVBufferRef"][::std::mem::size_of::() - 24usize]; + ["Alignment of AVBufferRef"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVBufferRef::buffer"][::std::mem::offset_of!(AVBufferRef, buffer) - 0usize]; + ["Offset of field: AVBufferRef::data"][::std::mem::offset_of!(AVBufferRef, data) - 8usize]; + ["Offset of field: AVBufferRef::size"][::std::mem::offset_of!(AVBufferRef, size) - 16usize]; +}; extern "C" { #[doc = " Allocate an AVBuffer of the given size using av_malloc().\n\n @return an AVBufferRef of given size or NULL when out of memory"] pub fn av_buffer_alloc(size: usize) -> *mut AVBufferRef; @@ -8100,10 +6469,12 @@ pub type AVChannel = ::std::os::raw::c_int; pub const AV_CHANNEL_ORDER_UNSPEC: AVChannelOrder = 0; #[doc = " The native channel order, i.e. the channels are in the same order in\n which they are defined in the AVChannel enum. This supports up to 63\n different channels."] pub const AV_CHANNEL_ORDER_NATIVE: AVChannelOrder = 1; -#[doc = " The channel order does not correspond to any other predefined order and\n is stored as an explicit map. For example, this could be used to support\n layouts with 64 or more channels, or with empty/skipped (AV_CHAN_SILENCE)\n channels at arbitrary positions."] +#[doc = " The channel order does not correspond to any other predefined order and\n is stored as an explicit map. For example, this could be used to support\n layouts with 64 or more channels, or with empty/skipped (AV_CHAN_UNUSED)\n channels at arbitrary positions."] pub const AV_CHANNEL_ORDER_CUSTOM: AVChannelOrder = 2; #[doc = " The audio is represented as the decomposition of the sound field into\n spherical harmonics. Each channel corresponds to a single expansion\n component. Channels are ordered according to ACN (Ambisonic Channel\n Number).\n\n The channel with the index n in the stream contains the spherical\n harmonic of degree l and order m given by\n @code{.unparsed}\n l = floor(sqrt(n)),\n m = n - l * (l + 1).\n @endcode\n\n Conversely given a spherical harmonic of degree l and order m, the\n corresponding channel index n is given by\n @code{.unparsed}\n n = l * (l + 1) + m.\n @endcode\n\n Normalization is assumed to be SN3D (Schmidt Semi-Normalization)\n as defined in AmbiX format $ 2.1."] pub const AV_CHANNEL_ORDER_AMBISONIC: AVChannelOrder = 3; +#[doc = " Number of channel orders, not part of ABI/API"] +pub const FF_CHANNEL_ORDER_NB: AVChannelOrder = 4; pub type AVChannelOrder = ::std::os::raw::c_uint; pub const AV_MATRIX_ENCODING_NONE: AVMatrixEncoding = 0; pub const AV_MATRIX_ENCODING_DOLBY: AVMatrixEncoding = 1; @@ -8122,51 +6493,16 @@ pub struct AVChannelCustom { pub name: [::std::os::raw::c_char; 16usize], pub opaque: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_AVChannelCustom() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(AVChannelCustom)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVChannelCustom)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVChannelCustom), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVChannelCustom), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVChannelCustom), - "::", - stringify!(opaque) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVChannelCustom"][::std::mem::size_of::() - 32usize]; + ["Alignment of AVChannelCustom"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVChannelCustom::id"][::std::mem::offset_of!(AVChannelCustom, id) - 0usize]; + ["Offset of field: AVChannelCustom::name"] + [::std::mem::offset_of!(AVChannelCustom, name) - 4usize]; + ["Offset of field: AVChannelCustom::opaque"] + [::std::mem::offset_of!(AVChannelCustom, opaque) - 24usize]; +}; #[doc = " An AVChannelLayout holds information about the channel layout of audio data.\n\n A channel layout here is defined as a set of channels ordered in a specific\n way (unless the channel order is AV_CHANNEL_ORDER_UNSPEC, in which case an\n AVChannelLayout carries only the channel count).\n All orders may be treated as if they were AV_CHANNEL_ORDER_UNSPEC by\n ignoring everything but the channel count, as long as av_channel_layout_check()\n considers they are valid.\n\n Unlike most structures in FFmpeg, sizeof(AVChannelLayout) is a part of the\n public ABI and may be used by the caller. E.g. it may be allocated on stack\n or embedded in caller-defined structs.\n\n AVChannelLayout can be initialized as follows:\n - default initialization with {0}, followed by setting all used fields\n correctly;\n - by assigning one of the predefined AV_CHANNEL_LAYOUT_* initializers;\n - with a constructor function, such as av_channel_layout_default(),\n av_channel_layout_from_mask() or av_channel_layout_from_string().\n\n The channel layout must be unitialized with av_channel_layout_uninit()\n\n Copying an AVChannelLayout via assigning is forbidden,\n av_channel_layout_copy() must be used instead (and its return value should\n be checked)\n\n No new fields may be added to it without a major version bump, except for\n new elements of the union fitting in sizeof(uint64_t)."] #[repr(C)] #[derive(Copy, Clone)] @@ -8188,102 +6524,34 @@ pub union AVChannelLayout__bindgen_ty_1 { #[doc = " This member must be used when the channel order is\n AV_CHANNEL_ORDER_CUSTOM. It is a nb_channels-sized array, with each\n element signalling the presence of the AVChannel with the\n corresponding value in map[i].id.\n\n I.e. when map[i].id is equal to AV_CHAN_FOO, then AV_CH_FOO is the\n i-th channel in the audio data.\n\n When map[i].id is in the range between AV_CHAN_AMBISONIC_BASE and\n AV_CHAN_AMBISONIC_END (inclusive), the channel contains an ambisonic\n component with ACN index (as defined above)\n n = map[i].id - AV_CHAN_AMBISONIC_BASE.\n\n map[i].name may be filled with a 0-terminated string, in which case\n it will be used for the purpose of identifying the channel with the\n convenience functions below. Otherise it must be zeroed."] pub map: *mut AVChannelCustom, } -#[test] -fn bindgen_test_layout_AVChannelLayout__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AVChannelLayout__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVChannelLayout__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mask) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVChannelLayout__bindgen_ty_1), - "::", - stringify!(mask) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).map) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVChannelLayout__bindgen_ty_1), - "::", - stringify!(map) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVChannelLayout__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of AVChannelLayout__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AVChannelLayout__bindgen_ty_1::mask"] + [::std::mem::offset_of!(AVChannelLayout__bindgen_ty_1, mask) - 0usize]; + ["Offset of field: AVChannelLayout__bindgen_ty_1::map"] + [::std::mem::offset_of!(AVChannelLayout__bindgen_ty_1, map) - 0usize]; +}; impl ::std::fmt::Debug for AVChannelLayout__bindgen_ty_1 { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "AVChannelLayout__bindgen_ty_1 {{ union }}") } } -#[test] -fn bindgen_test_layout_AVChannelLayout() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AVChannelLayout)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVChannelLayout)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).order) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVChannelLayout), - "::", - stringify!(order) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_channels) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVChannelLayout), - "::", - stringify!(nb_channels) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVChannelLayout), - "::", - stringify!(u) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVChannelLayout), - "::", - stringify!(opaque) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVChannelLayout"][::std::mem::size_of::() - 24usize]; + ["Alignment of AVChannelLayout"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVChannelLayout::order"] + [::std::mem::offset_of!(AVChannelLayout, order) - 0usize]; + ["Offset of field: AVChannelLayout::nb_channels"] + [::std::mem::offset_of!(AVChannelLayout, nb_channels) - 4usize]; + ["Offset of field: AVChannelLayout::u"][::std::mem::offset_of!(AVChannelLayout, u) - 8usize]; + ["Offset of field: AVChannelLayout::opaque"] + [::std::mem::offset_of!(AVChannelLayout, opaque) - 16usize]; +}; impl ::std::fmt::Debug for AVChannelLayout { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!( @@ -8293,73 +6561,6 @@ impl ::std::fmt::Debug for AVChannelLayout { ) } } -extern "C" { - #[doc = " Return a channel layout id that matches name, or 0 if no match is found.\n\n name can be one or several of the following notations,\n separated by '+' or '|':\n - the name of an usual channel layout (mono, stereo, 4.0, quad, 5.0,\n 5.0(side), 5.1, 5.1(side), 7.1, 7.1(wide), downmix);\n - the name of a single channel (FL, FR, FC, LFE, BL, BR, FLC, FRC, BC,\n SL, SR, TC, TFL, TFC, TFR, TBL, TBC, TBR, DL, DR);\n - a number of channels, in decimal, followed by 'c', yielding\n the default channel layout for that number of channels (@see\n av_get_default_channel_layout);\n - a channel layout mask, in hexadecimal starting with \"0x\" (see the\n AV_CH_* macros).\n\n Example: \"stereo+FC\" = \"2c+FC\" = \"2c+1c\" = \"0x7\"\n\n @deprecated use av_channel_layout_from_string()"] - pub fn av_get_channel_layout(name: *const ::std::os::raw::c_char) -> u64; -} -extern "C" { - #[doc = " Return a channel layout and the number of channels based on the specified name.\n\n This function is similar to (@see av_get_channel_layout), but can also parse\n unknown channel layout specifications.\n\n @param[in] name channel layout specification string\n @param[out] channel_layout parsed channel layout (0 if unknown)\n @param[out] nb_channels number of channels\n\n @return 0 on success, AVERROR(EINVAL) if the parsing fails.\n @deprecated use av_channel_layout_from_string()"] - pub fn av_get_extended_channel_layout( - name: *const ::std::os::raw::c_char, - channel_layout: *mut u64, - nb_channels: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[doc = " Return a description of a channel layout.\n If nb_channels is <= 0, it is guessed from the channel_layout.\n\n @param buf put here the string containing the channel layout\n @param buf_size size in bytes of the buffer\n @param nb_channels number of channels\n @param channel_layout channel layout bitset\n @deprecated use av_channel_layout_describe()"] - pub fn av_get_channel_layout_string( - buf: *mut ::std::os::raw::c_char, - buf_size: ::std::os::raw::c_int, - nb_channels: ::std::os::raw::c_int, - channel_layout: u64, - ); -} -extern "C" { - #[doc = " Append a description of a channel layout to a bprint buffer.\n @deprecated use av_channel_layout_describe()"] - pub fn av_bprint_channel_layout( - bp: *mut AVBPrint, - nb_channels: ::std::os::raw::c_int, - channel_layout: u64, - ); -} -extern "C" { - #[doc = " Return the number of channels in the channel layout.\n @deprecated use AVChannelLayout.nb_channels"] - pub fn av_get_channel_layout_nb_channels(channel_layout: u64) -> ::std::os::raw::c_int; -} -extern "C" { - #[doc = " Return default channel layout for a given number of channels.\n\n @deprecated use av_channel_layout_default()"] - pub fn av_get_default_channel_layout(nb_channels: ::std::os::raw::c_int) -> i64; -} -extern "C" { - #[doc = " Get the index of a channel in channel_layout.\n\n @param channel_layout channel layout bitset\n @param channel a channel layout describing exactly one channel which must be\n present in channel_layout.\n\n @return index of channel in channel_layout on success, a negative AVERROR\n on error.\n\n @deprecated use av_channel_layout_index_from_channel()"] - pub fn av_get_channel_layout_channel_index( - channel_layout: u64, - channel: u64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[doc = " Get the channel with the given index in channel_layout.\n @deprecated use av_channel_layout_channel_from_index()"] - pub fn av_channel_layout_extract_channel( - channel_layout: u64, - index: ::std::os::raw::c_int, - ) -> u64; -} -extern "C" { - #[doc = " Get the name of a given channel.\n\n @return channel name on success, NULL on error.\n\n @deprecated use av_channel_name()"] - pub fn av_get_channel_name(channel: u64) -> *const ::std::os::raw::c_char; -} -extern "C" { - #[doc = " Get the description of a given channel.\n\n @param channel a channel layout with a single channel\n @return channel description on success, NULL on error\n @deprecated use av_channel_description()"] - pub fn av_get_channel_description(channel: u64) -> *const ::std::os::raw::c_char; -} -extern "C" { - #[doc = " Get the value and name of a standard channel layout.\n\n @param[in] index index in an internal list, starting at 0\n @param[out] layout channel layout mask\n @param[out] name name of the layout\n @return 0 if the layout exists,\n <0 if index is beyond the limits\n @deprecated use av_channel_layout_standard()"] - pub fn av_get_standard_channel_layout( - index: ::std::os::raw::c_uint, - layout: *mut u64, - name: *mut *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} extern "C" { #[doc = " Get a human readable string in an abbreviated form describing a given channel.\n This is the inverse function of @ref av_channel_from_string().\n\n @param buf pre-allocated buffer where to put the generated string\n @param buf_size size in bytes of the buffer.\n @param channel the AVChannel whose name to get\n @return amount of bytes needed to hold the output string, or a negative AVERROR\n on failure. If the returned value is bigger than buf_size, then the\n string was truncated."] pub fn av_channel_name( @@ -8388,6 +6589,13 @@ extern "C" { #[doc = " This is the inverse function of @ref av_channel_name().\n\n @return the channel with the given name\n AV_CHAN_NONE when name does not identify a known channel"] pub fn av_channel_from_string(name: *const ::std::os::raw::c_char) -> AVChannel; } +extern "C" { + #[doc = " Initialize a custom channel layout with the specified number of channels.\n The channel map will be allocated and the designation of all channels will\n be set to AV_CHAN_UNKNOWN.\n\n This is only a convenience helper function, a custom channel layout can also\n be constructed without using this.\n\n @param channel_layout the layout structure to be initialized\n @param nb_channels the number of channels\n\n @return 0 on success\n AVERROR(EINVAL) if the number of channels <= 0\n AVERROR(ENOMEM) if the channel map could not be allocated"] + pub fn av_channel_layout_custom_init( + channel_layout: *mut AVChannelLayout, + nb_channels: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} extern "C" { #[doc = " Initialize a native channel layout from a bitmask indicating which channels\n are present.\n\n @param channel_layout the layout structure to be initialized\n @param mask bitmask describing the channel layout\n\n @return 0 on success\n AVERROR(EINVAL) for invalid mask values"] pub fn av_channel_layout_from_mask( @@ -8396,7 +6604,7 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Initialize a channel layout from a given string description.\n The input string can be represented by:\n - the formal channel layout name (returned by av_channel_layout_describe())\n - single or multiple channel names (returned by av_channel_name(), eg. \"FL\",\n or concatenated with \"+\", each optionally containing a custom name after\n a \"@\", eg. \"FL@Left+FR@Right+LFE\")\n - a decimal or hexadecimal value of a native channel layout (eg. \"4\" or \"0x4\")\n - the number of channels with default layout (eg. \"4c\")\n - the number of unordered channels (eg. \"4C\" or \"4 channels\")\n - the ambisonic order followed by optional non-diegetic channels (eg.\n \"ambisonic 2+stereo\")\n\n @param channel_layout input channel layout\n @param str string describing the channel layout\n @return 0 channel layout was detected, AVERROR_INVALIDATATA otherwise"] + #[doc = " Initialize a channel layout from a given string description.\n The input string can be represented by:\n - the formal channel layout name (returned by av_channel_layout_describe())\n - single or multiple channel names (returned by av_channel_name(), eg. \"FL\",\n or concatenated with \"+\", each optionally containing a custom name after\n a \"@\", eg. \"FL@Left+FR@Right+LFE\")\n - a decimal or hexadecimal value of a native channel layout (eg. \"4\" or \"0x4\")\n - the number of channels with default layout (eg. \"4c\")\n - the number of unordered channels (eg. \"4C\" or \"4 channels\")\n - the ambisonic order followed by optional non-diegetic channels (eg.\n \"ambisonic 2+stereo\")\n On error, the channel layout will remain uninitialized, but not necessarily\n untouched.\n\n @param channel_layout uninitialized channel layout for the result\n @param str string describing the channel layout\n @return 0 on success parsing the channel layout\n AVERROR(EINVAL) if an invalid channel layout string was provided\n AVERROR(ENOMEM) if there was not enough memory"] pub fn av_channel_layout_from_string( channel_layout: *mut AVChannelLayout, str_: *const ::std::os::raw::c_char, @@ -8485,48 +6693,30 @@ extern "C" { chl1: *const AVChannelLayout, ) -> ::std::os::raw::c_int; } -#[doc = " @}"] +extern "C" { + #[doc = " Change the AVChannelOrder of a channel layout.\n\n Change of AVChannelOrder can be either lossless or lossy. In case of a\n lossless conversion all the channel designations and the associated channel\n names (if any) are kept. On a lossy conversion the channel names and channel\n designations might be lost depending on the capabilities of the desired\n AVChannelOrder. Note that some conversions are simply not possible in which\n case this function returns AVERROR(ENOSYS).\n\n The following conversions are supported:\n\n Any -> Custom : Always possible, always lossless.\n Any -> Unspecified: Always possible, lossless if channel designations\n are all unknown and channel names are not used, lossy otherwise.\n Custom -> Ambisonic : Possible if it contains ambisonic channels with\n optional non-diegetic channels in the end. Lossy if the channels have\n custom names, lossless otherwise.\n Custom -> Native : Possible if it contains native channels in native\n order. Lossy if the channels have custom names, lossless otherwise.\n\n On error this function keeps the original channel layout untouched.\n\n @param channel_layout channel layout which will be changed\n @param order the desired channel layout order\n @param flags a combination of AV_CHANNEL_LAYOUT_RETYPE_FLAG_* constants\n @return 0 if the conversion was successful and lossless or if the channel\n layout was already in the desired order\n >0 if the conversion was successful but lossy\n AVERROR(ENOSYS) if the conversion was not possible (or would be\n lossy and AV_CHANNEL_LAYOUT_RETYPE_FLAG_LOSSLESS was specified)\n AVERROR(EINVAL), AVERROR(ENOMEM) on error"] + pub fn av_channel_layout_retype( + channel_layout: *mut AVChannelLayout, + order: AVChannelOrder, + flags: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +#[doc = " @}"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AVDictionaryEntry { pub key: *mut ::std::os::raw::c_char, pub value: *mut ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_AVDictionaryEntry() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AVDictionaryEntry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVDictionaryEntry)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDictionaryEntry), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVDictionaryEntry), - "::", - stringify!(value) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDictionaryEntry"][::std::mem::size_of::() - 16usize]; + ["Alignment of AVDictionaryEntry"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVDictionaryEntry::key"] + [::std::mem::offset_of!(AVDictionaryEntry, key) - 0usize]; + ["Offset of field: AVDictionaryEntry::value"] + [::std::mem::offset_of!(AVDictionaryEntry, value) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AVDictionary { @@ -8643,7 +6833,7 @@ pub const AV_FRAME_DATA_REGIONS_OF_INTEREST: AVFrameSideDataType = 18; pub const AV_FRAME_DATA_VIDEO_ENC_PARAMS: AVFrameSideDataType = 19; #[doc = " User data unregistered metadata associated with a video frame.\n This is the H.26[45] UDU SEI message, and shouldn't be used for any other purpose\n The data is stored as uint8_t in AVFrameSideData.data which is 16 bytes of\n uuid_iso_iec_11578 followed by AVFrameSideData.size - 16 bytes of user_data_payload_byte."] pub const AV_FRAME_DATA_SEI_UNREGISTERED: AVFrameSideDataType = 20; -#[doc = " Film grain parameters for a frame, described by AVFilmGrainParams.\n Must be present for every frame which should have film grain applied."] +#[doc = " Film grain parameters for a frame, described by AVFilmGrainParams.\n Must be present for every frame which should have film grain applied.\n\n May be present multiple times, for example when there are multiple\n alternative parameter sets for different video signal characteristics.\n The user should select the most appropriate set for the application."] pub const AV_FRAME_DATA_FILM_GRAIN_PARAMS: AVFrameSideDataType = 21; #[doc = " Bounding boxes for object detection and classification,\n as described by AVDetectionBBoxHeader."] pub const AV_FRAME_DATA_DETECTION_BBOXES: AVFrameSideDataType = 22; @@ -8677,71 +6867,21 @@ pub struct AVFrameSideData { pub metadata: *mut AVDictionary, pub buf: *mut AVBufferRef, } -#[test] -fn bindgen_test_layout_AVFrameSideData() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(AVFrameSideData)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVFrameSideData)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFrameSideData), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVFrameSideData), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVFrameSideData), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metadata) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVFrameSideData), - "::", - stringify!(metadata) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buf) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVFrameSideData), - "::", - stringify!(buf) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFrameSideData"][::std::mem::size_of::() - 40usize]; + ["Alignment of AVFrameSideData"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVFrameSideData::type_"] + [::std::mem::offset_of!(AVFrameSideData, type_) - 0usize]; + ["Offset of field: AVFrameSideData::data"] + [::std::mem::offset_of!(AVFrameSideData, data) - 8usize]; + ["Offset of field: AVFrameSideData::size"] + [::std::mem::offset_of!(AVFrameSideData, size) - 16usize]; + ["Offset of field: AVFrameSideData::metadata"] + [::std::mem::offset_of!(AVFrameSideData, metadata) - 24usize]; + ["Offset of field: AVFrameSideData::buf"] + [::std::mem::offset_of!(AVFrameSideData, buf) - 32usize]; +}; #[doc = " Structure describing a single Region Of Interest.\n\n When multiple regions are defined in a single side-data block, they\n should be ordered from most to least important - some encoders are only\n capable of supporting a limited number of distinct regions, so will have\n to truncate the list.\n\n When overlapping regions are defined, the first region containing a given\n area of the frame applies."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -8756,81 +6896,23 @@ pub struct AVRegionOfInterest { #[doc = " Quantisation offset.\n\n Must be in the range -1 to +1. A value of zero indicates no quality\n change. A negative value asks for better quality (less quantisation),\n while a positive value asks for worse quality (greater quantisation).\n\n The range is calibrated so that the extreme values indicate the\n largest possible offset - if the rest of the frame is encoded with the\n worst possible quality, an offset of -1 indicates that this region\n should be encoded with the best possible quality anyway. Intermediate\n values are then interpolated in some codec-dependent way.\n\n For example, in 10-bit H.264 the quantisation parameter varies between\n -12 and 51. A typical qoffset value of -1/10 therefore indicates that\n this region should be encoded with a QP around one-tenth of the full\n range better than the rest of the frame. So, if most of the frame\n were to be encoded with a QP of around 30, this region would get a QP\n of around 24 (an offset of approximately -1/10 * (51 - -12) = -6.3).\n An extreme value of -1 would indicate that this region should be\n encoded with the best possible quality regardless of the treatment of\n the rest of the frame - that is, should be encoded at a QP of -12."] pub qoffset: AVRational, } -#[test] -fn bindgen_test_layout_AVRegionOfInterest() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(AVRegionOfInterest)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVRegionOfInterest)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).self_size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVRegionOfInterest), - "::", - stringify!(self_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVRegionOfInterest), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bottom) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVRegionOfInterest), - "::", - stringify!(bottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVRegionOfInterest), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).right) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVRegionOfInterest), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).qoffset) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AVRegionOfInterest), - "::", - stringify!(qoffset) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVRegionOfInterest"][::std::mem::size_of::() - 28usize]; + ["Alignment of AVRegionOfInterest"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVRegionOfInterest::self_size"] + [::std::mem::offset_of!(AVRegionOfInterest, self_size) - 0usize]; + ["Offset of field: AVRegionOfInterest::top"] + [::std::mem::offset_of!(AVRegionOfInterest, top) - 4usize]; + ["Offset of field: AVRegionOfInterest::bottom"] + [::std::mem::offset_of!(AVRegionOfInterest, bottom) - 8usize]; + ["Offset of field: AVRegionOfInterest::left"] + [::std::mem::offset_of!(AVRegionOfInterest, left) - 12usize]; + ["Offset of field: AVRegionOfInterest::right"] + [::std::mem::offset_of!(AVRegionOfInterest, right) - 16usize]; + ["Offset of field: AVRegionOfInterest::qoffset"] + [::std::mem::offset_of!(AVRegionOfInterest, qoffset) - 20usize]; +}; #[doc = " This structure describes decoded (raw) audio or video data.\n\n AVFrame must be allocated using av_frame_alloc(). Note that this only\n allocates the AVFrame itself, the buffers for the data must be managed\n through other means (see below).\n AVFrame must be freed with av_frame_free().\n\n AVFrame is typically allocated once and then reused multiple times to hold\n different data (e.g. a single AVFrame to hold frames received from a\n decoder). In such a case, av_frame_unref() will free any references held by\n the frame and reset it to its original clean state before it\n is reused again.\n\n The data described by an AVFrame is usually reference counted through the\n AVBuffer API. The underlying buffer references are stored in AVFrame.buf /\n AVFrame.extended_buf. An AVFrame is considered to be reference counted if at\n least one reference is set, i.e. if AVFrame.buf[0] != NULL. In such a case,\n every single data plane must be contained in one of the buffers in\n AVFrame.buf or AVFrame.extended_buf.\n There may be a single buffer for all the data, or one separate buffer for\n each plane, or anything in between.\n\n sizeof(AVFrame) is not a part of the public ABI, so new fields may be added\n to the end with a minor bump.\n\n Fields can be accessed through AVOptions, the name string used, matches the\n C structure field name for fields accessible through AVOptions. The AVClass\n for AVFrame can be obtained from avcodec_get_frame_class()"] #[repr(C)] #[derive(Copy, Clone)] @@ -8861,10 +6943,6 @@ pub struct AVFrame { pub pkt_dts: i64, #[doc = " Time base for the timestamps in this frame.\n In the future, this field may be set on frames output by decoders or\n filters, but its value will be by default ignored on input to encoders\n or filters."] pub time_base: AVRational, - #[doc = " picture number in bitstream order"] - pub coded_picture_number: ::std::os::raw::c_int, - #[doc = " picture number in display order"] - pub display_picture_number: ::std::os::raw::c_int, #[doc = " quality (between 1 (good) and FF_LAMBDA_MAX (bad))"] pub quality: ::std::os::raw::c_int, #[doc = " Frame owner's private data.\n\n This field may be set by the code that allocates/owns the frame data.\n It is then not touched by any library functions, except:\n - it is copied to other references by av_frame_copy_props() (and hence by\n av_frame_ref());\n - it is set to NULL when the frame is cleared by av_frame_unref()\n - on the caller's explicit request. E.g. libavcodec encoders/decoders\n will copy this field to/from @ref AVPacket \"AVPackets\" if the caller sets\n @ref AV_CODEC_FLAG_COPY_OPAQUE.\n\n @see opaque_ref the reference-counted analogue"] @@ -8877,12 +6955,8 @@ pub struct AVFrame { pub top_field_first: ::std::os::raw::c_int, #[doc = " Tell user application that palette has changed from previous frame."] pub palette_has_changed: ::std::os::raw::c_int, - #[doc = " reordered opaque 64 bits (generally an integer or a double precision float\n PTS but can be anything).\n The user sets AVCodecContext.reordered_opaque to represent the input at\n that time,\n the decoder reorders values as needed and sets AVFrame.reordered_opaque\n to exactly one of the values provided by the user through AVCodecContext.reordered_opaque\n\n @deprecated Use AV_CODEC_FLAG_COPY_OPAQUE instead"] - pub reordered_opaque: i64, #[doc = " Sample rate of the audio data."] pub sample_rate: ::std::os::raw::c_int, - #[doc = " Channel layout of the audio data.\n @deprecated use ch_layout instead"] - pub channel_layout: u64, #[doc = " AVBuffer references backing the data for this frame. All the pointers in\n data and extended_data must point inside one of the buffers in buf or\n extended_buf. This array must be filled contiguously -- if buf[i] is\n non-NULL then buf[j] must also be non-NULL for all j < i.\n\n There may be at most one AVBuffer per data plane, so for video this array\n always contains all the references. For planar audio with more than\n AV_NUM_DATA_POINTERS channels, there may be more buffers than can fit in\n this array. Then the extra AVBufferRef pointers are stored in the\n extended_buf array."] pub buf: [*mut AVBufferRef; 8usize], #[doc = " For planar audio which requires more than AV_NUM_DATA_POINTERS\n AVBufferRef pointers, this array will hold all the references which\n cannot fit into AVFrame.buf.\n\n Note that this is different from AVFrame.extended_data, which always\n contains all the pointers. This array only contains the extra pointers,\n which cannot fit into AVFrame.buf.\n\n This array is always allocated using av_malloc() by whoever constructs\n the frame. It is freed in av_frame_unref()."] @@ -8904,14 +6978,10 @@ pub struct AVFrame { pub best_effort_timestamp: i64, #[doc = " reordered pos from the last AVPacket that has been input into the decoder\n - encoding: unused\n - decoding: Read by user.\n @deprecated use AV_CODEC_FLAG_COPY_OPAQUE to pass through arbitrary user\n data from packets to frames"] pub pkt_pos: i64, - #[doc = " duration of the corresponding packet, expressed in\n AVStream->time_base units, 0 if unknown.\n - encoding: unused\n - decoding: Read by user.\n\n @deprecated use duration instead"] - pub pkt_duration: i64, #[doc = " metadata.\n - encoding: Set by user.\n - decoding: Set by libavcodec."] pub metadata: *mut AVDictionary, #[doc = " decode error flags of the frame, set to a combination of\n FF_DECODE_ERROR_xxx flags if the decoder produced a frame, but there\n were errors during the decoding.\n - encoding: unused\n - decoding: set by libavcodec, read by user."] pub decode_error_flags: ::std::os::raw::c_int, - #[doc = " number of audio channels, only used for audio.\n - encoding: unused\n - decoding: Read by user.\n @deprecated use ch_layout instead"] - pub channels: ::std::os::raw::c_int, #[doc = " size of the corresponding packet containing the compressed\n frame.\n It is set to a negative value if unknown.\n - encoding: unused\n - decoding: set by libavcodec, read by user.\n @deprecated use AV_CODEC_FLAG_COPY_OPAQUE to pass through arbitrary user\n data from packets to frames"] pub pkt_size: ::std::os::raw::c_int, #[doc = " For hwaccel-format frames, this should be a reference to the\n AVHWFramesContext describing the frame."] @@ -8930,534 +7000,81 @@ pub struct AVFrame { #[doc = " Duration of the frame, in the same units as pts. 0 if unknown."] pub duration: i64, } -#[test] -fn bindgen_test_layout_AVFrame() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 480usize, - concat!("Size of: ", stringify!(AVFrame)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVFrame)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).linesize) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(linesize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extended_data) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(extended_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 108usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_samples) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(nb_samples) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).key_frame) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(key_frame) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pict_type) as usize - ptr as usize }, - 124usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(pict_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sample_aspect_ratio) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(sample_aspect_ratio) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pts) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(pts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pkt_dts) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(pkt_dts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).time_base) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(time_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).coded_picture_number) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(coded_picture_number) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).display_picture_number) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(display_picture_number) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quality) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(quality) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(opaque) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).repeat_pict) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(repeat_pict) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).interlaced_frame) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(interlaced_frame) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top_field_first) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(top_field_first) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).palette_has_changed) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(palette_has_changed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reordered_opaque) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(reordered_opaque) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sample_rate) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(sample_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).channel_layout) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(channel_layout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buf) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(buf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extended_buf) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(extended_buf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_extended_buf) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(nb_extended_buf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).side_data) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(side_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_side_data) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(nb_side_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 316usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_range) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(color_range) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_primaries) as usize - ptr as usize }, - 324usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(color_primaries) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_trc) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(color_trc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).colorspace) as usize - ptr as usize }, - 332usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(colorspace) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chroma_location) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(chroma_location) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).best_effort_timestamp) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(best_effort_timestamp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pkt_pos) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(pkt_pos) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pkt_duration) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(pkt_duration) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metadata) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(metadata) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).decode_error_flags) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(decode_error_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).channels) as usize - ptr as usize }, - 380usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(channels) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pkt_size) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(pkt_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hw_frames_ctx) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(hw_frames_ctx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).opaque_ref) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(opaque_ref) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).crop_top) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(crop_top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).crop_bottom) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(crop_bottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).crop_left) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(crop_left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).crop_right) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(crop_right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).private_ref) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(private_ref) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ch_layout) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(ch_layout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).duration) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(AVFrame), - "::", - stringify!(duration) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFrame"][::std::mem::size_of::() - 440usize]; + ["Alignment of AVFrame"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVFrame::data"][::std::mem::offset_of!(AVFrame, data) - 0usize]; + ["Offset of field: AVFrame::linesize"][::std::mem::offset_of!(AVFrame, linesize) - 64usize]; + ["Offset of field: AVFrame::extended_data"] + [::std::mem::offset_of!(AVFrame, extended_data) - 96usize]; + ["Offset of field: AVFrame::width"][::std::mem::offset_of!(AVFrame, width) - 104usize]; + ["Offset of field: AVFrame::height"][::std::mem::offset_of!(AVFrame, height) - 108usize]; + ["Offset of field: AVFrame::nb_samples"] + [::std::mem::offset_of!(AVFrame, nb_samples) - 112usize]; + ["Offset of field: AVFrame::format"][::std::mem::offset_of!(AVFrame, format) - 116usize]; + ["Offset of field: AVFrame::key_frame"][::std::mem::offset_of!(AVFrame, key_frame) - 120usize]; + ["Offset of field: AVFrame::pict_type"][::std::mem::offset_of!(AVFrame, pict_type) - 124usize]; + ["Offset of field: AVFrame::sample_aspect_ratio"] + [::std::mem::offset_of!(AVFrame, sample_aspect_ratio) - 128usize]; + ["Offset of field: AVFrame::pts"][::std::mem::offset_of!(AVFrame, pts) - 136usize]; + ["Offset of field: AVFrame::pkt_dts"][::std::mem::offset_of!(AVFrame, pkt_dts) - 144usize]; + ["Offset of field: AVFrame::time_base"][::std::mem::offset_of!(AVFrame, time_base) - 152usize]; + ["Offset of field: AVFrame::quality"][::std::mem::offset_of!(AVFrame, quality) - 160usize]; + ["Offset of field: AVFrame::opaque"][::std::mem::offset_of!(AVFrame, opaque) - 168usize]; + ["Offset of field: AVFrame::repeat_pict"] + [::std::mem::offset_of!(AVFrame, repeat_pict) - 176usize]; + ["Offset of field: AVFrame::interlaced_frame"] + [::std::mem::offset_of!(AVFrame, interlaced_frame) - 180usize]; + ["Offset of field: AVFrame::top_field_first"] + [::std::mem::offset_of!(AVFrame, top_field_first) - 184usize]; + ["Offset of field: AVFrame::palette_has_changed"] + [::std::mem::offset_of!(AVFrame, palette_has_changed) - 188usize]; + ["Offset of field: AVFrame::sample_rate"] + [::std::mem::offset_of!(AVFrame, sample_rate) - 192usize]; + ["Offset of field: AVFrame::buf"][::std::mem::offset_of!(AVFrame, buf) - 200usize]; + ["Offset of field: AVFrame::extended_buf"] + [::std::mem::offset_of!(AVFrame, extended_buf) - 264usize]; + ["Offset of field: AVFrame::nb_extended_buf"] + [::std::mem::offset_of!(AVFrame, nb_extended_buf) - 272usize]; + ["Offset of field: AVFrame::side_data"][::std::mem::offset_of!(AVFrame, side_data) - 280usize]; + ["Offset of field: AVFrame::nb_side_data"] + [::std::mem::offset_of!(AVFrame, nb_side_data) - 288usize]; + ["Offset of field: AVFrame::flags"][::std::mem::offset_of!(AVFrame, flags) - 292usize]; + ["Offset of field: AVFrame::color_range"] + [::std::mem::offset_of!(AVFrame, color_range) - 296usize]; + ["Offset of field: AVFrame::color_primaries"] + [::std::mem::offset_of!(AVFrame, color_primaries) - 300usize]; + ["Offset of field: AVFrame::color_trc"][::std::mem::offset_of!(AVFrame, color_trc) - 304usize]; + ["Offset of field: AVFrame::colorspace"] + [::std::mem::offset_of!(AVFrame, colorspace) - 308usize]; + ["Offset of field: AVFrame::chroma_location"] + [::std::mem::offset_of!(AVFrame, chroma_location) - 312usize]; + ["Offset of field: AVFrame::best_effort_timestamp"] + [::std::mem::offset_of!(AVFrame, best_effort_timestamp) - 320usize]; + ["Offset of field: AVFrame::pkt_pos"][::std::mem::offset_of!(AVFrame, pkt_pos) - 328usize]; + ["Offset of field: AVFrame::metadata"][::std::mem::offset_of!(AVFrame, metadata) - 336usize]; + ["Offset of field: AVFrame::decode_error_flags"] + [::std::mem::offset_of!(AVFrame, decode_error_flags) - 344usize]; + ["Offset of field: AVFrame::pkt_size"][::std::mem::offset_of!(AVFrame, pkt_size) - 348usize]; + ["Offset of field: AVFrame::hw_frames_ctx"] + [::std::mem::offset_of!(AVFrame, hw_frames_ctx) - 352usize]; + ["Offset of field: AVFrame::opaque_ref"] + [::std::mem::offset_of!(AVFrame, opaque_ref) - 360usize]; + ["Offset of field: AVFrame::crop_top"][::std::mem::offset_of!(AVFrame, crop_top) - 368usize]; + ["Offset of field: AVFrame::crop_bottom"] + [::std::mem::offset_of!(AVFrame, crop_bottom) - 376usize]; + ["Offset of field: AVFrame::crop_left"][::std::mem::offset_of!(AVFrame, crop_left) - 384usize]; + ["Offset of field: AVFrame::crop_right"] + [::std::mem::offset_of!(AVFrame, crop_right) - 392usize]; + ["Offset of field: AVFrame::private_ref"] + [::std::mem::offset_of!(AVFrame, private_ref) - 400usize]; + ["Offset of field: AVFrame::ch_layout"][::std::mem::offset_of!(AVFrame, ch_layout) - 408usize]; + ["Offset of field: AVFrame::duration"][::std::mem::offset_of!(AVFrame, duration) - 432usize]; +}; impl ::std::fmt::Debug for AVFrame { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write ! (f , "AVFrame {{ data: {:?}, linesize: {:?}, extended_data: {:?}, width: {:?}, height: {:?}, nb_samples: {:?}, format: {:?}, key_frame: {:?}, pict_type: {:?}, sample_aspect_ratio: {:?}, pts: {:?}, pkt_dts: {:?}, time_base: {:?}, coded_picture_number: {:?}, display_picture_number: {:?}, quality: {:?}, opaque: {:?}, repeat_pict: {:?}, interlaced_frame: {:?}, top_field_first: {:?}, palette_has_changed: {:?}, reordered_opaque: {:?}, sample_rate: {:?}, channel_layout: {:?}, buf: {:?}, extended_buf: {:?}, nb_extended_buf: {:?}, side_data: {:?}, nb_side_data: {:?}, flags: {:?}, color_range: {:?}, color_primaries: {:?}, color_trc: {:?}, colorspace: {:?}, chroma_location: {:?}, best_effort_timestamp: {:?}, pkt_pos: {:?}, pkt_duration: {:?}, metadata: {:?}, decode_error_flags: {:?}, channels: {:?}, pkt_size: {:?}, hw_frames_ctx: {:?}, opaque_ref: {:?}, crop_top: {:?}, crop_bottom: {:?}, crop_left: {:?}, crop_right: {:?}, private_ref: {:?}, ch_layout: {:?}, duration: {:?} }}" , self . data , self . linesize , self . extended_data , self . width , self . height , self . nb_samples , self . format , self . key_frame , self . pict_type , self . sample_aspect_ratio , self . pts , self . pkt_dts , self . time_base , self . coded_picture_number , self . display_picture_number , self . quality , self . opaque , self . repeat_pict , self . interlaced_frame , self . top_field_first , self . palette_has_changed , self . reordered_opaque , self . sample_rate , self . channel_layout , self . buf , self . extended_buf , self . nb_extended_buf , self . side_data , self . nb_side_data , self . flags , self . color_range , self . color_primaries , self . color_trc , self . colorspace , self . chroma_location , self . best_effort_timestamp , self . pkt_pos , self . pkt_duration , self . metadata , self . decode_error_flags , self . channels , self . pkt_size , self . hw_frames_ctx , self . opaque_ref , self . crop_top , self . crop_bottom , self . crop_left , self . crop_right , self . private_ref , self . ch_layout , self . duration) + write ! (f , "AVFrame {{ data: {:?}, linesize: {:?}, extended_data: {:?}, width: {:?}, height: {:?}, nb_samples: {:?}, format: {:?}, key_frame: {:?}, pict_type: {:?}, sample_aspect_ratio: {:?}, pts: {:?}, pkt_dts: {:?}, time_base: {:?}, quality: {:?}, opaque: {:?}, repeat_pict: {:?}, interlaced_frame: {:?}, top_field_first: {:?}, palette_has_changed: {:?}, sample_rate: {:?}, buf: {:?}, extended_buf: {:?}, nb_extended_buf: {:?}, side_data: {:?}, nb_side_data: {:?}, flags: {:?}, color_range: {:?}, color_primaries: {:?}, color_trc: {:?}, colorspace: {:?}, chroma_location: {:?}, best_effort_timestamp: {:?}, pkt_pos: {:?}, metadata: {:?}, decode_error_flags: {:?}, pkt_size: {:?}, hw_frames_ctx: {:?}, opaque_ref: {:?}, crop_top: {:?}, crop_bottom: {:?}, crop_left: {:?}, crop_right: {:?}, private_ref: {:?}, ch_layout: {:?}, duration: {:?} }}" , self . data , self . linesize , self . extended_data , self . width , self . height , self . nb_samples , self . format , self . key_frame , self . pict_type , self . sample_aspect_ratio , self . pts , self . pkt_dts , self . time_base , self . quality , self . opaque , self . repeat_pict , self . interlaced_frame , self . top_field_first , self . palette_has_changed , self . sample_rate , self . buf , self . extended_buf , self . nb_extended_buf , self . side_data , self . nb_side_data , self . flags , self . color_range , self . color_primaries , self . color_trc , self . colorspace , self . chroma_location , self . best_effort_timestamp , self . pkt_pos , self . metadata , self . decode_error_flags , self . pkt_size , self . hw_frames_ctx , self . opaque_ref , self . crop_top , self . crop_bottom , self . crop_left , self . crop_right , self . private_ref , self . ch_layout , self . duration) } } extern "C" { @@ -9560,6 +7177,40 @@ extern "C" { #[doc = " @return a string identifying the side data type"] pub fn av_frame_side_data_name(type_: AVFrameSideDataType) -> *const ::std::os::raw::c_char; } +extern "C" { + #[doc = " Free all side data entries and their contents, then zeroes out the\n values which the pointers are pointing to.\n\n @param sd pointer to array of side data to free. Will be set to NULL\n upon return.\n @param nb_sd pointer to an integer containing the number of entries in\n the array. Will be set to 0 upon return."] + pub fn av_frame_side_data_free( + sd: *mut *mut *mut AVFrameSideData, + nb_sd: *mut ::std::os::raw::c_int, + ); +} +extern "C" { + #[doc = " Add new side data entry to an array.\n\n @param sd pointer to array of side data to which to add another entry,\n or to NULL in order to start a new array.\n @param nb_sd pointer to an integer containing the number of entries in\n the array.\n @param type type of the added side data\n @param size size of the side data\n @param flags Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0.\n\n @return newly added side data on success, NULL on error. In case of\n AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of matching\n AVFrameSideDataType will be removed before the addition is\n attempted."] + pub fn av_frame_side_data_new( + sd: *mut *mut *mut AVFrameSideData, + nb_sd: *mut ::std::os::raw::c_int, + type_: AVFrameSideDataType, + size: usize, + flags: ::std::os::raw::c_uint, + ) -> *mut AVFrameSideData; +} +extern "C" { + #[doc = " Add a new side data entry to an array based on existing side data, taking\n a reference towards the contained AVBufferRef.\n\n @param sd pointer to array of side data to which to add another entry,\n or to NULL in order to start a new array.\n @param nb_sd pointer to an integer containing the number of entries in\n the array.\n @param src side data to be cloned, with a new reference utilized\n for the buffer.\n @param flags Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0.\n\n @return negative error code on failure, >=0 on success. In case of\n AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of matching\n AVFrameSideDataType will be removed before the addition is\n attempted."] + pub fn av_frame_side_data_clone( + sd: *mut *mut *mut AVFrameSideData, + nb_sd: *mut ::std::os::raw::c_int, + src: *const AVFrameSideData, + flags: ::std::os::raw::c_uint, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[doc = " Get a side data entry of a specific type from an array.\n\n @param sd array of side data.\n @param nb_sd integer containing the number of entries in the array.\n @param type type of side data to be queried\n\n @return a pointer to the side data of a given type on success, NULL if there\n is no side data with such type in this set."] + pub fn av_frame_side_data_get_c( + sd: *const *const AVFrameSideData, + nb_sd: ::std::os::raw::c_int, + type_: AVFrameSideDataType, + ) -> *const AVFrameSideData; +} pub const AV_HWDEVICE_TYPE_NONE: AVHWDeviceType = 0; pub const AV_HWDEVICE_TYPE_VDPAU: AVHWDeviceType = 1; pub const AV_HWDEVICE_TYPE_CUDA: AVHWDeviceType = 2; @@ -9572,20 +7223,14 @@ pub const AV_HWDEVICE_TYPE_DRM: AVHWDeviceType = 8; pub const AV_HWDEVICE_TYPE_OPENCL: AVHWDeviceType = 9; pub const AV_HWDEVICE_TYPE_MEDIACODEC: AVHWDeviceType = 10; pub const AV_HWDEVICE_TYPE_VULKAN: AVHWDeviceType = 11; +pub const AV_HWDEVICE_TYPE_D3D12VA: AVHWDeviceType = 12; pub type AVHWDeviceType = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct AVHWDeviceInternal { - _unused: [u8; 0], -} #[doc = " This struct aggregates all the (hardware/vendor-specific) \"high-level\" state,\n i.e. state that is not tied to a concrete processing configuration.\n E.g., in an API that supports hardware-accelerated encoding and decoding,\n this struct will (if possible) wrap the state that is common to both encoding\n and decoding and from which specific instances of encoders or decoders can be\n derived.\n\n This struct is reference-counted with the AVBuffer mechanism. The\n av_hwdevice_ctx_alloc() constructor yields a reference, whose data field\n points to the actual AVHWDeviceContext. Further objects derived from\n AVHWDeviceContext (such as AVHWFramesContext, describing a frame pool with\n specific properties) will hold an internal reference to it. After all the\n references are released, the AVHWDeviceContext itself will be freed,\n optionally invoking a user-specified callback for uninitializing the hardware\n state."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AVHWDeviceContext { #[doc = " A class for logging. Set by av_hwdevice_ctx_alloc()."] pub av_class: *const AVClass, - #[doc = " Private data used internally by libavutil. Must not be accessed in any\n way by the caller."] - pub internal: *mut AVHWDeviceInternal, #[doc = " This field identifies the underlying API used for hardware access.\n\n This field is set when this struct is allocated and never changed\n afterwards."] pub type_: AVHWDeviceType, #[doc = " The format-specific data, allocated and freed by libavutil along with\n this context.\n\n Should be cast by the user to the format-specific context defined in the\n corresponding header (hwcontext_*.h) and filled as described in the\n documentation before calling av_hwdevice_ctx_init().\n\n After calling av_hwdevice_ctx_init() this struct should not be modified\n by the caller."] @@ -9595,99 +7240,32 @@ pub struct AVHWDeviceContext { #[doc = " Arbitrary user data, to be used e.g. by the free() callback."] pub user_opaque: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_AVHWDeviceContext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(AVHWDeviceContext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVHWDeviceContext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).av_class) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVHWDeviceContext), - "::", - stringify!(av_class) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).internal) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVHWDeviceContext), - "::", - stringify!(internal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVHWDeviceContext), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hwctx) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVHWDeviceContext), - "::", - stringify!(hwctx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).free) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVHWDeviceContext), - "::", - stringify!(free) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).user_opaque) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVHWDeviceContext), - "::", - stringify!(user_opaque) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct AVHWFramesInternal { - _unused: [u8; 0], -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVHWDeviceContext"][::std::mem::size_of::() - 40usize]; + ["Alignment of AVHWDeviceContext"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVHWDeviceContext::av_class"] + [::std::mem::offset_of!(AVHWDeviceContext, av_class) - 0usize]; + ["Offset of field: AVHWDeviceContext::type_"] + [::std::mem::offset_of!(AVHWDeviceContext, type_) - 8usize]; + ["Offset of field: AVHWDeviceContext::hwctx"] + [::std::mem::offset_of!(AVHWDeviceContext, hwctx) - 16usize]; + ["Offset of field: AVHWDeviceContext::free"] + [::std::mem::offset_of!(AVHWDeviceContext, free) - 24usize]; + ["Offset of field: AVHWDeviceContext::user_opaque"] + [::std::mem::offset_of!(AVHWDeviceContext, user_opaque) - 32usize]; +}; #[doc = " This struct describes a set or pool of \"hardware\" frames (i.e. those with\n data not located in normal system memory). All the frames in the pool are\n assumed to be allocated in the same way and interchangeable.\n\n This struct is reference-counted with the AVBuffer mechanism and tied to a\n given AVHWDeviceContext instance. The av_hwframe_ctx_alloc() constructor\n yields a reference, whose data field points to the actual AVHWFramesContext\n struct."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AVHWFramesContext { #[doc = " A class for logging."] pub av_class: *const AVClass, - #[doc = " Private data used internally by libavutil. Must not be accessed in any\n way by the caller."] - pub internal: *mut AVHWFramesInternal, #[doc = " A reference to the parent AVHWDeviceContext. This reference is owned and\n managed by the enclosing AVHWFramesContext, but the caller may derive\n additional references from it."] pub device_ref: *mut AVBufferRef, #[doc = " The parent AVHWDeviceContext. This is simply a pointer to\n device_ref->data provided for convenience.\n\n Set by libavutil in av_hwframe_ctx_init()."] pub device_ctx: *mut AVHWDeviceContext, - #[doc = " The format-specific data, allocated and freed automatically along with\n this context.\n\n Should be cast by the user to the format-specific context defined in the\n corresponding header (hwframe_*.h) and filled as described in the\n documentation before calling av_hwframe_ctx_init().\n\n After any frames using this context are created, the contents of this\n struct should not be modified by the caller."] + #[doc = " The format-specific data, allocated and freed automatically along with\n this context.\n\n The user shall ignore this field if the corresponding format-specific\n header (hwcontext_*.h) does not define a context to be used as\n AVHWFramesContext.hwctx.\n\n Otherwise, it should be cast by the user to said context and filled\n as described in the documentation before calling av_hwframe_ctx_init().\n\n After any frames using this context are created, the contents of this\n struct should not be modified by the caller."] pub hwctx: *mut ::std::os::raw::c_void, #[doc = " This field may be set by the caller before calling av_hwframe_ctx_init().\n\n If non-NULL, this callback will be called when the last reference to\n this context is unreferenced, immediately before it is freed."] pub free: ::std::option::Option, @@ -9706,151 +7284,35 @@ pub struct AVHWFramesContext { #[doc = " The allocated dimensions of the frames in this pool.\n\n Must be set by the user before calling av_hwframe_ctx_init()."] pub height: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVHWFramesContext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(AVHWFramesContext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVHWFramesContext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).av_class) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesContext), - "::", - stringify!(av_class) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).internal) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesContext), - "::", - stringify!(internal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).device_ref) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesContext), - "::", - stringify!(device_ref) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).device_ctx) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesContext), - "::", - stringify!(device_ctx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hwctx) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesContext), - "::", - stringify!(hwctx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).free) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesContext), - "::", - stringify!(free) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).user_opaque) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesContext), - "::", - stringify!(user_opaque) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pool) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesContext), - "::", - stringify!(pool) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).initial_pool_size) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesContext), - "::", - stringify!(initial_pool_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesContext), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sw_format) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesContext), - "::", - stringify!(sw_format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesContext), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesContext), - "::", - stringify!(height) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVHWFramesContext"][::std::mem::size_of::() - 80usize]; + ["Alignment of AVHWFramesContext"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVHWFramesContext::av_class"] + [::std::mem::offset_of!(AVHWFramesContext, av_class) - 0usize]; + ["Offset of field: AVHWFramesContext::device_ref"] + [::std::mem::offset_of!(AVHWFramesContext, device_ref) - 8usize]; + ["Offset of field: AVHWFramesContext::device_ctx"] + [::std::mem::offset_of!(AVHWFramesContext, device_ctx) - 16usize]; + ["Offset of field: AVHWFramesContext::hwctx"] + [::std::mem::offset_of!(AVHWFramesContext, hwctx) - 24usize]; + ["Offset of field: AVHWFramesContext::free"] + [::std::mem::offset_of!(AVHWFramesContext, free) - 32usize]; + ["Offset of field: AVHWFramesContext::user_opaque"] + [::std::mem::offset_of!(AVHWFramesContext, user_opaque) - 40usize]; + ["Offset of field: AVHWFramesContext::pool"] + [::std::mem::offset_of!(AVHWFramesContext, pool) - 48usize]; + ["Offset of field: AVHWFramesContext::initial_pool_size"] + [::std::mem::offset_of!(AVHWFramesContext, initial_pool_size) - 56usize]; + ["Offset of field: AVHWFramesContext::format"] + [::std::mem::offset_of!(AVHWFramesContext, format) - 60usize]; + ["Offset of field: AVHWFramesContext::sw_format"] + [::std::mem::offset_of!(AVHWFramesContext, sw_format) - 64usize]; + ["Offset of field: AVHWFramesContext::width"] + [::std::mem::offset_of!(AVHWFramesContext, width) - 68usize]; + ["Offset of field: AVHWFramesContext::height"] + [::std::mem::offset_of!(AVHWFramesContext, height) - 72usize]; +}; extern "C" { #[doc = " Look up an AVHWDeviceType by name.\n\n @param name String name of the device type (case-insensitive).\n @return The type from enum AVHWDeviceType, or AV_HWDEVICE_TYPE_NONE if\n not found."] pub fn av_hwdevice_find_type_by_name(name: *const ::std::os::raw::c_char) -> AVHWDeviceType; @@ -9953,82 +7415,24 @@ pub struct AVHWFramesConstraints { pub max_width: ::std::os::raw::c_int, pub max_height: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVHWFramesConstraints() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(AVHWFramesConstraints)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVHWFramesConstraints)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).valid_hw_formats) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesConstraints), - "::", - stringify!(valid_hw_formats) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).valid_sw_formats) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesConstraints), - "::", - stringify!(valid_sw_formats) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).min_width) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesConstraints), - "::", - stringify!(min_width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).min_height) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesConstraints), - "::", - stringify!(min_height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_width) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesConstraints), - "::", - stringify!(max_width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_height) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AVHWFramesConstraints), - "::", - stringify!(max_height) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVHWFramesConstraints"][::std::mem::size_of::() - 32usize]; + ["Alignment of AVHWFramesConstraints"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AVHWFramesConstraints::valid_hw_formats"] + [::std::mem::offset_of!(AVHWFramesConstraints, valid_hw_formats) - 0usize]; + ["Offset of field: AVHWFramesConstraints::valid_sw_formats"] + [::std::mem::offset_of!(AVHWFramesConstraints, valid_sw_formats) - 8usize]; + ["Offset of field: AVHWFramesConstraints::min_width"] + [::std::mem::offset_of!(AVHWFramesConstraints, min_width) - 16usize]; + ["Offset of field: AVHWFramesConstraints::min_height"] + [::std::mem::offset_of!(AVHWFramesConstraints, min_height) - 20usize]; + ["Offset of field: AVHWFramesConstraints::max_width"] + [::std::mem::offset_of!(AVHWFramesConstraints, max_width) - 24usize]; + ["Offset of field: AVHWFramesConstraints::max_height"] + [::std::mem::offset_of!(AVHWFramesConstraints, max_height) - 28usize]; +}; extern "C" { #[doc = " Allocate a HW-specific configuration structure for a given HW device.\n After use, the user must free all members as required by the specific\n hardware structure being used, then free the structure itself with\n av_free().\n\n @param device_ctx a reference to the associated AVHWDeviceContext.\n @return The newly created HW-specific configuration structure on\n success or NULL on failure."] pub fn av_hwdevice_hwconfig_alloc(device_ctx: *mut AVBufferRef) -> *mut ::std::os::raw::c_void; @@ -10274,75 +7678,75 @@ pub const AV_CODEC_ID_Y41P: AVCodecID = 197; pub const AV_CODEC_ID_AVRP: AVCodecID = 198; pub const AV_CODEC_ID_012V: AVCodecID = 199; pub const AV_CODEC_ID_AVUI: AVCodecID = 200; -pub const AV_CODEC_ID_AYUV: AVCodecID = 201; -pub const AV_CODEC_ID_TARGA_Y216: AVCodecID = 202; -pub const AV_CODEC_ID_V308: AVCodecID = 203; -pub const AV_CODEC_ID_V408: AVCodecID = 204; -pub const AV_CODEC_ID_YUV4: AVCodecID = 205; -pub const AV_CODEC_ID_AVRN: AVCodecID = 206; -pub const AV_CODEC_ID_CPIA: AVCodecID = 207; -pub const AV_CODEC_ID_XFACE: AVCodecID = 208; -pub const AV_CODEC_ID_SNOW: AVCodecID = 209; -pub const AV_CODEC_ID_SMVJPEG: AVCodecID = 210; -pub const AV_CODEC_ID_APNG: AVCodecID = 211; -pub const AV_CODEC_ID_DAALA: AVCodecID = 212; -pub const AV_CODEC_ID_CFHD: AVCodecID = 213; -pub const AV_CODEC_ID_TRUEMOTION2RT: AVCodecID = 214; -pub const AV_CODEC_ID_M101: AVCodecID = 215; -pub const AV_CODEC_ID_MAGICYUV: AVCodecID = 216; -pub const AV_CODEC_ID_SHEERVIDEO: AVCodecID = 217; -pub const AV_CODEC_ID_YLC: AVCodecID = 218; -pub const AV_CODEC_ID_PSD: AVCodecID = 219; -pub const AV_CODEC_ID_PIXLET: AVCodecID = 220; -pub const AV_CODEC_ID_SPEEDHQ: AVCodecID = 221; -pub const AV_CODEC_ID_FMVC: AVCodecID = 222; -pub const AV_CODEC_ID_SCPR: AVCodecID = 223; -pub const AV_CODEC_ID_CLEARVIDEO: AVCodecID = 224; -pub const AV_CODEC_ID_XPM: AVCodecID = 225; -pub const AV_CODEC_ID_AV1: AVCodecID = 226; -pub const AV_CODEC_ID_BITPACKED: AVCodecID = 227; -pub const AV_CODEC_ID_MSCC: AVCodecID = 228; -pub const AV_CODEC_ID_SRGC: AVCodecID = 229; -pub const AV_CODEC_ID_SVG: AVCodecID = 230; -pub const AV_CODEC_ID_GDV: AVCodecID = 231; -pub const AV_CODEC_ID_FITS: AVCodecID = 232; -pub const AV_CODEC_ID_IMM4: AVCodecID = 233; -pub const AV_CODEC_ID_PROSUMER: AVCodecID = 234; -pub const AV_CODEC_ID_MWSC: AVCodecID = 235; -pub const AV_CODEC_ID_WCMV: AVCodecID = 236; -pub const AV_CODEC_ID_RASC: AVCodecID = 237; -pub const AV_CODEC_ID_HYMT: AVCodecID = 238; -pub const AV_CODEC_ID_ARBC: AVCodecID = 239; -pub const AV_CODEC_ID_AGM: AVCodecID = 240; -pub const AV_CODEC_ID_LSCR: AVCodecID = 241; -pub const AV_CODEC_ID_VP4: AVCodecID = 242; -pub const AV_CODEC_ID_IMM5: AVCodecID = 243; -pub const AV_CODEC_ID_MVDV: AVCodecID = 244; -pub const AV_CODEC_ID_MVHA: AVCodecID = 245; -pub const AV_CODEC_ID_CDTOONS: AVCodecID = 246; -pub const AV_CODEC_ID_MV30: AVCodecID = 247; -pub const AV_CODEC_ID_NOTCHLC: AVCodecID = 248; -pub const AV_CODEC_ID_PFM: AVCodecID = 249; -pub const AV_CODEC_ID_MOBICLIP: AVCodecID = 250; -pub const AV_CODEC_ID_PHOTOCD: AVCodecID = 251; -pub const AV_CODEC_ID_IPU: AVCodecID = 252; -pub const AV_CODEC_ID_ARGO: AVCodecID = 253; -pub const AV_CODEC_ID_CRI: AVCodecID = 254; -pub const AV_CODEC_ID_SIMBIOSIS_IMX: AVCodecID = 255; -pub const AV_CODEC_ID_SGA_VIDEO: AVCodecID = 256; -pub const AV_CODEC_ID_GEM: AVCodecID = 257; -pub const AV_CODEC_ID_VBN: AVCodecID = 258; -pub const AV_CODEC_ID_JPEGXL: AVCodecID = 259; -pub const AV_CODEC_ID_QOI: AVCodecID = 260; -pub const AV_CODEC_ID_PHM: AVCodecID = 261; -pub const AV_CODEC_ID_RADIANCE_HDR: AVCodecID = 262; -pub const AV_CODEC_ID_WBMP: AVCodecID = 263; -pub const AV_CODEC_ID_MEDIA100: AVCodecID = 264; -pub const AV_CODEC_ID_VQC: AVCodecID = 265; -pub const AV_CODEC_ID_PDV: AVCodecID = 266; -pub const AV_CODEC_ID_EVC: AVCodecID = 267; -pub const AV_CODEC_ID_RTV1: AVCodecID = 268; -pub const AV_CODEC_ID_VMIX: AVCodecID = 269; +pub const AV_CODEC_ID_TARGA_Y216: AVCodecID = 201; +pub const AV_CODEC_ID_V308: AVCodecID = 202; +pub const AV_CODEC_ID_V408: AVCodecID = 203; +pub const AV_CODEC_ID_YUV4: AVCodecID = 204; +pub const AV_CODEC_ID_AVRN: AVCodecID = 205; +pub const AV_CODEC_ID_CPIA: AVCodecID = 206; +pub const AV_CODEC_ID_XFACE: AVCodecID = 207; +pub const AV_CODEC_ID_SNOW: AVCodecID = 208; +pub const AV_CODEC_ID_SMVJPEG: AVCodecID = 209; +pub const AV_CODEC_ID_APNG: AVCodecID = 210; +pub const AV_CODEC_ID_DAALA: AVCodecID = 211; +pub const AV_CODEC_ID_CFHD: AVCodecID = 212; +pub const AV_CODEC_ID_TRUEMOTION2RT: AVCodecID = 213; +pub const AV_CODEC_ID_M101: AVCodecID = 214; +pub const AV_CODEC_ID_MAGICYUV: AVCodecID = 215; +pub const AV_CODEC_ID_SHEERVIDEO: AVCodecID = 216; +pub const AV_CODEC_ID_YLC: AVCodecID = 217; +pub const AV_CODEC_ID_PSD: AVCodecID = 218; +pub const AV_CODEC_ID_PIXLET: AVCodecID = 219; +pub const AV_CODEC_ID_SPEEDHQ: AVCodecID = 220; +pub const AV_CODEC_ID_FMVC: AVCodecID = 221; +pub const AV_CODEC_ID_SCPR: AVCodecID = 222; +pub const AV_CODEC_ID_CLEARVIDEO: AVCodecID = 223; +pub const AV_CODEC_ID_XPM: AVCodecID = 224; +pub const AV_CODEC_ID_AV1: AVCodecID = 225; +pub const AV_CODEC_ID_BITPACKED: AVCodecID = 226; +pub const AV_CODEC_ID_MSCC: AVCodecID = 227; +pub const AV_CODEC_ID_SRGC: AVCodecID = 228; +pub const AV_CODEC_ID_SVG: AVCodecID = 229; +pub const AV_CODEC_ID_GDV: AVCodecID = 230; +pub const AV_CODEC_ID_FITS: AVCodecID = 231; +pub const AV_CODEC_ID_IMM4: AVCodecID = 232; +pub const AV_CODEC_ID_PROSUMER: AVCodecID = 233; +pub const AV_CODEC_ID_MWSC: AVCodecID = 234; +pub const AV_CODEC_ID_WCMV: AVCodecID = 235; +pub const AV_CODEC_ID_RASC: AVCodecID = 236; +pub const AV_CODEC_ID_HYMT: AVCodecID = 237; +pub const AV_CODEC_ID_ARBC: AVCodecID = 238; +pub const AV_CODEC_ID_AGM: AVCodecID = 239; +pub const AV_CODEC_ID_LSCR: AVCodecID = 240; +pub const AV_CODEC_ID_VP4: AVCodecID = 241; +pub const AV_CODEC_ID_IMM5: AVCodecID = 242; +pub const AV_CODEC_ID_MVDV: AVCodecID = 243; +pub const AV_CODEC_ID_MVHA: AVCodecID = 244; +pub const AV_CODEC_ID_CDTOONS: AVCodecID = 245; +pub const AV_CODEC_ID_MV30: AVCodecID = 246; +pub const AV_CODEC_ID_NOTCHLC: AVCodecID = 247; +pub const AV_CODEC_ID_PFM: AVCodecID = 248; +pub const AV_CODEC_ID_MOBICLIP: AVCodecID = 249; +pub const AV_CODEC_ID_PHOTOCD: AVCodecID = 250; +pub const AV_CODEC_ID_IPU: AVCodecID = 251; +pub const AV_CODEC_ID_ARGO: AVCodecID = 252; +pub const AV_CODEC_ID_CRI: AVCodecID = 253; +pub const AV_CODEC_ID_SIMBIOSIS_IMX: AVCodecID = 254; +pub const AV_CODEC_ID_SGA_VIDEO: AVCodecID = 255; +pub const AV_CODEC_ID_GEM: AVCodecID = 256; +pub const AV_CODEC_ID_VBN: AVCodecID = 257; +pub const AV_CODEC_ID_JPEGXL: AVCodecID = 258; +pub const AV_CODEC_ID_QOI: AVCodecID = 259; +pub const AV_CODEC_ID_PHM: AVCodecID = 260; +pub const AV_CODEC_ID_RADIANCE_HDR: AVCodecID = 261; +pub const AV_CODEC_ID_WBMP: AVCodecID = 262; +pub const AV_CODEC_ID_MEDIA100: AVCodecID = 263; +pub const AV_CODEC_ID_VQC: AVCodecID = 264; +pub const AV_CODEC_ID_PDV: AVCodecID = 265; +pub const AV_CODEC_ID_EVC: AVCodecID = 266; +pub const AV_CODEC_ID_RTV1: AVCodecID = 267; +pub const AV_CODEC_ID_VMIX: AVCodecID = 268; +pub const AV_CODEC_ID_LEAD: AVCodecID = 269; #[doc = "< A dummy id pointing at the start of audio codecs"] pub const AV_CODEC_ID_FIRST_AUDIO: AVCodecID = 65536; pub const AV_CODEC_ID_PCM_S16LE: AVCodecID = 65536; @@ -10554,6 +7958,7 @@ pub const AV_CODEC_ID_WAVARC: AVCodecID = 86117; pub const AV_CODEC_ID_RKA: AVCodecID = 86118; pub const AV_CODEC_ID_AC4: AVCodecID = 86119; pub const AV_CODEC_ID_OSQ: AVCodecID = 86120; +pub const AV_CODEC_ID_QOA: AVCodecID = 86121; #[doc = "< A dummy ID pointing at the start of subtitle codecs."] pub const AV_CODEC_ID_FIRST_SUBTITLE: AVCodecID = 94208; pub const AV_CODEC_ID_DVD_SUBTITLE: AVCodecID = 94208; @@ -10649,41 +8054,13 @@ pub struct AVProfile { #[doc = "< short name for the profile"] pub name: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_AVProfile() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AVProfile)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVProfile)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).profile) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVProfile), - "::", - stringify!(profile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVProfile), - "::", - stringify!(name) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVProfile"][::std::mem::size_of::() - 16usize]; + ["Alignment of AVProfile"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVProfile::profile"][::std::mem::offset_of!(AVProfile, profile) - 0usize]; + ["Offset of field: AVProfile::name"][::std::mem::offset_of!(AVProfile, name) - 8usize]; +}; #[doc = " AVCodec."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -10706,8 +8083,6 @@ pub struct AVCodec { pub supported_samplerates: *const ::std::os::raw::c_int, #[doc = "< array of supported sample formats, or NULL if unknown, array is terminated by -1"] pub sample_fmts: *const AVSampleFormat, - #[doc = "< array of support channel layouts, or NULL if unknown. array is terminated by 0"] - pub channel_layouts: *const u64, #[doc = "< AVClass for the private context"] pub priv_class: *const AVClass, #[doc = "< array of recognized profiles, or NULL if unknown, array is terminated by {AV_PROFILE_UNKNOWN}"] @@ -10717,171 +8092,30 @@ pub struct AVCodec { #[doc = " Array of supported channel layouts, terminated with a zeroed layout."] pub ch_layouts: *const AVChannelLayout, } -#[test] -fn bindgen_test_layout_AVCodec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(AVCodec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVCodec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVCodec), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).long_name) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVCodec), - "::", - stringify!(long_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVCodec), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AVCodec), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVCodec), - "::", - stringify!(capabilities) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_lowres) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AVCodec), - "::", - stringify!(max_lowres) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).supported_framerates) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVCodec), - "::", - stringify!(supported_framerates) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pix_fmts) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVCodec), - "::", - stringify!(pix_fmts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).supported_samplerates) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVCodec), - "::", - stringify!(supported_samplerates) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sample_fmts) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVCodec), - "::", - stringify!(sample_fmts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).channel_layouts) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVCodec), - "::", - stringify!(channel_layouts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priv_class) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVCodec), - "::", - stringify!(priv_class) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).profiles) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVCodec), - "::", - stringify!(profiles) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wrapper_name) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(AVCodec), - "::", - stringify!(wrapper_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ch_layouts) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(AVCodec), - "::", - stringify!(ch_layouts) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVCodec"][::std::mem::size_of::() - 96usize]; + ["Alignment of AVCodec"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVCodec::name"][::std::mem::offset_of!(AVCodec, name) - 0usize]; + ["Offset of field: AVCodec::long_name"][::std::mem::offset_of!(AVCodec, long_name) - 8usize]; + ["Offset of field: AVCodec::type_"][::std::mem::offset_of!(AVCodec, type_) - 16usize]; + ["Offset of field: AVCodec::id"][::std::mem::offset_of!(AVCodec, id) - 20usize]; + ["Offset of field: AVCodec::capabilities"] + [::std::mem::offset_of!(AVCodec, capabilities) - 24usize]; + ["Offset of field: AVCodec::max_lowres"][::std::mem::offset_of!(AVCodec, max_lowres) - 28usize]; + ["Offset of field: AVCodec::supported_framerates"] + [::std::mem::offset_of!(AVCodec, supported_framerates) - 32usize]; + ["Offset of field: AVCodec::pix_fmts"][::std::mem::offset_of!(AVCodec, pix_fmts) - 40usize]; + ["Offset of field: AVCodec::supported_samplerates"] + [::std::mem::offset_of!(AVCodec, supported_samplerates) - 48usize]; + ["Offset of field: AVCodec::sample_fmts"] + [::std::mem::offset_of!(AVCodec, sample_fmts) - 56usize]; + ["Offset of field: AVCodec::priv_class"][::std::mem::offset_of!(AVCodec, priv_class) - 64usize]; + ["Offset of field: AVCodec::profiles"][::std::mem::offset_of!(AVCodec, profiles) - 72usize]; + ["Offset of field: AVCodec::wrapper_name"] + [::std::mem::offset_of!(AVCodec, wrapper_name) - 80usize]; + ["Offset of field: AVCodec::ch_layouts"][::std::mem::offset_of!(AVCodec, ch_layouts) - 88usize]; +}; extern "C" { #[doc = " Iterate over all registered codecs.\n\n @param opaque a pointer where libavcodec will store the iteration state. Must\n point to NULL to start the iteration.\n\n @return the next registered codec or NULL when the iteration is\n finished"] pub fn av_codec_iterate(opaque: *mut *mut ::std::os::raw::c_void) -> *const AVCodec; @@ -10936,51 +8170,17 @@ pub struct AVCodecHWConfig { #[doc = " The device type associated with the configuration.\n\n Must be set for AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX and\n AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX, otherwise unused."] pub device_type: AVHWDeviceType, } -#[test] -fn bindgen_test_layout_AVCodecHWConfig() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(AVCodecHWConfig)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVCodecHWConfig)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pix_fmt) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVCodecHWConfig), - "::", - stringify!(pix_fmt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).methods) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVCodecHWConfig), - "::", - stringify!(methods) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).device_type) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVCodecHWConfig), - "::", - stringify!(device_type) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVCodecHWConfig"][::std::mem::size_of::() - 12usize]; + ["Alignment of AVCodecHWConfig"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVCodecHWConfig::pix_fmt"] + [::std::mem::offset_of!(AVCodecHWConfig, pix_fmt) - 0usize]; + ["Offset of field: AVCodecHWConfig::methods"] + [::std::mem::offset_of!(AVCodecHWConfig, methods) - 4usize]; + ["Offset of field: AVCodecHWConfig::device_type"] + [::std::mem::offset_of!(AVCodecHWConfig, device_type) - 8usize]; +}; extern "C" { #[doc = " Retrieve supported hardware configurations for a codec.\n\n Values of index from zero to some maximum return the indexed configuration\n descriptor; all other values return NULL. If the codec does not support\n any hardware configurations then it will always return NULL."] pub fn avcodec_get_hw_config( @@ -11039,61 +8239,15 @@ pub struct AVPanScan { #[doc = " position of the top left corner in 1/16 pel for up to 3 fields/frames\n - encoding: Set by user.\n - decoding: Set by libavcodec."] pub position: [[i16; 2usize]; 3usize], } -#[test] -fn bindgen_test_layout_AVPanScan() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AVPanScan)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVPanScan)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVPanScan), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVPanScan), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVPanScan), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).position) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVPanScan), - "::", - stringify!(position) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVPanScan"][::std::mem::size_of::() - 24usize]; + ["Alignment of AVPanScan"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVPanScan::id"][::std::mem::offset_of!(AVPanScan, id) - 0usize]; + ["Offset of field: AVPanScan::width"][::std::mem::offset_of!(AVPanScan, width) - 4usize]; + ["Offset of field: AVPanScan::height"][::std::mem::offset_of!(AVPanScan, height) - 8usize]; + ["Offset of field: AVPanScan::position"][::std::mem::offset_of!(AVPanScan, position) - 12usize]; +}; #[doc = " This structure describes the bitrate properties of an encoded bitstream. It\n roughly corresponds to a subset the VBV parameters for MPEG-2 or HRD\n parameters for H.264/HEVC."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -11109,71 +8263,21 @@ pub struct AVCPBProperties { #[doc = " The delay between the time the packet this structure is associated with\n is received and the time when it should be decoded, in periods of a 27MHz\n clock.\n\n UINT64_MAX when unknown or unspecified."] pub vbv_delay: u64, } -#[test] -fn bindgen_test_layout_AVCPBProperties() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(AVCPBProperties)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVCPBProperties)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_bitrate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVCPBProperties), - "::", - stringify!(max_bitrate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).min_bitrate) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVCPBProperties), - "::", - stringify!(min_bitrate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).avg_bitrate) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVCPBProperties), - "::", - stringify!(avg_bitrate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buffer_size) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVCPBProperties), - "::", - stringify!(buffer_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vbv_delay) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVCPBProperties), - "::", - stringify!(vbv_delay) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVCPBProperties"][::std::mem::size_of::() - 40usize]; + ["Alignment of AVCPBProperties"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVCPBProperties::max_bitrate"] + [::std::mem::offset_of!(AVCPBProperties, max_bitrate) - 0usize]; + ["Offset of field: AVCPBProperties::min_bitrate"] + [::std::mem::offset_of!(AVCPBProperties, min_bitrate) - 8usize]; + ["Offset of field: AVCPBProperties::avg_bitrate"] + [::std::mem::offset_of!(AVCPBProperties, avg_bitrate) - 16usize]; + ["Offset of field: AVCPBProperties::buffer_size"] + [::std::mem::offset_of!(AVCPBProperties, buffer_size) - 24usize]; + ["Offset of field: AVCPBProperties::vbv_delay"] + [::std::mem::offset_of!(AVCPBProperties, vbv_delay) - 32usize]; +}; extern "C" { #[doc = " Allocate a CPB properties structure and initialize its fields to default\n values.\n\n @param size if non-NULL, the size of the allocated struct will be written\n here. This is useful for embedding it in side data.\n\n @return the newly allocated struct or NULL on failure"] pub fn av_cpb_properties_alloc(size: *mut usize) -> *mut AVCPBProperties; @@ -11186,42 +8290,16 @@ pub struct AVProducerReferenceTime { pub wallclock: i64, pub flags: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVProducerReferenceTime() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AVProducerReferenceTime)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVProducerReferenceTime)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wallclock) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVProducerReferenceTime), - "::", - stringify!(wallclock) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVProducerReferenceTime), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVProducerReferenceTime"][::std::mem::size_of::() - 16usize]; + ["Alignment of AVProducerReferenceTime"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AVProducerReferenceTime::wallclock"] + [::std::mem::offset_of!(AVProducerReferenceTime, wallclock) - 0usize]; + ["Offset of field: AVProducerReferenceTime::flags"] + [::std::mem::offset_of!(AVProducerReferenceTime, flags) - 8usize]; +}; extern "C" { #[doc = " Encode extradata length to a buffer. Used by xiph codecs.\n\n @param s buffer to write to; must be at least (v/255+1) bytes long\n @param v size of extradata in bytes\n @return number of bytes written to the buffer."] pub fn av_xiphlacing( @@ -11293,8 +8371,16 @@ pub const AV_PKT_DATA_DOVI_CONF: AVPacketSideDataType = 29; pub const AV_PKT_DATA_S12M_TIMECODE: AVPacketSideDataType = 30; #[doc = " HDR10+ dynamic metadata associated with a video frame. The metadata is in\n the form of the AVDynamicHDRPlus struct and contains\n information for color volume transform - application 4 of\n SMPTE 2094-40:2016 standard."] pub const AV_PKT_DATA_DYNAMIC_HDR10_PLUS: AVPacketSideDataType = 31; +#[doc = " IAMF Mix Gain Parameter Data associated with the audio frame. This metadata\n is in the form of the AVIAMFParamDefinition struct and contains information\n defined in sections 3.6.1 and 3.8.1 of the Immersive Audio Model and\n Formats standard."] +pub const AV_PKT_DATA_IAMF_MIX_GAIN_PARAM: AVPacketSideDataType = 32; +#[doc = " IAMF Demixing Info Parameter Data associated with the audio frame. This\n metadata is in the form of the AVIAMFParamDefinition struct and contains\n information defined in sections 3.6.1 and 3.8.2 of the Immersive Audio Model\n and Formats standard."] +pub const AV_PKT_DATA_IAMF_DEMIXING_INFO_PARAM: AVPacketSideDataType = 33; +#[doc = " IAMF Recon Gain Info Parameter Data associated with the audio frame. This\n metadata is in the form of the AVIAMFParamDefinition struct and contains\n information defined in sections 3.6.1 and 3.8.3 of the Immersive Audio Model\n and Formats standard."] +pub const AV_PKT_DATA_IAMF_RECON_GAIN_INFO_PARAM: AVPacketSideDataType = 34; +#[doc = " Ambient viewing environment metadata, as defined by H.274. This metadata\n should be associated with a video stream and contains data in the form\n of the AVAmbientViewingEnvironment struct."] +pub const AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT: AVPacketSideDataType = 35; #[doc = " The number of side data types.\n This is not part of the public API/ABI in the sense that it may\n change when new side data types are added.\n This must stay the last enum value.\n If its value becomes huge, some code using it\n needs to be updated as it assumes it to be smaller than other limits."] -pub const AV_PKT_DATA_NB: AVPacketSideDataType = 32; +pub const AV_PKT_DATA_NB: AVPacketSideDataType = 36; #[doc = " @defgroup lavc_packet_side_data AVPacketSideData\n\n Types and functions for working with AVPacketSideData.\n @{"] pub type AVPacketSideDataType = ::std::os::raw::c_uint; #[doc = " This structure stores auxiliary information for decoding, presenting, or\n otherwise processing the coded stream. It is typically exported by demuxers\n and encoders and can be fed to decoders and muxers either in a per packet\n basis, or as global side data (applying to the entire coded stream).\n\n Global side data is handled as follows:\n - During demuxing, it may be exported through\n @ref AVStream.codecpar.side_data \"AVStream's codec parameters\", which can\n then be passed as input to decoders through the\n @ref AVCodecContext.coded_side_data \"decoder context's side data\", for\n initialization.\n - For muxing, it can be fed through @ref AVStream.codecpar.side_data\n \"AVStream's codec parameters\", typically the output of encoders through\n the @ref AVCodecContext.coded_side_data \"encoder context's side data\", for\n initialization.\n\n Packet specific side data is handled as follows:\n - During demuxing, it may be exported through @ref AVPacket.side_data\n \"AVPacket's side data\", which can then be passed as input to decoders.\n - For muxing, it can be fed through @ref AVPacket.side_data \"AVPacket's\n side data\", typically the output of encoders.\n\n Different modules may accept or export different types of side data\n depending on media type and codec. Refer to @ref AVPacketSideDataType for a\n list of defined types and where they may be found or used."] @@ -11305,51 +8391,17 @@ pub struct AVPacketSideData { pub size: usize, pub type_: AVPacketSideDataType, } -#[test] -fn bindgen_test_layout_AVPacketSideData() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AVPacketSideData)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVPacketSideData)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVPacketSideData), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVPacketSideData), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVPacketSideData), - "::", - stringify!(type_) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVPacketSideData"][::std::mem::size_of::() - 24usize]; + ["Alignment of AVPacketSideData"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVPacketSideData::data"] + [::std::mem::offset_of!(AVPacketSideData, data) - 0usize]; + ["Offset of field: AVPacketSideData::size"] + [::std::mem::offset_of!(AVPacketSideData, size) - 8usize]; + ["Offset of field: AVPacketSideData::type_"] + [::std::mem::offset_of!(AVPacketSideData, type_) - 16usize]; +}; extern "C" { #[doc = " Allocate a new packet side data.\n\n @param sd pointer to an array of side data to which the side data should\n be added. *sd may be NULL, in which case the array will be\n initialized.\n @param nb_sd pointer to an integer containing the number of entries in\n the array. The integer value will be increased by 1 on success.\n @param type side data type\n @param size desired side data size\n @param flags currently unused. Must be zero\n\n @return pointer to freshly allocated side data on success, or NULL otherwise."] pub fn av_packet_side_data_new( @@ -11426,206 +8478,41 @@ pub struct AVPacket { #[doc = " Time base of the packet's timestamps.\n In the future, this field may be set on packets output by encoders or\n demuxers, but its value will be by default ignored on input to decoders\n or muxers."] pub time_base: AVRational, } -#[test] -fn bindgen_test_layout_AVPacket() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(AVPacket)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVPacket)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVPacket), - "::", - stringify!(buf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pts) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVPacket), - "::", - stringify!(pts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dts) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVPacket), - "::", - stringify!(dts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVPacket), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVPacket), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stream_index) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(AVPacket), - "::", - stringify!(stream_index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVPacket), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).side_data) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVPacket), - "::", - stringify!(side_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).side_data_elems) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVPacket), - "::", - stringify!(side_data_elems) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).duration) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVPacket), - "::", - stringify!(duration) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pos) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVPacket), - "::", - stringify!(pos) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVPacket), - "::", - stringify!(opaque) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).opaque_ref) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(AVPacket), - "::", - stringify!(opaque_ref) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).time_base) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(AVPacket), - "::", - stringify!(time_base) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVPacket"][::std::mem::size_of::() - 104usize]; + ["Alignment of AVPacket"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVPacket::buf"][::std::mem::offset_of!(AVPacket, buf) - 0usize]; + ["Offset of field: AVPacket::pts"][::std::mem::offset_of!(AVPacket, pts) - 8usize]; + ["Offset of field: AVPacket::dts"][::std::mem::offset_of!(AVPacket, dts) - 16usize]; + ["Offset of field: AVPacket::data"][::std::mem::offset_of!(AVPacket, data) - 24usize]; + ["Offset of field: AVPacket::size"][::std::mem::offset_of!(AVPacket, size) - 32usize]; + ["Offset of field: AVPacket::stream_index"] + [::std::mem::offset_of!(AVPacket, stream_index) - 36usize]; + ["Offset of field: AVPacket::flags"][::std::mem::offset_of!(AVPacket, flags) - 40usize]; + ["Offset of field: AVPacket::side_data"][::std::mem::offset_of!(AVPacket, side_data) - 48usize]; + ["Offset of field: AVPacket::side_data_elems"] + [::std::mem::offset_of!(AVPacket, side_data_elems) - 56usize]; + ["Offset of field: AVPacket::duration"][::std::mem::offset_of!(AVPacket, duration) - 64usize]; + ["Offset of field: AVPacket::pos"][::std::mem::offset_of!(AVPacket, pos) - 72usize]; + ["Offset of field: AVPacket::opaque"][::std::mem::offset_of!(AVPacket, opaque) - 80usize]; + ["Offset of field: AVPacket::opaque_ref"] + [::std::mem::offset_of!(AVPacket, opaque_ref) - 88usize]; + ["Offset of field: AVPacket::time_base"][::std::mem::offset_of!(AVPacket, time_base) - 96usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AVPacketList { pub pkt: AVPacket, pub next: *mut AVPacketList, } -#[test] -fn bindgen_test_layout_AVPacketList() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(AVPacketList)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVPacketList)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pkt) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVPacketList), - "::", - stringify!(pkt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(AVPacketList), - "::", - stringify!(next) - ) - ); -} -#[doc = " @deprecated those are not used by any decoder"] -pub const AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT: AVSideDataParamChangeFlags = 1; -#[doc = " @deprecated those are not used by any decoder"] -pub const AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT: AVSideDataParamChangeFlags = 2; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVPacketList"][::std::mem::size_of::() - 112usize]; + ["Alignment of AVPacketList"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVPacketList::pkt"][::std::mem::offset_of!(AVPacketList, pkt) - 0usize]; + ["Offset of field: AVPacketList::next"][::std::mem::offset_of!(AVPacketList, next) - 104usize]; +}; pub const AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE: AVSideDataParamChangeFlags = 4; pub const AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS: AVSideDataParamChangeFlags = 8; pub type AVSideDataParamChangeFlags = ::std::os::raw::c_uint; @@ -11762,91 +8649,25 @@ pub struct AVCodecDescriptor { #[doc = " If non-NULL, an array of profiles recognized for this codec.\n Terminated with AV_PROFILE_UNKNOWN."] pub profiles: *const AVProfile, } -#[test] -fn bindgen_test_layout_AVCodecDescriptor() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(AVCodecDescriptor)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVCodecDescriptor)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVCodecDescriptor), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVCodecDescriptor), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVCodecDescriptor), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).long_name) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVCodecDescriptor), - "::", - stringify!(long_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).props) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVCodecDescriptor), - "::", - stringify!(props) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mime_types) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVCodecDescriptor), - "::", - stringify!(mime_types) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).profiles) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVCodecDescriptor), - "::", - stringify!(profiles) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVCodecDescriptor"][::std::mem::size_of::() - 48usize]; + ["Alignment of AVCodecDescriptor"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVCodecDescriptor::id"] + [::std::mem::offset_of!(AVCodecDescriptor, id) - 0usize]; + ["Offset of field: AVCodecDescriptor::type_"] + [::std::mem::offset_of!(AVCodecDescriptor, type_) - 4usize]; + ["Offset of field: AVCodecDescriptor::name"] + [::std::mem::offset_of!(AVCodecDescriptor, name) - 8usize]; + ["Offset of field: AVCodecDescriptor::long_name"] + [::std::mem::offset_of!(AVCodecDescriptor, long_name) - 16usize]; + ["Offset of field: AVCodecDescriptor::props"] + [::std::mem::offset_of!(AVCodecDescriptor, props) - 24usize]; + ["Offset of field: AVCodecDescriptor::mime_types"] + [::std::mem::offset_of!(AVCodecDescriptor, mime_types) - 32usize]; + ["Offset of field: AVCodecDescriptor::profiles"] + [::std::mem::offset_of!(AVCodecDescriptor, profiles) - 40usize]; +}; extern "C" { #[doc = " @return descriptor for given codec ID or NULL if no descriptor exists."] pub fn avcodec_descriptor_get(id: AVCodecID) -> *const AVCodecDescriptor; @@ -11875,6 +8696,10 @@ pub struct AVCodecParameters { pub extradata: *mut u8, #[doc = " Size of the extradata content in bytes."] pub extradata_size: ::std::os::raw::c_int, + #[doc = " Additional data associated with the entire stream.\n\n Should be allocated with av_packet_side_data_new() or\n av_packet_side_data_add(), and will be freed by avcodec_parameters_free()."] + pub coded_side_data: *mut AVPacketSideData, + #[doc = " Amount of entries in @ref coded_side_data."] + pub nb_coded_side_data: ::std::os::raw::c_int, #[doc = " - video: the pixel format, the value corresponds to enum AVPixelFormat.\n - audio: the sample format, the value corresponds to enum AVSampleFormat."] pub format: ::std::os::raw::c_int, #[doc = " The average bitrate of the encoded data (in bits per second)."] @@ -11891,6 +8716,8 @@ pub struct AVCodecParameters { pub height: ::std::os::raw::c_int, #[doc = " Video only. The aspect ratio (width / height) which a single pixel\n should have when displayed.\n\n When the aspect ratio is unknown / undefined, the numerator should be\n set to 0 (the denominator may have any value)."] pub sample_aspect_ratio: AVRational, + #[doc = " Video only. Number of frames per second, for streams with constant frame\n durations. Should be set to { 0, 1 } when some frames have differing\n durations or if the value is not known.\n\n @note This field correponds to values that are stored in codec-level\n headers and is typically overridden by container/transport-layer\n timestamps, when available. It should thus be used only as a last resort,\n when no higher-level timing information is available."] + pub framerate: AVRational, #[doc = " Video only. The order of the fields in interlaced video."] pub field_order: AVFieldOrder, #[doc = " Video only. Additional colorspace characteristics."] @@ -11901,10 +8728,8 @@ pub struct AVCodecParameters { pub chroma_location: AVChromaLocation, #[doc = " Video only. Number of delayed frames."] pub video_delay: ::std::os::raw::c_int, - #[doc = " Audio only. The channel layout bitmask. May be 0 if the channel layout is\n unknown or unspecified, otherwise the number of bits set must be equal to\n the channels field.\n @deprecated use ch_layout"] - pub channel_layout: u64, - #[doc = " Audio only. The number of audio channels.\n @deprecated use ch_layout.nb_channels"] - pub channels: ::std::os::raw::c_int, + #[doc = " Audio only. The channel layout and number of channels."] + pub ch_layout: AVChannelLayout, #[doc = " Audio only. The number of audio samples per second."] pub sample_rate: ::std::os::raw::c_int, #[doc = " Audio only. The number of bytes per coded audio frame, required by some\n formats.\n\n Corresponds to nBlockAlign in WAVEFORMATEX."] @@ -11917,363 +8742,77 @@ pub struct AVCodecParameters { pub trailing_padding: ::std::os::raw::c_int, #[doc = " Audio only. Number of samples to skip after a discontinuity."] pub seek_preroll: ::std::os::raw::c_int, - #[doc = " Audio only. The channel layout and number of channels."] - pub ch_layout: AVChannelLayout, - #[doc = " Video only. Number of frames per second, for streams with constant frame\n durations. Should be set to { 0, 1 } when some frames have differing\n durations or if the value is not known.\n\n @note This field correponds to values that are stored in codec-level\n headers and is typically overridden by container/transport-layer\n timestamps, when available. It should thus be used only as a last resort,\n when no higher-level timing information is available."] - pub framerate: AVRational, - #[doc = " Additional data associated with the entire stream."] - pub coded_side_data: *mut AVPacketSideData, - #[doc = " Amount of entries in @ref coded_side_data."] - pub nb_coded_side_data: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_AVCodecParameters() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 192usize, - concat!("Size of: ", stringify!(AVCodecParameters)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVCodecParameters)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).codec_type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(codec_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).codec_id) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(codec_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).codec_tag) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(codec_tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extradata) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(extradata) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extradata_size) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(extradata_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bit_rate) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(bit_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bits_per_coded_sample) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(bits_per_coded_sample) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bits_per_raw_sample) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(bits_per_raw_sample) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).profile) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(profile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).level) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(level) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sample_aspect_ratio) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(sample_aspect_ratio) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).field_order) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(field_order) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_range) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(color_range) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_primaries) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(color_primaries) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_trc) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(color_trc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_space) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(color_space) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chroma_location) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(chroma_location) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).video_delay) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(video_delay) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).channel_layout) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(channel_layout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).channels) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(channels) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sample_rate) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(sample_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).block_align) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(block_align) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).frame_size) as usize - ptr as usize }, - 124usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(frame_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).initial_padding) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(initial_padding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).trailing_padding) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(trailing_padding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).seek_preroll) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(seek_preroll) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ch_layout) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(ch_layout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).framerate) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(framerate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).coded_side_data) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(coded_side_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_coded_side_data) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParameters), - "::", - stringify!(nb_coded_side_data) - ) - ); } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVCodecParameters"][::std::mem::size_of::() - 176usize]; + ["Alignment of AVCodecParameters"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVCodecParameters::codec_type"] + [::std::mem::offset_of!(AVCodecParameters, codec_type) - 0usize]; + ["Offset of field: AVCodecParameters::codec_id"] + [::std::mem::offset_of!(AVCodecParameters, codec_id) - 4usize]; + ["Offset of field: AVCodecParameters::codec_tag"] + [::std::mem::offset_of!(AVCodecParameters, codec_tag) - 8usize]; + ["Offset of field: AVCodecParameters::extradata"] + [::std::mem::offset_of!(AVCodecParameters, extradata) - 16usize]; + ["Offset of field: AVCodecParameters::extradata_size"] + [::std::mem::offset_of!(AVCodecParameters, extradata_size) - 24usize]; + ["Offset of field: AVCodecParameters::coded_side_data"] + [::std::mem::offset_of!(AVCodecParameters, coded_side_data) - 32usize]; + ["Offset of field: AVCodecParameters::nb_coded_side_data"] + [::std::mem::offset_of!(AVCodecParameters, nb_coded_side_data) - 40usize]; + ["Offset of field: AVCodecParameters::format"] + [::std::mem::offset_of!(AVCodecParameters, format) - 44usize]; + ["Offset of field: AVCodecParameters::bit_rate"] + [::std::mem::offset_of!(AVCodecParameters, bit_rate) - 48usize]; + ["Offset of field: AVCodecParameters::bits_per_coded_sample"] + [::std::mem::offset_of!(AVCodecParameters, bits_per_coded_sample) - 56usize]; + ["Offset of field: AVCodecParameters::bits_per_raw_sample"] + [::std::mem::offset_of!(AVCodecParameters, bits_per_raw_sample) - 60usize]; + ["Offset of field: AVCodecParameters::profile"] + [::std::mem::offset_of!(AVCodecParameters, profile) - 64usize]; + ["Offset of field: AVCodecParameters::level"] + [::std::mem::offset_of!(AVCodecParameters, level) - 68usize]; + ["Offset of field: AVCodecParameters::width"] + [::std::mem::offset_of!(AVCodecParameters, width) - 72usize]; + ["Offset of field: AVCodecParameters::height"] + [::std::mem::offset_of!(AVCodecParameters, height) - 76usize]; + ["Offset of field: AVCodecParameters::sample_aspect_ratio"] + [::std::mem::offset_of!(AVCodecParameters, sample_aspect_ratio) - 80usize]; + ["Offset of field: AVCodecParameters::framerate"] + [::std::mem::offset_of!(AVCodecParameters, framerate) - 88usize]; + ["Offset of field: AVCodecParameters::field_order"] + [::std::mem::offset_of!(AVCodecParameters, field_order) - 96usize]; + ["Offset of field: AVCodecParameters::color_range"] + [::std::mem::offset_of!(AVCodecParameters, color_range) - 100usize]; + ["Offset of field: AVCodecParameters::color_primaries"] + [::std::mem::offset_of!(AVCodecParameters, color_primaries) - 104usize]; + ["Offset of field: AVCodecParameters::color_trc"] + [::std::mem::offset_of!(AVCodecParameters, color_trc) - 108usize]; + ["Offset of field: AVCodecParameters::color_space"] + [::std::mem::offset_of!(AVCodecParameters, color_space) - 112usize]; + ["Offset of field: AVCodecParameters::chroma_location"] + [::std::mem::offset_of!(AVCodecParameters, chroma_location) - 116usize]; + ["Offset of field: AVCodecParameters::video_delay"] + [::std::mem::offset_of!(AVCodecParameters, video_delay) - 120usize]; + ["Offset of field: AVCodecParameters::ch_layout"] + [::std::mem::offset_of!(AVCodecParameters, ch_layout) - 128usize]; + ["Offset of field: AVCodecParameters::sample_rate"] + [::std::mem::offset_of!(AVCodecParameters, sample_rate) - 152usize]; + ["Offset of field: AVCodecParameters::block_align"] + [::std::mem::offset_of!(AVCodecParameters, block_align) - 156usize]; + ["Offset of field: AVCodecParameters::frame_size"] + [::std::mem::offset_of!(AVCodecParameters, frame_size) - 160usize]; + ["Offset of field: AVCodecParameters::initial_padding"] + [::std::mem::offset_of!(AVCodecParameters, initial_padding) - 164usize]; + ["Offset of field: AVCodecParameters::trailing_padding"] + [::std::mem::offset_of!(AVCodecParameters, trailing_padding) - 168usize]; + ["Offset of field: AVCodecParameters::seek_preroll"] + [::std::mem::offset_of!(AVCodecParameters, seek_preroll) - 172usize]; +}; impl ::std::fmt::Debug for AVCodecParameters { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write ! (f , "AVCodecParameters {{ codec_type: {:?}, codec_id: {:?}, codec_tag: {:?}, extradata: {:?}, extradata_size: {:?}, format: {:?}, bit_rate: {:?}, bits_per_coded_sample: {:?}, bits_per_raw_sample: {:?}, profile: {:?}, level: {:?}, width: {:?}, height: {:?}, sample_aspect_ratio: {:?}, field_order: {:?}, color_range: {:?}, color_primaries: {:?}, color_trc: {:?}, color_space: {:?}, chroma_location: {:?}, video_delay: {:?}, channel_layout: {:?}, channels: {:?}, sample_rate: {:?}, block_align: {:?}, frame_size: {:?}, initial_padding: {:?}, trailing_padding: {:?}, seek_preroll: {:?}, ch_layout: {:?}, framerate: {:?}, coded_side_data: {:?}, nb_coded_side_data: {:?} }}" , self . codec_type , self . codec_id , self . codec_tag , self . extradata , self . extradata_size , self . format , self . bit_rate , self . bits_per_coded_sample , self . bits_per_raw_sample , self . profile , self . level , self . width , self . height , self . sample_aspect_ratio , self . field_order , self . color_range , self . color_primaries , self . color_trc , self . color_space , self . chroma_location , self . video_delay , self . channel_layout , self . channels , self . sample_rate , self . block_align , self . frame_size , self . initial_padding , self . trailing_padding , self . seek_preroll , self . ch_layout , self . framerate , self . coded_side_data , self . nb_coded_side_data) + write ! (f , "AVCodecParameters {{ codec_type: {:?}, codec_id: {:?}, codec_tag: {:?}, extradata: {:?}, extradata_size: {:?}, coded_side_data: {:?}, nb_coded_side_data: {:?}, format: {:?}, bit_rate: {:?}, bits_per_coded_sample: {:?}, bits_per_raw_sample: {:?}, profile: {:?}, level: {:?}, width: {:?}, height: {:?}, sample_aspect_ratio: {:?}, framerate: {:?}, field_order: {:?}, color_range: {:?}, color_primaries: {:?}, color_trc: {:?}, color_space: {:?}, chroma_location: {:?}, video_delay: {:?}, ch_layout: {:?}, sample_rate: {:?}, block_align: {:?}, frame_size: {:?}, initial_padding: {:?}, trailing_padding: {:?}, seek_preroll: {:?} }}" , self . codec_type , self . codec_id , self . codec_tag , self . extradata , self . extradata_size , self . coded_side_data , self . nb_coded_side_data , self . format , self . bit_rate , self . bits_per_coded_sample , self . bits_per_raw_sample , self . profile , self . level , self . width , self . height , self . sample_aspect_ratio , self . framerate , self . field_order , self . color_range , self . color_primaries , self . color_trc , self . color_space , self . chroma_location , self . video_delay , self . ch_layout , self . sample_rate , self . block_align , self . frame_size , self . initial_padding , self . trailing_padding , self . seek_preroll) } } extern "C" { @@ -12307,61 +8846,18 @@ pub struct RcOverride { pub qscale: ::std::os::raw::c_int, pub quality_factor: f32, } -#[test] -fn bindgen_test_layout_RcOverride() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(RcOverride)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(RcOverride)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start_frame) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(RcOverride), - "::", - stringify!(start_frame) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).end_frame) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(RcOverride), - "::", - stringify!(end_frame) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).qscale) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(RcOverride), - "::", - stringify!(qscale) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).quality_factor) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(RcOverride), - "::", - stringify!(quality_factor) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of RcOverride"][::std::mem::size_of::() - 16usize]; + ["Alignment of RcOverride"][::std::mem::align_of::() - 4usize]; + ["Offset of field: RcOverride::start_frame"] + [::std::mem::offset_of!(RcOverride, start_frame) - 0usize]; + ["Offset of field: RcOverride::end_frame"] + [::std::mem::offset_of!(RcOverride, end_frame) - 4usize]; + ["Offset of field: RcOverride::qscale"][::std::mem::offset_of!(RcOverride, qscale) - 8usize]; + ["Offset of field: RcOverride::quality_factor"] + [::std::mem::offset_of!(RcOverride, quality_factor) - 12usize]; +}; #[doc = " main external API structure.\n New fields can be added to the end with minor version bumps.\n Removal, reordering and changes to existing fields require a major\n version bump.\n You can use AVOptions (av_opt* / av_set/get*()) to access these fields from user\n applications.\n The name string for AVOptions options matches the associated command line\n parameter name and can be found in libavcodec/options_table.h\n The AVOption/command line parameter names differ in some cases from the C\n structure field names for historic reasons or brevity.\n sizeof(AVCodecContext) must not be used outside libav*."] #[repr(C)] #[derive(Copy, Clone)] @@ -12381,12 +8877,6 @@ pub struct AVCodecContext { pub opaque: *mut ::std::os::raw::c_void, #[doc = " the average bitrate\n - encoding: Set by user; unused for constant quantizer encoding.\n - decoding: Set by user, may be overwritten by libavcodec\n if this info is available in the stream"] pub bit_rate: i64, - #[doc = " number of bits the bitstream is allowed to diverge from the reference.\n the reference can be CBR (for CBR pass1) or VBR (for pass2)\n - encoding: Set by user; unused for constant quantizer encoding.\n - decoding: unused"] - pub bit_rate_tolerance: ::std::os::raw::c_int, - #[doc = " Global quality for codecs which cannot change it per frame.\n This should be proportional to MPEG-1/2/4 qscale.\n - encoding: Set by user.\n - decoding: unused"] - pub global_quality: ::std::os::raw::c_int, - #[doc = " - encoding: Set by user.\n - decoding: unused"] - pub compression_level: ::std::os::raw::c_int, #[doc = " AV_CODEC_FLAG_*.\n - encoding: Set by user.\n - decoding: Set by user."] pub flags: ::std::os::raw::c_int, #[doc = " AV_CODEC_FLAG2_*\n - encoding: Set by user.\n - decoding: Set by user."] @@ -12396,6 +8886,10 @@ pub struct AVCodecContext { pub extradata_size: ::std::os::raw::c_int, #[doc = " This is the fundamental unit of time (in seconds) in terms\n of which frame timestamps are represented. For fixed-fps content,\n timebase should be 1/framerate and timestamp increments should be\n identically 1.\n This often, but not always is the inverse of the frame rate or field rate\n for video. 1/time_base is not the average frame rate if the frame rate is not\n constant.\n\n Like containers, elementary streams also can store timestamps, 1/time_base\n is the unit in which these timestamps are specified.\n As example of such codec time base see ISO/IEC 14496-2:2001(E)\n vop_time_increment_resolution and fixed_vop_rate\n (fixed_vop_rate == 0 implies that it is different from the framerate)\n\n - encoding: MUST be set by user.\n - decoding: unused."] pub time_base: AVRational, + #[doc = " Timebase in which pkt_dts/pts and AVPacket.dts/pts are expressed.\n - encoding: unused.\n - decoding: set by user."] + pub pkt_timebase: AVRational, + #[doc = " - decoding: For codecs that store a framerate value in the compressed\n bitstream, the decoder may export it here. { 0, 1} when\n unknown.\n - encoding: May be used to signal the framerate of CFR content to an\n encoder."] + pub framerate: AVRational, #[doc = " For some codecs, the time base is closer to the field rate than the frame rate.\n Most notably, H.264 and MPEG-2 specify time_base as half of frame duration\n if no telecine is used ...\n\n Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.\n\n @deprecated\n - decoding: Use AVCodecDescriptor.props & AV_CODEC_PROP_FIELDS\n - encoding: Set AVCodecContext.framerate instead\n"] pub ticks_per_frame: ::std::os::raw::c_int, #[doc = " Codec delay.\n\n Encoding: Number of frames delay there will be from the encoder input to\n the decoder output. (we assume the decoder matches the spec)\n Decoding: Number of frames delay in addition to what a standard decoder\n as specified in the spec would produce.\n\n Video:\n Number of frames the decoded output will be delayed relative to the\n encoded input.\n\n Audio:\n For encoding, this field is unused (see initial_padding).\n\n For decoding, this is the number of samples the decoder needs to\n output before the decoder's output is valid. When seeking, you should\n start decoding this many samples prior to your desired seek point.\n\n - encoding: Set by libavcodec.\n - decoding: Set by libavcodec."] @@ -12408,10 +8902,30 @@ pub struct AVCodecContext { pub coded_width: ::std::os::raw::c_int, #[doc = " Bitstream width / height, may be different from width/height e.g. when\n the decoded frame is cropped before being output or lowres is enabled.\n\n @note Those field may not match the value of the last\n AVFrame output by avcodec_receive_frame() due frame\n reordering.\n\n - encoding: unused\n - decoding: May be set by the user before opening the decoder if known\n e.g. from the container. During decoding, the decoder may\n overwrite those values as required while parsing the data."] pub coded_height: ::std::os::raw::c_int, - #[doc = " the number of pictures in a group of pictures, or 0 for intra_only\n - encoding: Set by user.\n - decoding: unused"] - pub gop_size: ::std::os::raw::c_int, + #[doc = " sample aspect ratio (0 if unknown)\n That is the width of a pixel divided by the height of the pixel.\n Numerator and denominator must be relatively prime and smaller than 256 for some video standards.\n - encoding: Set by user.\n - decoding: Set by libavcodec."] + pub sample_aspect_ratio: AVRational, #[doc = " Pixel format, see AV_PIX_FMT_xxx.\n May be set by the demuxer if known from headers.\n May be overridden by the decoder if it knows better.\n\n @note This field may not match the value of the last\n AVFrame output by avcodec_receive_frame() due frame\n reordering.\n\n - encoding: Set by user.\n - decoding: Set by user if known, overridden by libavcodec while\n parsing the data."] pub pix_fmt: AVPixelFormat, + #[doc = " Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.\n - encoding: unused.\n - decoding: Set by libavcodec before calling get_format()"] + pub sw_pix_fmt: AVPixelFormat, + #[doc = " Chromaticity coordinates of the source primaries.\n - encoding: Set by user\n - decoding: Set by libavcodec"] + pub color_primaries: AVColorPrimaries, + #[doc = " Color Transfer Characteristic.\n - encoding: Set by user\n - decoding: Set by libavcodec"] + pub color_trc: AVColorTransferCharacteristic, + #[doc = " YUV colorspace type.\n - encoding: Set by user\n - decoding: Set by libavcodec"] + pub colorspace: AVColorSpace, + #[doc = " MPEG vs JPEG YUV range.\n - encoding: Set by user to override the default output color range value,\n If not specified, libavcodec sets the color range depending on the\n output format.\n - decoding: Set by libavcodec, can be set by the user to propagate the\n color range to components reading from the decoder context."] + pub color_range: AVColorRange, + #[doc = " This defines the location of chroma samples.\n - encoding: Set by user\n - decoding: Set by libavcodec"] + pub chroma_sample_location: AVChromaLocation, + #[doc = " Field order\n - encoding: set by libavcodec\n - decoding: Set by user."] + pub field_order: AVFieldOrder, + #[doc = " number of reference frames\n - encoding: Set by user.\n - decoding: Set by lavc."] + pub refs: ::std::os::raw::c_int, + #[doc = " Size of the frame reordering buffer in the decoder.\n For MPEG-2 it is 1 IPB or 0 low delay IP.\n - encoding: Set by libavcodec.\n - decoding: Set by libavcodec."] + pub has_b_frames: ::std::os::raw::c_int, + #[doc = " slice flags\n - encoding: unused\n - decoding: Set by user."] + pub slice_flags: ::std::os::raw::c_int, #[doc = " If non NULL, 'draw_horiz_band' is called by the libavcodec\n decoder to draw a horizontal band. It improves cache usage. Not\n all codecs can do that. You must check the codec capabilities\n beforehand.\n When multithreading is used, it may be called from multiple threads\n at the same time; threads might draw different parts of the same AVFrame,\n or multiple AVFrames, and there is no guarantee that slices will be drawn\n in order.\n The function is also used by hardware acceleration APIs.\n It is called at least once during frame decoding to pass\n the data needed for hardware render.\n In that mode instead of pixel data, AVFrame points to\n a structure specific to the acceleration API. The application\n reads the structure and can change some fields to indicate progress\n or mark state.\n - encoding: unused\n - decoding: Set by user.\n @param height the height of the slice\n @param y the y position of the slice\n @param type 1->top field, 2->bottom field, 3->frame\n @param offset offset into the AVFrame.data from which the slice should be read"] pub draw_horiz_band: ::std::option::Option< unsafe extern "C" fn( @@ -12433,8 +8947,6 @@ pub struct AVCodecContext { pub b_quant_factor: f32, #[doc = " qscale offset between IP and B-frames\n - encoding: Set by user.\n - decoding: unused"] pub b_quant_offset: f32, - #[doc = " Size of the frame reordering buffer in the decoder.\n For MPEG-2 it is 1 IPB or 0 low delay IP.\n - encoding: Set by libavcodec.\n - decoding: Set by libavcodec."] - pub has_b_frames: ::std::os::raw::c_int, #[doc = " qscale factor between P- and I-frames\n If > 0 then the last P-frame quantizer will be used (q = lastp_q * factor + offset).\n If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset).\n - encoding: Set by user.\n - decoding: unused"] pub i_quant_factor: f32, #[doc = " qscale offset between P and I-frames\n - encoding: Set by user.\n - decoding: unused"] @@ -12449,12 +8961,8 @@ pub struct AVCodecContext { pub p_masking: f32, #[doc = " darkness masking (0-> disabled)\n - encoding: Set by user.\n - decoding: unused"] pub dark_masking: f32, - #[doc = " slice count\n - encoding: Set by libavcodec.\n - decoding: Set by user (or 0)."] - pub slice_count: ::std::os::raw::c_int, - #[doc = " slice offsets in the frame in bytes\n - encoding: Set/allocated by libavcodec.\n - decoding: Set/allocated by user (or NULL)."] - pub slice_offset: *mut ::std::os::raw::c_int, - #[doc = " sample aspect ratio (0 if unknown)\n That is the width of a pixel divided by the height of the pixel.\n Numerator and denominator must be relatively prime and smaller than 256 for some video standards.\n - encoding: Set by user.\n - decoding: Set by libavcodec."] - pub sample_aspect_ratio: AVRational, + #[doc = " noise vs. sse weight for the nsse comparison function\n - encoding: Set by user.\n - decoding: unused"] + pub nsse_weight: ::std::os::raw::c_int, #[doc = " motion estimation comparison function\n - encoding: Set by user.\n - decoding: unused"] pub me_cmp: ::std::os::raw::c_int, #[doc = " subpixel motion estimation comparison function\n - encoding: Set by user.\n - decoding: unused"] @@ -12475,20 +8983,16 @@ pub struct AVCodecContext { pub me_subpel_quality: ::std::os::raw::c_int, #[doc = " maximum motion estimation search range in subpel units\n If 0 then no limit.\n\n - encoding: Set by user.\n - decoding: unused"] pub me_range: ::std::os::raw::c_int, - #[doc = " slice flags\n - encoding: unused\n - decoding: Set by user."] - pub slice_flags: ::std::os::raw::c_int, #[doc = " macroblock decision mode\n - encoding: Set by user.\n - decoding: unused"] pub mb_decision: ::std::os::raw::c_int, #[doc = " custom intra quantization matrix\n Must be allocated with the av_malloc() family of functions, and will be freed in\n avcodec_free_context().\n - encoding: Set/allocated by user, freed by libavcodec. Can be NULL.\n - decoding: Set/allocated/freed by libavcodec."] pub intra_matrix: *mut u16, #[doc = " custom inter quantization matrix\n Must be allocated with the av_malloc() family of functions, and will be freed in\n avcodec_free_context().\n - encoding: Set/allocated by user, freed by libavcodec. Can be NULL.\n - decoding: Set/allocated/freed by libavcodec."] pub inter_matrix: *mut u16, + #[doc = " custom intra quantization matrix\n - encoding: Set by user, can be NULL.\n - decoding: unused."] + pub chroma_intra_matrix: *mut u16, #[doc = " precision of the intra DC coefficient - 8\n - encoding: Set by user.\n - decoding: Set by libavcodec"] pub intra_dc_precision: ::std::os::raw::c_int, - #[doc = " Number of macroblock rows at the top which are skipped.\n - encoding: unused\n - decoding: Set by user."] - pub skip_top: ::std::os::raw::c_int, - #[doc = " Number of macroblock rows at the bottom which are skipped.\n - encoding: unused\n - decoding: Set by user."] - pub skip_bottom: ::std::os::raw::c_int, #[doc = " minimum MB Lagrange multiplier\n - encoding: Set by user.\n - decoding: unused"] pub mb_lmin: ::std::os::raw::c_int, #[doc = " maximum MB Lagrange multiplier\n - encoding: Set by user.\n - decoding: unused"] @@ -12497,46 +9001,34 @@ pub struct AVCodecContext { pub bidir_refine: ::std::os::raw::c_int, #[doc = " minimum GOP size\n - encoding: Set by user.\n - decoding: unused"] pub keyint_min: ::std::os::raw::c_int, - #[doc = " number of reference frames\n - encoding: Set by user.\n - decoding: Set by lavc."] - pub refs: ::std::os::raw::c_int, + #[doc = " the number of pictures in a group of pictures, or 0 for intra_only\n - encoding: Set by user.\n - decoding: unused"] + pub gop_size: ::std::os::raw::c_int, #[doc = " Note: Value depends upon the compare function used for fullpel ME.\n - encoding: Set by user.\n - decoding: unused"] pub mv0_threshold: ::std::os::raw::c_int, - #[doc = " Chromaticity coordinates of the source primaries.\n - encoding: Set by user\n - decoding: Set by libavcodec"] - pub color_primaries: AVColorPrimaries, - #[doc = " Color Transfer Characteristic.\n - encoding: Set by user\n - decoding: Set by libavcodec"] - pub color_trc: AVColorTransferCharacteristic, - #[doc = " YUV colorspace type.\n - encoding: Set by user\n - decoding: Set by libavcodec"] - pub colorspace: AVColorSpace, - #[doc = " MPEG vs JPEG YUV range.\n - encoding: Set by user to override the default output color range value,\n If not specified, libavcodec sets the color range depending on the\n output format.\n - decoding: Set by libavcodec, can be set by the user to propagate the\n color range to components reading from the decoder context."] - pub color_range: AVColorRange, - #[doc = " This defines the location of chroma samples.\n - encoding: Set by user\n - decoding: Set by libavcodec"] - pub chroma_sample_location: AVChromaLocation, #[doc = " Number of slices.\n Indicates number of picture subdivisions. Used for parallelized\n decoding.\n - encoding: Set by user\n - decoding: unused"] pub slices: ::std::os::raw::c_int, - #[doc = " Field order\n - encoding: set by libavcodec\n - decoding: Set by user."] - pub field_order: AVFieldOrder, #[doc = "< samples per second"] pub sample_rate: ::std::os::raw::c_int, - #[doc = " number of audio channels\n @deprecated use ch_layout.nb_channels"] - pub channels: ::std::os::raw::c_int, #[doc = "< sample format"] pub sample_fmt: AVSampleFormat, + #[doc = " Audio channel layout.\n - encoding: must be set by the caller, to one of AVCodec.ch_layouts.\n - decoding: may be set by the caller if known e.g. from the container.\n The decoder can then override during decoding as needed."] + pub ch_layout: AVChannelLayout, #[doc = " Number of samples per channel in an audio frame.\n\n - encoding: set by libavcodec in avcodec_open2(). Each submitted frame\n except the last must contain exactly frame_size samples per channel.\n May be 0 when the codec has AV_CODEC_CAP_VARIABLE_FRAME_SIZE set, then the\n frame size is not restricted.\n - decoding: may be set by some decoders to indicate constant frame size"] pub frame_size: ::std::os::raw::c_int, - #[doc = " Frame counter, set by libavcodec.\n\n - decoding: total number of frames returned from the decoder so far.\n - encoding: total number of frames passed to the encoder so far.\n\n @note the counter is not incremented if encoding/decoding resulted in\n an error.\n @deprecated use frame_num instead"] - pub frame_number: ::std::os::raw::c_int, #[doc = " number of bytes per packet if constant and known or 0\n Used by some WAV based audio codecs."] pub block_align: ::std::os::raw::c_int, #[doc = " Audio cutoff bandwidth (0 means \"automatic\")\n - encoding: Set by user.\n - decoding: unused"] pub cutoff: ::std::os::raw::c_int, - #[doc = " Audio channel layout.\n - encoding: set by user.\n - decoding: set by user, may be overwritten by libavcodec.\n @deprecated use ch_layout"] - pub channel_layout: u64, - #[doc = " Request decoder to use this channel layout if it can (0 for default)\n - encoding: unused\n - decoding: Set by user.\n @deprecated use \"downmix\" codec private option"] - pub request_channel_layout: u64, #[doc = " Type of service that the audio stream conveys.\n - encoding: Set by user.\n - decoding: Set by libavcodec."] pub audio_service_type: AVAudioServiceType, #[doc = " desired sample format\n - encoding: Not used.\n - decoding: Set by user.\n Decoder will decode to this format if it can."] pub request_sample_fmt: AVSampleFormat, + #[doc = " Audio only. The number of \"priming\" samples (padding) inserted by the\n encoder at the beginning of the audio. I.e. this number of leading\n decoded samples must be discarded by the caller to get the original audio\n without leading padding.\n\n - decoding: unused\n - encoding: Set by libavcodec. The timestamps on the output packets are\n adjusted by the encoder so that they always refer to the\n first sample of the data actually contained in the packet,\n including any added padding. E.g. if the timebase is\n 1/samplerate and the timestamp of the first input sample is\n 0, the timestamp of the first output packet will be\n -initial_padding."] + pub initial_padding: ::std::os::raw::c_int, + #[doc = " Audio only. The amount of padding (in samples) appended by the encoder to\n the end of the audio. I.e. this number of decoded samples must be\n discarded by the caller from the end of the stream to get the original\n audio without any trailing padding.\n\n - decoding: unused\n - encoding: unused"] + pub trailing_padding: ::std::os::raw::c_int, + #[doc = " Number of samples to skip after a discontinuity\n - decoding: unused\n - encoding: set by libavcodec"] + pub seek_preroll: ::std::os::raw::c_int, #[doc = " This callback is called at the beginning of each frame to get data\n buffer(s) for it. There may be one contiguous buffer for all the data or\n there may be a buffer per each data plane or anything in between. What\n this means is, you may set however many entries in buf[] you feel necessary.\n Each buffer must be reference-counted using the AVBuffer API (see description\n of buf[] below).\n\n The following fields will be set in the frame before this callback is\n called:\n - format\n - width, height (video only)\n - sample_rate, channel_layout, nb_samples (audio only)\n Their values may differ from the corresponding values in\n AVCodecContext. This callback must use the frame values, not the codec\n context values, to calculate the required buffer size.\n\n This callback must fill the following fields in the frame:\n - data[]\n - linesize[]\n - extended_data:\n * if the data is planar audio with more than 8 channels, then this\n callback must allocate and fill extended_data to contain all pointers\n to all data planes. data[] must hold as many pointers as it can.\n extended_data must be allocated with av_malloc() and will be freed in\n av_frame_unref().\n * otherwise extended_data must point to data\n - buf[] must contain one or more pointers to AVBufferRef structures. Each of\n the frame's data and extended_data pointers must be contained in these. That\n is, one AVBufferRef for each allocated chunk of memory, not necessarily one\n AVBufferRef per data[] entry. See: av_buffer_create(), av_buffer_alloc(),\n and av_buffer_ref().\n - extended_buf and nb_extended_buf must be allocated with av_malloc() by\n this callback and filled with the extra buffers if there are more\n buffers than buf[] can hold. extended_buf will be freed in\n av_frame_unref().\n\n If AV_CODEC_CAP_DR1 is not set then get_buffer2() must call\n avcodec_default_get_buffer2() instead of providing buffers allocated by\n some other means.\n\n Each data plane must be aligned to the maximum required by the target\n CPU.\n\n @see avcodec_default_get_buffer2()\n\n Video:\n\n If AV_GET_BUFFER_FLAG_REF is set in flags then the frame may be reused\n (read and/or written to if it is writable) later by libavcodec.\n\n avcodec_align_dimensions2() should be used to find the required width and\n height, as they normally need to be rounded up to the next multiple of 16.\n\n Some decoders do not support linesizes changing between frames.\n\n If frame multithreading is used, this callback may be called from a\n different thread, but not from more than one at once. Does not need to be\n reentrant.\n\n @see avcodec_align_dimensions2()\n\n Audio:\n\n Decoders request a buffer of a particular size by setting\n AVFrame.nb_samples prior to calling get_buffer2(). The decoder may,\n however, utilize only part of the buffer by setting AVFrame.nb_samples\n to a smaller value in the output frame.\n\n As a convenience, av_samples_get_buffer_size() and\n av_samples_fill_arrays() in libavutil may be used by custom get_buffer2()\n functions to find the required data size and to fill data pointers and\n linesize. In AVFrame.linesize, only linesize[0] may be set for audio\n since all planes must be the same size.\n\n @see av_samples_get_buffer_size(), av_samples_fill_arrays()\n\n - encoding: unused\n - decoding: Set by libavcodec, user can override."] pub get_buffer2: ::std::option::Option< unsafe extern "C" fn( @@ -12545,6 +9037,12 @@ pub struct AVCodecContext { flags: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int, >, + #[doc = " number of bits the bitstream is allowed to diverge from the reference.\n the reference can be CBR (for CBR pass1) or VBR (for pass2)\n - encoding: Set by user; unused for constant quantizer encoding.\n - decoding: unused"] + pub bit_rate_tolerance: ::std::os::raw::c_int, + #[doc = " Global quality for codecs which cannot change it per frame.\n This should be proportional to MPEG-1/2/4 qscale.\n - encoding: Set by user.\n - decoding: unused"] + pub global_quality: ::std::os::raw::c_int, + #[doc = " - encoding: Set by user.\n - decoding: unused"] + pub compression_level: ::std::os::raw::c_int, #[doc = "< amount of qscale change between easy & hard scenes (0.0-1.0)"] pub qcompress: f32, #[doc = "< amount of qscale smoothing over time (0.0-1.0)"] @@ -12586,12 +9084,18 @@ pub struct AVCodecContext { pub debug: ::std::os::raw::c_int, #[doc = " Error recognition; may misdetect some more or less valid parts as errors.\n This is a bitfield of the AV_EF_* values defined in defs.h.\n\n - encoding: Set by user.\n - decoding: Set by user."] pub err_recognition: ::std::os::raw::c_int, - #[doc = " opaque 64-bit number (generally a PTS) that will be reordered and\n output in AVFrame.reordered_opaque\n - encoding: Set by libavcodec to the reordered_opaque of the input\n frame corresponding to the last returned packet. Only\n supported by encoders with the\n AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE capability.\n - decoding: Set by user.\n\n @deprecated Use AV_CODEC_FLAG_COPY_OPAQUE instead"] - pub reordered_opaque: i64, #[doc = " Hardware accelerator in use\n - encoding: unused.\n - decoding: Set by libavcodec"] pub hwaccel: *const AVHWAccel, #[doc = " Legacy hardware accelerator context.\n\n For some hardware acceleration methods, the caller may use this field to\n signal hwaccel-specific data to the codec. The struct pointed to by this\n pointer is hwaccel-dependent and defined in the respective header. Please\n refer to the FFmpeg HW accelerator documentation to know how to fill\n this.\n\n In most cases this field is optional - the necessary information may also\n be provided to libavcodec through @ref hw_frames_ctx or @ref\n hw_device_ctx (see avcodec_get_hw_config()). However, in some cases it\n may be the only method of signalling some (optional) information.\n\n The struct and its contents are owned by the caller.\n\n - encoding: May be set by the caller before avcodec_open2(). Must remain\n valid until avcodec_free_context().\n - decoding: May be set by the caller in the get_format() callback.\n Must remain valid until the next get_format() call,\n or avcodec_free_context() (whichever comes first)."] pub hwaccel_context: *mut ::std::os::raw::c_void, + #[doc = " A reference to the AVHWFramesContext describing the input (for encoding)\n or output (decoding) frames. The reference is set by the caller and\n afterwards owned (and freed) by libavcodec - it should never be read by\n the caller after being set.\n\n - decoding: This field should be set by the caller from the get_format()\n callback. The previous reference (if any) will always be\n unreffed by libavcodec before the get_format() call.\n\n If the default get_buffer2() is used with a hwaccel pixel\n format, then this AVHWFramesContext will be used for\n allocating the frame buffers.\n\n - encoding: For hardware encoders configured to use a hwaccel pixel\n format, this field should be set by the caller to a reference\n to the AVHWFramesContext describing input frames.\n AVHWFramesContext.format must be equal to\n AVCodecContext.pix_fmt.\n\n This field should be set before avcodec_open2() is called."] + pub hw_frames_ctx: *mut AVBufferRef, + #[doc = " A reference to the AVHWDeviceContext describing the device which will\n be used by a hardware encoder/decoder. The reference is set by the\n caller and afterwards owned (and freed) by libavcodec.\n\n This should be used if either the codec device does not require\n hardware frames or any that are used are to be allocated internally by\n libavcodec. If the user wishes to supply any of the frames used as\n encoder input or decoder output then hw_frames_ctx should be used\n instead. When hw_frames_ctx is set in get_format() for a decoder, this\n field will be ignored while decoding the associated stream segment, but\n may again be used on a following one after another get_format() call.\n\n For both encoders and decoders this field should be set before\n avcodec_open2() is called and must not be written to thereafter.\n\n Note that some decoders may require this field to be set initially in\n order to support hw_frames_ctx at all - in that case, all frames\n contexts used must be created on the same device."] + pub hw_device_ctx: *mut AVBufferRef, + #[doc = " Bit set of AV_HWACCEL_FLAG_* flags, which affect hardware accelerated\n decoding (if active).\n - encoding: unused\n - decoding: Set by user (either before avcodec_open2(), or in the\n AVCodecContext.get_format callback)"] + pub hwaccel_flags: ::std::os::raw::c_int, + #[doc = " Video decoding only. Sets the number of extra hardware frames which\n the decoder will allocate for use by the caller. This must be set\n before avcodec_open2() is called.\n\n Some hardware decoders require all frames that they will use for\n output to be defined in advance before decoding starts. For such\n decoders, the hardware frame pool must therefore be of a fixed size.\n The extra frames set here are on top of any number that the decoder\n needs internally in order to operate normally (for example, frames\n used as reference pictures)."] + pub extra_hw_frames: ::std::os::raw::c_int, #[doc = " error\n - encoding: Set by libavcodec if flags & AV_CODEC_FLAG_PSNR.\n - decoding: unused"] pub error: [u64; 8usize], #[doc = " DCT algorithm, see FF_DCT_* below\n - encoding: Set by user.\n - decoding: unused"] @@ -12602,8 +9106,6 @@ pub struct AVCodecContext { pub bits_per_coded_sample: ::std::os::raw::c_int, #[doc = " Bits per sample/pixel of internal libavcodec pixel/sample format.\n - encoding: set by user.\n - decoding: set by libavcodec."] pub bits_per_raw_sample: ::std::os::raw::c_int, - #[doc = " low resolution decoding, 1-> 1/2 size, 2->1/4 size\n - encoding: unused\n - decoding: Set by user."] - pub lowres: ::std::os::raw::c_int, #[doc = " thread count\n is used to decide how many independent tasks should be passed to execute()\n - encoding: Set by user.\n - decoding: Set by user."] pub thread_count: ::std::os::raw::c_int, #[doc = " Which multithreading methods to use.\n Use of FF_THREAD_FRAME will increase decoding delay by one frame per thread,\n so clients which cannot provide future frames should not use it.\n\n - encoding: Set by user, otherwise the default is used.\n - decoding: Set by user, otherwise the default is used."] @@ -12643,77 +9145,52 @@ pub struct AVCodecContext { count: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int, >, - #[doc = " noise vs. sse weight for the nsse comparison function\n - encoding: Set by user.\n - decoding: unused"] - pub nsse_weight: ::std::os::raw::c_int, #[doc = " profile\n - encoding: Set by user.\n - decoding: Set by libavcodec.\n See the AV_PROFILE_* defines in defs.h."] pub profile: ::std::os::raw::c_int, #[doc = " Encoding level descriptor.\n - encoding: Set by user, corresponds to a specific level defined by the\n codec, usually corresponding to the profile level, if not specified it\n is set to FF_LEVEL_UNKNOWN.\n - decoding: Set by libavcodec.\n See AV_LEVEL_* in defs.h."] pub level: ::std::os::raw::c_int, + #[doc = " Properties of the stream that gets decoded\n - encoding: unused\n - decoding: set by libavcodec"] + pub properties: ::std::os::raw::c_uint, #[doc = " Skip loop filtering for selected frames.\n - encoding: unused\n - decoding: Set by user."] pub skip_loop_filter: AVDiscard, #[doc = " Skip IDCT/dequantization for selected frames.\n - encoding: unused\n - decoding: Set by user."] pub skip_idct: AVDiscard, #[doc = " Skip decoding for selected frames.\n - encoding: unused\n - decoding: Set by user."] pub skip_frame: AVDiscard, - #[doc = " Header containing style information for text subtitles.\n For SUBTITLE_ASS subtitle type, it should contain the whole ASS\n [Script Info] and [V4+ Styles] section, plus the [Events] line and\n the Format line following. It shouldn't include any Dialogue line.\n - encoding: Set/allocated/freed by user (before avcodec_open2())\n - decoding: Set/allocated/freed by libavcodec (by avcodec_open2())"] - pub subtitle_header: *mut u8, - pub subtitle_header_size: ::std::os::raw::c_int, - #[doc = " Audio only. The number of \"priming\" samples (padding) inserted by the\n encoder at the beginning of the audio. I.e. this number of leading\n decoded samples must be discarded by the caller to get the original audio\n without leading padding.\n\n - decoding: unused\n - encoding: Set by libavcodec. The timestamps on the output packets are\n adjusted by the encoder so that they always refer to the\n first sample of the data actually contained in the packet,\n including any added padding. E.g. if the timebase is\n 1/samplerate and the timestamp of the first input sample is\n 0, the timestamp of the first output packet will be\n -initial_padding."] - pub initial_padding: ::std::os::raw::c_int, - #[doc = " - decoding: For codecs that store a framerate value in the compressed\n bitstream, the decoder may export it here. { 0, 1} when\n unknown.\n - encoding: May be used to signal the framerate of CFR content to an\n encoder."] - pub framerate: AVRational, - #[doc = " Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.\n - encoding: unused.\n - decoding: Set by libavcodec before calling get_format()"] - pub sw_pix_fmt: AVPixelFormat, - #[doc = " Timebase in which pkt_dts/pts and AVPacket.dts/pts are expressed.\n - encoding: unused.\n - decoding: set by user."] - pub pkt_timebase: AVRational, + #[doc = " Skip processing alpha if supported by codec.\n Note that if the format uses pre-multiplied alpha (common with VP6,\n and recommended due to better video quality/compression)\n the image will look as if alpha-blended onto a black background.\n However for formats that do not use pre-multiplied alpha\n there might be serious artefacts (though e.g. libswscale currently\n assumes pre-multiplied alpha anyway).\n\n - decoding: set by user\n - encoding: unused"] + pub skip_alpha: ::std::os::raw::c_int, + #[doc = " Number of macroblock rows at the top which are skipped.\n - encoding: unused\n - decoding: Set by user."] + pub skip_top: ::std::os::raw::c_int, + #[doc = " Number of macroblock rows at the bottom which are skipped.\n - encoding: unused\n - decoding: Set by user."] + pub skip_bottom: ::std::os::raw::c_int, + #[doc = " low resolution decoding, 1-> 1/2 size, 2->1/4 size\n - encoding: unused\n - decoding: Set by user."] + pub lowres: ::std::os::raw::c_int, #[doc = " AVCodecDescriptor\n - encoding: unused.\n - decoding: set by libavcodec."] pub codec_descriptor: *const AVCodecDescriptor, - #[doc = " Current statistics for PTS correction.\n - decoding: maintained and used by libavcodec, not intended to be used by user apps\n - encoding: unused"] - pub pts_correction_num_faulty_pts: i64, - #[doc = " Number of incorrect PTS values so far"] - pub pts_correction_num_faulty_dts: i64, - #[doc = " Number of incorrect DTS values so far"] - pub pts_correction_last_pts: i64, - #[doc = " PTS of the last frame"] - pub pts_correction_last_dts: i64, #[doc = " Character encoding of the input subtitles file.\n - decoding: set by user\n - encoding: unused"] pub sub_charenc: *mut ::std::os::raw::c_char, #[doc = " Subtitles character encoding mode. Formats or codecs might be adjusting\n this setting (if they are doing the conversion themselves for instance).\n - decoding: set by libavcodec\n - encoding: unused"] pub sub_charenc_mode: ::std::os::raw::c_int, - #[doc = " Skip processing alpha if supported by codec.\n Note that if the format uses pre-multiplied alpha (common with VP6,\n and recommended due to better video quality/compression)\n the image will look as if alpha-blended onto a black background.\n However for formats that do not use pre-multiplied alpha\n there might be serious artefacts (though e.g. libswscale currently\n assumes pre-multiplied alpha anyway).\n\n - decoding: set by user\n - encoding: unused"] - pub skip_alpha: ::std::os::raw::c_int, - #[doc = " Number of samples to skip after a discontinuity\n - decoding: unused\n - encoding: set by libavcodec"] - pub seek_preroll: ::std::os::raw::c_int, - #[doc = " custom intra quantization matrix\n - encoding: Set by user, can be NULL.\n - decoding: unused."] - pub chroma_intra_matrix: *mut u16, + #[doc = " Header containing style information for text subtitles.\n For SUBTITLE_ASS subtitle type, it should contain the whole ASS\n [Script Info] and [V4+ Styles] section, plus the [Events] line and\n the Format line following. It shouldn't include any Dialogue line.\n - encoding: Set/allocated/freed by user (before avcodec_open2())\n - decoding: Set/allocated/freed by libavcodec (by avcodec_open2())"] + pub subtitle_header_size: ::std::os::raw::c_int, + pub subtitle_header: *mut u8, #[doc = " dump format separator.\n can be \", \" or \"\\n \" or anything else\n - encoding: Set by user.\n - decoding: Set by user."] pub dump_separator: *mut u8, #[doc = " ',' separated list of allowed decoders.\n If NULL then all are allowed\n - encoding: unused\n - decoding: set by user"] pub codec_whitelist: *mut ::std::os::raw::c_char, - #[doc = " Properties of the stream that gets decoded\n - encoding: unused\n - decoding: set by libavcodec"] - pub properties: ::std::os::raw::c_uint, #[doc = " Additional data associated with the entire coded stream.\n\n - decoding: may be set by user before calling avcodec_open2().\n - encoding: may be set by libavcodec after avcodec_open2()."] pub coded_side_data: *mut AVPacketSideData, pub nb_coded_side_data: ::std::os::raw::c_int, - #[doc = " A reference to the AVHWFramesContext describing the input (for encoding)\n or output (decoding) frames. The reference is set by the caller and\n afterwards owned (and freed) by libavcodec - it should never be read by\n the caller after being set.\n\n - decoding: This field should be set by the caller from the get_format()\n callback. The previous reference (if any) will always be\n unreffed by libavcodec before the get_format() call.\n\n If the default get_buffer2() is used with a hwaccel pixel\n format, then this AVHWFramesContext will be used for\n allocating the frame buffers.\n\n - encoding: For hardware encoders configured to use a hwaccel pixel\n format, this field should be set by the caller to a reference\n to the AVHWFramesContext describing input frames.\n AVHWFramesContext.format must be equal to\n AVCodecContext.pix_fmt.\n\n This field should be set before avcodec_open2() is called."] - pub hw_frames_ctx: *mut AVBufferRef, - #[doc = " Audio only. The amount of padding (in samples) appended by the encoder to\n the end of the audio. I.e. this number of decoded samples must be\n discarded by the caller from the end of the stream to get the original\n audio without any trailing padding.\n\n - decoding: unused\n - encoding: unused"] - pub trailing_padding: ::std::os::raw::c_int, + #[doc = " Bit set of AV_CODEC_EXPORT_DATA_* flags, which affects the kind of\n metadata exported in frame, packet, or coded stream side data by\n decoders and encoders.\n\n - decoding: set by user\n - encoding: set by user"] + pub export_side_data: ::std::os::raw::c_int, #[doc = " The number of pixels per image to maximally accept.\n\n - decoding: set by user\n - encoding: set by user"] pub max_pixels: i64, - #[doc = " A reference to the AVHWDeviceContext describing the device which will\n be used by a hardware encoder/decoder. The reference is set by the\n caller and afterwards owned (and freed) by libavcodec.\n\n This should be used if either the codec device does not require\n hardware frames or any that are used are to be allocated internally by\n libavcodec. If the user wishes to supply any of the frames used as\n encoder input or decoder output then hw_frames_ctx should be used\n instead. When hw_frames_ctx is set in get_format() for a decoder, this\n field will be ignored while decoding the associated stream segment, but\n may again be used on a following one after another get_format() call.\n\n For both encoders and decoders this field should be set before\n avcodec_open2() is called and must not be written to thereafter.\n\n Note that some decoders may require this field to be set initially in\n order to support hw_frames_ctx at all - in that case, all frames\n contexts used must be created on the same device."] - pub hw_device_ctx: *mut AVBufferRef, - #[doc = " Bit set of AV_HWACCEL_FLAG_* flags, which affect hardware accelerated\n decoding (if active).\n - encoding: unused\n - decoding: Set by user (either before avcodec_open2(), or in the\n AVCodecContext.get_format callback)"] - pub hwaccel_flags: ::std::os::raw::c_int, #[doc = " Video decoding only. Certain video codecs support cropping, meaning that\n only a sub-rectangle of the decoded frame is intended for display. This\n option controls how cropping is handled by libavcodec.\n\n When set to 1 (the default), libavcodec will apply cropping internally.\n I.e. it will modify the output frame width/height fields and offset the\n data pointers (only by as much as possible while preserving alignment, or\n by the full amount if the AV_CODEC_FLAG_UNALIGNED flag is set) so that\n the frames output by the decoder refer only to the cropped area. The\n crop_* fields of the output frames will be zero.\n\n When set to 0, the width/height fields of the output frames will be set\n to the coded dimensions and the crop_* fields will describe the cropping\n rectangle. Applying the cropping is left to the caller.\n\n @warning When hardware acceleration with opaque output frames is used,\n libavcodec is unable to apply cropping from the top/left border.\n\n @note when this option is set to zero, the width/height fields of the\n AVCodecContext and output AVFrames have different meanings. The codec\n context fields store display dimensions (with the coded dimensions in\n coded_width/height), while the frame fields store the coded dimensions\n (with the display dimensions being determined by the crop_* fields)."] pub apply_cropping: ::std::os::raw::c_int, - pub extra_hw_frames: ::std::os::raw::c_int, #[doc = " The percentage of damaged samples to discard a frame.\n\n - decoding: set by user\n - encoding: unused"] pub discard_damaged_percentage: ::std::os::raw::c_int, #[doc = " The number of samples per frame to maximally accept.\n\n - decoding: set by user\n - encoding: set by user"] pub max_samples: i64, - #[doc = " Bit set of AV_CODEC_EXPORT_DATA_* flags, which affects the kind of\n metadata exported in frame, packet, or coded stream side data by\n decoders and encoders.\n\n - decoding: set by user\n - encoding: set by user"] - pub export_side_data: ::std::os::raw::c_int, #[doc = " This callback is called at the beginning of each packet to get a data\n buffer for it.\n\n The following field will be set in the packet before this callback is\n called:\n - size\n This callback must use the above value to calculate the required buffer size,\n which must padded by at least AV_INPUT_BUFFER_PADDING_SIZE bytes.\n\n In some specific cases, the encoder may not use the entire buffer allocated by this\n callback. This will be reflected in the size value in the packet once returned by\n avcodec_receive_packet().\n\n This callback must fill the following fields in the packet:\n - data: alignment requirements for AVPacket apply, if any. Some architectures and\n encoders may benefit from having aligned data.\n - buf: must contain a pointer to an AVBufferRef structure. The packet's\n data pointer must be contained in it. See: av_buffer_create(), av_buffer_alloc(),\n and av_buffer_ref().\n\n If AV_CODEC_CAP_DR1 is not set then get_encode_buffer() must call\n avcodec_default_get_encode_buffer() instead of providing a buffer allocated by\n some other means.\n\n The flags field may contain a combination of AV_GET_ENCODE_BUFFER_FLAG_ flags.\n They may be used for example to hint what use the buffer may get after being\n created.\n Implementations of this callback may ignore flags they don't understand.\n If AV_GET_ENCODE_BUFFER_FLAG_REF is set in flags then the packet may be reused\n (read and/or written to if it is writable) later by libavcodec.\n\n This callback must be thread-safe, as when frame threading is used, it may\n be called from multiple threads simultaneously.\n\n @see avcodec_default_get_encode_buffer()\n\n - encoding: Set by libavcodec, user can override.\n - decoding: unused"] pub get_encode_buffer: ::std::option::Option< unsafe extern "C" fn( @@ -12722,1623 +9199,328 @@ pub struct AVCodecContext { flags: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int, >, - #[doc = " Audio channel layout.\n - encoding: must be set by the caller, to one of AVCodec.ch_layouts.\n - decoding: may be set by the caller if known e.g. from the container.\n The decoder can then override during decoding as needed."] - pub ch_layout: AVChannelLayout, #[doc = " Frame counter, set by libavcodec.\n\n - decoding: total number of frames returned from the decoder so far.\n - encoding: total number of frames passed to the encoder so far.\n\n @note the counter is not incremented if encoding/decoding resulted in\n an error."] pub frame_num: i64, -} -#[test] -fn bindgen_test_layout_AVCodecContext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 944usize, - concat!("Size of: ", stringify!(AVCodecContext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVCodecContext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).av_class) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(av_class) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).log_level_offset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(log_level_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).codec_type) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(codec_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).codec) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(codec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).codec_id) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(codec_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).codec_tag) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(codec_tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priv_data) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(priv_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).internal) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(internal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(opaque) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bit_rate) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(bit_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bit_rate_tolerance) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(bit_rate_tolerance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).global_quality) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(global_quality) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).compression_level) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(compression_level) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags2) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(flags2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extradata) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(extradata) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extradata_size) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(extradata_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).time_base) as usize - ptr as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(time_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ticks_per_frame) as usize - ptr as usize }, - 108usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(ticks_per_frame) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).delay) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(delay) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).coded_width) as usize - ptr as usize }, - 124usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(coded_width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).coded_height) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(coded_height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gop_size) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(gop_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pix_fmt) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(pix_fmt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).draw_horiz_band) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(draw_horiz_band) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).get_format) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(get_format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_b_frames) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(max_b_frames) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).b_quant_factor) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(b_quant_factor) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).b_quant_offset) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(b_quant_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).has_b_frames) as usize - ptr as usize }, - 172usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(has_b_frames) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i_quant_factor) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(i_quant_factor) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i_quant_offset) as usize - ptr as usize }, - 180usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(i_quant_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lumi_masking) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(lumi_masking) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).temporal_cplx_masking) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(temporal_cplx_masking) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).spatial_cplx_masking) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(spatial_cplx_masking) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p_masking) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(p_masking) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dark_masking) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(dark_masking) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slice_count) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(slice_count) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slice_offset) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(slice_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sample_aspect_ratio) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(sample_aspect_ratio) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).me_cmp) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(me_cmp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).me_sub_cmp) as usize - ptr as usize }, - 228usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(me_sub_cmp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mb_cmp) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(mb_cmp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ildct_cmp) as usize - ptr as usize }, - 236usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(ildct_cmp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dia_size) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(dia_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).last_predictor_count) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(last_predictor_count) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).me_pre_cmp) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(me_pre_cmp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pre_dia_size) as usize - ptr as usize }, - 252usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(pre_dia_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).me_subpel_quality) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(me_subpel_quality) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).me_range) as usize - ptr as usize }, - 260usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(me_range) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slice_flags) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(slice_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mb_decision) as usize - ptr as usize }, - 268usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(mb_decision) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).intra_matrix) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(intra_matrix) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).inter_matrix) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(inter_matrix) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).intra_dc_precision) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(intra_dc_precision) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).skip_top) as usize - ptr as usize }, - 292usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(skip_top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).skip_bottom) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(skip_bottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mb_lmin) as usize - ptr as usize }, - 300usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(mb_lmin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mb_lmax) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(mb_lmax) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bidir_refine) as usize - ptr as usize }, - 308usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(bidir_refine) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keyint_min) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(keyint_min) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).refs) as usize - ptr as usize }, - 316usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(refs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mv0_threshold) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(mv0_threshold) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_primaries) as usize - ptr as usize }, - 324usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(color_primaries) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_trc) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(color_trc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).colorspace) as usize - ptr as usize }, - 332usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(colorspace) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_range) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(color_range) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chroma_sample_location) as usize - ptr as usize }, - 340usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(chroma_sample_location) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slices) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(slices) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).field_order) as usize - ptr as usize }, - 348usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(field_order) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sample_rate) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(sample_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).channels) as usize - ptr as usize }, - 356usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(channels) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sample_fmt) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(sample_fmt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).frame_size) as usize - ptr as usize }, - 364usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(frame_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).frame_number) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(frame_number) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).block_align) as usize - ptr as usize }, - 372usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(block_align) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cutoff) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(cutoff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).channel_layout) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(channel_layout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).request_channel_layout) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(request_channel_layout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).audio_service_type) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(audio_service_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).request_sample_fmt) as usize - ptr as usize }, - 404usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(request_sample_fmt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).get_buffer2) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(get_buffer2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).qcompress) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(qcompress) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).qblur) as usize - ptr as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(qblur) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).qmin) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(qmin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).qmax) as usize - ptr as usize }, - 428usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(qmax) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_qdiff) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(max_qdiff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rc_buffer_size) as usize - ptr as usize }, - 436usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(rc_buffer_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rc_override_count) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(rc_override_count) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rc_override) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(rc_override) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rc_max_rate) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(rc_max_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rc_min_rate) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(rc_min_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rc_max_available_vbv_use) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(rc_max_available_vbv_use) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rc_min_vbv_overflow_use) as usize - ptr as usize }, - 476usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(rc_min_vbv_overflow_use) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rc_initial_buffer_occupancy) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(rc_initial_buffer_occupancy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).trellis) as usize - ptr as usize }, - 484usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(trellis) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stats_out) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(stats_out) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stats_in) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(stats_in) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).workaround_bugs) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(workaround_bugs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strict_std_compliance) as usize - ptr as usize }, - 508usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(strict_std_compliance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).error_concealment) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(error_concealment) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).debug) as usize - ptr as usize }, - 516usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(debug) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).err_recognition) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(err_recognition) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reordered_opaque) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(reordered_opaque) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hwaccel) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(hwaccel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hwaccel_context) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(hwaccel_context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).error) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(error) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dct_algo) as usize - ptr as usize }, - 616usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(dct_algo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).idct_algo) as usize - ptr as usize }, - 620usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(idct_algo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bits_per_coded_sample) as usize - ptr as usize }, - 624usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(bits_per_coded_sample) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bits_per_raw_sample) as usize - ptr as usize }, - 628usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(bits_per_raw_sample) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lowres) as usize - ptr as usize }, - 632usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(lowres) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).thread_count) as usize - ptr as usize }, - 636usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(thread_count) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).thread_type) as usize - ptr as usize }, - 640usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(thread_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).active_thread_type) as usize - ptr as usize }, - 644usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(active_thread_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).execute) as usize - ptr as usize }, - 648usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(execute) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).execute2) as usize - ptr as usize }, - 656usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(execute2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nsse_weight) as usize - ptr as usize }, - 664usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(nsse_weight) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).profile) as usize - ptr as usize }, - 668usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(profile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).level) as usize - ptr as usize }, - 672usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(level) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).skip_loop_filter) as usize - ptr as usize }, - 676usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(skip_loop_filter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).skip_idct) as usize - ptr as usize }, - 680usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(skip_idct) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).skip_frame) as usize - ptr as usize }, - 684usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(skip_frame) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).subtitle_header) as usize - ptr as usize }, - 688usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(subtitle_header) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).subtitle_header_size) as usize - ptr as usize }, - 696usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(subtitle_header_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).initial_padding) as usize - ptr as usize }, - 700usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(initial_padding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).framerate) as usize - ptr as usize }, - 704usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(framerate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sw_pix_fmt) as usize - ptr as usize }, - 712usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(sw_pix_fmt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pkt_timebase) as usize - ptr as usize }, - 716usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(pkt_timebase) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).codec_descriptor) as usize - ptr as usize }, - 728usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(codec_descriptor) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).pts_correction_num_faulty_pts) as usize - ptr as usize - }, - 736usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(pts_correction_num_faulty_pts) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).pts_correction_num_faulty_dts) as usize - ptr as usize - }, - 744usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(pts_correction_num_faulty_dts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pts_correction_last_pts) as usize - ptr as usize }, - 752usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(pts_correction_last_pts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pts_correction_last_dts) as usize - ptr as usize }, - 760usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(pts_correction_last_dts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sub_charenc) as usize - ptr as usize }, - 768usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(sub_charenc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sub_charenc_mode) as usize - ptr as usize }, - 776usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(sub_charenc_mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).skip_alpha) as usize - ptr as usize }, - 780usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(skip_alpha) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).seek_preroll) as usize - ptr as usize }, - 784usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(seek_preroll) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chroma_intra_matrix) as usize - ptr as usize }, - 792usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(chroma_intra_matrix) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dump_separator) as usize - ptr as usize }, - 800usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(dump_separator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).codec_whitelist) as usize - ptr as usize }, - 808usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(codec_whitelist) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).properties) as usize - ptr as usize }, - 816usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(properties) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).coded_side_data) as usize - ptr as usize }, - 824usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(coded_side_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_coded_side_data) as usize - ptr as usize }, - 832usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(nb_coded_side_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hw_frames_ctx) as usize - ptr as usize }, - 840usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(hw_frames_ctx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).trailing_padding) as usize - ptr as usize }, - 848usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(trailing_padding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_pixels) as usize - ptr as usize }, - 856usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(max_pixels) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hw_device_ctx) as usize - ptr as usize }, - 864usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(hw_device_ctx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hwaccel_flags) as usize - ptr as usize }, - 872usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(hwaccel_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).apply_cropping) as usize - ptr as usize }, - 876usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(apply_cropping) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extra_hw_frames) as usize - ptr as usize }, - 880usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(extra_hw_frames) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).discard_damaged_percentage) as usize - ptr as usize }, - 884usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(discard_damaged_percentage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_samples) as usize - ptr as usize }, - 888usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(max_samples) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).export_side_data) as usize - ptr as usize }, - 896usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(export_side_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).get_encode_buffer) as usize - ptr as usize }, - 904usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(get_encode_buffer) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ch_layout) as usize - ptr as usize }, - 912usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(ch_layout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).frame_num) as usize - ptr as usize }, - 936usize, - concat!( - "Offset of field: ", - stringify!(AVCodecContext), - "::", - stringify!(frame_num) - ) - ); -} + #[doc = " Decoding only. May be set by the caller before avcodec_open2() to an\n av_malloc()'ed array (or via AVOptions). Owned and freed by the decoder\n afterwards.\n\n Side data attached to decoded frames may come from several sources:\n 1. coded_side_data, which the decoder will for certain types translate\n from packet-type to frame-type and attach to frames;\n 2. side data attached to an AVPacket sent for decoding (same\n considerations as above);\n 3. extracted from the coded bytestream.\n The first two cases are supplied by the caller and typically come from a\n container.\n\n This array configures decoder behaviour in cases when side data of the\n same type is present both in the coded bytestream and in the\n user-supplied side data (items 1. and 2. above). In all cases, at most\n one instance of each side data type will be attached to output frames. By\n default it will be the bytestream side data. Adding an\n AVPacketSideDataType value to this array will flip the preference for\n this type, thus making the decoder prefer user-supplied side data over\n bytestream. In case side data of the same type is present both in\n coded_data and attacked to a packet, the packet instance always has\n priority.\n\n The array may also contain a single -1, in which case the preference is\n switched for all side data types."] + pub side_data_prefer_packet: *mut ::std::os::raw::c_int, + #[doc = " Number of entries in side_data_prefer_packet."] + pub nb_side_data_prefer_packet: ::std::os::raw::c_uint, + #[doc = " Array containing static side data, such as HDR10 CLL / MDCV structures.\n Side data entries should be allocated by usage of helpers defined in\n libavutil/frame.h.\n\n - encoding: may be set by user before calling avcodec_open2() for\n encoder configuration. Afterwards owned and freed by the\n encoder.\n - decoding: unused"] + pub decoded_side_data: *mut *mut AVFrameSideData, + pub nb_decoded_side_data: ::std::os::raw::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVCodecContext"][::std::mem::size_of::() - 864usize]; + ["Alignment of AVCodecContext"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVCodecContext::av_class"] + [::std::mem::offset_of!(AVCodecContext, av_class) - 0usize]; + ["Offset of field: AVCodecContext::log_level_offset"] + [::std::mem::offset_of!(AVCodecContext, log_level_offset) - 8usize]; + ["Offset of field: AVCodecContext::codec_type"] + [::std::mem::offset_of!(AVCodecContext, codec_type) - 12usize]; + ["Offset of field: AVCodecContext::codec"] + [::std::mem::offset_of!(AVCodecContext, codec) - 16usize]; + ["Offset of field: AVCodecContext::codec_id"] + [::std::mem::offset_of!(AVCodecContext, codec_id) - 24usize]; + ["Offset of field: AVCodecContext::codec_tag"] + [::std::mem::offset_of!(AVCodecContext, codec_tag) - 28usize]; + ["Offset of field: AVCodecContext::priv_data"] + [::std::mem::offset_of!(AVCodecContext, priv_data) - 32usize]; + ["Offset of field: AVCodecContext::internal"] + [::std::mem::offset_of!(AVCodecContext, internal) - 40usize]; + ["Offset of field: AVCodecContext::opaque"] + [::std::mem::offset_of!(AVCodecContext, opaque) - 48usize]; + ["Offset of field: AVCodecContext::bit_rate"] + [::std::mem::offset_of!(AVCodecContext, bit_rate) - 56usize]; + ["Offset of field: AVCodecContext::flags"] + [::std::mem::offset_of!(AVCodecContext, flags) - 64usize]; + ["Offset of field: AVCodecContext::flags2"] + [::std::mem::offset_of!(AVCodecContext, flags2) - 68usize]; + ["Offset of field: AVCodecContext::extradata"] + [::std::mem::offset_of!(AVCodecContext, extradata) - 72usize]; + ["Offset of field: AVCodecContext::extradata_size"] + [::std::mem::offset_of!(AVCodecContext, extradata_size) - 80usize]; + ["Offset of field: AVCodecContext::time_base"] + [::std::mem::offset_of!(AVCodecContext, time_base) - 84usize]; + ["Offset of field: AVCodecContext::pkt_timebase"] + [::std::mem::offset_of!(AVCodecContext, pkt_timebase) - 92usize]; + ["Offset of field: AVCodecContext::framerate"] + [::std::mem::offset_of!(AVCodecContext, framerate) - 100usize]; + ["Offset of field: AVCodecContext::ticks_per_frame"] + [::std::mem::offset_of!(AVCodecContext, ticks_per_frame) - 108usize]; + ["Offset of field: AVCodecContext::delay"] + [::std::mem::offset_of!(AVCodecContext, delay) - 112usize]; + ["Offset of field: AVCodecContext::width"] + [::std::mem::offset_of!(AVCodecContext, width) - 116usize]; + ["Offset of field: AVCodecContext::height"] + [::std::mem::offset_of!(AVCodecContext, height) - 120usize]; + ["Offset of field: AVCodecContext::coded_width"] + [::std::mem::offset_of!(AVCodecContext, coded_width) - 124usize]; + ["Offset of field: AVCodecContext::coded_height"] + [::std::mem::offset_of!(AVCodecContext, coded_height) - 128usize]; + ["Offset of field: AVCodecContext::sample_aspect_ratio"] + [::std::mem::offset_of!(AVCodecContext, sample_aspect_ratio) - 132usize]; + ["Offset of field: AVCodecContext::pix_fmt"] + [::std::mem::offset_of!(AVCodecContext, pix_fmt) - 140usize]; + ["Offset of field: AVCodecContext::sw_pix_fmt"] + [::std::mem::offset_of!(AVCodecContext, sw_pix_fmt) - 144usize]; + ["Offset of field: AVCodecContext::color_primaries"] + [::std::mem::offset_of!(AVCodecContext, color_primaries) - 148usize]; + ["Offset of field: AVCodecContext::color_trc"] + [::std::mem::offset_of!(AVCodecContext, color_trc) - 152usize]; + ["Offset of field: AVCodecContext::colorspace"] + [::std::mem::offset_of!(AVCodecContext, colorspace) - 156usize]; + ["Offset of field: AVCodecContext::color_range"] + [::std::mem::offset_of!(AVCodecContext, color_range) - 160usize]; + ["Offset of field: AVCodecContext::chroma_sample_location"] + [::std::mem::offset_of!(AVCodecContext, chroma_sample_location) - 164usize]; + ["Offset of field: AVCodecContext::field_order"] + [::std::mem::offset_of!(AVCodecContext, field_order) - 168usize]; + ["Offset of field: AVCodecContext::refs"] + [::std::mem::offset_of!(AVCodecContext, refs) - 172usize]; + ["Offset of field: AVCodecContext::has_b_frames"] + [::std::mem::offset_of!(AVCodecContext, has_b_frames) - 176usize]; + ["Offset of field: AVCodecContext::slice_flags"] + [::std::mem::offset_of!(AVCodecContext, slice_flags) - 180usize]; + ["Offset of field: AVCodecContext::draw_horiz_band"] + [::std::mem::offset_of!(AVCodecContext, draw_horiz_band) - 184usize]; + ["Offset of field: AVCodecContext::get_format"] + [::std::mem::offset_of!(AVCodecContext, get_format) - 192usize]; + ["Offset of field: AVCodecContext::max_b_frames"] + [::std::mem::offset_of!(AVCodecContext, max_b_frames) - 200usize]; + ["Offset of field: AVCodecContext::b_quant_factor"] + [::std::mem::offset_of!(AVCodecContext, b_quant_factor) - 204usize]; + ["Offset of field: AVCodecContext::b_quant_offset"] + [::std::mem::offset_of!(AVCodecContext, b_quant_offset) - 208usize]; + ["Offset of field: AVCodecContext::i_quant_factor"] + [::std::mem::offset_of!(AVCodecContext, i_quant_factor) - 212usize]; + ["Offset of field: AVCodecContext::i_quant_offset"] + [::std::mem::offset_of!(AVCodecContext, i_quant_offset) - 216usize]; + ["Offset of field: AVCodecContext::lumi_masking"] + [::std::mem::offset_of!(AVCodecContext, lumi_masking) - 220usize]; + ["Offset of field: AVCodecContext::temporal_cplx_masking"] + [::std::mem::offset_of!(AVCodecContext, temporal_cplx_masking) - 224usize]; + ["Offset of field: AVCodecContext::spatial_cplx_masking"] + [::std::mem::offset_of!(AVCodecContext, spatial_cplx_masking) - 228usize]; + ["Offset of field: AVCodecContext::p_masking"] + [::std::mem::offset_of!(AVCodecContext, p_masking) - 232usize]; + ["Offset of field: AVCodecContext::dark_masking"] + [::std::mem::offset_of!(AVCodecContext, dark_masking) - 236usize]; + ["Offset of field: AVCodecContext::nsse_weight"] + [::std::mem::offset_of!(AVCodecContext, nsse_weight) - 240usize]; + ["Offset of field: AVCodecContext::me_cmp"] + [::std::mem::offset_of!(AVCodecContext, me_cmp) - 244usize]; + ["Offset of field: AVCodecContext::me_sub_cmp"] + [::std::mem::offset_of!(AVCodecContext, me_sub_cmp) - 248usize]; + ["Offset of field: AVCodecContext::mb_cmp"] + [::std::mem::offset_of!(AVCodecContext, mb_cmp) - 252usize]; + ["Offset of field: AVCodecContext::ildct_cmp"] + [::std::mem::offset_of!(AVCodecContext, ildct_cmp) - 256usize]; + ["Offset of field: AVCodecContext::dia_size"] + [::std::mem::offset_of!(AVCodecContext, dia_size) - 260usize]; + ["Offset of field: AVCodecContext::last_predictor_count"] + [::std::mem::offset_of!(AVCodecContext, last_predictor_count) - 264usize]; + ["Offset of field: AVCodecContext::me_pre_cmp"] + [::std::mem::offset_of!(AVCodecContext, me_pre_cmp) - 268usize]; + ["Offset of field: AVCodecContext::pre_dia_size"] + [::std::mem::offset_of!(AVCodecContext, pre_dia_size) - 272usize]; + ["Offset of field: AVCodecContext::me_subpel_quality"] + [::std::mem::offset_of!(AVCodecContext, me_subpel_quality) - 276usize]; + ["Offset of field: AVCodecContext::me_range"] + [::std::mem::offset_of!(AVCodecContext, me_range) - 280usize]; + ["Offset of field: AVCodecContext::mb_decision"] + [::std::mem::offset_of!(AVCodecContext, mb_decision) - 284usize]; + ["Offset of field: AVCodecContext::intra_matrix"] + [::std::mem::offset_of!(AVCodecContext, intra_matrix) - 288usize]; + ["Offset of field: AVCodecContext::inter_matrix"] + [::std::mem::offset_of!(AVCodecContext, inter_matrix) - 296usize]; + ["Offset of field: AVCodecContext::chroma_intra_matrix"] + [::std::mem::offset_of!(AVCodecContext, chroma_intra_matrix) - 304usize]; + ["Offset of field: AVCodecContext::intra_dc_precision"] + [::std::mem::offset_of!(AVCodecContext, intra_dc_precision) - 312usize]; + ["Offset of field: AVCodecContext::mb_lmin"] + [::std::mem::offset_of!(AVCodecContext, mb_lmin) - 316usize]; + ["Offset of field: AVCodecContext::mb_lmax"] + [::std::mem::offset_of!(AVCodecContext, mb_lmax) - 320usize]; + ["Offset of field: AVCodecContext::bidir_refine"] + [::std::mem::offset_of!(AVCodecContext, bidir_refine) - 324usize]; + ["Offset of field: AVCodecContext::keyint_min"] + [::std::mem::offset_of!(AVCodecContext, keyint_min) - 328usize]; + ["Offset of field: AVCodecContext::gop_size"] + [::std::mem::offset_of!(AVCodecContext, gop_size) - 332usize]; + ["Offset of field: AVCodecContext::mv0_threshold"] + [::std::mem::offset_of!(AVCodecContext, mv0_threshold) - 336usize]; + ["Offset of field: AVCodecContext::slices"] + [::std::mem::offset_of!(AVCodecContext, slices) - 340usize]; + ["Offset of field: AVCodecContext::sample_rate"] + [::std::mem::offset_of!(AVCodecContext, sample_rate) - 344usize]; + ["Offset of field: AVCodecContext::sample_fmt"] + [::std::mem::offset_of!(AVCodecContext, sample_fmt) - 348usize]; + ["Offset of field: AVCodecContext::ch_layout"] + [::std::mem::offset_of!(AVCodecContext, ch_layout) - 352usize]; + ["Offset of field: AVCodecContext::frame_size"] + [::std::mem::offset_of!(AVCodecContext, frame_size) - 376usize]; + ["Offset of field: AVCodecContext::block_align"] + [::std::mem::offset_of!(AVCodecContext, block_align) - 380usize]; + ["Offset of field: AVCodecContext::cutoff"] + [::std::mem::offset_of!(AVCodecContext, cutoff) - 384usize]; + ["Offset of field: AVCodecContext::audio_service_type"] + [::std::mem::offset_of!(AVCodecContext, audio_service_type) - 388usize]; + ["Offset of field: AVCodecContext::request_sample_fmt"] + [::std::mem::offset_of!(AVCodecContext, request_sample_fmt) - 392usize]; + ["Offset of field: AVCodecContext::initial_padding"] + [::std::mem::offset_of!(AVCodecContext, initial_padding) - 396usize]; + ["Offset of field: AVCodecContext::trailing_padding"] + [::std::mem::offset_of!(AVCodecContext, trailing_padding) - 400usize]; + ["Offset of field: AVCodecContext::seek_preroll"] + [::std::mem::offset_of!(AVCodecContext, seek_preroll) - 404usize]; + ["Offset of field: AVCodecContext::get_buffer2"] + [::std::mem::offset_of!(AVCodecContext, get_buffer2) - 408usize]; + ["Offset of field: AVCodecContext::bit_rate_tolerance"] + [::std::mem::offset_of!(AVCodecContext, bit_rate_tolerance) - 416usize]; + ["Offset of field: AVCodecContext::global_quality"] + [::std::mem::offset_of!(AVCodecContext, global_quality) - 420usize]; + ["Offset of field: AVCodecContext::compression_level"] + [::std::mem::offset_of!(AVCodecContext, compression_level) - 424usize]; + ["Offset of field: AVCodecContext::qcompress"] + [::std::mem::offset_of!(AVCodecContext, qcompress) - 428usize]; + ["Offset of field: AVCodecContext::qblur"] + [::std::mem::offset_of!(AVCodecContext, qblur) - 432usize]; + ["Offset of field: AVCodecContext::qmin"] + [::std::mem::offset_of!(AVCodecContext, qmin) - 436usize]; + ["Offset of field: AVCodecContext::qmax"] + [::std::mem::offset_of!(AVCodecContext, qmax) - 440usize]; + ["Offset of field: AVCodecContext::max_qdiff"] + [::std::mem::offset_of!(AVCodecContext, max_qdiff) - 444usize]; + ["Offset of field: AVCodecContext::rc_buffer_size"] + [::std::mem::offset_of!(AVCodecContext, rc_buffer_size) - 448usize]; + ["Offset of field: AVCodecContext::rc_override_count"] + [::std::mem::offset_of!(AVCodecContext, rc_override_count) - 452usize]; + ["Offset of field: AVCodecContext::rc_override"] + [::std::mem::offset_of!(AVCodecContext, rc_override) - 456usize]; + ["Offset of field: AVCodecContext::rc_max_rate"] + [::std::mem::offset_of!(AVCodecContext, rc_max_rate) - 464usize]; + ["Offset of field: AVCodecContext::rc_min_rate"] + [::std::mem::offset_of!(AVCodecContext, rc_min_rate) - 472usize]; + ["Offset of field: AVCodecContext::rc_max_available_vbv_use"] + [::std::mem::offset_of!(AVCodecContext, rc_max_available_vbv_use) - 480usize]; + ["Offset of field: AVCodecContext::rc_min_vbv_overflow_use"] + [::std::mem::offset_of!(AVCodecContext, rc_min_vbv_overflow_use) - 484usize]; + ["Offset of field: AVCodecContext::rc_initial_buffer_occupancy"] + [::std::mem::offset_of!(AVCodecContext, rc_initial_buffer_occupancy) - 488usize]; + ["Offset of field: AVCodecContext::trellis"] + [::std::mem::offset_of!(AVCodecContext, trellis) - 492usize]; + ["Offset of field: AVCodecContext::stats_out"] + [::std::mem::offset_of!(AVCodecContext, stats_out) - 496usize]; + ["Offset of field: AVCodecContext::stats_in"] + [::std::mem::offset_of!(AVCodecContext, stats_in) - 504usize]; + ["Offset of field: AVCodecContext::workaround_bugs"] + [::std::mem::offset_of!(AVCodecContext, workaround_bugs) - 512usize]; + ["Offset of field: AVCodecContext::strict_std_compliance"] + [::std::mem::offset_of!(AVCodecContext, strict_std_compliance) - 516usize]; + ["Offset of field: AVCodecContext::error_concealment"] + [::std::mem::offset_of!(AVCodecContext, error_concealment) - 520usize]; + ["Offset of field: AVCodecContext::debug"] + [::std::mem::offset_of!(AVCodecContext, debug) - 524usize]; + ["Offset of field: AVCodecContext::err_recognition"] + [::std::mem::offset_of!(AVCodecContext, err_recognition) - 528usize]; + ["Offset of field: AVCodecContext::hwaccel"] + [::std::mem::offset_of!(AVCodecContext, hwaccel) - 536usize]; + ["Offset of field: AVCodecContext::hwaccel_context"] + [::std::mem::offset_of!(AVCodecContext, hwaccel_context) - 544usize]; + ["Offset of field: AVCodecContext::hw_frames_ctx"] + [::std::mem::offset_of!(AVCodecContext, hw_frames_ctx) - 552usize]; + ["Offset of field: AVCodecContext::hw_device_ctx"] + [::std::mem::offset_of!(AVCodecContext, hw_device_ctx) - 560usize]; + ["Offset of field: AVCodecContext::hwaccel_flags"] + [::std::mem::offset_of!(AVCodecContext, hwaccel_flags) - 568usize]; + ["Offset of field: AVCodecContext::extra_hw_frames"] + [::std::mem::offset_of!(AVCodecContext, extra_hw_frames) - 572usize]; + ["Offset of field: AVCodecContext::error"] + [::std::mem::offset_of!(AVCodecContext, error) - 576usize]; + ["Offset of field: AVCodecContext::dct_algo"] + [::std::mem::offset_of!(AVCodecContext, dct_algo) - 640usize]; + ["Offset of field: AVCodecContext::idct_algo"] + [::std::mem::offset_of!(AVCodecContext, idct_algo) - 644usize]; + ["Offset of field: AVCodecContext::bits_per_coded_sample"] + [::std::mem::offset_of!(AVCodecContext, bits_per_coded_sample) - 648usize]; + ["Offset of field: AVCodecContext::bits_per_raw_sample"] + [::std::mem::offset_of!(AVCodecContext, bits_per_raw_sample) - 652usize]; + ["Offset of field: AVCodecContext::thread_count"] + [::std::mem::offset_of!(AVCodecContext, thread_count) - 656usize]; + ["Offset of field: AVCodecContext::thread_type"] + [::std::mem::offset_of!(AVCodecContext, thread_type) - 660usize]; + ["Offset of field: AVCodecContext::active_thread_type"] + [::std::mem::offset_of!(AVCodecContext, active_thread_type) - 664usize]; + ["Offset of field: AVCodecContext::execute"] + [::std::mem::offset_of!(AVCodecContext, execute) - 672usize]; + ["Offset of field: AVCodecContext::execute2"] + [::std::mem::offset_of!(AVCodecContext, execute2) - 680usize]; + ["Offset of field: AVCodecContext::profile"] + [::std::mem::offset_of!(AVCodecContext, profile) - 688usize]; + ["Offset of field: AVCodecContext::level"] + [::std::mem::offset_of!(AVCodecContext, level) - 692usize]; + ["Offset of field: AVCodecContext::properties"] + [::std::mem::offset_of!(AVCodecContext, properties) - 696usize]; + ["Offset of field: AVCodecContext::skip_loop_filter"] + [::std::mem::offset_of!(AVCodecContext, skip_loop_filter) - 700usize]; + ["Offset of field: AVCodecContext::skip_idct"] + [::std::mem::offset_of!(AVCodecContext, skip_idct) - 704usize]; + ["Offset of field: AVCodecContext::skip_frame"] + [::std::mem::offset_of!(AVCodecContext, skip_frame) - 708usize]; + ["Offset of field: AVCodecContext::skip_alpha"] + [::std::mem::offset_of!(AVCodecContext, skip_alpha) - 712usize]; + ["Offset of field: AVCodecContext::skip_top"] + [::std::mem::offset_of!(AVCodecContext, skip_top) - 716usize]; + ["Offset of field: AVCodecContext::skip_bottom"] + [::std::mem::offset_of!(AVCodecContext, skip_bottom) - 720usize]; + ["Offset of field: AVCodecContext::lowres"] + [::std::mem::offset_of!(AVCodecContext, lowres) - 724usize]; + ["Offset of field: AVCodecContext::codec_descriptor"] + [::std::mem::offset_of!(AVCodecContext, codec_descriptor) - 728usize]; + ["Offset of field: AVCodecContext::sub_charenc"] + [::std::mem::offset_of!(AVCodecContext, sub_charenc) - 736usize]; + ["Offset of field: AVCodecContext::sub_charenc_mode"] + [::std::mem::offset_of!(AVCodecContext, sub_charenc_mode) - 744usize]; + ["Offset of field: AVCodecContext::subtitle_header_size"] + [::std::mem::offset_of!(AVCodecContext, subtitle_header_size) - 748usize]; + ["Offset of field: AVCodecContext::subtitle_header"] + [::std::mem::offset_of!(AVCodecContext, subtitle_header) - 752usize]; + ["Offset of field: AVCodecContext::dump_separator"] + [::std::mem::offset_of!(AVCodecContext, dump_separator) - 760usize]; + ["Offset of field: AVCodecContext::codec_whitelist"] + [::std::mem::offset_of!(AVCodecContext, codec_whitelist) - 768usize]; + ["Offset of field: AVCodecContext::coded_side_data"] + [::std::mem::offset_of!(AVCodecContext, coded_side_data) - 776usize]; + ["Offset of field: AVCodecContext::nb_coded_side_data"] + [::std::mem::offset_of!(AVCodecContext, nb_coded_side_data) - 784usize]; + ["Offset of field: AVCodecContext::export_side_data"] + [::std::mem::offset_of!(AVCodecContext, export_side_data) - 788usize]; + ["Offset of field: AVCodecContext::max_pixels"] + [::std::mem::offset_of!(AVCodecContext, max_pixels) - 792usize]; + ["Offset of field: AVCodecContext::apply_cropping"] + [::std::mem::offset_of!(AVCodecContext, apply_cropping) - 800usize]; + ["Offset of field: AVCodecContext::discard_damaged_percentage"] + [::std::mem::offset_of!(AVCodecContext, discard_damaged_percentage) - 804usize]; + ["Offset of field: AVCodecContext::max_samples"] + [::std::mem::offset_of!(AVCodecContext, max_samples) - 808usize]; + ["Offset of field: AVCodecContext::get_encode_buffer"] + [::std::mem::offset_of!(AVCodecContext, get_encode_buffer) - 816usize]; + ["Offset of field: AVCodecContext::frame_num"] + [::std::mem::offset_of!(AVCodecContext, frame_num) - 824usize]; + ["Offset of field: AVCodecContext::side_data_prefer_packet"] + [::std::mem::offset_of!(AVCodecContext, side_data_prefer_packet) - 832usize]; + ["Offset of field: AVCodecContext::nb_side_data_prefer_packet"] + [::std::mem::offset_of!(AVCodecContext, nb_side_data_prefer_packet) - 840usize]; + ["Offset of field: AVCodecContext::decoded_side_data"] + [::std::mem::offset_of!(AVCodecContext, decoded_side_data) - 848usize]; + ["Offset of field: AVCodecContext::nb_decoded_side_data"] + [::std::mem::offset_of!(AVCodecContext, nb_decoded_side_data) - 856usize]; +}; impl ::std::fmt::Debug for AVCodecContext { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write ! (f , "AVCodecContext {{ av_class: {:?}, log_level_offset: {:?}, codec_type: {:?}, codec: {:?}, codec_id: {:?}, codec_tag: {:?}, priv_data: {:?}, internal: {:?}, opaque: {:?}, bit_rate: {:?}, bit_rate_tolerance: {:?}, global_quality: {:?}, compression_level: {:?}, flags: {:?}, flags2: {:?}, extradata: {:?}, extradata_size: {:?}, time_base: {:?}, ticks_per_frame: {:?}, delay: {:?}, width: {:?}, height: {:?}, coded_width: {:?}, coded_height: {:?}, gop_size: {:?}, pix_fmt: {:?}, draw_horiz_band: {:?}, get_format: {:?}, max_b_frames: {:?}, b_quant_factor: {:?}, b_quant_offset: {:?}, has_b_frames: {:?}, i_quant_factor: {:?}, i_quant_offset: {:?}, lumi_masking: {:?}, temporal_cplx_masking: {:?}, spatial_cplx_masking: {:?}, p_masking: {:?}, dark_masking: {:?}, slice_count: {:?}, slice_offset: {:?}, sample_aspect_ratio: {:?}, me_cmp: {:?}, me_sub_cmp: {:?}, mb_cmp: {:?}, ildct_cmp: {:?}, dia_size: {:?}, last_predictor_count: {:?}, me_pre_cmp: {:?}, pre_dia_size: {:?}, me_subpel_quality: {:?}, me_range: {:?}, slice_flags: {:?}, mb_decision: {:?}, intra_matrix: {:?}, inter_matrix: {:?}, intra_dc_precision: {:?}, skip_top: {:?}, skip_bottom: {:?}, mb_lmin: {:?}, mb_lmax: {:?}, bidir_refine: {:?}, keyint_min: {:?}, refs: {:?}, mv0_threshold: {:?}, color_primaries: {:?}, color_trc: {:?}, colorspace: {:?}, color_range: {:?}, chroma_sample_location: {:?}, slices: {:?}, field_order: {:?}, sample_rate: {:?}, channels: {:?}, sample_fmt: {:?}, frame_size: {:?}, frame_number: {:?}, block_align: {:?}, cutoff: {:?}, channel_layout: {:?}, request_channel_layout: {:?}, audio_service_type: {:?}, request_sample_fmt: {:?}, get_buffer2: {:?}, qcompress: {:?}, qblur: {:?}, qmin: {:?}, qmax: {:?}, max_qdiff: {:?}, rc_buffer_size: {:?}, rc_override_count: {:?}, rc_override: {:?}, rc_max_rate: {:?}, rc_min_rate: {:?}, rc_max_available_vbv_use: {:?}, rc_min_vbv_overflow_use: {:?}, rc_initial_buffer_occupancy: {:?}, trellis: {:?}, stats_out: {:?}, stats_in: {:?}, workaround_bugs: {:?}, strict_std_compliance: {:?}, error_concealment: {:?}, debug: {:?}, err_recognition: {:?}, reordered_opaque: {:?}, hwaccel: {:?}, hwaccel_context: {:?}, error: {:?}, dct_algo: {:?}, idct_algo: {:?}, bits_per_coded_sample: {:?}, bits_per_raw_sample: {:?}, lowres: {:?}, thread_count: {:?}, thread_type: {:?}, active_thread_type: {:?}, execute: {:?}, execute2: {:?}, nsse_weight: {:?}, profile: {:?}, level: {:?}, skip_loop_filter: {:?}, skip_idct: {:?}, skip_frame: {:?}, subtitle_header: {:?}, subtitle_header_size: {:?}, initial_padding: {:?}, framerate: {:?}, sw_pix_fmt: {:?}, pkt_timebase: {:?}, codec_descriptor: {:?}, pts_correction_num_faulty_pts: {:?}, pts_correction_num_faulty_dts: {:?}, pts_correction_last_pts: {:?}, pts_correction_last_dts: {:?}, sub_charenc: {:?}, sub_charenc_mode: {:?}, skip_alpha: {:?}, seek_preroll: {:?}, chroma_intra_matrix: {:?}, dump_separator: {:?}, codec_whitelist: {:?}, properties: {:?}, coded_side_data: {:?}, nb_coded_side_data: {:?}, hw_frames_ctx: {:?}, trailing_padding: {:?}, max_pixels: {:?}, hw_device_ctx: {:?}, hwaccel_flags: {:?}, apply_cropping: {:?}, extra_hw_frames: {:?}, discard_damaged_percentage: {:?}, max_samples: {:?}, export_side_data: {:?}, get_encode_buffer: {:?}, ch_layout: {:?}, frame_num: {:?} }}" , self . av_class , self . log_level_offset , self . codec_type , self . codec , self . codec_id , self . codec_tag , self . priv_data , self . internal , self . opaque , self . bit_rate , self . bit_rate_tolerance , self . global_quality , self . compression_level , self . flags , self . flags2 , self . extradata , self . extradata_size , self . time_base , self . ticks_per_frame , self . delay , self . width , self . height , self . coded_width , self . coded_height , self . gop_size , self . pix_fmt , self . draw_horiz_band , self . get_format , self . max_b_frames , self . b_quant_factor , self . b_quant_offset , self . has_b_frames , self . i_quant_factor , self . i_quant_offset , self . lumi_masking , self . temporal_cplx_masking , self . spatial_cplx_masking , self . p_masking , self . dark_masking , self . slice_count , self . slice_offset , self . sample_aspect_ratio , self . me_cmp , self . me_sub_cmp , self . mb_cmp , self . ildct_cmp , self . dia_size , self . last_predictor_count , self . me_pre_cmp , self . pre_dia_size , self . me_subpel_quality , self . me_range , self . slice_flags , self . mb_decision , self . intra_matrix , self . inter_matrix , self . intra_dc_precision , self . skip_top , self . skip_bottom , self . mb_lmin , self . mb_lmax , self . bidir_refine , self . keyint_min , self . refs , self . mv0_threshold , self . color_primaries , self . color_trc , self . colorspace , self . color_range , self . chroma_sample_location , self . slices , self . field_order , self . sample_rate , self . channels , self . sample_fmt , self . frame_size , self . frame_number , self . block_align , self . cutoff , self . channel_layout , self . request_channel_layout , self . audio_service_type , self . request_sample_fmt , self . get_buffer2 , self . qcompress , self . qblur , self . qmin , self . qmax , self . max_qdiff , self . rc_buffer_size , self . rc_override_count , self . rc_override , self . rc_max_rate , self . rc_min_rate , self . rc_max_available_vbv_use , self . rc_min_vbv_overflow_use , self . rc_initial_buffer_occupancy , self . trellis , self . stats_out , self . stats_in , self . workaround_bugs , self . strict_std_compliance , self . error_concealment , self . debug , self . err_recognition , self . reordered_opaque , self . hwaccel , self . hwaccel_context , self . error , self . dct_algo , self . idct_algo , self . bits_per_coded_sample , self . bits_per_raw_sample , self . lowres , self . thread_count , self . thread_type , self . active_thread_type , self . execute , self . execute2 , self . nsse_weight , self . profile , self . level , self . skip_loop_filter , self . skip_idct , self . skip_frame , self . subtitle_header , self . subtitle_header_size , self . initial_padding , self . framerate , self . sw_pix_fmt , self . pkt_timebase , self . codec_descriptor , self . pts_correction_num_faulty_pts , self . pts_correction_num_faulty_dts , self . pts_correction_last_pts , self . pts_correction_last_dts , self . sub_charenc , self . sub_charenc_mode , self . skip_alpha , self . seek_preroll , self . chroma_intra_matrix , self . dump_separator , self . codec_whitelist , self . properties , self . coded_side_data , self . nb_coded_side_data , self . hw_frames_ctx , self . trailing_padding , self . max_pixels , self . hw_device_ctx , self . hwaccel_flags , self . apply_cropping , self . extra_hw_frames , self . discard_damaged_percentage , self . max_samples , self . export_side_data , self . get_encode_buffer , self . ch_layout , self . frame_num) + write ! (f , "AVCodecContext {{ av_class: {:?}, log_level_offset: {:?}, codec_type: {:?}, codec: {:?}, codec_id: {:?}, codec_tag: {:?}, priv_data: {:?}, internal: {:?}, opaque: {:?}, bit_rate: {:?}, flags: {:?}, flags2: {:?}, extradata: {:?}, extradata_size: {:?}, time_base: {:?}, pkt_timebase: {:?}, framerate: {:?}, ticks_per_frame: {:?}, delay: {:?}, width: {:?}, height: {:?}, coded_width: {:?}, coded_height: {:?}, sample_aspect_ratio: {:?}, pix_fmt: {:?}, sw_pix_fmt: {:?}, color_primaries: {:?}, color_trc: {:?}, colorspace: {:?}, color_range: {:?}, chroma_sample_location: {:?}, field_order: {:?}, refs: {:?}, has_b_frames: {:?}, slice_flags: {:?}, draw_horiz_band: {:?}, get_format: {:?}, max_b_frames: {:?}, b_quant_factor: {:?}, b_quant_offset: {:?}, i_quant_factor: {:?}, i_quant_offset: {:?}, lumi_masking: {:?}, temporal_cplx_masking: {:?}, spatial_cplx_masking: {:?}, p_masking: {:?}, dark_masking: {:?}, nsse_weight: {:?}, me_cmp: {:?}, me_sub_cmp: {:?}, mb_cmp: {:?}, ildct_cmp: {:?}, dia_size: {:?}, last_predictor_count: {:?}, me_pre_cmp: {:?}, pre_dia_size: {:?}, me_subpel_quality: {:?}, me_range: {:?}, mb_decision: {:?}, intra_matrix: {:?}, inter_matrix: {:?}, chroma_intra_matrix: {:?}, intra_dc_precision: {:?}, mb_lmin: {:?}, mb_lmax: {:?}, bidir_refine: {:?}, keyint_min: {:?}, gop_size: {:?}, mv0_threshold: {:?}, slices: {:?}, sample_rate: {:?}, sample_fmt: {:?}, ch_layout: {:?}, frame_size: {:?}, block_align: {:?}, cutoff: {:?}, audio_service_type: {:?}, request_sample_fmt: {:?}, initial_padding: {:?}, trailing_padding: {:?}, seek_preroll: {:?}, get_buffer2: {:?}, bit_rate_tolerance: {:?}, global_quality: {:?}, compression_level: {:?}, qcompress: {:?}, qblur: {:?}, qmin: {:?}, qmax: {:?}, max_qdiff: {:?}, rc_buffer_size: {:?}, rc_override_count: {:?}, rc_override: {:?}, rc_max_rate: {:?}, rc_min_rate: {:?}, rc_max_available_vbv_use: {:?}, rc_min_vbv_overflow_use: {:?}, rc_initial_buffer_occupancy: {:?}, trellis: {:?}, stats_out: {:?}, stats_in: {:?}, workaround_bugs: {:?}, strict_std_compliance: {:?}, error_concealment: {:?}, debug: {:?}, err_recognition: {:?}, hwaccel: {:?}, hwaccel_context: {:?}, hw_frames_ctx: {:?}, hw_device_ctx: {:?}, hwaccel_flags: {:?}, extra_hw_frames: {:?}, error: {:?}, dct_algo: {:?}, idct_algo: {:?}, bits_per_coded_sample: {:?}, bits_per_raw_sample: {:?}, thread_count: {:?}, thread_type: {:?}, active_thread_type: {:?}, execute: {:?}, execute2: {:?}, profile: {:?}, level: {:?}, properties: {:?}, skip_loop_filter: {:?}, skip_idct: {:?}, skip_frame: {:?}, skip_alpha: {:?}, skip_top: {:?}, skip_bottom: {:?}, lowres: {:?}, codec_descriptor: {:?}, sub_charenc: {:?}, sub_charenc_mode: {:?}, subtitle_header_size: {:?}, subtitle_header: {:?}, dump_separator: {:?}, codec_whitelist: {:?}, coded_side_data: {:?}, nb_coded_side_data: {:?}, export_side_data: {:?}, max_pixels: {:?}, apply_cropping: {:?}, discard_damaged_percentage: {:?}, max_samples: {:?}, get_encode_buffer: {:?}, frame_num: {:?}, side_data_prefer_packet: {:?}, nb_side_data_prefer_packet: {:?}, decoded_side_data: {:?}, nb_decoded_side_data: {:?} }}" , self . av_class , self . log_level_offset , self . codec_type , self . codec , self . codec_id , self . codec_tag , self . priv_data , self . internal , self . opaque , self . bit_rate , self . flags , self . flags2 , self . extradata , self . extradata_size , self . time_base , self . pkt_timebase , self . framerate , self . ticks_per_frame , self . delay , self . width , self . height , self . coded_width , self . coded_height , self . sample_aspect_ratio , self . pix_fmt , self . sw_pix_fmt , self . color_primaries , self . color_trc , self . colorspace , self . color_range , self . chroma_sample_location , self . field_order , self . refs , self . has_b_frames , self . slice_flags , self . draw_horiz_band , self . get_format , self . max_b_frames , self . b_quant_factor , self . b_quant_offset , self . i_quant_factor , self . i_quant_offset , self . lumi_masking , self . temporal_cplx_masking , self . spatial_cplx_masking , self . p_masking , self . dark_masking , self . nsse_weight , self . me_cmp , self . me_sub_cmp , self . mb_cmp , self . ildct_cmp , self . dia_size , self . last_predictor_count , self . me_pre_cmp , self . pre_dia_size , self . me_subpel_quality , self . me_range , self . mb_decision , self . intra_matrix , self . inter_matrix , self . chroma_intra_matrix , self . intra_dc_precision , self . mb_lmin , self . mb_lmax , self . bidir_refine , self . keyint_min , self . gop_size , self . mv0_threshold , self . slices , self . sample_rate , self . sample_fmt , self . ch_layout , self . frame_size , self . block_align , self . cutoff , self . audio_service_type , self . request_sample_fmt , self . initial_padding , self . trailing_padding , self . seek_preroll , self . get_buffer2 , self . bit_rate_tolerance , self . global_quality , self . compression_level , self . qcompress , self . qblur , self . qmin , self . qmax , self . max_qdiff , self . rc_buffer_size , self . rc_override_count , self . rc_override , self . rc_max_rate , self . rc_min_rate , self . rc_max_available_vbv_use , self . rc_min_vbv_overflow_use , self . rc_initial_buffer_occupancy , self . trellis , self . stats_out , self . stats_in , self . workaround_bugs , self . strict_std_compliance , self . error_concealment , self . debug , self . err_recognition , self . hwaccel , self . hwaccel_context , self . hw_frames_ctx , self . hw_device_ctx , self . hwaccel_flags , self . extra_hw_frames , self . error , self . dct_algo , self . idct_algo , self . bits_per_coded_sample , self . bits_per_raw_sample , self . thread_count , self . thread_type , self . active_thread_type , self . execute , self . execute2 , self . profile , self . level , self . properties , self . skip_loop_filter , self . skip_idct , self . skip_frame , self . skip_alpha , self . skip_top , self . skip_bottom , self . lowres , self . codec_descriptor , self . sub_charenc , self . sub_charenc_mode , self . subtitle_header_size , self . subtitle_header , self . dump_separator , self . codec_whitelist , self . coded_side_data , self . nb_coded_side_data , self . export_side_data , self . max_pixels , self . apply_cropping , self . discard_damaged_percentage , self . max_samples , self . get_encode_buffer , self . frame_num , self . side_data_prefer_packet , self . nb_side_data_prefer_packet , self . decoded_side_data , self . nb_decoded_side_data) } } #[doc = " @defgroup lavc_hwaccel AVHWAccel\n\n @note Nothing in this structure should be accessed by the user. At some\n point in future it will not be externally visible at all.\n\n @{"] @@ -14356,71 +9538,17 @@ pub struct AVHWAccel { #[doc = " Hardware accelerated codec capabilities.\n see AV_HWACCEL_CODEC_CAP_*"] pub capabilities: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVHWAccel() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AVHWAccel)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVHWAccel)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVHWAccel), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVHWAccel), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVHWAccel), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pix_fmt) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVHWAccel), - "::", - stringify!(pix_fmt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AVHWAccel), - "::", - stringify!(capabilities) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVHWAccel"][::std::mem::size_of::() - 24usize]; + ["Alignment of AVHWAccel"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVHWAccel::name"][::std::mem::offset_of!(AVHWAccel, name) - 0usize]; + ["Offset of field: AVHWAccel::type_"][::std::mem::offset_of!(AVHWAccel, type_) - 8usize]; + ["Offset of field: AVHWAccel::id"][::std::mem::offset_of!(AVHWAccel, id) - 12usize]; + ["Offset of field: AVHWAccel::pix_fmt"][::std::mem::offset_of!(AVHWAccel, pix_fmt) - 16usize]; + ["Offset of field: AVHWAccel::capabilities"] + [::std::mem::offset_of!(AVHWAccel, capabilities) - 20usize]; +}; pub const SUBTITLE_NONE: AVSubtitleType = 0; #[doc = "< A bitmap, pict will be set"] pub const SUBTITLE_BITMAP: AVSubtitleType = 1; @@ -14446,224 +9574,60 @@ pub struct AVSubtitleRect { #[doc = " data+linesize for the bitmap of this subtitle.\n Can be set for text/ass as well once they are rendered."] pub data: [*mut u8; 4usize], pub linesize: [::std::os::raw::c_int; 4usize], + pub flags: ::std::os::raw::c_int, pub type_: AVSubtitleType, #[doc = "< 0 terminated plain UTF-8 text"] pub text: *mut ::std::os::raw::c_char, #[doc = " 0 terminated ASS/SSA compatible event line.\n The presentation of this is unaffected by the other values in this\n struct."] pub ass: *mut ::std::os::raw::c_char, - pub flags: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_AVSubtitleRect() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(AVSubtitleRect)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVSubtitleRect)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVSubtitleRect), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVSubtitleRect), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVSubtitleRect), - "::", - stringify!(w) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVSubtitleRect), - "::", - stringify!(h) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_colors) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVSubtitleRect), - "::", - stringify!(nb_colors) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVSubtitleRect), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).linesize) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVSubtitleRect), - "::", - stringify!(linesize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVSubtitleRect), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVSubtitleRect), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ass) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(AVSubtitleRect), - "::", - stringify!(ass) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(AVSubtitleRect), - "::", - stringify!(flags) - ) - ); } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVSubtitleRect"][::std::mem::size_of::() - 96usize]; + ["Alignment of AVSubtitleRect"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVSubtitleRect::x"][::std::mem::offset_of!(AVSubtitleRect, x) - 0usize]; + ["Offset of field: AVSubtitleRect::y"][::std::mem::offset_of!(AVSubtitleRect, y) - 4usize]; + ["Offset of field: AVSubtitleRect::w"][::std::mem::offset_of!(AVSubtitleRect, w) - 8usize]; + ["Offset of field: AVSubtitleRect::h"][::std::mem::offset_of!(AVSubtitleRect, h) - 12usize]; + ["Offset of field: AVSubtitleRect::nb_colors"] + [::std::mem::offset_of!(AVSubtitleRect, nb_colors) - 16usize]; + ["Offset of field: AVSubtitleRect::data"] + [::std::mem::offset_of!(AVSubtitleRect, data) - 24usize]; + ["Offset of field: AVSubtitleRect::linesize"] + [::std::mem::offset_of!(AVSubtitleRect, linesize) - 56usize]; + ["Offset of field: AVSubtitleRect::flags"] + [::std::mem::offset_of!(AVSubtitleRect, flags) - 72usize]; + ["Offset of field: AVSubtitleRect::type_"] + [::std::mem::offset_of!(AVSubtitleRect, type_) - 76usize]; + ["Offset of field: AVSubtitleRect::text"] + [::std::mem::offset_of!(AVSubtitleRect, text) - 80usize]; + ["Offset of field: AVSubtitleRect::ass"][::std::mem::offset_of!(AVSubtitleRect, ass) - 88usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct AVSubtitle { - pub format: u16, - pub start_display_time: u32, - pub end_display_time: u32, - pub num_rects: ::std::os::raw::c_uint, - pub rects: *mut *mut AVSubtitleRect, - #[doc = "< Same as packet pts, in AV_TIME_BASE"] - pub pts: i64, -} -#[test] -fn bindgen_test_layout_AVSubtitle() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(AVSubtitle)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVSubtitle)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVSubtitle), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start_display_time) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVSubtitle), - "::", - stringify!(start_display_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).end_display_time) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVSubtitle), - "::", - stringify!(end_display_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).num_rects) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVSubtitle), - "::", - stringify!(num_rects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rects) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVSubtitle), - "::", - stringify!(rects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pts) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVSubtitle), - "::", - stringify!(pts) - ) - ); +pub struct AVSubtitle { + pub format: u16, + pub start_display_time: u32, + pub end_display_time: u32, + pub num_rects: ::std::os::raw::c_uint, + pub rects: *mut *mut AVSubtitleRect, + #[doc = "< Same as packet pts, in AV_TIME_BASE"] + pub pts: i64, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVSubtitle"][::std::mem::size_of::() - 32usize]; + ["Alignment of AVSubtitle"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVSubtitle::format"][::std::mem::offset_of!(AVSubtitle, format) - 0usize]; + ["Offset of field: AVSubtitle::start_display_time"] + [::std::mem::offset_of!(AVSubtitle, start_display_time) - 4usize]; + ["Offset of field: AVSubtitle::end_display_time"] + [::std::mem::offset_of!(AVSubtitle, end_display_time) - 8usize]; + ["Offset of field: AVSubtitle::num_rects"] + [::std::mem::offset_of!(AVSubtitle, num_rects) - 12usize]; + ["Offset of field: AVSubtitle::rects"][::std::mem::offset_of!(AVSubtitle, rects) - 16usize]; + ["Offset of field: AVSubtitle::pts"][::std::mem::offset_of!(AVSubtitle, pts) - 24usize]; +}; extern "C" { #[doc = " Return the LIBAVCODEC_VERSION_INT constant."] pub fn avcodec_version() -> ::std::os::raw::c_uint; @@ -14715,7 +9679,7 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Close a given AVCodecContext and free all the data associated with it\n (but not the AVCodecContext itself).\n\n Calling this function on an AVCodecContext that hasn't been opened will free\n the codec-specific data allocated in avcodec_alloc_context3() with a non-NULL\n codec. Subsequent calls will do nothing.\n\n @note Do not use this function. Use avcodec_free_context() to destroy a\n codec context (either open or closed). Opening and closing a codec context\n multiple times is not supported anymore -- use multiple codec contexts\n instead."] + #[doc = " Close a given AVCodecContext and free all the data associated with it\n (but not the AVCodecContext itself).\n\n Calling this function on an AVCodecContext that hasn't been opened will free\n the codec-specific data allocated in avcodec_alloc_context3() with a non-NULL\n codec. Subsequent calls will do nothing.\n\n @deprecated Do not use this function. Use avcodec_free_context() to destroy a\n codec context (either open or closed). Opening and closing a codec context\n multiple times is not supported anymore -- use multiple codec contexts\n instead."] pub fn avcodec_close(avctx: *mut AVCodecContext) -> ::std::os::raw::c_int; } extern "C" { @@ -14755,21 +9719,6 @@ extern "C" { linesize_align: *mut ::std::os::raw::c_int, ); } -extern "C" { - #[doc = " Converts AVChromaLocation to swscale x/y chroma position.\n\n The positions represent the chroma (0,0) position in a coordinates system\n with luma (0,0) representing the origin and luma(1,1) representing 256,256\n\n @param xpos horizontal chroma sample position\n @param ypos vertical chroma sample position\n @deprecated Use av_chroma_location_enum_to_pos() instead."] - pub fn avcodec_enum_to_chroma_pos( - xpos: *mut ::std::os::raw::c_int, - ypos: *mut ::std::os::raw::c_int, - pos: AVChromaLocation, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[doc = " Converts swscale x/y chroma position to AVChromaLocation.\n\n The positions represent the chroma (0,0) position in a coordinates system\n with luma (0,0) representing the origin and luma(1,1) representing 256,256\n\n @param xpos horizontal chroma sample position\n @param ypos vertical chroma sample position\n @deprecated Use av_chroma_location_pos_to_enum() instead."] - pub fn avcodec_chroma_pos_to_enum( - xpos: ::std::os::raw::c_int, - ypos: ::std::os::raw::c_int, - ) -> AVChromaLocation; -} extern "C" { #[doc = " Decode a subtitle message.\n Return a negative value on error, otherwise return the number of bytes used.\n If no subtitle could be decompressed, got_sub_ptr is zero.\n Otherwise, the subtitle is stored in *sub.\n Note that AV_CODEC_CAP_DR1 is not available for subtitle codecs. This is for\n simplicity, because the performance difference is expected to be negligible\n and reusing a get_buffer written for video codecs would probably perform badly\n due to a potentially very different allocation pattern.\n\n Some decoders (those marked with AV_CODEC_CAP_DELAY) have a delay between input\n and output. This means that for some packets they will not immediately\n produce decoded output and need to be flushed at the end of decoding to get\n all the decoded data. Flushing is done by calling this function with packets\n with avpkt->data set to NULL and avpkt->size set to 0 until it stops\n returning subtitles. It is safe to flush even those decoders that are not\n marked with AV_CODEC_CAP_DELAY, then no subtitles will be returned.\n\n @note The AVCodecContext MUST have been opened with @ref avcodec_open2()\n before packets may be fed to the decoder.\n\n @param avctx the codec context\n @param[out] sub The preallocated AVSubtitle in which the decoded subtitle will be stored,\n must be freed with avsubtitle_free if *got_sub_ptr is set.\n @param[in,out] got_sub_ptr Zero if no subtitle could be decompressed, otherwise, it is nonzero.\n @param[in] avpkt The input AVPacket containing the input buffer."] pub fn avcodec_decode_subtitle2( @@ -14880,371 +9829,81 @@ pub struct AVCodecParserContext { #[doc = " The format of the coded data, corresponds to enum AVPixelFormat for video\n and for enum AVSampleFormat for audio.\n\n Note that a decoder can have considerable freedom in how exactly it\n decodes the data, so the format reported here might be different from the\n one returned by a decoder."] pub format: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVCodecParserContext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 336usize, - concat!("Size of: ", stringify!(AVCodecParserContext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVCodecParserContext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priv_data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(priv_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).parser) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(parser) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).frame_offset) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(frame_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cur_offset) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(cur_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).next_frame_offset) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(next_frame_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pict_type) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(pict_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).repeat_pict) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(repeat_pict) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pts) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(pts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dts) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(dts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).last_pts) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(last_pts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).last_dts) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(last_dts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fetch_timestamp) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(fetch_timestamp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cur_frame_start_index) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(cur_frame_start_index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cur_frame_offset) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(cur_frame_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cur_frame_pts) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(cur_frame_pts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cur_frame_dts) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(cur_frame_dts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cur_frame_end) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(cur_frame_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).key_frame) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(key_frame) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dts_sync_point) as usize - ptr as usize }, - 236usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(dts_sync_point) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dts_ref_dts_delta) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(dts_ref_dts_delta) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pts_dts_delta) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(pts_dts_delta) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cur_frame_pos) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(cur_frame_pos) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pos) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(pos) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).last_pos) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(last_pos) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).duration) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(duration) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).field_order) as usize - ptr as usize }, - 300usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(field_order) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).picture_structure) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(picture_structure) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).output_picture_number) as usize - ptr as usize }, - 308usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(output_picture_number) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 316usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).coded_width) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(coded_width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).coded_height) as usize - ptr as usize }, - 324usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(coded_height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParserContext), - "::", - stringify!(format) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVCodecParserContext"][::std::mem::size_of::() - 336usize]; + ["Alignment of AVCodecParserContext"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVCodecParserContext::priv_data"] + [::std::mem::offset_of!(AVCodecParserContext, priv_data) - 0usize]; + ["Offset of field: AVCodecParserContext::parser"] + [::std::mem::offset_of!(AVCodecParserContext, parser) - 8usize]; + ["Offset of field: AVCodecParserContext::frame_offset"] + [::std::mem::offset_of!(AVCodecParserContext, frame_offset) - 16usize]; + ["Offset of field: AVCodecParserContext::cur_offset"] + [::std::mem::offset_of!(AVCodecParserContext, cur_offset) - 24usize]; + ["Offset of field: AVCodecParserContext::next_frame_offset"] + [::std::mem::offset_of!(AVCodecParserContext, next_frame_offset) - 32usize]; + ["Offset of field: AVCodecParserContext::pict_type"] + [::std::mem::offset_of!(AVCodecParserContext, pict_type) - 40usize]; + ["Offset of field: AVCodecParserContext::repeat_pict"] + [::std::mem::offset_of!(AVCodecParserContext, repeat_pict) - 44usize]; + ["Offset of field: AVCodecParserContext::pts"] + [::std::mem::offset_of!(AVCodecParserContext, pts) - 48usize]; + ["Offset of field: AVCodecParserContext::dts"] + [::std::mem::offset_of!(AVCodecParserContext, dts) - 56usize]; + ["Offset of field: AVCodecParserContext::last_pts"] + [::std::mem::offset_of!(AVCodecParserContext, last_pts) - 64usize]; + ["Offset of field: AVCodecParserContext::last_dts"] + [::std::mem::offset_of!(AVCodecParserContext, last_dts) - 72usize]; + ["Offset of field: AVCodecParserContext::fetch_timestamp"] + [::std::mem::offset_of!(AVCodecParserContext, fetch_timestamp) - 80usize]; + ["Offset of field: AVCodecParserContext::cur_frame_start_index"] + [::std::mem::offset_of!(AVCodecParserContext, cur_frame_start_index) - 84usize]; + ["Offset of field: AVCodecParserContext::cur_frame_offset"] + [::std::mem::offset_of!(AVCodecParserContext, cur_frame_offset) - 88usize]; + ["Offset of field: AVCodecParserContext::cur_frame_pts"] + [::std::mem::offset_of!(AVCodecParserContext, cur_frame_pts) - 120usize]; + ["Offset of field: AVCodecParserContext::cur_frame_dts"] + [::std::mem::offset_of!(AVCodecParserContext, cur_frame_dts) - 152usize]; + ["Offset of field: AVCodecParserContext::flags"] + [::std::mem::offset_of!(AVCodecParserContext, flags) - 184usize]; + ["Offset of field: AVCodecParserContext::offset"] + [::std::mem::offset_of!(AVCodecParserContext, offset) - 192usize]; + ["Offset of field: AVCodecParserContext::cur_frame_end"] + [::std::mem::offset_of!(AVCodecParserContext, cur_frame_end) - 200usize]; + ["Offset of field: AVCodecParserContext::key_frame"] + [::std::mem::offset_of!(AVCodecParserContext, key_frame) - 232usize]; + ["Offset of field: AVCodecParserContext::dts_sync_point"] + [::std::mem::offset_of!(AVCodecParserContext, dts_sync_point) - 236usize]; + ["Offset of field: AVCodecParserContext::dts_ref_dts_delta"] + [::std::mem::offset_of!(AVCodecParserContext, dts_ref_dts_delta) - 240usize]; + ["Offset of field: AVCodecParserContext::pts_dts_delta"] + [::std::mem::offset_of!(AVCodecParserContext, pts_dts_delta) - 244usize]; + ["Offset of field: AVCodecParserContext::cur_frame_pos"] + [::std::mem::offset_of!(AVCodecParserContext, cur_frame_pos) - 248usize]; + ["Offset of field: AVCodecParserContext::pos"] + [::std::mem::offset_of!(AVCodecParserContext, pos) - 280usize]; + ["Offset of field: AVCodecParserContext::last_pos"] + [::std::mem::offset_of!(AVCodecParserContext, last_pos) - 288usize]; + ["Offset of field: AVCodecParserContext::duration"] + [::std::mem::offset_of!(AVCodecParserContext, duration) - 296usize]; + ["Offset of field: AVCodecParserContext::field_order"] + [::std::mem::offset_of!(AVCodecParserContext, field_order) - 300usize]; + ["Offset of field: AVCodecParserContext::picture_structure"] + [::std::mem::offset_of!(AVCodecParserContext, picture_structure) - 304usize]; + ["Offset of field: AVCodecParserContext::output_picture_number"] + [::std::mem::offset_of!(AVCodecParserContext, output_picture_number) - 308usize]; + ["Offset of field: AVCodecParserContext::width"] + [::std::mem::offset_of!(AVCodecParserContext, width) - 312usize]; + ["Offset of field: AVCodecParserContext::height"] + [::std::mem::offset_of!(AVCodecParserContext, height) - 316usize]; + ["Offset of field: AVCodecParserContext::coded_width"] + [::std::mem::offset_of!(AVCodecParserContext, coded_width) - 320usize]; + ["Offset of field: AVCodecParserContext::coded_height"] + [::std::mem::offset_of!(AVCodecParserContext, coded_height) - 324usize]; + ["Offset of field: AVCodecParserContext::format"] + [::std::mem::offset_of!(AVCodecParserContext, format) - 328usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AVCodecParser { @@ -15272,81 +9931,23 @@ pub struct AVCodecParser { ) -> ::std::os::raw::c_int, >, } -#[test] -fn bindgen_test_layout_AVCodecParser() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(AVCodecParser)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVCodecParser)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).codec_ids) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParser), - "::", - stringify!(codec_ids) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priv_data_size) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParser), - "::", - stringify!(priv_data_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).parser_init) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParser), - "::", - stringify!(parser_init) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).parser_parse) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParser), - "::", - stringify!(parser_parse) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).parser_close) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParser), - "::", - stringify!(parser_close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).split) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVCodecParser), - "::", - stringify!(split) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVCodecParser"][::std::mem::size_of::() - 64usize]; + ["Alignment of AVCodecParser"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVCodecParser::codec_ids"] + [::std::mem::offset_of!(AVCodecParser, codec_ids) - 0usize]; + ["Offset of field: AVCodecParser::priv_data_size"] + [::std::mem::offset_of!(AVCodecParser, priv_data_size) - 28usize]; + ["Offset of field: AVCodecParser::parser_init"] + [::std::mem::offset_of!(AVCodecParser, parser_init) - 32usize]; + ["Offset of field: AVCodecParser::parser_parse"] + [::std::mem::offset_of!(AVCodecParser, parser_parse) - 40usize]; + ["Offset of field: AVCodecParser::parser_close"] + [::std::mem::offset_of!(AVCodecParser, parser_close) - 48usize]; + ["Offset of field: AVCodecParser::split"] + [::std::mem::offset_of!(AVCodecParser, split) - 56usize]; +}; extern "C" { #[doc = " Iterate over all registered codec parsers.\n\n @param opaque a pointer where libavcodec will store the iteration state. Must\n point to NULL to start the iteration.\n\n @return the next registered codec parser or NULL when the iteration is\n finished"] pub fn av_parser_iterate(opaque: *mut *mut ::std::os::raw::c_void) -> *const AVCodecParser; @@ -15481,31 +10082,58 @@ extern "C" { #[doc = " @return a positive value if s is open (i.e. avcodec_open2() was called on it\n with no corresponding avcodec_close()), 0 otherwise."] pub fn avcodec_is_open(s: *mut AVCodecContext) -> ::std::os::raw::c_int; } -pub const AV_OPT_TYPE_FLAGS: AVOptionType = 0; -pub const AV_OPT_TYPE_INT: AVOptionType = 1; -pub const AV_OPT_TYPE_INT64: AVOptionType = 2; -pub const AV_OPT_TYPE_DOUBLE: AVOptionType = 3; -pub const AV_OPT_TYPE_FLOAT: AVOptionType = 4; -pub const AV_OPT_TYPE_STRING: AVOptionType = 5; -pub const AV_OPT_TYPE_RATIONAL: AVOptionType = 6; +pub const AV_OPT_TYPE_FLAGS: AVOptionType = 1; +pub const AV_OPT_TYPE_INT: AVOptionType = 2; +pub const AV_OPT_TYPE_INT64: AVOptionType = 3; +pub const AV_OPT_TYPE_DOUBLE: AVOptionType = 4; +pub const AV_OPT_TYPE_FLOAT: AVOptionType = 5; +pub const AV_OPT_TYPE_STRING: AVOptionType = 6; +pub const AV_OPT_TYPE_RATIONAL: AVOptionType = 7; #[doc = "< offset must point to a pointer immediately followed by an int for the length"] -pub const AV_OPT_TYPE_BINARY: AVOptionType = 7; -pub const AV_OPT_TYPE_DICT: AVOptionType = 8; -pub const AV_OPT_TYPE_UINT64: AVOptionType = 9; -pub const AV_OPT_TYPE_CONST: AVOptionType = 10; +pub const AV_OPT_TYPE_BINARY: AVOptionType = 8; +pub const AV_OPT_TYPE_DICT: AVOptionType = 9; +pub const AV_OPT_TYPE_UINT64: AVOptionType = 10; +pub const AV_OPT_TYPE_CONST: AVOptionType = 11; #[doc = "< offset must point to two consecutive integers"] -pub const AV_OPT_TYPE_IMAGE_SIZE: AVOptionType = 11; -pub const AV_OPT_TYPE_PIXEL_FMT: AVOptionType = 12; -pub const AV_OPT_TYPE_SAMPLE_FMT: AVOptionType = 13; +pub const AV_OPT_TYPE_IMAGE_SIZE: AVOptionType = 12; +pub const AV_OPT_TYPE_PIXEL_FMT: AVOptionType = 13; +pub const AV_OPT_TYPE_SAMPLE_FMT: AVOptionType = 14; #[doc = "< offset must point to AVRational"] -pub const AV_OPT_TYPE_VIDEO_RATE: AVOptionType = 14; -pub const AV_OPT_TYPE_DURATION: AVOptionType = 15; -pub const AV_OPT_TYPE_COLOR: AVOptionType = 16; -pub const AV_OPT_TYPE_CHANNEL_LAYOUT: AVOptionType = 17; +pub const AV_OPT_TYPE_VIDEO_RATE: AVOptionType = 15; +pub const AV_OPT_TYPE_DURATION: AVOptionType = 16; +pub const AV_OPT_TYPE_COLOR: AVOptionType = 17; pub const AV_OPT_TYPE_BOOL: AVOptionType = 18; pub const AV_OPT_TYPE_CHLAYOUT: AVOptionType = 19; -#[doc = " @defgroup avoptions AVOptions\n @ingroup lavu_data\n @{\n AVOptions provide a generic system to declare options on arbitrary structs\n (\"objects\"). An option can have a help text, a type and a range of possible\n values. Options may then be enumerated, read and written to.\n\n @section avoptions_implement Implementing AVOptions\n This section describes how to add AVOptions capabilities to a struct.\n\n All AVOptions-related information is stored in an AVClass. Therefore\n the first member of the struct should be a pointer to an AVClass describing it.\n The option field of the AVClass must be set to a NULL-terminated static array\n of AVOptions. Each AVOption must have a non-empty name, a type, a default\n value and for number-type AVOptions also a range of allowed values. It must\n also declare an offset in bytes from the start of the struct, where the field\n associated with this AVOption is located. Other fields in the AVOption struct\n should also be set when applicable, but are not required.\n\n The following example illustrates an AVOptions-enabled struct:\n @code\n typedef struct test_struct {\n const AVClass *class;\n int int_opt;\n char *str_opt;\n uint8_t *bin_opt;\n int bin_len;\n } test_struct;\n\n static const AVOption test_options[] = {\n { \"test_int\", \"This is a test option of int type.\", offsetof(test_struct, int_opt),\n AV_OPT_TYPE_INT, { .i64 = -1 }, INT_MIN, INT_MAX },\n { \"test_str\", \"This is a test option of string type.\", offsetof(test_struct, str_opt),\n AV_OPT_TYPE_STRING },\n { \"test_bin\", \"This is a test option of binary type.\", offsetof(test_struct, bin_opt),\n AV_OPT_TYPE_BINARY },\n { NULL },\n };\n\n static const AVClass test_class = {\n .class_name = \"test class\",\n .item_name = av_default_item_name,\n .option = test_options,\n .version = LIBAVUTIL_VERSION_INT,\n };\n @endcode\n\n Next, when allocating your struct, you must ensure that the AVClass pointer\n is set to the correct value. Then, av_opt_set_defaults() can be called to\n initialize defaults. After that the struct is ready to be used with the\n AVOptions API.\n\n When cleaning up, you may use the av_opt_free() function to automatically\n free all the allocated string and binary options.\n\n Continuing with the above example:\n\n @code\n test_struct *alloc_test_struct(void)\n {\n test_struct *ret = av_mallocz(sizeof(*ret));\n ret->class = &test_class;\n av_opt_set_defaults(ret);\n return ret;\n }\n void free_test_struct(test_struct **foo)\n {\n av_opt_free(*foo);\n av_freep(foo);\n }\n @endcode\n\n @subsection avoptions_implement_nesting Nesting\n It may happen that an AVOptions-enabled struct contains another\n AVOptions-enabled struct as a member (e.g. AVCodecContext in\n libavcodec exports generic options, while its priv_data field exports\n codec-specific options). In such a case, it is possible to set up the\n parent struct to export a child's options. To do that, simply\n implement AVClass.child_next() and AVClass.child_class_iterate() in the\n parent struct's AVClass.\n Assuming that the test_struct from above now also contains a\n child_struct field:\n\n @code\n typedef struct child_struct {\n AVClass *class;\n int flags_opt;\n } child_struct;\n static const AVOption child_opts[] = {\n { \"test_flags\", \"This is a test option of flags type.\",\n offsetof(child_struct, flags_opt), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT_MIN, INT_MAX },\n { NULL },\n };\n static const AVClass child_class = {\n .class_name = \"child class\",\n .item_name = av_default_item_name,\n .option = child_opts,\n .version = LIBAVUTIL_VERSION_INT,\n };\n\n void *child_next(void *obj, void *prev)\n {\n test_struct *t = obj;\n if (!prev && t->child_struct)\n return t->child_struct;\n return NULL\n }\n const AVClass child_class_iterate(void **iter)\n {\n const AVClass *c = *iter ? NULL : &child_class;\n *iter = (void*)(uintptr_t)c;\n return c;\n }\n @endcode\n Putting child_next() and child_class_iterate() as defined above into\n test_class will now make child_struct's options accessible through\n test_struct (again, proper setup as described above needs to be done on\n child_struct right after it is created).\n\n From the above example it might not be clear why both child_next()\n and child_class_iterate() are needed. The distinction is that child_next()\n iterates over actually existing objects, while child_class_iterate()\n iterates over all possible child classes. E.g. if an AVCodecContext\n was initialized to use a codec which has private options, then its\n child_next() will return AVCodecContext.priv_data and finish\n iterating. OTOH child_class_iterate() on AVCodecContext.av_class will\n iterate over all available codecs with private options.\n\n @subsection avoptions_implement_named_constants Named constants\n It is possible to create named constants for options. Simply set the unit\n field of the option the constants should apply to a string and\n create the constants themselves as options of type AV_OPT_TYPE_CONST\n with their unit field set to the same string.\n Their default_val field should contain the value of the named\n constant.\n For example, to add some named constants for the test_flags option\n above, put the following into the child_opts array:\n @code\n { \"test_flags\", \"This is a test option of flags type.\",\n offsetof(child_struct, flags_opt), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT_MIN, INT_MAX, \"test_unit\" },\n { \"flag1\", \"This is a flag with value 16\", 0, AV_OPT_TYPE_CONST, { .i64 = 16 }, 0, 0, \"test_unit\" },\n @endcode\n\n @section avoptions_use Using AVOptions\n This section deals with accessing options in an AVOptions-enabled struct.\n Such structs in FFmpeg are e.g. AVCodecContext in libavcodec or\n AVFormatContext in libavformat.\n\n @subsection avoptions_use_examine Examining AVOptions\n The basic functions for examining options are av_opt_next(), which iterates\n over all options defined for one object, and av_opt_find(), which searches\n for an option with the given name.\n\n The situation is more complicated with nesting. An AVOptions-enabled struct\n may have AVOptions-enabled children. Passing the AV_OPT_SEARCH_CHILDREN flag\n to av_opt_find() will make the function search children recursively.\n\n For enumerating there are basically two cases. The first is when you want to\n get all options that may potentially exist on the struct and its children\n (e.g. when constructing documentation). In that case you should call\n av_opt_child_class_iterate() recursively on the parent struct's AVClass. The\n second case is when you have an already initialized struct with all its\n children and you want to get all options that can be actually written or read\n from it. In that case you should call av_opt_child_next() recursively (and\n av_opt_next() on each result).\n\n @subsection avoptions_use_get_set Reading and writing AVOptions\n When setting options, you often have a string read directly from the\n user. In such a case, simply passing it to av_opt_set() is enough. For\n non-string type options, av_opt_set() will parse the string according to the\n option type.\n\n Similarly av_opt_get() will read any option type and convert it to a string\n which will be returned. Do not forget that the string is allocated, so you\n have to free it with av_free().\n\n In some cases it may be more convenient to put all options into an\n AVDictionary and call av_opt_set_dict() on it. A specific case of this\n are the format/codec open functions in lavf/lavc which take a dictionary\n filled with option as a parameter. This makes it possible to set some options\n that cannot be set otherwise, since e.g. the input file format is not known\n before the file is actually opened."] +#[doc = " May be combined with another regular option type to declare an array\n option.\n\n For array options, @ref AVOption.offset should refer to a pointer\n corresponding to the option type. The pointer should be immediately\n followed by an unsigned int that will store the number of elements in the\n array."] +pub const AV_OPT_TYPE_FLAG_ARRAY: AVOptionType = 65536; +#[doc = " @defgroup avoptions AVOptions\n @ingroup lavu_data\n @{\n AVOptions provide a generic system to declare options on arbitrary structs\n (\"objects\"). An option can have a help text, a type and a range of possible\n values. Options may then be enumerated, read and written to.\n\n There are two modes of access to members of AVOption and its child structs.\n One is called 'native access', and refers to access from the code that\n declares the AVOption in question. The other is 'foreign access', and refers\n to access from other code.\n\n Certain struct members in this header are documented as 'native access only'\n or similar - it means that only the code that declared the AVOption in\n question is allowed to access the field. This allows us to extend the\n semantics of those fields without breaking API compatibility.\n\n @section avoptions_implement Implementing AVOptions\n This section describes how to add AVOptions capabilities to a struct.\n\n All AVOptions-related information is stored in an AVClass. Therefore\n the first member of the struct should be a pointer to an AVClass describing it.\n The option field of the AVClass must be set to a NULL-terminated static array\n of AVOptions. Each AVOption must have a non-empty name, a type, a default\n value and for number-type AVOptions also a range of allowed values. It must\n also declare an offset in bytes from the start of the struct, where the field\n associated with this AVOption is located. Other fields in the AVOption struct\n should also be set when applicable, but are not required.\n\n The following example illustrates an AVOptions-enabled struct:\n @code\n typedef struct test_struct {\n const AVClass *class;\n int int_opt;\n char *str_opt;\n uint8_t *bin_opt;\n int bin_len;\n } test_struct;\n\n static const AVOption test_options[] = {\n { \"test_int\", \"This is a test option of int type.\", offsetof(test_struct, int_opt),\n AV_OPT_TYPE_INT, { .i64 = -1 }, INT_MIN, INT_MAX },\n { \"test_str\", \"This is a test option of string type.\", offsetof(test_struct, str_opt),\n AV_OPT_TYPE_STRING },\n { \"test_bin\", \"This is a test option of binary type.\", offsetof(test_struct, bin_opt),\n AV_OPT_TYPE_BINARY },\n { NULL },\n };\n\n static const AVClass test_class = {\n .class_name = \"test class\",\n .item_name = av_default_item_name,\n .option = test_options,\n .version = LIBAVUTIL_VERSION_INT,\n };\n @endcode\n\n Next, when allocating your struct, you must ensure that the AVClass pointer\n is set to the correct value. Then, av_opt_set_defaults() can be called to\n initialize defaults. After that the struct is ready to be used with the\n AVOptions API.\n\n When cleaning up, you may use the av_opt_free() function to automatically\n free all the allocated string and binary options.\n\n Continuing with the above example:\n\n @code\n test_struct *alloc_test_struct(void)\n {\n test_struct *ret = av_mallocz(sizeof(*ret));\n ret->class = &test_class;\n av_opt_set_defaults(ret);\n return ret;\n }\n void free_test_struct(test_struct **foo)\n {\n av_opt_free(*foo);\n av_freep(foo);\n }\n @endcode\n\n @subsection avoptions_implement_nesting Nesting\n It may happen that an AVOptions-enabled struct contains another\n AVOptions-enabled struct as a member (e.g. AVCodecContext in\n libavcodec exports generic options, while its priv_data field exports\n codec-specific options). In such a case, it is possible to set up the\n parent struct to export a child's options. To do that, simply\n implement AVClass.child_next() and AVClass.child_class_iterate() in the\n parent struct's AVClass.\n Assuming that the test_struct from above now also contains a\n child_struct field:\n\n @code\n typedef struct child_struct {\n AVClass *class;\n int flags_opt;\n } child_struct;\n static const AVOption child_opts[] = {\n { \"test_flags\", \"This is a test option of flags type.\",\n offsetof(child_struct, flags_opt), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT_MIN, INT_MAX },\n { NULL },\n };\n static const AVClass child_class = {\n .class_name = \"child class\",\n .item_name = av_default_item_name,\n .option = child_opts,\n .version = LIBAVUTIL_VERSION_INT,\n };\n\n void *child_next(void *obj, void *prev)\n {\n test_struct *t = obj;\n if (!prev && t->child_struct)\n return t->child_struct;\n return NULL\n }\n const AVClass child_class_iterate(void **iter)\n {\n const AVClass *c = *iter ? NULL : &child_class;\n *iter = (void*)(uintptr_t)c;\n return c;\n }\n @endcode\n Putting child_next() and child_class_iterate() as defined above into\n test_class will now make child_struct's options accessible through\n test_struct (again, proper setup as described above needs to be done on\n child_struct right after it is created).\n\n From the above example it might not be clear why both child_next()\n and child_class_iterate() are needed. The distinction is that child_next()\n iterates over actually existing objects, while child_class_iterate()\n iterates over all possible child classes. E.g. if an AVCodecContext\n was initialized to use a codec which has private options, then its\n child_next() will return AVCodecContext.priv_data and finish\n iterating. OTOH child_class_iterate() on AVCodecContext.av_class will\n iterate over all available codecs with private options.\n\n @subsection avoptions_implement_named_constants Named constants\n It is possible to create named constants for options. Simply set the unit\n field of the option the constants should apply to a string and\n create the constants themselves as options of type AV_OPT_TYPE_CONST\n with their unit field set to the same string.\n Their default_val field should contain the value of the named\n constant.\n For example, to add some named constants for the test_flags option\n above, put the following into the child_opts array:\n @code\n { \"test_flags\", \"This is a test option of flags type.\",\n offsetof(child_struct, flags_opt), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT_MIN, INT_MAX, \"test_unit\" },\n { \"flag1\", \"This is a flag with value 16\", 0, AV_OPT_TYPE_CONST, { .i64 = 16 }, 0, 0, \"test_unit\" },\n @endcode\n\n @section avoptions_use Using AVOptions\n This section deals with accessing options in an AVOptions-enabled struct.\n Such structs in FFmpeg are e.g. AVCodecContext in libavcodec or\n AVFormatContext in libavformat.\n\n @subsection avoptions_use_examine Examining AVOptions\n The basic functions for examining options are av_opt_next(), which iterates\n over all options defined for one object, and av_opt_find(), which searches\n for an option with the given name.\n\n The situation is more complicated with nesting. An AVOptions-enabled struct\n may have AVOptions-enabled children. Passing the AV_OPT_SEARCH_CHILDREN flag\n to av_opt_find() will make the function search children recursively.\n\n For enumerating there are basically two cases. The first is when you want to\n get all options that may potentially exist on the struct and its children\n (e.g. when constructing documentation). In that case you should call\n av_opt_child_class_iterate() recursively on the parent struct's AVClass. The\n second case is when you have an already initialized struct with all its\n children and you want to get all options that can be actually written or read\n from it. In that case you should call av_opt_child_next() recursively (and\n av_opt_next() on each result).\n\n @subsection avoptions_use_get_set Reading and writing AVOptions\n When setting options, you often have a string read directly from the\n user. In such a case, simply passing it to av_opt_set() is enough. For\n non-string type options, av_opt_set() will parse the string according to the\n option type.\n\n Similarly av_opt_get() will read any option type and convert it to a string\n which will be returned. Do not forget that the string is allocated, so you\n have to free it with av_free().\n\n In some cases it may be more convenient to put all options into an\n AVDictionary and call av_opt_set_dict() on it. A specific case of this\n are the format/codec open functions in lavf/lavc which take a dictionary\n filled with option as a parameter. This makes it possible to set some options\n that cannot be set otherwise, since e.g. the input file format is not known\n before the file is actually opened."] pub type AVOptionType = ::std::os::raw::c_uint; +#[doc = " May be set as default_val for AV_OPT_TYPE_FLAG_ARRAY options."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AVOptionArrayDef { + #[doc = " Native access only.\n\n Default value of the option, as would be serialized by av_opt_get() (i.e.\n using the value of sep as the separator)."] + pub def: *const ::std::os::raw::c_char, + #[doc = " Minimum number of elements in the array. When this field is non-zero, def\n must be non-NULL and contain at least this number of elements."] + pub size_min: ::std::os::raw::c_uint, + #[doc = " Maximum number of elements in the array, 0 when unlimited."] + pub size_max: ::std::os::raw::c_uint, + #[doc = " Separator between array elements in string representations of this\n option, used by av_opt_set() and av_opt_get(). It must be a printable\n ASCII character, excluding alphanumeric and the backslash. A comma is\n used when sep=0.\n\n The separator and the backslash must be backslash-escaped in order to\n appear in string representations of the option value."] + pub sep: ::std::os::raw::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVOptionArrayDef"][::std::mem::size_of::() - 24usize]; + ["Alignment of AVOptionArrayDef"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVOptionArrayDef::def"] + [::std::mem::offset_of!(AVOptionArrayDef, def) - 0usize]; + ["Offset of field: AVOptionArrayDef::size_min"] + [::std::mem::offset_of!(AVOptionArrayDef, size_min) - 8usize]; + ["Offset of field: AVOptionArrayDef::size_max"] + [::std::mem::offset_of!(AVOptionArrayDef, size_max) - 12usize]; + ["Offset of field: AVOptionArrayDef::sep"] + [::std::mem::offset_of!(AVOptionArrayDef, sep) - 16usize]; +}; #[doc = " AVOption"] #[repr(C)] #[derive(Copy, Clone)] @@ -15513,7 +10141,7 @@ pub struct AVOption { pub name: *const ::std::os::raw::c_char, #[doc = " short English help text\n @todo What about other languages?"] pub help: *const ::std::os::raw::c_char, - #[doc = " The offset relative to the context structure where the option\n value is stored. It should be 0 for named constants."] + #[doc = " Native access only.\n\n The offset relative to the context structure where the option\n value is stored. It should be 0 for named constants."] pub offset: ::std::os::raw::c_int, pub type_: AVOptionType, pub default_val: AVOption__bindgen_ty_1, @@ -15521,11 +10149,12 @@ pub struct AVOption { pub min: f64, #[doc = "< maximum valid value for the option"] pub max: f64, + #[doc = " A combination of AV_OPT_FLAG_*."] pub flags: ::std::os::raw::c_int, #[doc = " The logical unit to which the option belongs. Non-constant\n options and corresponding named constants share the same\n unit. May be NULL."] pub unit: *const ::std::os::raw::c_char, } -#[doc = " the default value for scalar options"] +#[doc = " Native access only, except when documented otherwise.\n the default value for scalar options"] #[repr(C)] #[derive(Copy, Clone)] pub union AVOption__bindgen_ty_1 { @@ -15533,173 +10162,45 @@ pub union AVOption__bindgen_ty_1 { pub dbl: f64, pub str_: *const ::std::os::raw::c_char, pub q: AVRational, -} -#[test] -fn bindgen_test_layout_AVOption__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AVOption__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVOption__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).i64_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVOption__bindgen_ty_1), - "::", - stringify!(i64_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dbl) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVOption__bindgen_ty_1), - "::", - stringify!(dbl) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).str_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVOption__bindgen_ty_1), - "::", - stringify!(str_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).q) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVOption__bindgen_ty_1), - "::", - stringify!(q) - ) - ); -} + #[doc = " Used for AV_OPT_TYPE_FLAG_ARRAY options. May be NULL.\n\n Foreign access to some members allowed, as noted in AVOptionArrayDef\n documentation."] + pub arr: *const AVOptionArrayDef, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVOption__bindgen_ty_1"][::std::mem::size_of::() - 8usize]; + ["Alignment of AVOption__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AVOption__bindgen_ty_1::i64_"] + [::std::mem::offset_of!(AVOption__bindgen_ty_1, i64_) - 0usize]; + ["Offset of field: AVOption__bindgen_ty_1::dbl"] + [::std::mem::offset_of!(AVOption__bindgen_ty_1, dbl) - 0usize]; + ["Offset of field: AVOption__bindgen_ty_1::str_"] + [::std::mem::offset_of!(AVOption__bindgen_ty_1, str_) - 0usize]; + ["Offset of field: AVOption__bindgen_ty_1::q"] + [::std::mem::offset_of!(AVOption__bindgen_ty_1, q) - 0usize]; + ["Offset of field: AVOption__bindgen_ty_1::arr"] + [::std::mem::offset_of!(AVOption__bindgen_ty_1, arr) - 0usize]; +}; impl ::std::fmt::Debug for AVOption__bindgen_ty_1 { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "AVOption__bindgen_ty_1 {{ union }}") } } -#[test] -fn bindgen_test_layout_AVOption() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(AVOption)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVOption)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVOption), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).help) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVOption), - "::", - stringify!(help) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVOption), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AVOption), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).default_val) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVOption), - "::", - stringify!(default_val) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).min) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVOption), - "::", - stringify!(min) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVOption), - "::", - stringify!(max) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVOption), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).unit) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVOption), - "::", - stringify!(unit) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVOption"][::std::mem::size_of::() - 64usize]; + ["Alignment of AVOption"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVOption::name"][::std::mem::offset_of!(AVOption, name) - 0usize]; + ["Offset of field: AVOption::help"][::std::mem::offset_of!(AVOption, help) - 8usize]; + ["Offset of field: AVOption::offset"][::std::mem::offset_of!(AVOption, offset) - 16usize]; + ["Offset of field: AVOption::type_"][::std::mem::offset_of!(AVOption, type_) - 20usize]; + ["Offset of field: AVOption::default_val"] + [::std::mem::offset_of!(AVOption, default_val) - 24usize]; + ["Offset of field: AVOption::min"][::std::mem::offset_of!(AVOption, min) - 32usize]; + ["Offset of field: AVOption::max"][::std::mem::offset_of!(AVOption, max) - 40usize]; + ["Offset of field: AVOption::flags"][::std::mem::offset_of!(AVOption, flags) - 48usize]; + ["Offset of field: AVOption::unit"][::std::mem::offset_of!(AVOption, unit) - 56usize]; +}; impl ::std::fmt::Debug for AVOption { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write ! (f , "AVOption {{ name: {:?}, help: {:?}, offset: {:?}, type: {:?}, default_val: {:?}, min: {:?}, max: {:?}, flags: {:?}, unit: {:?} }}" , self . name , self . help , self . offset , self . type_ , self . default_val , self . min , self . max , self . flags , self . unit) @@ -15721,81 +10222,22 @@ pub struct AVOptionRange { #[doc = " Range flag.\n If set to 1 the struct encodes a range, if set to 0 a single value."] pub is_range: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVOptionRange() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(AVOptionRange)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVOptionRange)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).str_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVOptionRange), - "::", - stringify!(str_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).value_min) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVOptionRange), - "::", - stringify!(value_min) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).value_max) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVOptionRange), - "::", - stringify!(value_max) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).component_min) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVOptionRange), - "::", - stringify!(component_min) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).component_max) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVOptionRange), - "::", - stringify!(component_max) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).is_range) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVOptionRange), - "::", - stringify!(is_range) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVOptionRange"][::std::mem::size_of::() - 48usize]; + ["Alignment of AVOptionRange"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVOptionRange::str_"][::std::mem::offset_of!(AVOptionRange, str_) - 0usize]; + ["Offset of field: AVOptionRange::value_min"] + [::std::mem::offset_of!(AVOptionRange, value_min) - 8usize]; + ["Offset of field: AVOptionRange::value_max"] + [::std::mem::offset_of!(AVOptionRange, value_max) - 16usize]; + ["Offset of field: AVOptionRange::component_min"] + [::std::mem::offset_of!(AVOptionRange, component_min) - 24usize]; + ["Offset of field: AVOptionRange::component_max"] + [::std::mem::offset_of!(AVOptionRange, component_max) - 32usize]; + ["Offset of field: AVOptionRange::is_range"] + [::std::mem::offset_of!(AVOptionRange, is_range) - 40usize]; +}; #[doc = " List of AVOptionRange structs."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -15807,180 +10249,53 @@ pub struct AVOptionRanges { #[doc = " Number of componentes."] pub nb_components: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVOptionRanges() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AVOptionRanges)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVOptionRanges)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).range) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVOptionRanges), - "::", - stringify!(range) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_ranges) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVOptionRanges), - "::", - stringify!(nb_ranges) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_components) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVOptionRanges), - "::", - stringify!(nb_components) - ) - ); -} -extern "C" { - #[doc = " Show the obj options.\n\n @param req_flags requested flags for the options to show. Show only the\n options for which it is opt->flags & req_flags.\n @param rej_flags rejected flags for the options to show. Show only the\n options for which it is !(opt->flags & req_flags).\n @param av_log_obj log context to use for showing the options"] - pub fn av_opt_show2( - obj: *mut ::std::os::raw::c_void, - av_log_obj: *mut ::std::os::raw::c_void, - req_flags: ::std::os::raw::c_int, - rej_flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[doc = " Set the values of all AVOption fields to their default values.\n\n @param s an AVOption-enabled struct (its first member must be a pointer to AVClass)"] - pub fn av_opt_set_defaults(s: *mut ::std::os::raw::c_void); -} -extern "C" { - #[doc = " Set the values of all AVOption fields to their default values. Only these\n AVOption fields for which (opt->flags & mask) == flags will have their\n default applied to s.\n\n @param s an AVOption-enabled struct (its first member must be a pointer to AVClass)\n @param mask combination of AV_OPT_FLAG_*\n @param flags combination of AV_OPT_FLAG_*"] - pub fn av_opt_set_defaults2( - s: *mut ::std::os::raw::c_void, - mask: ::std::os::raw::c_int, - flags: ::std::os::raw::c_int, - ); -} -extern "C" { - #[doc = " Parse the key/value pairs list in opts. For each key/value pair\n found, stores the value in the field in ctx that is named like the\n key. ctx must be an AVClass context, storing is done using\n AVOptions.\n\n @param opts options string to parse, may be NULL\n @param key_val_sep a 0-terminated list of characters used to\n separate key from value\n @param pairs_sep a 0-terminated list of characters used to separate\n two pairs from each other\n @return the number of successfully set key/value pairs, or a negative\n value corresponding to an AVERROR code in case of error:\n AVERROR(EINVAL) if opts cannot be parsed,\n the error code issued by av_opt_set() if a key/value pair\n cannot be set"] - pub fn av_set_options_string( - ctx: *mut ::std::os::raw::c_void, - opts: *const ::std::os::raw::c_char, - key_val_sep: *const ::std::os::raw::c_char, - pairs_sep: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[doc = " Parse the key-value pairs list in opts. For each key=value pair found,\n set the value of the corresponding option in ctx.\n\n @param ctx the AVClass object to set options on\n @param opts the options string, key-value pairs separated by a\n delimiter\n @param shorthand a NULL-terminated array of options names for shorthand\n notation: if the first field in opts has no key part,\n the key is taken from the first element of shorthand;\n then again for the second, etc., until either opts is\n finished, shorthand is finished or a named option is\n found; after that, all options must be named\n @param key_val_sep a 0-terminated list of characters used to separate\n key from value, for example '='\n @param pairs_sep a 0-terminated list of characters used to separate\n two pairs from each other, for example ':' or ','\n @return the number of successfully set key=value pairs, or a negative\n value corresponding to an AVERROR code in case of error:\n AVERROR(EINVAL) if opts cannot be parsed,\n the error code issued by av_set_string3() if a key/value pair\n cannot be set\n\n Options names must use only the following characters: a-z A-Z 0-9 - . / _\n Separators must use characters distinct from option names and from each\n other."] - pub fn av_opt_set_from_string( - ctx: *mut ::std::os::raw::c_void, - opts: *const ::std::os::raw::c_char, - shorthand: *const *const ::std::os::raw::c_char, - key_val_sep: *const ::std::os::raw::c_char, - pairs_sep: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[doc = " Free all allocated objects in obj."] - pub fn av_opt_free(obj: *mut ::std::os::raw::c_void); -} -extern "C" { - #[doc = " Check whether a particular flag is set in a flags field.\n\n @param field_name the name of the flag field option\n @param flag_name the name of the flag to check\n @return non-zero if the flag is set, zero if the flag isn't set,\n isn't of the right type, or the flags field doesn't exist."] - pub fn av_opt_flag_is_set( - obj: *mut ::std::os::raw::c_void, - field_name: *const ::std::os::raw::c_char, - flag_name: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[doc = " Set all the options from a given dictionary on an object.\n\n @param obj a struct whose first element is a pointer to AVClass\n @param options options to process. This dictionary will be freed and replaced\n by a new one containing all options not found in obj.\n Of course this new dictionary needs to be freed by caller\n with av_dict_free().\n\n @return 0 on success, a negative AVERROR if some option was found in obj,\n but could not be set.\n\n @see av_dict_copy()"] - pub fn av_opt_set_dict( - obj: *mut ::std::os::raw::c_void, - options: *mut *mut AVDictionary, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[doc = " Set all the options from a given dictionary on an object.\n\n @param obj a struct whose first element is a pointer to AVClass\n @param options options to process. This dictionary will be freed and replaced\n by a new one containing all options not found in obj.\n Of course this new dictionary needs to be freed by caller\n with av_dict_free().\n @param search_flags A combination of AV_OPT_SEARCH_*.\n\n @return 0 on success, a negative AVERROR if some option was found in obj,\n but could not be set.\n\n @see av_dict_copy()"] - pub fn av_opt_set_dict2( - obj: *mut ::std::os::raw::c_void, - options: *mut *mut AVDictionary, - search_flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[doc = " Extract a key-value pair from the beginning of a string.\n\n @param ropts pointer to the options string, will be updated to\n point to the rest of the string (one of the pairs_sep\n or the final NUL)\n @param key_val_sep a 0-terminated list of characters used to separate\n key from value, for example '='\n @param pairs_sep a 0-terminated list of characters used to separate\n two pairs from each other, for example ':' or ','\n @param flags flags; see the AV_OPT_FLAG_* values below\n @param rkey parsed key; must be freed using av_free()\n @param rval parsed value; must be freed using av_free()\n\n @return >=0 for success, or a negative value corresponding to an\n AVERROR code in case of error; in particular:\n AVERROR(EINVAL) if no key is present\n"] - pub fn av_opt_get_key_value( - ropts: *mut *const ::std::os::raw::c_char, - key_val_sep: *const ::std::os::raw::c_char, - pairs_sep: *const ::std::os::raw::c_char, - flags: ::std::os::raw::c_uint, - rkey: *mut *mut ::std::os::raw::c_char, - rval: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -#[doc = " Accept to parse a value without a key; the key will then be returned\n as NULL."] -pub const AV_OPT_FLAG_IMPLICIT_KEY: _bindgen_ty_5 = 1; -pub type _bindgen_ty_5 = ::std::os::raw::c_uint; -extern "C" { - #[doc = " @defgroup opt_eval_funcs Evaluating option strings\n @{\n This group of functions can be used to evaluate option strings\n and get numbers out of them. They do the same thing as av_opt_set(),\n except the result is written into the caller-supplied pointer.\n\n @param obj a struct whose first element is a pointer to AVClass.\n @param o an option for which the string is to be evaluated.\n @param val string to be evaluated.\n @param *_out value of the string will be written here.\n\n @return 0 on success, a negative number on failure."] - pub fn av_opt_eval_flags( - obj: *mut ::std::os::raw::c_void, - o: *const AVOption, - val: *const ::std::os::raw::c_char, - flags_out: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVOptionRanges"][::std::mem::size_of::() - 16usize]; + ["Alignment of AVOptionRanges"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVOptionRanges::range"] + [::std::mem::offset_of!(AVOptionRanges, range) - 0usize]; + ["Offset of field: AVOptionRanges::nb_ranges"] + [::std::mem::offset_of!(AVOptionRanges, nb_ranges) - 8usize]; + ["Offset of field: AVOptionRanges::nb_components"] + [::std::mem::offset_of!(AVOptionRanges, nb_components) - 12usize]; +}; +extern "C" { + #[doc = " Set the values of all AVOption fields to their default values.\n\n @param s an AVOption-enabled struct (its first member must be a pointer to AVClass)"] + pub fn av_opt_set_defaults(s: *mut ::std::os::raw::c_void); } extern "C" { - pub fn av_opt_eval_int( - obj: *mut ::std::os::raw::c_void, - o: *const AVOption, - val: *const ::std::os::raw::c_char, - int_out: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; + #[doc = " Set the values of all AVOption fields to their default values. Only these\n AVOption fields for which (opt->flags & mask) == flags will have their\n default applied to s.\n\n @param s an AVOption-enabled struct (its first member must be a pointer to AVClass)\n @param mask combination of AV_OPT_FLAG_*\n @param flags combination of AV_OPT_FLAG_*"] + pub fn av_opt_set_defaults2( + s: *mut ::std::os::raw::c_void, + mask: ::std::os::raw::c_int, + flags: ::std::os::raw::c_int, + ); } extern "C" { - pub fn av_opt_eval_int64( - obj: *mut ::std::os::raw::c_void, - o: *const AVOption, - val: *const ::std::os::raw::c_char, - int64_out: *mut i64, - ) -> ::std::os::raw::c_int; + #[doc = " Free all allocated objects in obj."] + pub fn av_opt_free(obj: *mut ::std::os::raw::c_void); } extern "C" { - pub fn av_opt_eval_float( - obj: *mut ::std::os::raw::c_void, - o: *const AVOption, - val: *const ::std::os::raw::c_char, - float_out: *mut f32, - ) -> ::std::os::raw::c_int; + #[doc = " Iterate over all AVOptions belonging to obj.\n\n @param obj an AVOptions-enabled struct or a double pointer to an\n AVClass describing it.\n @param prev result of the previous call to av_opt_next() on this object\n or NULL\n @return next AVOption or NULL"] + pub fn av_opt_next( + obj: *const ::std::os::raw::c_void, + prev: *const AVOption, + ) -> *const AVOption; } extern "C" { - pub fn av_opt_eval_double( + #[doc = " Iterate over AVOptions-enabled children of obj.\n\n @param prev result of a previous call to this function or NULL\n @return next AVOptions-enabled child or NULL"] + pub fn av_opt_child_next( obj: *mut ::std::os::raw::c_void, - o: *const AVOption, - val: *const ::std::os::raw::c_char, - double_out: *mut f64, - ) -> ::std::os::raw::c_int; + prev: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn av_opt_eval_q( - obj: *mut ::std::os::raw::c_void, - o: *const AVOption, - val: *const ::std::os::raw::c_char, - q_out: *mut AVRational, - ) -> ::std::os::raw::c_int; + #[doc = " Iterate over potential AVOptions-enabled children of parent.\n\n @param iter a pointer where iteration state is stored.\n @return AVClass corresponding to next potential child or NULL"] + pub fn av_opt_child_class_iterate( + parent: *const AVClass, + iter: *mut *mut ::std::os::raw::c_void, + ) -> *const AVClass; } extern "C" { #[doc = " Look for an option in an object. Consider only options which\n have all the specified flags set.\n\n @param[in] obj A pointer to a struct whose first element is a\n pointer to an AVClass.\n Alternatively a double pointer to an AVClass, if\n AV_OPT_SEARCH_FAKE_OBJ search flag is set.\n @param[in] name The name of the option to look for.\n @param[in] unit When searching for named constants, name of the unit\n it belongs to.\n @param opt_flags Find only options with all the specified flags set (AV_OPT_FLAG).\n @param search_flags A combination of AV_OPT_SEARCH_*.\n\n @return A pointer to the option found, or NULL if no option\n was found.\n\n @note Options found with AV_OPT_SEARCH_CHILDREN flag may not be settable\n directly with av_opt_set(). Use special calls which take an options\n AVDictionary (e.g. avformat_open_input()) to set options found with this\n flag."] @@ -16004,25 +10319,68 @@ extern "C" { ) -> *const AVOption; } extern "C" { - #[doc = " Iterate over all AVOptions belonging to obj.\n\n @param obj an AVOptions-enabled struct or a double pointer to an\n AVClass describing it.\n @param prev result of the previous call to av_opt_next() on this object\n or NULL\n @return next AVOption or NULL"] - pub fn av_opt_next( - obj: *const ::std::os::raw::c_void, - prev: *const AVOption, - ) -> *const AVOption; + #[doc = " Show the obj options.\n\n @param req_flags requested flags for the options to show. Show only the\n options for which it is opt->flags & req_flags.\n @param rej_flags rejected flags for the options to show. Show only the\n options for which it is !(opt->flags & req_flags).\n @param av_log_obj log context to use for showing the options"] + pub fn av_opt_show2( + obj: *mut ::std::os::raw::c_void, + av_log_obj: *mut ::std::os::raw::c_void, + req_flags: ::std::os::raw::c_int, + rej_flags: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Iterate over AVOptions-enabled children of obj.\n\n @param prev result of a previous call to this function or NULL\n @return next AVOptions-enabled child or NULL"] - pub fn av_opt_child_next( + #[doc = " Extract a key-value pair from the beginning of a string.\n\n @param ropts pointer to the options string, will be updated to\n point to the rest of the string (one of the pairs_sep\n or the final NUL)\n @param key_val_sep a 0-terminated list of characters used to separate\n key from value, for example '='\n @param pairs_sep a 0-terminated list of characters used to separate\n two pairs from each other, for example ':' or ','\n @param flags flags; see the AV_OPT_FLAG_* values below\n @param rkey parsed key; must be freed using av_free()\n @param rval parsed value; must be freed using av_free()\n\n @return >=0 for success, or a negative value corresponding to an\n AVERROR code in case of error; in particular:\n AVERROR(EINVAL) if no key is present\n"] + pub fn av_opt_get_key_value( + ropts: *mut *const ::std::os::raw::c_char, + key_val_sep: *const ::std::os::raw::c_char, + pairs_sep: *const ::std::os::raw::c_char, + flags: ::std::os::raw::c_uint, + rkey: *mut *mut ::std::os::raw::c_char, + rval: *mut *mut ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +#[doc = " Accept to parse a value without a key; the key will then be returned\n as NULL."] +pub const AV_OPT_FLAG_IMPLICIT_KEY: _bindgen_ty_5 = 1; +pub type _bindgen_ty_5 = ::std::os::raw::c_uint; +extern "C" { + #[doc = " Parse the key/value pairs list in opts. For each key/value pair\n found, stores the value in the field in ctx that is named like the\n key. ctx must be an AVClass context, storing is done using\n AVOptions.\n\n @param opts options string to parse, may be NULL\n @param key_val_sep a 0-terminated list of characters used to\n separate key from value\n @param pairs_sep a 0-terminated list of characters used to separate\n two pairs from each other\n @return the number of successfully set key/value pairs, or a negative\n value corresponding to an AVERROR code in case of error:\n AVERROR(EINVAL) if opts cannot be parsed,\n the error code issued by av_opt_set() if a key/value pair\n cannot be set"] + pub fn av_set_options_string( + ctx: *mut ::std::os::raw::c_void, + opts: *const ::std::os::raw::c_char, + key_val_sep: *const ::std::os::raw::c_char, + pairs_sep: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[doc = " Parse the key-value pairs list in opts. For each key=value pair found,\n set the value of the corresponding option in ctx.\n\n @param ctx the AVClass object to set options on\n @param opts the options string, key-value pairs separated by a\n delimiter\n @param shorthand a NULL-terminated array of options names for shorthand\n notation: if the first field in opts has no key part,\n the key is taken from the first element of shorthand;\n then again for the second, etc., until either opts is\n finished, shorthand is finished or a named option is\n found; after that, all options must be named\n @param key_val_sep a 0-terminated list of characters used to separate\n key from value, for example '='\n @param pairs_sep a 0-terminated list of characters used to separate\n two pairs from each other, for example ':' or ','\n @return the number of successfully set key=value pairs, or a negative\n value corresponding to an AVERROR code in case of error:\n AVERROR(EINVAL) if opts cannot be parsed,\n the error code issued by av_set_string3() if a key/value pair\n cannot be set\n\n Options names must use only the following characters: a-z A-Z 0-9 - . / _\n Separators must use characters distinct from option names and from each\n other."] + pub fn av_opt_set_from_string( + ctx: *mut ::std::os::raw::c_void, + opts: *const ::std::os::raw::c_char, + shorthand: *const *const ::std::os::raw::c_char, + key_val_sep: *const ::std::os::raw::c_char, + pairs_sep: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[doc = " Set all the options from a given dictionary on an object.\n\n @param obj a struct whose first element is a pointer to AVClass\n @param options options to process. This dictionary will be freed and replaced\n by a new one containing all options not found in obj.\n Of course this new dictionary needs to be freed by caller\n with av_dict_free().\n\n @return 0 on success, a negative AVERROR if some option was found in obj,\n but could not be set.\n\n @see av_dict_copy()"] + pub fn av_opt_set_dict( obj: *mut ::std::os::raw::c_void, - prev: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; + options: *mut *mut AVDictionary, + ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Iterate over potential AVOptions-enabled children of parent.\n\n @param iter a pointer where iteration state is stored.\n @return AVClass corresponding to next potential child or NULL"] - pub fn av_opt_child_class_iterate( - parent: *const AVClass, - iter: *mut *mut ::std::os::raw::c_void, - ) -> *const AVClass; + #[doc = " Set all the options from a given dictionary on an object.\n\n @param obj a struct whose first element is a pointer to AVClass\n @param options options to process. This dictionary will be freed and replaced\n by a new one containing all options not found in obj.\n Of course this new dictionary needs to be freed by caller\n with av_dict_free().\n @param search_flags A combination of AV_OPT_SEARCH_*.\n\n @return 0 on success, a negative AVERROR if some option was found in obj,\n but could not be set.\n\n @see av_dict_copy()"] + pub fn av_opt_set_dict2( + obj: *mut ::std::os::raw::c_void, + options: *mut *mut AVDictionary, + search_flags: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[doc = " Copy options from src object into dest object.\n\n The underlying AVClass of both src and dest must coincide. The guarantee\n below does not apply if this is not fulfilled.\n\n Options that require memory allocation (e.g. string or binary) are malloc'ed in dest object.\n Original memory allocated for such options is freed unless both src and dest options points to the same memory.\n\n Even on error it is guaranteed that allocated options from src and dest\n no longer alias each other afterwards; in particular calling av_opt_free()\n on both src and dest is safe afterwards if dest has been memdup'ed from src.\n\n @param dest Object to copy from\n @param src Object to copy into\n @return 0 on success, negative on error"] + pub fn av_opt_copy( + dest: *mut ::std::os::raw::c_void, + src: *const ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int; } extern "C" { #[doc = " @defgroup opt_set_funcs Option setting functions\n @{\n Those functions set the field of obj with the given name to value.\n\n @param[in] obj A struct whose first element is a pointer to an AVClass.\n @param[in] name the name of the field to set\n @param[in] val The value to set. In case of av_opt_set() if the field is not\n of a string type, then the given string is parsed.\n SI postfixes and some named scalars are supported.\n If the field is of a numeric type, it has to be a numeric or named\n scalar. Behavior with more than one scalar and +- infix operators\n is undefined.\n If the field is of a flags type, it has to be a sequence of numeric\n scalars or named flags separated by '+' or '-'. Prefixing a flag\n with '+' causes it to be set without affecting the other flags;\n similarly, '-' unsets a flag.\n If the field is of a dictionary type, it has to be a ':' separated list of\n key=value parameters. Values containing ':' special characters must be\n escaped.\n @param search_flags flags passed to av_opt_find2. I.e. if AV_OPT_SEARCH_CHILDREN\n is passed here, then the option may be set on a child of obj.\n\n @return 0 if the value has been set, or an AVERROR code in case of\n error:\n AVERROR_OPTION_NOT_FOUND if no matching option exists\n AVERROR(ERANGE) if the value is out of range\n AVERROR(EINVAL) if the value is not valid"] @@ -16099,14 +10457,6 @@ extern "C" { search_flags: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn av_opt_set_channel_layout( - obj: *mut ::std::os::raw::c_void, - name: *const ::std::os::raw::c_char, - ch_layout: i64, - search_flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} extern "C" { pub fn av_opt_set_chlayout( obj: *mut ::std::os::raw::c_void, @@ -16190,14 +10540,6 @@ extern "C" { out_val: *mut AVRational, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn av_opt_get_channel_layout( - obj: *mut ::std::os::raw::c_void, - name: *const ::std::os::raw::c_char, - search_flags: ::std::os::raw::c_int, - ch_layout: *mut i64, - ) -> ::std::os::raw::c_int; -} extern "C" { pub fn av_opt_get_chlayout( obj: *mut ::std::os::raw::c_void, @@ -16216,42 +10558,62 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " @}\n/\n/**\n Gets a pointer to the requested field in a struct.\n This function allows accessing a struct even when its fields are moved or\n renamed since the application making the access has been compiled,\n\n @returns a pointer to the field, it can be cast to the correct type and read\n or written to."] - pub fn av_opt_ptr( - avclass: *const AVClass, + #[doc = " @defgroup opt_eval_funcs Evaluating option strings\n @{\n This group of functions can be used to evaluate option strings\n and get numbers out of them. They do the same thing as av_opt_set(),\n except the result is written into the caller-supplied pointer.\n\n @param obj a struct whose first element is a pointer to AVClass.\n @param o an option for which the string is to be evaluated.\n @param val string to be evaluated.\n @param *_out value of the string will be written here.\n\n @return 0 on success, a negative number on failure."] + pub fn av_opt_eval_flags( obj: *mut ::std::os::raw::c_void, - name: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_void; + o: *const AVOption, + val: *const ::std::os::raw::c_char, + flags_out: *mut ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Free an AVOptionRanges struct and set it to NULL."] - pub fn av_opt_freep_ranges(ranges: *mut *mut AVOptionRanges); + pub fn av_opt_eval_int( + obj: *mut ::std::os::raw::c_void, + o: *const AVOption, + val: *const ::std::os::raw::c_char, + int_out: *mut ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get a list of allowed ranges for the given option.\n\n The returned list may depend on other fields in obj like for example profile.\n\n @param flags is a bitmask of flags, undefined flags should not be set and should be ignored\n AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance\n AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, @see AVOptionRanges\n\n The result must be freed with av_opt_freep_ranges.\n\n @return number of compontents returned on success, a negative errro code otherwise"] - pub fn av_opt_query_ranges( - arg1: *mut *mut AVOptionRanges, + pub fn av_opt_eval_int64( obj: *mut ::std::os::raw::c_void, - key: *const ::std::os::raw::c_char, - flags: ::std::os::raw::c_int, + o: *const AVOption, + val: *const ::std::os::raw::c_char, + int64_out: *mut i64, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Copy options from src object into dest object.\n\n The underlying AVClass of both src and dest must coincide. The guarantee\n below does not apply if this is not fulfilled.\n\n Options that require memory allocation (e.g. string or binary) are malloc'ed in dest object.\n Original memory allocated for such options is freed unless both src and dest options points to the same memory.\n\n Even on error it is guaranteed that allocated options from src and dest\n no longer alias each other afterwards; in particular calling av_opt_free()\n on both src and dest is safe afterwards if dest has been memdup'ed from src.\n\n @param dest Object to copy from\n @param src Object to copy into\n @return 0 on success, negative on error"] - pub fn av_opt_copy( - dest: *mut ::std::os::raw::c_void, - src: *const ::std::os::raw::c_void, + pub fn av_opt_eval_float( + obj: *mut ::std::os::raw::c_void, + o: *const AVOption, + val: *const ::std::os::raw::c_char, + float_out: *mut f32, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get a default list of allowed ranges for the given option.\n\n This list is constructed without using the AVClass.query_ranges() callback\n and can be used as fallback from within the callback.\n\n @param flags is a bitmask of flags, undefined flags should not be set and should be ignored\n AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance\n AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, @see AVOptionRanges\n\n The result must be freed with av_opt_free_ranges.\n\n @return number of compontents returned on success, a negative errro code otherwise"] - pub fn av_opt_query_ranges_default( - arg1: *mut *mut AVOptionRanges, + pub fn av_opt_eval_double( obj: *mut ::std::os::raw::c_void, - key: *const ::std::os::raw::c_char, - flags: ::std::os::raw::c_int, + o: *const AVOption, + val: *const ::std::os::raw::c_char, + double_out: *mut f64, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn av_opt_eval_q( + obj: *mut ::std::os::raw::c_void, + o: *const AVOption, + val: *const ::std::os::raw::c_char, + q_out: *mut AVRational, ) -> ::std::os::raw::c_int; } +extern "C" { + #[doc = " Gets a pointer to the requested field in a struct.\n This function allows accessing a struct even when its fields are moved or\n renamed since the application making the access has been compiled,\n\n @returns a pointer to the field, it can be cast to the correct type and read\n or written to."] + pub fn av_opt_ptr( + avclass: *const AVClass, + obj: *mut ::std::os::raw::c_void, + name: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_void; +} extern "C" { #[doc = " Check if given option is set to its default value.\n\n Options o must belong to the obj. This function must not be called to check child's options state.\n @see av_opt_is_set_to_default_by_name().\n\n @param obj AVClass object to check option on\n @param o option to be checked\n @return >0 when option is set to its default,\n 0 when option is not set its default,\n <0 on error"] pub fn av_opt_is_set_to_default( @@ -16267,6 +10629,14 @@ extern "C" { search_flags: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } +extern "C" { + #[doc = " Check whether a particular flag is set in a flags field.\n\n @param field_name the name of the flag field option\n @param flag_name the name of the flag to check\n @return non-zero if the flag is set, zero if the flag isn't set,\n isn't of the right type, or the flags field doesn't exist."] + pub fn av_opt_flag_is_set( + obj: *mut ::std::os::raw::c_void, + field_name: *const ::std::os::raw::c_char, + flag_name: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} extern "C" { #[doc = " Serialize object's options.\n\n Create a string containing object's serialized options.\n Such string may be passed back to av_opt_set_from_string() in order to restore option values.\n A key/value or pairs separator occurring in the serialized value or\n name string are escaped through the av_escape() function.\n\n @param[in] obj AVClass object to serialize\n @param[in] opt_flags serialize options with all the specified flags set (AV_OPT_FLAG)\n @param[in] flags combination of AV_OPT_SERIALIZE_* flags\n @param[out] buffer Pointer to buffer that will be allocated with string containg serialized options.\n Buffer must be freed by the caller when is no longer needed.\n @param[in] key_val_sep character used to separate key from value\n @param[in] pairs_sep character used to separate two pairs from each other\n @return >= 0 on success, negative on error\n @warning Separators cannot be neither '\\\\' nor '\\0'. They also cannot be the same."] pub fn av_opt_serialize( @@ -16278,6 +10648,28 @@ extern "C" { pairs_sep: ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } +extern "C" { + #[doc = " Free an AVOptionRanges struct and set it to NULL."] + pub fn av_opt_freep_ranges(ranges: *mut *mut AVOptionRanges); +} +extern "C" { + #[doc = " Get a list of allowed ranges for the given option.\n\n The returned list may depend on other fields in obj like for example profile.\n\n @param flags is a bitmask of flags, undefined flags should not be set and should be ignored\n AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance\n AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, @see AVOptionRanges\n\n The result must be freed with av_opt_freep_ranges.\n\n @return number of compontents returned on success, a negative errro code otherwise"] + pub fn av_opt_query_ranges( + arg1: *mut *mut AVOptionRanges, + obj: *mut ::std::os::raw::c_void, + key: *const ::std::os::raw::c_char, + flags: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[doc = " Get a default list of allowed ranges for the given option.\n\n This list is constructed without using the AVClass.query_ranges() callback\n and can be used as fallback from within the callback.\n\n @param flags is a bitmask of flags, undefined flags should not be set and should be ignored\n AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance\n AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, @see AVOptionRanges\n\n The result must be freed with av_opt_free_ranges.\n\n @return number of compontents returned on success, a negative errro code otherwise"] + pub fn av_opt_query_ranges_default( + arg1: *mut *mut AVOptionRanges, + obj: *mut ::std::os::raw::c_void, + key: *const ::std::os::raw::c_char, + flags: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} #[doc = " AVDCT context.\n @note function pointers can be NULL if the specific features have been\n disabled at build time."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -16290,120 +10682,32 @@ pub struct AVDCT { #[doc = " DCT algorithm.\n must use AVOptions to set this field."] pub dct_algo: ::std::os::raw::c_int, #[doc = " IDCT algorithm.\n must use AVOptions to set this field."] - pub idct_algo: ::std::os::raw::c_int, - pub get_pixels: ::std::option::Option< - unsafe extern "C" fn(block: *mut i16, pixels: *const u8, line_size: isize), - >, - pub bits_per_sample: ::std::os::raw::c_int, - pub get_pixels_unaligned: ::std::option::Option< - unsafe extern "C" fn(block: *mut i16, pixels: *const u8, line_size: isize), - >, -} -#[test] -fn bindgen_test_layout_AVDCT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 120usize, - concat!("Size of: ", stringify!(AVDCT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVDCT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).av_class) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDCT), - "::", - stringify!(av_class) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).idct) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVDCT), - "::", - stringify!(idct) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).idct_permutation) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVDCT), - "::", - stringify!(idct_permutation) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fdct) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVDCT), - "::", - stringify!(fdct) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dct_algo) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(AVDCT), - "::", - stringify!(dct_algo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).idct_algo) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(AVDCT), - "::", - stringify!(idct_algo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).get_pixels) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(AVDCT), - "::", - stringify!(get_pixels) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bits_per_sample) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(AVDCT), - "::", - stringify!(bits_per_sample) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).get_pixels_unaligned) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(AVDCT), - "::", - stringify!(get_pixels_unaligned) - ) - ); + pub idct_algo: ::std::os::raw::c_int, + pub get_pixels: ::std::option::Option< + unsafe extern "C" fn(block: *mut i16, pixels: *const u8, line_size: isize), + >, + pub bits_per_sample: ::std::os::raw::c_int, + pub get_pixels_unaligned: ::std::option::Option< + unsafe extern "C" fn(block: *mut i16, pixels: *const u8, line_size: isize), + >, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDCT"][::std::mem::size_of::() - 120usize]; + ["Alignment of AVDCT"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVDCT::av_class"][::std::mem::offset_of!(AVDCT, av_class) - 0usize]; + ["Offset of field: AVDCT::idct"][::std::mem::offset_of!(AVDCT, idct) - 8usize]; + ["Offset of field: AVDCT::idct_permutation"] + [::std::mem::offset_of!(AVDCT, idct_permutation) - 16usize]; + ["Offset of field: AVDCT::fdct"][::std::mem::offset_of!(AVDCT, fdct) - 80usize]; + ["Offset of field: AVDCT::dct_algo"][::std::mem::offset_of!(AVDCT, dct_algo) - 88usize]; + ["Offset of field: AVDCT::idct_algo"][::std::mem::offset_of!(AVDCT, idct_algo) - 92usize]; + ["Offset of field: AVDCT::get_pixels"][::std::mem::offset_of!(AVDCT, get_pixels) - 96usize]; + ["Offset of field: AVDCT::bits_per_sample"] + [::std::mem::offset_of!(AVDCT, bits_per_sample) - 104usize]; + ["Offset of field: AVDCT::get_pixels_unaligned"] + [::std::mem::offset_of!(AVDCT, get_pixels_unaligned) - 112usize]; +}; extern "C" { #[doc = " Allocates a AVDCT context.\n This needs to be initialized with avcodec_dct_init() after optionally\n configuring it with AVOptions.\n\n To free it use av_free()"] pub fn avcodec_dct_alloc() -> *mut AVDCT; @@ -16422,41 +10726,13 @@ pub struct FFTComplex { pub re: FFTSample, pub im: FFTSample, } -#[test] -fn bindgen_test_layout_FFTComplex() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(FFTComplex)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(FFTComplex)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).re) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FFTComplex), - "::", - stringify!(re) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).im) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(FFTComplex), - "::", - stringify!(im) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of FFTComplex"][::std::mem::size_of::() - 8usize]; + ["Alignment of FFTComplex"][::std::mem::align_of::() - 4usize]; + ["Offset of field: FFTComplex::re"][::std::mem::offset_of!(FFTComplex, re) - 0usize]; + ["Offset of field: FFTComplex::im"][::std::mem::offset_of!(FFTComplex, im) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FFTContext { @@ -16559,91 +10835,25 @@ pub struct AVBSFContext { #[doc = " The timebase used for the timestamps of the output packets. Set by the\n filter in av_bsf_init()."] pub time_base_out: AVRational, } -#[test] -fn bindgen_test_layout_AVBSFContext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(AVBSFContext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVBSFContext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).av_class) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVBSFContext), - "::", - stringify!(av_class) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).filter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVBSFContext), - "::", - stringify!(filter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priv_data) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVBSFContext), - "::", - stringify!(priv_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).par_in) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVBSFContext), - "::", - stringify!(par_in) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).par_out) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVBSFContext), - "::", - stringify!(par_out) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).time_base_in) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVBSFContext), - "::", - stringify!(time_base_in) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).time_base_out) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVBSFContext), - "::", - stringify!(time_base_out) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVBSFContext"][::std::mem::size_of::() - 56usize]; + ["Alignment of AVBSFContext"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVBSFContext::av_class"] + [::std::mem::offset_of!(AVBSFContext, av_class) - 0usize]; + ["Offset of field: AVBSFContext::filter"] + [::std::mem::offset_of!(AVBSFContext, filter) - 8usize]; + ["Offset of field: AVBSFContext::priv_data"] + [::std::mem::offset_of!(AVBSFContext, priv_data) - 16usize]; + ["Offset of field: AVBSFContext::par_in"] + [::std::mem::offset_of!(AVBSFContext, par_in) - 24usize]; + ["Offset of field: AVBSFContext::par_out"] + [::std::mem::offset_of!(AVBSFContext, par_out) - 32usize]; + ["Offset of field: AVBSFContext::time_base_in"] + [::std::mem::offset_of!(AVBSFContext, time_base_in) - 40usize]; + ["Offset of field: AVBSFContext::time_base_out"] + [::std::mem::offset_of!(AVBSFContext, time_base_out) - 48usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AVBitStreamFilter { @@ -16653,51 +10863,17 @@ pub struct AVBitStreamFilter { #[doc = " A class for the private data, used to declare bitstream filter private\n AVOptions. This field is NULL for bitstream filters that do not declare\n any options.\n\n If this field is non-NULL, the first member of the filter private data\n must be a pointer to AVClass, which will be set by libavcodec generic\n code to this class."] pub priv_class: *const AVClass, } -#[test] -fn bindgen_test_layout_AVBitStreamFilter() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AVBitStreamFilter)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVBitStreamFilter)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVBitStreamFilter), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).codec_ids) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVBitStreamFilter), - "::", - stringify!(codec_ids) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priv_class) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVBitStreamFilter), - "::", - stringify!(priv_class) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVBitStreamFilter"][::std::mem::size_of::() - 24usize]; + ["Alignment of AVBitStreamFilter"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVBitStreamFilter::name"] + [::std::mem::offset_of!(AVBitStreamFilter, name) - 0usize]; + ["Offset of field: AVBitStreamFilter::codec_ids"] + [::std::mem::offset_of!(AVBitStreamFilter, codec_ids) - 8usize]; + ["Offset of field: AVBitStreamFilter::priv_class"] + [::std::mem::offset_of!(AVBitStreamFilter, priv_class) - 16usize]; +}; extern "C" { #[doc = " @return a bitstream filter with the specified name or NULL if no such\n bitstream filter exists."] pub fn av_bsf_get_by_name(name: *const ::std::os::raw::c_char) -> *const AVBitStreamFilter; @@ -16808,41 +10984,15 @@ pub struct DiracVersionInfo { pub major: ::std::os::raw::c_int, pub minor: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_DiracVersionInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(DiracVersionInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(DiracVersionInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(DiracVersionInfo), - "::", - stringify!(major) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(DiracVersionInfo), - "::", - stringify!(minor) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of DiracVersionInfo"][::std::mem::size_of::() - 8usize]; + ["Alignment of DiracVersionInfo"][::std::mem::align_of::() - 4usize]; + ["Offset of field: DiracVersionInfo::major"] + [::std::mem::offset_of!(DiracVersionInfo, major) - 0usize]; + ["Offset of field: DiracVersionInfo::minor"] + [::std::mem::offset_of!(DiracVersionInfo, minor) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AVDiracSeqHeader { @@ -16876,261 +11026,59 @@ pub struct AVDiracSeqHeader { pub version: DiracVersionInfo, pub bit_depth: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVDiracSeqHeader() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(AVDiracSeqHeader)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVDiracSeqHeader)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chroma_format) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(chroma_format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).interlaced) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(interlaced) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).top_field_first) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(top_field_first) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).frame_rate_index) as usize - ptr as usize }, - 11usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(frame_rate_index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aspect_ratio_index) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(aspect_ratio_index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clean_width) as usize - ptr as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(clean_width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clean_height) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(clean_height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clean_left_offset) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(clean_left_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clean_right_offset) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(clean_right_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pixel_range_index) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(pixel_range_index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_spec_index) as usize - ptr as usize }, - 23usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(color_spec_index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).profile) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(profile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).level) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(level) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).framerate) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(framerate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sample_aspect_ratio) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(sample_aspect_ratio) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pix_fmt) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(pix_fmt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_range) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(color_range) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_primaries) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(color_primaries) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_trc) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(color_trc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).colorspace) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(colorspace) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bit_depth) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(AVDiracSeqHeader), - "::", - stringify!(bit_depth) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDiracSeqHeader"][::std::mem::size_of::() - 80usize]; + ["Alignment of AVDiracSeqHeader"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVDiracSeqHeader::width"] + [::std::mem::offset_of!(AVDiracSeqHeader, width) - 0usize]; + ["Offset of field: AVDiracSeqHeader::height"] + [::std::mem::offset_of!(AVDiracSeqHeader, height) - 4usize]; + ["Offset of field: AVDiracSeqHeader::chroma_format"] + [::std::mem::offset_of!(AVDiracSeqHeader, chroma_format) - 8usize]; + ["Offset of field: AVDiracSeqHeader::interlaced"] + [::std::mem::offset_of!(AVDiracSeqHeader, interlaced) - 9usize]; + ["Offset of field: AVDiracSeqHeader::top_field_first"] + [::std::mem::offset_of!(AVDiracSeqHeader, top_field_first) - 10usize]; + ["Offset of field: AVDiracSeqHeader::frame_rate_index"] + [::std::mem::offset_of!(AVDiracSeqHeader, frame_rate_index) - 11usize]; + ["Offset of field: AVDiracSeqHeader::aspect_ratio_index"] + [::std::mem::offset_of!(AVDiracSeqHeader, aspect_ratio_index) - 12usize]; + ["Offset of field: AVDiracSeqHeader::clean_width"] + [::std::mem::offset_of!(AVDiracSeqHeader, clean_width) - 14usize]; + ["Offset of field: AVDiracSeqHeader::clean_height"] + [::std::mem::offset_of!(AVDiracSeqHeader, clean_height) - 16usize]; + ["Offset of field: AVDiracSeqHeader::clean_left_offset"] + [::std::mem::offset_of!(AVDiracSeqHeader, clean_left_offset) - 18usize]; + ["Offset of field: AVDiracSeqHeader::clean_right_offset"] + [::std::mem::offset_of!(AVDiracSeqHeader, clean_right_offset) - 20usize]; + ["Offset of field: AVDiracSeqHeader::pixel_range_index"] + [::std::mem::offset_of!(AVDiracSeqHeader, pixel_range_index) - 22usize]; + ["Offset of field: AVDiracSeqHeader::color_spec_index"] + [::std::mem::offset_of!(AVDiracSeqHeader, color_spec_index) - 23usize]; + ["Offset of field: AVDiracSeqHeader::profile"] + [::std::mem::offset_of!(AVDiracSeqHeader, profile) - 24usize]; + ["Offset of field: AVDiracSeqHeader::level"] + [::std::mem::offset_of!(AVDiracSeqHeader, level) - 28usize]; + ["Offset of field: AVDiracSeqHeader::framerate"] + [::std::mem::offset_of!(AVDiracSeqHeader, framerate) - 32usize]; + ["Offset of field: AVDiracSeqHeader::sample_aspect_ratio"] + [::std::mem::offset_of!(AVDiracSeqHeader, sample_aspect_ratio) - 40usize]; + ["Offset of field: AVDiracSeqHeader::pix_fmt"] + [::std::mem::offset_of!(AVDiracSeqHeader, pix_fmt) - 48usize]; + ["Offset of field: AVDiracSeqHeader::color_range"] + [::std::mem::offset_of!(AVDiracSeqHeader, color_range) - 52usize]; + ["Offset of field: AVDiracSeqHeader::color_primaries"] + [::std::mem::offset_of!(AVDiracSeqHeader, color_primaries) - 56usize]; + ["Offset of field: AVDiracSeqHeader::color_trc"] + [::std::mem::offset_of!(AVDiracSeqHeader, color_trc) - 60usize]; + ["Offset of field: AVDiracSeqHeader::colorspace"] + [::std::mem::offset_of!(AVDiracSeqHeader, colorspace) - 64usize]; + ["Offset of field: AVDiracSeqHeader::version"] + [::std::mem::offset_of!(AVDiracSeqHeader, version) - 68usize]; + ["Offset of field: AVDiracSeqHeader::bit_depth"] + [::std::mem::offset_of!(AVDiracSeqHeader, bit_depth) - 76usize]; +}; extern "C" { #[doc = " Parse a Dirac sequence header.\n\n @param dsh this function will allocate and fill an AVDiracSeqHeader struct\n and write it into this pointer. The caller must free it with\n av_free().\n @param buf the data buffer\n @param buf_size the size of the data buffer in bytes\n @param log_ctx if non-NULL, this function will log errors here\n @return 0 on success, a negative AVERROR code on failure"] pub fn av_dirac_parse_sequence_header( @@ -17161,191 +11109,40 @@ pub struct AVDVProfile { pub audio_samples_dist: [::std::os::raw::c_int; 5usize], pub audio_shuffle: *const [::std::os::raw::c_uchar; 9usize], } -#[test] -fn bindgen_test_layout_AVDVProfile() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 120usize, - concat!("Size of: ", stringify!(AVDVProfile)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVDVProfile)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dsf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDVProfile), - "::", - stringify!(dsf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).video_stype) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVDVProfile), - "::", - stringify!(video_stype) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).frame_size) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVDVProfile), - "::", - stringify!(frame_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).difseg_size) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVDVProfile), - "::", - stringify!(difseg_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).n_difchan) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVDVProfile), - "::", - stringify!(n_difchan) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).time_base) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AVDVProfile), - "::", - stringify!(time_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ltc_divisor) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AVDVProfile), - "::", - stringify!(ltc_divisor) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVDVProfile), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(AVDVProfile), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sar) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVDVProfile), - "::", - stringify!(sar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pix_fmt) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVDVProfile), - "::", - stringify!(pix_fmt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bpm) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(AVDVProfile), - "::", - stringify!(bpm) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).block_sizes) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVDVProfile), - "::", - stringify!(block_sizes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).audio_stride) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVDVProfile), - "::", - stringify!(audio_stride) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).audio_min_samples) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(AVDVProfile), - "::", - stringify!(audio_min_samples) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).audio_samples_dist) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(AVDVProfile), - "::", - stringify!(audio_samples_dist) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).audio_shuffle) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(AVDVProfile), - "::", - stringify!(audio_shuffle) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDVProfile"][::std::mem::size_of::() - 120usize]; + ["Alignment of AVDVProfile"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVDVProfile::dsf"][::std::mem::offset_of!(AVDVProfile, dsf) - 0usize]; + ["Offset of field: AVDVProfile::video_stype"] + [::std::mem::offset_of!(AVDVProfile, video_stype) - 4usize]; + ["Offset of field: AVDVProfile::frame_size"] + [::std::mem::offset_of!(AVDVProfile, frame_size) - 8usize]; + ["Offset of field: AVDVProfile::difseg_size"] + [::std::mem::offset_of!(AVDVProfile, difseg_size) - 12usize]; + ["Offset of field: AVDVProfile::n_difchan"] + [::std::mem::offset_of!(AVDVProfile, n_difchan) - 16usize]; + ["Offset of field: AVDVProfile::time_base"] + [::std::mem::offset_of!(AVDVProfile, time_base) - 20usize]; + ["Offset of field: AVDVProfile::ltc_divisor"] + [::std::mem::offset_of!(AVDVProfile, ltc_divisor) - 28usize]; + ["Offset of field: AVDVProfile::height"][::std::mem::offset_of!(AVDVProfile, height) - 32usize]; + ["Offset of field: AVDVProfile::width"][::std::mem::offset_of!(AVDVProfile, width) - 36usize]; + ["Offset of field: AVDVProfile::sar"][::std::mem::offset_of!(AVDVProfile, sar) - 40usize]; + ["Offset of field: AVDVProfile::pix_fmt"] + [::std::mem::offset_of!(AVDVProfile, pix_fmt) - 56usize]; + ["Offset of field: AVDVProfile::bpm"][::std::mem::offset_of!(AVDVProfile, bpm) - 60usize]; + ["Offset of field: AVDVProfile::block_sizes"] + [::std::mem::offset_of!(AVDVProfile, block_sizes) - 64usize]; + ["Offset of field: AVDVProfile::audio_stride"] + [::std::mem::offset_of!(AVDVProfile, audio_stride) - 72usize]; + ["Offset of field: AVDVProfile::audio_min_samples"] + [::std::mem::offset_of!(AVDVProfile, audio_min_samples) - 76usize]; + ["Offset of field: AVDVProfile::audio_samples_dist"] + [::std::mem::offset_of!(AVDVProfile, audio_samples_dist) - 88usize]; + ["Offset of field: AVDVProfile::audio_shuffle"] + [::std::mem::offset_of!(AVDVProfile, audio_shuffle) - 112usize]; +}; extern "C" { #[doc = " Get a DV profile for the provided compressed frame.\n\n @param sys the profile used for the previous frame, may be NULL\n @param frame the compressed data buffer\n @param buf_size size of the buffer in bytes\n @return the DV profile for the supplied data or NULL on failure"] pub fn av_dv_frame_profile( @@ -17380,6 +11177,15 @@ extern "C" { extern "C" { pub fn av_jni_get_java_vm(log_ctx: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; } +extern "C" { + pub fn av_jni_set_android_app_ctx( + app_ctx: *mut ::std::os::raw::c_void, + log_ctx: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn av_jni_get_android_app_ctx() -> *mut ::std::os::raw::c_void; +} #[doc = " This structure holds a reference to a android/view/Surface object that will\n be used as output by the decoder.\n"] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -17387,31 +11193,13 @@ pub struct AVMediaCodecContext { #[doc = " android/view/Surface object reference."] pub surface: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_AVMediaCodecContext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AVMediaCodecContext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVMediaCodecContext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).surface) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVMediaCodecContext), - "::", - stringify!(surface) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVMediaCodecContext"][::std::mem::size_of::() - 8usize]; + ["Alignment of AVMediaCodecContext"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVMediaCodecContext::surface"] + [::std::mem::offset_of!(AVMediaCodecContext, surface) - 0usize]; +}; extern "C" { #[doc = " Allocate and initialize a MediaCodec context.\n\n When decoding with MediaCodec is finished, the caller must free the\n MediaCodec context with av_mediacodec_default_free.\n\n @return a pointer to a newly allocated AVMediaCodecContext on success, NULL otherwise"] pub fn av_mediacodec_alloc_context() -> *mut AVMediaCodecContext; @@ -17494,41 +11282,15 @@ pub struct AVIOInterruptCB { >, pub opaque: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_AVIOInterruptCB() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AVIOInterruptCB)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVIOInterruptCB)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).callback) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVIOInterruptCB), - "::", - stringify!(callback) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVIOInterruptCB), - "::", - stringify!(opaque) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVIOInterruptCB"][::std::mem::size_of::() - 16usize]; + ["Alignment of AVIOInterruptCB"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVIOInterruptCB::callback"] + [::std::mem::offset_of!(AVIOInterruptCB, callback) - 0usize]; + ["Offset of field: AVIOInterruptCB::opaque"] + [::std::mem::offset_of!(AVIOInterruptCB, opaque) - 8usize]; +}; pub const AVIO_ENTRY_UNKNOWN: AVIODirEntryType = 0; pub const AVIO_ENTRY_BLOCK_DEVICE: AVIODirEntryType = 1; pub const AVIO_ENTRY_CHARACTER_DEVICE: AVIODirEntryType = 2; @@ -17567,150 +11329,31 @@ pub struct AVIODirEntry { #[doc = "< Unix file mode, -1 if unknown."] pub filemode: i64, } -#[test] -fn bindgen_test_layout_AVIODirEntry() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(AVIODirEntry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVIODirEntry)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVIODirEntry), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVIODirEntry), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).utf8) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVIODirEntry), - "::", - stringify!(utf8) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVIODirEntry), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).modification_timestamp) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVIODirEntry), - "::", - stringify!(modification_timestamp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).access_timestamp) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVIODirEntry), - "::", - stringify!(access_timestamp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).status_change_timestamp) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVIODirEntry), - "::", - stringify!(status_change_timestamp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).user_id) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVIODirEntry), - "::", - stringify!(user_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).group_id) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVIODirEntry), - "::", - stringify!(group_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).filemode) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVIODirEntry), - "::", - stringify!(filemode) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVIODirEntry"][::std::mem::size_of::() - 72usize]; + ["Alignment of AVIODirEntry"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVIODirEntry::name"][::std::mem::offset_of!(AVIODirEntry, name) - 0usize]; + ["Offset of field: AVIODirEntry::type_"][::std::mem::offset_of!(AVIODirEntry, type_) - 8usize]; + ["Offset of field: AVIODirEntry::utf8"][::std::mem::offset_of!(AVIODirEntry, utf8) - 12usize]; + ["Offset of field: AVIODirEntry::size"][::std::mem::offset_of!(AVIODirEntry, size) - 16usize]; + ["Offset of field: AVIODirEntry::modification_timestamp"] + [::std::mem::offset_of!(AVIODirEntry, modification_timestamp) - 24usize]; + ["Offset of field: AVIODirEntry::access_timestamp"] + [::std::mem::offset_of!(AVIODirEntry, access_timestamp) - 32usize]; + ["Offset of field: AVIODirEntry::status_change_timestamp"] + [::std::mem::offset_of!(AVIODirEntry, status_change_timestamp) - 40usize]; + ["Offset of field: AVIODirEntry::user_id"] + [::std::mem::offset_of!(AVIODirEntry, user_id) - 48usize]; + ["Offset of field: AVIODirEntry::group_id"] + [::std::mem::offset_of!(AVIODirEntry, group_id) - 56usize]; + ["Offset of field: AVIODirEntry::filemode"] + [::std::mem::offset_of!(AVIODirEntry, filemode) - 64usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AVIODirContext { - pub url_context: *mut URLContext, -} -#[test] -fn bindgen_test_layout_AVIODirContext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AVIODirContext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVIODirContext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).url_context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVIODirContext), - "::", - stringify!(url_context) - ) - ); + _unused: [u8; 0], } #[doc = " Header data; this needs to be present for the stream to be decodeable."] pub const AVIO_DATA_MARKER_HEADER: AVIODataMarkerType = 0; @@ -17752,7 +11395,7 @@ pub struct AVIOContext { pub write_packet: ::std::option::Option< unsafe extern "C" fn( opaque: *mut ::std::os::raw::c_void, - buf: *mut u8, + buf: *const u8, buf_size: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int, >, @@ -17807,329 +11450,83 @@ pub struct AVIOContext { pub protocol_whitelist: *const ::std::os::raw::c_char, #[doc = " ',' separated list of disallowed protocols."] pub protocol_blacklist: *const ::std::os::raw::c_char, + #[doc = " A callback that is used instead of write_packet."] pub write_data_type: ::std::option::Option< unsafe extern "C" fn( opaque: *mut ::std::os::raw::c_void, - buf: *mut u8, + buf: *const u8, buf_size: ::std::os::raw::c_int, type_: AVIODataMarkerType, time: i64, ) -> ::std::os::raw::c_int, - >, - #[doc = " If set, don't call write_data_type separately for AVIO_DATA_MARKER_BOUNDARY_POINT,\n but ignore them and treat them as AVIO_DATA_MARKER_UNKNOWN (to avoid needlessly\n small chunks of data returned from the callback)."] - pub ignore_boundary_point: ::std::os::raw::c_int, - #[doc = " Maximum reached position before a backward seek in the write buffer,\n used keeping track of already written data for a later flush."] - pub buf_ptr_max: *mut ::std::os::raw::c_uchar, - #[doc = " Read-only statistic of bytes read for this AVIOContext."] - pub bytes_read: i64, - #[doc = " Read-only statistic of bytes written for this AVIOContext."] - pub bytes_written: i64, -} -#[test] -fn bindgen_test_layout_AVIOContext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 208usize, - concat!("Size of: ", stringify!(AVIOContext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVIOContext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).av_class) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(av_class) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(buffer) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buffer_size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(buffer_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buf_ptr) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(buf_ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buf_end) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(buf_end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(opaque) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).read_packet) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(read_packet) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).write_packet) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(write_packet) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).seek) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(seek) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pos) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(pos) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eof_reached) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(eof_reached) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).error) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(error) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).write_flag) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(write_flag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_packet_size) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(max_packet_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).min_packet_size) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(min_packet_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).checksum) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(checksum) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).checksum_ptr) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(checksum_ptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).update_checksum) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(update_checksum) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).read_pause) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(read_pause) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).read_seek) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(read_seek) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).seekable) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(seekable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).direct) as usize - ptr as usize }, - 148usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(direct) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).protocol_whitelist) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(protocol_whitelist) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).protocol_blacklist) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(protocol_blacklist) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).write_data_type) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(write_data_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ignore_boundary_point) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(ignore_boundary_point) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buf_ptr_max) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(buf_ptr_max) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bytes_read) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(bytes_read) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bytes_written) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(AVIOContext), - "::", - stringify!(bytes_written) - ) - ); + >, + #[doc = " If set, don't call write_data_type separately for AVIO_DATA_MARKER_BOUNDARY_POINT,\n but ignore them and treat them as AVIO_DATA_MARKER_UNKNOWN (to avoid needlessly\n small chunks of data returned from the callback)."] + pub ignore_boundary_point: ::std::os::raw::c_int, + #[doc = " Maximum reached position before a backward seek in the write buffer,\n used keeping track of already written data for a later flush."] + pub buf_ptr_max: *mut ::std::os::raw::c_uchar, + #[doc = " Read-only statistic of bytes read for this AVIOContext."] + pub bytes_read: i64, + #[doc = " Read-only statistic of bytes written for this AVIOContext."] + pub bytes_written: i64, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVIOContext"][::std::mem::size_of::() - 208usize]; + ["Alignment of AVIOContext"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVIOContext::av_class"] + [::std::mem::offset_of!(AVIOContext, av_class) - 0usize]; + ["Offset of field: AVIOContext::buffer"][::std::mem::offset_of!(AVIOContext, buffer) - 8usize]; + ["Offset of field: AVIOContext::buffer_size"] + [::std::mem::offset_of!(AVIOContext, buffer_size) - 16usize]; + ["Offset of field: AVIOContext::buf_ptr"] + [::std::mem::offset_of!(AVIOContext, buf_ptr) - 24usize]; + ["Offset of field: AVIOContext::buf_end"] + [::std::mem::offset_of!(AVIOContext, buf_end) - 32usize]; + ["Offset of field: AVIOContext::opaque"][::std::mem::offset_of!(AVIOContext, opaque) - 40usize]; + ["Offset of field: AVIOContext::read_packet"] + [::std::mem::offset_of!(AVIOContext, read_packet) - 48usize]; + ["Offset of field: AVIOContext::write_packet"] + [::std::mem::offset_of!(AVIOContext, write_packet) - 56usize]; + ["Offset of field: AVIOContext::seek"][::std::mem::offset_of!(AVIOContext, seek) - 64usize]; + ["Offset of field: AVIOContext::pos"][::std::mem::offset_of!(AVIOContext, pos) - 72usize]; + ["Offset of field: AVIOContext::eof_reached"] + [::std::mem::offset_of!(AVIOContext, eof_reached) - 80usize]; + ["Offset of field: AVIOContext::error"][::std::mem::offset_of!(AVIOContext, error) - 84usize]; + ["Offset of field: AVIOContext::write_flag"] + [::std::mem::offset_of!(AVIOContext, write_flag) - 88usize]; + ["Offset of field: AVIOContext::max_packet_size"] + [::std::mem::offset_of!(AVIOContext, max_packet_size) - 92usize]; + ["Offset of field: AVIOContext::min_packet_size"] + [::std::mem::offset_of!(AVIOContext, min_packet_size) - 96usize]; + ["Offset of field: AVIOContext::checksum"] + [::std::mem::offset_of!(AVIOContext, checksum) - 104usize]; + ["Offset of field: AVIOContext::checksum_ptr"] + [::std::mem::offset_of!(AVIOContext, checksum_ptr) - 112usize]; + ["Offset of field: AVIOContext::update_checksum"] + [::std::mem::offset_of!(AVIOContext, update_checksum) - 120usize]; + ["Offset of field: AVIOContext::read_pause"] + [::std::mem::offset_of!(AVIOContext, read_pause) - 128usize]; + ["Offset of field: AVIOContext::read_seek"] + [::std::mem::offset_of!(AVIOContext, read_seek) - 136usize]; + ["Offset of field: AVIOContext::seekable"] + [::std::mem::offset_of!(AVIOContext, seekable) - 144usize]; + ["Offset of field: AVIOContext::direct"] + [::std::mem::offset_of!(AVIOContext, direct) - 148usize]; + ["Offset of field: AVIOContext::protocol_whitelist"] + [::std::mem::offset_of!(AVIOContext, protocol_whitelist) - 152usize]; + ["Offset of field: AVIOContext::protocol_blacklist"] + [::std::mem::offset_of!(AVIOContext, protocol_blacklist) - 160usize]; + ["Offset of field: AVIOContext::write_data_type"] + [::std::mem::offset_of!(AVIOContext, write_data_type) - 168usize]; + ["Offset of field: AVIOContext::ignore_boundary_point"] + [::std::mem::offset_of!(AVIOContext, ignore_boundary_point) - 176usize]; + ["Offset of field: AVIOContext::buf_ptr_max"] + [::std::mem::offset_of!(AVIOContext, buf_ptr_max) - 184usize]; + ["Offset of field: AVIOContext::bytes_read"] + [::std::mem::offset_of!(AVIOContext, bytes_read) - 192usize]; + ["Offset of field: AVIOContext::bytes_written"] + [::std::mem::offset_of!(AVIOContext, bytes_written) - 200usize]; +}; extern "C" { #[doc = " Return the name of the protocol that will handle the passed URL.\n\n NULL is returned if no protocol could be found for the given URL.\n\n @return Name of the protocol or NULL."] pub fn avio_find_protocol_name( @@ -18183,7 +11580,7 @@ extern "C" { write_packet: ::std::option::Option< unsafe extern "C" fn( opaque: *mut ::std::os::raw::c_void, - buf: *mut u8, + buf: *const u8, buf_size: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int, >, @@ -18295,7 +11692,7 @@ extern "C" { #[doc = " Write a NULL terminated array of strings to the context.\n Usually you don't need to use this function directly but its macro wrapper,\n avio_print."] pub fn avio_print_string_array( s: *mut AVIOContext, - strings: *mut *const ::std::os::raw::c_char, + strings: *const *const ::std::os::raw::c_char, ); } extern "C" { @@ -18483,61 +11880,18 @@ pub struct AVProbeData { #[doc = "< mime_type, when known."] pub mime_type: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_AVProbeData() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(AVProbeData)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVProbeData)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).filename) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVProbeData), - "::", - stringify!(filename) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVProbeData), - "::", - stringify!(buf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buf_size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVProbeData), - "::", - stringify!(buf_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mime_type) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVProbeData), - "::", - stringify!(mime_type) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVProbeData"][::std::mem::size_of::() - 32usize]; + ["Alignment of AVProbeData"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVProbeData::filename"] + [::std::mem::offset_of!(AVProbeData, filename) - 0usize]; + ["Offset of field: AVProbeData::buf"][::std::mem::offset_of!(AVProbeData, buf) - 8usize]; + ["Offset of field: AVProbeData::buf_size"] + [::std::mem::offset_of!(AVProbeData, buf_size) - 16usize]; + ["Offset of field: AVProbeData::mime_type"] + [::std::mem::offset_of!(AVProbeData, mime_type) - 24usize]; +}; #[doc = " @addtogroup lavf_encoding\n @{"] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -18561,121 +11915,31 @@ pub struct AVOutputFormat { #[doc = "< AVClass for the private context"] pub priv_class: *const AVClass, } -#[test] -fn bindgen_test_layout_AVOutputFormat() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(AVOutputFormat)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVOutputFormat)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVOutputFormat), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).long_name) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVOutputFormat), - "::", - stringify!(long_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mime_type) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVOutputFormat), - "::", - stringify!(mime_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extensions) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVOutputFormat), - "::", - stringify!(extensions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).audio_codec) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVOutputFormat), - "::", - stringify!(audio_codec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).video_codec) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(AVOutputFormat), - "::", - stringify!(video_codec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).subtitle_codec) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVOutputFormat), - "::", - stringify!(subtitle_codec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(AVOutputFormat), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).codec_tag) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVOutputFormat), - "::", - stringify!(codec_tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priv_class) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVOutputFormat), - "::", - stringify!(priv_class) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVOutputFormat"][::std::mem::size_of::() - 64usize]; + ["Alignment of AVOutputFormat"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVOutputFormat::name"] + [::std::mem::offset_of!(AVOutputFormat, name) - 0usize]; + ["Offset of field: AVOutputFormat::long_name"] + [::std::mem::offset_of!(AVOutputFormat, long_name) - 8usize]; + ["Offset of field: AVOutputFormat::mime_type"] + [::std::mem::offset_of!(AVOutputFormat, mime_type) - 16usize]; + ["Offset of field: AVOutputFormat::extensions"] + [::std::mem::offset_of!(AVOutputFormat, extensions) - 24usize]; + ["Offset of field: AVOutputFormat::audio_codec"] + [::std::mem::offset_of!(AVOutputFormat, audio_codec) - 32usize]; + ["Offset of field: AVOutputFormat::video_codec"] + [::std::mem::offset_of!(AVOutputFormat, video_codec) - 36usize]; + ["Offset of field: AVOutputFormat::subtitle_codec"] + [::std::mem::offset_of!(AVOutputFormat, subtitle_codec) - 40usize]; + ["Offset of field: AVOutputFormat::flags"] + [::std::mem::offset_of!(AVOutputFormat, flags) - 44usize]; + ["Offset of field: AVOutputFormat::codec_tag"] + [::std::mem::offset_of!(AVOutputFormat, codec_tag) - 48usize]; + ["Offset of field: AVOutputFormat::priv_class"] + [::std::mem::offset_of!(AVOutputFormat, priv_class) - 56usize]; +}; #[doc = " @addtogroup lavf_decoding\n @{"] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -18693,291 +11957,25 @@ pub struct AVInputFormat { pub priv_class: *const AVClass, #[doc = " Comma-separated list of mime types.\n It is used check for matching mime types while probing.\n @see av_probe_input_format2"] pub mime_type: *const ::std::os::raw::c_char, - #[doc = " No fields below this line are part of the public API. They\n may not be used outside of libavformat and can be changed and\n removed at will.\n New public fields should be added right above.\n\n/\n/**\n Raw demuxers store their codec ID here."] - pub raw_codec_id: ::std::os::raw::c_int, - #[doc = " Size of private data so that it can be allocated in the wrapper."] - pub priv_data_size: ::std::os::raw::c_int, - #[doc = " Internal flags. See FF_FMT_FLAG_* in internal.h."] - pub flags_internal: ::std::os::raw::c_int, - #[doc = " Tell if a given file has a chance of being parsed as this format.\n The buffer provided is guaranteed to be AVPROBE_PADDING_SIZE bytes\n big so you do not have to check for that unless you need more."] - pub read_probe: ::std::option::Option< - unsafe extern "C" fn(arg1: *const AVProbeData) -> ::std::os::raw::c_int, - >, - #[doc = " Read the format header and initialize the AVFormatContext\n structure. Return 0 if OK. 'avformat_new_stream' should be\n called to create new streams."] - pub read_header: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut AVFormatContext) -> ::std::os::raw::c_int, - >, - #[doc = " Read one packet and put it in 'pkt'. pts and flags are also\n set. 'avformat_new_stream' can be called only if the flag\n AVFMTCTX_NOHEADER is used and only in the calling thread (not in a\n background thread).\n @return 0 on success, < 0 on error.\n Upon returning an error, pkt must be unreferenced by the caller."] - pub read_packet: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut AVFormatContext, - pkt: *mut AVPacket, - ) -> ::std::os::raw::c_int, - >, - #[doc = " Close the stream. The AVFormatContext and AVStreams are not\n freed by this function"] - pub read_close: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut AVFormatContext) -> ::std::os::raw::c_int, - >, - #[doc = " Seek to a given timestamp relative to the frames in\n stream component stream_index.\n @param stream_index Must not be -1.\n @param flags Selects which direction should be preferred if no exact\n match is available.\n @return >= 0 on success (but not necessarily the new offset)"] - pub read_seek: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut AVFormatContext, - stream_index: ::std::os::raw::c_int, - timestamp: i64, - flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - #[doc = " Get the next timestamp in stream[stream_index].time_base units.\n @return the timestamp or AV_NOPTS_VALUE if an error occurred"] - pub read_timestamp: ::std::option::Option< - unsafe extern "C" fn( - s: *mut AVFormatContext, - stream_index: ::std::os::raw::c_int, - pos: *mut i64, - pos_limit: i64, - ) -> i64, - >, - #[doc = " Start/resume playing - only meaningful if using a network-based format\n (RTSP)."] - pub read_play: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut AVFormatContext) -> ::std::os::raw::c_int, - >, - #[doc = " Pause playing - only meaningful if using a network-based format\n (RTSP)."] - pub read_pause: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut AVFormatContext) -> ::std::os::raw::c_int, - >, - #[doc = " Seek to timestamp ts.\n Seeking will be done so that the point from which all active streams\n can be presented successfully will be closest to ts and within min/max_ts.\n Active streams are all streams that have AVStream.discard < AVDISCARD_ALL."] - pub read_seek2: ::std::option::Option< - unsafe extern "C" fn( - s: *mut AVFormatContext, - stream_index: ::std::os::raw::c_int, - min_ts: i64, - ts: i64, - max_ts: i64, - flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - #[doc = " Returns device list with it properties.\n @see avdevice_list_devices() for more details."] - pub get_device_list: ::std::option::Option< - unsafe extern "C" fn( - s: *mut AVFormatContext, - device_list: *mut AVDeviceInfoList, - ) -> ::std::os::raw::c_int, - >, -} -#[test] -fn bindgen_test_layout_AVInputFormat() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 152usize, - concat!("Size of: ", stringify!(AVInputFormat)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVInputFormat)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).long_name) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(long_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extensions) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(extensions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).codec_tag) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(codec_tag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priv_class) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(priv_class) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mime_type) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(mime_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).raw_codec_id) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(raw_codec_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priv_data_size) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(priv_data_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags_internal) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(flags_internal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).read_probe) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(read_probe) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).read_header) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(read_header) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).read_packet) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(read_packet) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).read_close) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(read_close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).read_seek) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(read_seek) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).read_timestamp) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(read_timestamp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).read_play) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(read_play) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).read_pause) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(read_pause) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).read_seek2) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(read_seek2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).get_device_list) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(AVInputFormat), - "::", - stringify!(get_device_list) - ) - ); } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVInputFormat"][::std::mem::size_of::() - 56usize]; + ["Alignment of AVInputFormat"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVInputFormat::name"][::std::mem::offset_of!(AVInputFormat, name) - 0usize]; + ["Offset of field: AVInputFormat::long_name"] + [::std::mem::offset_of!(AVInputFormat, long_name) - 8usize]; + ["Offset of field: AVInputFormat::flags"] + [::std::mem::offset_of!(AVInputFormat, flags) - 16usize]; + ["Offset of field: AVInputFormat::extensions"] + [::std::mem::offset_of!(AVInputFormat, extensions) - 24usize]; + ["Offset of field: AVInputFormat::codec_tag"] + [::std::mem::offset_of!(AVInputFormat, codec_tag) - 32usize]; + ["Offset of field: AVInputFormat::priv_class"] + [::std::mem::offset_of!(AVInputFormat, priv_class) - 40usize]; + ["Offset of field: AVInputFormat::mime_type"] + [::std::mem::offset_of!(AVInputFormat, mime_type) - 48usize]; +}; pub const AVSTREAM_PARSE_NONE: AVStreamParseType = 0; #[doc = "< full parsing and repack"] pub const AVSTREAM_PARSE_FULL: AVStreamParseType = 1; @@ -19002,51 +12000,16 @@ pub struct AVIndexEntry { #[doc = "< Minimum distance between this and the previous keyframe, used to avoid unneeded searching."] pub min_distance: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVIndexEntry() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AVIndexEntry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVIndexEntry)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pos) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVIndexEntry), - "::", - stringify!(pos) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVIndexEntry), - "::", - stringify!(timestamp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).min_distance) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AVIndexEntry), - "::", - stringify!(min_distance) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVIndexEntry"][::std::mem::size_of::() - 24usize]; + ["Alignment of AVIndexEntry"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVIndexEntry::pos"][::std::mem::offset_of!(AVIndexEntry, pos) - 0usize]; + ["Offset of field: AVIndexEntry::timestamp"] + [::std::mem::offset_of!(AVIndexEntry, timestamp) - 8usize]; + ["Offset of field: AVIndexEntry::min_distance"] + [::std::mem::offset_of!(AVIndexEntry, min_distance) - 20usize]; +}; impl AVIndexEntry { #[inline] pub fn flags(&self) -> ::std::os::raw::c_int { @@ -19141,227 +12104,208 @@ pub struct AVStream { #[doc = " Number of bits in timestamps. Used for wrapping control.\n\n - demuxing: set by libavformat\n - muxing: set by libavformat\n"] pub pts_wrap_bits: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVStream() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 232usize, - concat!("Size of: ", stringify!(AVStream)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVStream)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).av_class) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(av_class) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).codecpar) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(codecpar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priv_data) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(priv_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).time_base) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(time_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start_time) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(start_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).duration) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(duration) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_frames) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(nb_frames) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).disposition) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(disposition) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).discard) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(discard) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sample_aspect_ratio) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(sample_aspect_ratio) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metadata) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(metadata) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).avg_frame_rate) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(avg_frame_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).attached_pic) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(attached_pic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).side_data) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(side_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_side_data) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(nb_side_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).event_flags) as usize - ptr as usize }, - 212usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(event_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r_frame_rate) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(r_frame_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pts_wrap_bits) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(AVStream), - "::", - stringify!(pts_wrap_bits) - ) - ); +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVStream"][::std::mem::size_of::() - 232usize]; + ["Alignment of AVStream"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVStream::av_class"][::std::mem::offset_of!(AVStream, av_class) - 0usize]; + ["Offset of field: AVStream::index"][::std::mem::offset_of!(AVStream, index) - 8usize]; + ["Offset of field: AVStream::id"][::std::mem::offset_of!(AVStream, id) - 12usize]; + ["Offset of field: AVStream::codecpar"][::std::mem::offset_of!(AVStream, codecpar) - 16usize]; + ["Offset of field: AVStream::priv_data"][::std::mem::offset_of!(AVStream, priv_data) - 24usize]; + ["Offset of field: AVStream::time_base"][::std::mem::offset_of!(AVStream, time_base) - 32usize]; + ["Offset of field: AVStream::start_time"] + [::std::mem::offset_of!(AVStream, start_time) - 40usize]; + ["Offset of field: AVStream::duration"][::std::mem::offset_of!(AVStream, duration) - 48usize]; + ["Offset of field: AVStream::nb_frames"][::std::mem::offset_of!(AVStream, nb_frames) - 56usize]; + ["Offset of field: AVStream::disposition"] + [::std::mem::offset_of!(AVStream, disposition) - 64usize]; + ["Offset of field: AVStream::discard"][::std::mem::offset_of!(AVStream, discard) - 68usize]; + ["Offset of field: AVStream::sample_aspect_ratio"] + [::std::mem::offset_of!(AVStream, sample_aspect_ratio) - 72usize]; + ["Offset of field: AVStream::metadata"][::std::mem::offset_of!(AVStream, metadata) - 80usize]; + ["Offset of field: AVStream::avg_frame_rate"] + [::std::mem::offset_of!(AVStream, avg_frame_rate) - 88usize]; + ["Offset of field: AVStream::attached_pic"] + [::std::mem::offset_of!(AVStream, attached_pic) - 96usize]; + ["Offset of field: AVStream::side_data"] + [::std::mem::offset_of!(AVStream, side_data) - 200usize]; + ["Offset of field: AVStream::nb_side_data"] + [::std::mem::offset_of!(AVStream, nb_side_data) - 208usize]; + ["Offset of field: AVStream::event_flags"] + [::std::mem::offset_of!(AVStream, event_flags) - 212usize]; + ["Offset of field: AVStream::r_frame_rate"] + [::std::mem::offset_of!(AVStream, r_frame_rate) - 216usize]; + ["Offset of field: AVStream::pts_wrap_bits"] + [::std::mem::offset_of!(AVStream, pts_wrap_bits) - 224usize]; +}; +#[doc = " AVStreamGroupTileGrid holds information on how to combine several\n independent images on a single canvas for presentation.\n\n The output should be a @ref AVStreamGroupTileGrid.background \"background\"\n colored @ref AVStreamGroupTileGrid.coded_width \"coded_width\" x\n @ref AVStreamGroupTileGrid.coded_height \"coded_height\" canvas where a\n @ref AVStreamGroupTileGrid.nb_tiles \"nb_tiles\" amount of tiles are placed in\n the order they appear in the @ref AVStreamGroupTileGrid.offsets \"offsets\"\n array, at the exact offset described for them. In particular, if two or more\n tiles overlap, the image with higher index in the\n @ref AVStreamGroupTileGrid.offsets \"offsets\" array takes priority.\n Note that a single image may be used multiple times, i.e. multiple entries\n in @ref AVStreamGroupTileGrid.offsets \"offsets\" may have the same value of\n idx.\n\n The following is an example of a simple grid with 3 rows and 4 columns:\n\n +---+---+---+---+\n | 0 | 1 | 2 | 3 |\n +---+---+---+---+\n | 4 | 5 | 6 | 7 |\n +---+---+---+---+\n | 8 | 9 |10 |11 |\n +---+---+---+---+\n\n Assuming all tiles have a dimension of 512x512, the\n @ref AVStreamGroupTileGrid.offsets \"offset\" of the topleft pixel of\n the first @ref AVStreamGroup.streams \"stream\" in the group is \"0,0\", the\n @ref AVStreamGroupTileGrid.offsets \"offset\" of the topleft pixel of\n the second @ref AVStreamGroup.streams \"stream\" in the group is \"512,0\", the\n @ref AVStreamGroupTileGrid.offsets \"offset\" of the topleft pixel of\n the fifth @ref AVStreamGroup.streams \"stream\" in the group is \"0,512\", the\n @ref AVStreamGroupTileGrid.offsets \"offset\", of the topleft pixel of\n the sixth @ref AVStreamGroup.streams \"stream\" in the group is \"512,512\",\n etc.\n\n The following is an example of a canvas with overlaping tiles:\n\n +-----------+\n | %%%%% |\n |***%%3%%@@@|\n |**0%%%%%2@@|\n |***##1@@@@@|\n | ##### |\n +-----------+\n\n Assuming a canvas with size 1024x1024 and all tiles with a dimension of\n 512x512, a possible @ref AVStreamGroupTileGrid.offsets \"offset\" for the\n topleft pixel of the first @ref AVStreamGroup.streams \"stream\" in the group\n would be 0x256, the @ref AVStreamGroupTileGrid.offsets \"offset\" for the\n topleft pixel of the second @ref AVStreamGroup.streams \"stream\" in the group\n would be 256x512, the @ref AVStreamGroupTileGrid.offsets \"offset\" for the\n topleft pixel of the third @ref AVStreamGroup.streams \"stream\" in the group\n would be 512x256, and the @ref AVStreamGroupTileGrid.offsets \"offset\" for\n the topleft pixel of the fourth @ref AVStreamGroup.streams \"stream\" in the\n group would be 256x0.\n\n sizeof(AVStreamGroupTileGrid) is not a part of the ABI and may only be\n allocated by avformat_stream_group_create()."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AVStreamGroupTileGrid { + pub av_class: *const AVClass, + #[doc = " Amount of tiles in the grid.\n\n Must be > 0."] + pub nb_tiles: ::std::os::raw::c_uint, + #[doc = " Width of the canvas.\n\n Must be > 0."] + pub coded_width: ::std::os::raw::c_int, + #[doc = " Width of the canvas.\n\n Must be > 0."] + pub coded_height: ::std::os::raw::c_int, + pub offsets: *mut AVStreamGroupTileGrid__bindgen_ty_1, + #[doc = " The pixel value per channel in RGBA format used if no pixel of any tile\n is located at a particular pixel location.\n\n @see av_image_fill_color().\n @see av_parse_color()."] + pub background: [u8; 4usize], + #[doc = " Offset in pixels from the left edge of the canvas where the actual image\n meant for presentation starts.\n\n This field must be >= 0 and < @ref coded_width."] + pub horizontal_offset: ::std::os::raw::c_int, + #[doc = " Offset in pixels from the top edge of the canvas where the actual image\n meant for presentation starts.\n\n This field must be >= 0 and < @ref coded_height."] + pub vertical_offset: ::std::os::raw::c_int, + #[doc = " Width of the final image for presentation.\n\n Must be > 0 and <= (@ref coded_width - @ref horizontal_offset).\n When it's not equal to (@ref coded_width - @ref horizontal_offset), the\n result of (@ref coded_width - width - @ref horizontal_offset) is the\n amount amount of pixels to be cropped from the right edge of the\n final image before presentation."] + pub width: ::std::os::raw::c_int, + #[doc = " Height of the final image for presentation.\n\n Must be > 0 and <= (@ref coded_height - @ref vertical_offset).\n When it's not equal to (@ref coded_height - @ref vertical_offset), the\n result of (@ref coded_height - height - @ref vertical_offset) is the\n amount amount of pixels to be cropped from the bottom edge of the\n final image before presentation."] + pub height: ::std::os::raw::c_int, } -extern "C" { - pub fn av_stream_get_parser(s: *const AVStream) -> *mut AVCodecParserContext; +#[doc = " An @ref nb_tiles sized array of offsets in pixels from the topleft edge\n of the canvas, indicating where each stream should be placed.\n It must be allocated with the av_malloc() family of functions.\n\n - demuxing: set by libavformat, must not be modified by the caller.\n - muxing: set by the caller before avformat_write_header().\n\n Freed by libavformat in avformat_free_context()."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AVStreamGroupTileGrid__bindgen_ty_1 { + #[doc = " Index of the stream in the group this tile references.\n\n Must be < @ref AVStreamGroup.nb_streams \"nb_streams\"."] + pub idx: ::std::os::raw::c_uint, + #[doc = " Offset in pixels from the left edge of the canvas where the tile\n should be placed."] + pub horizontal: ::std::os::raw::c_int, + #[doc = " Offset in pixels from the top edge of the canvas where the tile\n should be placed."] + pub vertical: ::std::os::raw::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVStreamGroupTileGrid__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of AVStreamGroupTileGrid__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AVStreamGroupTileGrid__bindgen_ty_1::idx"] + [::std::mem::offset_of!(AVStreamGroupTileGrid__bindgen_ty_1, idx) - 0usize]; + ["Offset of field: AVStreamGroupTileGrid__bindgen_ty_1::horizontal"] + [::std::mem::offset_of!(AVStreamGroupTileGrid__bindgen_ty_1, horizontal) - 4usize]; + ["Offset of field: AVStreamGroupTileGrid__bindgen_ty_1::vertical"] + [::std::mem::offset_of!(AVStreamGroupTileGrid__bindgen_ty_1, vertical) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVStreamGroupTileGrid"][::std::mem::size_of::() - 56usize]; + ["Alignment of AVStreamGroupTileGrid"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AVStreamGroupTileGrid::av_class"] + [::std::mem::offset_of!(AVStreamGroupTileGrid, av_class) - 0usize]; + ["Offset of field: AVStreamGroupTileGrid::nb_tiles"] + [::std::mem::offset_of!(AVStreamGroupTileGrid, nb_tiles) - 8usize]; + ["Offset of field: AVStreamGroupTileGrid::coded_width"] + [::std::mem::offset_of!(AVStreamGroupTileGrid, coded_width) - 12usize]; + ["Offset of field: AVStreamGroupTileGrid::coded_height"] + [::std::mem::offset_of!(AVStreamGroupTileGrid, coded_height) - 16usize]; + ["Offset of field: AVStreamGroupTileGrid::offsets"] + [::std::mem::offset_of!(AVStreamGroupTileGrid, offsets) - 24usize]; + ["Offset of field: AVStreamGroupTileGrid::background"] + [::std::mem::offset_of!(AVStreamGroupTileGrid, background) - 32usize]; + ["Offset of field: AVStreamGroupTileGrid::horizontal_offset"] + [::std::mem::offset_of!(AVStreamGroupTileGrid, horizontal_offset) - 36usize]; + ["Offset of field: AVStreamGroupTileGrid::vertical_offset"] + [::std::mem::offset_of!(AVStreamGroupTileGrid, vertical_offset) - 40usize]; + ["Offset of field: AVStreamGroupTileGrid::width"] + [::std::mem::offset_of!(AVStreamGroupTileGrid, width) - 44usize]; + ["Offset of field: AVStreamGroupTileGrid::height"] + [::std::mem::offset_of!(AVStreamGroupTileGrid, height) - 48usize]; +}; +pub const AV_STREAM_GROUP_PARAMS_NONE: AVStreamGroupParamsType = 0; +pub const AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT: AVStreamGroupParamsType = 1; +pub const AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION: AVStreamGroupParamsType = 2; +pub const AV_STREAM_GROUP_PARAMS_TILE_GRID: AVStreamGroupParamsType = 3; +pub type AVStreamGroupParamsType = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AVIAMFAudioElement { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AVIAMFMixPresentation { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct AVStreamGroup { + #[doc = " A class for @ref avoptions. Set by avformat_stream_group_create()."] + pub av_class: *const AVClass, + pub priv_data: *mut ::std::os::raw::c_void, + #[doc = " Group index in AVFormatContext."] + pub index: ::std::os::raw::c_uint, + #[doc = " Group type-specific group ID.\n\n decoding: set by libavformat\n encoding: may set by the user"] + pub id: i64, + #[doc = " Group type\n\n decoding: set by libavformat on group creation\n encoding: set by avformat_stream_group_create()"] + pub type_: AVStreamGroupParamsType, + pub params: AVStreamGroup__bindgen_ty_1, + #[doc = " Metadata that applies to the whole group.\n\n - demuxing: set by libavformat on group creation\n - muxing: may be set by the caller before avformat_write_header()\n\n Freed by libavformat in avformat_free_context()."] + pub metadata: *mut AVDictionary, + #[doc = " Number of elements in AVStreamGroup.streams.\n\n Set by avformat_stream_group_add_stream() must not be modified by any other code."] + pub nb_streams: ::std::os::raw::c_uint, + #[doc = " A list of streams in the group. New entries are created with\n avformat_stream_group_add_stream().\n\n - demuxing: entries are created by libavformat on group creation.\n If AVFMTCTX_NOHEADER is set in ctx_flags, then new entries may also\n appear in av_read_frame().\n - muxing: entries are created by the user before avformat_write_header().\n\n Freed by libavformat in avformat_free_context()."] + pub streams: *mut *mut AVStream, + #[doc = " Stream group disposition - a combination of AV_DISPOSITION_* flags.\n This field currently applies to all defined AVStreamGroupParamsType.\n\n - demuxing: set by libavformat when creating the group or in\n avformat_find_stream_info().\n - muxing: may be set by the caller before avformat_write_header()."] + pub disposition: ::std::os::raw::c_int, +} +#[doc = " Group type-specific parameters"] +#[repr(C)] +#[derive(Copy, Clone)] +pub union AVStreamGroup__bindgen_ty_1 { + pub iamf_audio_element: *mut AVIAMFAudioElement, + pub iamf_mix_presentation: *mut AVIAMFMixPresentation, + pub tile_grid: *mut AVStreamGroupTileGrid, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVStreamGroup__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of AVStreamGroup__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AVStreamGroup__bindgen_ty_1::iamf_audio_element"] + [::std::mem::offset_of!(AVStreamGroup__bindgen_ty_1, iamf_audio_element) - 0usize]; + ["Offset of field: AVStreamGroup__bindgen_ty_1::iamf_mix_presentation"] + [::std::mem::offset_of!(AVStreamGroup__bindgen_ty_1, iamf_mix_presentation) - 0usize]; + ["Offset of field: AVStreamGroup__bindgen_ty_1::tile_grid"] + [::std::mem::offset_of!(AVStreamGroup__bindgen_ty_1, tile_grid) - 0usize]; +}; +impl ::std::fmt::Debug for AVStreamGroup__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "AVStreamGroup__bindgen_ty_1 {{ union }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVStreamGroup"][::std::mem::size_of::() - 80usize]; + ["Alignment of AVStreamGroup"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVStreamGroup::av_class"] + [::std::mem::offset_of!(AVStreamGroup, av_class) - 0usize]; + ["Offset of field: AVStreamGroup::priv_data"] + [::std::mem::offset_of!(AVStreamGroup, priv_data) - 8usize]; + ["Offset of field: AVStreamGroup::index"] + [::std::mem::offset_of!(AVStreamGroup, index) - 16usize]; + ["Offset of field: AVStreamGroup::id"][::std::mem::offset_of!(AVStreamGroup, id) - 24usize]; + ["Offset of field: AVStreamGroup::type_"] + [::std::mem::offset_of!(AVStreamGroup, type_) - 32usize]; + ["Offset of field: AVStreamGroup::params"] + [::std::mem::offset_of!(AVStreamGroup, params) - 40usize]; + ["Offset of field: AVStreamGroup::metadata"] + [::std::mem::offset_of!(AVStreamGroup, metadata) - 48usize]; + ["Offset of field: AVStreamGroup::nb_streams"] + [::std::mem::offset_of!(AVStreamGroup, nb_streams) - 56usize]; + ["Offset of field: AVStreamGroup::streams"] + [::std::mem::offset_of!(AVStreamGroup, streams) - 64usize]; + ["Offset of field: AVStreamGroup::disposition"] + [::std::mem::offset_of!(AVStreamGroup, disposition) - 72usize]; +}; +impl ::std::fmt::Debug for AVStreamGroup { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write ! (f , "AVStreamGroup {{ av_class: {:?}, priv_data: {:?}, index: {:?}, id: {:?}, type: {:?}, params: {:?}, metadata: {:?}, nb_streams: {:?}, streams: {:?}, disposition: {:?} }}" , self . av_class , self . priv_data , self . index , self . id , self . type_ , self . params , self . metadata , self . nb_streams , self . streams , self . disposition) + } } extern "C" { - #[doc = " Returns the pts of the last muxed packet + its duration\n\n the retuned value is undefined when used with a demuxer."] - pub fn av_stream_get_end_pts(st: *const AVStream) -> i64; + pub fn av_stream_get_parser(s: *const AVStream) -> *mut AVCodecParserContext; } #[doc = " New fields can be added to the end with minor version bumps.\n Removal, reordering and changes to existing fields require a major\n version bump.\n sizeof(AVProgram) must not be used outside libav*."] #[repr(C)] @@ -19386,161 +12330,32 @@ pub struct AVProgram { #[doc = "< behavior on wrap detection"] pub pts_wrap_behavior: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVProgram() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(AVProgram)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVProgram)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVProgram), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVProgram), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).discard) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVProgram), - "::", - stringify!(discard) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).stream_index) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVProgram), - "::", - stringify!(stream_index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_stream_indexes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVProgram), - "::", - stringify!(nb_stream_indexes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metadata) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVProgram), - "::", - stringify!(metadata) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).program_num) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVProgram), - "::", - stringify!(program_num) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pmt_pid) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(AVProgram), - "::", - stringify!(pmt_pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pcr_pid) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVProgram), - "::", - stringify!(pcr_pid) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pmt_version) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(AVProgram), - "::", - stringify!(pmt_version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start_time) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVProgram), - "::", - stringify!(start_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).end_time) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVProgram), - "::", - stringify!(end_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pts_wrap_reference) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVProgram), - "::", - stringify!(pts_wrap_reference) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pts_wrap_behavior) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVProgram), - "::", - stringify!(pts_wrap_behavior) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVProgram"][::std::mem::size_of::() - 88usize]; + ["Alignment of AVProgram"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVProgram::id"][::std::mem::offset_of!(AVProgram, id) - 0usize]; + ["Offset of field: AVProgram::flags"][::std::mem::offset_of!(AVProgram, flags) - 4usize]; + ["Offset of field: AVProgram::discard"][::std::mem::offset_of!(AVProgram, discard) - 8usize]; + ["Offset of field: AVProgram::stream_index"] + [::std::mem::offset_of!(AVProgram, stream_index) - 16usize]; + ["Offset of field: AVProgram::nb_stream_indexes"] + [::std::mem::offset_of!(AVProgram, nb_stream_indexes) - 24usize]; + ["Offset of field: AVProgram::metadata"][::std::mem::offset_of!(AVProgram, metadata) - 32usize]; + ["Offset of field: AVProgram::program_num"] + [::std::mem::offset_of!(AVProgram, program_num) - 40usize]; + ["Offset of field: AVProgram::pmt_pid"][::std::mem::offset_of!(AVProgram, pmt_pid) - 44usize]; + ["Offset of field: AVProgram::pcr_pid"][::std::mem::offset_of!(AVProgram, pcr_pid) - 48usize]; + ["Offset of field: AVProgram::pmt_version"] + [::std::mem::offset_of!(AVProgram, pmt_version) - 52usize]; + ["Offset of field: AVProgram::start_time"] + [::std::mem::offset_of!(AVProgram, start_time) - 56usize]; + ["Offset of field: AVProgram::end_time"][::std::mem::offset_of!(AVProgram, end_time) - 64usize]; + ["Offset of field: AVProgram::pts_wrap_reference"] + [::std::mem::offset_of!(AVProgram, pts_wrap_reference) - 72usize]; + ["Offset of field: AVProgram::pts_wrap_behavior"] + [::std::mem::offset_of!(AVProgram, pts_wrap_behavior) - 80usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AVChapter { @@ -19554,71 +12369,17 @@ pub struct AVChapter { pub end: i64, pub metadata: *mut AVDictionary, } -#[test] -fn bindgen_test_layout_AVChapter() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(AVChapter)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVChapter)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVChapter), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).time_base) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVChapter), - "::", - stringify!(time_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVChapter), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).end) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVChapter), - "::", - stringify!(end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metadata) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVChapter), - "::", - stringify!(metadata) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVChapter"][::std::mem::size_of::() - 40usize]; + ["Alignment of AVChapter"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVChapter::id"][::std::mem::offset_of!(AVChapter, id) - 0usize]; + ["Offset of field: AVChapter::time_base"] + [::std::mem::offset_of!(AVChapter, time_base) - 8usize]; + ["Offset of field: AVChapter::start"][::std::mem::offset_of!(AVChapter, start) - 16usize]; + ["Offset of field: AVChapter::end"][::std::mem::offset_of!(AVChapter, end) - 24usize]; + ["Offset of field: AVChapter::metadata"][::std::mem::offset_of!(AVChapter, metadata) - 32usize]; +}; #[doc = " Callback used by devices to communicate with application."] pub type av_format_control_message = ::std::option::Option< unsafe extern "C" fn( @@ -19666,6 +12427,13 @@ pub struct AVFormatContext { pub nb_streams: ::std::os::raw::c_uint, #[doc = " A list of all streams in the file. New streams are created with\n avformat_new_stream().\n\n - demuxing: streams are created by libavformat in avformat_open_input().\n If AVFMTCTX_NOHEADER is set in ctx_flags, then new streams may also\n appear in av_read_frame().\n - muxing: streams are created by the user before avformat_write_header().\n\n Freed by libavformat in avformat_free_context()."] pub streams: *mut *mut AVStream, + #[doc = " Number of elements in AVFormatContext.stream_groups.\n\n Set by avformat_stream_group_create(), must not be modified by any other code."] + pub nb_stream_groups: ::std::os::raw::c_uint, + #[doc = " A list of all stream groups in the file. New groups are created with\n avformat_stream_group_create(), and filled with avformat_stream_group_add_stream().\n\n - demuxing: groups may be created by libavformat in avformat_open_input().\n If AVFMTCTX_NOHEADER is set in ctx_flags, then new groups may also\n appear in av_read_frame().\n - muxing: groups may be created by the user before avformat_write_header().\n\n Freed by libavformat in avformat_free_context()."] + pub stream_groups: *mut *mut AVStreamGroup, + #[doc = " Number of chapters in AVChapter array.\n When muxing, chapters are normally written in the file header,\n so nb_chapters should normally be initialized before write_header\n is called. Some muxers (e.g. mov and mkv) can also write chapters\n in the trailer. To write chapters in the trailer, nb_chapters\n must be zero when write_header is called and non-zero when\n write_trailer is called.\n - muxing: set by user\n - demuxing: set by libavformat"] + pub nb_chapters: ::std::os::raw::c_uint, + pub chapters: *mut *mut AVChapter, #[doc = " input or output URL. Unlike the old filename field, this field has no\n length restriction.\n\n - demuxing: set by avformat_open_input(), initialized to an empty\n string if url parameter was NULL in avformat_open_input().\n - muxing: may be set by the caller before calling avformat_write_header()\n (or avformat_init_output() if that is called first) to a string\n which is freeable by av_free(). Set to an empty string if it\n was NULL in avformat_init_output().\n\n Freed by libavformat in avformat_free_context()."] pub url: *mut ::std::os::raw::c_char, #[doc = " Position of the first frame of the component, in\n AV_TIME_BASE fractional seconds. NEVER set this value directly:\n It is deduced from the AVStream values.\n\n Demuxing only, set by libavformat."] @@ -19692,13 +12460,8 @@ pub struct AVFormatContext { pub audio_codec_id: AVCodecID, #[doc = " Forced subtitle codec_id.\n Demuxing: Set by user."] pub subtitle_codec_id: AVCodecID, - #[doc = " Maximum amount of memory in bytes to use for the index of each stream.\n If the index exceeds this size, entries will be discarded as\n needed to maintain a smaller size. This can lead to slower or less\n accurate seeking (depends on demuxer).\n Demuxers for which a full in-memory index is mandatory will ignore\n this.\n - muxing: unused\n - demuxing: set by user"] - pub max_index_size: ::std::os::raw::c_uint, - #[doc = " Maximum amount of memory in bytes to use for buffering frames\n obtained from realtime capture devices."] - pub max_picture_buffer: ::std::os::raw::c_uint, - #[doc = " Number of chapters in AVChapter array.\n When muxing, chapters are normally written in the file header,\n so nb_chapters should normally be initialized before write_header\n is called. Some muxers (e.g. mov and mkv) can also write chapters\n in the trailer. To write chapters in the trailer, nb_chapters\n must be zero when write_header is called and non-zero when\n write_trailer is called.\n - muxing: set by user\n - demuxing: set by libavformat"] - pub nb_chapters: ::std::os::raw::c_uint, - pub chapters: *mut *mut AVChapter, + #[doc = " Forced Data codec_id.\n Demuxing: Set by user."] + pub data_codec_id: AVCodecID, #[doc = " Metadata that applies to the whole file.\n\n - demuxing: set by libavformat in avformat_open_input()\n - muxing: may be set by the caller before avformat_write_header()\n\n Freed by libavformat in avformat_free_context()."] pub metadata: *mut AVDictionary, #[doc = " Start time of the stream in real world time, in microseconds\n since the Unix epoch (00:00 1st January 1970). That is, pts=0 in the\n stream was captured at this real world time.\n - muxing: Set by the caller before avformat_write_header(). If set to\n either 0 or AV_NOPTS_VALUE, then the current wall-time will\n be used.\n - demuxing: Set by libavformat. AV_NOPTS_VALUE if unknown. Note that\n the value may become known after some number of frames\n have been received."] @@ -19711,26 +12474,34 @@ pub struct AVFormatContext { pub interrupt_callback: AVIOInterruptCB, #[doc = " Flags to enable debugging."] pub debug: ::std::os::raw::c_int, + #[doc = " The maximum number of streams.\n - encoding: unused\n - decoding: set by user"] + pub max_streams: ::std::os::raw::c_int, + #[doc = " Maximum amount of memory in bytes to use for the index of each stream.\n If the index exceeds this size, entries will be discarded as\n needed to maintain a smaller size. This can lead to slower or less\n accurate seeking (depends on demuxer).\n Demuxers for which a full in-memory index is mandatory will ignore\n this.\n - muxing: unused\n - demuxing: set by user"] + pub max_index_size: ::std::os::raw::c_uint, + #[doc = " Maximum amount of memory in bytes to use for buffering frames\n obtained from realtime capture devices."] + pub max_picture_buffer: ::std::os::raw::c_uint, #[doc = " Maximum buffering duration for interleaving.\n\n To ensure all the streams are interleaved correctly,\n av_interleaved_write_frame() will wait until it has at least one packet\n for each stream before actually writing any packets to the output file.\n When some streams are \"sparse\" (i.e. there are large gaps between\n successive packets), this can result in excessive buffering.\n\n This field specifies the maximum difference between the timestamps of the\n first and the last packet in the muxing queue, above which libavformat\n will output a packet regardless of whether it has queued a packet for all\n the streams.\n\n Muxing only, set by the caller before avformat_write_header()."] pub max_interleave_delta: i64, + #[doc = " Maximum number of packets to read while waiting for the first timestamp.\n Decoding only."] + pub max_ts_probe: ::std::os::raw::c_int, + #[doc = " Max chunk time in microseconds.\n Note, not all formats support this and unpredictable things may happen if it is used when not supported.\n - encoding: Set by user\n - decoding: unused"] + pub max_chunk_duration: ::std::os::raw::c_int, + #[doc = " Max chunk size in bytes\n Note, not all formats support this and unpredictable things may happen if it is used when not supported.\n - encoding: Set by user\n - decoding: unused"] + pub max_chunk_size: ::std::os::raw::c_int, + #[doc = " Maximum number of packets that can be probed\n - encoding: unused\n - decoding: set by user"] + pub max_probe_packets: ::std::os::raw::c_int, #[doc = " Allow non-standard and experimental extension\n @see AVCodecContext.strict_std_compliance"] pub strict_std_compliance: ::std::os::raw::c_int, #[doc = " Flags indicating events happening on the file, a combination of\n AVFMT_EVENT_FLAG_*.\n\n - demuxing: may be set by the demuxer in avformat_open_input(),\n avformat_find_stream_info() and av_read_frame(). Flags must be cleared\n by the user once the event has been handled.\n - muxing: may be set by the user after avformat_write_header() to\n indicate a user-triggered event. The muxer will clear the flags for\n events it has handled in av_[interleaved]_write_frame()."] pub event_flags: ::std::os::raw::c_int, - #[doc = " Maximum number of packets to read while waiting for the first timestamp.\n Decoding only."] - pub max_ts_probe: ::std::os::raw::c_int, #[doc = " Avoid negative timestamps during muxing.\n Any value of the AVFMT_AVOID_NEG_TS_* constants.\n Note, this works better when using av_interleaved_write_frame().\n - muxing: Set by user\n - demuxing: unused"] pub avoid_negative_ts: ::std::os::raw::c_int, - #[doc = " Transport stream id.\n This will be moved into demuxer private options. Thus no API/ABI compatibility"] - pub ts_id: ::std::os::raw::c_int, #[doc = " Audio preload in microseconds.\n Note, not all formats support this and unpredictable things may happen if it is used when not supported.\n - encoding: Set by user\n - decoding: unused"] pub audio_preload: ::std::os::raw::c_int, - #[doc = " Max chunk time in microseconds.\n Note, not all formats support this and unpredictable things may happen if it is used when not supported.\n - encoding: Set by user\n - decoding: unused"] - pub max_chunk_duration: ::std::os::raw::c_int, - #[doc = " Max chunk size in bytes\n Note, not all formats support this and unpredictable things may happen if it is used when not supported.\n - encoding: Set by user\n - decoding: unused"] - pub max_chunk_size: ::std::os::raw::c_int, #[doc = " forces the use of wallclock timestamps as pts/dts of packets\n This has undefined results in the presence of B frames.\n - encoding: unused\n - decoding: Set by user"] pub use_wallclock_as_timestamps: ::std::os::raw::c_int, + #[doc = " Skip duration calcuation in estimate_timings_from_pts.\n - encoding: unused\n - decoding: set by user"] + pub skip_estimate_duration_from_pts: ::std::os::raw::c_int, #[doc = " avio flags, used to force AVIO_FLAG_DIRECT.\n - encoding: unused\n - decoding: Set by user"] pub avio_flags: ::std::os::raw::c_int, #[doc = " The duration field can be estimated through various ways, and this field can be used\n to know how the duration was estimated.\n - encoding: unused\n - decoding: Read by user"] @@ -19751,6 +12522,10 @@ pub struct AVFormatContext { pub codec_whitelist: *mut ::std::os::raw::c_char, #[doc = " ',' separated list of allowed demuxers.\n If NULL then all are allowed\n - encoding: unused\n - decoding: set by user"] pub format_whitelist: *mut ::std::os::raw::c_char, + #[doc = " ',' separated list of allowed protocols.\n - encoding: unused\n - decoding: set by user"] + pub protocol_whitelist: *mut ::std::os::raw::c_char, + #[doc = " ',' separated list of disallowed protocols.\n - encoding: unused\n - decoding: set by user"] + pub protocol_blacklist: *mut ::std::os::raw::c_char, #[doc = " IO repositioned flag.\n This is set by avformat when the underlaying IO context read pointer\n is repositioned, for example when doing byte based seeking.\n Demuxers can use the flag to detect such changes."] pub io_repositioned: ::std::os::raw::c_int, #[doc = " Forced video codec.\n This allows forcing a specific decoder, even when there are multiple with\n the same codec_id.\n Demuxing: Set by user"] @@ -19761,7 +12536,7 @@ pub struct AVFormatContext { pub subtitle_codec: *const AVCodec, #[doc = " Forced data codec.\n This allows forcing a specific decoder, even when there are multiple with\n the same codec_id.\n Demuxing: Set by user"] pub data_codec: *const AVCodec, - #[doc = " Number of bytes to be written as padding in a metadata header.\n Demuxing: Unused.\n Muxing: Set by user via av_format_set_metadata_header_padding."] + #[doc = " Number of bytes to be written as padding in a metadata header.\n Demuxing: Unused.\n Muxing: Set by user."] pub metadata_header_padding: ::std::os::raw::c_int, #[doc = " User data.\n This is a place for some private data of the user."] pub opaque: *mut ::std::os::raw::c_void, @@ -19771,10 +12546,6 @@ pub struct AVFormatContext { pub output_ts_offset: i64, #[doc = " dump format separator.\n can be \", \" or \"\\n \" or anything else\n - muxing: Set by user.\n - demuxing: Set by user."] pub dump_separator: *mut u8, - #[doc = " Forced Data codec_id.\n Demuxing: Set by user."] - pub data_codec_id: AVCodecID, - #[doc = " ',' separated list of allowed protocols.\n - encoding: unused\n - decoding: set by user"] - pub protocol_whitelist: *mut ::std::os::raw::c_char, #[doc = " A callback for opening new IO streams.\n\n Whenever a muxer or a demuxer needs to open an IO stream (typically from\n avformat_open_input() for demuxers, but for certain formats can happen at\n other times as well), it will call this callback to obtain an IO context.\n\n @param s the format context\n @param pb on success, the newly opened IO context should be returned here\n @param url the url to open\n @param flags a combination of AVIO_FLAG_*\n @param options a dictionary of additional options, with the same\n semantics as in avio_open2()\n @return 0 on success, a negative AVERROR code on failure\n\n @note Certain muxers and demuxers do nesting, i.e. they open one or more\n additional internal format contexts. Thus the AVFormatContext pointer\n passed to this callback may be different from the one facing the caller.\n It will, however, have the same 'opaque' field."] pub io_open: ::std::option::Option< unsafe extern "C" fn( @@ -19785,17 +12556,6 @@ pub struct AVFormatContext { options: *mut *mut AVDictionary, ) -> ::std::os::raw::c_int, >, - #[doc = " A callback for closing the streams opened with AVFormatContext.io_open().\n\n @deprecated use io_close2"] - pub io_close: - ::std::option::Option, - #[doc = " ',' separated list of disallowed protocols.\n - encoding: unused\n - decoding: set by user"] - pub protocol_blacklist: *mut ::std::os::raw::c_char, - #[doc = " The maximum number of streams.\n - encoding: unused\n - decoding: set by user"] - pub max_streams: ::std::os::raw::c_int, - #[doc = " Skip duration calcuation in estimate_timings_from_pts.\n - encoding: unused\n - decoding: set by user"] - pub skip_estimate_duration_from_pts: ::std::os::raw::c_int, - #[doc = " Maximum number of packets that can be probed\n - encoding: unused\n - decoding: set by user"] - pub max_probe_packets: ::std::os::raw::c_int, #[doc = " A callback for closing the streams opened with AVFormatContext.io_open().\n\n Using this is preferred over io_close, because this can return an error.\n Therefore this callback is used instead of io_close by the generic\n libavformat code if io_close is NULL or the default.\n\n @param s the format context\n @param pb IO context to be closed and freed\n @return 0 on success, a negative AVERROR code on failure"] pub io_close2: ::std::option::Option< unsafe extern "C" fn( @@ -19804,759 +12564,162 @@ pub struct AVFormatContext { ) -> ::std::os::raw::c_int, >, } -#[test] -fn bindgen_test_layout_AVFormatContext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 472usize, - concat!("Size of: ", stringify!(AVFormatContext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVFormatContext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).av_class) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(av_class) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iformat) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(iformat) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).oformat) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(oformat) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priv_data) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(priv_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pb) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(pb) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ctx_flags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(ctx_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_streams) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(nb_streams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).streams) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(streams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).url) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(url) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start_time) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(start_time) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).duration) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(duration) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bit_rate) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(bit_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).packet_size) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(packet_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_delay) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(max_delay) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).probesize) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(probesize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_analyze_duration) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(max_analyze_duration) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).keylen) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(keylen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_programs) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(nb_programs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).programs) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(programs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).video_codec_id) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(video_codec_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).audio_codec_id) as usize - ptr as usize }, - 148usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(audio_codec_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).subtitle_codec_id) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(subtitle_codec_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_index_size) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(max_index_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_picture_buffer) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(max_picture_buffer) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_chapters) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(nb_chapters) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chapters) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(chapters) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metadata) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(metadata) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start_time_realtime) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(start_time_realtime) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fps_probe_size) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(fps_probe_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).error_recognition) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(error_recognition) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).interrupt_callback) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(interrupt_callback) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).debug) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(debug) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_interleave_delta) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(max_interleave_delta) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).strict_std_compliance) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(strict_std_compliance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).event_flags) as usize - ptr as usize }, - 236usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(event_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_ts_probe) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(max_ts_probe) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).avoid_negative_ts) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(avoid_negative_ts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ts_id) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(ts_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).audio_preload) as usize - ptr as usize }, - 252usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(audio_preload) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_chunk_duration) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(max_chunk_duration) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_chunk_size) as usize - ptr as usize }, - 260usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(max_chunk_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).use_wallclock_as_timestamps) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(use_wallclock_as_timestamps) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).avio_flags) as usize - ptr as usize }, - 268usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(avio_flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).duration_estimation_method) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(duration_estimation_method) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).skip_initial_bytes) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(skip_initial_bytes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).correct_ts_overflow) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(correct_ts_overflow) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).seek2any) as usize - ptr as usize }, - 292usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(seek2any) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flush_packets) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(flush_packets) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).probe_score) as usize - ptr as usize }, - 300usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(probe_score) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format_probesize) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(format_probesize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).codec_whitelist) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(codec_whitelist) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format_whitelist) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(format_whitelist) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).io_repositioned) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(io_repositioned) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).video_codec) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(video_codec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).audio_codec) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(audio_codec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).subtitle_codec) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(subtitle_codec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data_codec) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(data_codec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).metadata_header_padding) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(metadata_header_padding) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(opaque) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).control_message_cb) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(control_message_cb) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).output_ts_offset) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(output_ts_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dump_separator) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(dump_separator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data_codec_id) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(data_codec_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).protocol_whitelist) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(protocol_whitelist) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).io_open) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(io_open) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).io_close) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(io_close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).protocol_blacklist) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(protocol_blacklist) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_streams) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(max_streams) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).skip_estimate_duration_from_pts) as usize - ptr as usize - }, - 452usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(skip_estimate_duration_from_pts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_probe_packets) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(max_probe_packets) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).io_close2) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(AVFormatContext), - "::", - stringify!(io_close2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFormatContext"][::std::mem::size_of::() - 464usize]; + ["Alignment of AVFormatContext"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVFormatContext::av_class"] + [::std::mem::offset_of!(AVFormatContext, av_class) - 0usize]; + ["Offset of field: AVFormatContext::iformat"] + [::std::mem::offset_of!(AVFormatContext, iformat) - 8usize]; + ["Offset of field: AVFormatContext::oformat"] + [::std::mem::offset_of!(AVFormatContext, oformat) - 16usize]; + ["Offset of field: AVFormatContext::priv_data"] + [::std::mem::offset_of!(AVFormatContext, priv_data) - 24usize]; + ["Offset of field: AVFormatContext::pb"][::std::mem::offset_of!(AVFormatContext, pb) - 32usize]; + ["Offset of field: AVFormatContext::ctx_flags"] + [::std::mem::offset_of!(AVFormatContext, ctx_flags) - 40usize]; + ["Offset of field: AVFormatContext::nb_streams"] + [::std::mem::offset_of!(AVFormatContext, nb_streams) - 44usize]; + ["Offset of field: AVFormatContext::streams"] + [::std::mem::offset_of!(AVFormatContext, streams) - 48usize]; + ["Offset of field: AVFormatContext::nb_stream_groups"] + [::std::mem::offset_of!(AVFormatContext, nb_stream_groups) - 56usize]; + ["Offset of field: AVFormatContext::stream_groups"] + [::std::mem::offset_of!(AVFormatContext, stream_groups) - 64usize]; + ["Offset of field: AVFormatContext::nb_chapters"] + [::std::mem::offset_of!(AVFormatContext, nb_chapters) - 72usize]; + ["Offset of field: AVFormatContext::chapters"] + [::std::mem::offset_of!(AVFormatContext, chapters) - 80usize]; + ["Offset of field: AVFormatContext::url"] + [::std::mem::offset_of!(AVFormatContext, url) - 88usize]; + ["Offset of field: AVFormatContext::start_time"] + [::std::mem::offset_of!(AVFormatContext, start_time) - 96usize]; + ["Offset of field: AVFormatContext::duration"] + [::std::mem::offset_of!(AVFormatContext, duration) - 104usize]; + ["Offset of field: AVFormatContext::bit_rate"] + [::std::mem::offset_of!(AVFormatContext, bit_rate) - 112usize]; + ["Offset of field: AVFormatContext::packet_size"] + [::std::mem::offset_of!(AVFormatContext, packet_size) - 120usize]; + ["Offset of field: AVFormatContext::max_delay"] + [::std::mem::offset_of!(AVFormatContext, max_delay) - 124usize]; + ["Offset of field: AVFormatContext::flags"] + [::std::mem::offset_of!(AVFormatContext, flags) - 128usize]; + ["Offset of field: AVFormatContext::probesize"] + [::std::mem::offset_of!(AVFormatContext, probesize) - 136usize]; + ["Offset of field: AVFormatContext::max_analyze_duration"] + [::std::mem::offset_of!(AVFormatContext, max_analyze_duration) - 144usize]; + ["Offset of field: AVFormatContext::key"] + [::std::mem::offset_of!(AVFormatContext, key) - 152usize]; + ["Offset of field: AVFormatContext::keylen"] + [::std::mem::offset_of!(AVFormatContext, keylen) - 160usize]; + ["Offset of field: AVFormatContext::nb_programs"] + [::std::mem::offset_of!(AVFormatContext, nb_programs) - 164usize]; + ["Offset of field: AVFormatContext::programs"] + [::std::mem::offset_of!(AVFormatContext, programs) - 168usize]; + ["Offset of field: AVFormatContext::video_codec_id"] + [::std::mem::offset_of!(AVFormatContext, video_codec_id) - 176usize]; + ["Offset of field: AVFormatContext::audio_codec_id"] + [::std::mem::offset_of!(AVFormatContext, audio_codec_id) - 180usize]; + ["Offset of field: AVFormatContext::subtitle_codec_id"] + [::std::mem::offset_of!(AVFormatContext, subtitle_codec_id) - 184usize]; + ["Offset of field: AVFormatContext::data_codec_id"] + [::std::mem::offset_of!(AVFormatContext, data_codec_id) - 188usize]; + ["Offset of field: AVFormatContext::metadata"] + [::std::mem::offset_of!(AVFormatContext, metadata) - 192usize]; + ["Offset of field: AVFormatContext::start_time_realtime"] + [::std::mem::offset_of!(AVFormatContext, start_time_realtime) - 200usize]; + ["Offset of field: AVFormatContext::fps_probe_size"] + [::std::mem::offset_of!(AVFormatContext, fps_probe_size) - 208usize]; + ["Offset of field: AVFormatContext::error_recognition"] + [::std::mem::offset_of!(AVFormatContext, error_recognition) - 212usize]; + ["Offset of field: AVFormatContext::interrupt_callback"] + [::std::mem::offset_of!(AVFormatContext, interrupt_callback) - 216usize]; + ["Offset of field: AVFormatContext::debug"] + [::std::mem::offset_of!(AVFormatContext, debug) - 232usize]; + ["Offset of field: AVFormatContext::max_streams"] + [::std::mem::offset_of!(AVFormatContext, max_streams) - 236usize]; + ["Offset of field: AVFormatContext::max_index_size"] + [::std::mem::offset_of!(AVFormatContext, max_index_size) - 240usize]; + ["Offset of field: AVFormatContext::max_picture_buffer"] + [::std::mem::offset_of!(AVFormatContext, max_picture_buffer) - 244usize]; + ["Offset of field: AVFormatContext::max_interleave_delta"] + [::std::mem::offset_of!(AVFormatContext, max_interleave_delta) - 248usize]; + ["Offset of field: AVFormatContext::max_ts_probe"] + [::std::mem::offset_of!(AVFormatContext, max_ts_probe) - 256usize]; + ["Offset of field: AVFormatContext::max_chunk_duration"] + [::std::mem::offset_of!(AVFormatContext, max_chunk_duration) - 260usize]; + ["Offset of field: AVFormatContext::max_chunk_size"] + [::std::mem::offset_of!(AVFormatContext, max_chunk_size) - 264usize]; + ["Offset of field: AVFormatContext::max_probe_packets"] + [::std::mem::offset_of!(AVFormatContext, max_probe_packets) - 268usize]; + ["Offset of field: AVFormatContext::strict_std_compliance"] + [::std::mem::offset_of!(AVFormatContext, strict_std_compliance) - 272usize]; + ["Offset of field: AVFormatContext::event_flags"] + [::std::mem::offset_of!(AVFormatContext, event_flags) - 276usize]; + ["Offset of field: AVFormatContext::avoid_negative_ts"] + [::std::mem::offset_of!(AVFormatContext, avoid_negative_ts) - 280usize]; + ["Offset of field: AVFormatContext::audio_preload"] + [::std::mem::offset_of!(AVFormatContext, audio_preload) - 284usize]; + ["Offset of field: AVFormatContext::use_wallclock_as_timestamps"] + [::std::mem::offset_of!(AVFormatContext, use_wallclock_as_timestamps) - 288usize]; + ["Offset of field: AVFormatContext::skip_estimate_duration_from_pts"] + [::std::mem::offset_of!(AVFormatContext, skip_estimate_duration_from_pts) - 292usize]; + ["Offset of field: AVFormatContext::avio_flags"] + [::std::mem::offset_of!(AVFormatContext, avio_flags) - 296usize]; + ["Offset of field: AVFormatContext::duration_estimation_method"] + [::std::mem::offset_of!(AVFormatContext, duration_estimation_method) - 300usize]; + ["Offset of field: AVFormatContext::skip_initial_bytes"] + [::std::mem::offset_of!(AVFormatContext, skip_initial_bytes) - 304usize]; + ["Offset of field: AVFormatContext::correct_ts_overflow"] + [::std::mem::offset_of!(AVFormatContext, correct_ts_overflow) - 312usize]; + ["Offset of field: AVFormatContext::seek2any"] + [::std::mem::offset_of!(AVFormatContext, seek2any) - 316usize]; + ["Offset of field: AVFormatContext::flush_packets"] + [::std::mem::offset_of!(AVFormatContext, flush_packets) - 320usize]; + ["Offset of field: AVFormatContext::probe_score"] + [::std::mem::offset_of!(AVFormatContext, probe_score) - 324usize]; + ["Offset of field: AVFormatContext::format_probesize"] + [::std::mem::offset_of!(AVFormatContext, format_probesize) - 328usize]; + ["Offset of field: AVFormatContext::codec_whitelist"] + [::std::mem::offset_of!(AVFormatContext, codec_whitelist) - 336usize]; + ["Offset of field: AVFormatContext::format_whitelist"] + [::std::mem::offset_of!(AVFormatContext, format_whitelist) - 344usize]; + ["Offset of field: AVFormatContext::protocol_whitelist"] + [::std::mem::offset_of!(AVFormatContext, protocol_whitelist) - 352usize]; + ["Offset of field: AVFormatContext::protocol_blacklist"] + [::std::mem::offset_of!(AVFormatContext, protocol_blacklist) - 360usize]; + ["Offset of field: AVFormatContext::io_repositioned"] + [::std::mem::offset_of!(AVFormatContext, io_repositioned) - 368usize]; + ["Offset of field: AVFormatContext::video_codec"] + [::std::mem::offset_of!(AVFormatContext, video_codec) - 376usize]; + ["Offset of field: AVFormatContext::audio_codec"] + [::std::mem::offset_of!(AVFormatContext, audio_codec) - 384usize]; + ["Offset of field: AVFormatContext::subtitle_codec"] + [::std::mem::offset_of!(AVFormatContext, subtitle_codec) - 392usize]; + ["Offset of field: AVFormatContext::data_codec"] + [::std::mem::offset_of!(AVFormatContext, data_codec) - 400usize]; + ["Offset of field: AVFormatContext::metadata_header_padding"] + [::std::mem::offset_of!(AVFormatContext, metadata_header_padding) - 408usize]; + ["Offset of field: AVFormatContext::opaque"] + [::std::mem::offset_of!(AVFormatContext, opaque) - 416usize]; + ["Offset of field: AVFormatContext::control_message_cb"] + [::std::mem::offset_of!(AVFormatContext, control_message_cb) - 424usize]; + ["Offset of field: AVFormatContext::output_ts_offset"] + [::std::mem::offset_of!(AVFormatContext, output_ts_offset) - 432usize]; + ["Offset of field: AVFormatContext::dump_separator"] + [::std::mem::offset_of!(AVFormatContext, dump_separator) - 440usize]; + ["Offset of field: AVFormatContext::io_open"] + [::std::mem::offset_of!(AVFormatContext, io_open) - 448usize]; + ["Offset of field: AVFormatContext::io_close2"] + [::std::mem::offset_of!(AVFormatContext, io_close2) - 456usize]; +}; extern "C" { #[doc = " This function will cause global side data to be injected in the next packet\n of each stream as well as after any subsequent seek.\n\n @note global side data is always available in every AVStream's\n @ref AVCodecParameters.coded_side_data \"codecpar side data\" array, and\n in a @ref AVCodecContext.coded_side_data \"decoder's side data\" array if\n initialized with said stream's codecpar.\n @see av_packet_side_data_get()"] pub fn av_format_inject_global_side_data(s: *mut AVFormatContext); } extern "C" { - #[doc = " Returns the method used to set ctx->duration.\n\n @return AVFMT_DURATION_FROM_PTS, AVFMT_DURATION_FROM_STREAM, or AVFMT_DURATION_FROM_BITRATE."] + #[doc = " Returns the method used to set ctx->duration.\n\n @return AVFMT_DURATION_FROM_PTS, AVFMT_DURATION_FROM_STREAM, or AVFMT_DURATION_FROM_BITRATE.\n @deprecated duration_estimation_method is public and can be read directly."] pub fn av_fmt_ctx_get_duration_estimation_method( ctx: *const AVFormatContext, ) -> AVDurationEstimationMethod; @@ -20605,10 +12768,35 @@ extern "C" { #[doc = " Get the AVClass for AVStream. It can be used in combination with\n AV_OPT_SEARCH_FAKE_OBJ for examining options.\n\n @see av_opt_find()."] pub fn av_stream_get_class() -> *const AVClass; } +extern "C" { + #[doc = " Get the AVClass for AVStreamGroup. It can be used in combination with\n AV_OPT_SEARCH_FAKE_OBJ for examining options.\n\n @see av_opt_find()."] + pub fn av_stream_group_get_class() -> *const AVClass; +} +extern "C" { + #[doc = " @return a string identifying the stream group type, or NULL if unknown"] + pub fn avformat_stream_group_name( + type_: AVStreamGroupParamsType, + ) -> *const ::std::os::raw::c_char; +} +extern "C" { + #[doc = " Add a new empty stream group to a media file.\n\n When demuxing, it may be called by the demuxer in read_header(). If the\n flag AVFMTCTX_NOHEADER is set in s.ctx_flags, then it may also\n be called in read_packet().\n\n When muxing, may be called by the user before avformat_write_header().\n\n User is required to call avformat_free_context() to clean up the allocation\n by avformat_stream_group_create().\n\n New streams can be added to the group with avformat_stream_group_add_stream().\n\n @param s media file handle\n\n @return newly created group or NULL on error.\n @see avformat_new_stream, avformat_stream_group_add_stream."] + pub fn avformat_stream_group_create( + s: *mut AVFormatContext, + type_: AVStreamGroupParamsType, + options: *mut *mut AVDictionary, + ) -> *mut AVStreamGroup; +} extern "C" { #[doc = " Add a new stream to a media file.\n\n When demuxing, it is called by the demuxer in read_header(). If the\n flag AVFMTCTX_NOHEADER is set in s.ctx_flags, then it may also\n be called in read_packet().\n\n When muxing, should be called by the user before avformat_write_header().\n\n User is required to call avformat_free_context() to clean up the allocation\n by avformat_new_stream().\n\n @param s media file handle\n @param c unused, does nothing\n\n @return newly created stream or NULL on error."] pub fn avformat_new_stream(s: *mut AVFormatContext, c: *const AVCodec) -> *mut AVStream; } +extern "C" { + #[doc = " Add an already allocated stream to a stream group.\n\n When demuxing, it may be called by the demuxer in read_header(). If the\n flag AVFMTCTX_NOHEADER is set in s.ctx_flags, then it may also\n be called in read_packet().\n\n When muxing, may be called by the user before avformat_write_header() after\n having allocated a new group with avformat_stream_group_create() and stream with\n avformat_new_stream().\n\n User is required to call avformat_free_context() to clean up the allocation\n by avformat_stream_group_add_stream().\n\n @param stg stream group belonging to a media file.\n @param st stream in the media file to add to the group.\n\n @retval 0 success\n @retval AVERROR(EEXIST) the stream was already in the group\n @retval \"another negative error code\" legitimate errors\n\n @see avformat_new_stream, avformat_stream_group_create."] + pub fn avformat_stream_group_add_stream( + stg: *mut AVStreamGroup, + st: *mut AVStream, + ) -> ::std::os::raw::c_int; +} extern "C" { #[doc = " Wrap an existing array as stream side data.\n\n @param st stream\n @param type side information type\n @param data the side data array. It must be allocated with the av_malloc()\n family of functions. The ownership of the data is transferred to\n st.\n @param size side information size\n\n @return zero on success, a negative AVERROR code on failure. On failure,\n the stream is unchanged and the data remains owned by the caller.\n @deprecated use av_packet_side_data_add() with the stream's\n @ref AVCodecParameters.coded_side_data \"codecpar side data\""] pub fn av_stream_add_side_data( @@ -21128,61 +13316,16 @@ pub struct AVDeviceRect { #[doc = "< height"] pub height: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVDeviceRect() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AVDeviceRect)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVDeviceRect)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDeviceRect), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVDeviceRect), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVDeviceRect), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVDeviceRect), - "::", - stringify!(height) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDeviceRect"][::std::mem::size_of::() - 16usize]; + ["Alignment of AVDeviceRect"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVDeviceRect::x"][::std::mem::offset_of!(AVDeviceRect, x) - 0usize]; + ["Offset of field: AVDeviceRect::y"][::std::mem::offset_of!(AVDeviceRect, y) - 4usize]; + ["Offset of field: AVDeviceRect::width"][::std::mem::offset_of!(AVDeviceRect, width) - 8usize]; + ["Offset of field: AVDeviceRect::height"] + [::std::mem::offset_of!(AVDeviceRect, height) - 12usize]; +}; #[doc = " Dummy message."] pub const AV_APP_TO_DEV_NONE: AVAppToDevMessageType = 1313820229; #[doc = " Window size change message.\n\n Message is sent to the device every time the application changes the size\n of the window device renders to.\n Message should also be sent right after window is created.\n\n data: AVDeviceRect: new window size."] @@ -21264,61 +13407,19 @@ pub struct AVDeviceInfo { #[doc = "< length of media_types array, 0 if device cannot provide any media types"] pub nb_media_types: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVDeviceInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(AVDeviceInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVDeviceInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).device_name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDeviceInfo), - "::", - stringify!(device_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).device_description) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVDeviceInfo), - "::", - stringify!(device_description) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).media_types) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVDeviceInfo), - "::", - stringify!(media_types) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_media_types) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVDeviceInfo), - "::", - stringify!(nb_media_types) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDeviceInfo"][::std::mem::size_of::() - 32usize]; + ["Alignment of AVDeviceInfo"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVDeviceInfo::device_name"] + [::std::mem::offset_of!(AVDeviceInfo, device_name) - 0usize]; + ["Offset of field: AVDeviceInfo::device_description"] + [::std::mem::offset_of!(AVDeviceInfo, device_description) - 8usize]; + ["Offset of field: AVDeviceInfo::media_types"] + [::std::mem::offset_of!(AVDeviceInfo, media_types) - 16usize]; + ["Offset of field: AVDeviceInfo::nb_media_types"] + [::std::mem::offset_of!(AVDeviceInfo, nb_media_types) - 24usize]; +}; #[doc = " List of devices."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -21330,51 +13431,17 @@ pub struct AVDeviceInfoList { #[doc = "< index of default device or -1 if no default"] pub default_device: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVDeviceInfoList() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AVDeviceInfoList)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVDeviceInfoList)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).devices) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDeviceInfoList), - "::", - stringify!(devices) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_devices) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVDeviceInfoList), - "::", - stringify!(nb_devices) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).default_device) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVDeviceInfoList), - "::", - stringify!(default_device) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDeviceInfoList"][::std::mem::size_of::() - 16usize]; + ["Alignment of AVDeviceInfoList"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVDeviceInfoList::devices"] + [::std::mem::offset_of!(AVDeviceInfoList, devices) - 0usize]; + ["Offset of field: AVDeviceInfoList::nb_devices"] + [::std::mem::offset_of!(AVDeviceInfoList, nb_devices) - 8usize]; + ["Offset of field: AVDeviceInfoList::default_device"] + [::std::mem::offset_of!(AVDeviceInfoList, default_device) - 12usize]; +}; extern "C" { #[doc = " List devices.\n\n Returns available device names and their parameters.\n\n @note: Some devices may accept system-dependent device names that cannot be\n autodetected. The list returned by this function cannot be assumed to\n be always completed.\n\n @param s device context.\n @param[out] device_list list of autodetected devices.\n @return count of autodetected devices, negative on error."] pub fn avdevice_list_devices( @@ -21501,275 +13568,68 @@ pub struct AVFilter { #[repr(C)] #[derive(Copy, Clone)] pub union AVFilter__bindgen_ty_1 { - #[doc = " Query formats supported by the filter on its inputs and outputs.\n\n This callback is called after the filter is initialized (so the inputs\n and outputs are fixed), shortly before the format negotiation. This\n callback may be called more than once.\n\n This callback must set ::AVFilterLink's\n @ref AVFilterFormatsConfig.formats \"outcfg.formats\"\n on every input link and\n @ref AVFilterFormatsConfig.formats \"incfg.formats\"\n on every output link to a list of pixel/sample formats that the filter\n supports on that link.\n For audio links, this filter must also set\n @ref AVFilterFormatsConfig.samplerates \"incfg.samplerates\"\n /\n @ref AVFilterFormatsConfig.samplerates \"outcfg.samplerates\"\n and @ref AVFilterFormatsConfig.channel_layouts \"incfg.channel_layouts\"\n /\n @ref AVFilterFormatsConfig.channel_layouts \"outcfg.channel_layouts\"\n analogously.\n\n This callback must never be NULL if the union is in this state.\n\n @return zero on success, a negative value corresponding to an\n AVERROR code otherwise"] + #[doc = " Query formats supported by the filter on its inputs and outputs.\n\n This callback is called after the filter is initialized (so the inputs\n and outputs are fixed), shortly before the format negotiation. This\n callback may be called more than once.\n\n This callback must set ::AVFilterLink's\n @ref AVFilterFormatsConfig.formats \"outcfg.formats\"\n on every input link and\n @ref AVFilterFormatsConfig.formats \"incfg.formats\"\n on every output link to a list of pixel/sample formats that the filter\n supports on that link.\n For video links, this filter may also set\n @ref AVFilterFormatsConfig.color_spaces \"incfg.color_spaces\"\n /\n @ref AVFilterFormatsConfig.color_spaces \"outcfg.color_spaces\"\n and @ref AVFilterFormatsConfig.color_ranges \"incfg.color_ranges\"\n /\n @ref AVFilterFormatsConfig.color_ranges \"outcfg.color_ranges\"\n analogously.\n For audio links, this filter must also set\n @ref AVFilterFormatsConfig.samplerates \"incfg.samplerates\"\n /\n @ref AVFilterFormatsConfig.samplerates \"outcfg.samplerates\"\n and @ref AVFilterFormatsConfig.channel_layouts \"incfg.channel_layouts\"\n /\n @ref AVFilterFormatsConfig.channel_layouts \"outcfg.channel_layouts\"\n analogously.\n\n This callback must never be NULL if the union is in this state.\n\n @return zero on success, a negative value corresponding to an\n AVERROR code otherwise"] pub query_func: ::std::option::Option< unsafe extern "C" fn(arg1: *mut AVFilterContext) -> ::std::os::raw::c_int, >, - #[doc = " A pointer to an array of admissible pixel formats delimited\n by AV_PIX_FMT_NONE. The generic code will use this list\n to indicate that this filter supports each of these pixel formats,\n provided that all inputs and outputs use the same pixel format.\n\n This list must never be NULL if the union is in this state.\n The type of all inputs and outputs of filters using this must\n be AVMEDIA_TYPE_VIDEO."] + #[doc = " A pointer to an array of admissible pixel formats delimited\n by AV_PIX_FMT_NONE. The generic code will use this list\n to indicate that this filter supports each of these pixel formats,\n provided that all inputs and outputs use the same pixel format.\n\n In addition to that the generic code will mark all inputs\n and all outputs as supporting all color spaces and ranges, as\n long as all inputs and outputs use the same color space/range.\n\n This list must never be NULL if the union is in this state.\n The type of all inputs and outputs of filters using this must\n be AVMEDIA_TYPE_VIDEO."] pub pixels_list: *const AVPixelFormat, #[doc = " Analogous to pixels, but delimited by AV_SAMPLE_FMT_NONE\n and restricted to filters that only have AVMEDIA_TYPE_AUDIO\n inputs and outputs.\n\n In addition to that the generic code will mark all inputs\n and all outputs as supporting all sample rates and every\n channel count and channel layout, as long as all inputs\n and outputs use the same sample rate and channel count/layout."] pub samples_list: *const AVSampleFormat, #[doc = " Equivalent to { pix_fmt, AV_PIX_FMT_NONE } as pixels_list."] pub pix_fmt: AVPixelFormat, #[doc = " Equivalent to { sample_fmt, AV_SAMPLE_FMT_NONE } as samples_list."] - pub sample_fmt: AVSampleFormat, -} -#[test] -fn bindgen_test_layout_AVFilter__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AVFilter__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVFilter__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).query_func) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilter__bindgen_ty_1), - "::", - stringify!(query_func) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pixels_list) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilter__bindgen_ty_1), - "::", - stringify!(pixels_list) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).samples_list) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilter__bindgen_ty_1), - "::", - stringify!(samples_list) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pix_fmt) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilter__bindgen_ty_1), - "::", - stringify!(pix_fmt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sample_fmt) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilter__bindgen_ty_1), - "::", - stringify!(sample_fmt) - ) - ); + pub sample_fmt: AVSampleFormat, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFilter__bindgen_ty_1"][::std::mem::size_of::() - 8usize]; + ["Alignment of AVFilter__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AVFilter__bindgen_ty_1::query_func"] + [::std::mem::offset_of!(AVFilter__bindgen_ty_1, query_func) - 0usize]; + ["Offset of field: AVFilter__bindgen_ty_1::pixels_list"] + [::std::mem::offset_of!(AVFilter__bindgen_ty_1, pixels_list) - 0usize]; + ["Offset of field: AVFilter__bindgen_ty_1::samples_list"] + [::std::mem::offset_of!(AVFilter__bindgen_ty_1, samples_list) - 0usize]; + ["Offset of field: AVFilter__bindgen_ty_1::pix_fmt"] + [::std::mem::offset_of!(AVFilter__bindgen_ty_1, pix_fmt) - 0usize]; + ["Offset of field: AVFilter__bindgen_ty_1::sample_fmt"] + [::std::mem::offset_of!(AVFilter__bindgen_ty_1, sample_fmt) - 0usize]; +}; impl ::std::fmt::Debug for AVFilter__bindgen_ty_1 { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "AVFilter__bindgen_ty_1 {{ union }}") } } -#[test] -fn bindgen_test_layout_AVFilter() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(AVFilter)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVFilter)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilter), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).description) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVFilter), - "::", - stringify!(description) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).inputs) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVFilter), - "::", - stringify!(inputs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).outputs) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVFilter), - "::", - stringify!(outputs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priv_class) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVFilter), - "::", - stringify!(priv_class) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVFilter), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_inputs) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(AVFilter), - "::", - stringify!(nb_inputs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_outputs) as usize - ptr as usize }, - 45usize, - concat!( - "Offset of field: ", - stringify!(AVFilter), - "::", - stringify!(nb_outputs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).formats_state) as usize - ptr as usize }, - 46usize, - concat!( - "Offset of field: ", - stringify!(AVFilter), - "::", - stringify!(formats_state) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).preinit) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVFilter), - "::", - stringify!(preinit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).init) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVFilter), - "::", - stringify!(init) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uninit) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVFilter), - "::", - stringify!(uninit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).formats) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVFilter), - "::", - stringify!(formats) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priv_size) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVFilter), - "::", - stringify!(priv_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags_internal) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(AVFilter), - "::", - stringify!(flags_internal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).process_command) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(AVFilter), - "::", - stringify!(process_command) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).activate) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(AVFilter), - "::", - stringify!(activate) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFilter"][::std::mem::size_of::() - 104usize]; + ["Alignment of AVFilter"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVFilter::name"][::std::mem::offset_of!(AVFilter, name) - 0usize]; + ["Offset of field: AVFilter::description"] + [::std::mem::offset_of!(AVFilter, description) - 8usize]; + ["Offset of field: AVFilter::inputs"][::std::mem::offset_of!(AVFilter, inputs) - 16usize]; + ["Offset of field: AVFilter::outputs"][::std::mem::offset_of!(AVFilter, outputs) - 24usize]; + ["Offset of field: AVFilter::priv_class"] + [::std::mem::offset_of!(AVFilter, priv_class) - 32usize]; + ["Offset of field: AVFilter::flags"][::std::mem::offset_of!(AVFilter, flags) - 40usize]; + ["Offset of field: AVFilter::nb_inputs"][::std::mem::offset_of!(AVFilter, nb_inputs) - 44usize]; + ["Offset of field: AVFilter::nb_outputs"] + [::std::mem::offset_of!(AVFilter, nb_outputs) - 45usize]; + ["Offset of field: AVFilter::formats_state"] + [::std::mem::offset_of!(AVFilter, formats_state) - 46usize]; + ["Offset of field: AVFilter::preinit"][::std::mem::offset_of!(AVFilter, preinit) - 48usize]; + ["Offset of field: AVFilter::init"][::std::mem::offset_of!(AVFilter, init) - 56usize]; + ["Offset of field: AVFilter::uninit"][::std::mem::offset_of!(AVFilter, uninit) - 64usize]; + ["Offset of field: AVFilter::formats"][::std::mem::offset_of!(AVFilter, formats) - 72usize]; + ["Offset of field: AVFilter::priv_size"][::std::mem::offset_of!(AVFilter, priv_size) - 80usize]; + ["Offset of field: AVFilter::flags_internal"] + [::std::mem::offset_of!(AVFilter, flags_internal) - 84usize]; + ["Offset of field: AVFilter::process_command"] + [::std::mem::offset_of!(AVFilter, process_command) - 88usize]; + ["Offset of field: AVFilter::activate"][::std::mem::offset_of!(AVFilter, activate) - 96usize]; +}; impl ::std::fmt::Debug for AVFilter { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write ! (f , "AVFilter {{ name: {:?}, description: {:?}, inputs: {:?}, outputs: {:?}, priv_class: {:?}, flags: {:?}, nb_inputs: {:?}, nb_outputs: {:?}, formats_state: {:?}, preinit: {:?}, init: {:?}, uninit: {:?}, formats: {:?}, priv_size: {:?}, flags_internal: {:?}, process_command: {:?}, activate: {:?} }}" , self . name , self . description , self . inputs , self . outputs , self . priv_class , self . flags , self . nb_inputs , self . nb_outputs , self . formats_state , self . preinit , self . init , self . uninit , self . formats , self . priv_size , self . flags_internal , self . process_command , self . activate) @@ -21782,11 +13642,6 @@ extern "C" { is_output: ::std::os::raw::c_int, ) -> ::std::os::raw::c_uint; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct AVFilterInternal { - _unused: [u8; 0], -} #[doc = " An instance of a filter"] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -21815,8 +13670,8 @@ pub struct AVFilterContext { pub graph: *mut AVFilterGraph, #[doc = " Type of multithreading being allowed/used. A combination of\n AVFILTER_THREAD_* flags.\n\n May be set by the caller before initializing the filter to forbid some\n or all kinds of multithreading for this filter. The default is allowing\n everything.\n\n When the filter is initialized, this field is combined using bit AND with\n AVFilterGraph.thread_type to get the final mask used for determining\n allowed threading types. I.e. a threading type needs to be set in both\n to be allowed.\n\n After the filter is initialized, libavfilter sets this field to the\n threading type that is actually used (0 for no multithreading)."] pub thread_type: ::std::os::raw::c_int, - #[doc = " An opaque struct for libavfilter internal use."] - pub internal: *mut AVFilterInternal, + #[doc = " Max number of threads allowed in this filter instance.\n If <= 0, its value is ignored.\n Overrides global number of threads set per filter graph."] + pub nb_threads: ::std::os::raw::c_int, pub command_queue: *mut AVFilterCommand, #[doc = "< enable expression string"] pub enable_str: *mut ::std::os::raw::c_char, @@ -21828,248 +13683,58 @@ pub struct AVFilterContext { pub is_disabled: ::std::os::raw::c_int, #[doc = " For filters which will create hardware frames, sets the device the\n filter should create them in. All other filters will ignore this field:\n in particular, a filter which consumes or processes hardware frames will\n instead use the hw_frames_ctx field in AVFilterLink to carry the\n hardware context information.\n\n May be set by the caller on filters flagged with AVFILTER_FLAG_HWDEVICE\n before initializing the filter with avfilter_init_str() or\n avfilter_init_dict()."] pub hw_device_ctx: *mut AVBufferRef, - #[doc = " Max number of threads allowed in this filter instance.\n If <= 0, its value is ignored.\n Overrides global number of threads set per filter graph."] - pub nb_threads: ::std::os::raw::c_int, #[doc = " Ready status of the filter.\n A non-0 value means that the filter needs activating;\n a higher value suggests a more urgent activation."] pub ready: ::std::os::raw::c_uint, #[doc = " Sets the number of extra hardware frames which the filter will\n allocate on its output links for use in following filters or by\n the caller.\n\n Some hardware filters require all frames that they will use for\n output to be defined in advance before filtering starts. For such\n filters, any hardware frame pools used for output must therefore be\n of fixed size. The extra frames set here are on top of any number\n that the filter needs internally in order to operate normally.\n\n This field must be set before the graph containing this filter is\n configured."] pub extra_hw_frames: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVFilterContext() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 168usize, - concat!("Size of: ", stringify!(AVFilterContext)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVFilterContext)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).av_class) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(av_class) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).filter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(filter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).input_pads) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(input_pads) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).inputs) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(inputs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_inputs) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(nb_inputs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).output_pads) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(output_pads) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).outputs) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(outputs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_outputs) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(nb_outputs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priv_) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(priv_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).graph) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(graph) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).thread_type) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(thread_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).internal) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(internal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).command_queue) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(command_queue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).enable_str) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(enable_str) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).enable) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(enable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).var_values) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(var_values) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).is_disabled) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(is_disabled) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hw_device_ctx) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(hw_device_ctx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_threads) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(nb_threads) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ready) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(ready) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extra_hw_frames) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(AVFilterContext), - "::", - stringify!(extra_hw_frames) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFilterContext"][::std::mem::size_of::() - 152usize]; + ["Alignment of AVFilterContext"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVFilterContext::av_class"] + [::std::mem::offset_of!(AVFilterContext, av_class) - 0usize]; + ["Offset of field: AVFilterContext::filter"] + [::std::mem::offset_of!(AVFilterContext, filter) - 8usize]; + ["Offset of field: AVFilterContext::name"] + [::std::mem::offset_of!(AVFilterContext, name) - 16usize]; + ["Offset of field: AVFilterContext::input_pads"] + [::std::mem::offset_of!(AVFilterContext, input_pads) - 24usize]; + ["Offset of field: AVFilterContext::inputs"] + [::std::mem::offset_of!(AVFilterContext, inputs) - 32usize]; + ["Offset of field: AVFilterContext::nb_inputs"] + [::std::mem::offset_of!(AVFilterContext, nb_inputs) - 40usize]; + ["Offset of field: AVFilterContext::output_pads"] + [::std::mem::offset_of!(AVFilterContext, output_pads) - 48usize]; + ["Offset of field: AVFilterContext::outputs"] + [::std::mem::offset_of!(AVFilterContext, outputs) - 56usize]; + ["Offset of field: AVFilterContext::nb_outputs"] + [::std::mem::offset_of!(AVFilterContext, nb_outputs) - 64usize]; + ["Offset of field: AVFilterContext::priv_"] + [::std::mem::offset_of!(AVFilterContext, priv_) - 72usize]; + ["Offset of field: AVFilterContext::graph"] + [::std::mem::offset_of!(AVFilterContext, graph) - 80usize]; + ["Offset of field: AVFilterContext::thread_type"] + [::std::mem::offset_of!(AVFilterContext, thread_type) - 88usize]; + ["Offset of field: AVFilterContext::nb_threads"] + [::std::mem::offset_of!(AVFilterContext, nb_threads) - 92usize]; + ["Offset of field: AVFilterContext::command_queue"] + [::std::mem::offset_of!(AVFilterContext, command_queue) - 96usize]; + ["Offset of field: AVFilterContext::enable_str"] + [::std::mem::offset_of!(AVFilterContext, enable_str) - 104usize]; + ["Offset of field: AVFilterContext::enable"] + [::std::mem::offset_of!(AVFilterContext, enable) - 112usize]; + ["Offset of field: AVFilterContext::var_values"] + [::std::mem::offset_of!(AVFilterContext, var_values) - 120usize]; + ["Offset of field: AVFilterContext::is_disabled"] + [::std::mem::offset_of!(AVFilterContext, is_disabled) - 128usize]; + ["Offset of field: AVFilterContext::hw_device_ctx"] + [::std::mem::offset_of!(AVFilterContext, hw_device_ctx) - 136usize]; + ["Offset of field: AVFilterContext::ready"] + [::std::mem::offset_of!(AVFilterContext, ready) - 144usize]; + ["Offset of field: AVFilterContext::extra_hw_frames"] + [::std::mem::offset_of!(AVFilterContext, extra_hw_frames) - 148usize]; +}; #[doc = " Lists of formats / etc. supported by an end of a link.\n\n This structure is directly part of AVFilterLink, in two copies:\n one for the source filter, one for the destination filter.\n\n These lists are used for negotiating the format to actually be used,\n which will be loaded into the format and channel_layout members of\n AVFilterLink, when chosen."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -22080,53 +13745,27 @@ pub struct AVFilterFormatsConfig { pub samplerates: *mut AVFilterFormats, #[doc = " Lists of supported channel layouts, only for audio."] pub channel_layouts: *mut AVFilterChannelLayouts, -} -#[test] -fn bindgen_test_layout_AVFilterFormatsConfig() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AVFilterFormatsConfig)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVFilterFormatsConfig)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).formats) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilterFormatsConfig), - "::", - stringify!(formats) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).samplerates) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVFilterFormatsConfig), - "::", - stringify!(samplerates) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).channel_layouts) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVFilterFormatsConfig), - "::", - stringify!(channel_layouts) - ) - ); -} + #[doc = "< AVColorSpace"] + pub color_spaces: *mut AVFilterFormats, + #[doc = "< AVColorRange"] + pub color_ranges: *mut AVFilterFormats, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFilterFormatsConfig"][::std::mem::size_of::() - 40usize]; + ["Alignment of AVFilterFormatsConfig"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AVFilterFormatsConfig::formats"] + [::std::mem::offset_of!(AVFilterFormatsConfig, formats) - 0usize]; + ["Offset of field: AVFilterFormatsConfig::samplerates"] + [::std::mem::offset_of!(AVFilterFormatsConfig, samplerates) - 8usize]; + ["Offset of field: AVFilterFormatsConfig::channel_layouts"] + [::std::mem::offset_of!(AVFilterFormatsConfig, channel_layouts) - 16usize]; + ["Offset of field: AVFilterFormatsConfig::color_spaces"] + [::std::mem::offset_of!(AVFilterFormatsConfig, color_spaces) - 24usize]; + ["Offset of field: AVFilterFormatsConfig::color_ranges"] + [::std::mem::offset_of!(AVFilterFormatsConfig, color_ranges) - 32usize]; +}; #[doc = " A link between two filters. This contains pointers to the source and\n destination filters between which this link exists, and the indexes of\n the pads involved. In addition, this link also contains the parameters\n which have been negotiated and agreed upon between the filter, such as\n image dimensions, format, etc.\n\n Applications must not normally access the link structure directly.\n Use the buffersrc and buffersink API instead.\n In the future, access to the header may be reserved for filters\n implementation."] #[repr(C)] #[derive(Copy, Clone)] @@ -22141,35 +13780,34 @@ pub struct AVFilterLink { pub dstpad: *mut AVFilterPad, #[doc = "< filter media type"] pub type_: AVMediaType, + #[doc = "< agreed upon media format"] + pub format: ::std::os::raw::c_int, #[doc = "< agreed upon image width"] pub w: ::std::os::raw::c_int, #[doc = "< agreed upon image height"] pub h: ::std::os::raw::c_int, #[doc = "< agreed upon sample aspect ratio"] pub sample_aspect_ratio: AVRational, - #[doc = " channel layout of current buffer (see libavutil/channel_layout.h)\n @deprecated use ch_layout"] - pub channel_layout: u64, + #[doc = "< agreed upon YUV color space"] + pub colorspace: AVColorSpace, + #[doc = "< agreed upon YUV color range"] + pub color_range: AVColorRange, #[doc = "< samples per second"] pub sample_rate: ::std::os::raw::c_int, - #[doc = "< agreed upon media format"] - pub format: ::std::os::raw::c_int, - #[doc = " Define the time base used by the PTS of the frames/samples\n which will pass through this link.\n During the configuration stage, each filter is supposed to\n change only the output timebase, while the timebase of the\n input link is assumed to be an unchangeable property."] - pub time_base: AVRational, #[doc = "< channel layout of current buffer (see libavutil/channel_layout.h)"] pub ch_layout: AVChannelLayout, + #[doc = " Define the time base used by the PTS of the frames/samples\n which will pass through this link.\n During the configuration stage, each filter is supposed to\n change only the output timebase, while the timebase of the\n input link is assumed to be an unchangeable property."] + pub time_base: AVRational, #[doc = " Lists of supported formats / etc. supported by the input filter."] pub incfg: AVFilterFormatsConfig, #[doc = " Lists of supported formats / etc. supported by the output filter."] pub outcfg: AVFilterFormatsConfig, - pub init_state: AVFilterLink__bindgen_ty_1, #[doc = " Graph the filter belongs to."] pub graph: *mut AVFilterGraph, #[doc = " Current timestamp of the link, as defined by the most recent\n frame(s), in link time_base units."] pub current_pts: i64, #[doc = " Current timestamp of the link, as defined by the most recent\n frame(s), in AV_TIME_BASE units."] pub current_pts_us: i64, - #[doc = " Index in the age array."] - pub age_index: ::std::os::raw::c_int, #[doc = " Frame rate of the stream on the link, or 1/0 if unknown or variable;\n if left to 0/0, will be automatically copied from the first input\n of the source filter if it exists.\n\n Sources should set it to the best estimation of the real frame rate.\n If the source frame rate is unknown or variable, set this to 1/0.\n Filters should update it if necessary depending on their function.\n Sinks can use it to set a default output frame rate.\n It is similar to the r_frame_rate field in AVStream."] pub frame_rate: AVRational, #[doc = " Minimum number of samples to filter at once. If filter_frame() is\n called with fewer samples, it will accumulate them in fifo.\n This field and the related ones must not be changed after filtering\n has started.\n If 0, all related fields are ignored."] @@ -22184,351 +13822,70 @@ pub struct AVFilterLink { pub sample_count_in: i64, #[doc = " Number of past samples sent through the link."] pub sample_count_out: i64, - #[doc = " A pointer to a FFFramePool struct."] - pub frame_pool: *mut ::std::os::raw::c_void, #[doc = " True if a frame is currently wanted on the output of this filter.\n Set when ff_request_frame() is called by the output,\n cleared when a frame is filtered."] pub frame_wanted_out: ::std::os::raw::c_int, #[doc = " For hwaccel pixel formats, this should be a reference to the\n AVHWFramesContext describing the frames."] pub hw_frames_ctx: *mut AVBufferRef, - #[doc = " Internal structure members.\n The fields below this limit are internal for libavfilter's use\n and must in no way be accessed by applications."] - pub reserved: [::std::os::raw::c_char; 61440usize], -} -#[doc = "< not started"] -pub const AVLINK_UNINIT: AVFilterLink__bindgen_ty_1 = 0; -#[doc = "< started, but incomplete"] -pub const AVLINK_STARTINIT: AVFilterLink__bindgen_ty_1 = 1; -#[doc = "< complete"] -pub const AVLINK_INIT: AVFilterLink__bindgen_ty_1 = 2; -#[doc = " stage of the initialization of the link properties (dimensions, etc)"] -pub type AVFilterLink__bindgen_ty_1 = ::std::os::raw::c_uint; -#[test] -fn bindgen_test_layout_AVFilterLink() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 61704usize, - concat!("Size of: ", stringify!(AVFilterLink)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVFilterLink)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).src) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(src) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).srcpad) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(srcpad) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dst) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(dst) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dstpad) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(dstpad) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(w) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(h) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sample_aspect_ratio) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(sample_aspect_ratio) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).channel_layout) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(channel_layout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sample_rate) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(sample_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).time_base) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(time_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ch_layout) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(ch_layout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).incfg) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(incfg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).outcfg) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(outcfg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).init_state) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(init_state) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).graph) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(graph) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).current_pts) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(current_pts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).current_pts_us) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(current_pts_us) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).age_index) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(age_index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).frame_rate) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(frame_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).min_samples) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(min_samples) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_samples) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(max_samples) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).frame_count_in) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(frame_count_in) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).frame_count_out) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(frame_count_out) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sample_count_in) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(sample_count_in) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sample_count_out) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(sample_count_out) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).frame_pool) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(frame_pool) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).frame_wanted_out) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(frame_wanted_out) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hw_frames_ctx) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(hw_frames_ctx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(AVFilterLink), - "::", - stringify!(reserved) - ) - ); } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFilterLink"][::std::mem::size_of::() - 272usize]; + ["Alignment of AVFilterLink"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVFilterLink::src"][::std::mem::offset_of!(AVFilterLink, src) - 0usize]; + ["Offset of field: AVFilterLink::srcpad"] + [::std::mem::offset_of!(AVFilterLink, srcpad) - 8usize]; + ["Offset of field: AVFilterLink::dst"][::std::mem::offset_of!(AVFilterLink, dst) - 16usize]; + ["Offset of field: AVFilterLink::dstpad"] + [::std::mem::offset_of!(AVFilterLink, dstpad) - 24usize]; + ["Offset of field: AVFilterLink::type_"][::std::mem::offset_of!(AVFilterLink, type_) - 32usize]; + ["Offset of field: AVFilterLink::format"] + [::std::mem::offset_of!(AVFilterLink, format) - 36usize]; + ["Offset of field: AVFilterLink::w"][::std::mem::offset_of!(AVFilterLink, w) - 40usize]; + ["Offset of field: AVFilterLink::h"][::std::mem::offset_of!(AVFilterLink, h) - 44usize]; + ["Offset of field: AVFilterLink::sample_aspect_ratio"] + [::std::mem::offset_of!(AVFilterLink, sample_aspect_ratio) - 48usize]; + ["Offset of field: AVFilterLink::colorspace"] + [::std::mem::offset_of!(AVFilterLink, colorspace) - 56usize]; + ["Offset of field: AVFilterLink::color_range"] + [::std::mem::offset_of!(AVFilterLink, color_range) - 60usize]; + ["Offset of field: AVFilterLink::sample_rate"] + [::std::mem::offset_of!(AVFilterLink, sample_rate) - 64usize]; + ["Offset of field: AVFilterLink::ch_layout"] + [::std::mem::offset_of!(AVFilterLink, ch_layout) - 72usize]; + ["Offset of field: AVFilterLink::time_base"] + [::std::mem::offset_of!(AVFilterLink, time_base) - 96usize]; + ["Offset of field: AVFilterLink::incfg"] + [::std::mem::offset_of!(AVFilterLink, incfg) - 104usize]; + ["Offset of field: AVFilterLink::outcfg"] + [::std::mem::offset_of!(AVFilterLink, outcfg) - 144usize]; + ["Offset of field: AVFilterLink::graph"] + [::std::mem::offset_of!(AVFilterLink, graph) - 184usize]; + ["Offset of field: AVFilterLink::current_pts"] + [::std::mem::offset_of!(AVFilterLink, current_pts) - 192usize]; + ["Offset of field: AVFilterLink::current_pts_us"] + [::std::mem::offset_of!(AVFilterLink, current_pts_us) - 200usize]; + ["Offset of field: AVFilterLink::frame_rate"] + [::std::mem::offset_of!(AVFilterLink, frame_rate) - 208usize]; + ["Offset of field: AVFilterLink::min_samples"] + [::std::mem::offset_of!(AVFilterLink, min_samples) - 216usize]; + ["Offset of field: AVFilterLink::max_samples"] + [::std::mem::offset_of!(AVFilterLink, max_samples) - 220usize]; + ["Offset of field: AVFilterLink::frame_count_in"] + [::std::mem::offset_of!(AVFilterLink, frame_count_in) - 224usize]; + ["Offset of field: AVFilterLink::frame_count_out"] + [::std::mem::offset_of!(AVFilterLink, frame_count_out) - 232usize]; + ["Offset of field: AVFilterLink::sample_count_in"] + [::std::mem::offset_of!(AVFilterLink, sample_count_in) - 240usize]; + ["Offset of field: AVFilterLink::sample_count_out"] + [::std::mem::offset_of!(AVFilterLink, sample_count_out) - 248usize]; + ["Offset of field: AVFilterLink::frame_wanted_out"] + [::std::mem::offset_of!(AVFilterLink, frame_wanted_out) - 256usize]; + ["Offset of field: AVFilterLink::hw_frames_ctx"] + [::std::mem::offset_of!(AVFilterLink, hw_frames_ctx) - 264usize]; +}; impl ::std::fmt::Debug for AVFilterLink { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write ! (f , "AVFilterLink {{ src: {:?}, srcpad: {:?}, dst: {:?}, dstpad: {:?}, type: {:?}, w: {:?}, h: {:?}, sample_aspect_ratio: {:?}, channel_layout: {:?}, sample_rate: {:?}, format: {:?}, time_base: {:?}, ch_layout: {:?}, incfg: {:?}, outcfg: {:?}, init_state: {:?}, graph: {:?}, current_pts: {:?}, current_pts_us: {:?}, age_index: {:?}, frame_rate: {:?}, min_samples: {:?}, max_samples: {:?}, frame_count_in: {:?}, frame_count_out: {:?}, sample_count_in: {:?}, sample_count_out: {:?}, frame_pool: {:?}, frame_wanted_out: {:?}, hw_frames_ctx: {:?}, reserved: {:?} }}" , self . src , self . srcpad , self . dst , self . dstpad , self . type_ , self . w , self . h , self . sample_aspect_ratio , self . channel_layout , self . sample_rate , self . format , self . time_base , self . ch_layout , self . incfg , self . outcfg , self . init_state , self . graph , self . current_pts , self . current_pts_us , self . age_index , self . frame_rate , self . min_samples , self . max_samples , self . frame_count_in , self . frame_count_out , self . sample_count_in , self . sample_count_out , self . frame_pool , self . frame_wanted_out , self . hw_frames_ctx , self . reserved) + write ! (f , "AVFilterLink {{ src: {:?}, srcpad: {:?}, dst: {:?}, dstpad: {:?}, type: {:?}, format: {:?}, w: {:?}, h: {:?}, sample_aspect_ratio: {:?}, colorspace: {:?}, color_range: {:?}, sample_rate: {:?}, ch_layout: {:?}, time_base: {:?}, incfg: {:?}, outcfg: {:?}, graph: {:?}, current_pts: {:?}, current_pts_us: {:?}, frame_rate: {:?}, min_samples: {:?}, max_samples: {:?}, frame_count_in: {:?}, frame_count_out: {:?}, sample_count_in: {:?}, sample_count_out: {:?}, frame_wanted_out: {:?}, hw_frames_ctx: {:?} }}" , self . src , self . srcpad , self . dst , self . dstpad , self . type_ , self . format , self . w , self . h , self . sample_aspect_ratio , self . colorspace , self . color_range , self . sample_rate , self . ch_layout , self . time_base , self . incfg , self . outcfg , self . graph , self . current_pts , self . current_pts_us , self . frame_rate , self . min_samples , self . max_samples , self . frame_count_in , self . frame_count_out , self . sample_count_in , self . sample_count_out , self . frame_wanted_out , self . hw_frames_ctx) } } extern "C" { @@ -22541,11 +13898,11 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Free the link in *link, and set its pointer to NULL."] + #[doc = " @deprecated this function should never be called by users"] pub fn avfilter_link_free(link: *mut *mut AVFilterLink); } extern "C" { - #[doc = " Negotiate the media format, dimensions, etc of all inputs to a filter.\n\n @param filter the filter to negotiate the properties for its inputs\n @return zero on successful negotiation"] + #[doc = " @deprecated this function should never be called by users"] pub fn avfilter_config_links(filter: *mut AVFilterContext) -> ::std::os::raw::c_int; } extern "C" { @@ -22598,11 +13955,6 @@ extern "C" { #[doc = " @return AVClass for AVFilterContext.\n\n @see av_opt_find()."] pub fn avfilter_get_class() -> *const AVClass; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct AVFilterGraphInternal { - _unused: [u8; 0], -} #[doc = " A function pointer passed to the @ref AVFilterGraph.execute callback to be\n executed multiple times, possibly in parallel.\n\n @param ctx the filter context the job belongs to\n @param arg an opaque parameter passed through from @ref\n AVFilterGraph.execute\n @param jobnr the index of the job being executed\n @param nb_jobs the total number of jobs\n\n @return 0 on success, a negative AVERROR on error"] pub type avfilter_action_func = ::std::option::Option< unsafe extern "C" fn( @@ -22634,164 +13986,36 @@ pub struct AVFilterGraph { pub thread_type: ::std::os::raw::c_int, #[doc = " Maximum number of threads used by filters in this graph. May be set by\n the caller before adding any filters to the filtergraph. Zero (the\n default) means that the number of threads is determined automatically."] pub nb_threads: ::std::os::raw::c_int, - #[doc = " Opaque object for libavfilter internal use."] - pub internal: *mut AVFilterGraphInternal, #[doc = " Opaque user data. May be set by the caller to an arbitrary value, e.g. to\n be used from callbacks like @ref AVFilterGraph.execute.\n Libavfilter will not touch this field in any way."] pub opaque: *mut ::std::os::raw::c_void, #[doc = " This callback may be set by the caller immediately after allocating the\n graph and before adding any filters to it, to provide a custom\n multithreading implementation.\n\n If set, filters with slice threading capability will call this callback\n to execute multiple jobs in parallel.\n\n If this field is left unset, libavfilter will use its internal\n implementation, which may or may not be multithreaded depending on the\n platform and build options."] pub execute: avfilter_execute_func, #[doc = "< swr options to use for the auto-inserted aresample filters, Access ONLY through AVOptions"] pub aresample_swr_opts: *mut ::std::os::raw::c_char, - #[doc = " Private fields\n\n The following fields are for internal use only.\n Their type, offset, number and semantic can change without notice."] - pub sink_links: *mut *mut AVFilterLink, - pub sink_links_count: ::std::os::raw::c_int, - pub disable_auto_convert: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout_AVFilterGraph() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(AVFilterGraph)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVFilterGraph)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).av_class) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilterGraph), - "::", - stringify!(av_class) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).filters) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVFilterGraph), - "::", - stringify!(filters) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_filters) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVFilterGraph), - "::", - stringify!(nb_filters) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).scale_sws_opts) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVFilterGraph), - "::", - stringify!(scale_sws_opts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).thread_type) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVFilterGraph), - "::", - stringify!(thread_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_threads) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(AVFilterGraph), - "::", - stringify!(nb_threads) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).internal) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVFilterGraph), - "::", - stringify!(internal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVFilterGraph), - "::", - stringify!(opaque) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).execute) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVFilterGraph), - "::", - stringify!(execute) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aresample_swr_opts) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVFilterGraph), - "::", - stringify!(aresample_swr_opts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sink_links) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVFilterGraph), - "::", - stringify!(sink_links) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sink_links_count) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVFilterGraph), - "::", - stringify!(sink_links_count) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).disable_auto_convert) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(AVFilterGraph), - "::", - stringify!(disable_auto_convert) - ) - ); } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFilterGraph"][::std::mem::size_of::() - 64usize]; + ["Alignment of AVFilterGraph"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVFilterGraph::av_class"] + [::std::mem::offset_of!(AVFilterGraph, av_class) - 0usize]; + ["Offset of field: AVFilterGraph::filters"] + [::std::mem::offset_of!(AVFilterGraph, filters) - 8usize]; + ["Offset of field: AVFilterGraph::nb_filters"] + [::std::mem::offset_of!(AVFilterGraph, nb_filters) - 16usize]; + ["Offset of field: AVFilterGraph::scale_sws_opts"] + [::std::mem::offset_of!(AVFilterGraph, scale_sws_opts) - 24usize]; + ["Offset of field: AVFilterGraph::thread_type"] + [::std::mem::offset_of!(AVFilterGraph, thread_type) - 32usize]; + ["Offset of field: AVFilterGraph::nb_threads"] + [::std::mem::offset_of!(AVFilterGraph, nb_threads) - 36usize]; + ["Offset of field: AVFilterGraph::opaque"] + [::std::mem::offset_of!(AVFilterGraph, opaque) - 40usize]; + ["Offset of field: AVFilterGraph::execute"] + [::std::mem::offset_of!(AVFilterGraph, execute) - 48usize]; + ["Offset of field: AVFilterGraph::aresample_swr_opts"] + [::std::mem::offset_of!(AVFilterGraph, aresample_swr_opts) - 56usize]; +}; extern "C" { #[doc = " Allocate a filter graph.\n\n @return the allocated filter graph on success or NULL."] pub fn avfilter_graph_alloc() -> *mut AVFilterGraph; @@ -22858,61 +14082,17 @@ pub struct AVFilterInOut { #[doc = " next input/input in the list, NULL if this is the last"] pub next: *mut AVFilterInOut, } -#[test] -fn bindgen_test_layout_AVFilterInOut() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(AVFilterInOut)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVFilterInOut)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilterInOut), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).filter_ctx) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVFilterInOut), - "::", - stringify!(filter_ctx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pad_idx) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVFilterInOut), - "::", - stringify!(pad_idx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVFilterInOut), - "::", - stringify!(next) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFilterInOut"][::std::mem::size_of::() - 32usize]; + ["Alignment of AVFilterInOut"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVFilterInOut::name"][::std::mem::offset_of!(AVFilterInOut, name) - 0usize]; + ["Offset of field: AVFilterInOut::filter_ctx"] + [::std::mem::offset_of!(AVFilterInOut, filter_ctx) - 8usize]; + ["Offset of field: AVFilterInOut::pad_idx"] + [::std::mem::offset_of!(AVFilterInOut, pad_idx) - 16usize]; + ["Offset of field: AVFilterInOut::next"][::std::mem::offset_of!(AVFilterInOut, next) - 24usize]; +}; extern "C" { #[doc = " Allocate a single AVFilterInOut entry.\n Must be freed with avfilter_inout_free().\n @return allocated AVFilterInOut on success, NULL on failure."] pub fn avfilter_inout_alloc() -> *mut AVFilterInOut; @@ -22957,143 +14137,51 @@ pub struct AVFilterPadParams { #[doc = " An av_malloc()'ed string containing the pad label.\n\n May be av_free()'d and set to NULL by the caller, in which case this pad\n will be treated as unlabeled for linking.\n May also be replaced by another av_malloc()'ed string."] pub label: *mut ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_AVFilterPadParams() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AVFilterPadParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVFilterPadParams)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).label) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilterPadParams), - "::", - stringify!(label) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFilterPadParams"][::std::mem::size_of::() - 8usize]; + ["Alignment of AVFilterPadParams"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVFilterPadParams::label"] + [::std::mem::offset_of!(AVFilterPadParams, label) - 0usize]; +}; #[doc = " Parameters describing a filter to be created in a filtergraph.\n\n Created as a child of AVFilterGraphSegment by avfilter_graph_segment_parse().\n Freed in avfilter_graph_segment_free()."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AVFilterParams { - #[doc = " The filter context.\n\n Created by avfilter_graph_segment_create_filters() based on\n AVFilterParams.filter_name and instance_name.\n\n Callers may also create the filter context manually, then they should\n av_free() filter_name and set it to NULL. Such AVFilterParams instances\n are then skipped by avfilter_graph_segment_create_filters()."] - pub filter: *mut AVFilterContext, - #[doc = " Name of the AVFilter to be used.\n\n An av_malloc()'ed string, set by avfilter_graph_segment_parse(). Will be\n passed to avfilter_get_by_name() by\n avfilter_graph_segment_create_filters().\n\n Callers may av_free() this string and replace it with another one or\n NULL. If the caller creates the filter instance manually, this string\n MUST be set to NULL.\n\n When both AVFilterParams.filter an AVFilterParams.filter_name are NULL,\n this AVFilterParams instance is skipped by avfilter_graph_segment_*()\n functions."] - pub filter_name: *mut ::std::os::raw::c_char, - #[doc = " Name to be used for this filter instance.\n\n An av_malloc()'ed string, may be set by avfilter_graph_segment_parse() or\n left NULL. The caller may av_free() this string and replace with another\n one or NULL.\n\n Will be used by avfilter_graph_segment_create_filters() - passed as the\n third argument to avfilter_graph_alloc_filter(), then freed and set to\n NULL."] - pub instance_name: *mut ::std::os::raw::c_char, - #[doc = " Options to be apllied to the filter.\n\n Filled by avfilter_graph_segment_parse(). Afterwards may be freely\n modified by the caller.\n\n Will be applied to the filter by avfilter_graph_segment_apply_opts()\n with an equivalent of av_opt_set_dict2(filter, &opts, AV_OPT_SEARCH_CHILDREN),\n i.e. any unapplied options will be left in this dictionary."] - pub opts: *mut AVDictionary, - pub inputs: *mut *mut AVFilterPadParams, - pub nb_inputs: ::std::os::raw::c_uint, - pub outputs: *mut *mut AVFilterPadParams, - pub nb_outputs: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout_AVFilterParams() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(AVFilterParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVFilterParams)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).filter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilterParams), - "::", - stringify!(filter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).filter_name) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVFilterParams), - "::", - stringify!(filter_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).instance_name) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVFilterParams), - "::", - stringify!(instance_name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).opts) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVFilterParams), - "::", - stringify!(opts) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).inputs) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVFilterParams), - "::", - stringify!(inputs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_inputs) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVFilterParams), - "::", - stringify!(nb_inputs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).outputs) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVFilterParams), - "::", - stringify!(outputs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_outputs) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVFilterParams), - "::", - stringify!(nb_outputs) - ) - ); + #[doc = " The filter context.\n\n Created by avfilter_graph_segment_create_filters() based on\n AVFilterParams.filter_name and instance_name.\n\n Callers may also create the filter context manually, then they should\n av_free() filter_name and set it to NULL. Such AVFilterParams instances\n are then skipped by avfilter_graph_segment_create_filters()."] + pub filter: *mut AVFilterContext, + #[doc = " Name of the AVFilter to be used.\n\n An av_malloc()'ed string, set by avfilter_graph_segment_parse(). Will be\n passed to avfilter_get_by_name() by\n avfilter_graph_segment_create_filters().\n\n Callers may av_free() this string and replace it with another one or\n NULL. If the caller creates the filter instance manually, this string\n MUST be set to NULL.\n\n When both AVFilterParams.filter an AVFilterParams.filter_name are NULL,\n this AVFilterParams instance is skipped by avfilter_graph_segment_*()\n functions."] + pub filter_name: *mut ::std::os::raw::c_char, + #[doc = " Name to be used for this filter instance.\n\n An av_malloc()'ed string, may be set by avfilter_graph_segment_parse() or\n left NULL. The caller may av_free() this string and replace with another\n one or NULL.\n\n Will be used by avfilter_graph_segment_create_filters() - passed as the\n third argument to avfilter_graph_alloc_filter(), then freed and set to\n NULL."] + pub instance_name: *mut ::std::os::raw::c_char, + #[doc = " Options to be apllied to the filter.\n\n Filled by avfilter_graph_segment_parse(). Afterwards may be freely\n modified by the caller.\n\n Will be applied to the filter by avfilter_graph_segment_apply_opts()\n with an equivalent of av_opt_set_dict2(filter, &opts, AV_OPT_SEARCH_CHILDREN),\n i.e. any unapplied options will be left in this dictionary."] + pub opts: *mut AVDictionary, + pub inputs: *mut *mut AVFilterPadParams, + pub nb_inputs: ::std::os::raw::c_uint, + pub outputs: *mut *mut AVFilterPadParams, + pub nb_outputs: ::std::os::raw::c_uint, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFilterParams"][::std::mem::size_of::() - 64usize]; + ["Alignment of AVFilterParams"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVFilterParams::filter"] + [::std::mem::offset_of!(AVFilterParams, filter) - 0usize]; + ["Offset of field: AVFilterParams::filter_name"] + [::std::mem::offset_of!(AVFilterParams, filter_name) - 8usize]; + ["Offset of field: AVFilterParams::instance_name"] + [::std::mem::offset_of!(AVFilterParams, instance_name) - 16usize]; + ["Offset of field: AVFilterParams::opts"] + [::std::mem::offset_of!(AVFilterParams, opts) - 24usize]; + ["Offset of field: AVFilterParams::inputs"] + [::std::mem::offset_of!(AVFilterParams, inputs) - 32usize]; + ["Offset of field: AVFilterParams::nb_inputs"] + [::std::mem::offset_of!(AVFilterParams, nb_inputs) - 40usize]; + ["Offset of field: AVFilterParams::outputs"] + [::std::mem::offset_of!(AVFilterParams, outputs) - 48usize]; + ["Offset of field: AVFilterParams::nb_outputs"] + [::std::mem::offset_of!(AVFilterParams, nb_outputs) - 56usize]; +}; #[doc = " A filterchain is a list of filter specifications.\n\n Created as a child of AVFilterGraphSegment by avfilter_graph_segment_parse().\n Freed in avfilter_graph_segment_free()."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -23101,41 +14189,15 @@ pub struct AVFilterChain { pub filters: *mut *mut AVFilterParams, pub nb_filters: usize, } -#[test] -fn bindgen_test_layout_AVFilterChain() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AVFilterChain)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVFilterChain)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).filters) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilterChain), - "::", - stringify!(filters) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_filters) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVFilterChain), - "::", - stringify!(nb_filters) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFilterChain"][::std::mem::size_of::() - 16usize]; + ["Alignment of AVFilterChain"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVFilterChain::filters"] + [::std::mem::offset_of!(AVFilterChain, filters) - 0usize]; + ["Offset of field: AVFilterChain::nb_filters"] + [::std::mem::offset_of!(AVFilterChain, nb_filters) - 8usize]; +}; #[doc = " A parsed representation of a filtergraph segment.\n\n A filtergraph segment is conceptually a list of filterchains, with some\n supplementary information (e.g. format conversion flags).\n\n Created by avfilter_graph_segment_parse(). Must be freed with\n avfilter_graph_segment_free()."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -23148,61 +14210,19 @@ pub struct AVFilterGraphSegment { #[doc = " A string containing a colon-separated list of key=value options applied\n to all scale filters in this segment.\n\n May be set by avfilter_graph_segment_parse().\n The caller may free this string with av_free() and replace it with a\n different av_malloc()'ed string."] pub scale_sws_opts: *mut ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_AVFilterGraphSegment() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(AVFilterGraphSegment)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVFilterGraphSegment)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).graph) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilterGraphSegment), - "::", - stringify!(graph) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chains) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVFilterGraphSegment), - "::", - stringify!(chains) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_chains) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVFilterGraphSegment), - "::", - stringify!(nb_chains) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).scale_sws_opts) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVFilterGraphSegment), - "::", - stringify!(scale_sws_opts) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFilterGraphSegment"][::std::mem::size_of::() - 32usize]; + ["Alignment of AVFilterGraphSegment"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVFilterGraphSegment::graph"] + [::std::mem::offset_of!(AVFilterGraphSegment, graph) - 0usize]; + ["Offset of field: AVFilterGraphSegment::chains"] + [::std::mem::offset_of!(AVFilterGraphSegment, chains) - 8usize]; + ["Offset of field: AVFilterGraphSegment::nb_chains"] + [::std::mem::offset_of!(AVFilterGraphSegment, nb_chains) - 16usize]; + ["Offset of field: AVFilterGraphSegment::scale_sws_opts"] + [::std::mem::offset_of!(AVFilterGraphSegment, scale_sws_opts) - 24usize]; +}; extern "C" { #[doc = " Parse a textual filtergraph description into an intermediate form.\n\n This intermediate representation is intended to be modified by the caller as\n described in the documentation of AVFilterGraphSegment and its children, and\n then applied to the graph either manually or with other\n avfilter_graph_segment_*() functions. See the documentation for\n avfilter_graph_segment_apply() for the canonical way to apply\n AVFilterGraphSegment.\n\n @param graph Filter graph the parsed segment is associated with. Will only be\n used for logging and similar auxiliary purposes. The graph will\n not be actually modified by this function - the parsing results\n are instead stored in seg for further processing.\n @param graph_str a string describing the filtergraph segment\n @param flags reserved for future use, caller must set to 0 for now\n @param seg A pointer to the newly-created AVFilterGraphSegment is written\n here on success. The graph segment is owned by the caller and must\n be freed with avfilter_graph_segment_free() before graph itself is\n freed.\n\n @retval \"non-negative number\" success\n @retval \"negative error code\" failure"] pub fn avfilter_graph_segment_parse( @@ -23327,10 +14347,13 @@ extern "C" { pub fn av_buffersink_get_sample_aspect_ratio(ctx: *const AVFilterContext) -> AVRational; } extern "C" { - pub fn av_buffersink_get_channels(ctx: *const AVFilterContext) -> ::std::os::raw::c_int; + pub fn av_buffersink_get_colorspace(ctx: *const AVFilterContext) -> AVColorSpace; +} +extern "C" { + pub fn av_buffersink_get_color_range(ctx: *const AVFilterContext) -> AVColorRange; } extern "C" { - pub fn av_buffersink_get_channel_layout(ctx: *const AVFilterContext) -> u64; + pub fn av_buffersink_get_channels(ctx: *const AVFilterContext) -> ::std::os::raw::c_int; } extern "C" { pub fn av_buffersink_get_ch_layout( @@ -23393,130 +14416,43 @@ pub struct AVBufferSrcParameters { pub hw_frames_ctx: *mut AVBufferRef, #[doc = " Audio only, the audio sampling rate in samples per second."] pub sample_rate: ::std::os::raw::c_int, - #[doc = " Audio only, the audio channel layout\n @deprecated use ch_layout"] - pub channel_layout: u64, #[doc = " Audio only, the audio channel layout"] pub ch_layout: AVChannelLayout, + #[doc = " Video only, the YUV colorspace and range."] + pub color_space: AVColorSpace, + pub color_range: AVColorRange, } -#[test] -fn bindgen_test_layout_AVBufferSrcParameters() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(AVBufferSrcParameters)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVBufferSrcParameters)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVBufferSrcParameters), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).time_base) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVBufferSrcParameters), - "::", - stringify!(time_base) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVBufferSrcParameters), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVBufferSrcParameters), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sample_aspect_ratio) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AVBufferSrcParameters), - "::", - stringify!(sample_aspect_ratio) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).frame_rate) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AVBufferSrcParameters), - "::", - stringify!(frame_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hw_frames_ctx) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVBufferSrcParameters), - "::", - stringify!(hw_frames_ctx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sample_rate) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVBufferSrcParameters), - "::", - stringify!(sample_rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).channel_layout) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVBufferSrcParameters), - "::", - stringify!(channel_layout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ch_layout) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVBufferSrcParameters), - "::", - stringify!(ch_layout) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVBufferSrcParameters"][::std::mem::size_of::() - 88usize]; + ["Alignment of AVBufferSrcParameters"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AVBufferSrcParameters::format"] + [::std::mem::offset_of!(AVBufferSrcParameters, format) - 0usize]; + ["Offset of field: AVBufferSrcParameters::time_base"] + [::std::mem::offset_of!(AVBufferSrcParameters, time_base) - 4usize]; + ["Offset of field: AVBufferSrcParameters::width"] + [::std::mem::offset_of!(AVBufferSrcParameters, width) - 12usize]; + ["Offset of field: AVBufferSrcParameters::height"] + [::std::mem::offset_of!(AVBufferSrcParameters, height) - 16usize]; + ["Offset of field: AVBufferSrcParameters::sample_aspect_ratio"] + [::std::mem::offset_of!(AVBufferSrcParameters, sample_aspect_ratio) - 20usize]; + ["Offset of field: AVBufferSrcParameters::frame_rate"] + [::std::mem::offset_of!(AVBufferSrcParameters, frame_rate) - 28usize]; + ["Offset of field: AVBufferSrcParameters::hw_frames_ctx"] + [::std::mem::offset_of!(AVBufferSrcParameters, hw_frames_ctx) - 40usize]; + ["Offset of field: AVBufferSrcParameters::sample_rate"] + [::std::mem::offset_of!(AVBufferSrcParameters, sample_rate) - 48usize]; + ["Offset of field: AVBufferSrcParameters::ch_layout"] + [::std::mem::offset_of!(AVBufferSrcParameters, ch_layout) - 56usize]; + ["Offset of field: AVBufferSrcParameters::color_space"] + [::std::mem::offset_of!(AVBufferSrcParameters, color_space) - 80usize]; + ["Offset of field: AVBufferSrcParameters::color_range"] + [::std::mem::offset_of!(AVBufferSrcParameters, color_range) - 84usize]; +}; impl ::std::fmt::Debug for AVBufferSrcParameters { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write ! (f , "AVBufferSrcParameters {{ format: {:?}, time_base: {:?}, width: {:?}, height: {:?}, sample_aspect_ratio: {:?}, frame_rate: {:?}, hw_frames_ctx: {:?}, sample_rate: {:?}, channel_layout: {:?}, ch_layout: {:?} }}" , self . format , self . time_base , self . width , self . height , self . sample_aspect_ratio , self . frame_rate , self . hw_frames_ctx , self . sample_rate , self . channel_layout , self . ch_layout) + write ! (f , "AVBufferSrcParameters {{ format: {:?}, time_base: {:?}, width: {:?}, height: {:?}, sample_aspect_ratio: {:?}, frame_rate: {:?}, hw_frames_ctx: {:?}, sample_rate: {:?}, ch_layout: {:?}, color_space: {:?}, color_range: {:?} }}" , self . format , self . time_base , self . width , self . height , self . sample_aspect_ratio , self . frame_rate , self . hw_frames_ctx , self . sample_rate , self . ch_layout , self . color_space , self . color_range) } } extern "C" { @@ -23656,52 +14592,19 @@ pub struct AVAmbientViewingEnvironment { #[doc = " Normalized y chromaticity coordinate of the environmental ambient light\n in the nominal viewing environment according to the CIE 1931 definition\n of x and y as specified in ISO/CIE 11664-1."] pub ambient_light_y: AVRational, } -#[test] -fn bindgen_test_layout_AVAmbientViewingEnvironment() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AVAmbientViewingEnvironment)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVAmbientViewingEnvironment)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ambient_illuminance) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVAmbientViewingEnvironment), - "::", - stringify!(ambient_illuminance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ambient_light_x) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVAmbientViewingEnvironment), - "::", - stringify!(ambient_light_x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ambient_light_y) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVAmbientViewingEnvironment), - "::", - stringify!(ambient_light_y) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVAmbientViewingEnvironment"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of AVAmbientViewingEnvironment"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AVAmbientViewingEnvironment::ambient_illuminance"] + [::std::mem::offset_of!(AVAmbientViewingEnvironment, ambient_illuminance) - 0usize]; + ["Offset of field: AVAmbientViewingEnvironment::ambient_light_x"] + [::std::mem::offset_of!(AVAmbientViewingEnvironment, ambient_light_x) - 8usize]; + ["Offset of field: AVAmbientViewingEnvironment::ambient_light_y"] + [::std::mem::offset_of!(AVAmbientViewingEnvironment, ambient_light_y) - 16usize]; +}; extern "C" { #[doc = " Allocate an AVAmbientViewingEnvironment structure.\n\n @return the newly allocated struct or NULL on failure"] pub fn av_ambient_viewing_environment_alloc( @@ -23981,41 +14884,13 @@ pub struct AVBlowfish { pub p: [u32; 18usize], pub s: [[u32; 256usize]; 4usize], } -#[test] -fn bindgen_test_layout_AVBlowfish() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4168usize, - concat!("Size of: ", stringify!(AVBlowfish)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVBlowfish)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVBlowfish), - "::", - stringify!(p) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).s) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVBlowfish), - "::", - stringify!(s) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVBlowfish"][::std::mem::size_of::() - 4168usize]; + ["Alignment of AVBlowfish"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVBlowfish::p"][::std::mem::offset_of!(AVBlowfish, p) - 0usize]; + ["Offset of field: AVBlowfish::s"][::std::mem::offset_of!(AVBlowfish, s) - 72usize]; +}; extern "C" { #[doc = " Allocate an AVBlowfish context."] pub fn av_blowfish_alloc() -> *mut AVBlowfish; @@ -24053,72 +14928,22 @@ pub struct ff_pad_helper_AVBPrint { pub size_max: ::std::os::raw::c_uint, pub reserved_internal_buffer: [::std::os::raw::c_char; 1usize], } -#[test] -fn bindgen_test_layout_ff_pad_helper_AVBPrint() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ff_pad_helper_AVBPrint)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ff_pad_helper_AVBPrint)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).str_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ff_pad_helper_AVBPrint), - "::", - stringify!(str_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ff_pad_helper_AVBPrint), - "::", - stringify!(len) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ff_pad_helper_AVBPrint), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size_max) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ff_pad_helper_AVBPrint), - "::", - stringify!(size_max) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved_internal_buffer) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(ff_pad_helper_AVBPrint), - "::", - stringify!(reserved_internal_buffer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ff_pad_helper_AVBPrint"][::std::mem::size_of::() - 24usize]; + ["Alignment of ff_pad_helper_AVBPrint"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: ff_pad_helper_AVBPrint::str_"] + [::std::mem::offset_of!(ff_pad_helper_AVBPrint, str_) - 0usize]; + ["Offset of field: ff_pad_helper_AVBPrint::len"] + [::std::mem::offset_of!(ff_pad_helper_AVBPrint, len) - 8usize]; + ["Offset of field: ff_pad_helper_AVBPrint::size"] + [::std::mem::offset_of!(ff_pad_helper_AVBPrint, size) - 12usize]; + ["Offset of field: ff_pad_helper_AVBPrint::size_max"] + [::std::mem::offset_of!(ff_pad_helper_AVBPrint, size_max) - 16usize]; + ["Offset of field: ff_pad_helper_AVBPrint::reserved_internal_buffer"] + [::std::mem::offset_of!(ff_pad_helper_AVBPrint, reserved_internal_buffer) - 20usize]; +}; #[doc = " @}"] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -24130,81 +14955,19 @@ pub struct AVBPrint { pub reserved_internal_buffer: [::std::os::raw::c_char; 1usize], pub reserved_padding: [::std::os::raw::c_char; 1000usize], } -#[test] -fn bindgen_test_layout_AVBPrint() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 1024usize, - concat!("Size of: ", stringify!(AVBPrint)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVBPrint)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).str_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVBPrint), - "::", - stringify!(str_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVBPrint), - "::", - stringify!(len) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVBPrint), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size_max) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVBPrint), - "::", - stringify!(size_max) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved_internal_buffer) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AVBPrint), - "::", - stringify!(reserved_internal_buffer) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved_padding) as usize - ptr as usize }, - 21usize, - concat!( - "Offset of field: ", - stringify!(AVBPrint), - "::", - stringify!(reserved_padding) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVBPrint"][::std::mem::size_of::() - 1024usize]; + ["Alignment of AVBPrint"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVBPrint::str_"][::std::mem::offset_of!(AVBPrint, str_) - 0usize]; + ["Offset of field: AVBPrint::len"][::std::mem::offset_of!(AVBPrint, len) - 8usize]; + ["Offset of field: AVBPrint::size"][::std::mem::offset_of!(AVBPrint, size) - 12usize]; + ["Offset of field: AVBPrint::size_max"][::std::mem::offset_of!(AVBPrint, size_max) - 16usize]; + ["Offset of field: AVBPrint::reserved_internal_buffer"] + [::std::mem::offset_of!(AVBPrint, reserved_internal_buffer) - 20usize]; + ["Offset of field: AVBPrint::reserved_padding"] + [::std::mem::offset_of!(AVBPrint, reserved_padding) - 21usize]; +}; extern "C" { #[doc = " Init a print buffer.\n\n @param buf buffer to init\n @param size_init initial size (including the final 0)\n @param size_max maximum size;\n - `0` means do not write anything, just count the length\n - `1` is replaced by the maximum value for automatic storage\n any large value means that the internal buffer will be\n reallocated as needed up to that limit\n - `-1` is converted to `UINT_MAX`, the largest limit possible.\n Check also `AV_BPRINT_SIZE_*` macros."] pub fn av_bprint_init( @@ -24242,7 +15005,7 @@ extern "C" { ); } extern "C" { - #[doc = " Append data to a print buffer.\n\n param buf bprint buffer to use\n param data pointer to data\n param size size of data"] + #[doc = " Append data to a print buffer.\n\n @param buf bprint buffer to use\n @param data pointer to data\n @param size size of data"] pub fn av_bprint_append_data( buf: *mut AVBPrint, data: *const ::std::os::raw::c_char, @@ -24250,7 +15013,7 @@ extern "C" { ); } extern "C" { - #[doc = " Append a formatted date and time to a print buffer.\n\n param buf bprint buffer to use\n param fmt date and time format string, see strftime()\n param tm broken-down time structure to translate\n\n @note due to poor design of the standard strftime function, it may\n produce poor results if the format string expands to a very long text and\n the bprint buffer is near the limit stated by the size_max option."] + #[doc = " Append a formatted date and time to a print buffer.\n\n @param buf bprint buffer to use\n @param fmt date and time format string, see strftime()\n @param tm broken-down time structure to translate\n\n @note due to poor design of the standard strftime function, it may\n produce poor results if the format string expands to a very long text and\n the bprint buffer is near the limit stated by the size_max option."] pub fn av_bprint_strftime( buf: *mut AVBPrint, fmt: *const ::std::os::raw::c_char, @@ -24426,51 +15189,17 @@ pub struct AVLumaCoefficients { pub cg: AVRational, pub cb: AVRational, } -#[test] -fn bindgen_test_layout_AVLumaCoefficients() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AVLumaCoefficients)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVLumaCoefficients)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cr) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVLumaCoefficients), - "::", - stringify!(cr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cg) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVLumaCoefficients), - "::", - stringify!(cg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVLumaCoefficients), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVLumaCoefficients"][::std::mem::size_of::() - 24usize]; + ["Alignment of AVLumaCoefficients"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVLumaCoefficients::cr"] + [::std::mem::offset_of!(AVLumaCoefficients, cr) - 0usize]; + ["Offset of field: AVLumaCoefficients::cg"] + [::std::mem::offset_of!(AVLumaCoefficients, cg) - 8usize]; + ["Offset of field: AVLumaCoefficients::cb"] + [::std::mem::offset_of!(AVLumaCoefficients, cb) - 16usize]; +}; #[doc = " Struct containing chromaticity x and y values for the standard CIE 1931\n chromaticity definition."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -24478,41 +15207,13 @@ pub struct AVCIExy { pub x: AVRational, pub y: AVRational, } -#[test] -fn bindgen_test_layout_AVCIExy() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AVCIExy)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVCIExy)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVCIExy), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVCIExy), - "::", - stringify!(y) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVCIExy"][::std::mem::size_of::() - 16usize]; + ["Alignment of AVCIExy"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVCIExy::x"][::std::mem::offset_of!(AVCIExy, x) - 0usize]; + ["Offset of field: AVCIExy::y"][::std::mem::offset_of!(AVCIExy, y) - 8usize]; +}; #[doc = " Struct defining the red, green, and blue primary locations in terms of CIE\n 1931 chromaticity x and y."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -24521,52 +15222,18 @@ pub struct AVPrimaryCoefficients { pub g: AVCIExy, pub b: AVCIExy, } -#[test] -fn bindgen_test_layout_AVPrimaryCoefficients() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(AVPrimaryCoefficients)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVPrimaryCoefficients)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVPrimaryCoefficients), - "::", - stringify!(r) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).g) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVPrimaryCoefficients), - "::", - stringify!(g) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVPrimaryCoefficients), - "::", - stringify!(b) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVPrimaryCoefficients"][::std::mem::size_of::() - 48usize]; + ["Alignment of AVPrimaryCoefficients"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AVPrimaryCoefficients::r"] + [::std::mem::offset_of!(AVPrimaryCoefficients, r) - 0usize]; + ["Offset of field: AVPrimaryCoefficients::g"] + [::std::mem::offset_of!(AVPrimaryCoefficients, g) - 16usize]; + ["Offset of field: AVPrimaryCoefficients::b"] + [::std::mem::offset_of!(AVPrimaryCoefficients, b) - 32usize]; +}; #[doc = " Struct defining white point location in terms of CIE 1931 chromaticity x\n and y."] pub type AVWhitepointCoefficients = AVCIExy; #[doc = " Struct that contains both white point location and primaries location, providing\n the complete description of a color gamut."] @@ -24576,41 +15243,15 @@ pub struct AVColorPrimariesDesc { pub wp: AVWhitepointCoefficients, pub prim: AVPrimaryCoefficients, } -#[test] -fn bindgen_test_layout_AVColorPrimariesDesc() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(AVColorPrimariesDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVColorPrimariesDesc)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wp) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVColorPrimariesDesc), - "::", - stringify!(wp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prim) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVColorPrimariesDesc), - "::", - stringify!(prim) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVColorPrimariesDesc"][::std::mem::size_of::() - 64usize]; + ["Alignment of AVColorPrimariesDesc"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVColorPrimariesDesc::wp"] + [::std::mem::offset_of!(AVColorPrimariesDesc, wp) - 0usize]; + ["Offset of field: AVColorPrimariesDesc::prim"] + [::std::mem::offset_of!(AVColorPrimariesDesc, prim) - 16usize]; +}; #[doc = " Function pointer representing a double -> double transfer function that performs\n an EOTF transfer inversion. This function outputs linear light."] pub type av_csp_trc_function = ::std::option::Option f64>; extern "C" { @@ -24640,41 +15281,13 @@ pub struct AVDES { pub round_keys: [[u64; 16usize]; 3usize], pub triple_des: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVDES() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 392usize, - concat!("Size of: ", stringify!(AVDES)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVDES)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).round_keys) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDES), - "::", - stringify!(round_keys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).triple_des) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(AVDES), - "::", - stringify!(triple_des) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDES"][::std::mem::size_of::() - 392usize]; + ["Alignment of AVDES"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVDES::round_keys"][::std::mem::offset_of!(AVDES, round_keys) - 0usize]; + ["Offset of field: AVDES::triple_des"][::std::mem::offset_of!(AVDES, triple_des) - 384usize]; +}; extern "C" { #[doc = " Allocate an AVDES context."] pub fn av_des_alloc() -> *mut AVDES; @@ -24718,111 +15331,25 @@ pub struct AVDetectionBBox { pub classify_labels: [[::std::os::raw::c_char; 64usize]; 4usize], pub classify_confidences: [AVRational; 4usize], } -#[test] -fn bindgen_test_layout_AVDetectionBBox() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 380usize, - concat!("Size of: ", stringify!(AVDetectionBBox)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVDetectionBBox)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDetectionBBox), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVDetectionBBox), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVDetectionBBox), - "::", - stringify!(w) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVDetectionBBox), - "::", - stringify!(h) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).detect_label) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVDetectionBBox), - "::", - stringify!(detect_label) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).detect_confidence) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVDetectionBBox), - "::", - stringify!(detect_confidence) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).classify_count) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(AVDetectionBBox), - "::", - stringify!(classify_count) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).classify_labels) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(AVDetectionBBox), - "::", - stringify!(classify_labels) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).classify_confidences) as usize - ptr as usize }, - 348usize, - concat!( - "Offset of field: ", - stringify!(AVDetectionBBox), - "::", - stringify!(classify_confidences) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDetectionBBox"][::std::mem::size_of::() - 380usize]; + ["Alignment of AVDetectionBBox"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVDetectionBBox::x"][::std::mem::offset_of!(AVDetectionBBox, x) - 0usize]; + ["Offset of field: AVDetectionBBox::y"][::std::mem::offset_of!(AVDetectionBBox, y) - 4usize]; + ["Offset of field: AVDetectionBBox::w"][::std::mem::offset_of!(AVDetectionBBox, w) - 8usize]; + ["Offset of field: AVDetectionBBox::h"][::std::mem::offset_of!(AVDetectionBBox, h) - 12usize]; + ["Offset of field: AVDetectionBBox::detect_label"] + [::std::mem::offset_of!(AVDetectionBBox, detect_label) - 16usize]; + ["Offset of field: AVDetectionBBox::detect_confidence"] + [::std::mem::offset_of!(AVDetectionBBox, detect_confidence) - 80usize]; + ["Offset of field: AVDetectionBBox::classify_count"] + [::std::mem::offset_of!(AVDetectionBBox, classify_count) - 88usize]; + ["Offset of field: AVDetectionBBox::classify_labels"] + [::std::mem::offset_of!(AVDetectionBBox, classify_labels) - 92usize]; + ["Offset of field: AVDetectionBBox::classify_confidences"] + [::std::mem::offset_of!(AVDetectionBBox, classify_confidences) - 348usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AVDetectionBBoxHeader { @@ -24835,62 +15362,20 @@ pub struct AVDetectionBBoxHeader { #[doc = " Size of each bounding box in bytes."] pub bbox_size: usize, } -#[test] -fn bindgen_test_layout_AVDetectionBBoxHeader() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 280usize, - concat!("Size of: ", stringify!(AVDetectionBBoxHeader)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVDetectionBBoxHeader)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDetectionBBoxHeader), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_bboxes) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(AVDetectionBBoxHeader), - "::", - stringify!(nb_bboxes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bboxes_offset) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(AVDetectionBBoxHeader), - "::", - stringify!(bboxes_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bbox_size) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(AVDetectionBBoxHeader), - "::", - stringify!(bbox_size) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDetectionBBoxHeader"][::std::mem::size_of::() - 280usize]; + ["Alignment of AVDetectionBBoxHeader"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: AVDetectionBBoxHeader::source"] + [::std::mem::offset_of!(AVDetectionBBoxHeader, source) - 0usize]; + ["Offset of field: AVDetectionBBoxHeader::nb_bboxes"] + [::std::mem::offset_of!(AVDetectionBBoxHeader, nb_bboxes) - 256usize]; + ["Offset of field: AVDetectionBBoxHeader::bboxes_offset"] + [::std::mem::offset_of!(AVDetectionBBoxHeader, bboxes_offset) - 264usize]; + ["Offset of field: AVDetectionBBoxHeader::bbox_size"] + [::std::mem::offset_of!(AVDetectionBBoxHeader, bbox_size) - 272usize]; +}; extern "C" { #[doc = " Allocates memory for AVDetectionBBoxHeader, plus an array of {@code nb_bboxes}\n AVDetectionBBox, and initializes the variables.\n Can be freed with a normal av_free() call.\n\n @param nb_bboxes number of AVDetectionBBox structures to allocate\n @param out_size if non-NULL, the size in bytes of the resulting data array is\n written here."] pub fn av_detection_bbox_alloc( @@ -24933,107 +15418,32 @@ pub struct AVDOVIDecoderConfigurationRecord { pub bl_present_flag: u8, pub dv_bl_signal_compatibility_id: u8, } -#[test] -fn bindgen_test_layout_AVDOVIDecoderConfigurationRecord() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AVDOVIDecoderConfigurationRecord)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!( - "Alignment of ", - stringify!(AVDOVIDecoderConfigurationRecord) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dv_version_major) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIDecoderConfigurationRecord), - "::", - stringify!(dv_version_major) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dv_version_minor) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIDecoderConfigurationRecord), - "::", - stringify!(dv_version_minor) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dv_profile) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIDecoderConfigurationRecord), - "::", - stringify!(dv_profile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dv_level) as usize - ptr as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIDecoderConfigurationRecord), - "::", - stringify!(dv_level) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rpu_present_flag) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIDecoderConfigurationRecord), - "::", - stringify!(rpu_present_flag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).el_present_flag) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIDecoderConfigurationRecord), - "::", - stringify!(el_present_flag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bl_present_flag) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIDecoderConfigurationRecord), - "::", - stringify!(bl_present_flag) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).dv_bl_signal_compatibility_id) as usize - ptr as usize - }, - 7usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIDecoderConfigurationRecord), - "::", - stringify!(dv_bl_signal_compatibility_id) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDOVIDecoderConfigurationRecord"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of AVDOVIDecoderConfigurationRecord"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: AVDOVIDecoderConfigurationRecord::dv_version_major"] + [::std::mem::offset_of!(AVDOVIDecoderConfigurationRecord, dv_version_major) - 0usize]; + ["Offset of field: AVDOVIDecoderConfigurationRecord::dv_version_minor"] + [::std::mem::offset_of!(AVDOVIDecoderConfigurationRecord, dv_version_minor) - 1usize]; + ["Offset of field: AVDOVIDecoderConfigurationRecord::dv_profile"] + [::std::mem::offset_of!(AVDOVIDecoderConfigurationRecord, dv_profile) - 2usize]; + ["Offset of field: AVDOVIDecoderConfigurationRecord::dv_level"] + [::std::mem::offset_of!(AVDOVIDecoderConfigurationRecord, dv_level) - 3usize]; + ["Offset of field: AVDOVIDecoderConfigurationRecord::rpu_present_flag"] + [::std::mem::offset_of!(AVDOVIDecoderConfigurationRecord, rpu_present_flag) - 4usize]; + ["Offset of field: AVDOVIDecoderConfigurationRecord::el_present_flag"] + [::std::mem::offset_of!(AVDOVIDecoderConfigurationRecord, el_present_flag) - 5usize]; + ["Offset of field: AVDOVIDecoderConfigurationRecord::bl_present_flag"] + [::std::mem::offset_of!(AVDOVIDecoderConfigurationRecord, bl_present_flag) - 6usize]; + ["Offset of field: AVDOVIDecoderConfigurationRecord::dv_bl_signal_compatibility_id"][::std::mem::offset_of!( + AVDOVIDecoderConfigurationRecord, + dv_bl_signal_compatibility_id + ) + - 7usize]; +}; extern "C" { #[doc = " Allocate a AVDOVIDecoderConfigurationRecord structure and initialize its\n fields to default values.\n\n @return the newly allocated struct or NULL on failure"] pub fn av_dovi_alloc(size: *mut usize) -> *mut AVDOVIDecoderConfigurationRecord; @@ -25058,178 +15468,43 @@ pub struct AVDOVIRpuDataHeader { pub el_spatial_resampling_filter_flag: u8, pub disable_residual_flag: u8, } -#[test] -fn bindgen_test_layout_AVDOVIRpuDataHeader() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 18usize, - concat!("Size of: ", stringify!(AVDOVIRpuDataHeader)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(AVDOVIRpuDataHeader)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rpu_type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIRpuDataHeader), - "::", - stringify!(rpu_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rpu_format) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIRpuDataHeader), - "::", - stringify!(rpu_format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vdr_rpu_profile) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIRpuDataHeader), - "::", - stringify!(vdr_rpu_profile) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vdr_rpu_level) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIRpuDataHeader), - "::", - stringify!(vdr_rpu_level) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).chroma_resampling_explicit_filter_flag) as usize - - ptr as usize - }, - 6usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIRpuDataHeader), - "::", - stringify!(chroma_resampling_explicit_filter_flag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).coef_data_type) as usize - ptr as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIRpuDataHeader), - "::", - stringify!(coef_data_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).coef_log2_denom) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIRpuDataHeader), - "::", - stringify!(coef_log2_denom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vdr_rpu_normalized_idc) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIRpuDataHeader), - "::", - stringify!(vdr_rpu_normalized_idc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bl_video_full_range_flag) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIRpuDataHeader), - "::", - stringify!(bl_video_full_range_flag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bl_bit_depth) as usize - ptr as usize }, - 11usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIRpuDataHeader), - "::", - stringify!(bl_bit_depth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).el_bit_depth) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIRpuDataHeader), - "::", - stringify!(el_bit_depth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vdr_bit_depth) as usize - ptr as usize }, - 13usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIRpuDataHeader), - "::", - stringify!(vdr_bit_depth) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).spatial_resampling_filter_flag) as usize - ptr as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIRpuDataHeader), - "::", - stringify!(spatial_resampling_filter_flag) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).el_spatial_resampling_filter_flag) as usize - ptr as usize - }, - 15usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIRpuDataHeader), - "::", - stringify!(el_spatial_resampling_filter_flag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).disable_residual_flag) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIRpuDataHeader), - "::", - stringify!(disable_residual_flag) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDOVIRpuDataHeader"][::std::mem::size_of::() - 18usize]; + ["Alignment of AVDOVIRpuDataHeader"][::std::mem::align_of::() - 2usize]; + ["Offset of field: AVDOVIRpuDataHeader::rpu_type"] + [::std::mem::offset_of!(AVDOVIRpuDataHeader, rpu_type) - 0usize]; + ["Offset of field: AVDOVIRpuDataHeader::rpu_format"] + [::std::mem::offset_of!(AVDOVIRpuDataHeader, rpu_format) - 2usize]; + ["Offset of field: AVDOVIRpuDataHeader::vdr_rpu_profile"] + [::std::mem::offset_of!(AVDOVIRpuDataHeader, vdr_rpu_profile) - 4usize]; + ["Offset of field: AVDOVIRpuDataHeader::vdr_rpu_level"] + [::std::mem::offset_of!(AVDOVIRpuDataHeader, vdr_rpu_level) - 5usize]; + ["Offset of field: AVDOVIRpuDataHeader::chroma_resampling_explicit_filter_flag"][::std::mem::offset_of!( + AVDOVIRpuDataHeader, + chroma_resampling_explicit_filter_flag + ) - 6usize]; + ["Offset of field: AVDOVIRpuDataHeader::coef_data_type"] + [::std::mem::offset_of!(AVDOVIRpuDataHeader, coef_data_type) - 7usize]; + ["Offset of field: AVDOVIRpuDataHeader::coef_log2_denom"] + [::std::mem::offset_of!(AVDOVIRpuDataHeader, coef_log2_denom) - 8usize]; + ["Offset of field: AVDOVIRpuDataHeader::vdr_rpu_normalized_idc"] + [::std::mem::offset_of!(AVDOVIRpuDataHeader, vdr_rpu_normalized_idc) - 9usize]; + ["Offset of field: AVDOVIRpuDataHeader::bl_video_full_range_flag"] + [::std::mem::offset_of!(AVDOVIRpuDataHeader, bl_video_full_range_flag) - 10usize]; + ["Offset of field: AVDOVIRpuDataHeader::bl_bit_depth"] + [::std::mem::offset_of!(AVDOVIRpuDataHeader, bl_bit_depth) - 11usize]; + ["Offset of field: AVDOVIRpuDataHeader::el_bit_depth"] + [::std::mem::offset_of!(AVDOVIRpuDataHeader, el_bit_depth) - 12usize]; + ["Offset of field: AVDOVIRpuDataHeader::vdr_bit_depth"] + [::std::mem::offset_of!(AVDOVIRpuDataHeader, vdr_bit_depth) - 13usize]; + ["Offset of field: AVDOVIRpuDataHeader::spatial_resampling_filter_flag"] + [::std::mem::offset_of!(AVDOVIRpuDataHeader, spatial_resampling_filter_flag) - 14usize]; + ["Offset of field: AVDOVIRpuDataHeader::el_spatial_resampling_filter_flag"] + [::std::mem::offset_of!(AVDOVIRpuDataHeader, el_spatial_resampling_filter_flag) - 15usize]; + ["Offset of field: AVDOVIRpuDataHeader::disable_residual_flag"] + [::std::mem::offset_of!(AVDOVIRpuDataHeader, disable_residual_flag) - 16usize]; +}; pub const AV_DOVI_MAPPING_POLYNOMIAL: AVDOVIMappingMethod = 0; pub const AV_DOVI_MAPPING_MMR: AVDOVIMappingMethod = 1; pub type AVDOVIMappingMethod = ::std::os::raw::c_uint; @@ -25238,108 +15513,34 @@ pub type AVDOVIMappingMethod = ::std::os::raw::c_uint; pub struct AVDOVIReshapingCurve { pub num_pivots: u8, pub pivots: [u16; 9usize], - pub mapping_idc: [AVDOVIMappingMethod; 8usize], - pub poly_order: [u8; 8usize], - pub poly_coef: [[i64; 3usize]; 8usize], - pub mmr_order: [u8; 8usize], - pub mmr_constant: [i64; 8usize], - pub mmr_coef: [[[i64; 7usize]; 3usize]; 8usize], -} -#[test] -fn bindgen_test_layout_AVDOVIReshapingCurve() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 1672usize, - concat!("Size of: ", stringify!(AVDOVIReshapingCurve)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVDOVIReshapingCurve)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).num_pivots) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIReshapingCurve), - "::", - stringify!(num_pivots) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pivots) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIReshapingCurve), - "::", - stringify!(pivots) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mapping_idc) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIReshapingCurve), - "::", - stringify!(mapping_idc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).poly_order) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIReshapingCurve), - "::", - stringify!(poly_order) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).poly_coef) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIReshapingCurve), - "::", - stringify!(poly_coef) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mmr_order) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIReshapingCurve), - "::", - stringify!(mmr_order) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mmr_constant) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIReshapingCurve), - "::", - stringify!(mmr_constant) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mmr_coef) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIReshapingCurve), - "::", - stringify!(mmr_coef) - ) - ); + pub mapping_idc: [AVDOVIMappingMethod; 8usize], + pub poly_order: [u8; 8usize], + pub poly_coef: [[i64; 3usize]; 8usize], + pub mmr_order: [u8; 8usize], + pub mmr_constant: [i64; 8usize], + pub mmr_coef: [[[i64; 7usize]; 3usize]; 8usize], } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDOVIReshapingCurve"][::std::mem::size_of::() - 1672usize]; + ["Alignment of AVDOVIReshapingCurve"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVDOVIReshapingCurve::num_pivots"] + [::std::mem::offset_of!(AVDOVIReshapingCurve, num_pivots) - 0usize]; + ["Offset of field: AVDOVIReshapingCurve::pivots"] + [::std::mem::offset_of!(AVDOVIReshapingCurve, pivots) - 2usize]; + ["Offset of field: AVDOVIReshapingCurve::mapping_idc"] + [::std::mem::offset_of!(AVDOVIReshapingCurve, mapping_idc) - 20usize]; + ["Offset of field: AVDOVIReshapingCurve::poly_order"] + [::std::mem::offset_of!(AVDOVIReshapingCurve, poly_order) - 52usize]; + ["Offset of field: AVDOVIReshapingCurve::poly_coef"] + [::std::mem::offset_of!(AVDOVIReshapingCurve, poly_coef) - 64usize]; + ["Offset of field: AVDOVIReshapingCurve::mmr_order"] + [::std::mem::offset_of!(AVDOVIReshapingCurve, mmr_order) - 256usize]; + ["Offset of field: AVDOVIReshapingCurve::mmr_constant"] + [::std::mem::offset_of!(AVDOVIReshapingCurve, mmr_constant) - 264usize]; + ["Offset of field: AVDOVIReshapingCurve::mmr_coef"] + [::std::mem::offset_of!(AVDOVIReshapingCurve, mmr_coef) - 328usize]; +}; pub const AV_DOVI_NLQ_NONE: AVDOVINLQMethod = -1; pub const AV_DOVI_NLQ_LINEAR_DZ: AVDOVINLQMethod = 0; pub type AVDOVINLQMethod = ::std::os::raw::c_int; @@ -25352,61 +15553,19 @@ pub struct AVDOVINLQParams { pub linear_deadzone_slope: u64, pub linear_deadzone_threshold: u64, } -#[test] -fn bindgen_test_layout_AVDOVINLQParams() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(AVDOVINLQParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVDOVINLQParams)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nlq_offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDOVINLQParams), - "::", - stringify!(nlq_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vdr_in_max) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVDOVINLQParams), - "::", - stringify!(vdr_in_max) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).linear_deadzone_slope) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVDOVINLQParams), - "::", - stringify!(linear_deadzone_slope) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).linear_deadzone_threshold) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVDOVINLQParams), - "::", - stringify!(linear_deadzone_threshold) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDOVINLQParams"][::std::mem::size_of::() - 32usize]; + ["Alignment of AVDOVINLQParams"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVDOVINLQParams::nlq_offset"] + [::std::mem::offset_of!(AVDOVINLQParams, nlq_offset) - 0usize]; + ["Offset of field: AVDOVINLQParams::vdr_in_max"] + [::std::mem::offset_of!(AVDOVINLQParams, vdr_in_max) - 8usize]; + ["Offset of field: AVDOVINLQParams::linear_deadzone_slope"] + [::std::mem::offset_of!(AVDOVINLQParams, linear_deadzone_slope) - 16usize]; + ["Offset of field: AVDOVINLQParams::linear_deadzone_threshold"] + [::std::mem::offset_of!(AVDOVINLQParams, linear_deadzone_threshold) - 24usize]; +}; #[doc = " Dolby Vision RPU data mapping parameters.\n\n @note sizeof(AVDOVIDataMapping) is not part of the public ABI."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -25420,101 +15579,27 @@ pub struct AVDOVIDataMapping { pub num_y_partitions: u32, pub nlq: [AVDOVINLQParams; 3usize], } -#[test] -fn bindgen_test_layout_AVDOVIDataMapping() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 5136usize, - concat!("Size of: ", stringify!(AVDOVIDataMapping)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVDOVIDataMapping)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).vdr_rpu_id) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIDataMapping), - "::", - stringify!(vdr_rpu_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mapping_color_space) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIDataMapping), - "::", - stringify!(mapping_color_space) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mapping_chroma_format_idc) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIDataMapping), - "::", - stringify!(mapping_chroma_format_idc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).curves) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIDataMapping), - "::", - stringify!(curves) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nlq_method_idc) as usize - ptr as usize }, - 5024usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIDataMapping), - "::", - stringify!(nlq_method_idc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).num_x_partitions) as usize - ptr as usize }, - 5028usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIDataMapping), - "::", - stringify!(num_x_partitions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).num_y_partitions) as usize - ptr as usize }, - 5032usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIDataMapping), - "::", - stringify!(num_y_partitions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nlq) as usize - ptr as usize }, - 5040usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIDataMapping), - "::", - stringify!(nlq) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDOVIDataMapping"][::std::mem::size_of::() - 5136usize]; + ["Alignment of AVDOVIDataMapping"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVDOVIDataMapping::vdr_rpu_id"] + [::std::mem::offset_of!(AVDOVIDataMapping, vdr_rpu_id) - 0usize]; + ["Offset of field: AVDOVIDataMapping::mapping_color_space"] + [::std::mem::offset_of!(AVDOVIDataMapping, mapping_color_space) - 1usize]; + ["Offset of field: AVDOVIDataMapping::mapping_chroma_format_idc"] + [::std::mem::offset_of!(AVDOVIDataMapping, mapping_chroma_format_idc) - 2usize]; + ["Offset of field: AVDOVIDataMapping::curves"] + [::std::mem::offset_of!(AVDOVIDataMapping, curves) - 8usize]; + ["Offset of field: AVDOVIDataMapping::nlq_method_idc"] + [::std::mem::offset_of!(AVDOVIDataMapping, nlq_method_idc) - 5024usize]; + ["Offset of field: AVDOVIDataMapping::num_x_partitions"] + [::std::mem::offset_of!(AVDOVIDataMapping, num_x_partitions) - 5028usize]; + ["Offset of field: AVDOVIDataMapping::num_y_partitions"] + [::std::mem::offset_of!(AVDOVIDataMapping, num_y_partitions) - 5032usize]; + ["Offset of field: AVDOVIDataMapping::nlq"] + [::std::mem::offset_of!(AVDOVIDataMapping, nlq) - 5040usize]; +}; #[doc = " Dolby Vision RPU colorspace metadata parameters.\n\n @note sizeof(AVDOVIColorMetadata) is not part of the public ABI."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -25538,181 +15623,43 @@ pub struct AVDOVIColorMetadata { pub source_max_pq: u16, pub source_diagonal: u16, } -#[test] -fn bindgen_test_layout_AVDOVIColorMetadata() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 196usize, - concat!("Size of: ", stringify!(AVDOVIColorMetadata)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVDOVIColorMetadata)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dm_metadata_id) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIColorMetadata), - "::", - stringify!(dm_metadata_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).scene_refresh_flag) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIColorMetadata), - "::", - stringify!(scene_refresh_flag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ycc_to_rgb_matrix) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIColorMetadata), - "::", - stringify!(ycc_to_rgb_matrix) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ycc_to_rgb_offset) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIColorMetadata), - "::", - stringify!(ycc_to_rgb_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rgb_to_lms_matrix) as usize - ptr as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIColorMetadata), - "::", - stringify!(rgb_to_lms_matrix) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).signal_eotf) as usize - ptr as usize }, - 172usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIColorMetadata), - "::", - stringify!(signal_eotf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).signal_eotf_param0) as usize - ptr as usize }, - 174usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIColorMetadata), - "::", - stringify!(signal_eotf_param0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).signal_eotf_param1) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIColorMetadata), - "::", - stringify!(signal_eotf_param1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).signal_eotf_param2) as usize - ptr as usize }, - 180usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIColorMetadata), - "::", - stringify!(signal_eotf_param2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).signal_bit_depth) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIColorMetadata), - "::", - stringify!(signal_bit_depth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).signal_color_space) as usize - ptr as usize }, - 185usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIColorMetadata), - "::", - stringify!(signal_color_space) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).signal_chroma_format) as usize - ptr as usize }, - 186usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIColorMetadata), - "::", - stringify!(signal_chroma_format) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).signal_full_range_flag) as usize - ptr as usize }, - 187usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIColorMetadata), - "::", - stringify!(signal_full_range_flag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source_min_pq) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIColorMetadata), - "::", - stringify!(source_min_pq) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source_max_pq) as usize - ptr as usize }, - 190usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIColorMetadata), - "::", - stringify!(source_max_pq) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source_diagonal) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIColorMetadata), - "::", - stringify!(source_diagonal) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDOVIColorMetadata"][::std::mem::size_of::() - 196usize]; + ["Alignment of AVDOVIColorMetadata"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVDOVIColorMetadata::dm_metadata_id"] + [::std::mem::offset_of!(AVDOVIColorMetadata, dm_metadata_id) - 0usize]; + ["Offset of field: AVDOVIColorMetadata::scene_refresh_flag"] + [::std::mem::offset_of!(AVDOVIColorMetadata, scene_refresh_flag) - 1usize]; + ["Offset of field: AVDOVIColorMetadata::ycc_to_rgb_matrix"] + [::std::mem::offset_of!(AVDOVIColorMetadata, ycc_to_rgb_matrix) - 4usize]; + ["Offset of field: AVDOVIColorMetadata::ycc_to_rgb_offset"] + [::std::mem::offset_of!(AVDOVIColorMetadata, ycc_to_rgb_offset) - 76usize]; + ["Offset of field: AVDOVIColorMetadata::rgb_to_lms_matrix"] + [::std::mem::offset_of!(AVDOVIColorMetadata, rgb_to_lms_matrix) - 100usize]; + ["Offset of field: AVDOVIColorMetadata::signal_eotf"] + [::std::mem::offset_of!(AVDOVIColorMetadata, signal_eotf) - 172usize]; + ["Offset of field: AVDOVIColorMetadata::signal_eotf_param0"] + [::std::mem::offset_of!(AVDOVIColorMetadata, signal_eotf_param0) - 174usize]; + ["Offset of field: AVDOVIColorMetadata::signal_eotf_param1"] + [::std::mem::offset_of!(AVDOVIColorMetadata, signal_eotf_param1) - 176usize]; + ["Offset of field: AVDOVIColorMetadata::signal_eotf_param2"] + [::std::mem::offset_of!(AVDOVIColorMetadata, signal_eotf_param2) - 180usize]; + ["Offset of field: AVDOVIColorMetadata::signal_bit_depth"] + [::std::mem::offset_of!(AVDOVIColorMetadata, signal_bit_depth) - 184usize]; + ["Offset of field: AVDOVIColorMetadata::signal_color_space"] + [::std::mem::offset_of!(AVDOVIColorMetadata, signal_color_space) - 185usize]; + ["Offset of field: AVDOVIColorMetadata::signal_chroma_format"] + [::std::mem::offset_of!(AVDOVIColorMetadata, signal_chroma_format) - 186usize]; + ["Offset of field: AVDOVIColorMetadata::signal_full_range_flag"] + [::std::mem::offset_of!(AVDOVIColorMetadata, signal_full_range_flag) - 187usize]; + ["Offset of field: AVDOVIColorMetadata::source_min_pq"] + [::std::mem::offset_of!(AVDOVIColorMetadata, source_min_pq) - 188usize]; + ["Offset of field: AVDOVIColorMetadata::source_max_pq"] + [::std::mem::offset_of!(AVDOVIColorMetadata, source_max_pq) - 190usize]; + ["Offset of field: AVDOVIColorMetadata::source_diagonal"] + [::std::mem::offset_of!(AVDOVIColorMetadata, source_diagonal) - 192usize]; +}; #[doc = " Combined struct representing a combination of header, mapping and color\n metadata, for attaching to frames as side data.\n\n @note The struct must be allocated with av_dovi_metadata_alloc() and\n its size is not a part of the public ABI."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -25722,51 +15669,17 @@ pub struct AVDOVIMetadata { pub mapping_offset: usize, pub color_offset: usize, } -#[test] -fn bindgen_test_layout_AVDOVIMetadata() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(AVDOVIMetadata)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVDOVIMetadata)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).header_offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIMetadata), - "::", - stringify!(header_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mapping_offset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIMetadata), - "::", - stringify!(mapping_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_offset) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVDOVIMetadata), - "::", - stringify!(color_offset) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDOVIMetadata"][::std::mem::size_of::() - 24usize]; + ["Alignment of AVDOVIMetadata"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVDOVIMetadata::header_offset"] + [::std::mem::offset_of!(AVDOVIMetadata, header_offset) - 0usize]; + ["Offset of field: AVDOVIMetadata::mapping_offset"] + [::std::mem::offset_of!(AVDOVIMetadata, mapping_offset) - 8usize]; + ["Offset of field: AVDOVIMetadata::color_offset"] + [::std::mem::offset_of!(AVDOVIMetadata, color_offset) - 16usize]; +}; extern "C" { #[doc = " Allocate an AVDOVIMetadata structure and initialize its\n fields to default values.\n\n @param size If this parameter is non-NULL, the size in bytes of the\n allocated struct will be written here on success\n\n @return the newly allocated struct or NULL on failure"] pub fn av_dovi_metadata_alloc(size: *mut usize) -> *mut AVDOVIMetadata; @@ -25800,81 +15713,23 @@ pub struct AVDownmixInfo { #[doc = " Absolute scale factor representing the level at which the LFE data is\n mixed into L/R channels during downmixing."] pub lfe_mix_level: f64, } -#[test] -fn bindgen_test_layout_AVDownmixInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(AVDownmixInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVDownmixInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).preferred_downmix_type) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDownmixInfo), - "::", - stringify!(preferred_downmix_type) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).center_mix_level) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVDownmixInfo), - "::", - stringify!(center_mix_level) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).center_mix_level_ltrt) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVDownmixInfo), - "::", - stringify!(center_mix_level_ltrt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).surround_mix_level) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVDownmixInfo), - "::", - stringify!(surround_mix_level) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).surround_mix_level_ltrt) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVDownmixInfo), - "::", - stringify!(surround_mix_level_ltrt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lfe_mix_level) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVDownmixInfo), - "::", - stringify!(lfe_mix_level) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDownmixInfo"][::std::mem::size_of::() - 48usize]; + ["Alignment of AVDownmixInfo"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVDownmixInfo::preferred_downmix_type"] + [::std::mem::offset_of!(AVDownmixInfo, preferred_downmix_type) - 0usize]; + ["Offset of field: AVDownmixInfo::center_mix_level"] + [::std::mem::offset_of!(AVDownmixInfo, center_mix_level) - 8usize]; + ["Offset of field: AVDownmixInfo::center_mix_level_ltrt"] + [::std::mem::offset_of!(AVDownmixInfo, center_mix_level_ltrt) - 16usize]; + ["Offset of field: AVDownmixInfo::surround_mix_level"] + [::std::mem::offset_of!(AVDownmixInfo, surround_mix_level) - 24usize]; + ["Offset of field: AVDownmixInfo::surround_mix_level_ltrt"] + [::std::mem::offset_of!(AVDownmixInfo, surround_mix_level_ltrt) - 32usize]; + ["Offset of field: AVDownmixInfo::lfe_mix_level"] + [::std::mem::offset_of!(AVDownmixInfo, lfe_mix_level) - 40usize]; +}; extern "C" { #[doc = " Get a frame's AV_FRAME_DATA_DOWNMIX_INFO side data for editing.\n\n If the side data is absent, it is created and added to the frame.\n\n @param frame the frame for which the side data is to be obtained or created\n\n @return the AVDownmixInfo structure to be edited by the caller, or NULL if\n the structure cannot be allocated."] pub fn av_downmix_info_update_side_data(frame: *mut AVFrame) -> *mut AVDownmixInfo; @@ -25887,42 +15742,17 @@ pub struct AVSubsampleEncryptionInfo { #[doc = " The number of bytes that are protected. If using pattern encryption,\n the pattern applies to only the protected bytes; if not using pattern\n encryption, all these bytes are encrypted."] pub bytes_of_protected_data: ::std::os::raw::c_uint, } -#[test] -fn bindgen_test_layout_AVSubsampleEncryptionInfo() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AVSubsampleEncryptionInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVSubsampleEncryptionInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bytes_of_clear_data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVSubsampleEncryptionInfo), - "::", - stringify!(bytes_of_clear_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bytes_of_protected_data) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVSubsampleEncryptionInfo), - "::", - stringify!(bytes_of_protected_data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVSubsampleEncryptionInfo"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of AVSubsampleEncryptionInfo"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AVSubsampleEncryptionInfo::bytes_of_clear_data"] + [::std::mem::offset_of!(AVSubsampleEncryptionInfo, bytes_of_clear_data) - 0usize]; + ["Offset of field: AVSubsampleEncryptionInfo::bytes_of_protected_data"] + [::std::mem::offset_of!(AVSubsampleEncryptionInfo, bytes_of_protected_data) - 4usize]; +}; #[doc = " This describes encryption info for a packet. This contains frame-specific\n info for how to decrypt the packet before passing it to the decoder.\n\n The size of this struct is not part of the public ABI."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -25943,111 +15773,29 @@ pub struct AVEncryptionInfo { pub subsamples: *mut AVSubsampleEncryptionInfo, pub subsample_count: u32, } -#[test] -fn bindgen_test_layout_AVEncryptionInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(AVEncryptionInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVEncryptionInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVEncryptionInfo), - "::", - stringify!(scheme) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).crypt_byte_block) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVEncryptionInfo), - "::", - stringify!(crypt_byte_block) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).skip_byte_block) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVEncryptionInfo), - "::", - stringify!(skip_byte_block) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).key_id) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVEncryptionInfo), - "::", - stringify!(key_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).key_id_size) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVEncryptionInfo), - "::", - stringify!(key_id_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVEncryptionInfo), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv_size) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVEncryptionInfo), - "::", - stringify!(iv_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).subsamples) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVEncryptionInfo), - "::", - stringify!(subsamples) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).subsample_count) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVEncryptionInfo), - "::", - stringify!(subsample_count) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVEncryptionInfo"][::std::mem::size_of::() - 64usize]; + ["Alignment of AVEncryptionInfo"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVEncryptionInfo::scheme"] + [::std::mem::offset_of!(AVEncryptionInfo, scheme) - 0usize]; + ["Offset of field: AVEncryptionInfo::crypt_byte_block"] + [::std::mem::offset_of!(AVEncryptionInfo, crypt_byte_block) - 4usize]; + ["Offset of field: AVEncryptionInfo::skip_byte_block"] + [::std::mem::offset_of!(AVEncryptionInfo, skip_byte_block) - 8usize]; + ["Offset of field: AVEncryptionInfo::key_id"] + [::std::mem::offset_of!(AVEncryptionInfo, key_id) - 16usize]; + ["Offset of field: AVEncryptionInfo::key_id_size"] + [::std::mem::offset_of!(AVEncryptionInfo, key_id_size) - 24usize]; + ["Offset of field: AVEncryptionInfo::iv"] + [::std::mem::offset_of!(AVEncryptionInfo, iv) - 32usize]; + ["Offset of field: AVEncryptionInfo::iv_size"] + [::std::mem::offset_of!(AVEncryptionInfo, iv_size) - 40usize]; + ["Offset of field: AVEncryptionInfo::subsamples"] + [::std::mem::offset_of!(AVEncryptionInfo, subsamples) - 48usize]; + ["Offset of field: AVEncryptionInfo::subsample_count"] + [::std::mem::offset_of!(AVEncryptionInfo, subsample_count) - 56usize]; +}; #[doc = " This describes info used to initialize an encryption key system.\n\n The size of this struct is not part of the public ABI."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -26067,101 +15815,27 @@ pub struct AVEncryptionInitInfo { #[doc = " An optional pointer to the next initialization info in the list."] pub next: *mut AVEncryptionInitInfo, } -#[test] -fn bindgen_test_layout_AVEncryptionInitInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(AVEncryptionInitInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVEncryptionInitInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).system_id) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVEncryptionInitInfo), - "::", - stringify!(system_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).system_id_size) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVEncryptionInitInfo), - "::", - stringify!(system_id_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).key_ids) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVEncryptionInitInfo), - "::", - stringify!(key_ids) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).num_key_ids) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVEncryptionInitInfo), - "::", - stringify!(num_key_ids) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).key_id_size) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AVEncryptionInitInfo), - "::", - stringify!(key_id_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVEncryptionInitInfo), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data_size) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVEncryptionInitInfo), - "::", - stringify!(data_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVEncryptionInitInfo), - "::", - stringify!(next) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVEncryptionInitInfo"][::std::mem::size_of::() - 56usize]; + ["Alignment of AVEncryptionInitInfo"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVEncryptionInitInfo::system_id"] + [::std::mem::offset_of!(AVEncryptionInitInfo, system_id) - 0usize]; + ["Offset of field: AVEncryptionInitInfo::system_id_size"] + [::std::mem::offset_of!(AVEncryptionInitInfo, system_id_size) - 8usize]; + ["Offset of field: AVEncryptionInitInfo::key_ids"] + [::std::mem::offset_of!(AVEncryptionInitInfo, key_ids) - 16usize]; + ["Offset of field: AVEncryptionInitInfo::num_key_ids"] + [::std::mem::offset_of!(AVEncryptionInitInfo, num_key_ids) - 24usize]; + ["Offset of field: AVEncryptionInitInfo::key_id_size"] + [::std::mem::offset_of!(AVEncryptionInitInfo, key_id_size) - 28usize]; + ["Offset of field: AVEncryptionInitInfo::data"] + [::std::mem::offset_of!(AVEncryptionInitInfo, data) - 32usize]; + ["Offset of field: AVEncryptionInitInfo::data_size"] + [::std::mem::offset_of!(AVEncryptionInitInfo, data_size) - 40usize]; + ["Offset of field: AVEncryptionInitInfo::next"] + [::std::mem::offset_of!(AVEncryptionInitInfo, next) - 48usize]; +}; extern "C" { #[doc = " Allocates an AVEncryptionInfo structure and sub-pointers to hold the given\n number of subsamples. This will allocate pointers for the key ID, IV,\n and subsample entries, set the size members, and zero-initialize the rest.\n\n @param subsample_count The number of subsamples.\n @param key_id_size The number of bytes in the key ID, should be 16.\n @param iv_size The number of bytes in the IV, should be 16.\n\n @return The new AVEncryptionInfo structure, or NULL on error."] pub fn av_encryption_info_alloc( @@ -26279,7 +15953,7 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Track the presence of user provided functions and their number of occurrences\n in a parsed expression.\n\n @param e the AVExpr to track user provided functions in\n @param counter a zero-initialized array where the count of each function will be stored\n if you passed 5 functions with 2 arguments to av_expr_parse()\n then for arg=2 this will use upto 5 entries.\n @param size size of array\n @param arg number of arguments the counted functions have\n @return 0 on success, a negative value indicates that no expression or array was passed\n or size was zero"] + #[doc = " Track the presence of user provided functions and their number of occurrences\n in a parsed expression.\n\n @param e the AVExpr to track user provided functions in\n @param counter a zero-initialized array where the count of each function will be stored\n if you passed 5 functions with 2 arguments to av_expr_parse()\n then for arg=2 this will use up to 5 entries.\n @param size size of array\n @param arg number of arguments the counted functions have\n @return 0 on success, a negative value indicates that no expression or array was passed\n or size was zero"] pub fn av_expr_count_func( e: *mut AVExpr, counter: *mut ::std::os::raw::c_uint, @@ -26308,31 +15982,12 @@ pub struct AVExecutor { pub struct AVTask { pub next: *mut AVTask, } -#[test] -fn bindgen_test_layout_AVTask() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AVTask)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVTask)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVTask), - "::", - stringify!(next) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVTask"][::std::mem::size_of::() - 8usize]; + ["Alignment of AVTask"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVTask::next"][::std::mem::offset_of!(AVTask, next) - 0usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AVTaskCallbacks { @@ -26355,71 +16010,21 @@ pub struct AVTaskCallbacks { ) -> ::std::os::raw::c_int, >, } -#[test] -fn bindgen_test_layout_AVTaskCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(AVTaskCallbacks)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVTaskCallbacks)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).user_data) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVTaskCallbacks), - "::", - stringify!(user_data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).local_context_size) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVTaskCallbacks), - "::", - stringify!(local_context_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).priority_higher) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVTaskCallbacks), - "::", - stringify!(priority_higher) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ready) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVTaskCallbacks), - "::", - stringify!(ready) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).run) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVTaskCallbacks), - "::", - stringify!(run) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVTaskCallbacks"][::std::mem::size_of::() - 40usize]; + ["Alignment of AVTaskCallbacks"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVTaskCallbacks::user_data"] + [::std::mem::offset_of!(AVTaskCallbacks, user_data) - 0usize]; + ["Offset of field: AVTaskCallbacks::local_context_size"] + [::std::mem::offset_of!(AVTaskCallbacks, local_context_size) - 8usize]; + ["Offset of field: AVTaskCallbacks::priority_higher"] + [::std::mem::offset_of!(AVTaskCallbacks, priority_higher) - 16usize]; + ["Offset of field: AVTaskCallbacks::ready"] + [::std::mem::offset_of!(AVTaskCallbacks, ready) - 24usize]; + ["Offset of field: AVTaskCallbacks::run"] + [::std::mem::offset_of!(AVTaskCallbacks, run) - 32usize]; +}; extern "C" { #[doc = " Alloc executor\n @param callbacks callback structure for executor\n @param thread_count worker thread number\n @return return the executor"] pub fn av_executor_alloc( @@ -26520,217 +16125,25 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Feed data from a FIFO into a user-provided callback.\n\n @param f the FIFO buffer\n @param write_cb Callback the data will be supplied to. May be called\n multiple times.\n @param opaque opaque user data to be provided to write_cb\n @param nb_elems Should point to the maximum number of elements that can be\n read. Will be updated to contain the total number of elements\n actually sent to the callback.\n @param offset number of initial elements to skip; offset + *nb_elems must not\n be larger than av_fifo_can_read(f).\n\n @return a non-negative number on success, a negative error code on failure"] - pub fn av_fifo_peek_to_cb( - f: *const AVFifo, - write_cb: AVFifoCB, - opaque: *mut ::std::os::raw::c_void, - nb_elems: *mut usize, - offset: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[doc = " Discard the specified amount of data from an AVFifo.\n @param size number of elements to discard, MUST NOT be larger than\n av_fifo_can_read(f)"] - pub fn av_fifo_drain2(f: *mut AVFifo, size: usize); -} -extern "C" { - pub fn av_fifo_reset2(f: *mut AVFifo); -} -extern "C" { - #[doc = " Free an AVFifo and reset pointer to NULL.\n @param f Pointer to an AVFifo to free. *f == NULL is allowed."] - pub fn av_fifo_freep2(f: *mut *mut AVFifo); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct AVFifoBuffer { - pub buffer: *mut u8, - pub rptr: *mut u8, - pub wptr: *mut u8, - pub end: *mut u8, - pub rndx: u32, - pub wndx: u32, -} -#[test] -fn bindgen_test_layout_AVFifoBuffer() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(AVFifoBuffer)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVFifoBuffer)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFifoBuffer), - "::", - stringify!(buffer) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rptr) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVFifoBuffer), - "::", - stringify!(rptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wptr) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVFifoBuffer), - "::", - stringify!(wptr) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).end) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVFifoBuffer), - "::", - stringify!(end) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rndx) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVFifoBuffer), - "::", - stringify!(rndx) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).wndx) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(AVFifoBuffer), - "::", - stringify!(wndx) - ) - ); -} -extern "C" { - #[doc = " Initialize an AVFifoBuffer.\n @param size of FIFO\n @return AVFifoBuffer or NULL in case of memory allocation failure\n @deprecated use av_fifo_alloc2()"] - pub fn av_fifo_alloc(size: ::std::os::raw::c_uint) -> *mut AVFifoBuffer; -} -extern "C" { - #[doc = " Initialize an AVFifoBuffer.\n @param nmemb number of elements\n @param size size of the single element\n @return AVFifoBuffer or NULL in case of memory allocation failure\n @deprecated use av_fifo_alloc2()"] - pub fn av_fifo_alloc_array(nmemb: usize, size: usize) -> *mut AVFifoBuffer; -} -extern "C" { - #[doc = " Free an AVFifoBuffer.\n @param f AVFifoBuffer to free\n @deprecated use the AVFifo API with av_fifo_freep2()"] - pub fn av_fifo_free(f: *mut AVFifoBuffer); -} -extern "C" { - #[doc = " Free an AVFifoBuffer and reset pointer to NULL.\n @param f AVFifoBuffer to free\n @deprecated use the AVFifo API with av_fifo_freep2()"] - pub fn av_fifo_freep(f: *mut *mut AVFifoBuffer); -} -extern "C" { - #[doc = " Reset the AVFifoBuffer to the state right after av_fifo_alloc, in particular it is emptied.\n @param f AVFifoBuffer to reset\n @deprecated use av_fifo_reset2() with the new AVFifo-API"] - pub fn av_fifo_reset(f: *mut AVFifoBuffer); -} -extern "C" { - #[doc = " Return the amount of data in bytes in the AVFifoBuffer, that is the\n amount of data you can read from it.\n @param f AVFifoBuffer to read from\n @return size\n @deprecated use av_fifo_can_read() with the new AVFifo-API"] - pub fn av_fifo_size(f: *const AVFifoBuffer) -> ::std::os::raw::c_int; -} -extern "C" { - #[doc = " Return the amount of space in bytes in the AVFifoBuffer, that is the\n amount of data you can write into it.\n @param f AVFifoBuffer to write into\n @return size\n @deprecated use av_fifo_can_write() with the new AVFifo-API"] - pub fn av_fifo_space(f: *const AVFifoBuffer) -> ::std::os::raw::c_int; -} -extern "C" { - #[doc = " Feed data at specific position from an AVFifoBuffer to a user-supplied callback.\n Similar as av_fifo_gereric_read but without discarding data.\n @param f AVFifoBuffer to read from\n @param offset offset from current read position\n @param buf_size number of bytes to read\n @param func generic read function\n @param dest data destination\n\n @return a non-negative number on success, a negative error code on failure\n\n @deprecated use the new AVFifo-API with av_fifo_peek() when func == NULL,\n av_fifo_peek_to_cb() otherwise"] - pub fn av_fifo_generic_peek_at( - f: *mut AVFifoBuffer, - dest: *mut ::std::os::raw::c_void, - offset: ::std::os::raw::c_int, - buf_size: ::std::os::raw::c_int, - func: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - ), - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[doc = " Feed data from an AVFifoBuffer to a user-supplied callback.\n Similar as av_fifo_gereric_read but without discarding data.\n @param f AVFifoBuffer to read from\n @param buf_size number of bytes to read\n @param func generic read function\n @param dest data destination\n\n @return a non-negative number on success, a negative error code on failure\n\n @deprecated use the new AVFifo-API with av_fifo_peek() when func == NULL,\n av_fifo_peek_to_cb() otherwise"] - pub fn av_fifo_generic_peek( - f: *mut AVFifoBuffer, - dest: *mut ::std::os::raw::c_void, - buf_size: ::std::os::raw::c_int, - func: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - ), - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[doc = " Feed data from an AVFifoBuffer to a user-supplied callback.\n @param f AVFifoBuffer to read from\n @param buf_size number of bytes to read\n @param func generic read function\n @param dest data destination\n\n @return a non-negative number on success, a negative error code on failure\n\n @deprecated use the new AVFifo-API with av_fifo_read() when func == NULL,\n av_fifo_read_to_cb() otherwise"] - pub fn av_fifo_generic_read( - f: *mut AVFifoBuffer, - dest: *mut ::std::os::raw::c_void, - buf_size: ::std::os::raw::c_int, - func: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - ), - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[doc = " Feed data from a user-supplied callback to an AVFifoBuffer.\n @param f AVFifoBuffer to write to\n @param src data source; non-const since it may be used as a\n modifiable context by the function defined in func\n @param size number of bytes to write\n @param func generic write function; the first parameter is src,\n the second is dest_buf, the third is dest_buf_size.\n func must return the number of bytes written to dest_buf, or <= 0 to\n indicate no more data available to write.\n If func is NULL, src is interpreted as a simple byte array for source data.\n @return the number of bytes written to the FIFO or a negative error code on failure\n\n @deprecated use the new AVFifo-API with av_fifo_write() when func == NULL,\n av_fifo_write_from_cb() otherwise"] - pub fn av_fifo_generic_write( - f: *mut AVFifoBuffer, - src: *mut ::std::os::raw::c_void, - size: ::std::os::raw::c_int, - func: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[doc = " Resize an AVFifoBuffer.\n In case of reallocation failure, the old FIFO is kept unchanged.\n\n @param f AVFifoBuffer to resize\n @param size new AVFifoBuffer size in bytes\n @return <0 for failure, >=0 otherwise\n\n @deprecated use the new AVFifo-API with av_fifo_grow2() to increase FIFO size,\n decreasing FIFO size is not supported"] - pub fn av_fifo_realloc2( - f: *mut AVFifoBuffer, - size: ::std::os::raw::c_uint, + #[doc = " Feed data from a FIFO into a user-provided callback.\n\n @param f the FIFO buffer\n @param write_cb Callback the data will be supplied to. May be called\n multiple times.\n @param opaque opaque user data to be provided to write_cb\n @param nb_elems Should point to the maximum number of elements that can be\n read. Will be updated to contain the total number of elements\n actually sent to the callback.\n @param offset number of initial elements to skip; offset + *nb_elems must not\n be larger than av_fifo_can_read(f).\n\n @return a non-negative number on success, a negative error code on failure"] + pub fn av_fifo_peek_to_cb( + f: *const AVFifo, + write_cb: AVFifoCB, + opaque: *mut ::std::os::raw::c_void, + nb_elems: *mut usize, + offset: usize, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Enlarge an AVFifoBuffer.\n In case of reallocation failure, the old FIFO is kept unchanged.\n The new fifo size may be larger than the requested size.\n\n @param f AVFifoBuffer to resize\n @param additional_space the amount of space in bytes to allocate in addition to av_fifo_size()\n @return <0 for failure, >=0 otherwise\n\n @deprecated use the new AVFifo-API with av_fifo_grow2(); note that unlike\n this function it adds to the allocated size, rather than to the used size"] - pub fn av_fifo_grow( - f: *mut AVFifoBuffer, - additional_space: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; + #[doc = " Discard the specified amount of data from an AVFifo.\n @param size number of elements to discard, MUST NOT be larger than\n av_fifo_can_read(f)"] + pub fn av_fifo_drain2(f: *mut AVFifo, size: usize); +} +extern "C" { + pub fn av_fifo_reset2(f: *mut AVFifo); } extern "C" { - #[doc = " Read and discard the specified amount of data from an AVFifoBuffer.\n @param f AVFifoBuffer to read from\n @param size amount of data to read in bytes\n\n @deprecated use the new AVFifo-API with av_fifo_drain2()"] - pub fn av_fifo_drain(f: *mut AVFifoBuffer, size: ::std::os::raw::c_int); + #[doc = " Free an AVFifo and reset pointer to NULL.\n @param f Pointer to an AVFifo to free. *f == NULL is allowed."] + pub fn av_fifo_freep2(f: *mut *mut AVFifo); } extern "C" { #[doc = " Read the file with name filename, and put its content in a newly\n allocated buffer or map it with mmap() when available.\n In case of success set *bufptr to the read or mmapped buffer, and\n *size to the size in bytes of the buffer in *bufptr.\n Unlike mmap this function succeeds with zero sized files, in this\n case *bufptr will be set to NULL and *size will be set to 0.\n The returned buffer must be released with av_file_unmap().\n\n @param filename path to the file\n @param[out] bufptr pointee is set to the mapped or allocated buffer\n @param[out] size pointee is set to the size in bytes of the buffer\n @param log_offset loglevel offset used for logging\n @param log_ctx context used for logging\n @return a non negative number in case of success, a negative value\n corresponding to an AVERROR error code in case of failure"] @@ -26746,15 +16159,6 @@ extern "C" { #[doc = " Unmap or free the buffer bufptr created by av_file_map().\n\n @param bufptr the buffer previously created with av_file_map()\n @param size size in bytes of bufptr, must be the same as returned\n by av_file_map()"] pub fn av_file_unmap(bufptr: *mut u8, size: usize); } -extern "C" { - #[doc = " Wrapper to work around the lack of mkstemp() on mingw.\n Also, tries to create file in /tmp first, if possible.\n *prefix can be a character constant; *filename will be allocated internally.\n @return file descriptor of opened file (or negative value corresponding to an\n AVERROR code on error)\n and opened file name in **filename.\n @note On very old libcs it is necessary to set a secure umask before\n calling this, av_tempfile() can't call umask itself as it is used in\n libraries and could interfere with the calling application.\n @deprecated as fd numbers cannot be passed saftely between libs on some platforms"] - pub fn av_tempfile( - prefix: *const ::std::os::raw::c_char, - filename: *mut *mut ::std::os::raw::c_char, - log_offset: ::std::os::raw::c_int, - log_ctx: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} pub const AV_FILM_GRAIN_PARAMS_NONE: AVFilmGrainParamsType = 0; #[doc = " The union is valid when interpreted as AVFilmGrainAOMParams (codec.aom)"] pub const AV_FILM_GRAIN_PARAMS_AV1: AVFilmGrainParamsType = 1; @@ -26795,191 +16199,54 @@ pub struct AVFilmGrainAOMParams { #[doc = " Signals to clip to limited color levels after film grain application."] pub limit_output_range: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVFilmGrainAOMParams() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 208usize, - concat!("Size of: ", stringify!(AVFilmGrainAOMParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVFilmGrainAOMParams)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).num_y_points) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainAOMParams), - "::", - stringify!(num_y_points) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y_points) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainAOMParams), - "::", - stringify!(y_points) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chroma_scaling_from_luma) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainAOMParams), - "::", - stringify!(chroma_scaling_from_luma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).num_uv_points) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainAOMParams), - "::", - stringify!(num_uv_points) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uv_points) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainAOMParams), - "::", - stringify!(uv_points) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).scaling_shift) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainAOMParams), - "::", - stringify!(scaling_shift) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ar_coeff_lag) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainAOMParams), - "::", - stringify!(ar_coeff_lag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ar_coeffs_y) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainAOMParams), - "::", - stringify!(ar_coeffs_y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ar_coeffs_uv) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainAOMParams), - "::", - stringify!(ar_coeffs_uv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ar_coeff_shift) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainAOMParams), - "::", - stringify!(ar_coeff_shift) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).grain_scale_shift) as usize - ptr as usize }, - 172usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainAOMParams), - "::", - stringify!(grain_scale_shift) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uv_mult) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainAOMParams), - "::", - stringify!(uv_mult) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uv_mult_luma) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainAOMParams), - "::", - stringify!(uv_mult_luma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).uv_offset) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainAOMParams), - "::", - stringify!(uv_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).overlap_flag) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainAOMParams), - "::", - stringify!(overlap_flag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).limit_output_range) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainAOMParams), - "::", - stringify!(limit_output_range) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFilmGrainAOMParams"][::std::mem::size_of::() - 208usize]; + ["Alignment of AVFilmGrainAOMParams"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVFilmGrainAOMParams::num_y_points"] + [::std::mem::offset_of!(AVFilmGrainAOMParams, num_y_points) - 0usize]; + ["Offset of field: AVFilmGrainAOMParams::y_points"] + [::std::mem::offset_of!(AVFilmGrainAOMParams, y_points) - 4usize]; + ["Offset of field: AVFilmGrainAOMParams::chroma_scaling_from_luma"] + [::std::mem::offset_of!(AVFilmGrainAOMParams, chroma_scaling_from_luma) - 32usize]; + ["Offset of field: AVFilmGrainAOMParams::num_uv_points"] + [::std::mem::offset_of!(AVFilmGrainAOMParams, num_uv_points) - 36usize]; + ["Offset of field: AVFilmGrainAOMParams::uv_points"] + [::std::mem::offset_of!(AVFilmGrainAOMParams, uv_points) - 44usize]; + ["Offset of field: AVFilmGrainAOMParams::scaling_shift"] + [::std::mem::offset_of!(AVFilmGrainAOMParams, scaling_shift) - 84usize]; + ["Offset of field: AVFilmGrainAOMParams::ar_coeff_lag"] + [::std::mem::offset_of!(AVFilmGrainAOMParams, ar_coeff_lag) - 88usize]; + ["Offset of field: AVFilmGrainAOMParams::ar_coeffs_y"] + [::std::mem::offset_of!(AVFilmGrainAOMParams, ar_coeffs_y) - 92usize]; + ["Offset of field: AVFilmGrainAOMParams::ar_coeffs_uv"] + [::std::mem::offset_of!(AVFilmGrainAOMParams, ar_coeffs_uv) - 116usize]; + ["Offset of field: AVFilmGrainAOMParams::ar_coeff_shift"] + [::std::mem::offset_of!(AVFilmGrainAOMParams, ar_coeff_shift) - 168usize]; + ["Offset of field: AVFilmGrainAOMParams::grain_scale_shift"] + [::std::mem::offset_of!(AVFilmGrainAOMParams, grain_scale_shift) - 172usize]; + ["Offset of field: AVFilmGrainAOMParams::uv_mult"] + [::std::mem::offset_of!(AVFilmGrainAOMParams, uv_mult) - 176usize]; + ["Offset of field: AVFilmGrainAOMParams::uv_mult_luma"] + [::std::mem::offset_of!(AVFilmGrainAOMParams, uv_mult_luma) - 184usize]; + ["Offset of field: AVFilmGrainAOMParams::uv_offset"] + [::std::mem::offset_of!(AVFilmGrainAOMParams, uv_offset) - 192usize]; + ["Offset of field: AVFilmGrainAOMParams::overlap_flag"] + [::std::mem::offset_of!(AVFilmGrainAOMParams, overlap_flag) - 200usize]; + ["Offset of field: AVFilmGrainAOMParams::limit_output_range"] + [::std::mem::offset_of!(AVFilmGrainAOMParams, limit_output_range) - 204usize]; +}; #[doc = " This structure describes how to handle film grain synthesis for codecs using\n the ITU-T H.274 Versatile suplemental enhancement information message.\n\n @note The struct must be allocated as part of AVFilmGrainParams using\n av_film_grain_params_alloc(). Its size is not a part of the public ABI."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AVFilmGrainH274Params { #[doc = " Specifies the film grain simulation mode.\n 0 = Frequency filtering, 1 = Auto-regression"] pub model_id: ::std::os::raw::c_int, - #[doc = " Specifies the bit depth used for the luma component."] + #[doc = " Specifies the bit depth used for the luma component.\n\n @deprecated use AVFilmGrainParams.bit_depth_luma."] pub bit_depth_luma: ::std::os::raw::c_int, - #[doc = " Specifies the bit depth used for the chroma components."] + #[doc = " Specifies the bit depth used for the chroma components.\n\n @deprecated use AVFilmGrainParams.bit_depth_chroma."] pub bit_depth_chroma: ::std::os::raw::c_int, + #[doc = " Specifies the video signal characteristics.\n\n @deprecated use AVFilmGrainParams.color_{range,primaries,trc,space}."] pub color_range: AVColorRange, pub color_primaries: AVColorPrimaries, pub color_trc: AVColorTransferCharacteristic, @@ -27001,176 +16268,42 @@ pub struct AVFilmGrainH274Params { #[doc = " Specifies the model values for the component for each intensity interval.\n - When model_id == 0, the following applies:\n For comp_model_value[y], the range of values is [0, 2^bit_depth_luma - 1]\n For comp_model_value[cb..cr], the range of values is [0, 2^bit_depth_chroma - 1]\n - Otherwise, the following applies:\n For comp_model_value[y], the range of values is [-2^(bit_depth_luma - 1), 2^(bit_depth_luma - 1) - 1]\n For comp_model_value[cb..cr], the range of values is [-2^(bit_depth_chroma - 1), 2^(bit_depth_chroma - 1) - 1]"] pub comp_model_value: [[[i16; 6usize]; 256usize]; 3usize], } -#[test] -fn bindgen_test_layout_AVFilmGrainH274Params() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 10812usize, - concat!("Size of: ", stringify!(AVFilmGrainH274Params)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVFilmGrainH274Params)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).model_id) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainH274Params), - "::", - stringify!(model_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bit_depth_luma) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainH274Params), - "::", - stringify!(bit_depth_luma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bit_depth_chroma) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainH274Params), - "::", - stringify!(bit_depth_chroma) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_range) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainH274Params), - "::", - stringify!(color_range) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_primaries) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainH274Params), - "::", - stringify!(color_primaries) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_trc) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainH274Params), - "::", - stringify!(color_trc) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_space) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainH274Params), - "::", - stringify!(color_space) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).blending_mode_id) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainH274Params), - "::", - stringify!(blending_mode_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).log2_scale_factor) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainH274Params), - "::", - stringify!(log2_scale_factor) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).component_model_present) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainH274Params), - "::", - stringify!(component_model_present) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).num_intensity_intervals) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainH274Params), - "::", - stringify!(num_intensity_intervals) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).num_model_values) as usize - ptr as usize }, - 54usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainH274Params), - "::", - stringify!(num_model_values) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).intensity_interval_lower_bound) as usize - ptr as usize - }, - 57usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainH274Params), - "::", - stringify!(intensity_interval_lower_bound) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).intensity_interval_upper_bound) as usize - ptr as usize - }, - 825usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainH274Params), - "::", - stringify!(intensity_interval_upper_bound) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).comp_model_value) as usize - ptr as usize }, - 1594usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainH274Params), - "::", - stringify!(comp_model_value) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFilmGrainH274Params"][::std::mem::size_of::() - 10812usize]; + ["Alignment of AVFilmGrainH274Params"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AVFilmGrainH274Params::model_id"] + [::std::mem::offset_of!(AVFilmGrainH274Params, model_id) - 0usize]; + ["Offset of field: AVFilmGrainH274Params::bit_depth_luma"] + [::std::mem::offset_of!(AVFilmGrainH274Params, bit_depth_luma) - 4usize]; + ["Offset of field: AVFilmGrainH274Params::bit_depth_chroma"] + [::std::mem::offset_of!(AVFilmGrainH274Params, bit_depth_chroma) - 8usize]; + ["Offset of field: AVFilmGrainH274Params::color_range"] + [::std::mem::offset_of!(AVFilmGrainH274Params, color_range) - 12usize]; + ["Offset of field: AVFilmGrainH274Params::color_primaries"] + [::std::mem::offset_of!(AVFilmGrainH274Params, color_primaries) - 16usize]; + ["Offset of field: AVFilmGrainH274Params::color_trc"] + [::std::mem::offset_of!(AVFilmGrainH274Params, color_trc) - 20usize]; + ["Offset of field: AVFilmGrainH274Params::color_space"] + [::std::mem::offset_of!(AVFilmGrainH274Params, color_space) - 24usize]; + ["Offset of field: AVFilmGrainH274Params::blending_mode_id"] + [::std::mem::offset_of!(AVFilmGrainH274Params, blending_mode_id) - 28usize]; + ["Offset of field: AVFilmGrainH274Params::log2_scale_factor"] + [::std::mem::offset_of!(AVFilmGrainH274Params, log2_scale_factor) - 32usize]; + ["Offset of field: AVFilmGrainH274Params::component_model_present"] + [::std::mem::offset_of!(AVFilmGrainH274Params, component_model_present) - 36usize]; + ["Offset of field: AVFilmGrainH274Params::num_intensity_intervals"] + [::std::mem::offset_of!(AVFilmGrainH274Params, num_intensity_intervals) - 48usize]; + ["Offset of field: AVFilmGrainH274Params::num_model_values"] + [::std::mem::offset_of!(AVFilmGrainH274Params, num_model_values) - 54usize]; + ["Offset of field: AVFilmGrainH274Params::intensity_interval_lower_bound"] + [::std::mem::offset_of!(AVFilmGrainH274Params, intensity_interval_lower_bound) - 57usize]; + ["Offset of field: AVFilmGrainH274Params::intensity_interval_upper_bound"] + [::std::mem::offset_of!(AVFilmGrainH274Params, intensity_interval_upper_bound) - 825usize]; + ["Offset of field: AVFilmGrainH274Params::comp_model_value"] + [::std::mem::offset_of!(AVFilmGrainH274Params, comp_model_value) - 1594usize]; +}; #[doc = " This structure describes how to handle film grain synthesis in video\n for specific codecs. Must be present on every frame where film grain is\n meant to be synthesised for correct presentation.\n\n @note The struct must be allocated with av_film_grain_params_alloc() and\n its size is not a part of the public ABI."] #[repr(C)] #[derive(Copy, Clone)] @@ -27180,107 +16313,80 @@ pub struct AVFilmGrainParams { #[doc = " Seed to use for the synthesis process, if the codec allows for it.\n\n @note For H.264, this refers to `pic_offset` as defined in\n SMPTE RDD 5-2006."] pub seed: u64, pub codec: AVFilmGrainParams__bindgen_ty_1, + #[doc = " Intended display resolution. May be 0 if the codec does not specify\n any restrictions."] + pub width: ::std::os::raw::c_int, + #[doc = " Intended display resolution. May be 0 if the codec does not specify\n any restrictions."] + pub height: ::std::os::raw::c_int, + #[doc = " Intended subsampling ratio, or 0 for luma-only streams."] + pub subsampling_x: ::std::os::raw::c_int, + #[doc = " Intended subsampling ratio, or 0 for luma-only streams."] + pub subsampling_y: ::std::os::raw::c_int, + #[doc = " Intended video signal characteristics."] + pub color_range: AVColorRange, + pub color_primaries: AVColorPrimaries, + pub color_trc: AVColorTransferCharacteristic, + pub color_space: AVColorSpace, + #[doc = " Intended bit depth, or 0 for unknown/unspecified."] + pub bit_depth_luma: ::std::os::raw::c_int, + pub bit_depth_chroma: ::std::os::raw::c_int, } -#[doc = " Additional fields may be added both here and in any structure included.\n If a codec's film grain structure differs slightly over another\n codec's, fields within may change meaning depending on the type."] +#[doc = " Additional fields may be added both here and in any structure included.\n If a codec's film grain structure differs slightly over another\n codec's, fields within may change meaning depending on the type.\n\n TODO: Move this to the end of the structure, at the next ABI bump."] #[repr(C)] #[derive(Copy, Clone)] pub union AVFilmGrainParams__bindgen_ty_1 { pub aom: AVFilmGrainAOMParams, pub h274: AVFilmGrainH274Params, } -#[test] -fn bindgen_test_layout_AVFilmGrainParams__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 10812usize, - concat!("Size of: ", stringify!(AVFilmGrainParams__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVFilmGrainParams__bindgen_ty_1)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainParams__bindgen_ty_1), - "::", - stringify!(aom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h274) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainParams__bindgen_ty_1), - "::", - stringify!(h274) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFilmGrainParams__bindgen_ty_1"] + [::std::mem::size_of::() - 10812usize]; + ["Alignment of AVFilmGrainParams__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AVFilmGrainParams__bindgen_ty_1::aom"] + [::std::mem::offset_of!(AVFilmGrainParams__bindgen_ty_1, aom) - 0usize]; + ["Offset of field: AVFilmGrainParams__bindgen_ty_1::h274"] + [::std::mem::offset_of!(AVFilmGrainParams__bindgen_ty_1, h274) - 0usize]; +}; impl ::std::fmt::Debug for AVFilmGrainParams__bindgen_ty_1 { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "AVFilmGrainParams__bindgen_ty_1 {{ union }}") } } -#[test] -fn bindgen_test_layout_AVFilmGrainParams() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 10832usize, - concat!("Size of: ", stringify!(AVFilmGrainParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVFilmGrainParams)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainParams), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).seed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainParams), - "::", - stringify!(seed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).codec) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVFilmGrainParams), - "::", - stringify!(codec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVFilmGrainParams"][::std::mem::size_of::() - 10872usize]; + ["Alignment of AVFilmGrainParams"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVFilmGrainParams::type_"] + [::std::mem::offset_of!(AVFilmGrainParams, type_) - 0usize]; + ["Offset of field: AVFilmGrainParams::seed"] + [::std::mem::offset_of!(AVFilmGrainParams, seed) - 8usize]; + ["Offset of field: AVFilmGrainParams::codec"] + [::std::mem::offset_of!(AVFilmGrainParams, codec) - 16usize]; + ["Offset of field: AVFilmGrainParams::width"] + [::std::mem::offset_of!(AVFilmGrainParams, width) - 10828usize]; + ["Offset of field: AVFilmGrainParams::height"] + [::std::mem::offset_of!(AVFilmGrainParams, height) - 10832usize]; + ["Offset of field: AVFilmGrainParams::subsampling_x"] + [::std::mem::offset_of!(AVFilmGrainParams, subsampling_x) - 10836usize]; + ["Offset of field: AVFilmGrainParams::subsampling_y"] + [::std::mem::offset_of!(AVFilmGrainParams, subsampling_y) - 10840usize]; + ["Offset of field: AVFilmGrainParams::color_range"] + [::std::mem::offset_of!(AVFilmGrainParams, color_range) - 10844usize]; + ["Offset of field: AVFilmGrainParams::color_primaries"] + [::std::mem::offset_of!(AVFilmGrainParams, color_primaries) - 10848usize]; + ["Offset of field: AVFilmGrainParams::color_trc"] + [::std::mem::offset_of!(AVFilmGrainParams, color_trc) - 10852usize]; + ["Offset of field: AVFilmGrainParams::color_space"] + [::std::mem::offset_of!(AVFilmGrainParams, color_space) - 10856usize]; + ["Offset of field: AVFilmGrainParams::bit_depth_luma"] + [::std::mem::offset_of!(AVFilmGrainParams, bit_depth_luma) - 10860usize]; + ["Offset of field: AVFilmGrainParams::bit_depth_chroma"] + [::std::mem::offset_of!(AVFilmGrainParams, bit_depth_chroma) - 10864usize]; +}; impl ::std::fmt::Debug for AVFilmGrainParams { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!( - f, - "AVFilmGrainParams {{ type: {:?}, seed: {:?}, codec: {:?} }}", - self.type_, self.seed, self.codec - ) + write ! (f , "AVFilmGrainParams {{ type: {:?}, seed: {:?}, codec: {:?}, width: {:?}, height: {:?}, subsampling_x: {:?}, subsampling_y: {:?}, color_range: {:?}, color_primaries: {:?}, color_trc: {:?}, color_space: {:?}, bit_depth_luma: {:?}, bit_depth_chroma: {:?} }}" , self . type_ , self . seed , self . codec , self . width , self . height , self . subsampling_x , self . subsampling_y , self . color_range , self . color_primaries , self . color_trc , self . color_space , self . bit_depth_luma , self . bit_depth_chroma) } } extern "C" { @@ -27291,6 +16397,10 @@ extern "C" { #[doc = " Allocate a complete AVFilmGrainParams and add it to the frame.\n\n @param frame The frame which side data is added to.\n\n @return The AVFilmGrainParams structure to be filled by caller."] pub fn av_film_grain_params_create_side_data(frame: *mut AVFrame) -> *mut AVFilmGrainParams; } +extern "C" { + #[doc = " Select the most appropriate film grain parameters set for the frame,\n taking into account the frame's format, resolution and video signal\n characteristics.\n\n @note, for H.274, this may select a film grain parameter set with\n greater chroma resolution than the frame. Users should take care to\n correctly adjust the chroma grain frequency to the frame."] + pub fn av_film_grain_params_select(frame: *const AVFrame) -> *const AVFilmGrainParams; +} #[doc = " @example ffhash.c\n This example is a simple command line application that takes one or more\n arguments. It demonstrates a typical use of the hashing API with allocation,\n initialization, updating, and finalizing."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -27357,41 +16467,15 @@ pub struct AVHDRPlusPercentile { #[doc = " The linearized maxRGB value at a specific percentile in the processing\n window in the scene. The value shall be in the range of 0 to 1, inclusive\n and in multiples of 0.00001."] pub percentile: AVRational, } -#[test] -fn bindgen_test_layout_AVHDRPlusPercentile() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(AVHDRPlusPercentile)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVHDRPlusPercentile)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).percentage) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusPercentile), - "::", - stringify!(percentage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).percentile) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusPercentile), - "::", - stringify!(percentile) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVHDRPlusPercentile"][::std::mem::size_of::() - 12usize]; + ["Alignment of AVHDRPlusPercentile"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVHDRPlusPercentile::percentage"] + [::std::mem::offset_of!(AVHDRPlusPercentile, percentage) - 0usize]; + ["Offset of field: AVHDRPlusPercentile::percentile"] + [::std::mem::offset_of!(AVHDRPlusPercentile, percentile) - 4usize]; +}; #[doc = " Color transform parameters at a processing window in a dynamic metadata for\n SMPTE 2094-40."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -27436,474 +16520,177 @@ pub struct AVHDRPlusColorTransformParams { pub knee_point_y: AVRational, #[doc = " The number of the intermediate anchor parameters of the tone mapping\n function in the processing window. The maximum value shall be 15."] pub num_bezier_curve_anchors: u8, - #[doc = " The intermediate anchor parameters of the tone mapping function in the\n processing window in the scene. The values should be in the range of 0\n to 1, inclusive and in multiples of 1/1023."] - pub bezier_curve_anchors: [AVRational; 15usize], - #[doc = " This flag shall be equal to 0 in bitstreams conforming to this version of\n this Specification. Other values are reserved for future use."] - pub color_saturation_mapping_flag: u8, - #[doc = " The color saturation gain in the processing window in the scene. The\n value shall be in the range of 0 to 63/8, inclusive and in multiples of\n 1/8. The default value shall be 1."] - pub color_saturation_weight: AVRational, -} -#[test] -fn bindgen_test_layout_AVHDRPlusColorTransformParams() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 428usize, - concat!("Size of: ", stringify!(AVHDRPlusColorTransformParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVHDRPlusColorTransformParams)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).window_upper_left_corner_x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(window_upper_left_corner_x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).window_upper_left_corner_y) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(window_upper_left_corner_y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).window_lower_right_corner_x) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(window_lower_right_corner_x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).window_lower_right_corner_y) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(window_lower_right_corner_y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).center_of_ellipse_x) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(center_of_ellipse_x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).center_of_ellipse_y) as usize - ptr as usize }, - 34usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(center_of_ellipse_y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rotation_angle) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(rotation_angle) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).semimajor_axis_internal_ellipse) as usize - ptr as usize - }, - 38usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(semimajor_axis_internal_ellipse) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).semimajor_axis_external_ellipse) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(semimajor_axis_external_ellipse) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).semiminor_axis_external_ellipse) as usize - ptr as usize - }, - 42usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(semiminor_axis_external_ellipse) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).overlap_process_option) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(overlap_process_option) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).maxscl) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(maxscl) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).average_maxrgb) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(average_maxrgb) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).num_distribution_maxrgb_percentiles) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(num_distribution_maxrgb_percentiles) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).distribution_maxrgb) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(distribution_maxrgb) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fraction_bright_pixels) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(fraction_bright_pixels) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tone_mapping_flag) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(tone_mapping_flag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).knee_point_x) as usize - ptr as usize }, - 276usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(knee_point_x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).knee_point_y) as usize - ptr as usize }, - 284usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(knee_point_y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).num_bezier_curve_anchors) as usize - ptr as usize }, - 292usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(num_bezier_curve_anchors) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bezier_curve_anchors) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(bezier_curve_anchors) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).color_saturation_mapping_flag) as usize - ptr as usize - }, - 416usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(color_saturation_mapping_flag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_saturation_weight) as usize - ptr as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(AVHDRPlusColorTransformParams), - "::", - stringify!(color_saturation_weight) - ) - ); -} -#[doc = " This struct represents dynamic metadata for color volume transform -\n application 4 of SMPTE 2094-40:2016 standard.\n\n To be used as payload of a AVFrameSideData or AVPacketSideData with the\n appropriate type.\n\n @note The struct should be allocated with\n av_dynamic_hdr_plus_alloc() and its size is not a part of\n the public ABI."] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct AVDynamicHDRPlus { - #[doc = " Country code by Rec. ITU-T T.35 Annex A. The value shall be 0xB5."] - pub itu_t_t35_country_code: u8, - #[doc = " Application version in the application defining document in ST-2094\n suite. The value shall be set to 0."] - pub application_version: u8, - #[doc = " The number of processing windows. The value shall be in the range\n of 1 to 3, inclusive."] - pub num_windows: u8, - #[doc = " The color transform parameters for every processing window."] - pub params: [AVHDRPlusColorTransformParams; 3usize], - #[doc = " The nominal maximum display luminance of the targeted system display,\n in units of 0.0001 candelas per square metre. The value shall be in\n the range of 0 to 10000, inclusive."] - pub targeted_system_display_maximum_luminance: AVRational, - #[doc = " This flag shall be equal to 0 in bit streams conforming to this version\n of this Specification. The value 1 is reserved for future use."] - pub targeted_system_display_actual_peak_luminance_flag: u8, - #[doc = " The number of rows in the targeted system_display_actual_peak_luminance\n array. The value shall be in the range of 2 to 25, inclusive."] - pub num_rows_targeted_system_display_actual_peak_luminance: u8, - #[doc = " The number of columns in the\n targeted_system_display_actual_peak_luminance array. The value shall be\n in the range of 2 to 25, inclusive."] - pub num_cols_targeted_system_display_actual_peak_luminance: u8, - #[doc = " The normalized actual peak luminance of the targeted system display. The\n values should be in the range of 0 to 1, inclusive and in multiples of\n 1/15."] - pub targeted_system_display_actual_peak_luminance: [[AVRational; 25usize]; 25usize], - #[doc = " This flag shall be equal to 0 in bitstreams conforming to this version of\n this Specification. The value 1 is reserved for future use."] - pub mastering_display_actual_peak_luminance_flag: u8, - #[doc = " The number of rows in the mastering_display_actual_peak_luminance array.\n The value shall be in the range of 2 to 25, inclusive."] - pub num_rows_mastering_display_actual_peak_luminance: u8, - #[doc = " The number of columns in the mastering_display_actual_peak_luminance\n array. The value shall be in the range of 2 to 25, inclusive."] - pub num_cols_mastering_display_actual_peak_luminance: u8, - #[doc = " The normalized actual peak luminance of the mastering display used for\n mastering the image essence. The values should be in the range of 0 to 1,\n inclusive and in multiples of 1/15."] - pub mastering_display_actual_peak_luminance: [[AVRational; 25usize]; 25usize], -} -#[test] -fn bindgen_test_layout_AVDynamicHDRPlus() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 11304usize, - concat!("Size of: ", stringify!(AVDynamicHDRPlus)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVDynamicHDRPlus)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).itu_t_t35_country_code) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDynamicHDRPlus), - "::", - stringify!(itu_t_t35_country_code) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).application_version) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(AVDynamicHDRPlus), - "::", - stringify!(application_version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).num_windows) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(AVDynamicHDRPlus), - "::", - stringify!(num_windows) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVDynamicHDRPlus), - "::", - stringify!(params) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).targeted_system_display_maximum_luminance) as usize - - ptr as usize - }, - 1288usize, - concat!( - "Offset of field: ", - stringify!(AVDynamicHDRPlus), - "::", - stringify!(targeted_system_display_maximum_luminance) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).targeted_system_display_actual_peak_luminance_flag) as usize - - ptr as usize - }, - 1296usize, - concat!( - "Offset of field: ", - stringify!(AVDynamicHDRPlus), - "::", - stringify!(targeted_system_display_actual_peak_luminance_flag) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).num_rows_targeted_system_display_actual_peak_luminance) - as usize - - ptr as usize - }, - 1297usize, - concat!( - "Offset of field: ", - stringify!(AVDynamicHDRPlus), - "::", - stringify!(num_rows_targeted_system_display_actual_peak_luminance) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).num_cols_targeted_system_display_actual_peak_luminance) - as usize - - ptr as usize - }, - 1298usize, - concat!( - "Offset of field: ", - stringify!(AVDynamicHDRPlus), - "::", - stringify!(num_cols_targeted_system_display_actual_peak_luminance) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).targeted_system_display_actual_peak_luminance) as usize - - ptr as usize - }, - 1300usize, - concat!( - "Offset of field: ", - stringify!(AVDynamicHDRPlus), - "::", - stringify!(targeted_system_display_actual_peak_luminance) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).mastering_display_actual_peak_luminance_flag) as usize - - ptr as usize - }, - 6300usize, - concat!( - "Offset of field: ", - stringify!(AVDynamicHDRPlus), - "::", - stringify!(mastering_display_actual_peak_luminance_flag) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).num_rows_mastering_display_actual_peak_luminance) as usize - - ptr as usize - }, - 6301usize, - concat!( - "Offset of field: ", - stringify!(AVDynamicHDRPlus), - "::", - stringify!(num_rows_mastering_display_actual_peak_luminance) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).num_cols_mastering_display_actual_peak_luminance) as usize - - ptr as usize - }, - 6302usize, - concat!( - "Offset of field: ", - stringify!(AVDynamicHDRPlus), - "::", - stringify!(num_cols_mastering_display_actual_peak_luminance) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).mastering_display_actual_peak_luminance) as usize - - ptr as usize - }, - 6304usize, - concat!( - "Offset of field: ", - stringify!(AVDynamicHDRPlus), - "::", - stringify!(mastering_display_actual_peak_luminance) - ) - ); + #[doc = " The intermediate anchor parameters of the tone mapping function in the\n processing window in the scene. The values should be in the range of 0\n to 1, inclusive and in multiples of 1/1023."] + pub bezier_curve_anchors: [AVRational; 15usize], + #[doc = " This flag shall be equal to 0 in bitstreams conforming to this version of\n this Specification. Other values are reserved for future use."] + pub color_saturation_mapping_flag: u8, + #[doc = " The color saturation gain in the processing window in the scene. The\n value shall be in the range of 0 to 63/8, inclusive and in multiples of\n 1/8. The default value shall be 1."] + pub color_saturation_weight: AVRational, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVHDRPlusColorTransformParams"] + [::std::mem::size_of::() - 428usize]; + ["Alignment of AVHDRPlusColorTransformParams"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AVHDRPlusColorTransformParams::window_upper_left_corner_x"][::std::mem::offset_of!( + AVHDRPlusColorTransformParams, + window_upper_left_corner_x + ) - 0usize]; + ["Offset of field: AVHDRPlusColorTransformParams::window_upper_left_corner_y"][::std::mem::offset_of!( + AVHDRPlusColorTransformParams, + window_upper_left_corner_y + ) - 8usize]; + ["Offset of field: AVHDRPlusColorTransformParams::window_lower_right_corner_x"][::std::mem::offset_of!( + AVHDRPlusColorTransformParams, + window_lower_right_corner_x + ) - 16usize]; + ["Offset of field: AVHDRPlusColorTransformParams::window_lower_right_corner_y"][::std::mem::offset_of!( + AVHDRPlusColorTransformParams, + window_lower_right_corner_y + ) - 24usize]; + ["Offset of field: AVHDRPlusColorTransformParams::center_of_ellipse_x"] + [::std::mem::offset_of!(AVHDRPlusColorTransformParams, center_of_ellipse_x) - 32usize]; + ["Offset of field: AVHDRPlusColorTransformParams::center_of_ellipse_y"] + [::std::mem::offset_of!(AVHDRPlusColorTransformParams, center_of_ellipse_y) - 34usize]; + ["Offset of field: AVHDRPlusColorTransformParams::rotation_angle"] + [::std::mem::offset_of!(AVHDRPlusColorTransformParams, rotation_angle) - 36usize]; + ["Offset of field: AVHDRPlusColorTransformParams::semimajor_axis_internal_ellipse"][::std::mem::offset_of!( + AVHDRPlusColorTransformParams, + semimajor_axis_internal_ellipse + ) + - 38usize]; + ["Offset of field: AVHDRPlusColorTransformParams::semimajor_axis_external_ellipse"][::std::mem::offset_of!( + AVHDRPlusColorTransformParams, + semimajor_axis_external_ellipse + ) + - 40usize]; + ["Offset of field: AVHDRPlusColorTransformParams::semiminor_axis_external_ellipse"][::std::mem::offset_of!( + AVHDRPlusColorTransformParams, + semiminor_axis_external_ellipse + ) + - 42usize]; + ["Offset of field: AVHDRPlusColorTransformParams::overlap_process_option"] + [::std::mem::offset_of!(AVHDRPlusColorTransformParams, overlap_process_option) - 44usize]; + ["Offset of field: AVHDRPlusColorTransformParams::maxscl"] + [::std::mem::offset_of!(AVHDRPlusColorTransformParams, maxscl) - 48usize]; + ["Offset of field: AVHDRPlusColorTransformParams::average_maxrgb"] + [::std::mem::offset_of!(AVHDRPlusColorTransformParams, average_maxrgb) - 72usize]; + ["Offset of field: AVHDRPlusColorTransformParams::num_distribution_maxrgb_percentiles"][::std::mem::offset_of!( + AVHDRPlusColorTransformParams, + num_distribution_maxrgb_percentiles + ) + - 80usize]; + ["Offset of field: AVHDRPlusColorTransformParams::distribution_maxrgb"] + [::std::mem::offset_of!(AVHDRPlusColorTransformParams, distribution_maxrgb) - 84usize]; + ["Offset of field: AVHDRPlusColorTransformParams::fraction_bright_pixels"] + [::std::mem::offset_of!(AVHDRPlusColorTransformParams, fraction_bright_pixels) - 264usize]; + ["Offset of field: AVHDRPlusColorTransformParams::tone_mapping_flag"] + [::std::mem::offset_of!(AVHDRPlusColorTransformParams, tone_mapping_flag) - 272usize]; + ["Offset of field: AVHDRPlusColorTransformParams::knee_point_x"] + [::std::mem::offset_of!(AVHDRPlusColorTransformParams, knee_point_x) - 276usize]; + ["Offset of field: AVHDRPlusColorTransformParams::knee_point_y"] + [::std::mem::offset_of!(AVHDRPlusColorTransformParams, knee_point_y) - 284usize]; + ["Offset of field: AVHDRPlusColorTransformParams::num_bezier_curve_anchors"][::std::mem::offset_of!( + AVHDRPlusColorTransformParams, + num_bezier_curve_anchors + ) - 292usize]; + ["Offset of field: AVHDRPlusColorTransformParams::bezier_curve_anchors"] + [::std::mem::offset_of!(AVHDRPlusColorTransformParams, bezier_curve_anchors) - 296usize]; + ["Offset of field: AVHDRPlusColorTransformParams::color_saturation_mapping_flag"][::std::mem::offset_of!( + AVHDRPlusColorTransformParams, + color_saturation_mapping_flag + ) - 416usize]; + ["Offset of field: AVHDRPlusColorTransformParams::color_saturation_weight"] + [::std::mem::offset_of!(AVHDRPlusColorTransformParams, color_saturation_weight) - 420usize]; +}; +#[doc = " This struct represents dynamic metadata for color volume transform -\n application 4 of SMPTE 2094-40:2016 standard.\n\n To be used as payload of a AVFrameSideData or AVPacketSideData with the\n appropriate type.\n\n @note The struct should be allocated with\n av_dynamic_hdr_plus_alloc() and its size is not a part of\n the public ABI."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct AVDynamicHDRPlus { + #[doc = " Country code by Rec. ITU-T T.35 Annex A. The value shall be 0xB5."] + pub itu_t_t35_country_code: u8, + #[doc = " Application version in the application defining document in ST-2094\n suite. The value shall be set to 0."] + pub application_version: u8, + #[doc = " The number of processing windows. The value shall be in the range\n of 1 to 3, inclusive."] + pub num_windows: u8, + #[doc = " The color transform parameters for every processing window."] + pub params: [AVHDRPlusColorTransformParams; 3usize], + #[doc = " The nominal maximum display luminance of the targeted system display,\n in units of 0.0001 candelas per square metre. The value shall be in\n the range of 0 to 10000, inclusive."] + pub targeted_system_display_maximum_luminance: AVRational, + #[doc = " This flag shall be equal to 0 in bit streams conforming to this version\n of this Specification. The value 1 is reserved for future use."] + pub targeted_system_display_actual_peak_luminance_flag: u8, + #[doc = " The number of rows in the targeted system_display_actual_peak_luminance\n array. The value shall be in the range of 2 to 25, inclusive."] + pub num_rows_targeted_system_display_actual_peak_luminance: u8, + #[doc = " The number of columns in the\n targeted_system_display_actual_peak_luminance array. The value shall be\n in the range of 2 to 25, inclusive."] + pub num_cols_targeted_system_display_actual_peak_luminance: u8, + #[doc = " The normalized actual peak luminance of the targeted system display. The\n values should be in the range of 0 to 1, inclusive and in multiples of\n 1/15."] + pub targeted_system_display_actual_peak_luminance: [[AVRational; 25usize]; 25usize], + #[doc = " This flag shall be equal to 0 in bitstreams conforming to this version of\n this Specification. The value 1 is reserved for future use."] + pub mastering_display_actual_peak_luminance_flag: u8, + #[doc = " The number of rows in the mastering_display_actual_peak_luminance array.\n The value shall be in the range of 2 to 25, inclusive."] + pub num_rows_mastering_display_actual_peak_luminance: u8, + #[doc = " The number of columns in the mastering_display_actual_peak_luminance\n array. The value shall be in the range of 2 to 25, inclusive."] + pub num_cols_mastering_display_actual_peak_luminance: u8, + #[doc = " The normalized actual peak luminance of the mastering display used for\n mastering the image essence. The values should be in the range of 0 to 1,\n inclusive and in multiples of 1/15."] + pub mastering_display_actual_peak_luminance: [[AVRational; 25usize]; 25usize], } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDynamicHDRPlus"][::std::mem::size_of::() - 11304usize]; + ["Alignment of AVDynamicHDRPlus"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVDynamicHDRPlus::itu_t_t35_country_code"] + [::std::mem::offset_of!(AVDynamicHDRPlus, itu_t_t35_country_code) - 0usize]; + ["Offset of field: AVDynamicHDRPlus::application_version"] + [::std::mem::offset_of!(AVDynamicHDRPlus, application_version) - 1usize]; + ["Offset of field: AVDynamicHDRPlus::num_windows"] + [::std::mem::offset_of!(AVDynamicHDRPlus, num_windows) - 2usize]; + ["Offset of field: AVDynamicHDRPlus::params"] + [::std::mem::offset_of!(AVDynamicHDRPlus, params) - 4usize]; + ["Offset of field: AVDynamicHDRPlus::targeted_system_display_maximum_luminance"][::std::mem::offset_of!( + AVDynamicHDRPlus, + targeted_system_display_maximum_luminance + ) - 1288usize]; + ["Offset of field: AVDynamicHDRPlus::targeted_system_display_actual_peak_luminance_flag"][::std::mem::offset_of!( + AVDynamicHDRPlus, + targeted_system_display_actual_peak_luminance_flag + ) + - 1296usize]; + ["Offset of field: AVDynamicHDRPlus::num_rows_targeted_system_display_actual_peak_luminance"][::std::mem::offset_of!( + AVDynamicHDRPlus, + num_rows_targeted_system_display_actual_peak_luminance + ) + - 1297usize]; + ["Offset of field: AVDynamicHDRPlus::num_cols_targeted_system_display_actual_peak_luminance"][::std::mem::offset_of!( + AVDynamicHDRPlus, + num_cols_targeted_system_display_actual_peak_luminance + ) + - 1298usize]; + ["Offset of field: AVDynamicHDRPlus::targeted_system_display_actual_peak_luminance"][::std::mem::offset_of!( + AVDynamicHDRPlus, + targeted_system_display_actual_peak_luminance + ) + - 1300usize]; + ["Offset of field: AVDynamicHDRPlus::mastering_display_actual_peak_luminance_flag"][::std::mem::offset_of!( + AVDynamicHDRPlus, + mastering_display_actual_peak_luminance_flag + ) + - 6300usize]; + ["Offset of field: AVDynamicHDRPlus::num_rows_mastering_display_actual_peak_luminance"][::std::mem::offset_of!( + AVDynamicHDRPlus, + num_rows_mastering_display_actual_peak_luminance + ) + - 6301usize]; + ["Offset of field: AVDynamicHDRPlus::num_cols_mastering_display_actual_peak_luminance"][::std::mem::offset_of!( + AVDynamicHDRPlus, + num_cols_mastering_display_actual_peak_luminance + ) + - 6302usize]; + ["Offset of field: AVDynamicHDRPlus::mastering_display_actual_peak_luminance"][::std::mem::offset_of!( + AVDynamicHDRPlus, + mastering_display_actual_peak_luminance + ) - 6304usize]; +}; extern "C" { #[doc = " Allocate an AVDynamicHDRPlus structure and set its fields to\n default values. The resulting struct can be freed using av_freep().\n\n @return An AVDynamicHDRPlus filled with default values or NULL\n on failure."] pub fn av_dynamic_hdr_plus_alloc(size: *mut usize) -> *mut AVDynamicHDRPlus; @@ -27921,7 +16708,7 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Serialize dynamic HDR10+ metadata to a user data registered ITU-T T.35 buffer,\n excluding the first 48 bytes of the header, and beginning with the application mode.\n @param s A pointer containing the decoded AVDynamicHDRPlus structure.\n @param data[in,out] A pointer to pointer to a byte buffer to be filled with the\n serialized metadata.\n If *data is NULL, a buffer be will be allocated and a pointer to\n it stored in its place. The caller assumes ownership of the buffer.\n May be NULL, in which case the function will only store the\n required buffer size in *size.\n @param size[in,out] A pointer to a size to be set to the returned buffer's size.\n If *data is not NULL, *size must contain the size of the input\n buffer. May be NULL only if *data is NULL.\n\n @return >= 0 on success. Otherwise, returns the appropriate AVERROR."] + #[doc = " Serialize dynamic HDR10+ metadata to a user data registered ITU-T T.35 buffer,\n excluding the first 48 bytes of the header, and beginning with the application mode.\n @param s A pointer containing the decoded AVDynamicHDRPlus structure.\n @param[in,out] data A pointer to pointer to a byte buffer to be filled with the\n serialized metadata.\n If *data is NULL, a buffer be will be allocated and a pointer to\n it stored in its place. The caller assumes ownership of the buffer.\n May be NULL, in which case the function will only store the\n required buffer size in *size.\n @param[in,out] size A pointer to a size to be set to the returned buffer's size.\n If *data is not NULL, *size must contain the size of the input\n buffer. May be NULL only if *data is NULL.\n\n @return >= 0 on success. Otherwise, returns the appropriate AVERROR."] pub fn av_dynamic_hdr_plus_to_t35( s: *const AVDynamicHDRPlus, data: *mut *mut u8, @@ -27945,82 +16732,24 @@ pub struct AVHDRVivid3SplineParams { #[doc = " 3Spline_enable_Strength of three Spline.\n The value shall be in the range of 0.0 to 1.0, inclusive,\n and in multiples of 1.0/255."] pub enable_strength: AVRational, } -#[test] -fn bindgen_test_layout_AVHDRVivid3SplineParams() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 44usize, - concat!("Size of: ", stringify!(AVHDRVivid3SplineParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVHDRVivid3SplineParams)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).th_mode) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVivid3SplineParams), - "::", - stringify!(th_mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).th_enable_mb) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVivid3SplineParams), - "::", - stringify!(th_enable_mb) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).th_enable) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVivid3SplineParams), - "::", - stringify!(th_enable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).th_delta1) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVivid3SplineParams), - "::", - stringify!(th_delta1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).th_delta2) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVivid3SplineParams), - "::", - stringify!(th_delta2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).enable_strength) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVivid3SplineParams), - "::", - stringify!(enable_strength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVHDRVivid3SplineParams"][::std::mem::size_of::() - 44usize]; + ["Alignment of AVHDRVivid3SplineParams"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AVHDRVivid3SplineParams::th_mode"] + [::std::mem::offset_of!(AVHDRVivid3SplineParams, th_mode) - 0usize]; + ["Offset of field: AVHDRVivid3SplineParams::th_enable_mb"] + [::std::mem::offset_of!(AVHDRVivid3SplineParams, th_enable_mb) - 4usize]; + ["Offset of field: AVHDRVivid3SplineParams::th_enable"] + [::std::mem::offset_of!(AVHDRVivid3SplineParams, th_enable) - 12usize]; + ["Offset of field: AVHDRVivid3SplineParams::th_delta1"] + [::std::mem::offset_of!(AVHDRVivid3SplineParams, th_delta1) - 20usize]; + ["Offset of field: AVHDRVivid3SplineParams::th_delta2"] + [::std::mem::offset_of!(AVHDRVivid3SplineParams, th_delta2) - 28usize]; + ["Offset of field: AVHDRVivid3SplineParams::enable_strength"] + [::std::mem::offset_of!(AVHDRVivid3SplineParams, enable_strength) - 36usize]; +}; #[doc = " Color tone mapping parameters at a processing window in a dynamic metadata for\n CUVA 005.1:2021."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -28067,242 +16796,70 @@ pub struct AVHDRVividColorToneMappingParams { pub three_Spline_enable_Strength: AVRational, pub three_spline: [AVHDRVivid3SplineParams; 2usize], } -#[test] -fn bindgen_test_layout_AVHDRVividColorToneMappingParams() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 216usize, - concat!("Size of: ", stringify!(AVHDRVividColorToneMappingParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(AVHDRVividColorToneMappingParams) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).targeted_system_display_maximum_luminance) as usize - - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(targeted_system_display_maximum_luminance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).base_enable_flag) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(base_enable_flag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).base_param_m_p) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(base_param_m_p) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).base_param_m_m) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(base_param_m_m) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).base_param_m_a) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(base_param_m_a) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).base_param_m_b) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(base_param_m_b) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).base_param_m_n) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(base_param_m_n) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).base_param_k1) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(base_param_k1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).base_param_k2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(base_param_k2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).base_param_k3) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(base_param_k3) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).base_param_Delta_enable_mode) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(base_param_Delta_enable_mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).base_param_Delta) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(base_param_Delta) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).three_Spline_enable_flag) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(three_Spline_enable_flag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).three_Spline_num) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(three_Spline_num) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).three_Spline_TH_mode) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(three_Spline_TH_mode) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).three_Spline_TH_enable_MB) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(three_Spline_TH_enable_MB) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).three_Spline_TH_enable) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(three_Spline_TH_enable) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).three_Spline_TH_Delta1) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(three_Spline_TH_Delta1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).three_Spline_TH_Delta2) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(three_Spline_TH_Delta2) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).three_Spline_enable_Strength) as usize - ptr as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(three_Spline_enable_Strength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).three_spline) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorToneMappingParams), - "::", - stringify!(three_spline) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVHDRVividColorToneMappingParams"] + [::std::mem::size_of::() - 216usize]; + ["Alignment of AVHDRVividColorToneMappingParams"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::targeted_system_display_maximum_luminance"] [:: std :: mem :: offset_of ! (AVHDRVividColorToneMappingParams , targeted_system_display_maximum_luminance) - 0usize] ; + ["Offset of field: AVHDRVividColorToneMappingParams::base_enable_flag"] + [::std::mem::offset_of!(AVHDRVividColorToneMappingParams, base_enable_flag) - 8usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::base_param_m_p"] + [::std::mem::offset_of!(AVHDRVividColorToneMappingParams, base_param_m_p) - 12usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::base_param_m_m"] + [::std::mem::offset_of!(AVHDRVividColorToneMappingParams, base_param_m_m) - 20usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::base_param_m_a"] + [::std::mem::offset_of!(AVHDRVividColorToneMappingParams, base_param_m_a) - 28usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::base_param_m_b"] + [::std::mem::offset_of!(AVHDRVividColorToneMappingParams, base_param_m_b) - 36usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::base_param_m_n"] + [::std::mem::offset_of!(AVHDRVividColorToneMappingParams, base_param_m_n) - 44usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::base_param_k1"] + [::std::mem::offset_of!(AVHDRVividColorToneMappingParams, base_param_k1) - 52usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::base_param_k2"] + [::std::mem::offset_of!(AVHDRVividColorToneMappingParams, base_param_k2) - 56usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::base_param_k3"] + [::std::mem::offset_of!(AVHDRVividColorToneMappingParams, base_param_k3) - 60usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::base_param_Delta_enable_mode"][::std::mem::offset_of!( + AVHDRVividColorToneMappingParams, + base_param_Delta_enable_mode + ) + - 64usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::base_param_Delta"] + [::std::mem::offset_of!(AVHDRVividColorToneMappingParams, base_param_Delta) - 68usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::three_Spline_enable_flag"][::std::mem::offset_of!( + AVHDRVividColorToneMappingParams, + three_Spline_enable_flag + ) - 76usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::three_Spline_num"] + [::std::mem::offset_of!(AVHDRVividColorToneMappingParams, three_Spline_num) - 80usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::three_Spline_TH_mode"] + [::std::mem::offset_of!(AVHDRVividColorToneMappingParams, three_Spline_TH_mode) - 84usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::three_Spline_TH_enable_MB"][::std::mem::offset_of!( + AVHDRVividColorToneMappingParams, + three_Spline_TH_enable_MB + ) - 88usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::three_Spline_TH_enable"][::std::mem::offset_of!( + AVHDRVividColorToneMappingParams, + three_Spline_TH_enable + ) - 96usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::three_Spline_TH_Delta1"][::std::mem::offset_of!( + AVHDRVividColorToneMappingParams, + three_Spline_TH_Delta1 + ) - 104usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::three_Spline_TH_Delta2"][::std::mem::offset_of!( + AVHDRVividColorToneMappingParams, + three_Spline_TH_Delta2 + ) - 112usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::three_Spline_enable_Strength"][::std::mem::offset_of!( + AVHDRVividColorToneMappingParams, + three_Spline_enable_Strength + ) + - 120usize]; + ["Offset of field: AVHDRVividColorToneMappingParams::three_spline"] + [::std::mem::offset_of!(AVHDRVividColorToneMappingParams, three_spline) - 128usize]; +}; #[doc = " Color transform parameters at a processing window in a dynamic metadata for\n CUVA 005.1:2021."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -28328,124 +16885,36 @@ pub struct AVHDRVividColorTransformParams { #[doc = " Indicates the color correction strength parameter.\n The values should be in the range of 0.0 to 2.0, inclusive\n and in multiples of 1/128."] pub color_saturation_gain: [AVRational; 8usize], } -#[test] -fn bindgen_test_layout_AVHDRVividColorTransformParams() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 544usize, - concat!("Size of: ", stringify!(AVHDRVividColorTransformParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVHDRVividColorTransformParams)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).minimum_maxrgb) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorTransformParams), - "::", - stringify!(minimum_maxrgb) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).average_maxrgb) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorTransformParams), - "::", - stringify!(average_maxrgb) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).variance_maxrgb) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorTransformParams), - "::", - stringify!(variance_maxrgb) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).maximum_maxrgb) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorTransformParams), - "::", - stringify!(maximum_maxrgb) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tone_mapping_mode_flag) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorTransformParams), - "::", - stringify!(tone_mapping_mode_flag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tone_mapping_param_num) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorTransformParams), - "::", - stringify!(tone_mapping_param_num) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_params) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorTransformParams), - "::", - stringify!(tm_params) - ) - ); - assert_eq!( - unsafe { - ::std::ptr::addr_of!((*ptr).color_saturation_mapping_flag) as usize - ptr as usize - }, - 472usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorTransformParams), - "::", - stringify!(color_saturation_mapping_flag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_saturation_num) as usize - ptr as usize }, - 476usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorTransformParams), - "::", - stringify!(color_saturation_num) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).color_saturation_gain) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(AVHDRVividColorTransformParams), - "::", - stringify!(color_saturation_gain) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVHDRVividColorTransformParams"] + [::std::mem::size_of::() - 544usize]; + ["Alignment of AVHDRVividColorTransformParams"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AVHDRVividColorTransformParams::minimum_maxrgb"] + [::std::mem::offset_of!(AVHDRVividColorTransformParams, minimum_maxrgb) - 0usize]; + ["Offset of field: AVHDRVividColorTransformParams::average_maxrgb"] + [::std::mem::offset_of!(AVHDRVividColorTransformParams, average_maxrgb) - 8usize]; + ["Offset of field: AVHDRVividColorTransformParams::variance_maxrgb"] + [::std::mem::offset_of!(AVHDRVividColorTransformParams, variance_maxrgb) - 16usize]; + ["Offset of field: AVHDRVividColorTransformParams::maximum_maxrgb"] + [::std::mem::offset_of!(AVHDRVividColorTransformParams, maximum_maxrgb) - 24usize]; + ["Offset of field: AVHDRVividColorTransformParams::tone_mapping_mode_flag"] + [::std::mem::offset_of!(AVHDRVividColorTransformParams, tone_mapping_mode_flag) - 32usize]; + ["Offset of field: AVHDRVividColorTransformParams::tone_mapping_param_num"] + [::std::mem::offset_of!(AVHDRVividColorTransformParams, tone_mapping_param_num) - 36usize]; + ["Offset of field: AVHDRVividColorTransformParams::tm_params"] + [::std::mem::offset_of!(AVHDRVividColorTransformParams, tm_params) - 40usize]; + ["Offset of field: AVHDRVividColorTransformParams::color_saturation_mapping_flag"][::std::mem::offset_of!( + AVHDRVividColorTransformParams, + color_saturation_mapping_flag + ) + - 472usize]; + ["Offset of field: AVHDRVividColorTransformParams::color_saturation_num"] + [::std::mem::offset_of!(AVHDRVividColorTransformParams, color_saturation_num) - 476usize]; + ["Offset of field: AVHDRVividColorTransformParams::color_saturation_gain"] + [::std::mem::offset_of!(AVHDRVividColorTransformParams, color_saturation_gain) - 480usize]; +}; #[doc = " This struct represents dynamic metadata for color volume transform -\n CUVA 005.1:2021 standard\n\n To be used as payload of a AVFrameSideData or AVPacketSideData with the\n appropriate type.\n\n @note The struct should be allocated with\n av_dynamic_hdr_vivid_alloc() and its size is not a part of\n the public ABI."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -28457,51 +16926,17 @@ pub struct AVDynamicHDRVivid { #[doc = " The color transform parameters for every processing window."] pub params: [AVHDRVividColorTransformParams; 3usize], } -#[test] -fn bindgen_test_layout_AVDynamicHDRVivid() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 1636usize, - concat!("Size of: ", stringify!(AVDynamicHDRVivid)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVDynamicHDRVivid)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).system_start_code) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVDynamicHDRVivid), - "::", - stringify!(system_start_code) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).num_windows) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(AVDynamicHDRVivid), - "::", - stringify!(num_windows) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVDynamicHDRVivid), - "::", - stringify!(params) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVDynamicHDRVivid"][::std::mem::size_of::() - 1636usize]; + ["Alignment of AVDynamicHDRVivid"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVDynamicHDRVivid::system_start_code"] + [::std::mem::offset_of!(AVDynamicHDRVivid, system_start_code) - 0usize]; + ["Offset of field: AVDynamicHDRVivid::num_windows"] + [::std::mem::offset_of!(AVDynamicHDRVivid, num_windows) - 1usize]; + ["Offset of field: AVDynamicHDRVivid::params"] + [::std::mem::offset_of!(AVDynamicHDRVivid, params) - 4usize]; +}; extern "C" { #[doc = " Allocate an AVDynamicHDRVivid structure and set its fields to\n default values. The resulting struct can be freed using av_freep().\n\n @return An AVDynamicHDRVivid filled with default values or NULL\n on failure."] pub fn av_dynamic_hdr_vivid_alloc(size: *mut usize) -> *mut AVDynamicHDRVivid; @@ -28573,72 +17008,22 @@ pub struct AVComponentDescriptor { #[doc = " Number of bits in the component."] pub depth: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVComponentDescriptor() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(AVComponentDescriptor)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVComponentDescriptor)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).plane) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVComponentDescriptor), - "::", - stringify!(plane) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).step) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVComponentDescriptor), - "::", - stringify!(step) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVComponentDescriptor), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).shift) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVComponentDescriptor), - "::", - stringify!(shift) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVComponentDescriptor), - "::", - stringify!(depth) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVComponentDescriptor"][::std::mem::size_of::() - 20usize]; + ["Alignment of AVComponentDescriptor"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AVComponentDescriptor::plane"] + [::std::mem::offset_of!(AVComponentDescriptor, plane) - 0usize]; + ["Offset of field: AVComponentDescriptor::step"] + [::std::mem::offset_of!(AVComponentDescriptor, step) - 4usize]; + ["Offset of field: AVComponentDescriptor::offset"] + [::std::mem::offset_of!(AVComponentDescriptor, offset) - 8usize]; + ["Offset of field: AVComponentDescriptor::shift"] + [::std::mem::offset_of!(AVComponentDescriptor, shift) - 12usize]; + ["Offset of field: AVComponentDescriptor::depth"] + [::std::mem::offset_of!(AVComponentDescriptor, depth) - 16usize]; +}; #[doc = " Descriptor that unambiguously describes how the bits of a pixel are\n stored in the up to 4 data planes of an image. It also stores the\n subsampling factors and number of components.\n\n @note This is separate of the colorspace (RGB, YCbCr, YPbPr, JPEG-style YUV\n and all the YUV variants) AVPixFmtDescriptor just stores how values\n are stored not what these values represent."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -28657,91 +17042,25 @@ pub struct AVPixFmtDescriptor { #[doc = " Alternative comma-separated names."] pub alias: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_AVPixFmtDescriptor() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(AVPixFmtDescriptor)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVPixFmtDescriptor)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVPixFmtDescriptor), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_components) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVPixFmtDescriptor), - "::", - stringify!(nb_components) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).log2_chroma_w) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(AVPixFmtDescriptor), - "::", - stringify!(log2_chroma_w) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).log2_chroma_h) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(AVPixFmtDescriptor), - "::", - stringify!(log2_chroma_h) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVPixFmtDescriptor), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).comp) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVPixFmtDescriptor), - "::", - stringify!(comp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).alias) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(AVPixFmtDescriptor), - "::", - stringify!(alias) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVPixFmtDescriptor"][::std::mem::size_of::() - 112usize]; + ["Alignment of AVPixFmtDescriptor"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVPixFmtDescriptor::name"] + [::std::mem::offset_of!(AVPixFmtDescriptor, name) - 0usize]; + ["Offset of field: AVPixFmtDescriptor::nb_components"] + [::std::mem::offset_of!(AVPixFmtDescriptor, nb_components) - 8usize]; + ["Offset of field: AVPixFmtDescriptor::log2_chroma_w"] + [::std::mem::offset_of!(AVPixFmtDescriptor, log2_chroma_w) - 9usize]; + ["Offset of field: AVPixFmtDescriptor::log2_chroma_h"] + [::std::mem::offset_of!(AVPixFmtDescriptor, log2_chroma_h) - 10usize]; + ["Offset of field: AVPixFmtDescriptor::flags"] + [::std::mem::offset_of!(AVPixFmtDescriptor, flags) - 16usize]; + ["Offset of field: AVPixFmtDescriptor::comp"] + [::std::mem::offset_of!(AVPixFmtDescriptor, comp) - 24usize]; + ["Offset of field: AVPixFmtDescriptor::alias"] + [::std::mem::offset_of!(AVPixFmtDescriptor, alias) - 104usize]; +}; extern "C" { #[doc = " Return the number of bits per pixel used by the pixel format\n described by pixdesc. Note that this is not the same as the number\n of bits per sample.\n\n The returned number of bits refers to the number of bits actually\n used for storing the pixel information, that is padding bits are\n not counted."] pub fn av_get_bits_per_pixel(pixdesc: *const AVPixFmtDescriptor) -> ::std::os::raw::c_int; @@ -29104,6 +17423,18 @@ extern "C" { height: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } +extern "C" { + #[doc = " Overwrite the image data with a color. This is suitable for filling a\n sub-rectangle of an image, meaning the padding between the right most pixel\n and the left most pixel on the next line will not be overwritten. For some\n formats, the image size might be rounded up due to inherent alignment.\n\n If the pixel format has alpha, it is also replaced. Color component values\n are interpreted as native integers (or intfloats) regardless of actual pixel\n format endianness.\n\n This can return an error if the pixel format is not supported. Normally, all\n non-hwaccel pixel formats should be supported.\n\n Passing NULL for dst_data is allowed. Then the function returns whether the\n operation would have succeeded. (It can return an error if the pix_fmt is\n not supported.)\n\n @param dst_data data pointers to destination image\n @param dst_linesize linesizes for the destination image\n @param pix_fmt the pixel format of the image\n @param color the color components to be used for the fill\n @param width the width of the image in pixels\n @param height the height of the image in pixels\n @param flags currently unused\n @return 0 if the image data was filled, a negative AVERROR code otherwise"] + pub fn av_image_fill_color( + dst_data: *const *mut u8, + dst_linesize: *const isize, + pix_fmt: AVPixelFormat, + color: *const u32, + width: ::std::os::raw::c_int, + height: ::std::os::raw::c_int, + flags: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} #[repr(C)] #[derive(Copy, Clone)] pub union av_alias64 { @@ -29114,81 +17445,17 @@ pub union av_alias64 { pub f64_: f64, pub f32_: [f32; 2usize], } -#[test] -fn bindgen_test_layout_av_alias64() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(av_alias64)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(av_alias64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u64_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(av_alias64), - "::", - stringify!(u64_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u32_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(av_alias64), - "::", - stringify!(u32_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u16_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(av_alias64), - "::", - stringify!(u16_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u8_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(av_alias64), - "::", - stringify!(u8_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).f64_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(av_alias64), - "::", - stringify!(f64_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).f32_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(av_alias64), - "::", - stringify!(f32_) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of av_alias64"][::std::mem::size_of::() - 8usize]; + ["Alignment of av_alias64"][::std::mem::align_of::() - 8usize]; + ["Offset of field: av_alias64::u64_"][::std::mem::offset_of!(av_alias64, u64_) - 0usize]; + ["Offset of field: av_alias64::u32_"][::std::mem::offset_of!(av_alias64, u32_) - 0usize]; + ["Offset of field: av_alias64::u16_"][::std::mem::offset_of!(av_alias64, u16_) - 0usize]; + ["Offset of field: av_alias64::u8_"][::std::mem::offset_of!(av_alias64, u8_) - 0usize]; + ["Offset of field: av_alias64::f64_"][::std::mem::offset_of!(av_alias64, f64_) - 0usize]; + ["Offset of field: av_alias64::f32_"][::std::mem::offset_of!(av_alias64, f32_) - 0usize]; +}; impl ::std::fmt::Debug for av_alias64 { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "av_alias64 {{ union }}") @@ -29202,61 +17469,15 @@ pub union av_alias32 { pub u8_: [u8; 4usize], pub f32_: f32, } -#[test] -fn bindgen_test_layout_av_alias32() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(av_alias32)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(av_alias32)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u32_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(av_alias32), - "::", - stringify!(u32_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u16_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(av_alias32), - "::", - stringify!(u16_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u8_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(av_alias32), - "::", - stringify!(u8_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).f32_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(av_alias32), - "::", - stringify!(f32_) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of av_alias32"][::std::mem::size_of::() - 4usize]; + ["Alignment of av_alias32"][::std::mem::align_of::() - 4usize]; + ["Offset of field: av_alias32::u32_"][::std::mem::offset_of!(av_alias32, u32_) - 0usize]; + ["Offset of field: av_alias32::u16_"][::std::mem::offset_of!(av_alias32, u16_) - 0usize]; + ["Offset of field: av_alias32::u8_"][::std::mem::offset_of!(av_alias32, u8_) - 0usize]; + ["Offset of field: av_alias32::f32_"][::std::mem::offset_of!(av_alias32, f32_) - 0usize]; +}; impl ::std::fmt::Debug for av_alias32 { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "av_alias32 {{ union }}") @@ -29268,41 +17489,13 @@ pub union av_alias16 { pub u16_: u16, pub u8_: [u8; 2usize], } -#[test] -fn bindgen_test_layout_av_alias16() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(av_alias16)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(av_alias16)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u16_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(av_alias16), - "::", - stringify!(u16_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).u8_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(av_alias16), - "::", - stringify!(u8_) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of av_alias16"][::std::mem::size_of::() - 2usize]; + ["Alignment of av_alias16"][::std::mem::align_of::() - 2usize]; + ["Offset of field: av_alias16::u16_"][::std::mem::offset_of!(av_alias16, u16_) - 0usize]; + ["Offset of field: av_alias16::u8_"][::std::mem::offset_of!(av_alias16, u8_) - 0usize]; +}; impl ::std::fmt::Debug for av_alias16 { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "av_alias16 {{ union }}") @@ -29313,31 +17506,12 @@ impl ::std::fmt::Debug for av_alias16 { pub union unaligned_64 { pub l: u64, } -#[test] -fn bindgen_test_layout_unaligned_64() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(unaligned_64)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(unaligned_64)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(unaligned_64), - "::", - stringify!(l) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of unaligned_64"][::std::mem::size_of::() - 8usize]; + ["Alignment of unaligned_64"][::std::mem::align_of::() - 1usize]; + ["Offset of field: unaligned_64::l"][::std::mem::offset_of!(unaligned_64, l) - 0usize]; +}; impl ::std::fmt::Debug for unaligned_64 { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "unaligned_64 {{ union }}") @@ -29348,31 +17522,12 @@ impl ::std::fmt::Debug for unaligned_64 { pub union unaligned_32 { pub l: u32, } -#[test] -fn bindgen_test_layout_unaligned_32() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(unaligned_32)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(unaligned_32)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(unaligned_32), - "::", - stringify!(l) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of unaligned_32"][::std::mem::size_of::() - 4usize]; + ["Alignment of unaligned_32"][::std::mem::align_of::() - 1usize]; + ["Offset of field: unaligned_32::l"][::std::mem::offset_of!(unaligned_32, l) - 0usize]; +}; impl ::std::fmt::Debug for unaligned_32 { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "unaligned_32 {{ union }}") @@ -29383,31 +17538,12 @@ impl ::std::fmt::Debug for unaligned_32 { pub union unaligned_16 { pub l: u16, } -#[test] -fn bindgen_test_layout_unaligned_16() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(unaligned_16)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(unaligned_16)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).l) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(unaligned_16), - "::", - stringify!(l) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of unaligned_16"][::std::mem::size_of::() - 2usize]; + ["Alignment of unaligned_16"][::std::mem::align_of::() - 1usize]; + ["Offset of field: unaligned_16::l"][::std::mem::offset_of!(unaligned_16, l) - 0usize]; +}; impl ::std::fmt::Debug for unaligned_16 { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!(f, "unaligned_16 {{ union }}") @@ -29420,41 +17556,13 @@ pub struct AVLFG { pub state: [::std::os::raw::c_uint; 64usize], pub index: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVLFG() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 260usize, - concat!("Size of: ", stringify!(AVLFG)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVLFG)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVLFG), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(AVLFG), - "::", - stringify!(index) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVLFG"][::std::mem::size_of::() - 260usize]; + ["Alignment of AVLFG"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVLFG::state"][::std::mem::offset_of!(AVLFG, state) - 0usize]; + ["Offset of field: AVLFG::index"][::std::mem::offset_of!(AVLFG, index) - 256usize]; +}; extern "C" { pub fn av_lfg_init(c: *mut AVLFG, seed: ::std::os::raw::c_uint); } @@ -29496,82 +17604,25 @@ pub struct AVMasteringDisplayMetadata { #[doc = " Flag indicating whether the luminance (min_ and max_) have been set."] pub has_luminance: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVMasteringDisplayMetadata() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(AVMasteringDisplayMetadata)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVMasteringDisplayMetadata)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).display_primaries) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVMasteringDisplayMetadata), - "::", - stringify!(display_primaries) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).white_point) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(AVMasteringDisplayMetadata), - "::", - stringify!(white_point) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).min_luminance) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(AVMasteringDisplayMetadata), - "::", - stringify!(min_luminance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).max_luminance) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(AVMasteringDisplayMetadata), - "::", - stringify!(max_luminance) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).has_primaries) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(AVMasteringDisplayMetadata), - "::", - stringify!(has_primaries) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).has_luminance) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(AVMasteringDisplayMetadata), - "::", - stringify!(has_luminance) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVMasteringDisplayMetadata"] + [::std::mem::size_of::() - 88usize]; + ["Alignment of AVMasteringDisplayMetadata"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AVMasteringDisplayMetadata::display_primaries"] + [::std::mem::offset_of!(AVMasteringDisplayMetadata, display_primaries) - 0usize]; + ["Offset of field: AVMasteringDisplayMetadata::white_point"] + [::std::mem::offset_of!(AVMasteringDisplayMetadata, white_point) - 48usize]; + ["Offset of field: AVMasteringDisplayMetadata::min_luminance"] + [::std::mem::offset_of!(AVMasteringDisplayMetadata, min_luminance) - 64usize]; + ["Offset of field: AVMasteringDisplayMetadata::max_luminance"] + [::std::mem::offset_of!(AVMasteringDisplayMetadata, max_luminance) - 72usize]; + ["Offset of field: AVMasteringDisplayMetadata::has_primaries"] + [::std::mem::offset_of!(AVMasteringDisplayMetadata, has_primaries) - 80usize]; + ["Offset of field: AVMasteringDisplayMetadata::has_luminance"] + [::std::mem::offset_of!(AVMasteringDisplayMetadata, has_luminance) - 84usize]; +}; extern "C" { #[doc = " Allocate an AVMasteringDisplayMetadata structure and set its fields to\n default values. The resulting struct can be freed using av_freep().\n\n @return An AVMasteringDisplayMetadata filled with default values or NULL\n on failure."] pub fn av_mastering_display_metadata_alloc() -> *mut AVMasteringDisplayMetadata; @@ -29584,49 +17635,23 @@ extern "C" { } #[doc = " Content light level needed by to transmit HDR over HDMI (CTA-861.3).\n\n To be used as payload of a AVFrameSideData or AVPacketSideData with the\n appropriate type.\n\n @note The struct should be allocated with av_content_light_metadata_alloc()\n and its size is not a part of the public ABI."] #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct AVContentLightMetadata { - #[doc = " Max content light level (cd/m^2)."] - pub MaxCLL: ::std::os::raw::c_uint, - #[doc = " Max average light level per frame (cd/m^2)."] - pub MaxFALL: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout_AVContentLightMetadata() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AVContentLightMetadata)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVContentLightMetadata)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).MaxCLL) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVContentLightMetadata), - "::", - stringify!(MaxCLL) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).MaxFALL) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVContentLightMetadata), - "::", - stringify!(MaxFALL) - ) - ); +#[derive(Debug, Copy, Clone)] +pub struct AVContentLightMetadata { + #[doc = " Max content light level (cd/m^2)."] + pub MaxCLL: ::std::os::raw::c_uint, + #[doc = " Max average light level per frame (cd/m^2)."] + pub MaxFALL: ::std::os::raw::c_uint, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVContentLightMetadata"][::std::mem::size_of::() - 8usize]; + ["Alignment of AVContentLightMetadata"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: AVContentLightMetadata::MaxCLL"] + [::std::mem::offset_of!(AVContentLightMetadata, MaxCLL) - 0usize]; + ["Offset of field: AVContentLightMetadata::MaxFALL"] + [::std::mem::offset_of!(AVContentLightMetadata, MaxFALL) - 4usize]; +}; extern "C" { #[doc = " Allocate an AVContentLightMetadata structure and set its fields to\n default values. The resulting struct can be freed using av_freep().\n\n @return An AVContentLightMetadata filled with default values or NULL\n on failure."] pub fn av_content_light_metadata_alloc(size: *mut usize) -> *mut AVContentLightMetadata; @@ -29691,131 +17716,31 @@ pub struct AVMotionVector { pub motion_y: i32, pub motion_scale: u16, } -#[test] -fn bindgen_test_layout_AVMotionVector() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(AVMotionVector)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVMotionVector)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVMotionVector), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVMotionVector), - "::", - stringify!(w) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(AVMotionVector), - "::", - stringify!(h) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).src_x) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(AVMotionVector), - "::", - stringify!(src_x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).src_y) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVMotionVector), - "::", - stringify!(src_y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dst_x) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(AVMotionVector), - "::", - stringify!(dst_x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dst_y) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVMotionVector), - "::", - stringify!(dst_y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVMotionVector), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).motion_x) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVMotionVector), - "::", - stringify!(motion_x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).motion_y) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AVMotionVector), - "::", - stringify!(motion_y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).motion_scale) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVMotionVector), - "::", - stringify!(motion_scale) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVMotionVector"][::std::mem::size_of::() - 40usize]; + ["Alignment of AVMotionVector"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVMotionVector::source"] + [::std::mem::offset_of!(AVMotionVector, source) - 0usize]; + ["Offset of field: AVMotionVector::w"][::std::mem::offset_of!(AVMotionVector, w) - 4usize]; + ["Offset of field: AVMotionVector::h"][::std::mem::offset_of!(AVMotionVector, h) - 5usize]; + ["Offset of field: AVMotionVector::src_x"] + [::std::mem::offset_of!(AVMotionVector, src_x) - 6usize]; + ["Offset of field: AVMotionVector::src_y"] + [::std::mem::offset_of!(AVMotionVector, src_y) - 8usize]; + ["Offset of field: AVMotionVector::dst_x"] + [::std::mem::offset_of!(AVMotionVector, dst_x) - 10usize]; + ["Offset of field: AVMotionVector::dst_y"] + [::std::mem::offset_of!(AVMotionVector, dst_y) - 12usize]; + ["Offset of field: AVMotionVector::flags"] + [::std::mem::offset_of!(AVMotionVector, flags) - 16usize]; + ["Offset of field: AVMotionVector::motion_x"] + [::std::mem::offset_of!(AVMotionVector, motion_x) - 24usize]; + ["Offset of field: AVMotionVector::motion_y"] + [::std::mem::offset_of!(AVMotionVector, motion_y) - 28usize]; + ["Offset of field: AVMotionVector::motion_scale"] + [::std::mem::offset_of!(AVMotionVector, motion_scale) - 32usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AVMurMur3 { @@ -29856,172 +17781,37 @@ pub struct tm { pub tm_gmtoff: ::std::os::raw::c_long, pub tm_zone: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_tm() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(tm)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(tm)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_min) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_min) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_hour) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_hour) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_mday) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mday) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_mon) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mon) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_year) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_year) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_wday) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_wday) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_yday) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_yday) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_isdst) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_isdst) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_gmtoff) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_gmtoff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tm_zone) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_zone) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tm"][::std::mem::size_of::() - 56usize]; + ["Alignment of tm"][::std::mem::align_of::() - 8usize]; + ["Offset of field: tm::tm_sec"][::std::mem::offset_of!(tm, tm_sec) - 0usize]; + ["Offset of field: tm::tm_min"][::std::mem::offset_of!(tm, tm_min) - 4usize]; + ["Offset of field: tm::tm_hour"][::std::mem::offset_of!(tm, tm_hour) - 8usize]; + ["Offset of field: tm::tm_mday"][::std::mem::offset_of!(tm, tm_mday) - 12usize]; + ["Offset of field: tm::tm_mon"][::std::mem::offset_of!(tm, tm_mon) - 16usize]; + ["Offset of field: tm::tm_year"][::std::mem::offset_of!(tm, tm_year) - 20usize]; + ["Offset of field: tm::tm_wday"][::std::mem::offset_of!(tm, tm_wday) - 24usize]; + ["Offset of field: tm::tm_yday"][::std::mem::offset_of!(tm, tm_yday) - 28usize]; + ["Offset of field: tm::tm_isdst"][::std::mem::offset_of!(tm, tm_isdst) - 32usize]; + ["Offset of field: tm::tm_gmtoff"][::std::mem::offset_of!(tm, tm_gmtoff) - 40usize]; + ["Offset of field: tm::tm_zone"][::std::mem::offset_of!(tm, tm_zone) - 48usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct itimerspec { pub it_interval: timespec, pub it_value: timespec, } -#[test] -fn bindgen_test_layout_itimerspec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(itimerspec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(itimerspec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_interval) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_value) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of itimerspec"][::std::mem::size_of::() - 32usize]; + ["Alignment of itimerspec"][::std::mem::align_of::() - 8usize]; + ["Offset of field: itimerspec::it_interval"] + [::std::mem::offset_of!(itimerspec, it_interval) - 0usize]; + ["Offset of field: itimerspec::it_value"] + [::std::mem::offset_of!(itimerspec, it_value) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sigevent { @@ -30276,41 +18066,14 @@ pub struct AVRC4 { pub x: ::std::os::raw::c_int, pub y: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_AVRC4() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 264usize, - concat!("Size of: ", stringify!(AVRC4)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVRC4)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVRC4), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 256usize, - concat!("Offset of field: ", stringify!(AVRC4), "::", stringify!(x)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 260usize, - concat!("Offset of field: ", stringify!(AVRC4), "::", stringify!(y)) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVRC4"][::std::mem::size_of::() - 264usize]; + ["Alignment of AVRC4"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVRC4::state"][::std::mem::offset_of!(AVRC4, state) - 0usize]; + ["Offset of field: AVRC4::x"][::std::mem::offset_of!(AVRC4, x) - 256usize]; + ["Offset of field: AVRC4::y"][::std::mem::offset_of!(AVRC4, y) - 260usize]; +}; extern "C" { #[doc = " Allocate an AVRC4 context."] pub fn av_rc4_alloc() -> *mut AVRC4; @@ -30348,61 +18111,19 @@ pub struct AVReplayGain { #[doc = " Same as track_peak, but for the whole album,"] pub album_peak: u32, } -#[test] -fn bindgen_test_layout_AVReplayGain() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AVReplayGain)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVReplayGain)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).track_gain) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVReplayGain), - "::", - stringify!(track_gain) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).track_peak) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVReplayGain), - "::", - stringify!(track_peak) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).album_gain) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVReplayGain), - "::", - stringify!(album_gain) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).album_peak) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVReplayGain), - "::", - stringify!(album_peak) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVReplayGain"][::std::mem::size_of::() - 16usize]; + ["Alignment of AVReplayGain"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVReplayGain::track_gain"] + [::std::mem::offset_of!(AVReplayGain, track_gain) - 0usize]; + ["Offset of field: AVReplayGain::track_peak"] + [::std::mem::offset_of!(AVReplayGain, track_peak) - 4usize]; + ["Offset of field: AVReplayGain::album_gain"] + [::std::mem::offset_of!(AVReplayGain, album_gain) - 8usize]; + ["Offset of field: AVReplayGain::album_peak"] + [::std::mem::offset_of!(AVReplayGain, album_peak) - 12usize]; +}; extern "C" { #[doc = " @defgroup lavu_ripemd RIPEMD\n @ingroup lavu_hash\n RIPEMD hash function implementation.\n\n @{"] pub static av_ripemd_size: ::std::os::raw::c_int; @@ -30515,111 +18236,29 @@ pub struct AVSphericalMapping { #[doc = " Number of pixels to pad from the edge of each cube face.\n\n @note This value is valid for only for the cubemap projection type\n (@ref AV_SPHERICAL_CUBEMAP), and should be ignored in all other\n cases."] pub padding: u32, } -#[test] -fn bindgen_test_layout_AVSphericalMapping() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(AVSphericalMapping)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVSphericalMapping)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).projection) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVSphericalMapping), - "::", - stringify!(projection) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).yaw) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVSphericalMapping), - "::", - stringify!(yaw) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVSphericalMapping), - "::", - stringify!(pitch) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).roll) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVSphericalMapping), - "::", - stringify!(roll) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bound_left) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVSphericalMapping), - "::", - stringify!(bound_left) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bound_top) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(AVSphericalMapping), - "::", - stringify!(bound_top) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bound_right) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVSphericalMapping), - "::", - stringify!(bound_right) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bound_bottom) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AVSphericalMapping), - "::", - stringify!(bound_bottom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVSphericalMapping), - "::", - stringify!(padding) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVSphericalMapping"][::std::mem::size_of::() - 36usize]; + ["Alignment of AVSphericalMapping"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVSphericalMapping::projection"] + [::std::mem::offset_of!(AVSphericalMapping, projection) - 0usize]; + ["Offset of field: AVSphericalMapping::yaw"] + [::std::mem::offset_of!(AVSphericalMapping, yaw) - 4usize]; + ["Offset of field: AVSphericalMapping::pitch"] + [::std::mem::offset_of!(AVSphericalMapping, pitch) - 8usize]; + ["Offset of field: AVSphericalMapping::roll"] + [::std::mem::offset_of!(AVSphericalMapping, roll) - 12usize]; + ["Offset of field: AVSphericalMapping::bound_left"] + [::std::mem::offset_of!(AVSphericalMapping, bound_left) - 16usize]; + ["Offset of field: AVSphericalMapping::bound_top"] + [::std::mem::offset_of!(AVSphericalMapping, bound_top) - 20usize]; + ["Offset of field: AVSphericalMapping::bound_right"] + [::std::mem::offset_of!(AVSphericalMapping, bound_right) - 24usize]; + ["Offset of field: AVSphericalMapping::bound_bottom"] + [::std::mem::offset_of!(AVSphericalMapping, bound_bottom) - 28usize]; + ["Offset of field: AVSphericalMapping::padding"] + [::std::mem::offset_of!(AVSphericalMapping, padding) - 32usize]; +}; extern "C" { #[doc = " Allocate a AVSphericalVideo structure and initialize its fields to default\n values.\n\n @return the newly allocated struct or NULL on failure"] pub fn av_spherical_alloc(size: *mut usize) -> *mut AVSphericalMapping; @@ -30683,51 +18322,14 @@ pub struct AVStereo3D { #[doc = " Determines which views are packed."] pub view: AVStereo3DView, } -#[test] -fn bindgen_test_layout_AVStereo3D() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(AVStereo3D)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVStereo3D)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVStereo3D), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVStereo3D), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).view) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVStereo3D), - "::", - stringify!(view) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVStereo3D"][::std::mem::size_of::() - 12usize]; + ["Alignment of AVStereo3D"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVStereo3D::type_"][::std::mem::offset_of!(AVStereo3D, type_) - 0usize]; + ["Offset of field: AVStereo3D::flags"][::std::mem::offset_of!(AVStereo3D, flags) - 4usize]; + ["Offset of field: AVStereo3D::view"][::std::mem::offset_of!(AVStereo3D, view) - 8usize]; +}; extern "C" { #[doc = " Allocate an AVStereo3D structure and set its fields to default values.\n The resulting struct can be freed using av_freep().\n\n @return An AVStereo3D filled with default values or NULL on failure."] pub fn av_stereo3d_alloc() -> *mut AVStereo3D; @@ -30873,61 +18475,15 @@ pub struct AVTimecode { #[doc = "< frame per second; must be consistent with the rate field"] pub fps: ::std::os::raw::c_uint, } -#[test] -fn bindgen_test_layout_AVTimecode() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(AVTimecode)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVTimecode)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVTimecode), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVTimecode), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rate) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVTimecode), - "::", - stringify!(rate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fps) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVTimecode), - "::", - stringify!(fps) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVTimecode"][::std::mem::size_of::() - 20usize]; + ["Alignment of AVTimecode"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVTimecode::start"][::std::mem::offset_of!(AVTimecode, start) - 0usize]; + ["Offset of field: AVTimecode::flags"][::std::mem::offset_of!(AVTimecode, flags) - 4usize]; + ["Offset of field: AVTimecode::rate"][::std::mem::offset_of!(AVTimecode, rate) - 8usize]; + ["Offset of field: AVTimecode::fps"][::std::mem::offset_of!(AVTimecode, fps) - 16usize]; +}; extern "C" { #[doc = " Adjust frame number for NTSC drop frame time code.\n\n @param framenum frame number to adjust\n @param fps frame per second, multiples of 30\n @return adjusted frame number\n @warning adjustment is only valid for multiples of NTSC 29.97"] pub fn av_timecode_adjust_ntsc_framenum2( @@ -30954,7 +18510,7 @@ extern "C" { ) -> u32; } extern "C" { - #[doc = " Load timecode string in buf.\n\n @param buf destination buffer, must be at least AV_TIMECODE_STR_SIZE long\n @param tc timecode data correctly initialized\n @param framenum frame number\n @return the buf parameter\n\n @note Timecode representation can be a negative timecode and have more than\n 24 hours, but will only be honored if the flags are correctly set.\n @note The frame number is relative to tc->start."] + #[doc = " Load timecode string in buf.\n\n @param tc timecode data correctly initialized\n @param buf destination buffer, must be at least AV_TIMECODE_STR_SIZE long\n @param framenum frame number\n @return the buf parameter\n\n @note Timecode representation can be a negative timecode and have more than\n 24 hours, but will only be honored if the flags are correctly set.\n @note The frame number is relative to tc->start."] pub fn av_timecode_make_string( tc: *const AVTimecode, buf: *mut ::std::os::raw::c_char, @@ -30987,7 +18543,7 @@ extern "C" { ) -> *mut ::std::os::raw::c_char; } extern "C" { - #[doc = " Init a timecode struct with the passed parameters.\n\n @param log_ctx a pointer to an arbitrary struct of which the first field\n is a pointer to an AVClass struct (used for av_log)\n @param tc pointer to an allocated AVTimecode\n @param rate frame rate in rational form\n @param flags miscellaneous flags such as drop frame, +24 hours, ...\n (see AVTimecodeFlag)\n @param frame_start the first frame number\n @return 0 on success, AVERROR otherwise"] + #[doc = " Init a timecode struct with the passed parameters.\n\n @param tc pointer to an allocated AVTimecode\n @param rate frame rate in rational form\n @param flags miscellaneous flags such as drop frame, +24 hours, ...\n (see AVTimecodeFlag)\n @param frame_start the first frame number\n @param log_ctx a pointer to an arbitrary struct of which the first field\n is a pointer to an AVClass struct (used for av_log)\n @return 0 on success, AVERROR otherwise"] pub fn av_timecode_init( tc: *mut AVTimecode, rate: AVRational, @@ -30997,7 +18553,7 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Init a timecode struct from the passed timecode components.\n\n @param log_ctx a pointer to an arbitrary struct of which the first field\n is a pointer to an AVClass struct (used for av_log)\n @param tc pointer to an allocated AVTimecode\n @param rate frame rate in rational form\n @param flags miscellaneous flags such as drop frame, +24 hours, ...\n (see AVTimecodeFlag)\n @param hh hours\n @param mm minutes\n @param ss seconds\n @param ff frames\n @return 0 on success, AVERROR otherwise"] + #[doc = " Init a timecode struct from the passed timecode components.\n\n @param tc pointer to an allocated AVTimecode\n @param rate frame rate in rational form\n @param flags miscellaneous flags such as drop frame, +24 hours, ...\n (see AVTimecodeFlag)\n @param hh hours\n @param mm minutes\n @param ss seconds\n @param ff frames\n @param log_ctx a pointer to an arbitrary struct of which the first field\n is a pointer to an AVClass struct (used for av_log)\n @return 0 on success, AVERROR otherwise"] pub fn av_timecode_init_from_components( tc: *mut AVTimecode, rate: AVRational, @@ -31010,7 +18566,7 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Parse timecode representation (hh:mm:ss[:;.]ff).\n\n @param log_ctx a pointer to an arbitrary struct of which the first field is a\n pointer to an AVClass struct (used for av_log).\n @param tc pointer to an allocated AVTimecode\n @param rate frame rate in rational form\n @param str timecode string which will determine the frame start\n @return 0 on success, AVERROR otherwise"] + #[doc = " Parse timecode representation (hh:mm:ss[:;.]ff).\n\n @param tc pointer to an allocated AVTimecode\n @param rate frame rate in rational form\n @param str timecode string which will determine the frame start\n @param log_ctx a pointer to an arbitrary struct of which the first field is a\n pointer to an AVClass struct (used for av_log).\n @return 0 on success, AVERROR otherwise"] pub fn av_timecode_init_from_string( tc: *mut AVTimecode, rate: AVRational, @@ -31022,6 +18578,14 @@ extern "C" { #[doc = " Check if the timecode feature is available for the given frame rate\n\n @return 0 if supported, <0 otherwise"] pub fn av_timecode_check_frame_rate(rate: AVRational) -> ::std::os::raw::c_int; } +extern "C" { + #[doc = " Fill the provided buffer with a string containing a timestamp time\n representation.\n\n @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE\n @param ts the timestamp to represent\n @param tb the timebase of the timestamp\n @return the buffer in input"] + pub fn av_ts_make_time_string2( + buf: *mut ::std::os::raw::c_char, + ts: i64, + tb: AVRational, + ) -> *mut ::std::os::raw::c_char; +} #[doc = " @addtogroup lavu_tree AVTree\n @ingroup lavu_data\n\n Low-complexity tree container\n\n Insertion, removal, finding equal, largest which is smaller than and\n smallest which is larger than, all have O(log n) worst-case complexity.\n @{"] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -31128,123 +18692,39 @@ pub struct AVComplexFloat { pub re: f32, pub im: f32, } -#[test] -fn bindgen_test_layout_AVComplexFloat() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AVComplexFloat)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVComplexFloat)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).re) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVComplexFloat), - "::", - stringify!(re) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).im) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVComplexFloat), - "::", - stringify!(im) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVComplexFloat"][::std::mem::size_of::() - 8usize]; + ["Alignment of AVComplexFloat"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVComplexFloat::re"][::std::mem::offset_of!(AVComplexFloat, re) - 0usize]; + ["Offset of field: AVComplexFloat::im"][::std::mem::offset_of!(AVComplexFloat, im) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AVComplexDouble { pub re: f64, pub im: f64, } -#[test] -fn bindgen_test_layout_AVComplexDouble() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AVComplexDouble)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVComplexDouble)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).re) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVComplexDouble), - "::", - stringify!(re) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).im) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVComplexDouble), - "::", - stringify!(im) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVComplexDouble"][::std::mem::size_of::() - 16usize]; + ["Alignment of AVComplexDouble"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVComplexDouble::re"][::std::mem::offset_of!(AVComplexDouble, re) - 0usize]; + ["Offset of field: AVComplexDouble::im"][::std::mem::offset_of!(AVComplexDouble, im) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AVComplexInt32 { pub re: i32, pub im: i32, } -#[test] -fn bindgen_test_layout_AVComplexInt32() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(AVComplexInt32)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVComplexInt32)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).re) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVComplexInt32), - "::", - stringify!(re) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).im) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVComplexInt32), - "::", - stringify!(im) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVComplexInt32"][::std::mem::size_of::() - 8usize]; + ["Alignment of AVComplexInt32"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVComplexInt32::re"][::std::mem::offset_of!(AVComplexInt32, re) - 0usize]; + ["Offset of field: AVComplexInt32::im"][::std::mem::offset_of!(AVComplexInt32, im) - 4usize]; +}; #[doc = " Standard complex to complex FFT with sample data type of AVComplexFloat,\n AVComplexDouble or AVComplexInt32, for each respective variant.\n\n Output is not 1/len normalized. Scaling currently unsupported.\n The stride parameter must be set to the size of a single sample in bytes."] pub const AV_TX_FLOAT_FFT: AVTXType = 0; #[doc = " Standard complex to complex FFT with sample data type of AVComplexFloat,\n AVComplexDouble or AVComplexInt32, for each respective variant.\n\n Output is not 1/len normalized. Scaling currently unsupported.\n The stride parameter must be set to the size of a single sample in bytes."] @@ -31343,7 +18823,7 @@ extern "C" { } extern "C" { #[doc = " Serializes a AVUUID into a string representation according to IETF RFC 4122.\n The string is lowercase and always 37 characters long, including the\n terminating NUL character.\n\n @param[in] uu AVUUID\n @param[out] out Pointer to an array of no less than 37 characters."] - pub fn av_uuid_unparse(uu: *mut u8, out: *mut ::std::os::raw::c_char); + pub fn av_uuid_unparse(uu: *const u8, out: *mut ::std::os::raw::c_char); } pub const AV_VIDEO_ENC_PARAMS_NONE: AVVideoEncParamsType = -1; #[doc = " VP9 stores:\n - per-frame base (luma AC) quantizer index, exported as AVVideoEncParams.qp\n - deltas for luma DC, chroma AC and chroma DC, exported in the\n corresponding entries in AVVideoEncParams.delta_qp\n - per-segment delta, exported as for each block as AVVideoBlockParams.delta_qp\n\n To compute the resulting quantizer index for a block:\n - for luma AC, add the base qp and the per-block delta_qp, saturating to\n unsigned 8-bit.\n - for luma DC and chroma AC/DC, add the corresponding\n AVVideoBlockParams.delta_qp to the luma AC index, again saturating to\n unsigned 8-bit."] @@ -31369,81 +18849,23 @@ pub struct AVVideoEncParams { #[doc = " Quantisation parameter offset from the base (per-frame) qp for a given\n plane (first index) and AC/DC coefficients (second index)."] pub delta_qp: [[i32; 2usize]; 4usize], } -#[test] -fn bindgen_test_layout_AVVideoEncParams() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(AVVideoEncParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVVideoEncParams)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_blocks) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVVideoEncParams), - "::", - stringify!(nb_blocks) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).blocks_offset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVVideoEncParams), - "::", - stringify!(blocks_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).block_size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVVideoEncParams), - "::", - stringify!(block_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVVideoEncParams), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).qp) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(AVVideoEncParams), - "::", - stringify!(qp) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).delta_qp) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(AVVideoEncParams), - "::", - stringify!(delta_qp) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVVideoEncParams"][::std::mem::size_of::() - 64usize]; + ["Alignment of AVVideoEncParams"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVVideoEncParams::nb_blocks"] + [::std::mem::offset_of!(AVVideoEncParams, nb_blocks) - 0usize]; + ["Offset of field: AVVideoEncParams::blocks_offset"] + [::std::mem::offset_of!(AVVideoEncParams, blocks_offset) - 8usize]; + ["Offset of field: AVVideoEncParams::block_size"] + [::std::mem::offset_of!(AVVideoEncParams, block_size) - 16usize]; + ["Offset of field: AVVideoEncParams::type_"] + [::std::mem::offset_of!(AVVideoEncParams, type_) - 24usize]; + ["Offset of field: AVVideoEncParams::qp"] + [::std::mem::offset_of!(AVVideoEncParams, qp) - 28usize]; + ["Offset of field: AVVideoEncParams::delta_qp"] + [::std::mem::offset_of!(AVVideoEncParams, delta_qp) - 32usize]; +}; #[doc = " Data structure for storing block-level encoding information.\n It is allocated as a part of AVVideoEncParams and should be retrieved with\n av_video_enc_params_block().\n\n sizeof(AVVideoBlockParams) is not a part of the ABI and new fields may be\n added to it."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -31459,71 +18881,21 @@ pub struct AVVideoBlockParams { #[doc = " Difference between this block's final quantization parameter and the\n corresponding per-frame value."] pub delta_qp: i32, } -#[test] -fn bindgen_test_layout_AVVideoBlockParams() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(AVVideoBlockParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVVideoBlockParams)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).src_x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVVideoBlockParams), - "::", - stringify!(src_x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).src_y) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVVideoBlockParams), - "::", - stringify!(src_y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVVideoBlockParams), - "::", - stringify!(w) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).h) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVVideoBlockParams), - "::", - stringify!(h) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).delta_qp) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVVideoBlockParams), - "::", - stringify!(delta_qp) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVVideoBlockParams"][::std::mem::size_of::() - 20usize]; + ["Alignment of AVVideoBlockParams"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVVideoBlockParams::src_x"] + [::std::mem::offset_of!(AVVideoBlockParams, src_x) - 0usize]; + ["Offset of field: AVVideoBlockParams::src_y"] + [::std::mem::offset_of!(AVVideoBlockParams, src_y) - 4usize]; + ["Offset of field: AVVideoBlockParams::w"] + [::std::mem::offset_of!(AVVideoBlockParams, w) - 8usize]; + ["Offset of field: AVVideoBlockParams::h"] + [::std::mem::offset_of!(AVVideoBlockParams, h) - 12usize]; + ["Offset of field: AVVideoBlockParams::delta_qp"] + [::std::mem::offset_of!(AVVideoBlockParams, delta_qp) - 16usize]; +}; extern "C" { #[doc = " Allocates memory for AVVideoEncParams of the given type, plus an array of\n {@code nb_blocks} AVVideoBlockParams and initializes the variables. Can be\n freed with a normal av_free() call.\n\n @param out_size if non-NULL, the size in bytes of the resulting data array is\n written here."] pub fn av_video_enc_params_alloc( @@ -31548,61 +18920,15 @@ pub struct AVVideoRect { pub width: u32, pub height: u32, } -#[test] -fn bindgen_test_layout_AVVideoRect() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(AVVideoRect)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVVideoRect)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVVideoRect), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(AVVideoRect), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVVideoRect), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(AVVideoRect), - "::", - stringify!(height) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVVideoRect"][::std::mem::size_of::() - 16usize]; + ["Alignment of AVVideoRect"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVVideoRect::x"][::std::mem::offset_of!(AVVideoRect, x) - 0usize]; + ["Offset of field: AVVideoRect::y"][::std::mem::offset_of!(AVVideoRect, y) - 4usize]; + ["Offset of field: AVVideoRect::width"][::std::mem::offset_of!(AVVideoRect, width) - 8usize]; + ["Offset of field: AVVideoRect::height"][::std::mem::offset_of!(AVVideoRect, height) - 12usize]; +}; pub const AV_VIDEO_HINT_TYPE_CONSTANT: AVVideoHintType = 0; pub const AV_VIDEO_HINT_TYPE_CHANGED: AVVideoHintType = 1; pub type AVVideoHintType = ::std::os::raw::c_uint; @@ -31617,61 +18943,18 @@ pub struct AVVideoHint { pub rect_size: usize, pub type_: AVVideoHintType, } -#[test] -fn bindgen_test_layout_AVVideoHint() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(AVVideoHint)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(AVVideoHint)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nb_rects) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVVideoHint), - "::", - stringify!(nb_rects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rect_offset) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(AVVideoHint), - "::", - stringify!(rect_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).rect_size) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(AVVideoHint), - "::", - stringify!(rect_size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(AVVideoHint), - "::", - stringify!(type_) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVVideoHint"][::std::mem::size_of::() - 32usize]; + ["Alignment of AVVideoHint"][::std::mem::align_of::() - 8usize]; + ["Offset of field: AVVideoHint::nb_rects"] + [::std::mem::offset_of!(AVVideoHint, nb_rects) - 0usize]; + ["Offset of field: AVVideoHint::rect_offset"] + [::std::mem::offset_of!(AVVideoHint, rect_offset) - 8usize]; + ["Offset of field: AVVideoHint::rect_size"] + [::std::mem::offset_of!(AVVideoHint, rect_size) - 16usize]; + ["Offset of field: AVVideoHint::type_"][::std::mem::offset_of!(AVVideoHint, type_) - 24usize]; +}; extern "C" { #[doc = " Allocate memory for the AVVideoHint struct along with an nb_rects-sized\n arrays of AVVideoRect.\n\n The side data contains a list of rectangles for the portions of the frame\n which changed from the last encoded one (and the remainder are assumed to be\n changed), or, alternately (depending on the type parameter) the unchanged\n ones (and the remanining ones are those which changed).\n Macroblocks will thus be hinted either to be P_SKIP-ped or go through the\n regular encoding procedure.\n\n It's responsibility of the caller to fill the AVRects accordingly, and to set\n the proper AVVideoHintType field.\n\n @param out_size if non-NULL, the size in bytes of the resulting data array is\n written here\n\n @return newly allocated AVVideoHint struct (must be freed by the caller using\n av_free()) on success, NULL on memory allocation failure"] pub fn av_video_hint_alloc(nb_rects: usize, out_size: *mut usize) -> *mut AVVideoHint; @@ -31687,31 +18970,12 @@ extern "C" { pub struct AVXTEA { pub key: [u32; 16usize], } -#[test] -fn bindgen_test_layout_AVXTEA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(AVXTEA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(AVXTEA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(AVXTEA), - "::", - stringify!(key) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of AVXTEA"][::std::mem::size_of::() - 64usize]; + ["Alignment of AVXTEA"][::std::mem::align_of::() - 4usize]; + ["Offset of field: AVXTEA::key"][::std::mem::offset_of!(AVXTEA, key) - 0usize]; +}; extern "C" { #[doc = " Allocate an AVXTEA context."] pub fn av_xtea_alloc() -> *mut AVXTEA; @@ -31800,20 +19064,6 @@ extern "C" { #[doc = " Check whether an swr context has been initialized or not.\n\n @param[in] s Swr context to check\n @see swr_init()\n @return positive if it has been initialized, 0 if not initialized"] pub fn swr_is_initialized(s: *mut SwrContext) -> ::std::os::raw::c_int; } -extern "C" { - #[doc = " Allocate SwrContext if needed and set/reset common parameters.\n\n This function does not require s to be allocated with swr_alloc(). On the\n other hand, swr_alloc() can use swr_alloc_set_opts() to set the parameters\n on the allocated context.\n\n @param s existing Swr context if available, or NULL if not\n @param out_ch_layout output channel layout (AV_CH_LAYOUT_*)\n @param out_sample_fmt output sample format (AV_SAMPLE_FMT_*).\n @param out_sample_rate output sample rate (frequency in Hz)\n @param in_ch_layout input channel layout (AV_CH_LAYOUT_*)\n @param in_sample_fmt input sample format (AV_SAMPLE_FMT_*).\n @param in_sample_rate input sample rate (frequency in Hz)\n @param log_offset logging level offset\n @param log_ctx parent logging context, can be NULL\n\n @see swr_init(), swr_free()\n @return NULL on error, allocated context otherwise\n @deprecated use @ref swr_alloc_set_opts2()"] - pub fn swr_alloc_set_opts( - s: *mut SwrContext, - out_ch_layout: i64, - out_sample_fmt: AVSampleFormat, - out_sample_rate: ::std::os::raw::c_int, - in_ch_layout: i64, - in_sample_fmt: AVSampleFormat, - in_sample_rate: ::std::os::raw::c_int, - log_offset: ::std::os::raw::c_int, - log_ctx: *mut ::std::os::raw::c_void, - ) -> *mut SwrContext; -} extern "C" { #[doc = " Allocate SwrContext if needed and set/reset common parameters.\n\n This function does not require *ps to be allocated with swr_alloc(). On the\n other hand, swr_alloc() can use swr_alloc_set_opts2() to set the parameters\n on the allocated context.\n\n @param ps Pointer to an existing Swr context if available, or to NULL if not.\n On success, *ps will be set to the allocated context.\n @param out_ch_layout output channel layout (e.g. AV_CHANNEL_LAYOUT_*)\n @param out_sample_fmt output sample format (AV_SAMPLE_FMT_*).\n @param out_sample_rate output sample rate (frequency in Hz)\n @param in_ch_layout input channel layout (e.g. AV_CHANNEL_LAYOUT_*)\n @param in_sample_fmt input sample format (AV_SAMPLE_FMT_*).\n @param in_sample_rate input sample rate (frequency in Hz)\n @param log_offset logging level offset\n @param log_ctx parent logging context, can be NULL\n\n @see swr_init(), swr_free()\n @return 0 on success, a negative AVERROR code on error.\n On error, the Swr context is freed and *ps set to NULL."] pub fn swr_alloc_set_opts2( @@ -31840,9 +19090,9 @@ extern "C" { #[doc = " Convert audio.\n\n in and in_count can be set to 0 to flush the last few samples out at the\n end.\n\n If more input is provided than output space, then the input will be buffered.\n You can avoid this buffering by using swr_get_out_samples() to retrieve an\n upper bound on the required number of output samples for the given number of\n input samples. Conversion will run directly without copying whenever possible.\n\n @param s allocated Swr context, with parameters set\n @param out output buffers, only the first one need be set in case of packed audio\n @param out_count amount of space available for output in samples per channel\n @param in input buffers, only the first one need to be set in case of packed audio\n @param in_count number of input samples available in one channel\n\n @return number of samples output per channel, negative value on error"] pub fn swr_convert( s: *mut SwrContext, - out: *mut *mut u8, + out: *const *mut u8, out_count: ::std::os::raw::c_int, - in_: *mut *const u8, + in_: *const *const u8, in_count: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } @@ -31865,22 +19115,6 @@ extern "C" { channel_map: *const ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { - #[doc = " Generate a channel mixing matrix.\n\n This function is the one used internally by libswresample for building the\n default mixing matrix. It is made public just as a utility function for\n building custom matrices.\n\n @param in_layout input channel layout\n @param out_layout output channel layout\n @param center_mix_level mix level for the center channel\n @param surround_mix_level mix level for the surround channel(s)\n @param lfe_mix_level mix level for the low-frequency effects channel\n @param rematrix_maxval if 1.0, coefficients will be normalized to prevent\n overflow. if INT_MAX, coefficients will not be\n normalized.\n @param[out] matrix mixing coefficients; matrix[i + stride * o] is\n the weight of input channel i in output channel o.\n @param stride distance between adjacent input channels in the\n matrix array\n @param matrix_encoding matrixed stereo downmix mode (e.g. dplii)\n @param log_ctx parent logging context, can be NULL\n @return 0 on success, negative AVERROR code on failure\n @deprecated use @ref swr_build_matrix2()"] - pub fn swr_build_matrix( - in_layout: u64, - out_layout: u64, - center_mix_level: f64, - surround_mix_level: f64, - lfe_mix_level: f64, - rematrix_maxval: f64, - rematrix_volume: f64, - matrix: *mut f64, - stride: ::std::os::raw::c_int, - matrix_encoding: AVMatrixEncoding, - log_ctx: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} extern "C" { #[doc = " Generate a channel mixing matrix.\n\n This function is the one used internally by libswresample for building the\n default mixing matrix. It is made public just as a utility function for\n building custom matrices.\n\n @param in_layout input channel layout\n @param out_layout output channel layout\n @param center_mix_level mix level for the center channel\n @param surround_mix_level mix level for the surround channel(s)\n @param lfe_mix_level mix level for the low-frequency effects channel\n @param rematrix_maxval if 1.0, coefficients will be normalized to prevent\n overflow. if INT_MAX, coefficients will not be\n normalized.\n @param[out] matrix mixing coefficients; matrix[i + stride * o] is\n the weight of input channel i in output channel o.\n @param stride distance between adjacent input channels in the\n matrix array\n @param matrix_encoding matrixed stereo downmix mode (e.g. dplii)\n @param log_ctx parent logging context, can be NULL\n @return 0 on success, negative AVERROR code on failure"] pub fn swr_build_matrix2( @@ -31982,41 +19216,13 @@ pub struct SwsVector { #[doc = "< number of coefficients in the vector"] pub length: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_SwsVector() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(SwsVector)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(SwsVector)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).coeff) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(SwsVector), - "::", - stringify!(coeff) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(SwsVector), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of SwsVector"][::std::mem::size_of::() - 16usize]; + ["Alignment of SwsVector"][::std::mem::align_of::() - 8usize]; + ["Offset of field: SwsVector::coeff"][::std::mem::offset_of!(SwsVector, coeff) - 0usize]; + ["Offset of field: SwsVector::length"][::std::mem::offset_of!(SwsVector, length) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct SwsFilter { @@ -32025,61 +19231,15 @@ pub struct SwsFilter { pub chrH: *mut SwsVector, pub chrV: *mut SwsVector, } -#[test] -fn bindgen_test_layout_SwsFilter() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(SwsFilter)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(SwsFilter)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lumH) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(SwsFilter), - "::", - stringify!(lumH) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).lumV) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(SwsFilter), - "::", - stringify!(lumV) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chrH) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(SwsFilter), - "::", - stringify!(chrH) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chrV) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(SwsFilter), - "::", - stringify!(chrV) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of SwsFilter"][::std::mem::size_of::() - 32usize]; + ["Alignment of SwsFilter"][::std::mem::align_of::() - 8usize]; + ["Offset of field: SwsFilter::lumH"][::std::mem::offset_of!(SwsFilter, lumH) - 0usize]; + ["Offset of field: SwsFilter::lumV"][::std::mem::offset_of!(SwsFilter, lumV) - 8usize]; + ["Offset of field: SwsFilter::chrH"][::std::mem::offset_of!(SwsFilter, chrH) - 16usize]; + ["Offset of field: SwsFilter::chrV"][::std::mem::offset_of!(SwsFilter, chrV) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct SwsContext { @@ -32286,61 +19446,19 @@ pub struct __va_list_tag { pub overflow_arg_area: *mut ::std::os::raw::c_void, pub reg_save_area: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___va_list_tag() { - const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __va_list_tag"][::std::mem::size_of::<__va_list_tag>() - 24usize]; + ["Alignment of __va_list_tag"][::std::mem::align_of::<__va_list_tag>() - 8usize]; + ["Offset of field: __va_list_tag::gp_offset"] + [::std::mem::offset_of!(__va_list_tag, gp_offset) - 0usize]; + ["Offset of field: __va_list_tag::fp_offset"] + [::std::mem::offset_of!(__va_list_tag, fp_offset) - 4usize]; + ["Offset of field: __va_list_tag::overflow_arg_area"] + [::std::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize]; + ["Offset of field: __va_list_tag::reg_save_area"] + [::std::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __locale_data { @@ -32354,11 +19472,6 @@ pub struct AVCodecInternal { } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct URLContext { - pub _address: u8, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct AVFilterCommand { pub _address: u8, }