From be0f64ce936b3668347f77cc553d01ca5830b082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 18 Jun 2019 13:04:39 +0300 Subject: [PATCH] Run everything through rustfmt --- gstreamer-app-sys/build.rs | 11 +- gstreamer-app-sys/src/lib.rs | 131 +- gstreamer-app-sys/tests/abi.rs | 131 +- gstreamer-audio-sys/build.rs | 11 +- gstreamer-audio-sys/src/lib.rs | 1343 +++-- gstreamer-audio-sys/tests/abi.rs | 531 +- gstreamer-base-sys/build.rs | 11 +- gstreamer-base-sys/src/lib.rs | 1568 ++++-- gstreamer-base-sys/tests/abi.rs | 307 +- gstreamer-check-sys/build.rs | 11 +- gstreamer-check-sys/src/lib.rs | 275 +- gstreamer-check-sys/tests/abi.rs | 102 +- gstreamer-editing-services-sys/build.rs | 11 +- gstreamer-editing-services-sys/src/lib.rs | 1633 ++++-- gstreamer-editing-services-sys/tests/abi.rs | 1213 ++++- gstreamer-gl-sys/build.rs | 11 +- gstreamer-gl-sys/src/lib.rs | 1671 ++++-- gstreamer-gl-sys/src/manual.rs | 3 +- gstreamer-gl-sys/tests/abi.rs | 627 ++- gstreamer-mpegts-sys/build.rs | 11 +- gstreamer-mpegts-sys/src/lib.rs | 1011 ++-- gstreamer-mpegts-sys/tests/abi.rs | 927 +++- gstreamer-net-sys/build.rs | 11 +- gstreamer-net-sys/src/lib.rs | 138 +- gstreamer-net-sys/tests/abi.rs | 183 +- gstreamer-pbutils-sys/build.rs | 11 +- gstreamer-pbutils-sys/src/lib.rs | 560 +- gstreamer-pbutils-sys/tests/abi.rs | 220 +- gstreamer-player-sys/build.rs | 11 +- gstreamer-player-sys/src/lib.rs | 258 +- gstreamer-player-sys/tests/abi.rs | 131 +- gstreamer-rtsp-server-sys/build.rs | 11 +- gstreamer-rtsp-server-sys/src/lib.rs | 1754 +++++-- gstreamer-rtsp-server-sys/tests/abi.rs | 505 +- gstreamer-rtsp-sys/build.rs | 11 +- gstreamer-rtsp-sys/src/lib.rs | 783 ++- gstreamer-rtsp-sys/tests/abi.rs | 293 +- gstreamer-sdp-sys/build.rs | 11 +- gstreamer-sdp-sys/src/lib.rs | 801 ++- gstreamer-sdp-sys/tests/abi.rs | 331 +- gstreamer-sys/build.rs | 11 +- gstreamer-sys/src/lib.rs | 5098 ++++++++++++++----- gstreamer-sys/tests/abi.rs | 1529 +++++- gstreamer-tag-sys/build.rs | 11 +- gstreamer-tag-sys/src/lib.rs | 273 +- gstreamer-tag-sys/tests/abi.rs | 194 +- gstreamer-video-sys/build.rs | 11 +- gstreamer-video-sys/src/lib.rs | 2206 +++++--- gstreamer-video-sys/tests/abi.rs | 811 ++- gstreamer-webrtc-sys/build.rs | 11 +- gstreamer-webrtc-sys/src/lib.rs | 218 +- gstreamer-webrtc-sys/tests/abi.rs | 304 +- 52 files changed, 21392 insertions(+), 6858 deletions(-) diff --git a/gstreamer-app-sys/build.rs b/gstreamer-app-sys/build.rs index 4a20ebe42..7e930c632 100644 --- a/gstreamer-app-sys/build.rs +++ b/gstreamer-app-sys/build.rs @@ -6,8 +6,8 @@ extern crate pkg_config; use pkg_config::{Config, Error}; use std::env; -use std::io::prelude::*; use std::io; +use std::io::prelude::*; use std::process; fn main() { @@ -48,7 +48,7 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()) + return Ok(()); } let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); @@ -70,8 +70,10 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } for path in library.link_paths.iter() { - println!("cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist")); + println!( + "cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist") + ); } } Ok(()) @@ -85,4 +87,3 @@ fn find() -> Result<(), Error> { Err(err) => Err(err), } } - diff --git a/gstreamer-app-sys/src/lib.rs b/gstreamer-app-sys/src/lib.rs index 015124ab8..3dc606d6a 100644 --- a/gstreamer-app-sys/src/lib.rs +++ b/gstreamer-app-sys/src/lib.rs @@ -3,17 +3,22 @@ // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] -extern crate libc; extern crate glib_sys as glib; -extern crate gstreamer_sys as gst; extern crate gstreamer_base_sys as gst_base; +extern crate gstreamer_sys as gst; +extern crate libc; #[allow(unused_imports)] -use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, - c_short, c_ushort, c_long, c_ulong, - c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; +use libc::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, + intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -37,10 +42,10 @@ pub struct GstAppSinkCallbacks { impl ::std::fmt::Debug for GstAppSinkCallbacks { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAppSinkCallbacks @ {:?}", self as *const _)) - .field("eos", &self.eos) - .field("new_preroll", &self.new_preroll) - .field("new_sample", &self.new_sample) - .finish() + .field("eos", &self.eos) + .field("new_preroll", &self.new_preroll) + .field("new_sample", &self.new_sample) + .finish() } } @@ -53,23 +58,25 @@ pub struct GstAppSinkClass { pub new_sample: Option gst::GstFlowReturn>, pub pull_preroll: Option *mut gst::GstSample>, pub pull_sample: Option *mut gst::GstSample>, - pub try_pull_preroll: Option *mut gst::GstSample>, - pub try_pull_sample: Option *mut gst::GstSample>, + pub try_pull_preroll: + Option *mut gst::GstSample>, + pub try_pull_sample: + Option *mut gst::GstSample>, pub _gst_reserved: [gpointer; 2], } impl ::std::fmt::Debug for GstAppSinkClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAppSinkClass @ {:?}", self as *const _)) - .field("basesink_class", &self.basesink_class) - .field("eos", &self.eos) - .field("new_preroll", &self.new_preroll) - .field("new_sample", &self.new_sample) - .field("pull_preroll", &self.pull_preroll) - .field("pull_sample", &self.pull_sample) - .field("try_pull_preroll", &self.try_pull_preroll) - .field("try_pull_sample", &self.try_pull_sample) - .finish() + .field("basesink_class", &self.basesink_class) + .field("eos", &self.eos) + .field("new_preroll", &self.new_preroll) + .field("new_sample", &self.new_sample) + .field("pull_preroll", &self.pull_preroll) + .field("pull_sample", &self.pull_sample) + .field("try_pull_preroll", &self.try_pull_preroll) + .field("try_pull_sample", &self.try_pull_sample) + .finish() } } @@ -90,10 +97,10 @@ pub struct GstAppSrcCallbacks { impl ::std::fmt::Debug for GstAppSrcCallbacks { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAppSrcCallbacks @ {:?}", self as *const _)) - .field("need_data", &self.need_data) - .field("enough_data", &self.enough_data) - .field("seek_data", &self.seek_data) - .finish() + .field("need_data", &self.need_data) + .field("enough_data", &self.enough_data) + .field("seek_data", &self.seek_data) + .finish() } } @@ -104,25 +111,28 @@ pub struct GstAppSrcClass { pub need_data: Option, pub enough_data: Option, pub seek_data: Option gboolean>, - pub push_buffer: Option gst::GstFlowReturn>, + pub push_buffer: + Option gst::GstFlowReturn>, pub end_of_stream: Option gst::GstFlowReturn>, - pub push_sample: Option gst::GstFlowReturn>, - pub push_buffer_list: Option gst::GstFlowReturn>, + pub push_sample: + Option gst::GstFlowReturn>, + pub push_buffer_list: + Option gst::GstFlowReturn>, pub _gst_reserved: [gpointer; 2], } impl ::std::fmt::Debug for GstAppSrcClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAppSrcClass @ {:?}", self as *const _)) - .field("basesrc_class", &self.basesrc_class) - .field("need_data", &self.need_data) - .field("enough_data", &self.enough_data) - .field("seek_data", &self.seek_data) - .field("push_buffer", &self.push_buffer) - .field("end_of_stream", &self.end_of_stream) - .field("push_sample", &self.push_sample) - .field("push_buffer_list", &self.push_buffer_list) - .finish() + .field("basesrc_class", &self.basesrc_class) + .field("need_data", &self.need_data) + .field("enough_data", &self.enough_data) + .field("seek_data", &self.seek_data) + .field("push_buffer", &self.push_buffer) + .field("end_of_stream", &self.end_of_stream) + .field("push_sample", &self.push_sample) + .field("push_buffer_list", &self.push_buffer_list) + .finish() } } @@ -143,8 +153,8 @@ pub struct GstAppSink { impl ::std::fmt::Debug for GstAppSink { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAppSink @ {:?}", self as *const _)) - .field("basesink", &self.basesink) - .finish() + .field("basesink", &self.basesink) + .finish() } } @@ -159,8 +169,8 @@ pub struct GstAppSrc { impl ::std::fmt::Debug for GstAppSrc { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAppSrc @ {:?}", self as *const _)) - .field("basesrc", &self.basesrc) - .finish() + .field("basesrc", &self.basesrc) + .finish() } } @@ -187,16 +197,27 @@ extern "C" { pub fn gst_app_sink_pull_sample(appsink: *mut GstAppSink) -> *mut gst::GstSample; #[cfg(any(feature = "v1_12", feature = "dox"))] pub fn gst_app_sink_set_buffer_list_support(appsink: *mut GstAppSink, enable_lists: gboolean); - pub fn gst_app_sink_set_callbacks(appsink: *mut GstAppSink, callbacks: *mut GstAppSinkCallbacks, user_data: gpointer, notify: glib::GDestroyNotify); + pub fn gst_app_sink_set_callbacks( + appsink: *mut GstAppSink, + callbacks: *mut GstAppSinkCallbacks, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); pub fn gst_app_sink_set_caps(appsink: *mut GstAppSink, caps: *const gst::GstCaps); pub fn gst_app_sink_set_drop(appsink: *mut GstAppSink, drop: gboolean); pub fn gst_app_sink_set_emit_signals(appsink: *mut GstAppSink, emit: gboolean); pub fn gst_app_sink_set_max_buffers(appsink: *mut GstAppSink, max: c_uint); pub fn gst_app_sink_set_wait_on_eos(appsink: *mut GstAppSink, wait: gboolean); #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_app_sink_try_pull_preroll(appsink: *mut GstAppSink, timeout: gst::GstClockTime) -> *mut gst::GstSample; + pub fn gst_app_sink_try_pull_preroll( + appsink: *mut GstAppSink, + timeout: gst::GstClockTime, + ) -> *mut gst::GstSample; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_app_sink_try_pull_sample(appsink: *mut GstAppSink, timeout: gst::GstClockTime) -> *mut gst::GstSample; + pub fn gst_app_sink_try_pull_sample( + appsink: *mut GstAppSink, + timeout: gst::GstClockTime, + ) -> *mut gst::GstSample; //========================================================================= // GstAppSrc @@ -213,12 +234,26 @@ extern "C" { pub fn gst_app_src_get_max_bytes(appsrc: *mut GstAppSrc) -> u64; pub fn gst_app_src_get_size(appsrc: *mut GstAppSrc) -> i64; pub fn gst_app_src_get_stream_type(appsrc: *mut GstAppSrc) -> GstAppStreamType; - pub fn gst_app_src_push_buffer(appsrc: *mut GstAppSrc, buffer: *mut gst::GstBuffer) -> gst::GstFlowReturn; + pub fn gst_app_src_push_buffer( + appsrc: *mut GstAppSrc, + buffer: *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_app_src_push_buffer_list(appsrc: *mut GstAppSrc, buffer_list: *mut gst::GstBufferList) -> gst::GstFlowReturn; + pub fn gst_app_src_push_buffer_list( + appsrc: *mut GstAppSrc, + buffer_list: *mut gst::GstBufferList, + ) -> gst::GstFlowReturn; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_app_src_push_sample(appsrc: *mut GstAppSrc, sample: *mut gst::GstSample) -> gst::GstFlowReturn; - pub fn gst_app_src_set_callbacks(appsrc: *mut GstAppSrc, callbacks: *mut GstAppSrcCallbacks, user_data: gpointer, notify: glib::GDestroyNotify); + pub fn gst_app_src_push_sample( + appsrc: *mut GstAppSrc, + sample: *mut gst::GstSample, + ) -> gst::GstFlowReturn; + pub fn gst_app_src_set_callbacks( + appsrc: *mut GstAppSrc, + callbacks: *mut GstAppSrcCallbacks, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); pub fn gst_app_src_set_caps(appsrc: *mut GstAppSrc, caps: *const gst::GstCaps); #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_app_src_set_duration(appsrc: *mut GstAppSrc, duration: gst::GstClockTime); diff --git a/gstreamer-app-sys/tests/abi.rs b/gstreamer-app-sys/tests/abi.rs index 1f6258220..782f1758a 100644 --- a/gstreamer-app-sys/tests/abi.rs +++ b/gstreamer-app-sys/tests/abi.rs @@ -5,13 +5,13 @@ extern crate gstreamer_app_sys; extern crate shell_words; extern crate tempdir; +use gstreamer_app_sys::*; use std::env; use std::error::Error; -use std::path::Path; use std::mem::{align_of, size_of}; +use std::path::Path; use std::process::Command; use std::str; -use gstreamer_app_sys::*; static PACKAGES: &[&str] = &["gstreamer-app-1.0"]; @@ -47,8 +47,7 @@ impl Compiler { cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { - return Err(format!("compilation command {:?} failed, {}", - &cmd, status).into()); + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } @@ -77,14 +76,12 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { cmd.args(packages); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {:?} returned {}", - &cmd, out.status).into()); + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } - #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, @@ -115,9 +112,8 @@ impl Results { fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", - self.passed, - self.failed, - self.failed_to_compile) + self.passed, self.failed, self.failed_to_compile + ) } fn expect_total_success(&self) { if self.failed == 0 { @@ -133,24 +129,28 @@ fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!("1", - get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), - "failed to obtain correct constant value for 1"); + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); - eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_value, c_value); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); } } }; @@ -166,24 +166,31 @@ fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!(Layout {size: 1, alignment: 1}, - get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), - "failed to obtain correct layout for char type"); + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); - eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_layout, &c_layout); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); } } }; @@ -203,15 +210,14 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result Result> { @@ -223,28 +229,71 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result(), alignment: align_of::()}), - ("GstAppSinkCallbacks", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAppSinkClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAppSrc", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAppSrcCallbacks", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAppSrcClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAppStreamType", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstAppSink", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAppSinkCallbacks", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAppSinkClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAppSrc", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAppSrcCallbacks", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAppSrcClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAppStreamType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ @@ -252,5 +301,3 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_APP_STREAM_TYPE_SEEKABLE", "1"), ("(gint) GST_APP_STREAM_TYPE_STREAM", "0"), ]; - - diff --git a/gstreamer-audio-sys/build.rs b/gstreamer-audio-sys/build.rs index 3f73f0abe..6782a9a4d 100644 --- a/gstreamer-audio-sys/build.rs +++ b/gstreamer-audio-sys/build.rs @@ -6,8 +6,8 @@ extern crate pkg_config; use pkg_config::{Config, Error}; use std::env; -use std::io::prelude::*; use std::io; +use std::io::prelude::*; use std::process; fn main() { @@ -48,7 +48,7 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()) + return Ok(()); } let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); @@ -70,8 +70,10 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } for path in library.link_paths.iter() { - println!("cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist")); + println!( + "cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist") + ); } } Ok(()) @@ -85,4 +87,3 @@ fn find() -> Result<(), Error> { Err(err) => Err(err), } } - diff --git a/gstreamer-audio-sys/src/lib.rs b/gstreamer-audio-sys/src/lib.rs index 06d0a01fe..99841c8fe 100644 --- a/gstreamer-audio-sys/src/lib.rs +++ b/gstreamer-audio-sys/src/lib.rs @@ -3,18 +3,23 @@ // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] -extern crate libc; extern crate glib_sys as glib; extern crate gobject_sys as gobject; -extern crate gstreamer_sys as gst; extern crate gstreamer_base_sys as gst_base; +extern crate gstreamer_sys as gst; +extern crate libc; #[allow(unused_imports)] -use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, - c_short, c_ushort, c_long, c_ulong, - c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; +use libc::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, + intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -174,12 +179,18 @@ pub const GST_STREAM_VOLUME_FORMAT_CUBIC: GstStreamVolumeFormat = 1; pub const GST_STREAM_VOLUME_FORMAT_DB: GstStreamVolumeFormat = 2; // Constants -pub const GST_AUDIO_CHANNELS_RANGE: *const c_char = b"(int) [ 1, max ]\0" as *const u8 as *const c_char; -pub const GST_AUDIO_CONVERTER_OPT_DITHER_METHOD: *const c_char = b"GstAudioConverter.dither-method\0" as *const u8 as *const c_char; -pub const GST_AUDIO_CONVERTER_OPT_MIX_MATRIX: *const c_char = b"GstAudioConverter.mix-matrix\0" as *const u8 as *const c_char; -pub const GST_AUDIO_CONVERTER_OPT_NOISE_SHAPING_METHOD: *const c_char = b"GstAudioConverter.noise-shaping-method\0" as *const u8 as *const c_char; -pub const GST_AUDIO_CONVERTER_OPT_QUANTIZATION: *const c_char = b"GstAudioConverter.quantization\0" as *const u8 as *const c_char; -pub const GST_AUDIO_CONVERTER_OPT_RESAMPLER_METHOD: *const c_char = b"GstAudioConverter.resampler-method\0" as *const u8 as *const c_char; +pub const GST_AUDIO_CHANNELS_RANGE: *const c_char = + b"(int) [ 1, max ]\0" as *const u8 as *const c_char; +pub const GST_AUDIO_CONVERTER_OPT_DITHER_METHOD: *const c_char = + b"GstAudioConverter.dither-method\0" as *const u8 as *const c_char; +pub const GST_AUDIO_CONVERTER_OPT_MIX_MATRIX: *const c_char = + b"GstAudioConverter.mix-matrix\0" as *const u8 as *const c_char; +pub const GST_AUDIO_CONVERTER_OPT_NOISE_SHAPING_METHOD: *const c_char = + b"GstAudioConverter.noise-shaping-method\0" as *const u8 as *const c_char; +pub const GST_AUDIO_CONVERTER_OPT_QUANTIZATION: *const c_char = + b"GstAudioConverter.quantization\0" as *const u8 as *const c_char; +pub const GST_AUDIO_CONVERTER_OPT_RESAMPLER_METHOD: *const c_char = + b"GstAudioConverter.resampler-method\0" as *const u8 as *const c_char; pub const GST_AUDIO_DECODER_MAX_ERRORS: c_int = 10; pub const GST_AUDIO_DECODER_SINK_NAME: *const c_char = b"sink\0" as *const u8 as *const c_char; pub const GST_AUDIO_DECODER_SRC_NAME: *const c_char = b"src\0" as *const u8 as *const c_char; @@ -190,21 +201,33 @@ pub const GST_AUDIO_ENCODER_SINK_NAME: *const c_char = b"sink\0" as *const u8 as pub const GST_AUDIO_ENCODER_SRC_NAME: *const c_char = b"src\0" as *const u8 as *const c_char; pub const GST_AUDIO_FORMATS_ALL: *const c_char = b" { S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }\0" as *const u8 as *const c_char; pub const GST_AUDIO_RATE_RANGE: *const c_char = b"(int) [ 1, max ]\0" as *const u8 as *const c_char; -pub const GST_AUDIO_RESAMPLER_OPT_CUBIC_B: *const c_char = b"GstAudioResampler.cubic-b\0" as *const u8 as *const c_char; -pub const GST_AUDIO_RESAMPLER_OPT_CUBIC_C: *const c_char = b"GstAudioResampler.cubic-c\0" as *const u8 as *const c_char; -pub const GST_AUDIO_RESAMPLER_OPT_CUTOFF: *const c_char = b"GstAudioResampler.cutoff\0" as *const u8 as *const c_char; -pub const GST_AUDIO_RESAMPLER_OPT_FILTER_INTERPOLATION: *const c_char = b"GstAudioResampler.filter-interpolation\0" as *const u8 as *const c_char; -pub const GST_AUDIO_RESAMPLER_OPT_FILTER_MODE: *const c_char = b"GstAudioResampler.filter-mode\0" as *const u8 as *const c_char; -pub const GST_AUDIO_RESAMPLER_OPT_FILTER_MODE_THRESHOLD: *const c_char = b"GstAudioResampler.filter-mode-threshold\0" as *const u8 as *const c_char; -pub const GST_AUDIO_RESAMPLER_OPT_FILTER_OVERSAMPLE: *const c_char = b"GstAudioResampler.filter-oversample\0" as *const u8 as *const c_char; -pub const GST_AUDIO_RESAMPLER_OPT_MAX_PHASE_ERROR: *const c_char = b"GstAudioResampler.max-phase-error\0" as *const u8 as *const c_char; -pub const GST_AUDIO_RESAMPLER_OPT_N_TAPS: *const c_char = b"GstAudioResampler.n-taps\0" as *const u8 as *const c_char; -pub const GST_AUDIO_RESAMPLER_OPT_STOP_ATTENUATION: *const c_char = b"GstAudioResampler.stop-attenutation\0" as *const u8 as *const c_char; -pub const GST_AUDIO_RESAMPLER_OPT_TRANSITION_BANDWIDTH: *const c_char = b"GstAudioResampler.transition-bandwidth\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_CUBIC_B: *const c_char = + b"GstAudioResampler.cubic-b\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_CUBIC_C: *const c_char = + b"GstAudioResampler.cubic-c\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_CUTOFF: *const c_char = + b"GstAudioResampler.cutoff\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_FILTER_INTERPOLATION: *const c_char = + b"GstAudioResampler.filter-interpolation\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_FILTER_MODE: *const c_char = + b"GstAudioResampler.filter-mode\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_FILTER_MODE_THRESHOLD: *const c_char = + b"GstAudioResampler.filter-mode-threshold\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_FILTER_OVERSAMPLE: *const c_char = + b"GstAudioResampler.filter-oversample\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_MAX_PHASE_ERROR: *const c_char = + b"GstAudioResampler.max-phase-error\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_N_TAPS: *const c_char = + b"GstAudioResampler.n-taps\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_STOP_ATTENUATION: *const c_char = + b"GstAudioResampler.stop-attenutation\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_TRANSITION_BANDWIDTH: *const c_char = + b"GstAudioResampler.transition-bandwidth\0" as *const u8 as *const c_char; pub const GST_AUDIO_RESAMPLER_QUALITY_DEFAULT: c_int = 4; pub const GST_AUDIO_RESAMPLER_QUALITY_MAX: c_int = 10; pub const GST_AUDIO_RESAMPLER_QUALITY_MIN: c_int = 0; -pub const GST_META_TAG_AUDIO_CHANNELS_STR: *const c_char = b"channels\0" as *const u8 as *const c_char; +pub const GST_META_TAG_AUDIO_CHANNELS_STR: *const c_char = + b"channels\0" as *const u8 as *const c_char; pub const GST_META_TAG_AUDIO_RATE_STR: *const c_char = b"rate\0" as *const u8 as *const c_char; pub const GST_META_TAG_AUDIO_STR: *const c_char = b"audio\0" as *const u8 as *const c_char; @@ -247,29 +270,67 @@ pub const GST_AUDIO_RESAMPLER_FLAG_NON_INTERLEAVED_OUT: GstAudioResamplerFlags = pub const GST_AUDIO_RESAMPLER_FLAG_VARIABLE_RATE: GstAudioResamplerFlags = 4; // Callbacks -pub type GstAudioBaseSinkCustomSlavingCallback = Option; -pub type GstAudioClockGetTimeFunc = Option gst::GstClockTime>; -pub type GstAudioFormatPack = Option; -pub type GstAudioFormatUnpack = Option; -pub type GstAudioRingBufferCallback = Option; +pub type GstAudioBaseSinkCustomSlavingCallback = Option< + unsafe extern "C" fn( + *mut GstAudioBaseSink, + gst::GstClockTime, + gst::GstClockTime, + *mut gst::GstClockTimeDiff, + GstAudioBaseSinkDiscontReason, + gpointer, + ), +>; +pub type GstAudioClockGetTimeFunc = + Option gst::GstClockTime>; +pub type GstAudioFormatPack = Option< + unsafe extern "C" fn( + *const GstAudioFormatInfo, + GstAudioPackFlags, + gconstpointer, + gpointer, + c_int, + ), +>; +pub type GstAudioFormatUnpack = Option< + unsafe extern "C" fn( + *const GstAudioFormatInfo, + GstAudioPackFlags, + gpointer, + gconstpointer, + c_int, + ), +>; +pub type GstAudioRingBufferCallback = + Option; // Records #[repr(C)] #[derive(Copy, Clone)] pub struct GstAudioAggregatorClass { pub parent_class: gst_base::GstAggregatorClass, - pub create_output_buffer: Option *mut gst::GstBuffer>, - pub aggregate_one_buffer: Option gboolean>, + pub create_output_buffer: + Option *mut gst::GstBuffer>, + pub aggregate_one_buffer: Option< + unsafe extern "C" fn( + *mut GstAudioAggregator, + *mut GstAudioAggregatorPad, + *mut gst::GstBuffer, + c_uint, + *mut gst::GstBuffer, + c_uint, + c_uint, + ) -> gboolean, + >, pub _gst_reserved: [gpointer; 20], } impl ::std::fmt::Debug for GstAudioAggregatorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioAggregatorClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("create_output_buffer", &self.create_output_buffer) - .field("aggregate_one_buffer", &self.aggregate_one_buffer) - .finish() + .field("parent_class", &self.parent_class) + .field("create_output_buffer", &self.create_output_buffer) + .field("aggregate_one_buffer", &self.aggregate_one_buffer) + .finish() } } @@ -282,9 +343,12 @@ pub struct GstAudioAggregatorConvertPadClass { impl ::std::fmt::Debug for GstAudioAggregatorConvertPadClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstAudioAggregatorConvertPadClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + f.debug_struct(&format!( + "GstAudioAggregatorConvertPadClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() } } @@ -297,18 +361,28 @@ pub type GstAudioAggregatorConvertPadPrivate = *mut _GstAudioAggregatorConvertPa #[derive(Copy, Clone)] pub struct GstAudioAggregatorPadClass { pub parent_class: gst_base::GstAggregatorPadClass, - pub convert_buffer: Option *mut gst::GstBuffer>, + pub convert_buffer: Option< + unsafe extern "C" fn( + *mut GstAudioAggregatorPad, + *mut GstAudioInfo, + *mut GstAudioInfo, + *mut gst::GstBuffer, + ) -> *mut gst::GstBuffer, + >, pub update_conversion_info: Option, pub _gst_reserved: [gpointer; 20], } impl ::std::fmt::Debug for GstAudioAggregatorPadClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstAudioAggregatorPadClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("convert_buffer", &self.convert_buffer) - .field("update_conversion_info", &self.update_conversion_info) - .finish() + f.debug_struct(&format!( + "GstAudioAggregatorPadClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("convert_buffer", &self.convert_buffer) + .field("update_conversion_info", &self.update_conversion_info) + .finish() } } @@ -326,18 +400,21 @@ pub type GstAudioAggregatorPrivate = *mut _GstAudioAggregatorPrivate; #[derive(Copy, Clone)] pub struct GstAudioBaseSinkClass { pub parent_class: gst_base::GstBaseSinkClass, - pub create_ringbuffer: Option *mut GstAudioRingBuffer>, - pub payload: Option *mut gst::GstBuffer>, + pub create_ringbuffer: + Option *mut GstAudioRingBuffer>, + pub payload: Option< + unsafe extern "C" fn(*mut GstAudioBaseSink, *mut gst::GstBuffer) -> *mut gst::GstBuffer, + >, pub _gst_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstAudioBaseSinkClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioBaseSinkClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("create_ringbuffer", &self.create_ringbuffer) - .field("payload", &self.payload) - .finish() + .field("parent_class", &self.parent_class) + .field("create_ringbuffer", &self.create_ringbuffer) + .field("payload", &self.payload) + .finish() } } @@ -350,16 +427,17 @@ pub type GstAudioBaseSinkPrivate = *mut _GstAudioBaseSinkPrivate; #[derive(Copy, Clone)] pub struct GstAudioBaseSrcClass { pub parent_class: gst_base::GstPushSrcClass, - pub create_ringbuffer: Option *mut GstAudioRingBuffer>, + pub create_ringbuffer: + Option *mut GstAudioRingBuffer>, pub _gst_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstAudioBaseSrcClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioBaseSrcClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("create_ringbuffer", &self.create_ringbuffer) - .finish() + .field("parent_class", &self.parent_class) + .field("create_ringbuffer", &self.create_ringbuffer) + .finish() } } @@ -385,12 +463,12 @@ pub struct GstAudioBuffer { impl ::std::fmt::Debug for GstAudioBuffer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioBuffer @ {:?}", self as *const _)) - .field("info", &self.info) - .field("n_samples", &self.n_samples) - .field("n_planes", &self.n_planes) - .field("planes", &self.planes) - .field("buffer", &self.buffer) - .finish() + .field("info", &self.info) + .field("n_samples", &self.n_samples) + .field("n_planes", &self.n_planes) + .field("planes", &self.planes) + .field("buffer", &self.buffer) + .finish() } } @@ -407,11 +485,11 @@ pub struct GstAudioCdSrcClass { impl ::std::fmt::Debug for GstAudioCdSrcClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioCdSrcClass @ {:?}", self as *const _)) - .field("pushsrc_class", &self.pushsrc_class) - .field("open", &self.open) - .field("close", &self.close) - .field("read_sector", &self.read_sector) - .finish() + .field("pushsrc_class", &self.pushsrc_class) + .field("open", &self.open) + .field("close", &self.close) + .field("read_sector", &self.read_sector) + .finish() } } @@ -435,12 +513,12 @@ pub struct GstAudioCdSrcTrack { impl ::std::fmt::Debug for GstAudioCdSrcTrack { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioCdSrcTrack @ {:?}", self as *const _)) - .field("is_audio", &self.is_audio) - .field("num", &self.num) - .field("start", &self.start) - .field("end", &self.end) - .field("tags", &self.tags) - .finish() + .field("is_audio", &self.is_audio) + .field("num", &self.num) + .field("start", &self.start) + .field("end", &self.end) + .field("tags", &self.tags) + .finish() } } @@ -461,11 +539,11 @@ pub struct GstAudioClippingMeta { impl ::std::fmt::Debug for GstAudioClippingMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioClippingMeta @ {:?}", self as *const _)) - .field("meta", &self.meta) - .field("format", &self.format) - .field("start", &self.start) - .field("end", &self.end) - .finish() + .field("meta", &self.meta) + .field("format", &self.format) + .field("start", &self.start) + .field("end", &self.end) + .finish() } } @@ -479,8 +557,8 @@ pub struct GstAudioClockClass { impl ::std::fmt::Debug for GstAudioClockClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioClockClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -490,7 +568,7 @@ pub struct GstAudioConverter(c_void); impl ::std::fmt::Debug for GstAudioConverter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioConverter @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -500,48 +578,74 @@ pub struct GstAudioDecoderClass { pub element_class: gst::GstElementClass, pub start: Option gboolean>, pub stop: Option gboolean>, - pub set_format: Option gboolean>, - pub parse: Option gst::GstFlowReturn>, - pub handle_frame: Option gst::GstFlowReturn>, + pub set_format: + Option gboolean>, + pub parse: Option< + unsafe extern "C" fn( + *mut GstAudioDecoder, + *mut gst_base::GstAdapter, + *mut c_int, + *mut c_int, + ) -> gst::GstFlowReturn, + >, + pub handle_frame: Option< + unsafe extern "C" fn(*mut GstAudioDecoder, *mut *mut gst::GstBuffer) -> gst::GstFlowReturn, + >, pub flush: Option, - pub pre_push: Option gst::GstFlowReturn>, - pub sink_event: Option gboolean>, - pub src_event: Option gboolean>, + pub pre_push: Option< + unsafe extern "C" fn(*mut GstAudioDecoder, *mut *mut gst::GstBuffer) -> gst::GstFlowReturn, + >, + pub sink_event: + Option gboolean>, + pub src_event: + Option gboolean>, pub open: Option gboolean>, pub close: Option gboolean>, pub negotiate: Option gboolean>, - pub decide_allocation: Option gboolean>, - pub propose_allocation: Option gboolean>, - pub sink_query: Option gboolean>, - pub src_query: Option gboolean>, - pub getcaps: Option *mut gst::GstCaps>, - pub transform_meta: Option gboolean>, + pub decide_allocation: + Option gboolean>, + pub propose_allocation: + Option gboolean>, + pub sink_query: + Option gboolean>, + pub src_query: + Option gboolean>, + pub getcaps: + Option *mut gst::GstCaps>, + pub transform_meta: Option< + unsafe extern "C" fn( + *mut GstAudioDecoder, + *mut gst::GstBuffer, + *mut gst::GstMeta, + *mut gst::GstBuffer, + ) -> gboolean, + >, pub _gst_reserved: [gpointer; 16], } impl ::std::fmt::Debug for GstAudioDecoderClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioDecoderClass @ {:?}", self as *const _)) - .field("element_class", &self.element_class) - .field("start", &self.start) - .field("stop", &self.stop) - .field("set_format", &self.set_format) - .field("parse", &self.parse) - .field("handle_frame", &self.handle_frame) - .field("flush", &self.flush) - .field("pre_push", &self.pre_push) - .field("sink_event", &self.sink_event) - .field("src_event", &self.src_event) - .field("open", &self.open) - .field("close", &self.close) - .field("negotiate", &self.negotiate) - .field("decide_allocation", &self.decide_allocation) - .field("propose_allocation", &self.propose_allocation) - .field("sink_query", &self.sink_query) - .field("src_query", &self.src_query) - .field("getcaps", &self.getcaps) - .field("transform_meta", &self.transform_meta) - .finish() + .field("element_class", &self.element_class) + .field("start", &self.start) + .field("stop", &self.stop) + .field("set_format", &self.set_format) + .field("parse", &self.parse) + .field("handle_frame", &self.handle_frame) + .field("flush", &self.flush) + .field("pre_push", &self.pre_push) + .field("sink_event", &self.sink_event) + .field("src_event", &self.src_event) + .field("open", &self.open) + .field("close", &self.close) + .field("negotiate", &self.negotiate) + .field("decide_allocation", &self.decide_allocation) + .field("propose_allocation", &self.propose_allocation) + .field("sink_query", &self.sink_query) + .field("src_query", &self.src_query) + .field("getcaps", &self.getcaps) + .field("transform_meta", &self.transform_meta) + .finish() } } @@ -564,13 +668,13 @@ pub struct GstAudioDownmixMeta { impl ::std::fmt::Debug for GstAudioDownmixMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioDownmixMeta @ {:?}", self as *const _)) - .field("meta", &self.meta) - .field("from_position", &self.from_position) - .field("to_position", &self.to_position) - .field("from_channels", &self.from_channels) - .field("to_channels", &self.to_channels) - .field("matrix", &self.matrix) - .finish() + .field("meta", &self.meta) + .field("from_position", &self.from_position) + .field("to_position", &self.to_position) + .field("from_channels", &self.from_channels) + .field("to_channels", &self.to_channels) + .field("matrix", &self.matrix) + .finish() } } @@ -580,46 +684,65 @@ pub struct GstAudioEncoderClass { pub element_class: gst::GstElementClass, pub start: Option gboolean>, pub stop: Option gboolean>, - pub set_format: Option gboolean>, - pub handle_frame: Option gst::GstFlowReturn>, + pub set_format: + Option gboolean>, + pub handle_frame: Option< + unsafe extern "C" fn(*mut GstAudioEncoder, *mut *mut gst::GstBuffer) -> gst::GstFlowReturn, + >, pub flush: Option, - pub pre_push: Option gst::GstFlowReturn>, - pub sink_event: Option gboolean>, - pub src_event: Option gboolean>, - pub getcaps: Option *mut gst::GstCaps>, + pub pre_push: Option< + unsafe extern "C" fn(*mut GstAudioEncoder, *mut *mut gst::GstBuffer) -> gst::GstFlowReturn, + >, + pub sink_event: + Option gboolean>, + pub src_event: + Option gboolean>, + pub getcaps: + Option *mut gst::GstCaps>, pub open: Option gboolean>, pub close: Option gboolean>, pub negotiate: Option gboolean>, - pub decide_allocation: Option gboolean>, - pub propose_allocation: Option gboolean>, - pub transform_meta: Option gboolean>, - pub sink_query: Option gboolean>, - pub src_query: Option gboolean>, + pub decide_allocation: + Option gboolean>, + pub propose_allocation: + Option gboolean>, + pub transform_meta: Option< + unsafe extern "C" fn( + *mut GstAudioEncoder, + *mut gst::GstBuffer, + *mut gst::GstMeta, + *mut gst::GstBuffer, + ) -> gboolean, + >, + pub sink_query: + Option gboolean>, + pub src_query: + Option gboolean>, pub _gst_reserved: [gpointer; 17], } impl ::std::fmt::Debug for GstAudioEncoderClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioEncoderClass @ {:?}", self as *const _)) - .field("element_class", &self.element_class) - .field("start", &self.start) - .field("stop", &self.stop) - .field("set_format", &self.set_format) - .field("handle_frame", &self.handle_frame) - .field("flush", &self.flush) - .field("pre_push", &self.pre_push) - .field("sink_event", &self.sink_event) - .field("src_event", &self.src_event) - .field("getcaps", &self.getcaps) - .field("open", &self.open) - .field("close", &self.close) - .field("negotiate", &self.negotiate) - .field("decide_allocation", &self.decide_allocation) - .field("propose_allocation", &self.propose_allocation) - .field("transform_meta", &self.transform_meta) - .field("sink_query", &self.sink_query) - .field("src_query", &self.src_query) - .finish() + .field("element_class", &self.element_class) + .field("start", &self.start) + .field("stop", &self.stop) + .field("set_format", &self.set_format) + .field("handle_frame", &self.handle_frame) + .field("flush", &self.flush) + .field("pre_push", &self.pre_push) + .field("sink_event", &self.sink_event) + .field("src_event", &self.src_event) + .field("getcaps", &self.getcaps) + .field("open", &self.open) + .field("close", &self.close) + .field("negotiate", &self.negotiate) + .field("decide_allocation", &self.decide_allocation) + .field("propose_allocation", &self.propose_allocation) + .field("transform_meta", &self.transform_meta) + .field("sink_query", &self.sink_query) + .field("src_query", &self.src_query) + .finish() } } @@ -639,9 +762,9 @@ pub struct GstAudioFilterClass { impl ::std::fmt::Debug for GstAudioFilterClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioFilterClass @ {:?}", self as *const _)) - .field("basetransformclass", &self.basetransformclass) - .field("setup", &self.setup) - .finish() + .field("basetransformclass", &self.basetransformclass) + .field("setup", &self.setup) + .finish() } } @@ -665,18 +788,18 @@ pub struct GstAudioFormatInfo { impl ::std::fmt::Debug for GstAudioFormatInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioFormatInfo @ {:?}", self as *const _)) - .field("format", &self.format) - .field("name", &self.name) - .field("description", &self.description) - .field("flags", &self.flags) - .field("endianness", &self.endianness) - .field("width", &self.width) - .field("depth", &self.depth) - .field("silence", &self.silence) - .field("unpack_format", &self.unpack_format) - .field("unpack_func", &self.unpack_func) - .field("pack_func", &self.pack_func) - .finish() + .field("format", &self.format) + .field("name", &self.name) + .field("description", &self.description) + .field("flags", &self.flags) + .field("endianness", &self.endianness) + .field("width", &self.width) + .field("depth", &self.depth) + .field("silence", &self.silence) + .field("unpack_format", &self.unpack_format) + .field("unpack_func", &self.unpack_func) + .field("pack_func", &self.pack_func) + .finish() } } @@ -696,13 +819,13 @@ pub struct GstAudioInfo { impl ::std::fmt::Debug for GstAudioInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioInfo @ {:?}", self as *const _)) - .field("finfo", &self.finfo) - .field("flags", &self.flags) - .field("layout", &self.layout) - .field("rate", &self.rate) - .field("channels", &self.channels) - .field("bpf", &self.bpf) - .finish() + .field("finfo", &self.finfo) + .field("flags", &self.flags) + .field("layout", &self.layout) + .field("rate", &self.rate) + .field("channels", &self.channels) + .field("bpf", &self.bpf) + .finish() } } @@ -720,11 +843,11 @@ pub struct GstAudioMeta { impl ::std::fmt::Debug for GstAudioMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioMeta @ {:?}", self as *const _)) - .field("meta", &self.meta) - .field("info", &self.info) - .field("samples", &self.samples) - .field("offsets", &self.offsets) - .finish() + .field("meta", &self.meta) + .field("info", &self.info) + .field("samples", &self.samples) + .field("offsets", &self.offsets) + .finish() } } @@ -743,7 +866,9 @@ pub type GstAudioResampler = *mut _GstAudioResampler; pub struct GstAudioRingBufferClass { pub parent_class: gst::GstObjectClass, pub open_device: Option gboolean>, - pub acquire: Option gboolean>, + pub acquire: Option< + unsafe extern "C" fn(*mut GstAudioRingBuffer, *mut GstAudioRingBufferSpec) -> gboolean, + >, pub release: Option gboolean>, pub close_device: Option gboolean>, pub start: Option gboolean>, @@ -752,7 +877,16 @@ pub struct GstAudioRingBufferClass { pub stop: Option gboolean>, pub delay: Option c_uint>, pub activate: Option gboolean>, - pub commit: Option c_uint>, + pub commit: Option< + unsafe extern "C" fn( + *mut GstAudioRingBuffer, + *mut u64, + *mut u8, + c_int, + c_int, + *mut c_int, + ) -> c_uint, + >, pub clear_all: Option, pub _gst_reserved: [gpointer; 4], } @@ -760,20 +894,20 @@ pub struct GstAudioRingBufferClass { impl ::std::fmt::Debug for GstAudioRingBufferClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioRingBufferClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("open_device", &self.open_device) - .field("acquire", &self.acquire) - .field("release", &self.release) - .field("close_device", &self.close_device) - .field("start", &self.start) - .field("pause", &self.pause) - .field("resume", &self.resume) - .field("stop", &self.stop) - .field("delay", &self.delay) - .field("activate", &self.activate) - .field("commit", &self.commit) - .field("clear_all", &self.clear_all) - .finish() + .field("parent_class", &self.parent_class) + .field("open_device", &self.open_device) + .field("acquire", &self.acquire) + .field("release", &self.release) + .field("close_device", &self.close_device) + .field("start", &self.start) + .field("pause", &self.pause) + .field("resume", &self.resume) + .field("stop", &self.stop) + .field("delay", &self.delay) + .field("activate", &self.activate) + .field("commit", &self.commit) + .field("clear_all", &self.clear_all) + .finish() } } @@ -794,15 +928,15 @@ pub struct GstAudioRingBufferSpec { impl ::std::fmt::Debug for GstAudioRingBufferSpec { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioRingBufferSpec @ {:?}", self as *const _)) - .field("caps", &self.caps) - .field("type_", &self.type_) - .field("info", &self.info) - .field("latency_time", &self.latency_time) - .field("buffer_time", &self.buffer_time) - .field("segsize", &self.segsize) - .field("segtotal", &self.segtotal) - .field("seglatency", &self.seglatency) - .finish() + .field("caps", &self.caps) + .field("type_", &self.type_) + .field("info", &self.info) + .field("latency_time", &self.latency_time) + .field("buffer_time", &self.buffer_time) + .field("segsize", &self.segsize) + .field("segtotal", &self.segtotal) + .field("seglatency", &self.seglatency) + .finish() } } @@ -811,7 +945,8 @@ impl ::std::fmt::Debug for GstAudioRingBufferSpec { pub struct GstAudioSinkClass { pub parent_class: GstAudioBaseSinkClass, pub open: Option gboolean>, - pub prepare: Option gboolean>, + pub prepare: + Option gboolean>, pub unprepare: Option gboolean>, pub close: Option gboolean>, pub write: Option c_int>, @@ -823,15 +958,15 @@ pub struct GstAudioSinkClass { impl ::std::fmt::Debug for GstAudioSinkClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioSinkClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("open", &self.open) - .field("prepare", &self.prepare) - .field("unprepare", &self.unprepare) - .field("close", &self.close) - .field("write", &self.write) - .field("delay", &self.delay) - .field("reset", &self.reset) - .finish() + .field("parent_class", &self.parent_class) + .field("open", &self.open) + .field("prepare", &self.prepare) + .field("unprepare", &self.unprepare) + .field("close", &self.close) + .field("write", &self.write) + .field("delay", &self.delay) + .field("reset", &self.reset) + .finish() } } @@ -840,10 +975,13 @@ impl ::std::fmt::Debug for GstAudioSinkClass { pub struct GstAudioSrcClass { pub parent_class: GstAudioBaseSrcClass, pub open: Option gboolean>, - pub prepare: Option gboolean>, + pub prepare: + Option gboolean>, pub unprepare: Option gboolean>, pub close: Option gboolean>, - pub read: Option c_uint>, + pub read: Option< + unsafe extern "C" fn(*mut GstAudioSrc, gpointer, c_uint, *mut gst::GstClockTime) -> c_uint, + >, pub delay: Option c_uint>, pub reset: Option, pub _gst_reserved: [gpointer; 4], @@ -852,15 +990,15 @@ pub struct GstAudioSrcClass { impl ::std::fmt::Debug for GstAudioSrcClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioSrcClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("open", &self.open) - .field("prepare", &self.prepare) - .field("unprepare", &self.unprepare) - .field("close", &self.close) - .field("read", &self.read) - .field("delay", &self.delay) - .field("reset", &self.reset) - .finish() + .field("parent_class", &self.parent_class) + .field("open", &self.open) + .field("prepare", &self.prepare) + .field("unprepare", &self.unprepare) + .field("close", &self.close) + .field("read", &self.read) + .field("delay", &self.delay) + .field("reset", &self.reset) + .finish() } } @@ -870,7 +1008,7 @@ pub struct GstAudioStreamAlign(c_void); impl ::std::fmt::Debug for GstAudioStreamAlign { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioStreamAlign @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -882,9 +1020,12 @@ pub struct GstStreamVolumeInterface { impl ::std::fmt::Debug for GstStreamVolumeInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstStreamVolumeInterface @ {:?}", self as *const _)) - .field("iface", &self.iface) - .finish() + f.debug_struct(&format!( + "GstStreamVolumeInterface @ {:?}", + self as *const _ + )) + .field("iface", &self.iface) + .finish() } } @@ -901,9 +1042,9 @@ pub struct GstAudioAggregator { impl ::std::fmt::Debug for GstAudioAggregator { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioAggregator @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("current_caps", &self.current_caps) - .finish() + .field("parent", &self.parent) + .field("current_caps", &self.current_caps) + .finish() } } @@ -917,8 +1058,11 @@ pub struct GstAudioAggregatorConvertPad { impl ::std::fmt::Debug for GstAudioAggregatorConvertPad { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstAudioAggregatorConvertPad @ {:?}", self as *const _)) - .finish() + f.debug_struct(&format!( + "GstAudioAggregatorConvertPad @ {:?}", + self as *const _ + )) + .finish() } } @@ -934,9 +1078,9 @@ pub struct GstAudioAggregatorPad { impl ::std::fmt::Debug for GstAudioAggregatorPad { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioAggregatorPad @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("info", &self.info) - .finish() + .field("parent", &self.parent) + .field("info", &self.info) + .finish() } } @@ -957,14 +1101,14 @@ pub struct GstAudioBaseSink { impl ::std::fmt::Debug for GstAudioBaseSink { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioBaseSink @ {:?}", self as *const _)) - .field("element", &self.element) - .field("ringbuffer", &self.ringbuffer) - .field("buffer_time", &self.buffer_time) - .field("latency_time", &self.latency_time) - .field("next_sample", &self.next_sample) - .field("provided_clock", &self.provided_clock) - .field("eos_rendering", &self.eos_rendering) - .finish() + .field("element", &self.element) + .field("ringbuffer", &self.ringbuffer) + .field("buffer_time", &self.buffer_time) + .field("latency_time", &self.latency_time) + .field("next_sample", &self.next_sample) + .field("provided_clock", &self.provided_clock) + .field("eos_rendering", &self.eos_rendering) + .finish() } } @@ -984,13 +1128,13 @@ pub struct GstAudioBaseSrc { impl ::std::fmt::Debug for GstAudioBaseSrc { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioBaseSrc @ {:?}", self as *const _)) - .field("element", &self.element) - .field("ringbuffer", &self.ringbuffer) - .field("buffer_time", &self.buffer_time) - .field("latency_time", &self.latency_time) - .field("next_sample", &self.next_sample) - .field("clock", &self.clock) - .finish() + .field("element", &self.element) + .field("ringbuffer", &self.ringbuffer) + .field("buffer_time", &self.buffer_time) + .field("latency_time", &self.latency_time) + .field("next_sample", &self.next_sample) + .field("clock", &self.clock) + .finish() } } @@ -1007,9 +1151,9 @@ pub struct GstAudioCdSrc { impl ::std::fmt::Debug for GstAudioCdSrc { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioCdSrc @ {:?}", self as *const _)) - .field("pushsrc", &self.pushsrc) - .field("tags", &self.tags) - .finish() + .field("pushsrc", &self.pushsrc) + .field("tags", &self.tags) + .finish() } } @@ -1028,11 +1172,11 @@ pub struct GstAudioClock { impl ::std::fmt::Debug for GstAudioClock { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioClock @ {:?}", self as *const _)) - .field("clock", &self.clock) - .field("func", &self.func) - .field("user_data", &self.user_data) - .field("destroy_notify", &self.destroy_notify) - .finish() + .field("clock", &self.clock) + .field("func", &self.func) + .field("user_data", &self.user_data) + .field("destroy_notify", &self.destroy_notify) + .finish() } } @@ -1052,13 +1196,13 @@ pub struct GstAudioDecoder { impl ::std::fmt::Debug for GstAudioDecoder { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioDecoder @ {:?}", self as *const _)) - .field("element", &self.element) - .field("sinkpad", &self.sinkpad) - .field("srcpad", &self.srcpad) - .field("stream_lock", &self.stream_lock) - .field("input_segment", &self.input_segment) - .field("output_segment", &self.output_segment) - .finish() + .field("element", &self.element) + .field("sinkpad", &self.sinkpad) + .field("srcpad", &self.srcpad) + .field("stream_lock", &self.stream_lock) + .field("input_segment", &self.input_segment) + .field("output_segment", &self.output_segment) + .finish() } } @@ -1078,13 +1222,13 @@ pub struct GstAudioEncoder { impl ::std::fmt::Debug for GstAudioEncoder { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioEncoder @ {:?}", self as *const _)) - .field("element", &self.element) - .field("sinkpad", &self.sinkpad) - .field("srcpad", &self.srcpad) - .field("stream_lock", &self.stream_lock) - .field("input_segment", &self.input_segment) - .field("output_segment", &self.output_segment) - .finish() + .field("element", &self.element) + .field("sinkpad", &self.sinkpad) + .field("srcpad", &self.srcpad) + .field("stream_lock", &self.stream_lock) + .field("input_segment", &self.input_segment) + .field("output_segment", &self.output_segment) + .finish() } } @@ -1099,9 +1243,9 @@ pub struct GstAudioFilter { impl ::std::fmt::Debug for GstAudioFilter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioFilter @ {:?}", self as *const _)) - .field("basetransform", &self.basetransform) - .field("info", &self.info) - .finish() + .field("basetransform", &self.basetransform) + .field("info", &self.info) + .finish() } } @@ -1136,20 +1280,20 @@ pub struct GstAudioRingBuffer { impl ::std::fmt::Debug for GstAudioRingBuffer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioRingBuffer @ {:?}", self as *const _)) - .field("object", &self.object) - .field("cond", &self.cond) - .field("open", &self.open) - .field("acquired", &self.acquired) - .field("memory", &self.memory) - .field("size", &self.size) - .field("spec", &self.spec) - .field("samples_per_seg", &self.samples_per_seg) - .field("empty_seg", &self.empty_seg) - .field("state", &self.state) - .field("segdone", &self.segdone) - .field("segbase", &self.segbase) - .field("waiting", &self.waiting) - .finish() + .field("object", &self.object) + .field("cond", &self.cond) + .field("open", &self.open) + .field("acquired", &self.acquired) + .field("memory", &self.memory) + .field("size", &self.size) + .field("spec", &self.spec) + .field("samples_per_seg", &self.samples_per_seg) + .field("empty_seg", &self.empty_seg) + .field("state", &self.state) + .field("segdone", &self.segdone) + .field("segbase", &self.segbase) + .field("waiting", &self.waiting) + .finish() } } @@ -1164,8 +1308,8 @@ pub struct GstAudioSink { impl ::std::fmt::Debug for GstAudioSink { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioSink @ {:?}", self as *const _)) - .field("element", &self.element) - .finish() + .field("element", &self.element) + .finish() } } @@ -1180,8 +1324,8 @@ pub struct GstAudioSrc { impl ::std::fmt::Debug for GstAudioSrc { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioSrc @ {:?}", self as *const _)) - .field("element", &self.element) - .finish() + .field("element", &self.element) + .finish() } } @@ -1195,7 +1339,6 @@ impl ::std::fmt::Debug for GstStreamVolume { } } - extern "C" { //========================================================================= @@ -1232,8 +1375,17 @@ extern "C" { // GstAudioFormat //========================================================================= pub fn gst_audio_format_get_type() -> GType; - pub fn gst_audio_format_build_integer(sign: gboolean, endianness: c_int, width: c_int, depth: c_int) -> GstAudioFormat; - pub fn gst_audio_format_fill_silence(info: *const GstAudioFormatInfo, dest: gpointer, length: size_t); + pub fn gst_audio_format_build_integer( + sign: gboolean, + endianness: c_int, + width: c_int, + depth: c_int, + ) -> GstAudioFormat; + pub fn gst_audio_format_fill_silence( + info: *const GstAudioFormatInfo, + dest: gpointer, + length: size_t, + ); pub fn gst_audio_format_from_string(format: *const c_char) -> GstAudioFormat; pub fn gst_audio_format_get_info(format: GstAudioFormat) -> *const GstAudioFormatInfo; pub fn gst_audio_format_to_string(format: GstAudioFormat) -> *const c_char; @@ -1312,23 +1464,62 @@ extern "C" { // GstAudioBuffer //========================================================================= #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_audio_buffer_map(buffer: *mut GstAudioBuffer, info: *const GstAudioInfo, gstbuffer: *mut gst::GstBuffer, flags: gst::GstMapFlags) -> gboolean; + pub fn gst_audio_buffer_map( + buffer: *mut GstAudioBuffer, + info: *const GstAudioInfo, + gstbuffer: *mut gst::GstBuffer, + flags: gst::GstMapFlags, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_audio_buffer_unmap(buffer: *mut GstAudioBuffer); - pub fn gst_audio_buffer_clip(buffer: *mut gst::GstBuffer, segment: *const gst::GstSegment, rate: c_int, bpf: c_int) -> *mut gst::GstBuffer; - pub fn gst_audio_buffer_reorder_channels(buffer: *mut gst::GstBuffer, format: GstAudioFormat, channels: c_int, from: *const GstAudioChannelPosition, to: *const GstAudioChannelPosition) -> gboolean; + pub fn gst_audio_buffer_clip( + buffer: *mut gst::GstBuffer, + segment: *const gst::GstSegment, + rate: c_int, + bpf: c_int, + ) -> *mut gst::GstBuffer; + pub fn gst_audio_buffer_reorder_channels( + buffer: *mut gst::GstBuffer, + format: GstAudioFormat, + channels: c_int, + from: *const GstAudioChannelPosition, + to: *const GstAudioChannelPosition, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_audio_buffer_truncate(buffer: *mut gst::GstBuffer, bpf: c_int, trim: size_t, samples: size_t) -> *mut gst::GstBuffer; + pub fn gst_audio_buffer_truncate( + buffer: *mut gst::GstBuffer, + bpf: c_int, + trim: size_t, + samples: size_t, + ) -> *mut gst::GstBuffer; //========================================================================= // GstAudioChannelMixer //========================================================================= pub fn gst_audio_channel_mixer_free(mix: *mut GstAudioChannelMixer); pub fn gst_audio_channel_mixer_is_passthrough(mix: *mut GstAudioChannelMixer) -> gboolean; - pub fn gst_audio_channel_mixer_samples(mix: *mut GstAudioChannelMixer, in_: *const gpointer, out: *mut gpointer, samples: c_int); - pub fn gst_audio_channel_mixer_new(flags: GstAudioChannelMixerFlags, format: GstAudioFormat, in_channels: c_int, in_position: *mut GstAudioChannelPosition, out_channels: c_int, out_position: *mut GstAudioChannelPosition) -> *mut GstAudioChannelMixer; + pub fn gst_audio_channel_mixer_samples( + mix: *mut GstAudioChannelMixer, + in_: *const gpointer, + out: *mut gpointer, + samples: c_int, + ); + pub fn gst_audio_channel_mixer_new( + flags: GstAudioChannelMixerFlags, + format: GstAudioFormat, + in_channels: c_int, + in_position: *mut GstAudioChannelPosition, + out_channels: c_int, + out_position: *mut GstAudioChannelPosition, + ) -> *mut GstAudioChannelMixer; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_audio_channel_mixer_new_with_matrix(flags: GstAudioChannelMixerFlags, format: GstAudioFormat, in_channels: c_int, out_channels: c_int, matrix: *mut *mut c_float) -> *mut GstAudioChannelMixer; + pub fn gst_audio_channel_mixer_new_with_matrix( + flags: GstAudioChannelMixerFlags, + format: GstAudioFormat, + in_channels: c_int, + out_channels: c_int, + matrix: *mut *mut c_float, + ) -> *mut GstAudioChannelMixer; //========================================================================= // GstAudioClippingMeta @@ -1339,20 +1530,54 @@ extern "C" { // GstAudioConverter //========================================================================= pub fn gst_audio_converter_get_type() -> GType; - pub fn gst_audio_converter_new(flags: GstAudioConverterFlags, in_info: *mut GstAudioInfo, out_info: *mut GstAudioInfo, config: *mut gst::GstStructure) -> *mut GstAudioConverter; + pub fn gst_audio_converter_new( + flags: GstAudioConverterFlags, + in_info: *mut GstAudioInfo, + out_info: *mut GstAudioInfo, + config: *mut gst::GstStructure, + ) -> *mut GstAudioConverter; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_audio_converter_convert(convert: *mut GstAudioConverter, flags: GstAudioConverterFlags, in_: gpointer, in_size: size_t, out: *mut u8, out_size: *mut size_t) -> gboolean; + pub fn gst_audio_converter_convert( + convert: *mut GstAudioConverter, + flags: GstAudioConverterFlags, + in_: gpointer, + in_size: size_t, + out: *mut u8, + out_size: *mut size_t, + ) -> gboolean; pub fn gst_audio_converter_free(convert: *mut GstAudioConverter); - pub fn gst_audio_converter_get_config(convert: *mut GstAudioConverter, in_rate: *mut c_int, out_rate: *mut c_int) -> *const gst::GstStructure; - pub fn gst_audio_converter_get_in_frames(convert: *mut GstAudioConverter, out_frames: size_t) -> size_t; + pub fn gst_audio_converter_get_config( + convert: *mut GstAudioConverter, + in_rate: *mut c_int, + out_rate: *mut c_int, + ) -> *const gst::GstStructure; + pub fn gst_audio_converter_get_in_frames( + convert: *mut GstAudioConverter, + out_frames: size_t, + ) -> size_t; pub fn gst_audio_converter_get_max_latency(convert: *mut GstAudioConverter) -> size_t; - pub fn gst_audio_converter_get_out_frames(convert: *mut GstAudioConverter, in_frames: size_t) -> size_t; + pub fn gst_audio_converter_get_out_frames( + convert: *mut GstAudioConverter, + in_frames: size_t, + ) -> size_t; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_audio_converter_is_passthrough(convert: *mut GstAudioConverter) -> gboolean; pub fn gst_audio_converter_reset(convert: *mut GstAudioConverter); - pub fn gst_audio_converter_samples(convert: *mut GstAudioConverter, flags: GstAudioConverterFlags, in_: *mut gpointer, in_frames: size_t, out: *mut gpointer, out_frames: size_t) -> gboolean; + pub fn gst_audio_converter_samples( + convert: *mut GstAudioConverter, + flags: GstAudioConverterFlags, + in_: *mut gpointer, + in_frames: size_t, + out: *mut gpointer, + out_frames: size_t, + ) -> gboolean; pub fn gst_audio_converter_supports_inplace(convert: *mut GstAudioConverter) -> gboolean; - pub fn gst_audio_converter_update_config(convert: *mut GstAudioConverter, in_rate: c_int, out_rate: c_int, config: *mut gst::GstStructure) -> gboolean; + pub fn gst_audio_converter_update_config( + convert: *mut GstAudioConverter, + in_rate: c_int, + out_rate: c_int, + config: *mut gst::GstStructure, + ) -> gboolean; //========================================================================= // GstAudioDownmixMeta @@ -1362,21 +1587,40 @@ extern "C" { //========================================================================= // GstAudioFilterClass //========================================================================= - pub fn gst_audio_filter_class_add_pad_templates(klass: *mut GstAudioFilterClass, allowed_caps: *mut gst::GstCaps); + pub fn gst_audio_filter_class_add_pad_templates( + klass: *mut GstAudioFilterClass, + allowed_caps: *mut gst::GstCaps, + ); //========================================================================= // GstAudioInfo //========================================================================= pub fn gst_audio_info_get_type() -> GType; pub fn gst_audio_info_new() -> *mut GstAudioInfo; - pub fn gst_audio_info_convert(info: *const GstAudioInfo, src_fmt: gst::GstFormat, src_val: i64, dest_fmt: gst::GstFormat, dest_val: *mut i64) -> gboolean; + pub fn gst_audio_info_convert( + info: *const GstAudioInfo, + src_fmt: gst::GstFormat, + src_val: i64, + dest_fmt: gst::GstFormat, + dest_val: *mut i64, + ) -> gboolean; pub fn gst_audio_info_copy(info: *const GstAudioInfo) -> *mut GstAudioInfo; pub fn gst_audio_info_free(info: *mut GstAudioInfo); - pub fn gst_audio_info_from_caps(info: *mut GstAudioInfo, caps: *const gst::GstCaps) -> gboolean; + pub fn gst_audio_info_from_caps(info: *mut GstAudioInfo, caps: *const gst::GstCaps) + -> gboolean; pub fn gst_audio_info_init(info: *mut GstAudioInfo); #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_audio_info_is_equal(info: *const GstAudioInfo, other: *const GstAudioInfo) -> gboolean; - pub fn gst_audio_info_set_format(info: *mut GstAudioInfo, format: GstAudioFormat, rate: c_int, channels: c_int, position: *const [GstAudioChannelPosition; 64]); + pub fn gst_audio_info_is_equal( + info: *const GstAudioInfo, + other: *const GstAudioInfo, + ) -> gboolean; + pub fn gst_audio_info_set_format( + info: *mut GstAudioInfo, + format: GstAudioFormat, + rate: c_int, + channels: c_int, + position: *const [GstAudioChannelPosition; 64], + ); pub fn gst_audio_info_to_caps(info: *const GstAudioInfo) -> *mut gst::GstCaps; //========================================================================= @@ -1389,53 +1633,123 @@ extern "C" { //========================================================================= pub fn gst_audio_quantize_free(quant: *mut GstAudioQuantize); pub fn gst_audio_quantize_reset(quant: *mut GstAudioQuantize); - pub fn gst_audio_quantize_samples(quant: *mut GstAudioQuantize, in_: *const gpointer, out: *mut gpointer, samples: c_uint); - pub fn gst_audio_quantize_new(dither: GstAudioDitherMethod, ns: GstAudioNoiseShapingMethod, flags: GstAudioQuantizeFlags, format: GstAudioFormat, channels: c_uint, quantizer: c_uint) -> *mut GstAudioQuantize; + pub fn gst_audio_quantize_samples( + quant: *mut GstAudioQuantize, + in_: *const gpointer, + out: *mut gpointer, + samples: c_uint, + ); + pub fn gst_audio_quantize_new( + dither: GstAudioDitherMethod, + ns: GstAudioNoiseShapingMethod, + flags: GstAudioQuantizeFlags, + format: GstAudioFormat, + channels: c_uint, + quantizer: c_uint, + ) -> *mut GstAudioQuantize; //========================================================================= // GstAudioResampler //========================================================================= #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_audio_resampler_free(resampler: *mut GstAudioResampler); - pub fn gst_audio_resampler_get_in_frames(resampler: *mut GstAudioResampler, out_frames: size_t) -> size_t; + pub fn gst_audio_resampler_get_in_frames( + resampler: *mut GstAudioResampler, + out_frames: size_t, + ) -> size_t; pub fn gst_audio_resampler_get_max_latency(resampler: *mut GstAudioResampler) -> size_t; - pub fn gst_audio_resampler_get_out_frames(resampler: *mut GstAudioResampler, in_frames: size_t) -> size_t; - pub fn gst_audio_resampler_resample(resampler: *mut GstAudioResampler, in_: *mut gpointer, in_frames: size_t, out: *mut gpointer, out_frames: size_t); + pub fn gst_audio_resampler_get_out_frames( + resampler: *mut GstAudioResampler, + in_frames: size_t, + ) -> size_t; + pub fn gst_audio_resampler_resample( + resampler: *mut GstAudioResampler, + in_: *mut gpointer, + in_frames: size_t, + out: *mut gpointer, + out_frames: size_t, + ); pub fn gst_audio_resampler_reset(resampler: *mut GstAudioResampler); - pub fn gst_audio_resampler_update(resampler: *mut GstAudioResampler, in_rate: c_int, out_rate: c_int, options: *mut gst::GstStructure) -> gboolean; + pub fn gst_audio_resampler_update( + resampler: *mut GstAudioResampler, + in_rate: c_int, + out_rate: c_int, + options: *mut gst::GstStructure, + ) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_audio_resampler_new(method: GstAudioResamplerMethod, flags: GstAudioResamplerFlags, format: GstAudioFormat, channels: c_int, in_rate: c_int, out_rate: c_int, options: *mut gst::GstStructure) -> *mut GstAudioResampler; + pub fn gst_audio_resampler_new( + method: GstAudioResamplerMethod, + flags: GstAudioResamplerFlags, + format: GstAudioFormat, + channels: c_int, + in_rate: c_int, + out_rate: c_int, + options: *mut gst::GstStructure, + ) -> *mut GstAudioResampler; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_audio_resampler_options_set_quality(method: GstAudioResamplerMethod, quality: c_uint, in_rate: c_int, out_rate: c_int, options: *mut gst::GstStructure); + pub fn gst_audio_resampler_options_set_quality( + method: GstAudioResamplerMethod, + quality: c_uint, + in_rate: c_int, + out_rate: c_int, + options: *mut gst::GstStructure, + ); //========================================================================= // GstAudioStreamAlign //========================================================================= pub fn gst_audio_stream_align_get_type() -> GType; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_audio_stream_align_new(rate: c_int, alignment_threshold: gst::GstClockTime, discont_wait: gst::GstClockTime) -> *mut GstAudioStreamAlign; + pub fn gst_audio_stream_align_new( + rate: c_int, + alignment_threshold: gst::GstClockTime, + discont_wait: gst::GstClockTime, + ) -> *mut GstAudioStreamAlign; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_audio_stream_align_copy(align: *const GstAudioStreamAlign) -> *mut GstAudioStreamAlign; + pub fn gst_audio_stream_align_copy( + align: *const GstAudioStreamAlign, + ) -> *mut GstAudioStreamAlign; #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_audio_stream_align_free(align: *mut GstAudioStreamAlign); #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_audio_stream_align_get_alignment_threshold(align: *mut GstAudioStreamAlign) -> gst::GstClockTime; + pub fn gst_audio_stream_align_get_alignment_threshold( + align: *mut GstAudioStreamAlign, + ) -> gst::GstClockTime; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_audio_stream_align_get_discont_wait(align: *mut GstAudioStreamAlign) -> gst::GstClockTime; + pub fn gst_audio_stream_align_get_discont_wait( + align: *mut GstAudioStreamAlign, + ) -> gst::GstClockTime; #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_audio_stream_align_get_rate(align: *mut GstAudioStreamAlign) -> c_int; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_audio_stream_align_get_samples_since_discont(align: *mut GstAudioStreamAlign) -> u64; + pub fn gst_audio_stream_align_get_samples_since_discont(align: *mut GstAudioStreamAlign) + -> u64; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_audio_stream_align_get_timestamp_at_discont(align: *mut GstAudioStreamAlign) -> gst::GstClockTime; + pub fn gst_audio_stream_align_get_timestamp_at_discont( + align: *mut GstAudioStreamAlign, + ) -> gst::GstClockTime; #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_audio_stream_align_mark_discont(align: *mut GstAudioStreamAlign); #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_audio_stream_align_process(align: *mut GstAudioStreamAlign, discont: gboolean, timestamp: gst::GstClockTime, n_samples: c_uint, out_timestamp: *mut gst::GstClockTime, out_duration: *mut gst::GstClockTime, out_sample_position: *mut u64) -> gboolean; + pub fn gst_audio_stream_align_process( + align: *mut GstAudioStreamAlign, + discont: gboolean, + timestamp: gst::GstClockTime, + n_samples: c_uint, + out_timestamp: *mut gst::GstClockTime, + out_duration: *mut gst::GstClockTime, + out_sample_position: *mut u64, + ) -> gboolean; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_audio_stream_align_set_alignment_threshold(align: *mut GstAudioStreamAlign, alignment_threshold: gst::GstClockTime); + pub fn gst_audio_stream_align_set_alignment_threshold( + align: *mut GstAudioStreamAlign, + alignment_threshold: gst::GstClockTime, + ); #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_audio_stream_align_set_discont_wait(align: *mut GstAudioStreamAlign, discont_wait: gst::GstClockTime); + pub fn gst_audio_stream_align_set_discont_wait( + align: *mut GstAudioStreamAlign, + discont_wait: gst::GstClockTime, + ); #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_audio_stream_align_set_rate(align: *mut GstAudioStreamAlign, rate: c_int); @@ -1444,7 +1758,11 @@ extern "C" { //========================================================================= pub fn gst_audio_aggregator_get_type() -> GType; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_audio_aggregator_set_sink_caps(aagg: *mut GstAudioAggregator, pad: *mut GstAudioAggregatorPad, caps: *mut gst::GstCaps); + pub fn gst_audio_aggregator_set_sink_caps( + aagg: *mut GstAudioAggregator, + pad: *mut GstAudioAggregatorPad, + caps: *mut gst::GstCaps, + ); //========================================================================= // GstAudioAggregatorConvertPad @@ -1460,44 +1778,85 @@ extern "C" { // GstAudioBaseSink //========================================================================= pub fn gst_audio_base_sink_get_type() -> GType; - pub fn gst_audio_base_sink_create_ringbuffer(sink: *mut GstAudioBaseSink) -> *mut GstAudioRingBuffer; - pub fn gst_audio_base_sink_get_alignment_threshold(sink: *mut GstAudioBaseSink) -> gst::GstClockTime; + pub fn gst_audio_base_sink_create_ringbuffer( + sink: *mut GstAudioBaseSink, + ) -> *mut GstAudioRingBuffer; + pub fn gst_audio_base_sink_get_alignment_threshold( + sink: *mut GstAudioBaseSink, + ) -> gst::GstClockTime; pub fn gst_audio_base_sink_get_discont_wait(sink: *mut GstAudioBaseSink) -> gst::GstClockTime; pub fn gst_audio_base_sink_get_drift_tolerance(sink: *mut GstAudioBaseSink) -> i64; pub fn gst_audio_base_sink_get_provide_clock(sink: *mut GstAudioBaseSink) -> gboolean; - pub fn gst_audio_base_sink_get_slave_method(sink: *mut GstAudioBaseSink) -> GstAudioBaseSinkSlaveMethod; + pub fn gst_audio_base_sink_get_slave_method( + sink: *mut GstAudioBaseSink, + ) -> GstAudioBaseSinkSlaveMethod; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_audio_base_sink_report_device_failure(sink: *mut GstAudioBaseSink); - pub fn gst_audio_base_sink_set_alignment_threshold(sink: *mut GstAudioBaseSink, alignment_threshold: gst::GstClockTime); + pub fn gst_audio_base_sink_set_alignment_threshold( + sink: *mut GstAudioBaseSink, + alignment_threshold: gst::GstClockTime, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_audio_base_sink_set_custom_slaving_callback(sink: *mut GstAudioBaseSink, callback: GstAudioBaseSinkCustomSlavingCallback, user_data: gpointer, notify: glib::GDestroyNotify); - pub fn gst_audio_base_sink_set_discont_wait(sink: *mut GstAudioBaseSink, discont_wait: gst::GstClockTime); - pub fn gst_audio_base_sink_set_drift_tolerance(sink: *mut GstAudioBaseSink, drift_tolerance: i64); + pub fn gst_audio_base_sink_set_custom_slaving_callback( + sink: *mut GstAudioBaseSink, + callback: GstAudioBaseSinkCustomSlavingCallback, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_audio_base_sink_set_discont_wait( + sink: *mut GstAudioBaseSink, + discont_wait: gst::GstClockTime, + ); + pub fn gst_audio_base_sink_set_drift_tolerance( + sink: *mut GstAudioBaseSink, + drift_tolerance: i64, + ); pub fn gst_audio_base_sink_set_provide_clock(sink: *mut GstAudioBaseSink, provide: gboolean); - pub fn gst_audio_base_sink_set_slave_method(sink: *mut GstAudioBaseSink, method: GstAudioBaseSinkSlaveMethod); + pub fn gst_audio_base_sink_set_slave_method( + sink: *mut GstAudioBaseSink, + method: GstAudioBaseSinkSlaveMethod, + ); //========================================================================= // GstAudioBaseSrc //========================================================================= pub fn gst_audio_base_src_get_type() -> GType; - pub fn gst_audio_base_src_create_ringbuffer(src: *mut GstAudioBaseSrc) -> *mut GstAudioRingBuffer; + pub fn gst_audio_base_src_create_ringbuffer( + src: *mut GstAudioBaseSrc, + ) -> *mut GstAudioRingBuffer; pub fn gst_audio_base_src_get_provide_clock(src: *mut GstAudioBaseSrc) -> gboolean; - pub fn gst_audio_base_src_get_slave_method(src: *mut GstAudioBaseSrc) -> GstAudioBaseSrcSlaveMethod; + pub fn gst_audio_base_src_get_slave_method( + src: *mut GstAudioBaseSrc, + ) -> GstAudioBaseSrcSlaveMethod; pub fn gst_audio_base_src_set_provide_clock(src: *mut GstAudioBaseSrc, provide: gboolean); - pub fn gst_audio_base_src_set_slave_method(src: *mut GstAudioBaseSrc, method: GstAudioBaseSrcSlaveMethod); + pub fn gst_audio_base_src_set_slave_method( + src: *mut GstAudioBaseSrc, + method: GstAudioBaseSrcSlaveMethod, + ); //========================================================================= // GstAudioCdSrc //========================================================================= pub fn gst_audio_cd_src_get_type() -> GType; - pub fn gst_audio_cd_src_add_track(src: *mut GstAudioCdSrc, track: *mut GstAudioCdSrcTrack) -> gboolean; + pub fn gst_audio_cd_src_add_track( + src: *mut GstAudioCdSrc, + track: *mut GstAudioCdSrcTrack, + ) -> gboolean; //========================================================================= // GstAudioClock //========================================================================= pub fn gst_audio_clock_get_type() -> GType; - pub fn gst_audio_clock_new(name: *const c_char, func: GstAudioClockGetTimeFunc, user_data: gpointer, destroy_notify: glib::GDestroyNotify) -> *mut gst::GstClock; - pub fn gst_audio_clock_adjust(clock: *mut GstAudioClock, time: gst::GstClockTime) -> gst::GstClockTime; + pub fn gst_audio_clock_new( + name: *const c_char, + func: GstAudioClockGetTimeFunc, + user_data: gpointer, + destroy_notify: glib::GDestroyNotify, + ) -> *mut gst::GstClock; + pub fn gst_audio_clock_adjust( + clock: *mut GstAudioClock, + time: gst::GstClockTime, + ) -> gst::GstClockTime; pub fn gst_audio_clock_get_time(clock: *mut GstAudioClock) -> gst::GstClockTime; pub fn gst_audio_clock_invalidate(clock: *mut GstAudioClock); pub fn gst_audio_clock_reset(clock: *mut GstAudioClock, time: gst::GstClockTime); @@ -1506,51 +1865,108 @@ extern "C" { // GstAudioDecoder //========================================================================= pub fn gst_audio_decoder_get_type() -> GType; - pub fn gst_audio_decoder_allocate_output_buffer(dec: *mut GstAudioDecoder, size: size_t) -> *mut gst::GstBuffer; - pub fn gst_audio_decoder_finish_frame(dec: *mut GstAudioDecoder, buf: *mut gst::GstBuffer, frames: c_int) -> gst::GstFlowReturn; + pub fn gst_audio_decoder_allocate_output_buffer( + dec: *mut GstAudioDecoder, + size: size_t, + ) -> *mut gst::GstBuffer; + pub fn gst_audio_decoder_finish_frame( + dec: *mut GstAudioDecoder, + buf: *mut gst::GstBuffer, + frames: c_int, + ) -> gst::GstFlowReturn; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_audio_decoder_finish_subframe(dec: *mut GstAudioDecoder, buf: *mut gst::GstBuffer) -> gst::GstFlowReturn; - pub fn gst_audio_decoder_get_allocator(dec: *mut GstAudioDecoder, allocator: *mut *mut gst::GstAllocator, params: *mut gst::GstAllocationParams); + pub fn gst_audio_decoder_finish_subframe( + dec: *mut GstAudioDecoder, + buf: *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; + pub fn gst_audio_decoder_get_allocator( + dec: *mut GstAudioDecoder, + allocator: *mut *mut gst::GstAllocator, + params: *mut gst::GstAllocationParams, + ); pub fn gst_audio_decoder_get_audio_info(dec: *mut GstAudioDecoder) -> *mut GstAudioInfo; pub fn gst_audio_decoder_get_delay(dec: *mut GstAudioDecoder) -> c_int; pub fn gst_audio_decoder_get_drainable(dec: *mut GstAudioDecoder) -> gboolean; pub fn gst_audio_decoder_get_estimate_rate(dec: *mut GstAudioDecoder) -> c_int; - pub fn gst_audio_decoder_get_latency(dec: *mut GstAudioDecoder, min: *mut gst::GstClockTime, max: *mut gst::GstClockTime); + pub fn gst_audio_decoder_get_latency( + dec: *mut GstAudioDecoder, + min: *mut gst::GstClockTime, + max: *mut gst::GstClockTime, + ); pub fn gst_audio_decoder_get_max_errors(dec: *mut GstAudioDecoder) -> c_int; pub fn gst_audio_decoder_get_min_latency(dec: *mut GstAudioDecoder) -> gst::GstClockTime; pub fn gst_audio_decoder_get_needs_format(dec: *mut GstAudioDecoder) -> gboolean; - pub fn gst_audio_decoder_get_parse_state(dec: *mut GstAudioDecoder, sync: *mut gboolean, eos: *mut gboolean); + pub fn gst_audio_decoder_get_parse_state( + dec: *mut GstAudioDecoder, + sync: *mut gboolean, + eos: *mut gboolean, + ); pub fn gst_audio_decoder_get_plc(dec: *mut GstAudioDecoder) -> gboolean; pub fn gst_audio_decoder_get_plc_aware(dec: *mut GstAudioDecoder) -> c_int; pub fn gst_audio_decoder_get_tolerance(dec: *mut GstAudioDecoder) -> gst::GstClockTime; - pub fn gst_audio_decoder_merge_tags(dec: *mut GstAudioDecoder, tags: *const gst::GstTagList, mode: gst::GstTagMergeMode); + pub fn gst_audio_decoder_merge_tags( + dec: *mut GstAudioDecoder, + tags: *const gst::GstTagList, + mode: gst::GstTagMergeMode, + ); pub fn gst_audio_decoder_negotiate(dec: *mut GstAudioDecoder) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_audio_decoder_proxy_getcaps(decoder: *mut GstAudioDecoder, caps: *mut gst::GstCaps, filter: *mut gst::GstCaps) -> *mut gst::GstCaps; + pub fn gst_audio_decoder_proxy_getcaps( + decoder: *mut GstAudioDecoder, + caps: *mut gst::GstCaps, + filter: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_audio_decoder_set_allocation_caps(dec: *mut GstAudioDecoder, allocation_caps: *mut gst::GstCaps); + pub fn gst_audio_decoder_set_allocation_caps( + dec: *mut GstAudioDecoder, + allocation_caps: *mut gst::GstCaps, + ); pub fn gst_audio_decoder_set_drainable(dec: *mut GstAudioDecoder, enabled: gboolean); pub fn gst_audio_decoder_set_estimate_rate(dec: *mut GstAudioDecoder, enabled: gboolean); - pub fn gst_audio_decoder_set_latency(dec: *mut GstAudioDecoder, min: gst::GstClockTime, max: gst::GstClockTime); + pub fn gst_audio_decoder_set_latency( + dec: *mut GstAudioDecoder, + min: gst::GstClockTime, + max: gst::GstClockTime, + ); pub fn gst_audio_decoder_set_max_errors(dec: *mut GstAudioDecoder, num: c_int); pub fn gst_audio_decoder_set_min_latency(dec: *mut GstAudioDecoder, num: gst::GstClockTime); pub fn gst_audio_decoder_set_needs_format(dec: *mut GstAudioDecoder, enabled: gboolean); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_audio_decoder_set_output_caps(dec: *mut GstAudioDecoder, caps: *mut gst::GstCaps) -> gboolean; - pub fn gst_audio_decoder_set_output_format(dec: *mut GstAudioDecoder, info: *const GstAudioInfo) -> gboolean; + pub fn gst_audio_decoder_set_output_caps( + dec: *mut GstAudioDecoder, + caps: *mut gst::GstCaps, + ) -> gboolean; + pub fn gst_audio_decoder_set_output_format( + dec: *mut GstAudioDecoder, + info: *const GstAudioInfo, + ) -> gboolean; pub fn gst_audio_decoder_set_plc(dec: *mut GstAudioDecoder, enabled: gboolean); pub fn gst_audio_decoder_set_plc_aware(dec: *mut GstAudioDecoder, plc: gboolean); pub fn gst_audio_decoder_set_tolerance(dec: *mut GstAudioDecoder, tolerance: gst::GstClockTime); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_audio_decoder_set_use_default_pad_acceptcaps(decoder: *mut GstAudioDecoder, use_: gboolean); + pub fn gst_audio_decoder_set_use_default_pad_acceptcaps( + decoder: *mut GstAudioDecoder, + use_: gboolean, + ); //========================================================================= // GstAudioEncoder //========================================================================= pub fn gst_audio_encoder_get_type() -> GType; - pub fn gst_audio_encoder_allocate_output_buffer(enc: *mut GstAudioEncoder, size: size_t) -> *mut gst::GstBuffer; - pub fn gst_audio_encoder_finish_frame(enc: *mut GstAudioEncoder, buffer: *mut gst::GstBuffer, samples: c_int) -> gst::GstFlowReturn; - pub fn gst_audio_encoder_get_allocator(enc: *mut GstAudioEncoder, allocator: *mut *mut gst::GstAllocator, params: *mut gst::GstAllocationParams); + pub fn gst_audio_encoder_allocate_output_buffer( + enc: *mut GstAudioEncoder, + size: size_t, + ) -> *mut gst::GstBuffer; + pub fn gst_audio_encoder_finish_frame( + enc: *mut GstAudioEncoder, + buffer: *mut gst::GstBuffer, + samples: c_int, + ) -> gst::GstFlowReturn; + pub fn gst_audio_encoder_get_allocator( + enc: *mut GstAudioEncoder, + allocator: *mut *mut gst::GstAllocator, + params: *mut gst::GstAllocationParams, + ); pub fn gst_audio_encoder_get_audio_info(enc: *mut GstAudioEncoder) -> *mut GstAudioInfo; pub fn gst_audio_encoder_get_drainable(enc: *mut GstAudioEncoder) -> gboolean; pub fn gst_audio_encoder_get_frame_max(enc: *mut GstAudioEncoder) -> c_int; @@ -1558,16 +1974,31 @@ extern "C" { pub fn gst_audio_encoder_get_frame_samples_min(enc: *mut GstAudioEncoder) -> c_int; pub fn gst_audio_encoder_get_hard_min(enc: *mut GstAudioEncoder) -> gboolean; pub fn gst_audio_encoder_get_hard_resync(enc: *mut GstAudioEncoder) -> gboolean; - pub fn gst_audio_encoder_get_latency(enc: *mut GstAudioEncoder, min: *mut gst::GstClockTime, max: *mut gst::GstClockTime); + pub fn gst_audio_encoder_get_latency( + enc: *mut GstAudioEncoder, + min: *mut gst::GstClockTime, + max: *mut gst::GstClockTime, + ); pub fn gst_audio_encoder_get_lookahead(enc: *mut GstAudioEncoder) -> c_int; pub fn gst_audio_encoder_get_mark_granule(enc: *mut GstAudioEncoder) -> gboolean; pub fn gst_audio_encoder_get_perfect_timestamp(enc: *mut GstAudioEncoder) -> gboolean; pub fn gst_audio_encoder_get_tolerance(enc: *mut GstAudioEncoder) -> gst::GstClockTime; - pub fn gst_audio_encoder_merge_tags(enc: *mut GstAudioEncoder, tags: *const gst::GstTagList, mode: gst::GstTagMergeMode); + pub fn gst_audio_encoder_merge_tags( + enc: *mut GstAudioEncoder, + tags: *const gst::GstTagList, + mode: gst::GstTagMergeMode, + ); pub fn gst_audio_encoder_negotiate(enc: *mut GstAudioEncoder) -> gboolean; - pub fn gst_audio_encoder_proxy_getcaps(enc: *mut GstAudioEncoder, caps: *mut gst::GstCaps, filter: *mut gst::GstCaps) -> *mut gst::GstCaps; + pub fn gst_audio_encoder_proxy_getcaps( + enc: *mut GstAudioEncoder, + caps: *mut gst::GstCaps, + filter: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_audio_encoder_set_allocation_caps(enc: *mut GstAudioEncoder, allocation_caps: *mut gst::GstCaps); + pub fn gst_audio_encoder_set_allocation_caps( + enc: *mut GstAudioEncoder, + allocation_caps: *mut gst::GstCaps, + ); pub fn gst_audio_encoder_set_drainable(enc: *mut GstAudioEncoder, enabled: gboolean); pub fn gst_audio_encoder_set_frame_max(enc: *mut GstAudioEncoder, num: c_int); pub fn gst_audio_encoder_set_frame_samples_max(enc: *mut GstAudioEncoder, num: c_int); @@ -1575,10 +2006,17 @@ extern "C" { pub fn gst_audio_encoder_set_hard_min(enc: *mut GstAudioEncoder, enabled: gboolean); pub fn gst_audio_encoder_set_hard_resync(enc: *mut GstAudioEncoder, enabled: gboolean); pub fn gst_audio_encoder_set_headers(enc: *mut GstAudioEncoder, headers: *mut glib::GList); - pub fn gst_audio_encoder_set_latency(enc: *mut GstAudioEncoder, min: gst::GstClockTime, max: gst::GstClockTime); + pub fn gst_audio_encoder_set_latency( + enc: *mut GstAudioEncoder, + min: gst::GstClockTime, + max: gst::GstClockTime, + ); pub fn gst_audio_encoder_set_lookahead(enc: *mut GstAudioEncoder, num: c_int); pub fn gst_audio_encoder_set_mark_granule(enc: *mut GstAudioEncoder, enabled: gboolean); - pub fn gst_audio_encoder_set_output_format(enc: *mut GstAudioEncoder, caps: *mut gst::GstCaps) -> gboolean; + pub fn gst_audio_encoder_set_output_format( + enc: *mut GstAudioEncoder, + caps: *mut gst::GstCaps, + ) -> gboolean; pub fn gst_audio_encoder_set_perfect_timestamp(enc: *mut GstAudioEncoder, enabled: gboolean); pub fn gst_audio_encoder_set_tolerance(enc: *mut GstAudioEncoder, tolerance: gst::GstClockTime); @@ -1593,15 +2031,37 @@ extern "C" { pub fn gst_audio_ring_buffer_get_type() -> GType; pub fn gst_audio_ring_buffer_debug_spec_buff(spec: *mut GstAudioRingBufferSpec); pub fn gst_audio_ring_buffer_debug_spec_caps(spec: *mut GstAudioRingBufferSpec); - pub fn gst_audio_ring_buffer_parse_caps(spec: *mut GstAudioRingBufferSpec, caps: *mut gst::GstCaps) -> gboolean; - pub fn gst_audio_ring_buffer_acquire(buf: *mut GstAudioRingBuffer, spec: *mut GstAudioRingBufferSpec) -> gboolean; - pub fn gst_audio_ring_buffer_activate(buf: *mut GstAudioRingBuffer, active: gboolean) -> gboolean; + pub fn gst_audio_ring_buffer_parse_caps( + spec: *mut GstAudioRingBufferSpec, + caps: *mut gst::GstCaps, + ) -> gboolean; + pub fn gst_audio_ring_buffer_acquire( + buf: *mut GstAudioRingBuffer, + spec: *mut GstAudioRingBufferSpec, + ) -> gboolean; + pub fn gst_audio_ring_buffer_activate( + buf: *mut GstAudioRingBuffer, + active: gboolean, + ) -> gboolean; pub fn gst_audio_ring_buffer_advance(buf: *mut GstAudioRingBuffer, advance: c_uint); pub fn gst_audio_ring_buffer_clear(buf: *mut GstAudioRingBuffer, segment: c_int); pub fn gst_audio_ring_buffer_clear_all(buf: *mut GstAudioRingBuffer); pub fn gst_audio_ring_buffer_close_device(buf: *mut GstAudioRingBuffer) -> gboolean; - pub fn gst_audio_ring_buffer_commit(buf: *mut GstAudioRingBuffer, sample: *mut u64, data: *mut u8, in_samples: c_int, out_samples: c_int, accum: *mut c_int) -> c_uint; - pub fn gst_audio_ring_buffer_convert(buf: *mut GstAudioRingBuffer, src_fmt: gst::GstFormat, src_val: i64, dest_fmt: gst::GstFormat, dest_val: *mut i64) -> gboolean; + pub fn gst_audio_ring_buffer_commit( + buf: *mut GstAudioRingBuffer, + sample: *mut u64, + data: *mut u8, + in_samples: c_int, + out_samples: c_int, + accum: *mut c_int, + ) -> c_uint; + pub fn gst_audio_ring_buffer_convert( + buf: *mut GstAudioRingBuffer, + src_fmt: gst::GstFormat, + src_val: i64, + dest_fmt: gst::GstFormat, + dest_val: *mut i64, + ) -> gboolean; pub fn gst_audio_ring_buffer_delay(buf: *mut GstAudioRingBuffer) -> c_uint; pub fn gst_audio_ring_buffer_device_is_open(buf: *mut GstAudioRingBuffer) -> gboolean; pub fn gst_audio_ring_buffer_is_acquired(buf: *mut GstAudioRingBuffer) -> gboolean; @@ -1610,17 +2070,44 @@ extern "C" { pub fn gst_audio_ring_buffer_may_start(buf: *mut GstAudioRingBuffer, allowed: gboolean); pub fn gst_audio_ring_buffer_open_device(buf: *mut GstAudioRingBuffer) -> gboolean; pub fn gst_audio_ring_buffer_pause(buf: *mut GstAudioRingBuffer) -> gboolean; - pub fn gst_audio_ring_buffer_prepare_read(buf: *mut GstAudioRingBuffer, segment: *mut c_int, readptr: *mut *mut u8, len: *mut c_int) -> gboolean; - pub fn gst_audio_ring_buffer_read(buf: *mut GstAudioRingBuffer, sample: u64, data: *mut u8, len: c_uint, timestamp: *mut gst::GstClockTime) -> c_uint; + pub fn gst_audio_ring_buffer_prepare_read( + buf: *mut GstAudioRingBuffer, + segment: *mut c_int, + readptr: *mut *mut u8, + len: *mut c_int, + ) -> gboolean; + pub fn gst_audio_ring_buffer_read( + buf: *mut GstAudioRingBuffer, + sample: u64, + data: *mut u8, + len: c_uint, + timestamp: *mut gst::GstClockTime, + ) -> c_uint; pub fn gst_audio_ring_buffer_release(buf: *mut GstAudioRingBuffer) -> gboolean; pub fn gst_audio_ring_buffer_samples_done(buf: *mut GstAudioRingBuffer) -> u64; - pub fn gst_audio_ring_buffer_set_callback(buf: *mut GstAudioRingBuffer, cb: GstAudioRingBufferCallback, user_data: gpointer); + pub fn gst_audio_ring_buffer_set_callback( + buf: *mut GstAudioRingBuffer, + cb: GstAudioRingBufferCallback, + user_data: gpointer, + ); #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_audio_ring_buffer_set_callback_full(buf: *mut GstAudioRingBuffer, cb: GstAudioRingBufferCallback, user_data: gpointer, notify: glib::GDestroyNotify); - pub fn gst_audio_ring_buffer_set_channel_positions(buf: *mut GstAudioRingBuffer, position: *const GstAudioChannelPosition); + pub fn gst_audio_ring_buffer_set_callback_full( + buf: *mut GstAudioRingBuffer, + cb: GstAudioRingBufferCallback, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_audio_ring_buffer_set_channel_positions( + buf: *mut GstAudioRingBuffer, + position: *const GstAudioChannelPosition, + ); pub fn gst_audio_ring_buffer_set_flushing(buf: *mut GstAudioRingBuffer, flushing: gboolean); pub fn gst_audio_ring_buffer_set_sample(buf: *mut GstAudioRingBuffer, sample: u64); - pub fn gst_audio_ring_buffer_set_timestamp(buf: *mut GstAudioRingBuffer, readseg: c_int, timestamp: gst::GstClockTime); + pub fn gst_audio_ring_buffer_set_timestamp( + buf: *mut GstAudioRingBuffer, + readseg: c_int, + timestamp: gst::GstClockTime, + ); pub fn gst_audio_ring_buffer_start(buf: *mut GstAudioRingBuffer) -> gboolean; pub fn gst_audio_ring_buffer_stop(buf: *mut GstAudioRingBuffer) -> gboolean; @@ -1638,36 +2125,106 @@ extern "C" { // GstStreamVolume //========================================================================= pub fn gst_stream_volume_get_type() -> GType; - pub fn gst_stream_volume_convert_volume(from: GstStreamVolumeFormat, to: GstStreamVolumeFormat, val: c_double) -> c_double; + pub fn gst_stream_volume_convert_volume( + from: GstStreamVolumeFormat, + to: GstStreamVolumeFormat, + val: c_double, + ) -> c_double; pub fn gst_stream_volume_get_mute(volume: *mut GstStreamVolume) -> gboolean; - pub fn gst_stream_volume_get_volume(volume: *mut GstStreamVolume, format: GstStreamVolumeFormat) -> c_double; + pub fn gst_stream_volume_get_volume( + volume: *mut GstStreamVolume, + format: GstStreamVolumeFormat, + ) -> c_double; pub fn gst_stream_volume_set_mute(volume: *mut GstStreamVolume, mute: gboolean); - pub fn gst_stream_volume_set_volume(volume: *mut GstStreamVolume, format: GstStreamVolumeFormat, val: c_double); + pub fn gst_stream_volume_set_volume( + volume: *mut GstStreamVolume, + format: GstStreamVolumeFormat, + val: c_double, + ); //========================================================================= // Other functions //========================================================================= #[cfg(any(feature = "v1_8", feature = "dox"))] pub fn gst_audio_channel_get_fallback_mask(channels: c_int) -> u64; - pub fn gst_audio_channel_positions_from_mask(channels: c_int, channel_mask: u64, position: *mut GstAudioChannelPosition) -> gboolean; - pub fn gst_audio_channel_positions_to_mask(position: *const GstAudioChannelPosition, channels: c_int, force_order: gboolean, channel_mask: *mut u64) -> gboolean; + pub fn gst_audio_channel_positions_from_mask( + channels: c_int, + channel_mask: u64, + position: *mut GstAudioChannelPosition, + ) -> gboolean; + pub fn gst_audio_channel_positions_to_mask( + position: *const GstAudioChannelPosition, + channels: c_int, + force_order: gboolean, + channel_mask: *mut u64, + ) -> gboolean; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_audio_channel_positions_to_string(position: *const GstAudioChannelPosition, channels: c_int) -> *mut c_char; - pub fn gst_audio_channel_positions_to_valid_order(position: *mut GstAudioChannelPosition, channels: c_int) -> gboolean; - pub fn gst_audio_check_valid_channel_positions(position: *const GstAudioChannelPosition, channels: c_int, force_order: gboolean) -> gboolean; + pub fn gst_audio_channel_positions_to_string( + position: *const GstAudioChannelPosition, + channels: c_int, + ) -> *mut c_char; + pub fn gst_audio_channel_positions_to_valid_order( + position: *mut GstAudioChannelPosition, + channels: c_int, + ) -> gboolean; + pub fn gst_audio_check_valid_channel_positions( + position: *const GstAudioChannelPosition, + channels: c_int, + force_order: gboolean, + ) -> gboolean; pub fn gst_audio_clipping_meta_api_get_type() -> GType; pub fn gst_audio_downmix_meta_api_get_type() -> GType; pub fn gst_audio_format_info_get_type() -> GType; - pub fn gst_audio_get_channel_reorder_map(channels: c_int, from: *const GstAudioChannelPosition, to: *const GstAudioChannelPosition, reorder_map: *mut c_int) -> gboolean; + pub fn gst_audio_get_channel_reorder_map( + channels: c_int, + from: *const GstAudioChannelPosition, + to: *const GstAudioChannelPosition, + reorder_map: *mut c_int, + ) -> gboolean; pub fn gst_audio_iec61937_frame_size(spec: *const GstAudioRingBufferSpec) -> c_uint; - pub fn gst_audio_iec61937_payload(src: *const u8, src_n: c_uint, dst: *mut u8, dst_n: c_uint, spec: *const GstAudioRingBufferSpec, endianness: c_int) -> gboolean; + pub fn gst_audio_iec61937_payload( + src: *const u8, + src_n: c_uint, + dst: *mut u8, + dst_n: c_uint, + spec: *const GstAudioRingBufferSpec, + endianness: c_int, + ) -> gboolean; pub fn gst_audio_meta_api_get_type() -> GType; - pub fn gst_audio_reorder_channels(data: gpointer, size: size_t, format: GstAudioFormat, channels: c_int, from: *const GstAudioChannelPosition, to: *const GstAudioChannelPosition) -> gboolean; + pub fn gst_audio_reorder_channels( + data: gpointer, + size: size_t, + format: GstAudioFormat, + channels: c_int, + from: *const GstAudioChannelPosition, + to: *const GstAudioChannelPosition, + ) -> gboolean; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_buffer_add_audio_clipping_meta(buffer: *mut gst::GstBuffer, format: gst::GstFormat, start: u64, end: u64) -> *mut GstAudioClippingMeta; - pub fn gst_buffer_add_audio_downmix_meta(buffer: *mut gst::GstBuffer, from_position: *const GstAudioChannelPosition, from_channels: c_int, to_position: *const GstAudioChannelPosition, to_channels: c_int, matrix: *mut *const c_float) -> *mut GstAudioDownmixMeta; + pub fn gst_buffer_add_audio_clipping_meta( + buffer: *mut gst::GstBuffer, + format: gst::GstFormat, + start: u64, + end: u64, + ) -> *mut GstAudioClippingMeta; + pub fn gst_buffer_add_audio_downmix_meta( + buffer: *mut gst::GstBuffer, + from_position: *const GstAudioChannelPosition, + from_channels: c_int, + to_position: *const GstAudioChannelPosition, + to_channels: c_int, + matrix: *mut *const c_float, + ) -> *mut GstAudioDownmixMeta; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_buffer_add_audio_meta(buffer: *mut gst::GstBuffer, info: *const GstAudioInfo, samples: size_t, offsets: *mut size_t) -> *mut GstAudioMeta; - pub fn gst_buffer_get_audio_downmix_meta_for_channels(buffer: *mut gst::GstBuffer, to_position: *const GstAudioChannelPosition, to_channels: c_int) -> *mut GstAudioDownmixMeta; + pub fn gst_buffer_add_audio_meta( + buffer: *mut gst::GstBuffer, + info: *const GstAudioInfo, + samples: size_t, + offsets: *mut size_t, + ) -> *mut GstAudioMeta; + pub fn gst_buffer_get_audio_downmix_meta_for_channels( + buffer: *mut gst::GstBuffer, + to_position: *const GstAudioChannelPosition, + to_channels: c_int, + ) -> *mut GstAudioDownmixMeta; } diff --git a/gstreamer-audio-sys/tests/abi.rs b/gstreamer-audio-sys/tests/abi.rs index 2863d7b01..3f074d866 100644 --- a/gstreamer-audio-sys/tests/abi.rs +++ b/gstreamer-audio-sys/tests/abi.rs @@ -5,13 +5,13 @@ extern crate gstreamer_audio_sys; extern crate shell_words; extern crate tempdir; +use gstreamer_audio_sys::*; use std::env; use std::error::Error; -use std::path::Path; use std::mem::{align_of, size_of}; +use std::path::Path; use std::process::Command; use std::str; -use gstreamer_audio_sys::*; static PACKAGES: &[&str] = &["gstreamer-audio-1.0"]; @@ -47,8 +47,7 @@ impl Compiler { cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { - return Err(format!("compilation command {:?} failed, {}", - &cmd, status).into()); + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } @@ -77,14 +76,12 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { cmd.args(packages); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {:?} returned {}", - &cmd, out.status).into()); + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } - #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, @@ -115,9 +112,8 @@ impl Results { fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", - self.passed, - self.failed, - self.failed_to_compile) + self.passed, self.failed, self.failed_to_compile + ) } fn expect_total_success(&self) { if self.failed == 0 { @@ -133,24 +129,28 @@ fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!("1", - get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), - "failed to obtain correct constant value for 1"); + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); - eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_value, c_value); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); } } }; @@ -166,24 +166,31 @@ fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!(Layout {size: 1, alignment: 1}, - get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), - "failed to obtain correct layout for char type"); + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); - eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_layout, &c_layout); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); } } }; @@ -203,15 +210,14 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result Result> { @@ -223,78 +229,421 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result(), alignment: align_of::()}), - ("GstAudioAggregatorClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioAggregatorConvertPad", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioAggregatorConvertPadClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioAggregatorPad", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioAggregatorPadClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioBaseSink", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioBaseSinkClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioBaseSinkDiscontReason", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioBaseSinkSlaveMethod", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioBaseSrc", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioBaseSrcClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioBaseSrcSlaveMethod", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioBuffer", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioCdSrc", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioCdSrcClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioCdSrcMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioCdSrcTrack", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioChannelMixerFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioChannelPosition", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioClippingMeta", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioClock", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioClockClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioConverterFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioDecoder", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioDecoderClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioDitherMethod", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioDownmixMeta", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioEncoder", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioEncoderClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioFilter", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioFilterClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioFormat", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioFormatFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioFormatInfo", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioInfo", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioLayout", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioMeta", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioNoiseShapingMethod", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioPackFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioQuantizeFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioResamplerFilterInterpolation", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioResamplerFilterMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioResamplerFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioResamplerMethod", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioRingBuffer", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioRingBufferClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioRingBufferFormatType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioRingBufferSpec", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioRingBufferState", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioSink", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioSinkClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioSrc", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioSrcClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstStreamVolumeFormat", Layout {size: size_of::(), alignment: align_of::()}), - ("GstStreamVolumeInterface", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstAudioAggregator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioAggregatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioAggregatorConvertPad", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioAggregatorConvertPadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioAggregatorPad", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioAggregatorPadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioBaseSink", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioBaseSinkClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioBaseSinkDiscontReason", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioBaseSinkSlaveMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioBaseSrc", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioBaseSrcClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioBaseSrcSlaveMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioBuffer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioCdSrc", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioCdSrcClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioCdSrcMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioCdSrcTrack", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioChannelMixerFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioChannelPosition", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioClippingMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioClock", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioClockClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioConverterFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioDecoder", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioDecoderClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioDitherMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioDownmixMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioEncoder", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioEncoderClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioFilter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioFilterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioFormat", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioFormatFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioFormatInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioLayout", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioNoiseShapingMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioPackFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioQuantizeFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioResamplerFilterInterpolation", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioResamplerFilterMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioResamplerFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioResamplerMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioRingBuffer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioRingBufferClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioRingBufferFormatType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioRingBufferSpec", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioRingBufferState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioSink", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioSinkClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioSrc", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioSrcClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamVolumeFormat", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamVolumeInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ @@ -492,5 +841,3 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_STREAM_VOLUME_FORMAT_DB", "2"), ("(gint) GST_STREAM_VOLUME_FORMAT_LINEAR", "0"), ]; - - diff --git a/gstreamer-base-sys/build.rs b/gstreamer-base-sys/build.rs index 224b4719c..39ab1e989 100644 --- a/gstreamer-base-sys/build.rs +++ b/gstreamer-base-sys/build.rs @@ -6,8 +6,8 @@ extern crate pkg_config; use pkg_config::{Config, Error}; use std::env; -use std::io::prelude::*; use std::io; +use std::io::prelude::*; use std::process; fn main() { @@ -56,7 +56,7 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()) + return Ok(()); } let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); @@ -78,8 +78,10 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } for path in library.link_paths.iter() { - println!("cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist")); + println!( + "cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist") + ); } } Ok(()) @@ -93,4 +95,3 @@ fn find() -> Result<(), Error> { Err(err) => Err(err), } } - diff --git a/gstreamer-base-sys/src/lib.rs b/gstreamer-base-sys/src/lib.rs index 8b931a86b..9aa58066e 100644 --- a/gstreamer-base-sys/src/lib.rs +++ b/gstreamer-base-sys/src/lib.rs @@ -3,17 +3,22 @@ // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] -extern crate libc; extern crate glib_sys as glib; extern crate gobject_sys as gobject; extern crate gstreamer_sys as gst; +extern crate libc; #[allow(unused_imports)] -use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, - c_short, c_ushort, c_long, c_ulong, - c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; +use libc::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, + intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -56,24 +61,72 @@ pub union GstCollectData_ABI { impl ::std::fmt::Debug for GstCollectData_ABI { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstCollectData_ABI @ {:?}", self as *const _)) - .field("abi", unsafe { &self.abi }) - .finish() + .field("abi", unsafe { &self.abi }) + .finish() } } // Callbacks pub type GstCollectDataDestroyNotify = Option; -pub type GstCollectPadsBufferFunction = Option gst::GstFlowReturn>; -pub type GstCollectPadsClipFunction = Option gst::GstFlowReturn>; -pub type GstCollectPadsCompareFunction = Option c_int>; -pub type GstCollectPadsEventFunction = Option gboolean>; +pub type GstCollectPadsBufferFunction = Option< + unsafe extern "C" fn( + *mut GstCollectPads, + *mut GstCollectData, + *mut gst::GstBuffer, + gpointer, + ) -> gst::GstFlowReturn, +>; +pub type GstCollectPadsClipFunction = Option< + unsafe extern "C" fn( + *mut GstCollectPads, + *mut GstCollectData, + *mut gst::GstBuffer, + *mut *mut gst::GstBuffer, + gpointer, + ) -> gst::GstFlowReturn, +>; +pub type GstCollectPadsCompareFunction = Option< + unsafe extern "C" fn( + *mut GstCollectPads, + *mut GstCollectData, + gst::GstClockTime, + *mut GstCollectData, + gst::GstClockTime, + gpointer, + ) -> c_int, +>; +pub type GstCollectPadsEventFunction = Option< + unsafe extern "C" fn( + *mut GstCollectPads, + *mut GstCollectData, + *mut gst::GstEvent, + gpointer, + ) -> gboolean, +>; pub type GstCollectPadsFlushFunction = Option; -pub type GstCollectPadsFunction = Option gst::GstFlowReturn>; -pub type GstCollectPadsQueryFunction = Option gboolean>; -pub type GstDataQueueCheckFullFunction = Option gboolean>; +pub type GstCollectPadsFunction = + Option gst::GstFlowReturn>; +pub type GstCollectPadsQueryFunction = Option< + unsafe extern "C" fn( + *mut GstCollectPads, + *mut GstCollectData, + *mut gst::GstQuery, + gpointer, + ) -> gboolean, +>; +pub type GstDataQueueCheckFullFunction = + Option gboolean>; pub type GstDataQueueEmptyCallback = Option; pub type GstDataQueueFullCallback = Option; -pub type GstTypeFindHelperGetRangeFunction = Option gst::GstFlowReturn>; +pub type GstTypeFindHelperGetRangeFunction = Option< + unsafe extern "C" fn( + *mut gst::GstObject, + *mut gst::GstObject, + u64, + c_uint, + *mut *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, +>; // Records #[repr(C)] @@ -86,49 +139,92 @@ pub type GstAdapterClass = *mut _GstAdapterClass; pub struct GstAggregatorClass { pub parent_class: gst::GstElementClass, pub flush: Option gst::GstFlowReturn>, - pub clip: Option *mut gst::GstBuffer>, - pub finish_buffer: Option gst::GstFlowReturn>, - pub sink_event: Option gboolean>, - pub sink_query: Option gboolean>, + pub clip: Option< + unsafe extern "C" fn( + *mut GstAggregator, + *mut GstAggregatorPad, + *mut gst::GstBuffer, + ) -> *mut gst::GstBuffer, + >, + pub finish_buffer: + Option gst::GstFlowReturn>, + pub sink_event: Option< + unsafe extern "C" fn( + *mut GstAggregator, + *mut GstAggregatorPad, + *mut gst::GstEvent, + ) -> gboolean, + >, + pub sink_query: Option< + unsafe extern "C" fn( + *mut GstAggregator, + *mut GstAggregatorPad, + *mut gst::GstQuery, + ) -> gboolean, + >, pub src_event: Option gboolean>, pub src_query: Option gboolean>, - pub src_activate: Option gboolean>, + pub src_activate: + Option gboolean>, pub aggregate: Option gst::GstFlowReturn>, pub stop: Option gboolean>, pub start: Option gboolean>, pub get_next_time: Option gst::GstClockTime>, - pub create_new_pad: Option *mut GstAggregatorPad>, - pub update_src_caps: Option gst::GstFlowReturn>, - pub fixate_src_caps: Option *mut gst::GstCaps>, - pub negotiated_src_caps: Option gboolean>, - pub decide_allocation: Option gboolean>, - pub propose_allocation: Option gboolean>, + pub create_new_pad: Option< + unsafe extern "C" fn( + *mut GstAggregator, + *mut gst::GstPadTemplate, + *const c_char, + *const gst::GstCaps, + ) -> *mut GstAggregatorPad, + >, + pub update_src_caps: Option< + unsafe extern "C" fn( + *mut GstAggregator, + *mut gst::GstCaps, + *mut *mut gst::GstCaps, + ) -> gst::GstFlowReturn, + >, + pub fixate_src_caps: + Option *mut gst::GstCaps>, + pub negotiated_src_caps: + Option gboolean>, + pub decide_allocation: + Option gboolean>, + pub propose_allocation: Option< + unsafe extern "C" fn( + *mut GstAggregator, + *mut GstAggregatorPad, + *mut gst::GstQuery, + *mut gst::GstQuery, + ) -> gboolean, + >, pub _gst_reserved: [gpointer; 20], } impl ::std::fmt::Debug for GstAggregatorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAggregatorClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("flush", &self.flush) - .field("clip", &self.clip) - .field("finish_buffer", &self.finish_buffer) - .field("sink_event", &self.sink_event) - .field("sink_query", &self.sink_query) - .field("src_event", &self.src_event) - .field("src_query", &self.src_query) - .field("src_activate", &self.src_activate) - .field("aggregate", &self.aggregate) - .field("stop", &self.stop) - .field("start", &self.start) - .field("get_next_time", &self.get_next_time) - .field("create_new_pad", &self.create_new_pad) - .field("update_src_caps", &self.update_src_caps) - .field("fixate_src_caps", &self.fixate_src_caps) - .field("negotiated_src_caps", &self.negotiated_src_caps) - .field("decide_allocation", &self.decide_allocation) - .field("propose_allocation", &self.propose_allocation) - .finish() + .field("parent_class", &self.parent_class) + .field("flush", &self.flush) + .field("clip", &self.clip) + .field("finish_buffer", &self.finish_buffer) + .field("sink_event", &self.sink_event) + .field("sink_query", &self.sink_query) + .field("src_event", &self.src_event) + .field("src_query", &self.src_query) + .field("src_activate", &self.src_activate) + .field("aggregate", &self.aggregate) + .field("stop", &self.stop) + .field("start", &self.start) + .field("get_next_time", &self.get_next_time) + .field("create_new_pad", &self.create_new_pad) + .field("update_src_caps", &self.update_src_caps) + .field("fixate_src_caps", &self.fixate_src_caps) + .field("negotiated_src_caps", &self.negotiated_src_caps) + .field("decide_allocation", &self.decide_allocation) + .field("propose_allocation", &self.propose_allocation) + .finish() } } @@ -136,18 +232,26 @@ impl ::std::fmt::Debug for GstAggregatorClass { #[derive(Copy, Clone)] pub struct GstAggregatorPadClass { pub parent_class: gst::GstPadClass, - pub flush: Option gst::GstFlowReturn>, - pub skip_buffer: Option gboolean>, + pub flush: Option< + unsafe extern "C" fn(*mut GstAggregatorPad, *mut GstAggregator) -> gst::GstFlowReturn, + >, + pub skip_buffer: Option< + unsafe extern "C" fn( + *mut GstAggregatorPad, + *mut GstAggregator, + *mut gst::GstBuffer, + ) -> gboolean, + >, pub _gst_reserved: [gpointer; 20], } impl ::std::fmt::Debug for GstAggregatorPadClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAggregatorPadClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("flush", &self.flush) - .field("skip_buffer", &self.skip_buffer) - .finish() + .field("parent_class", &self.parent_class) + .field("flush", &self.flush) + .field("skip_buffer", &self.skip_buffer) + .finish() } } @@ -167,14 +271,33 @@ pub struct GstBaseParseClass { pub parent_class: gst::GstElementClass, pub start: Option gboolean>, pub stop: Option gboolean>, - pub set_sink_caps: Option gboolean>, - pub handle_frame: Option gst::GstFlowReturn>, - pub pre_push_frame: Option gst::GstFlowReturn>, - pub convert: Option gboolean>, + pub set_sink_caps: + Option gboolean>, + pub handle_frame: Option< + unsafe extern "C" fn( + *mut GstBaseParse, + *mut GstBaseParseFrame, + *mut c_int, + ) -> gst::GstFlowReturn, + >, + pub pre_push_frame: Option< + unsafe extern "C" fn(*mut GstBaseParse, *mut GstBaseParseFrame) -> gst::GstFlowReturn, + >, + pub convert: Option< + unsafe extern "C" fn( + *mut GstBaseParse, + gst::GstFormat, + i64, + gst::GstFormat, + *mut i64, + ) -> gboolean, + >, pub sink_event: Option gboolean>, pub src_event: Option gboolean>, - pub get_sink_caps: Option *mut gst::GstCaps>, - pub detect: Option gst::GstFlowReturn>, + pub get_sink_caps: + Option *mut gst::GstCaps>, + pub detect: + Option gst::GstFlowReturn>, pub sink_query: Option gboolean>, pub src_query: Option gboolean>, pub _gst_reserved: [gpointer; 18], @@ -183,20 +306,20 @@ pub struct GstBaseParseClass { impl ::std::fmt::Debug for GstBaseParseClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBaseParseClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("start", &self.start) - .field("stop", &self.stop) - .field("set_sink_caps", &self.set_sink_caps) - .field("handle_frame", &self.handle_frame) - .field("pre_push_frame", &self.pre_push_frame) - .field("convert", &self.convert) - .field("sink_event", &self.sink_event) - .field("src_event", &self.src_event) - .field("get_sink_caps", &self.get_sink_caps) - .field("detect", &self.detect) - .field("sink_query", &self.sink_query) - .field("src_query", &self.src_query) - .finish() + .field("parent_class", &self.parent_class) + .field("start", &self.start) + .field("stop", &self.stop) + .field("set_sink_caps", &self.set_sink_caps) + .field("handle_frame", &self.handle_frame) + .field("pre_push_frame", &self.pre_push_frame) + .field("convert", &self.convert) + .field("sink_event", &self.sink_event) + .field("src_event", &self.src_event) + .field("get_sink_caps", &self.get_sink_caps) + .field("detect", &self.detect) + .field("sink_query", &self.sink_query) + .field("src_query", &self.src_query) + .finish() } } @@ -217,12 +340,12 @@ pub struct GstBaseParseFrame { impl ::std::fmt::Debug for GstBaseParseFrame { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBaseParseFrame @ {:?}", self as *const _)) - .field("buffer", &self.buffer) - .field("out_buffer", &self.out_buffer) - .field("flags", &self.flags) - .field("offset", &self.offset) - .field("overhead", &self.overhead) - .finish() + .field("buffer", &self.buffer) + .field("out_buffer", &self.out_buffer) + .field("flags", &self.flags) + .field("offset", &self.offset) + .field("overhead", &self.overhead) + .finish() } } @@ -235,50 +358,68 @@ pub type GstBaseParsePrivate = *mut _GstBaseParsePrivate; #[derive(Copy, Clone)] pub struct GstBaseSinkClass { pub parent_class: gst::GstElementClass, - pub get_caps: Option *mut gst::GstCaps>, + pub get_caps: + Option *mut gst::GstCaps>, pub set_caps: Option gboolean>, - pub fixate: Option *mut gst::GstCaps>, + pub fixate: + Option *mut gst::GstCaps>, pub activate_pull: Option gboolean>, - pub get_times: Option, - pub propose_allocation: Option gboolean>, + pub get_times: Option< + unsafe extern "C" fn( + *mut GstBaseSink, + *mut gst::GstBuffer, + *mut gst::GstClockTime, + *mut gst::GstClockTime, + ), + >, + pub propose_allocation: + Option gboolean>, pub start: Option gboolean>, pub stop: Option gboolean>, pub unlock: Option gboolean>, pub unlock_stop: Option gboolean>, pub query: Option gboolean>, pub event: Option gboolean>, - pub wait_event: Option gst::GstFlowReturn>, - pub prepare: Option gst::GstFlowReturn>, - pub prepare_list: Option gst::GstFlowReturn>, - pub preroll: Option gst::GstFlowReturn>, - pub render: Option gst::GstFlowReturn>, - pub render_list: Option gst::GstFlowReturn>, + pub wait_event: + Option gst::GstFlowReturn>, + pub prepare: + Option gst::GstFlowReturn>, + pub prepare_list: Option< + unsafe extern "C" fn(*mut GstBaseSink, *mut gst::GstBufferList) -> gst::GstFlowReturn, + >, + pub preroll: + Option gst::GstFlowReturn>, + pub render: + Option gst::GstFlowReturn>, + pub render_list: Option< + unsafe extern "C" fn(*mut GstBaseSink, *mut gst::GstBufferList) -> gst::GstFlowReturn, + >, pub _gst_reserved: [gpointer; 20], } impl ::std::fmt::Debug for GstBaseSinkClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBaseSinkClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("get_caps", &self.get_caps) - .field("set_caps", &self.set_caps) - .field("fixate", &self.fixate) - .field("activate_pull", &self.activate_pull) - .field("get_times", &self.get_times) - .field("propose_allocation", &self.propose_allocation) - .field("start", &self.start) - .field("stop", &self.stop) - .field("unlock", &self.unlock) - .field("unlock_stop", &self.unlock_stop) - .field("query", &self.query) - .field("event", &self.event) - .field("wait_event", &self.wait_event) - .field("prepare", &self.prepare) - .field("prepare_list", &self.prepare_list) - .field("preroll", &self.preroll) - .field("render", &self.render) - .field("render_list", &self.render_list) - .finish() + .field("parent_class", &self.parent_class) + .field("get_caps", &self.get_caps) + .field("set_caps", &self.set_caps) + .field("fixate", &self.fixate) + .field("activate_pull", &self.activate_pull) + .field("get_times", &self.get_times) + .field("propose_allocation", &self.propose_allocation) + .field("start", &self.start) + .field("stop", &self.stop) + .field("unlock", &self.unlock) + .field("unlock_stop", &self.unlock_stop) + .field("query", &self.query) + .field("event", &self.event) + .field("wait_event", &self.wait_event) + .field("prepare", &self.prepare) + .field("prepare_list", &self.prepare_list) + .field("preroll", &self.preroll) + .field("render", &self.render) + .field("render_list", &self.render_list) + .finish() } } @@ -291,52 +432,85 @@ pub type GstBaseSinkPrivate = *mut _GstBaseSinkPrivate; #[derive(Copy, Clone)] pub struct GstBaseSrcClass { pub parent_class: gst::GstElementClass, - pub get_caps: Option *mut gst::GstCaps>, + pub get_caps: + Option *mut gst::GstCaps>, pub negotiate: Option gboolean>, - pub fixate: Option *mut gst::GstCaps>, + pub fixate: + Option *mut gst::GstCaps>, pub set_caps: Option gboolean>, - pub decide_allocation: Option gboolean>, + pub decide_allocation: + Option gboolean>, pub start: Option gboolean>, pub stop: Option gboolean>, - pub get_times: Option, + pub get_times: Option< + unsafe extern "C" fn( + *mut GstBaseSrc, + *mut gst::GstBuffer, + *mut gst::GstClockTime, + *mut gst::GstClockTime, + ), + >, pub get_size: Option gboolean>, pub is_seekable: Option gboolean>, - pub prepare_seek_segment: Option gboolean>, + pub prepare_seek_segment: Option< + unsafe extern "C" fn(*mut GstBaseSrc, *mut gst::GstEvent, *mut gst::GstSegment) -> gboolean, + >, pub do_seek: Option gboolean>, pub unlock: Option gboolean>, pub unlock_stop: Option gboolean>, pub query: Option gboolean>, pub event: Option gboolean>, - pub create: Option gst::GstFlowReturn>, - pub alloc: Option gst::GstFlowReturn>, - pub fill: Option gst::GstFlowReturn>, + pub create: Option< + unsafe extern "C" fn( + *mut GstBaseSrc, + u64, + c_uint, + *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, + >, + pub alloc: Option< + unsafe extern "C" fn( + *mut GstBaseSrc, + u64, + c_uint, + *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, + >, + pub fill: Option< + unsafe extern "C" fn( + *mut GstBaseSrc, + u64, + c_uint, + *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, + >, pub _gst_reserved: [gpointer; 20], } impl ::std::fmt::Debug for GstBaseSrcClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBaseSrcClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("get_caps", &self.get_caps) - .field("negotiate", &self.negotiate) - .field("fixate", &self.fixate) - .field("set_caps", &self.set_caps) - .field("decide_allocation", &self.decide_allocation) - .field("start", &self.start) - .field("stop", &self.stop) - .field("get_times", &self.get_times) - .field("get_size", &self.get_size) - .field("is_seekable", &self.is_seekable) - .field("prepare_seek_segment", &self.prepare_seek_segment) - .field("do_seek", &self.do_seek) - .field("unlock", &self.unlock) - .field("unlock_stop", &self.unlock_stop) - .field("query", &self.query) - .field("event", &self.event) - .field("create", &self.create) - .field("alloc", &self.alloc) - .field("fill", &self.fill) - .finish() + .field("parent_class", &self.parent_class) + .field("get_caps", &self.get_caps) + .field("negotiate", &self.negotiate) + .field("fixate", &self.fixate) + .field("set_caps", &self.set_caps) + .field("decide_allocation", &self.decide_allocation) + .field("start", &self.start) + .field("stop", &self.stop) + .field("get_times", &self.get_times) + .field("get_size", &self.get_size) + .field("is_seekable", &self.is_seekable) + .field("prepare_seek_segment", &self.prepare_seek_segment) + .field("do_seek", &self.do_seek) + .field("unlock", &self.unlock) + .field("unlock_stop", &self.unlock_stop) + .field("query", &self.query) + .field("event", &self.event) + .field("create", &self.create) + .field("alloc", &self.alloc) + .field("fill", &self.fill) + .finish() } } @@ -351,60 +525,157 @@ pub struct GstBaseTransformClass { pub parent_class: gst::GstElementClass, pub passthrough_on_same_caps: gboolean, pub transform_ip_on_passthrough: gboolean, - pub transform_caps: Option *mut gst::GstCaps>, - pub fixate_caps: Option *mut gst::GstCaps>, - pub accept_caps: Option gboolean>, - pub set_caps: Option gboolean>, - pub query: Option gboolean>, - pub decide_allocation: Option gboolean>, - pub filter_meta: Option gboolean>, - pub propose_allocation: Option gboolean>, - pub transform_size: Option gboolean>, - pub get_unit_size: Option gboolean>, + pub transform_caps: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + gst::GstPadDirection, + *mut gst::GstCaps, + *mut gst::GstCaps, + ) -> *mut gst::GstCaps, + >, + pub fixate_caps: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + gst::GstPadDirection, + *mut gst::GstCaps, + *mut gst::GstCaps, + ) -> *mut gst::GstCaps, + >, + pub accept_caps: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + gst::GstPadDirection, + *mut gst::GstCaps, + ) -> gboolean, + >, + pub set_caps: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + *mut gst::GstCaps, + *mut gst::GstCaps, + ) -> gboolean, + >, + pub query: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + gst::GstPadDirection, + *mut gst::GstQuery, + ) -> gboolean, + >, + pub decide_allocation: + Option gboolean>, + pub filter_meta: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + *mut gst::GstQuery, + GType, + *const gst::GstStructure, + ) -> gboolean, + >, + pub propose_allocation: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + *mut gst::GstQuery, + *mut gst::GstQuery, + ) -> gboolean, + >, + pub transform_size: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + gst::GstPadDirection, + *mut gst::GstCaps, + size_t, + *mut gst::GstCaps, + *mut size_t, + ) -> gboolean, + >, + pub get_unit_size: Option< + unsafe extern "C" fn(*mut GstBaseTransform, *mut gst::GstCaps, *mut size_t) -> gboolean, + >, pub start: Option gboolean>, pub stop: Option gboolean>, - pub sink_event: Option gboolean>, - pub src_event: Option gboolean>, - pub prepare_output_buffer: Option gst::GstFlowReturn>, - pub copy_metadata: Option gboolean>, - pub transform_meta: Option gboolean>, + pub sink_event: + Option gboolean>, + pub src_event: + Option gboolean>, + pub prepare_output_buffer: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + *mut gst::GstBuffer, + *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, + >, + pub copy_metadata: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + *mut gst::GstBuffer, + *mut gst::GstBuffer, + ) -> gboolean, + >, + pub transform_meta: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + *mut gst::GstBuffer, + *mut gst::GstMeta, + *mut gst::GstBuffer, + ) -> gboolean, + >, pub before_transform: Option, - pub transform: Option gst::GstFlowReturn>, - pub transform_ip: Option gst::GstFlowReturn>, - pub submit_input_buffer: Option gst::GstFlowReturn>, - pub generate_output: Option gst::GstFlowReturn>, + pub transform: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + *mut gst::GstBuffer, + *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, + >, + pub transform_ip: Option< + unsafe extern "C" fn(*mut GstBaseTransform, *mut *mut gst::GstBuffer) -> gst::GstFlowReturn, + >, + pub submit_input_buffer: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + gboolean, + *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, + >, + pub generate_output: Option< + unsafe extern "C" fn(*mut GstBaseTransform, *mut *mut gst::GstBuffer) -> gst::GstFlowReturn, + >, pub _gst_reserved: [gpointer; 18], } impl ::std::fmt::Debug for GstBaseTransformClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBaseTransformClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("passthrough_on_same_caps", &self.passthrough_on_same_caps) - .field("transform_ip_on_passthrough", &self.transform_ip_on_passthrough) - .field("transform_caps", &self.transform_caps) - .field("fixate_caps", &self.fixate_caps) - .field("accept_caps", &self.accept_caps) - .field("set_caps", &self.set_caps) - .field("query", &self.query) - .field("decide_allocation", &self.decide_allocation) - .field("filter_meta", &self.filter_meta) - .field("propose_allocation", &self.propose_allocation) - .field("transform_size", &self.transform_size) - .field("get_unit_size", &self.get_unit_size) - .field("start", &self.start) - .field("stop", &self.stop) - .field("sink_event", &self.sink_event) - .field("src_event", &self.src_event) - .field("prepare_output_buffer", &self.prepare_output_buffer) - .field("copy_metadata", &self.copy_metadata) - .field("transform_meta", &self.transform_meta) - .field("before_transform", &self.before_transform) - .field("transform", &self.transform) - .field("transform_ip", &self.transform_ip) - .field("submit_input_buffer", &self.submit_input_buffer) - .field("generate_output", &self.generate_output) - .finish() + .field("parent_class", &self.parent_class) + .field("passthrough_on_same_caps", &self.passthrough_on_same_caps) + .field( + "transform_ip_on_passthrough", + &self.transform_ip_on_passthrough, + ) + .field("transform_caps", &self.transform_caps) + .field("fixate_caps", &self.fixate_caps) + .field("accept_caps", &self.accept_caps) + .field("set_caps", &self.set_caps) + .field("query", &self.query) + .field("decide_allocation", &self.decide_allocation) + .field("filter_meta", &self.filter_meta) + .field("propose_allocation", &self.propose_allocation) + .field("transform_size", &self.transform_size) + .field("get_unit_size", &self.get_unit_size) + .field("start", &self.start) + .field("stop", &self.stop) + .field("sink_event", &self.sink_event) + .field("src_event", &self.src_event) + .field("prepare_output_buffer", &self.prepare_output_buffer) + .field("copy_metadata", &self.copy_metadata) + .field("transform_meta", &self.transform_meta) + .field("before_transform", &self.before_transform) + .field("transform", &self.transform) + .field("transform_ip", &self.transform_ip) + .field("submit_input_buffer", &self.submit_input_buffer) + .field("generate_output", &self.generate_output) + .finish() } } @@ -426,11 +697,11 @@ pub struct GstBitReader { impl ::std::fmt::Debug for GstBitReader { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBitReader @ {:?}", self as *const _)) - .field("data", &self.data) - .field("size", &self.size) - .field("byte", &self.byte) - .field("bit", &self.bit) - .finish() + .field("data", &self.data) + .field("size", &self.size) + .field("byte", &self.byte) + .field("bit", &self.bit) + .finish() } } @@ -448,9 +719,9 @@ pub struct GstBitWriter { impl ::std::fmt::Debug for GstBitWriter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBitWriter @ {:?}", self as *const _)) - .field("data", &self.data) - .field("bit_size", &self.bit_size) - .finish() + .field("data", &self.data) + .field("bit_size", &self.bit_size) + .finish() } } @@ -466,10 +737,10 @@ pub struct GstByteReader { impl ::std::fmt::Debug for GstByteReader { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstByteReader @ {:?}", self as *const _)) - .field("data", &self.data) - .field("size", &self.size) - .field("byte", &self.byte) - .finish() + .field("data", &self.data) + .field("size", &self.size) + .field("byte", &self.byte) + .finish() } } @@ -486,11 +757,11 @@ pub struct GstByteWriter { impl ::std::fmt::Debug for GstByteWriter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstByteWriter @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("alloc_size", &self.alloc_size) - .field("fixed", &self.fixed) - .field("owned", &self.owned) - .finish() + .field("parent", &self.parent) + .field("alloc_size", &self.alloc_size) + .field("fixed", &self.fixed) + .field("owned", &self.owned) + .finish() } } @@ -510,13 +781,13 @@ pub struct GstCollectData { impl ::std::fmt::Debug for GstCollectData { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstCollectData @ {:?}", self as *const _)) - .field("collect", &self.collect) - .field("pad", &self.pad) - .field("buffer", &self.buffer) - .field("pos", &self.pos) - .field("segment", &self.segment) - .field("ABI", &self.ABI) - .finish() + .field("collect", &self.collect) + .field("pad", &self.pad) + .field("buffer", &self.buffer) + .field("pos", &self.pos) + .field("segment", &self.segment) + .field("ABI", &self.ABI) + .finish() } } @@ -534,8 +805,8 @@ pub struct GstCollectData_ABI_abi { impl ::std::fmt::Debug for GstCollectData_ABI_abi { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstCollectData_ABI_abi @ {:?}", self as *const _)) - .field("dts", &self.dts) - .finish() + .field("dts", &self.dts) + .finish() } } @@ -549,8 +820,8 @@ pub struct GstCollectPadsClass { impl ::std::fmt::Debug for GstCollectPadsClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstCollectPadsClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -571,11 +842,11 @@ pub struct GstDataQueueClass { impl ::std::fmt::Debug for GstDataQueueClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDataQueueClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("empty", &self.empty) - .field("full", &self.full) - .field("_gst_reserved", &self._gst_reserved) - .finish() + .field("parent_class", &self.parent_class) + .field("empty", &self.empty) + .field("full", &self.full) + .field("_gst_reserved", &self._gst_reserved) + .finish() } } @@ -593,12 +864,12 @@ pub struct GstDataQueueItem { impl ::std::fmt::Debug for GstDataQueueItem { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDataQueueItem @ {:?}", self as *const _)) - .field("object", &self.object) - .field("size", &self.size) - .field("duration", &self.duration) - .field("visible", &self.visible) - .field("destroy", &self.destroy) - .finish() + .field("object", &self.object) + .field("size", &self.size) + .field("duration", &self.duration) + .field("visible", &self.visible) + .field("destroy", &self.destroy) + .finish() } } @@ -618,10 +889,10 @@ pub struct GstDataQueueSize { impl ::std::fmt::Debug for GstDataQueueSize { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDataQueueSize @ {:?}", self as *const _)) - .field("visible", &self.visible) - .field("bytes", &self.bytes) - .field("time", &self.time) - .finish() + .field("visible", &self.visible) + .field("bytes", &self.bytes) + .field("time", &self.time) + .finish() } } @@ -631,7 +902,7 @@ pub struct GstFlowCombiner(c_void); impl ::std::fmt::Debug for GstFlowCombiner { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstFlowCombiner @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -639,20 +910,23 @@ impl ::std::fmt::Debug for GstFlowCombiner { #[derive(Copy, Clone)] pub struct GstPushSrcClass { pub parent_class: GstBaseSrcClass, - pub create: Option gst::GstFlowReturn>, - pub alloc: Option gst::GstFlowReturn>, - pub fill: Option gst::GstFlowReturn>, + pub create: + Option gst::GstFlowReturn>, + pub alloc: + Option gst::GstFlowReturn>, + pub fill: + Option gst::GstFlowReturn>, pub _gst_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstPushSrcClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPushSrcClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("create", &self.create) - .field("alloc", &self.alloc) - .field("fill", &self.fill) - .finish() + .field("parent_class", &self.parent_class) + .field("create", &self.create) + .field("alloc", &self.alloc) + .field("fill", &self.fill) + .finish() } } @@ -668,7 +942,7 @@ pub struct GstAdapter(c_void); impl ::std::fmt::Debug for GstAdapter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAdapter @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -684,9 +958,9 @@ pub struct GstAggregator { impl ::std::fmt::Debug for GstAggregator { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAggregator @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("srcpad", &self.srcpad) - .finish() + .field("parent", &self.parent) + .field("srcpad", &self.srcpad) + .finish() } } @@ -702,9 +976,9 @@ pub struct GstAggregatorPad { impl ::std::fmt::Debug for GstAggregatorPad { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAggregatorPad @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("segment", &self.segment) - .finish() + .field("parent", &self.parent) + .field("segment", &self.segment) + .finish() } } @@ -723,12 +997,12 @@ pub struct GstBaseParse { impl ::std::fmt::Debug for GstBaseParse { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBaseParse @ {:?}", self as *const _)) - .field("element", &self.element) - .field("sinkpad", &self.sinkpad) - .field("srcpad", &self.srcpad) - .field("flags", &self.flags) - .field("segment", &self.segment) - .finish() + .field("element", &self.element) + .field("sinkpad", &self.sinkpad) + .field("srcpad", &self.srcpad) + .field("flags", &self.flags) + .field("segment", &self.segment) + .finish() } } @@ -761,21 +1035,21 @@ pub struct GstBaseSink { impl ::std::fmt::Debug for GstBaseSink { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBaseSink @ {:?}", self as *const _)) - .field("element", &self.element) - .field("sinkpad", &self.sinkpad) - .field("pad_mode", &self.pad_mode) - .field("offset", &self.offset) - .field("can_activate_pull", &self.can_activate_pull) - .field("can_activate_push", &self.can_activate_push) - .field("preroll_lock", &self.preroll_lock) - .field("preroll_cond", &self.preroll_cond) - .field("eos", &self.eos) - .field("need_preroll", &self.need_preroll) - .field("have_preroll", &self.have_preroll) - .field("playing_async", &self.playing_async) - .field("have_newsegment", &self.have_newsegment) - .field("segment", &self.segment) - .finish() + .field("element", &self.element) + .field("sinkpad", &self.sinkpad) + .field("pad_mode", &self.pad_mode) + .field("offset", &self.offset) + .field("can_activate_pull", &self.can_activate_pull) + .field("can_activate_push", &self.can_activate_push) + .field("preroll_lock", &self.preroll_lock) + .field("preroll_cond", &self.preroll_cond) + .field("eos", &self.eos) + .field("need_preroll", &self.need_preroll) + .field("have_preroll", &self.have_preroll) + .field("playing_async", &self.playing_async) + .field("have_newsegment", &self.have_newsegment) + .field("segment", &self.segment) + .finish() } } @@ -806,25 +1080,25 @@ pub struct GstBaseSrc { impl ::std::fmt::Debug for GstBaseSrc { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBaseSrc @ {:?}", self as *const _)) - .field("element", &self.element) - .field("srcpad", &self.srcpad) - .field("live_lock", &self.live_lock) - .field("live_cond", &self.live_cond) - .field("is_live", &self.is_live) - .field("live_running", &self.live_running) - .field("blocksize", &self.blocksize) - .field("can_activate_push", &self.can_activate_push) - .field("random_access", &self.random_access) - .field("clock_id", &self.clock_id) - .field("segment", &self.segment) - .field("need_newsegment", &self.need_newsegment) - .field("num_buffers", &self.num_buffers) - .field("num_buffers_left", &self.num_buffers_left) - .field("typefind", &self.typefind) - .field("running", &self.running) - .field("pending_seek", &self.pending_seek) - .field("priv_", &self.priv_) - .finish() + .field("element", &self.element) + .field("srcpad", &self.srcpad) + .field("live_lock", &self.live_lock) + .field("live_cond", &self.live_cond) + .field("is_live", &self.is_live) + .field("live_running", &self.live_running) + .field("blocksize", &self.blocksize) + .field("can_activate_push", &self.can_activate_push) + .field("random_access", &self.random_access) + .field("clock_id", &self.clock_id) + .field("segment", &self.segment) + .field("need_newsegment", &self.need_newsegment) + .field("num_buffers", &self.num_buffers) + .field("num_buffers_left", &self.num_buffers_left) + .field("typefind", &self.typefind) + .field("running", &self.running) + .field("pending_seek", &self.pending_seek) + .field("priv_", &self.priv_) + .finish() } } @@ -844,13 +1118,13 @@ pub struct GstBaseTransform { impl ::std::fmt::Debug for GstBaseTransform { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBaseTransform @ {:?}", self as *const _)) - .field("element", &self.element) - .field("sinkpad", &self.sinkpad) - .field("srcpad", &self.srcpad) - .field("have_segment", &self.have_segment) - .field("segment", &self.segment) - .field("queued_buf", &self.queued_buf) - .finish() + .field("element", &self.element) + .field("sinkpad", &self.sinkpad) + .field("srcpad", &self.srcpad) + .field("have_segment", &self.have_segment) + .field("segment", &self.segment) + .field("queued_buf", &self.queued_buf) + .finish() } } @@ -867,9 +1141,9 @@ pub struct GstCollectPads { impl ::std::fmt::Debug for GstCollectPads { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstCollectPads @ {:?}", self as *const _)) - .field("object", &self.object) - .field("data", &self.data) - .finish() + .field("object", &self.object) + .field("data", &self.data) + .finish() } } @@ -884,8 +1158,8 @@ pub struct GstDataQueue { impl ::std::fmt::Debug for GstDataQueue { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDataQueue @ {:?}", self as *const _)) - .field("object", &self.object) - .finish() + .field("object", &self.object) + .finish() } } @@ -899,8 +1173,8 @@ pub struct GstPushSrc { impl ::std::fmt::Debug for GstPushSrc { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPushSrc @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -910,7 +1184,11 @@ extern "C" { // GstBaseParseFrame //========================================================================= pub fn gst_base_parse_frame_get_type() -> GType; - pub fn gst_base_parse_frame_new(buffer: *mut gst::GstBuffer, flags: GstBaseParseFrameFlags, overhead: c_int) -> *mut GstBaseParseFrame; + pub fn gst_base_parse_frame_new( + buffer: *mut gst::GstBuffer, + flags: GstBaseParseFrameFlags, + overhead: c_int, + ) -> *mut GstBaseParseFrame; pub fn gst_base_parse_frame_copy(frame: *mut GstBaseParseFrame) -> *mut GstBaseParseFrame; pub fn gst_base_parse_frame_free(frame: *mut GstBaseParseFrame); pub fn gst_base_parse_frame_init(frame: *mut GstBaseParseFrame); @@ -919,18 +1197,50 @@ extern "C" { // GstBitReader //========================================================================= pub fn gst_bit_reader_free(reader: *mut GstBitReader); - pub fn gst_bit_reader_get_bits_uint16(reader: *mut GstBitReader, val: *mut u16, nbits: c_uint) -> gboolean; - pub fn gst_bit_reader_get_bits_uint32(reader: *mut GstBitReader, val: *mut u32, nbits: c_uint) -> gboolean; - pub fn gst_bit_reader_get_bits_uint64(reader: *mut GstBitReader, val: *mut u64, nbits: c_uint) -> gboolean; - pub fn gst_bit_reader_get_bits_uint8(reader: *mut GstBitReader, val: *mut u8, nbits: c_uint) -> gboolean; + pub fn gst_bit_reader_get_bits_uint16( + reader: *mut GstBitReader, + val: *mut u16, + nbits: c_uint, + ) -> gboolean; + pub fn gst_bit_reader_get_bits_uint32( + reader: *mut GstBitReader, + val: *mut u32, + nbits: c_uint, + ) -> gboolean; + pub fn gst_bit_reader_get_bits_uint64( + reader: *mut GstBitReader, + val: *mut u64, + nbits: c_uint, + ) -> gboolean; + pub fn gst_bit_reader_get_bits_uint8( + reader: *mut GstBitReader, + val: *mut u8, + nbits: c_uint, + ) -> gboolean; pub fn gst_bit_reader_get_pos(reader: *const GstBitReader) -> c_uint; pub fn gst_bit_reader_get_remaining(reader: *const GstBitReader) -> c_uint; pub fn gst_bit_reader_get_size(reader: *const GstBitReader) -> c_uint; pub fn gst_bit_reader_init(reader: *mut GstBitReader, data: *const u8, size: c_uint); - pub fn gst_bit_reader_peek_bits_uint16(reader: *const GstBitReader, val: *mut u16, nbits: c_uint) -> gboolean; - pub fn gst_bit_reader_peek_bits_uint32(reader: *const GstBitReader, val: *mut u32, nbits: c_uint) -> gboolean; - pub fn gst_bit_reader_peek_bits_uint64(reader: *const GstBitReader, val: *mut u64, nbits: c_uint) -> gboolean; - pub fn gst_bit_reader_peek_bits_uint8(reader: *const GstBitReader, val: *mut u8, nbits: c_uint) -> gboolean; + pub fn gst_bit_reader_peek_bits_uint16( + reader: *const GstBitReader, + val: *mut u16, + nbits: c_uint, + ) -> gboolean; + pub fn gst_bit_reader_peek_bits_uint32( + reader: *const GstBitReader, + val: *mut u32, + nbits: c_uint, + ) -> gboolean; + pub fn gst_bit_reader_peek_bits_uint64( + reader: *const GstBitReader, + val: *mut u64, + nbits: c_uint, + ) -> gboolean; + pub fn gst_bit_reader_peek_bits_uint8( + reader: *const GstBitReader, + val: *mut u8, + nbits: c_uint, + ) -> gboolean; pub fn gst_bit_reader_set_pos(reader: *mut GstBitReader, pos: c_uint) -> gboolean; pub fn gst_bit_reader_skip(reader: *mut GstBitReader, nbits: c_uint) -> gboolean; pub fn gst_bit_reader_skip_to_byte(reader: *mut GstBitReader) -> gboolean; @@ -956,23 +1266,49 @@ extern "C" { #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_bit_writer_init(bitwriter: *mut GstBitWriter); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_bit_writer_init_with_data(bitwriter: *mut GstBitWriter, data: *mut u8, size: c_uint, initialized: gboolean); + pub fn gst_bit_writer_init_with_data( + bitwriter: *mut GstBitWriter, + data: *mut u8, + size: c_uint, + initialized: gboolean, + ); #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_bit_writer_init_with_size(bitwriter: *mut GstBitWriter, size: u32, fixed: gboolean); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_bit_writer_put_bits_uint16(bitwriter: *mut GstBitWriter, value: u16, nbits: c_uint) -> gboolean; + pub fn gst_bit_writer_put_bits_uint16( + bitwriter: *mut GstBitWriter, + value: u16, + nbits: c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_bit_writer_put_bits_uint32(bitwriter: *mut GstBitWriter, value: u32, nbits: c_uint) -> gboolean; + pub fn gst_bit_writer_put_bits_uint32( + bitwriter: *mut GstBitWriter, + value: u32, + nbits: c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_bit_writer_put_bits_uint64(bitwriter: *mut GstBitWriter, value: u64, nbits: c_uint) -> gboolean; + pub fn gst_bit_writer_put_bits_uint64( + bitwriter: *mut GstBitWriter, + value: u64, + nbits: c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_bit_writer_put_bits_uint8(bitwriter: *mut GstBitWriter, value: u8, nbits: c_uint) -> gboolean; + pub fn gst_bit_writer_put_bits_uint8( + bitwriter: *mut GstBitWriter, + value: u8, + nbits: c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_bit_writer_put_bytes(bitwriter: *mut GstBitWriter, data: *const u8, nbytes: c_uint) -> gboolean; + pub fn gst_bit_writer_put_bytes( + bitwriter: *mut GstBitWriter, + data: *const u8, + nbytes: c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_bit_writer_reset(bitwriter: *mut GstBitWriter); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_bit_writer_reset_and_get_buffer(bitwriter: *mut GstBitWriter) -> *mut gst::GstBuffer; + pub fn gst_bit_writer_reset_and_get_buffer(bitwriter: *mut GstBitWriter) + -> *mut gst::GstBuffer; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_bit_writer_reset_and_get_data(bitwriter: *mut GstBitWriter) -> *mut u8; #[cfg(any(feature = "v1_16", feature = "dox"))] @@ -980,23 +1316,56 @@ extern "C" { #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_bit_writer_new() -> *mut GstBitWriter; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_bit_writer_new_with_data(data: *mut u8, size: c_uint, initialized: gboolean) -> *mut GstBitWriter; + pub fn gst_bit_writer_new_with_data( + data: *mut u8, + size: c_uint, + initialized: gboolean, + ) -> *mut GstBitWriter; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_bit_writer_new_with_size(size: u32, fixed: gboolean) -> *mut GstBitWriter; //========================================================================= // GstByteReader //========================================================================= - pub fn gst_byte_reader_dup_data(reader: *mut GstByteReader, size: c_uint, val: *mut *mut u8) -> gboolean; - pub fn gst_byte_reader_dup_string_utf16(reader: *mut GstByteReader, str: *mut *mut u16) -> gboolean; - pub fn gst_byte_reader_dup_string_utf32(reader: *mut GstByteReader, str: *mut *mut u32) -> gboolean; - pub fn gst_byte_reader_dup_string_utf8(reader: *mut GstByteReader, str: *mut *mut c_char) -> gboolean; + pub fn gst_byte_reader_dup_data( + reader: *mut GstByteReader, + size: c_uint, + val: *mut *mut u8, + ) -> gboolean; + pub fn gst_byte_reader_dup_string_utf16( + reader: *mut GstByteReader, + str: *mut *mut u16, + ) -> gboolean; + pub fn gst_byte_reader_dup_string_utf32( + reader: *mut GstByteReader, + str: *mut *mut u32, + ) -> gboolean; + pub fn gst_byte_reader_dup_string_utf8( + reader: *mut GstByteReader, + str: *mut *mut c_char, + ) -> gboolean; pub fn gst_byte_reader_free(reader: *mut GstByteReader); - pub fn gst_byte_reader_get_data(reader: *mut GstByteReader, size: c_uint, val: *mut *const u8) -> gboolean; - pub fn gst_byte_reader_get_float32_be(reader: *mut GstByteReader, val: *mut c_float) -> gboolean; - pub fn gst_byte_reader_get_float32_le(reader: *mut GstByteReader, val: *mut c_float) -> gboolean; - pub fn gst_byte_reader_get_float64_be(reader: *mut GstByteReader, val: *mut c_double) -> gboolean; - pub fn gst_byte_reader_get_float64_le(reader: *mut GstByteReader, val: *mut c_double) -> gboolean; + pub fn gst_byte_reader_get_data( + reader: *mut GstByteReader, + size: c_uint, + val: *mut *const u8, + ) -> gboolean; + pub fn gst_byte_reader_get_float32_be( + reader: *mut GstByteReader, + val: *mut c_float, + ) -> gboolean; + pub fn gst_byte_reader_get_float32_le( + reader: *mut GstByteReader, + val: *mut c_float, + ) -> gboolean; + pub fn gst_byte_reader_get_float64_be( + reader: *mut GstByteReader, + val: *mut c_double, + ) -> gboolean; + pub fn gst_byte_reader_get_float64_le( + reader: *mut GstByteReader, + val: *mut c_double, + ) -> gboolean; pub fn gst_byte_reader_get_int16_be(reader: *mut GstByteReader, val: *mut i16) -> gboolean; pub fn gst_byte_reader_get_int16_le(reader: *mut GstByteReader, val: *mut i16) -> gboolean; pub fn gst_byte_reader_get_int24_be(reader: *mut GstByteReader, val: *mut i32) -> gboolean; @@ -1009,9 +1378,16 @@ extern "C" { pub fn gst_byte_reader_get_pos(reader: *const GstByteReader) -> c_uint; pub fn gst_byte_reader_get_remaining(reader: *const GstByteReader) -> c_uint; pub fn gst_byte_reader_get_size(reader: *const GstByteReader) -> c_uint; - pub fn gst_byte_reader_get_string_utf8(reader: *mut GstByteReader, str: *mut *const c_char) -> gboolean; + pub fn gst_byte_reader_get_string_utf8( + reader: *mut GstByteReader, + str: *mut *const c_char, + ) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_byte_reader_get_sub_reader(reader: *mut GstByteReader, sub_reader: *mut GstByteReader, size: c_uint) -> gboolean; + pub fn gst_byte_reader_get_sub_reader( + reader: *mut GstByteReader, + sub_reader: *mut GstByteReader, + size: c_uint, + ) -> gboolean; pub fn gst_byte_reader_get_uint16_be(reader: *mut GstByteReader, val: *mut u16) -> gboolean; pub fn gst_byte_reader_get_uint16_le(reader: *mut GstByteReader, val: *mut u16) -> gboolean; pub fn gst_byte_reader_get_uint24_be(reader: *mut GstByteReader, val: *mut u32) -> gboolean; @@ -1022,14 +1398,43 @@ extern "C" { pub fn gst_byte_reader_get_uint64_le(reader: *mut GstByteReader, val: *mut u64) -> gboolean; pub fn gst_byte_reader_get_uint8(reader: *mut GstByteReader, val: *mut u8) -> gboolean; pub fn gst_byte_reader_init(reader: *mut GstByteReader, data: *const u8, size: c_uint); - pub fn gst_byte_reader_masked_scan_uint32(reader: *const GstByteReader, mask: u32, pattern: u32, offset: c_uint, size: c_uint) -> c_uint; + pub fn gst_byte_reader_masked_scan_uint32( + reader: *const GstByteReader, + mask: u32, + pattern: u32, + offset: c_uint, + size: c_uint, + ) -> c_uint; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_byte_reader_masked_scan_uint32_peek(reader: *const GstByteReader, mask: u32, pattern: u32, offset: c_uint, size: c_uint, value: *mut u32) -> c_uint; - pub fn gst_byte_reader_peek_data(reader: *const GstByteReader, size: c_uint, val: *mut *const u8) -> gboolean; - pub fn gst_byte_reader_peek_float32_be(reader: *const GstByteReader, val: *mut c_float) -> gboolean; - pub fn gst_byte_reader_peek_float32_le(reader: *const GstByteReader, val: *mut c_float) -> gboolean; - pub fn gst_byte_reader_peek_float64_be(reader: *const GstByteReader, val: *mut c_double) -> gboolean; - pub fn gst_byte_reader_peek_float64_le(reader: *const GstByteReader, val: *mut c_double) -> gboolean; + pub fn gst_byte_reader_masked_scan_uint32_peek( + reader: *const GstByteReader, + mask: u32, + pattern: u32, + offset: c_uint, + size: c_uint, + value: *mut u32, + ) -> c_uint; + pub fn gst_byte_reader_peek_data( + reader: *const GstByteReader, + size: c_uint, + val: *mut *const u8, + ) -> gboolean; + pub fn gst_byte_reader_peek_float32_be( + reader: *const GstByteReader, + val: *mut c_float, + ) -> gboolean; + pub fn gst_byte_reader_peek_float32_le( + reader: *const GstByteReader, + val: *mut c_float, + ) -> gboolean; + pub fn gst_byte_reader_peek_float64_be( + reader: *const GstByteReader, + val: *mut c_double, + ) -> gboolean; + pub fn gst_byte_reader_peek_float64_le( + reader: *const GstByteReader, + val: *mut c_double, + ) -> gboolean; pub fn gst_byte_reader_peek_int16_be(reader: *const GstByteReader, val: *mut i16) -> gboolean; pub fn gst_byte_reader_peek_int16_le(reader: *const GstByteReader, val: *mut i16) -> gboolean; pub fn gst_byte_reader_peek_int24_be(reader: *const GstByteReader, val: *mut i32) -> gboolean; @@ -1039,9 +1444,16 @@ extern "C" { pub fn gst_byte_reader_peek_int64_be(reader: *const GstByteReader, val: *mut i64) -> gboolean; pub fn gst_byte_reader_peek_int64_le(reader: *const GstByteReader, val: *mut i64) -> gboolean; pub fn gst_byte_reader_peek_int8(reader: *const GstByteReader, val: *mut i8) -> gboolean; - pub fn gst_byte_reader_peek_string_utf8(reader: *const GstByteReader, str: *mut *const c_char) -> gboolean; + pub fn gst_byte_reader_peek_string_utf8( + reader: *const GstByteReader, + str: *mut *const c_char, + ) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_byte_reader_peek_sub_reader(reader: *mut GstByteReader, sub_reader: *mut GstByteReader, size: c_uint) -> gboolean; + pub fn gst_byte_reader_peek_sub_reader( + reader: *mut GstByteReader, + sub_reader: *mut GstByteReader, + size: c_uint, + ) -> gboolean; pub fn gst_byte_reader_peek_uint16_be(reader: *const GstByteReader, val: *mut u16) -> gboolean; pub fn gst_byte_reader_peek_uint16_le(reader: *const GstByteReader, val: *mut u16) -> gboolean; pub fn gst_byte_reader_peek_uint24_be(reader: *const GstByteReader, val: *mut u32) -> gboolean; @@ -1068,10 +1480,28 @@ extern "C" { pub fn gst_byte_writer_free_and_get_data(writer: *mut GstByteWriter) -> *mut u8; pub fn gst_byte_writer_get_remaining(writer: *const GstByteWriter) -> c_uint; pub fn gst_byte_writer_init(writer: *mut GstByteWriter); - pub fn gst_byte_writer_init_with_data(writer: *mut GstByteWriter, data: *mut u8, size: c_uint, initialized: gboolean); - pub fn gst_byte_writer_init_with_size(writer: *mut GstByteWriter, size: c_uint, fixed: gboolean); - pub fn gst_byte_writer_put_buffer(writer: *mut GstByteWriter, buffer: *mut gst::GstBuffer, offset: size_t, size: ssize_t) -> gboolean; - pub fn gst_byte_writer_put_data(writer: *mut GstByteWriter, data: *const u8, size: c_uint) -> gboolean; + pub fn gst_byte_writer_init_with_data( + writer: *mut GstByteWriter, + data: *mut u8, + size: c_uint, + initialized: gboolean, + ); + pub fn gst_byte_writer_init_with_size( + writer: *mut GstByteWriter, + size: c_uint, + fixed: gboolean, + ); + pub fn gst_byte_writer_put_buffer( + writer: *mut GstByteWriter, + buffer: *mut gst::GstBuffer, + offset: size_t, + size: ssize_t, + ) -> gboolean; + pub fn gst_byte_writer_put_data( + writer: *mut GstByteWriter, + data: *const u8, + size: c_uint, + ) -> gboolean; pub fn gst_byte_writer_put_float32_be(writer: *mut GstByteWriter, val: c_float) -> gboolean; pub fn gst_byte_writer_put_float32_le(writer: *mut GstByteWriter, val: c_float) -> gboolean; pub fn gst_byte_writer_put_float64_be(writer: *mut GstByteWriter, val: c_double) -> gboolean; @@ -1085,9 +1515,18 @@ extern "C" { pub fn gst_byte_writer_put_int64_be(writer: *mut GstByteWriter, val: i64) -> gboolean; pub fn gst_byte_writer_put_int64_le(writer: *mut GstByteWriter, val: i64) -> gboolean; pub fn gst_byte_writer_put_int8(writer: *mut GstByteWriter, val: i8) -> gboolean; - pub fn gst_byte_writer_put_string_utf16(writer: *mut GstByteWriter, data: *const u16) -> gboolean; - pub fn gst_byte_writer_put_string_utf32(writer: *mut GstByteWriter, data: *const u32) -> gboolean; - pub fn gst_byte_writer_put_string_utf8(writer: *mut GstByteWriter, data: *const c_char) -> gboolean; + pub fn gst_byte_writer_put_string_utf16( + writer: *mut GstByteWriter, + data: *const u16, + ) -> gboolean; + pub fn gst_byte_writer_put_string_utf32( + writer: *mut GstByteWriter, + data: *const u32, + ) -> gboolean; + pub fn gst_byte_writer_put_string_utf8( + writer: *mut GstByteWriter, + data: *const c_char, + ) -> gboolean; pub fn gst_byte_writer_put_uint16_be(writer: *mut GstByteWriter, val: u16) -> gboolean; pub fn gst_byte_writer_put_uint16_le(writer: *mut GstByteWriter, val: u16) -> gboolean; pub fn gst_byte_writer_put_uint24_be(writer: *mut GstByteWriter, val: u32) -> gboolean; @@ -1101,7 +1540,11 @@ extern "C" { pub fn gst_byte_writer_reset_and_get_buffer(writer: *mut GstByteWriter) -> *mut gst::GstBuffer; pub fn gst_byte_writer_reset_and_get_data(writer: *mut GstByteWriter) -> *mut u8; pub fn gst_byte_writer_new() -> *mut GstByteWriter; - pub fn gst_byte_writer_new_with_data(data: *mut u8, size: c_uint, initialized: gboolean) -> *mut GstByteWriter; + pub fn gst_byte_writer_new_with_data( + data: *mut u8, + size: c_uint, + initialized: gboolean, + ) -> *mut GstByteWriter; pub fn gst_byte_writer_new_with_size(size: c_uint, fixed: gboolean) -> *mut GstByteWriter; //========================================================================= @@ -1125,9 +1568,16 @@ extern "C" { #[cfg(any(feature = "v1_12_1", feature = "dox"))] pub fn gst_flow_combiner_unref(combiner: *mut GstFlowCombiner); #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_flow_combiner_update_flow(combiner: *mut GstFlowCombiner, fret: gst::GstFlowReturn) -> gst::GstFlowReturn; + pub fn gst_flow_combiner_update_flow( + combiner: *mut GstFlowCombiner, + fret: gst::GstFlowReturn, + ) -> gst::GstFlowReturn; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_flow_combiner_update_pad_flow(combiner: *mut GstFlowCombiner, pad: *mut gst::GstPad, fret: gst::GstFlowReturn) -> gst::GstFlowReturn; + pub fn gst_flow_combiner_update_pad_flow( + combiner: *mut GstFlowCombiner, + pad: *mut gst::GstPad, + fret: gst::GstFlowReturn, + ) -> gst::GstFlowReturn; //========================================================================= // GstQueueArray @@ -1137,9 +1587,17 @@ extern "C" { #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_queue_array_drop_element(array: *mut GstQueueArray, idx: c_uint) -> gpointer; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_queue_array_drop_struct(array: *mut GstQueueArray, idx: c_uint, p_struct: gpointer) -> gboolean; + pub fn gst_queue_array_drop_struct( + array: *mut GstQueueArray, + idx: c_uint, + p_struct: gpointer, + ) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_queue_array_find(array: *mut GstQueueArray, func: glib::GCompareFunc, data: gpointer) -> c_uint; + pub fn gst_queue_array_find( + array: *mut GstQueueArray, + func: glib::GCompareFunc, + data: gpointer, + ) -> c_uint; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_queue_array_free(array: *mut GstQueueArray); #[cfg(any(feature = "v1_2", feature = "dox"))] @@ -1170,11 +1628,17 @@ extern "C" { pub fn gst_queue_array_push_tail(array: *mut GstQueueArray, data: gpointer); pub fn gst_queue_array_push_tail_struct(array: *mut GstQueueArray, p_struct: gpointer); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_queue_array_set_clear_func(array: *mut GstQueueArray, clear_func: glib::GDestroyNotify); + pub fn gst_queue_array_set_clear_func( + array: *mut GstQueueArray, + clear_func: glib::GDestroyNotify, + ); #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_queue_array_new(initial_size: c_uint) -> *mut GstQueueArray; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_queue_array_new_for_struct(struct_size: size_t, initial_size: c_uint) -> *mut GstQueueArray; + pub fn gst_queue_array_new_for_struct( + struct_size: size_t, + initial_size: c_uint, + ) -> *mut GstQueueArray; //========================================================================= // GstAdapter @@ -1186,7 +1650,11 @@ extern "C" { pub fn gst_adapter_clear(adapter: *mut GstAdapter); pub fn gst_adapter_copy(adapter: *mut GstAdapter, dest: gpointer, offset: size_t, size: size_t); #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_adapter_copy_bytes(adapter: *mut GstAdapter, offset: size_t, size: size_t) -> *mut glib::GBytes; + pub fn gst_adapter_copy_bytes( + adapter: *mut GstAdapter, + offset: size_t, + size: size_t, + ) -> *mut glib::GBytes; pub fn gst_adapter_distance_from_discont(adapter: *mut GstAdapter) -> u64; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_adapter_dts_at_discont(adapter: *mut GstAdapter) -> gst::GstClockTime; @@ -1194,33 +1662,67 @@ extern "C" { #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_adapter_get_buffer(adapter: *mut GstAdapter, nbytes: size_t) -> *mut gst::GstBuffer; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_adapter_get_buffer_fast(adapter: *mut GstAdapter, nbytes: size_t) -> *mut gst::GstBuffer; + pub fn gst_adapter_get_buffer_fast( + adapter: *mut GstAdapter, + nbytes: size_t, + ) -> *mut gst::GstBuffer; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_adapter_get_buffer_list(adapter: *mut GstAdapter, nbytes: size_t) -> *mut gst::GstBufferList; + pub fn gst_adapter_get_buffer_list( + adapter: *mut GstAdapter, + nbytes: size_t, + ) -> *mut gst::GstBufferList; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_adapter_get_list(adapter: *mut GstAdapter, nbytes: size_t) -> *mut glib::GList; pub fn gst_adapter_map(adapter: *mut GstAdapter, size: size_t) -> gconstpointer; - pub fn gst_adapter_masked_scan_uint32(adapter: *mut GstAdapter, mask: u32, pattern: u32, offset: size_t, size: size_t) -> ssize_t; - pub fn gst_adapter_masked_scan_uint32_peek(adapter: *mut GstAdapter, mask: u32, pattern: u32, offset: size_t, size: size_t, value: *mut u32) -> ssize_t; + pub fn gst_adapter_masked_scan_uint32( + adapter: *mut GstAdapter, + mask: u32, + pattern: u32, + offset: size_t, + size: size_t, + ) -> ssize_t; + pub fn gst_adapter_masked_scan_uint32_peek( + adapter: *mut GstAdapter, + mask: u32, + pattern: u32, + offset: size_t, + size: size_t, + value: *mut u32, + ) -> ssize_t; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_adapter_offset_at_discont(adapter: *mut GstAdapter) -> u64; pub fn gst_adapter_prev_dts(adapter: *mut GstAdapter, distance: *mut u64) -> gst::GstClockTime; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_adapter_prev_dts_at_offset(adapter: *mut GstAdapter, offset: size_t, distance: *mut u64) -> gst::GstClockTime; + pub fn gst_adapter_prev_dts_at_offset( + adapter: *mut GstAdapter, + offset: size_t, + distance: *mut u64, + ) -> gst::GstClockTime; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_adapter_prev_offset(adapter: *mut GstAdapter, distance: *mut u64) -> u64; pub fn gst_adapter_prev_pts(adapter: *mut GstAdapter, distance: *mut u64) -> gst::GstClockTime; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_adapter_prev_pts_at_offset(adapter: *mut GstAdapter, offset: size_t, distance: *mut u64) -> gst::GstClockTime; + pub fn gst_adapter_prev_pts_at_offset( + adapter: *mut GstAdapter, + offset: size_t, + distance: *mut u64, + ) -> gst::GstClockTime; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_adapter_pts_at_discont(adapter: *mut GstAdapter) -> gst::GstClockTime; pub fn gst_adapter_push(adapter: *mut GstAdapter, buf: *mut gst::GstBuffer); pub fn gst_adapter_take(adapter: *mut GstAdapter, nbytes: size_t) -> gpointer; - pub fn gst_adapter_take_buffer(adapter: *mut GstAdapter, nbytes: size_t) -> *mut gst::GstBuffer; + pub fn gst_adapter_take_buffer(adapter: *mut GstAdapter, nbytes: size_t) + -> *mut gst::GstBuffer; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_adapter_take_buffer_fast(adapter: *mut GstAdapter, nbytes: size_t) -> *mut gst::GstBuffer; + pub fn gst_adapter_take_buffer_fast( + adapter: *mut GstAdapter, + nbytes: size_t, + ) -> *mut gst::GstBuffer; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_adapter_take_buffer_list(adapter: *mut GstAdapter, nbytes: size_t) -> *mut gst::GstBufferList; + pub fn gst_adapter_take_buffer_list( + adapter: *mut GstAdapter, + nbytes: size_t, + ) -> *mut gst::GstBufferList; pub fn gst_adapter_take_list(adapter: *mut GstAdapter, nbytes: size_t) -> *mut glib::GList; pub fn gst_adapter_unmap(adapter: *mut GstAdapter); @@ -1229,15 +1731,26 @@ extern "C" { //========================================================================= pub fn gst_aggregator_get_type() -> GType; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_aggregator_finish_buffer(aggregator: *mut GstAggregator, buffer: *mut gst::GstBuffer) -> gst::GstFlowReturn; + pub fn gst_aggregator_finish_buffer( + aggregator: *mut GstAggregator, + buffer: *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_aggregator_get_allocator(self_: *mut GstAggregator, allocator: *mut *mut gst::GstAllocator, params: *mut gst::GstAllocationParams); + pub fn gst_aggregator_get_allocator( + self_: *mut GstAggregator, + allocator: *mut *mut gst::GstAllocator, + params: *mut gst::GstAllocationParams, + ); #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_aggregator_get_buffer_pool(self_: *mut GstAggregator) -> *mut gst::GstBufferPool; #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_aggregator_get_latency(self_: *mut GstAggregator) -> gst::GstClockTime; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_aggregator_set_latency(self_: *mut GstAggregator, min_latency: gst::GstClockTime, max_latency: gst::GstClockTime); + pub fn gst_aggregator_set_latency( + self_: *mut GstAggregator, + min_latency: gst::GstClockTime, + max_latency: gst::GstClockTime, + ); #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_aggregator_set_src_caps(self_: *mut GstAggregator, caps: *mut gst::GstCaps); #[cfg(any(feature = "v1_16", feature = "dox"))] @@ -1262,23 +1775,64 @@ extern "C" { // GstBaseParse //========================================================================= pub fn gst_base_parse_get_type() -> GType; - pub fn gst_base_parse_add_index_entry(parse: *mut GstBaseParse, offset: u64, ts: gst::GstClockTime, key: gboolean, force: gboolean) -> gboolean; - pub fn gst_base_parse_convert_default(parse: *mut GstBaseParse, src_format: gst::GstFormat, src_value: i64, dest_format: gst::GstFormat, dest_value: *mut i64) -> gboolean; + pub fn gst_base_parse_add_index_entry( + parse: *mut GstBaseParse, + offset: u64, + ts: gst::GstClockTime, + key: gboolean, + force: gboolean, + ) -> gboolean; + pub fn gst_base_parse_convert_default( + parse: *mut GstBaseParse, + src_format: gst::GstFormat, + src_value: i64, + dest_format: gst::GstFormat, + dest_value: *mut i64, + ) -> gboolean; #[cfg(any(feature = "v1_12", feature = "dox"))] pub fn gst_base_parse_drain(parse: *mut GstBaseParse); - pub fn gst_base_parse_finish_frame(parse: *mut GstBaseParse, frame: *mut GstBaseParseFrame, size: c_int) -> gst::GstFlowReturn; + pub fn gst_base_parse_finish_frame( + parse: *mut GstBaseParse, + frame: *mut GstBaseParseFrame, + size: c_int, + ) -> gst::GstFlowReturn; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_base_parse_merge_tags(parse: *mut GstBaseParse, tags: *mut gst::GstTagList, mode: gst::GstTagMergeMode); - pub fn gst_base_parse_push_frame(parse: *mut GstBaseParse, frame: *mut GstBaseParseFrame) -> gst::GstFlowReturn; + pub fn gst_base_parse_merge_tags( + parse: *mut GstBaseParse, + tags: *mut gst::GstTagList, + mode: gst::GstTagMergeMode, + ); + pub fn gst_base_parse_push_frame( + parse: *mut GstBaseParse, + frame: *mut GstBaseParseFrame, + ) -> gst::GstFlowReturn; pub fn gst_base_parse_set_average_bitrate(parse: *mut GstBaseParse, bitrate: c_uint); - pub fn gst_base_parse_set_duration(parse: *mut GstBaseParse, fmt: gst::GstFormat, duration: i64, interval: c_int); - pub fn gst_base_parse_set_frame_rate(parse: *mut GstBaseParse, fps_num: c_uint, fps_den: c_uint, lead_in: c_uint, lead_out: c_uint); + pub fn gst_base_parse_set_duration( + parse: *mut GstBaseParse, + fmt: gst::GstFormat, + duration: i64, + interval: c_int, + ); + pub fn gst_base_parse_set_frame_rate( + parse: *mut GstBaseParse, + fps_num: c_uint, + fps_den: c_uint, + lead_in: c_uint, + lead_out: c_uint, + ); pub fn gst_base_parse_set_has_timing_info(parse: *mut GstBaseParse, has_timing: gboolean); pub fn gst_base_parse_set_infer_ts(parse: *mut GstBaseParse, infer_ts: gboolean); - pub fn gst_base_parse_set_latency(parse: *mut GstBaseParse, min_latency: gst::GstClockTime, max_latency: gst::GstClockTime); + pub fn gst_base_parse_set_latency( + parse: *mut GstBaseParse, + min_latency: gst::GstClockTime, + max_latency: gst::GstClockTime, + ); pub fn gst_base_parse_set_min_frame_size(parse: *mut GstBaseParse, min_size: c_uint); pub fn gst_base_parse_set_passthrough(parse: *mut GstBaseParse, passthrough: gboolean); - pub fn gst_base_parse_set_pts_interpolation(parse: *mut GstBaseParse, pts_interpolate: gboolean); + pub fn gst_base_parse_set_pts_interpolation( + parse: *mut GstBaseParse, + pts_interpolate: gboolean, + ); pub fn gst_base_parse_set_syncable(parse: *mut GstBaseParse, syncable: gboolean); #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_base_parse_set_ts_at_offset(parse: *mut GstBaseParse, offset: size_t); @@ -1287,7 +1841,10 @@ extern "C" { // GstBaseSink //========================================================================= pub fn gst_base_sink_get_type() -> GType; - pub fn gst_base_sink_do_preroll(sink: *mut GstBaseSink, obj: *mut gst::GstMiniObject) -> gst::GstFlowReturn; + pub fn gst_base_sink_do_preroll( + sink: *mut GstBaseSink, + obj: *mut gst::GstMiniObject, + ) -> gst::GstFlowReturn; pub fn gst_base_sink_get_blocksize(sink: *mut GstBaseSink) -> c_uint; #[cfg(any(feature = "v1_12", feature = "dox"))] pub fn gst_base_sink_get_drop_out_of_segment(sink: *mut GstBaseSink) -> gboolean; @@ -1305,38 +1862,72 @@ extern "C" { pub fn gst_base_sink_is_async_enabled(sink: *mut GstBaseSink) -> gboolean; pub fn gst_base_sink_is_last_sample_enabled(sink: *mut GstBaseSink) -> gboolean; pub fn gst_base_sink_is_qos_enabled(sink: *mut GstBaseSink) -> gboolean; - pub fn gst_base_sink_query_latency(sink: *mut GstBaseSink, live: *mut gboolean, upstream_live: *mut gboolean, min_latency: *mut gst::GstClockTime, max_latency: *mut gst::GstClockTime) -> gboolean; + pub fn gst_base_sink_query_latency( + sink: *mut GstBaseSink, + live: *mut gboolean, + upstream_live: *mut gboolean, + min_latency: *mut gst::GstClockTime, + max_latency: *mut gst::GstClockTime, + ) -> gboolean; pub fn gst_base_sink_set_async_enabled(sink: *mut GstBaseSink, enabled: gboolean); pub fn gst_base_sink_set_blocksize(sink: *mut GstBaseSink, blocksize: c_uint); #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_base_sink_set_drop_out_of_segment(sink: *mut GstBaseSink, drop_out_of_segment: gboolean); + pub fn gst_base_sink_set_drop_out_of_segment( + sink: *mut GstBaseSink, + drop_out_of_segment: gboolean, + ); pub fn gst_base_sink_set_last_sample_enabled(sink: *mut GstBaseSink, enabled: gboolean); #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_base_sink_set_max_bitrate(sink: *mut GstBaseSink, max_bitrate: u64); pub fn gst_base_sink_set_max_lateness(sink: *mut GstBaseSink, max_lateness: i64); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_base_sink_set_processing_deadline(sink: *mut GstBaseSink, processing_deadline: gst::GstClockTime); + pub fn gst_base_sink_set_processing_deadline( + sink: *mut GstBaseSink, + processing_deadline: gst::GstClockTime, + ); pub fn gst_base_sink_set_qos_enabled(sink: *mut GstBaseSink, enabled: gboolean); pub fn gst_base_sink_set_render_delay(sink: *mut GstBaseSink, delay: gst::GstClockTime); pub fn gst_base_sink_set_sync(sink: *mut GstBaseSink, sync: gboolean); pub fn gst_base_sink_set_throttle_time(sink: *mut GstBaseSink, throttle: u64); pub fn gst_base_sink_set_ts_offset(sink: *mut GstBaseSink, offset: gst::GstClockTimeDiff); - pub fn gst_base_sink_wait(sink: *mut GstBaseSink, time: gst::GstClockTime, jitter: *mut gst::GstClockTimeDiff) -> gst::GstFlowReturn; - pub fn gst_base_sink_wait_clock(sink: *mut GstBaseSink, time: gst::GstClockTime, jitter: *mut gst::GstClockTimeDiff) -> gst::GstClockReturn; + pub fn gst_base_sink_wait( + sink: *mut GstBaseSink, + time: gst::GstClockTime, + jitter: *mut gst::GstClockTimeDiff, + ) -> gst::GstFlowReturn; + pub fn gst_base_sink_wait_clock( + sink: *mut GstBaseSink, + time: gst::GstClockTime, + jitter: *mut gst::GstClockTimeDiff, + ) -> gst::GstClockReturn; pub fn gst_base_sink_wait_preroll(sink: *mut GstBaseSink) -> gst::GstFlowReturn; //========================================================================= // GstBaseSrc //========================================================================= pub fn gst_base_src_get_type() -> GType; - pub fn gst_base_src_get_allocator(src: *mut GstBaseSrc, allocator: *mut *mut gst::GstAllocator, params: *mut gst::GstAllocationParams); + pub fn gst_base_src_get_allocator( + src: *mut GstBaseSrc, + allocator: *mut *mut gst::GstAllocator, + params: *mut gst::GstAllocationParams, + ); pub fn gst_base_src_get_blocksize(src: *mut GstBaseSrc) -> c_uint; pub fn gst_base_src_get_buffer_pool(src: *mut GstBaseSrc) -> *mut gst::GstBufferPool; pub fn gst_base_src_get_do_timestamp(src: *mut GstBaseSrc) -> gboolean; pub fn gst_base_src_is_async(src: *mut GstBaseSrc) -> gboolean; pub fn gst_base_src_is_live(src: *mut GstBaseSrc) -> gboolean; - pub fn gst_base_src_new_seamless_segment(src: *mut GstBaseSrc, start: i64, stop: i64, time: i64) -> gboolean; - pub fn gst_base_src_query_latency(src: *mut GstBaseSrc, live: *mut gboolean, min_latency: *mut gst::GstClockTime, max_latency: *mut gst::GstClockTime) -> gboolean; + pub fn gst_base_src_new_seamless_segment( + src: *mut GstBaseSrc, + start: i64, + stop: i64, + time: i64, + ) -> gboolean; + pub fn gst_base_src_query_latency( + src: *mut GstBaseSrc, + live: *mut gboolean, + min_latency: *mut gst::GstClockTime, + max_latency: *mut gst::GstClockTime, + ) -> gboolean; pub fn gst_base_src_set_async(src: *mut GstBaseSrc, async: gboolean); #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_base_src_set_automatic_eos(src: *mut GstBaseSrc, automatic_eos: gboolean); @@ -1349,15 +1940,24 @@ extern "C" { pub fn gst_base_src_start_complete(basesrc: *mut GstBaseSrc, ret: gst::GstFlowReturn); pub fn gst_base_src_start_wait(basesrc: *mut GstBaseSrc) -> gst::GstFlowReturn; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_base_src_submit_buffer_list(src: *mut GstBaseSrc, buffer_list: *mut gst::GstBufferList); + pub fn gst_base_src_submit_buffer_list( + src: *mut GstBaseSrc, + buffer_list: *mut gst::GstBufferList, + ); pub fn gst_base_src_wait_playing(src: *mut GstBaseSrc) -> gst::GstFlowReturn; //========================================================================= // GstBaseTransform //========================================================================= pub fn gst_base_transform_get_type() -> GType; - pub fn gst_base_transform_get_allocator(trans: *mut GstBaseTransform, allocator: *mut *mut gst::GstAllocator, params: *mut gst::GstAllocationParams); - pub fn gst_base_transform_get_buffer_pool(trans: *mut GstBaseTransform) -> *mut gst::GstBufferPool; + pub fn gst_base_transform_get_allocator( + trans: *mut GstBaseTransform, + allocator: *mut *mut gst::GstAllocator, + params: *mut gst::GstAllocationParams, + ); + pub fn gst_base_transform_get_buffer_pool( + trans: *mut GstBaseTransform, + ) -> *mut gst::GstBufferPool; pub fn gst_base_transform_is_in_place(trans: *mut GstBaseTransform) -> gboolean; pub fn gst_base_transform_is_passthrough(trans: *mut GstBaseTransform) -> gboolean; pub fn gst_base_transform_is_qos_enabled(trans: *mut GstBaseTransform) -> gboolean; @@ -1367,49 +1967,144 @@ extern "C" { pub fn gst_base_transform_set_in_place(trans: *mut GstBaseTransform, in_place: gboolean); pub fn gst_base_transform_set_passthrough(trans: *mut GstBaseTransform, passthrough: gboolean); #[cfg(any(feature = "v1_0_1", feature = "dox"))] - pub fn gst_base_transform_set_prefer_passthrough(trans: *mut GstBaseTransform, prefer_passthrough: gboolean); + pub fn gst_base_transform_set_prefer_passthrough( + trans: *mut GstBaseTransform, + prefer_passthrough: gboolean, + ); pub fn gst_base_transform_set_qos_enabled(trans: *mut GstBaseTransform, enabled: gboolean); - pub fn gst_base_transform_update_qos(trans: *mut GstBaseTransform, proportion: c_double, diff: gst::GstClockTimeDiff, timestamp: gst::GstClockTime); + pub fn gst_base_transform_update_qos( + trans: *mut GstBaseTransform, + proportion: c_double, + diff: gst::GstClockTimeDiff, + timestamp: gst::GstClockTime, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_base_transform_update_src_caps(trans: *mut GstBaseTransform, updated_caps: *mut gst::GstCaps) -> gboolean; + pub fn gst_base_transform_update_src_caps( + trans: *mut GstBaseTransform, + updated_caps: *mut gst::GstCaps, + ) -> gboolean; //========================================================================= // GstCollectPads //========================================================================= pub fn gst_collect_pads_get_type() -> GType; pub fn gst_collect_pads_new() -> *mut GstCollectPads; - pub fn gst_collect_pads_add_pad(pads: *mut GstCollectPads, pad: *mut gst::GstPad, size: c_uint, destroy_notify: GstCollectDataDestroyNotify, lock: gboolean) -> *mut GstCollectData; + pub fn gst_collect_pads_add_pad( + pads: *mut GstCollectPads, + pad: *mut gst::GstPad, + size: c_uint, + destroy_notify: GstCollectDataDestroyNotify, + lock: gboolean, + ) -> *mut GstCollectData; pub fn gst_collect_pads_available(pads: *mut GstCollectPads) -> c_uint; - pub fn gst_collect_pads_clip_running_time(pads: *mut GstCollectPads, cdata: *mut GstCollectData, buf: *mut gst::GstBuffer, outbuf: *mut *mut gst::GstBuffer, user_data: gpointer) -> gst::GstFlowReturn; - pub fn gst_collect_pads_event_default(pads: *mut GstCollectPads, data: *mut GstCollectData, event: *mut gst::GstEvent, discard: gboolean) -> gboolean; - pub fn gst_collect_pads_flush(pads: *mut GstCollectPads, data: *mut GstCollectData, size: c_uint) -> c_uint; - pub fn gst_collect_pads_peek(pads: *mut GstCollectPads, data: *mut GstCollectData) -> *mut gst::GstBuffer; - pub fn gst_collect_pads_pop(pads: *mut GstCollectPads, data: *mut GstCollectData) -> *mut gst::GstBuffer; - pub fn gst_collect_pads_query_default(pads: *mut GstCollectPads, data: *mut GstCollectData, query: *mut gst::GstQuery, discard: gboolean) -> gboolean; - pub fn gst_collect_pads_read_buffer(pads: *mut GstCollectPads, data: *mut GstCollectData, size: c_uint) -> *mut gst::GstBuffer; - pub fn gst_collect_pads_remove_pad(pads: *mut GstCollectPads, pad: *mut gst::GstPad) -> gboolean; - pub fn gst_collect_pads_set_buffer_function(pads: *mut GstCollectPads, func: GstCollectPadsBufferFunction, user_data: gpointer); - pub fn gst_collect_pads_set_clip_function(pads: *mut GstCollectPads, clipfunc: GstCollectPadsClipFunction, user_data: gpointer); - pub fn gst_collect_pads_set_compare_function(pads: *mut GstCollectPads, func: GstCollectPadsCompareFunction, user_data: gpointer); - pub fn gst_collect_pads_set_event_function(pads: *mut GstCollectPads, func: GstCollectPadsEventFunction, user_data: gpointer); + pub fn gst_collect_pads_clip_running_time( + pads: *mut GstCollectPads, + cdata: *mut GstCollectData, + buf: *mut gst::GstBuffer, + outbuf: *mut *mut gst::GstBuffer, + user_data: gpointer, + ) -> gst::GstFlowReturn; + pub fn gst_collect_pads_event_default( + pads: *mut GstCollectPads, + data: *mut GstCollectData, + event: *mut gst::GstEvent, + discard: gboolean, + ) -> gboolean; + pub fn gst_collect_pads_flush( + pads: *mut GstCollectPads, + data: *mut GstCollectData, + size: c_uint, + ) -> c_uint; + pub fn gst_collect_pads_peek( + pads: *mut GstCollectPads, + data: *mut GstCollectData, + ) -> *mut gst::GstBuffer; + pub fn gst_collect_pads_pop( + pads: *mut GstCollectPads, + data: *mut GstCollectData, + ) -> *mut gst::GstBuffer; + pub fn gst_collect_pads_query_default( + pads: *mut GstCollectPads, + data: *mut GstCollectData, + query: *mut gst::GstQuery, + discard: gboolean, + ) -> gboolean; + pub fn gst_collect_pads_read_buffer( + pads: *mut GstCollectPads, + data: *mut GstCollectData, + size: c_uint, + ) -> *mut gst::GstBuffer; + pub fn gst_collect_pads_remove_pad( + pads: *mut GstCollectPads, + pad: *mut gst::GstPad, + ) -> gboolean; + pub fn gst_collect_pads_set_buffer_function( + pads: *mut GstCollectPads, + func: GstCollectPadsBufferFunction, + user_data: gpointer, + ); + pub fn gst_collect_pads_set_clip_function( + pads: *mut GstCollectPads, + clipfunc: GstCollectPadsClipFunction, + user_data: gpointer, + ); + pub fn gst_collect_pads_set_compare_function( + pads: *mut GstCollectPads, + func: GstCollectPadsCompareFunction, + user_data: gpointer, + ); + pub fn gst_collect_pads_set_event_function( + pads: *mut GstCollectPads, + func: GstCollectPadsEventFunction, + user_data: gpointer, + ); #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_collect_pads_set_flush_function(pads: *mut GstCollectPads, func: GstCollectPadsFlushFunction, user_data: gpointer); + pub fn gst_collect_pads_set_flush_function( + pads: *mut GstCollectPads, + func: GstCollectPadsFlushFunction, + user_data: gpointer, + ); pub fn gst_collect_pads_set_flushing(pads: *mut GstCollectPads, flushing: gboolean); - pub fn gst_collect_pads_set_function(pads: *mut GstCollectPads, func: GstCollectPadsFunction, user_data: gpointer); - pub fn gst_collect_pads_set_query_function(pads: *mut GstCollectPads, func: GstCollectPadsQueryFunction, user_data: gpointer); - pub fn gst_collect_pads_set_waiting(pads: *mut GstCollectPads, data: *mut GstCollectData, waiting: gboolean); + pub fn gst_collect_pads_set_function( + pads: *mut GstCollectPads, + func: GstCollectPadsFunction, + user_data: gpointer, + ); + pub fn gst_collect_pads_set_query_function( + pads: *mut GstCollectPads, + func: GstCollectPadsQueryFunction, + user_data: gpointer, + ); + pub fn gst_collect_pads_set_waiting( + pads: *mut GstCollectPads, + data: *mut GstCollectData, + waiting: gboolean, + ); #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_collect_pads_src_event_default(pads: *mut GstCollectPads, pad: *mut gst::GstPad, event: *mut gst::GstEvent) -> gboolean; + pub fn gst_collect_pads_src_event_default( + pads: *mut GstCollectPads, + pad: *mut gst::GstPad, + event: *mut gst::GstEvent, + ) -> gboolean; pub fn gst_collect_pads_start(pads: *mut GstCollectPads); pub fn gst_collect_pads_stop(pads: *mut GstCollectPads); - pub fn gst_collect_pads_take_buffer(pads: *mut GstCollectPads, data: *mut GstCollectData, size: c_uint) -> *mut gst::GstBuffer; + pub fn gst_collect_pads_take_buffer( + pads: *mut GstCollectPads, + data: *mut GstCollectData, + size: c_uint, + ) -> *mut gst::GstBuffer; //========================================================================= // GstDataQueue //========================================================================= pub fn gst_data_queue_get_type() -> GType; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_data_queue_new(checkfull: GstDataQueueCheckFullFunction, fullcallback: GstDataQueueFullCallback, emptycallback: GstDataQueueEmptyCallback, checkdata: gpointer) -> *mut GstDataQueue; + pub fn gst_data_queue_new( + checkfull: GstDataQueueCheckFullFunction, + fullcallback: GstDataQueueFullCallback, + emptycallback: GstDataQueueEmptyCallback, + checkdata: gpointer, + ) -> *mut GstDataQueue; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_data_queue_drop_head(queue: *mut GstDataQueue, type_: GType) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] @@ -1423,13 +2118,22 @@ extern "C" { #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_data_queue_limits_changed(queue: *mut GstDataQueue); #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_data_queue_peek(queue: *mut GstDataQueue, item: *mut *mut GstDataQueueItem) -> gboolean; + pub fn gst_data_queue_peek( + queue: *mut GstDataQueue, + item: *mut *mut GstDataQueueItem, + ) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_data_queue_pop(queue: *mut GstDataQueue, item: *mut *mut GstDataQueueItem) -> gboolean; + pub fn gst_data_queue_pop( + queue: *mut GstDataQueue, + item: *mut *mut GstDataQueueItem, + ) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_data_queue_push(queue: *mut GstDataQueue, item: *mut GstDataQueueItem) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_data_queue_push_force(queue: *mut GstDataQueue, item: *mut GstDataQueueItem) -> gboolean; + pub fn gst_data_queue_push_force( + queue: *mut GstDataQueue, + item: *mut GstDataQueueItem, + ) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_data_queue_set_flushing(queue: *mut GstDataQueue, flushing: gboolean); @@ -1442,15 +2146,53 @@ extern "C" { // Other functions //========================================================================= pub fn gst_type_find_helper(src: *mut gst::GstPad, size: u64) -> *mut gst::GstCaps; - pub fn gst_type_find_helper_for_buffer(obj: *mut gst::GstObject, buf: *mut gst::GstBuffer, prob: *mut gst::GstTypeFindProbability) -> *mut gst::GstCaps; + pub fn gst_type_find_helper_for_buffer( + obj: *mut gst::GstObject, + buf: *mut gst::GstBuffer, + prob: *mut gst::GstTypeFindProbability, + ) -> *mut gst::GstCaps; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_type_find_helper_for_buffer_with_extension(obj: *mut gst::GstObject, buf: *mut gst::GstBuffer, extension: *const c_char, prob: *mut gst::GstTypeFindProbability) -> *mut gst::GstCaps; - pub fn gst_type_find_helper_for_data(obj: *mut gst::GstObject, data: *const u8, size: size_t, prob: *mut gst::GstTypeFindProbability) -> *mut gst::GstCaps; + pub fn gst_type_find_helper_for_buffer_with_extension( + obj: *mut gst::GstObject, + buf: *mut gst::GstBuffer, + extension: *const c_char, + prob: *mut gst::GstTypeFindProbability, + ) -> *mut gst::GstCaps; + pub fn gst_type_find_helper_for_data( + obj: *mut gst::GstObject, + data: *const u8, + size: size_t, + prob: *mut gst::GstTypeFindProbability, + ) -> *mut gst::GstCaps; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_type_find_helper_for_data_with_extension(obj: *mut gst::GstObject, data: *const u8, size: size_t, extension: *const c_char, prob: *mut gst::GstTypeFindProbability) -> *mut gst::GstCaps; - pub fn gst_type_find_helper_for_extension(obj: *mut gst::GstObject, extension: *const c_char) -> *mut gst::GstCaps; - pub fn gst_type_find_helper_get_range(obj: *mut gst::GstObject, parent: *mut gst::GstObject, func: GstTypeFindHelperGetRangeFunction, size: u64, extension: *const c_char, prob: *mut gst::GstTypeFindProbability) -> *mut gst::GstCaps; + pub fn gst_type_find_helper_for_data_with_extension( + obj: *mut gst::GstObject, + data: *const u8, + size: size_t, + extension: *const c_char, + prob: *mut gst::GstTypeFindProbability, + ) -> *mut gst::GstCaps; + pub fn gst_type_find_helper_for_extension( + obj: *mut gst::GstObject, + extension: *const c_char, + ) -> *mut gst::GstCaps; + pub fn gst_type_find_helper_get_range( + obj: *mut gst::GstObject, + parent: *mut gst::GstObject, + func: GstTypeFindHelperGetRangeFunction, + size: u64, + extension: *const c_char, + prob: *mut gst::GstTypeFindProbability, + ) -> *mut gst::GstCaps; #[cfg(any(feature = "v1_14_3", feature = "dox"))] - pub fn gst_type_find_helper_get_range_full(obj: *mut gst::GstObject, parent: *mut gst::GstObject, func: GstTypeFindHelperGetRangeFunction, size: u64, extension: *const c_char, caps: *mut *mut gst::GstCaps, prob: *mut gst::GstTypeFindProbability) -> gst::GstFlowReturn; + pub fn gst_type_find_helper_get_range_full( + obj: *mut gst::GstObject, + parent: *mut gst::GstObject, + func: GstTypeFindHelperGetRangeFunction, + size: u64, + extension: *const c_char, + caps: *mut *mut gst::GstCaps, + prob: *mut gst::GstTypeFindProbability, + ) -> gst::GstFlowReturn; } diff --git a/gstreamer-base-sys/tests/abi.rs b/gstreamer-base-sys/tests/abi.rs index e6e2fba26..3197e5c23 100644 --- a/gstreamer-base-sys/tests/abi.rs +++ b/gstreamer-base-sys/tests/abi.rs @@ -5,13 +5,13 @@ extern crate gstreamer_base_sys; extern crate shell_words; extern crate tempdir; +use gstreamer_base_sys::*; use std::env; use std::error::Error; -use std::path::Path; use std::mem::{align_of, size_of}; +use std::path::Path; use std::process::Command; use std::str; -use gstreamer_base_sys::*; static PACKAGES: &[&str] = &["gstreamer-base-1.0"]; @@ -47,8 +47,7 @@ impl Compiler { cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { - return Err(format!("compilation command {:?} failed, {}", - &cmd, status).into()); + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } @@ -77,14 +76,12 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { cmd.args(packages); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {:?} returned {}", - &cmd, out.status).into()); + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } - #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, @@ -115,9 +112,8 @@ impl Results { fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", - self.passed, - self.failed, - self.failed_to_compile) + self.passed, self.failed, self.failed_to_compile + ) } fn expect_total_success(&self) { if self.failed == 0 { @@ -133,24 +129,28 @@ fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!("1", - get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), - "failed to obtain correct constant value for 1"); + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); - eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_value, c_value); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); } } }; @@ -166,24 +166,31 @@ fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!(Layout {size: 1, alignment: 1}, - get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), - "failed to obtain correct layout for char type"); + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); - eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_layout, &c_layout); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); } } }; @@ -203,15 +210,14 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result Result> { @@ -223,50 +229,225 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result(), alignment: align_of::()}), - ("GstAggregatorClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAggregatorPad", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAggregatorPadClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBaseParse", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBaseParseClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBaseParseFrame", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBaseParseFrameFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBaseSink", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBaseSinkClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBaseSrc", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBaseSrcClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBaseSrcFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBaseTransform", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBaseTransformClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBitReader", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBitWriter", Layout {size: size_of::(), alignment: align_of::()}), - ("GstByteReader", Layout {size: size_of::(), alignment: align_of::()}), - ("GstByteWriter", Layout {size: size_of::(), alignment: align_of::()}), - ("GstCollectData", Layout {size: size_of::(), alignment: align_of::()}), - ("GstCollectPads", Layout {size: size_of::(), alignment: align_of::()}), - ("GstCollectPadsClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstCollectPadsStateFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDataQueue", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDataQueueClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDataQueueItem", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDataQueueSize", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPushSrc", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPushSrcClass", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstAggregator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAggregatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAggregatorPad", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAggregatorPadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseParse", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseParseClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseParseFrame", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseParseFrameFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseSink", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseSinkClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseSrc", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseSrcClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseSrcFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseTransform", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseTransformClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBitReader", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBitWriter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstByteReader", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstByteWriter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstCollectData", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstCollectPads", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstCollectPadsClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstCollectPadsStateFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDataQueue", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDataQueueClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDataQueueItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDataQueueSize", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPushSrc", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPushSrcClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ @@ -289,5 +470,3 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(guint) GST_COLLECT_PADS_STATE_NEW_SEGMENT", "4"), ("(guint) GST_COLLECT_PADS_STATE_WAITING", "8"), ]; - - diff --git a/gstreamer-check-sys/build.rs b/gstreamer-check-sys/build.rs index 03b5145fa..2f11b9178 100644 --- a/gstreamer-check-sys/build.rs +++ b/gstreamer-check-sys/build.rs @@ -6,8 +6,8 @@ extern crate pkg_config; use pkg_config::{Config, Error}; use std::env; -use std::io::prelude::*; use std::io; +use std::io::prelude::*; use std::process; fn main() { @@ -48,7 +48,7 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()) + return Ok(()); } let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); @@ -70,8 +70,10 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } for path in library.link_paths.iter() { - println!("cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist")); + println!( + "cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist") + ); } } Ok(()) @@ -85,4 +87,3 @@ fn find() -> Result<(), Error> { Err(err) => Err(err), } } - diff --git a/gstreamer-check-sys/src/lib.rs b/gstreamer-check-sys/src/lib.rs index 79e88a04c..cbc8f0810 100644 --- a/gstreamer-check-sys/src/lib.rs +++ b/gstreamer-check-sys/src/lib.rs @@ -3,24 +3,31 @@ // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] -extern crate libc; extern crate glib_sys as glib; extern crate gobject_sys as gobject; extern crate gstreamer_sys as gst; +extern crate libc; #[allow(unused_imports)] -use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, - c_short, c_ushort, c_long, c_ulong, - c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; +use libc::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, + intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; // Callbacks -pub type GstHarnessPrepareBufferFunc = Option *mut gst::GstBuffer>; -pub type GstHarnessPrepareEventFunc = Option *mut gst::GstEvent>; +pub type GstHarnessPrepareBufferFunc = + Option *mut gst::GstBuffer>; +pub type GstHarnessPrepareEventFunc = + Option *mut gst::GstEvent>; // Records #[repr(C)] @@ -37,12 +44,12 @@ pub struct GstHarness { impl ::std::fmt::Debug for GstHarness { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstHarness @ {:?}", self as *const _)) - .field("element", &self.element) - .field("srcpad", &self.srcpad) - .field("sinkpad", &self.sinkpad) - .field("src_harness", &self.src_harness) - .field("sink_harness", &self.sink_harness) - .finish() + .field("element", &self.element) + .field("srcpad", &self.srcpad) + .field("sinkpad", &self.sinkpad) + .field("src_harness", &self.src_harness) + .field("sink_harness", &self.sink_harness) + .finish() } } @@ -70,8 +77,8 @@ pub struct GstTestClockClass { impl ::std::fmt::Debug for GstTestClockClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTestClockClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -91,8 +98,8 @@ pub struct GstTestClock { impl ::std::fmt::Debug for GstTestClock { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTestClock @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -102,7 +109,14 @@ extern "C" { // GstHarness //========================================================================= #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_add_element_full(h: *mut GstHarness, element: *mut gst::GstElement, hsrc: *mut gst::GstStaticPadTemplate, element_sinkpad_name: *const c_char, hsink: *mut gst::GstStaticPadTemplate, element_srcpad_name: *const c_char); + pub fn gst_harness_add_element_full( + h: *mut GstHarness, + element: *mut gst::GstElement, + hsrc: *mut gst::GstStaticPadTemplate, + element_sinkpad_name: *const c_char, + hsink: *mut gst::GstStaticPadTemplate, + element_srcpad_name: *const c_char, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_add_element_sink_pad(h: *mut GstHarness, sinkpad: *mut gst::GstPad); #[cfg(any(feature = "v1_6", feature = "dox"))] @@ -110,9 +124,21 @@ extern "C" { #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_add_parse(h: *mut GstHarness, launchline: *const c_char); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_add_probe(h: *mut GstHarness, element_name: *const c_char, pad_name: *const c_char, mask: gst::GstPadProbeType, callback: gst::GstPadProbeCallback, user_data: gpointer, destroy_data: glib::GDestroyNotify); + pub fn gst_harness_add_probe( + h: *mut GstHarness, + element_name: *const c_char, + pad_name: *const c_char, + mask: gst::GstPadProbeType, + callback: gst::GstPadProbeCallback, + user_data: gpointer, + destroy_data: glib::GDestroyNotify, + ); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_harness_add_propose_allocation_meta(h: *mut GstHarness, api: GType, params: *const gst::GstStructure); + pub fn gst_harness_add_propose_allocation_meta( + h: *mut GstHarness, + api: GType, + params: *const gst::GstStructure, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_add_sink(h: *mut GstHarness, sink_element_name: *const c_char); #[cfg(any(feature = "v1_6", feature = "dox"))] @@ -120,11 +146,23 @@ extern "C" { #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_add_sink_parse(h: *mut GstHarness, launchline: *const c_char); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_add_src(h: *mut GstHarness, src_element_name: *const c_char, has_clock_wait: gboolean); + pub fn gst_harness_add_src( + h: *mut GstHarness, + src_element_name: *const c_char, + has_clock_wait: gboolean, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_add_src_harness(h: *mut GstHarness, src_harness: *mut GstHarness, has_clock_wait: gboolean); + pub fn gst_harness_add_src_harness( + h: *mut GstHarness, + src_harness: *mut GstHarness, + has_clock_wait: gboolean, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_add_src_parse(h: *mut GstHarness, launchline: *const c_char, has_clock_wait: gboolean); + pub fn gst_harness_add_src_parse( + h: *mut GstHarness, + launchline: *const c_char, + has_clock_wait: gboolean, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_buffers_in_queue(h: *mut GstHarness) -> c_uint; #[cfg(any(feature = "v1_6", feature = "dox"))] @@ -142,11 +180,23 @@ extern "C" { #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_events_received(h: *mut GstHarness) -> c_uint; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_find_element(h: *mut GstHarness, element_name: *const c_char) -> *mut gst::GstElement; + pub fn gst_harness_find_element( + h: *mut GstHarness, + element_name: *const c_char, + ) -> *mut gst::GstElement; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_get(h: *mut GstHarness, element_name: *const c_char, first_property_name: *const c_char, ...); + pub fn gst_harness_get( + h: *mut GstHarness, + element_name: *const c_char, + first_property_name: *const c_char, + ... + ); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_get_allocator(h: *mut GstHarness, allocator: *mut *mut gst::GstAllocator, params: *mut gst::GstAllocationParams); + pub fn gst_harness_get_allocator( + h: *mut GstHarness, + allocator: *mut *mut gst::GstAllocator, + params: *mut gst::GstAllocationParams, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_get_last_pushed_timestamp(h: *mut GstHarness) -> gst::GstClockTime; #[cfg(any(feature = "v1_6", feature = "dox"))] @@ -162,7 +212,10 @@ extern "C" { #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_push(h: *mut GstHarness, buffer: *mut gst::GstBuffer) -> gst::GstFlowReturn; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_push_and_pull(h: *mut GstHarness, buffer: *mut gst::GstBuffer) -> *mut gst::GstBuffer; + pub fn gst_harness_push_and_pull( + h: *mut GstHarness, + buffer: *mut gst::GstBuffer, + ) -> *mut gst::GstBuffer; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_push_event(h: *mut GstHarness, event: *mut gst::GstEvent) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] @@ -170,11 +223,19 @@ extern "C" { #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_push_to_sink(h: *mut GstHarness) -> gst::GstFlowReturn; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_push_upstream_event(h: *mut GstHarness, event: *mut gst::GstEvent) -> gboolean; + pub fn gst_harness_push_upstream_event( + h: *mut GstHarness, + event: *mut gst::GstEvent, + ) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_query_latency(h: *mut GstHarness) -> gst::GstClockTime; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_set(h: *mut GstHarness, element_name: *const c_char, first_property_name: *const c_char, ...); + pub fn gst_harness_set( + h: *mut GstHarness, + element_name: *const c_char, + first_property_name: *const c_char, + ... + ); #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_set_blocking_push_mode(h: *mut GstHarness); #[cfg(any(feature = "v1_6", feature = "dox"))] @@ -186,7 +247,11 @@ extern "C" { #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_set_forwarding(h: *mut GstHarness, forwarding: gboolean); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_set_propose_allocator(h: *mut GstHarness, allocator: *mut gst::GstAllocator, params: *const gst::GstAllocationParams); + pub fn gst_harness_set_propose_allocator( + h: *mut GstHarness, + allocator: *mut gst::GstAllocator, + params: *const gst::GstAllocationParams, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_set_sink_caps(h: *mut GstHarness, caps: *mut gst::GstCaps); #[cfg(any(feature = "v1_6", feature = "dox"))] @@ -202,29 +267,88 @@ extern "C" { #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_sink_push_many(h: *mut GstHarness, pushes: c_int) -> gst::GstFlowReturn; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_src_crank_and_push_many(h: *mut GstHarness, cranks: c_int, pushes: c_int) -> gst::GstFlowReturn; + pub fn gst_harness_src_crank_and_push_many( + h: *mut GstHarness, + cranks: c_int, + pushes: c_int, + ) -> gst::GstFlowReturn; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_src_push_event(h: *mut GstHarness) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_stress_custom_start(h: *mut GstHarness, init: glib::GFunc, callback: glib::GFunc, data: gpointer, sleep: c_ulong) -> *mut GstHarnessThread; + pub fn gst_harness_stress_custom_start( + h: *mut GstHarness, + init: glib::GFunc, + callback: glib::GFunc, + data: gpointer, + sleep: c_ulong, + ) -> *mut GstHarnessThread; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_stress_property_start_full(h: *mut GstHarness, name: *const c_char, value: *const gobject::GValue, sleep: c_ulong) -> *mut GstHarnessThread; + pub fn gst_harness_stress_property_start_full( + h: *mut GstHarness, + name: *const c_char, + value: *const gobject::GValue, + sleep: c_ulong, + ) -> *mut GstHarnessThread; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_stress_push_buffer_start_full(h: *mut GstHarness, caps: *mut gst::GstCaps, segment: *const gst::GstSegment, buf: *mut gst::GstBuffer, sleep: c_ulong) -> *mut GstHarnessThread; + pub fn gst_harness_stress_push_buffer_start_full( + h: *mut GstHarness, + caps: *mut gst::GstCaps, + segment: *const gst::GstSegment, + buf: *mut gst::GstBuffer, + sleep: c_ulong, + ) -> *mut GstHarnessThread; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_stress_push_buffer_with_cb_start_full(h: *mut GstHarness, caps: *mut gst::GstCaps, segment: *const gst::GstSegment, func: GstHarnessPrepareBufferFunc, data: gpointer, notify: glib::GDestroyNotify, sleep: c_ulong) -> *mut GstHarnessThread; + pub fn gst_harness_stress_push_buffer_with_cb_start_full( + h: *mut GstHarness, + caps: *mut gst::GstCaps, + segment: *const gst::GstSegment, + func: GstHarnessPrepareBufferFunc, + data: gpointer, + notify: glib::GDestroyNotify, + sleep: c_ulong, + ) -> *mut GstHarnessThread; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_stress_push_event_start_full(h: *mut GstHarness, event: *mut gst::GstEvent, sleep: c_ulong) -> *mut GstHarnessThread; + pub fn gst_harness_stress_push_event_start_full( + h: *mut GstHarness, + event: *mut gst::GstEvent, + sleep: c_ulong, + ) -> *mut GstHarnessThread; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_harness_stress_push_event_with_cb_start_full(h: *mut GstHarness, func: GstHarnessPrepareEventFunc, data: gpointer, notify: glib::GDestroyNotify, sleep: c_ulong) -> *mut GstHarnessThread; + pub fn gst_harness_stress_push_event_with_cb_start_full( + h: *mut GstHarness, + func: GstHarnessPrepareEventFunc, + data: gpointer, + notify: glib::GDestroyNotify, + sleep: c_ulong, + ) -> *mut GstHarnessThread; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_stress_push_upstream_event_start_full(h: *mut GstHarness, event: *mut gst::GstEvent, sleep: c_ulong) -> *mut GstHarnessThread; + pub fn gst_harness_stress_push_upstream_event_start_full( + h: *mut GstHarness, + event: *mut gst::GstEvent, + sleep: c_ulong, + ) -> *mut GstHarnessThread; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_harness_stress_push_upstream_event_with_cb_start_full(h: *mut GstHarness, func: GstHarnessPrepareEventFunc, data: gpointer, notify: glib::GDestroyNotify, sleep: c_ulong) -> *mut GstHarnessThread; + pub fn gst_harness_stress_push_upstream_event_with_cb_start_full( + h: *mut GstHarness, + func: GstHarnessPrepareEventFunc, + data: gpointer, + notify: glib::GDestroyNotify, + sleep: c_ulong, + ) -> *mut GstHarnessThread; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_stress_requestpad_start_full(h: *mut GstHarness, templ: *mut gst::GstPadTemplate, name: *const c_char, caps: *mut gst::GstCaps, release: gboolean, sleep: c_ulong) -> *mut GstHarnessThread; + pub fn gst_harness_stress_requestpad_start_full( + h: *mut GstHarness, + templ: *mut gst::GstPadTemplate, + name: *const c_char, + caps: *mut gst::GstCaps, + release: gboolean, + sleep: c_ulong, + ) -> *mut GstHarnessThread; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_stress_statechange_start_full(h: *mut GstHarness, sleep: c_ulong) -> *mut GstHarnessThread; + pub fn gst_harness_stress_statechange_start_full( + h: *mut GstHarness, + sleep: c_ulong, + ) -> *mut GstHarnessThread; #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_harness_take_all_data(h: *mut GstHarness, size: *mut size_t) -> *mut u8; #[cfg(any(feature = "v1_14", feature = "dox"))] @@ -248,21 +372,43 @@ extern "C" { #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_use_testclock(h: *mut GstHarness); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_wait_for_clock_id_waits(h: *mut GstHarness, waits: c_uint, timeout: c_uint) -> gboolean; + pub fn gst_harness_wait_for_clock_id_waits( + h: *mut GstHarness, + waits: c_uint, + timeout: c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_new(element_name: *const c_char) -> *mut GstHarness; #[cfg(any(feature = "v1_8", feature = "dox"))] pub fn gst_harness_new_empty() -> *mut GstHarness; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_new_full(element: *mut gst::GstElement, hsrc: *mut gst::GstStaticPadTemplate, element_sinkpad_name: *const c_char, hsink: *mut gst::GstStaticPadTemplate, element_srcpad_name: *const c_char) -> *mut GstHarness; + pub fn gst_harness_new_full( + element: *mut gst::GstElement, + hsrc: *mut gst::GstStaticPadTemplate, + element_sinkpad_name: *const c_char, + hsink: *mut gst::GstStaticPadTemplate, + element_srcpad_name: *const c_char, + ) -> *mut GstHarness; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_new_parse(launchline: *const c_char) -> *mut GstHarness; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_new_with_element(element: *mut gst::GstElement, element_sinkpad_name: *const c_char, element_srcpad_name: *const c_char) -> *mut GstHarness; + pub fn gst_harness_new_with_element( + element: *mut gst::GstElement, + element_sinkpad_name: *const c_char, + element_srcpad_name: *const c_char, + ) -> *mut GstHarness; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_new_with_padnames(element_name: *const c_char, element_sinkpad_name: *const c_char, element_srcpad_name: *const c_char) -> *mut GstHarness; + pub fn gst_harness_new_with_padnames( + element_name: *const c_char, + element_sinkpad_name: *const c_char, + element_srcpad_name: *const c_char, + ) -> *mut GstHarness; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_harness_new_with_templates(element_name: *const c_char, hsrc: *mut gst::GstStaticPadTemplate, hsink: *mut gst::GstStaticPadTemplate) -> *mut GstHarness; + pub fn gst_harness_new_with_templates( + element_name: *const c_char, + hsrc: *mut gst::GstStaticPadTemplate, + hsink: *mut gst::GstStaticPadTemplate, + ) -> *mut GstHarness; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_harness_stress_thread_stop(t: *mut GstHarnessThread) -> c_uint; @@ -275,7 +421,9 @@ extern "C" { #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_test_clock_new_with_start_time(start_time: gst::GstClockTime) -> *mut gst::GstClock; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_test_clock_id_list_get_latest_time(pending_list: *const glib::GList) -> gst::GstClockTime; + pub fn gst_test_clock_id_list_get_latest_time( + pending_list: *const glib::GList, + ) -> gst::GstClockTime; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_test_clock_advance_time(test_clock: *mut GstTestClock, delta: gst::GstClockTimeDiff); #[cfg(any(feature = "v1_8", feature = "dox"))] @@ -287,26 +435,47 @@ extern "C" { #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_test_clock_peek_id_count(test_clock: *mut GstTestClock) -> c_uint; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_test_clock_peek_next_pending_id(test_clock: *mut GstTestClock, pending_id: *mut gst::GstClockID) -> gboolean; + pub fn gst_test_clock_peek_next_pending_id( + test_clock: *mut GstTestClock, + pending_id: *mut gst::GstClockID, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_test_clock_process_id_list(test_clock: *mut GstTestClock, pending_list: *const glib::GList) -> c_uint; + pub fn gst_test_clock_process_id_list( + test_clock: *mut GstTestClock, + pending_list: *const glib::GList, + ) -> c_uint; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_test_clock_process_next_clock_id(test_clock: *mut GstTestClock) -> gst::GstClockID; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_test_clock_set_time(test_clock: *mut GstTestClock, new_time: gst::GstClockTime); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_test_clock_timed_wait_for_multiple_pending_ids(test_clock: *mut GstTestClock, count: c_uint, timeout_ms: c_uint, pending_list: *mut *mut glib::GList) -> gboolean; + pub fn gst_test_clock_timed_wait_for_multiple_pending_ids( + test_clock: *mut GstTestClock, + count: c_uint, + timeout_ms: c_uint, + pending_list: *mut *mut glib::GList, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_test_clock_wait_for_multiple_pending_ids(test_clock: *mut GstTestClock, count: c_uint, pending_list: *mut *mut glib::GList); + pub fn gst_test_clock_wait_for_multiple_pending_ids( + test_clock: *mut GstTestClock, + count: c_uint, + pending_list: *mut *mut glib::GList, + ); #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_test_clock_wait_for_next_pending_id(test_clock: *mut GstTestClock, pending_id: *mut gst::GstClockID); + pub fn gst_test_clock_wait_for_next_pending_id( + test_clock: *mut GstTestClock, + pending_id: *mut gst::GstClockID, + ); #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_test_clock_wait_for_pending_id_count(test_clock: *mut GstTestClock, count: c_uint); //========================================================================= // Other functions //========================================================================= - pub fn gst_consistency_checker_add_pad(consist: *mut GstStreamConsistency, pad: *mut gst::GstPad) -> gboolean; + pub fn gst_consistency_checker_add_pad( + consist: *mut GstStreamConsistency, + pad: *mut gst::GstPad, + ) -> gboolean; pub fn gst_consistency_checker_free(consist: *mut GstStreamConsistency); pub fn gst_consistency_checker_new(pad: *mut gst::GstPad) -> *mut GstStreamConsistency; pub fn gst_consistency_checker_reset(consist: *mut GstStreamConsistency); diff --git a/gstreamer-check-sys/tests/abi.rs b/gstreamer-check-sys/tests/abi.rs index cc232d3d6..dbbf725c0 100644 --- a/gstreamer-check-sys/tests/abi.rs +++ b/gstreamer-check-sys/tests/abi.rs @@ -5,13 +5,13 @@ extern crate gstreamer_check_sys; extern crate shell_words; extern crate tempdir; +use gstreamer_check_sys::*; use std::env; use std::error::Error; -use std::path::Path; use std::mem::{align_of, size_of}; +use std::path::Path; use std::process::Command; use std::str; -use gstreamer_check_sys::*; static PACKAGES: &[&str] = &["gstreamer-check-1.0"]; @@ -47,8 +47,7 @@ impl Compiler { cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { - return Err(format!("compilation command {:?} failed, {}", - &cmd, status).into()); + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } @@ -77,14 +76,12 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { cmd.args(packages); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {:?} returned {}", - &cmd, out.status).into()); + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } - #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, @@ -115,9 +112,8 @@ impl Results { fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", - self.passed, - self.failed, - self.failed_to_compile) + self.passed, self.failed, self.failed_to_compile + ) } fn expect_total_success(&self) { if self.failed == 0 { @@ -133,24 +129,28 @@ fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!("1", - get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), - "failed to obtain correct constant value for 1"); + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); - eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_value, c_value); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); } } }; @@ -166,24 +166,31 @@ fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!(Layout {size: 1, alignment: 1}, - get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), - "failed to obtain correct layout for char type"); + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); - eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_layout, &c_layout); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); } } }; @@ -203,15 +210,14 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result Result> { @@ -223,27 +229,43 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result(), alignment: align_of::()}), - ("GstTestClock", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTestClockClass", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstHarness", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTestClock", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTestClockClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ]; -const RUST_CONSTANTS: &[(&str, &str)] = &[ -]; - - +const RUST_CONSTANTS: &[(&str, &str)] = &[]; diff --git a/gstreamer-editing-services-sys/build.rs b/gstreamer-editing-services-sys/build.rs index 1312ec45c..bfef5d00c 100644 --- a/gstreamer-editing-services-sys/build.rs +++ b/gstreamer-editing-services-sys/build.rs @@ -6,8 +6,8 @@ extern crate pkg_config; use pkg_config::{Config, Error}; use std::env; -use std::io::prelude::*; use std::io; +use std::io::prelude::*; use std::process; fn main() { @@ -44,7 +44,7 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()) + return Ok(()); } let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); @@ -66,8 +66,10 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } for path in library.link_paths.iter() { - println!("cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist")); + println!( + "cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist") + ); } } Ok(()) @@ -81,4 +83,3 @@ fn find() -> Result<(), Error> { Err(err) => Err(err), } } - diff --git a/gstreamer-editing-services-sys/src/lib.rs b/gstreamer-editing-services-sys/src/lib.rs index 1810d6b7e..c448039bb 100644 --- a/gstreamer-editing-services-sys/src/lib.rs +++ b/gstreamer-editing-services-sys/src/lib.rs @@ -3,20 +3,25 @@ // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] -extern crate libc; +extern crate gio_sys as gio; extern crate glib_sys as glib; extern crate gobject_sys as gobject; -extern crate gio_sys as gio; -extern crate gstreamer_sys as gst; extern crate gstreamer_base_sys as gst_base; extern crate gstreamer_pbutils_sys as gst_pbutils; +extern crate gstreamer_sys as gst; +extern crate libc; #[allow(unused_imports)] -use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, - c_short, c_ushort, c_long, c_ulong, - c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; +use libc::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, + intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -162,15 +167,18 @@ pub const GES_VIDEO_TEST_PATTERN_SOLID: GESVideoTestPattern = 17; // Constants pub const GES_META_DESCRIPTION: *const c_char = b"description\0" as *const u8 as *const c_char; -pub const GES_META_FORMATTER_EXTENSION: *const c_char = b"extension\0" as *const u8 as *const c_char; +pub const GES_META_FORMATTER_EXTENSION: *const c_char = + b"extension\0" as *const u8 as *const c_char; pub const GES_META_FORMATTER_MIMETYPE: *const c_char = b"mimetype\0" as *const u8 as *const c_char; pub const GES_META_FORMATTER_NAME: *const c_char = b"name\0" as *const u8 as *const c_char; pub const GES_META_FORMATTER_RANK: *const c_char = b"rank\0" as *const u8 as *const c_char; pub const GES_META_FORMATTER_VERSION: *const c_char = b"version\0" as *const u8 as *const c_char; -pub const GES_META_FORMAT_VERSION: *const c_char = b"format-version\0" as *const u8 as *const c_char; +pub const GES_META_FORMAT_VERSION: *const c_char = + b"format-version\0" as *const u8 as *const c_char; pub const GES_META_VOLUME: *const c_char = b"volume\0" as *const u8 as *const c_char; pub const GES_META_VOLUME_DEFAULT: c_double = 1.000000; -pub const GES_MULTI_FILE_URI_PREFIX: *const c_char = b"multifile://\0" as *const u8 as *const c_char; +pub const GES_MULTI_FILE_URI_PREFIX: *const c_char = + b"multifile://\0" as *const u8 as *const c_char; pub const GES_PADDING: c_int = 4; pub const GES_PADDING_LARGE: c_int = 20; pub const GES_TIMELINE_ELEMENT_NO_LAYER_PRIORITY: u32 = 4294967295; @@ -210,47 +218,77 @@ pub union GESVideoSourceClass_ABI { impl ::std::fmt::Debug for GESVideoSourceClass_ABI { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESVideoSourceClass_ABI @ {:?}", self as *const _)) - .field("_ges_reserved", unsafe { &self._ges_reserved }) - .field("abi", unsafe { &self.abi }) - .finish() + .field("_ges_reserved", unsafe { &self._ges_reserved }) + .field("abi", unsafe { &self.abi }) + .finish() } } // Callbacks -pub type GESCreateElementForGapFunc = Option *mut gst::GstElement>; -pub type GESCreateTrackElementFunc = Option *mut GESTrackElement>; -pub type GESCreateTrackElementsFunc = Option *mut glib::GList>; -pub type GESExtractableCheckId = Option *mut c_char>; -pub type GESFillTrackElementFunc = Option gboolean>; -pub type GESFormatterCanLoadURIMethod = Option gboolean>; -pub type GESFormatterLoadFromURIMethod = Option gboolean>; -pub type GESFormatterSaveToURIMethod = Option gboolean>; -pub type GESMetaForeachFunc = Option; +pub type GESCreateElementForGapFunc = + Option *mut gst::GstElement>; +pub type GESCreateTrackElementFunc = + Option *mut GESTrackElement>; +pub type GESCreateTrackElementsFunc = + Option *mut glib::GList>; +pub type GESExtractableCheckId = + Option *mut c_char>; +pub type GESFillTrackElementFunc = Option< + unsafe extern "C" fn(*mut GESClip, *mut GESTrackElement, *mut gst::GstElement) -> gboolean, +>; +pub type GESFormatterCanLoadURIMethod = Option< + unsafe extern "C" fn(*mut GESFormatter, *const c_char, *mut *mut glib::GError) -> gboolean, +>; +pub type GESFormatterLoadFromURIMethod = Option< + unsafe extern "C" fn( + *mut GESFormatter, + *mut GESTimeline, + *const c_char, + *mut *mut glib::GError, + ) -> gboolean, +>; +pub type GESFormatterSaveToURIMethod = Option< + unsafe extern "C" fn( + *mut GESFormatter, + *mut GESTimeline, + *const c_char, + gboolean, + *mut *mut glib::GError, + ) -> gboolean, +>; +pub type GESMetaForeachFunc = Option< + unsafe extern "C" fn(*const GESMetaContainer, *const c_char, *const gobject::GValue, gpointer), +>; // Records #[repr(C)] #[derive(Copy, Clone)] pub struct GESAssetClass { pub parent: gobject::GObjectClass, - pub start_loading: Option GESAssetLoadingReturn>, - pub extract: Option *mut GESExtractable>, + pub start_loading: Option< + unsafe extern "C" fn(*mut GESAsset, *mut *mut glib::GError) -> GESAssetLoadingReturn, + >, + pub extract: + Option *mut GESExtractable>, pub inform_proxy: Option, pub proxied: Option, - pub request_id_update: Option gboolean>, + pub request_id_update: Option< + unsafe extern "C" fn(*mut GESAsset, *mut *mut c_char, *mut glib::GError) -> gboolean, + >, pub _ges_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GESAssetClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESAssetClass @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("start_loading", &self.start_loading) - .field("extract", &self.extract) - .field("inform_proxy", &self.inform_proxy) - .field("proxied", &self.proxied) - .field("request_id_update", &self.request_id_update) - .field("_ges_reserved", &self._ges_reserved) - .finish() + .field("parent", &self.parent) + .field("start_loading", &self.start_loading) + .field("extract", &self.extract) + .field("inform_proxy", &self.inform_proxy) + .field("proxied", &self.proxied) + .field("request_id_update", &self.request_id_update) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -270,8 +308,8 @@ pub struct GESAudioSourceClass { impl ::std::fmt::Debug for GESAudioSourceClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESAudioSourceClass @ {:?}", self as *const _)) - .field("create_source", &self.create_source) - .finish() + .field("create_source", &self.create_source) + .finish() } } @@ -290,7 +328,7 @@ pub struct GESAudioTestSourceClass { impl ::std::fmt::Debug for GESAudioTestSourceClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESAudioTestSourceClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -309,9 +347,9 @@ pub struct GESAudioTrackClass { impl ::std::fmt::Debug for GESAudioTrackClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESAudioTrackClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("_ges_reserved", &self._ges_reserved) - .finish() + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -330,9 +368,9 @@ pub struct GESAudioTransitionClass { impl ::std::fmt::Debug for GESAudioTransitionClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESAudioTransitionClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("_ges_reserved", &self._ges_reserved) - .finish() + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -351,7 +389,7 @@ pub struct GESAudioUriSourceClass { impl ::std::fmt::Debug for GESAudioUriSourceClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESAudioUriSourceClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -370,7 +408,7 @@ pub struct GESBaseEffectClass { impl ::std::fmt::Debug for GESBaseEffectClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESBaseEffectClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -384,7 +422,7 @@ pub struct GESBaseEffectClipClass { impl ::std::fmt::Debug for GESBaseEffectClipClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESBaseEffectClipClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -407,8 +445,11 @@ pub struct GESBaseTransitionClipClass { impl ::std::fmt::Debug for GESBaseTransitionClipClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GESBaseTransitionClipClass @ {:?}", self as *const _)) - .finish() + f.debug_struct(&format!( + "GESBaseTransitionClipClass @ {:?}", + self as *const _ + )) + .finish() } } @@ -422,18 +463,27 @@ pub type GESBaseTransitionClipPrivate = *mut _GESBaseTransitionClipPrivate; pub struct GESBaseXmlFormatterClass { pub parent: GESFormatterClass, pub content_parser: glib::GMarkupParser, - pub save: Option *mut glib::GString>, + pub save: Option< + unsafe extern "C" fn( + *mut GESFormatter, + *mut GESTimeline, + *mut *mut glib::GError, + ) -> *mut glib::GString, + >, pub _ges_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GESBaseXmlFormatterClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GESBaseXmlFormatterClass @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("content_parser", &self.content_parser) - .field("save", &self.save) - .field("_ges_reserved", &self._ges_reserved) - .finish() + f.debug_struct(&format!( + "GESBaseXmlFormatterClass @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .field("content_parser", &self.content_parser) + .field("save", &self.save) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -452,9 +502,9 @@ pub struct GESClipAssetClass { impl ::std::fmt::Debug for GESClipAssetClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESClipAssetClass @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("_ges_reserved", &self._ges_reserved) - .finish() + .field("parent", &self.parent) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -475,9 +525,9 @@ pub struct GESClipClass { impl ::std::fmt::Debug for GESClipClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESClipClass @ {:?}", self as *const _)) - .field("create_track_element", &self.create_track_element) - .field("create_track_elements", &self.create_track_elements) - .finish() + .field("create_track_element", &self.create_track_element) + .field("create_track_elements", &self.create_track_elements) + .finish() } } @@ -494,9 +544,12 @@ pub struct GESCommandLineFormatterClass { impl ::std::fmt::Debug for GESCommandLineFormatterClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GESCommandLineFormatterClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + f.debug_struct(&format!( + "GESCommandLineFormatterClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() } } @@ -511,11 +564,22 @@ pub struct GESContainerClass { pub parent_class: GESTimelineElementClass, pub child_added: Option, pub child_removed: Option, - pub add_child: Option gboolean>, - pub remove_child: Option gboolean>, + pub add_child: + Option gboolean>, + pub remove_child: + Option gboolean>, pub ungroup: Option *mut glib::GList>, pub group: Option *mut GESContainer>, - pub edit: Option gboolean>, + pub edit: Option< + unsafe extern "C" fn( + *mut GESContainer, + *mut glib::GList, + c_int, + GESEditMode, + GESEdge, + u64, + ) -> gboolean, + >, pub grouping_priority: c_uint, pub _ges_reserved: [gpointer; 20], } @@ -523,14 +587,14 @@ pub struct GESContainerClass { impl ::std::fmt::Debug for GESContainerClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESContainerClass @ {:?}", self as *const _)) - .field("child_added", &self.child_added) - .field("child_removed", &self.child_removed) - .field("add_child", &self.add_child) - .field("remove_child", &self.remove_child) - .field("ungroup", &self.ungroup) - .field("group", &self.group) - .field("edit", &self.edit) - .finish() + .field("child_added", &self.child_added) + .field("child_removed", &self.child_removed) + .field("add_child", &self.add_child) + .field("remove_child", &self.remove_child) + .field("ungroup", &self.ungroup) + .field("group", &self.group) + .field("edit", &self.edit) + .finish() } } @@ -549,9 +613,9 @@ pub struct GESEffectAssetClass { impl ::std::fmt::Debug for GESEffectAssetClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESEffectAssetClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("_ges_reserved", &self._ges_reserved) - .finish() + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -571,7 +635,7 @@ pub struct GESEffectClass { impl ::std::fmt::Debug for GESEffectClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESEffectClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -585,7 +649,7 @@ pub struct GESEffectClipClass { impl ::std::fmt::Debug for GESEffectClipClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESEffectClipClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -607,29 +671,37 @@ pub struct GESExtractableInterface { pub check_id: GESExtractableCheckId, pub can_update_asset: gboolean, pub set_asset: Option, - pub set_asset_full: Option gboolean>, - pub get_parameters_from_id: Option *mut gobject::GParameter>, + pub set_asset_full: + Option gboolean>, + pub get_parameters_from_id: + Option *mut gobject::GParameter>, pub get_id: Option *mut c_char>, pub get_real_extractable_type: Option GType>, - pub register_metas: Option gboolean>, + pub register_metas: Option< + unsafe extern "C" fn( + *mut GESExtractableInterface, + *mut gobject::GObjectClass, + *mut GESAsset, + ) -> gboolean, + >, pub _ges_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GESExtractableInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESExtractableInterface @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("asset_type", &self.asset_type) - .field("check_id", &self.check_id) - .field("can_update_asset", &self.can_update_asset) - .field("set_asset", &self.set_asset) - .field("set_asset_full", &self.set_asset_full) - .field("get_parameters_from_id", &self.get_parameters_from_id) - .field("get_id", &self.get_id) - .field("get_real_extractable_type", &self.get_real_extractable_type) - .field("register_metas", &self.register_metas) - .field("_ges_reserved", &self._ges_reserved) - .finish() + .field("parent", &self.parent) + .field("asset_type", &self.asset_type) + .field("check_id", &self.check_id) + .field("can_update_asset", &self.can_update_asset) + .field("set_asset", &self.set_asset) + .field("set_asset_full", &self.set_asset_full) + .field("get_parameters_from_id", &self.get_parameters_from_id) + .field("get_id", &self.get_id) + .field("get_real_extractable_type", &self.get_real_extractable_type) + .field("register_metas", &self.register_metas) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -652,11 +724,11 @@ pub struct GESFormatterClass { impl ::std::fmt::Debug for GESFormatterClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESFormatterClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("can_load_uri", &self.can_load_uri) - .field("load_from_uri", &self.load_from_uri) - .field("save_to_uri", &self.save_to_uri) - .finish() + .field("parent_class", &self.parent_class) + .field("can_load_uri", &self.can_load_uri) + .field("load_from_uri", &self.load_from_uri) + .field("save_to_uri", &self.save_to_uri) + .finish() } } @@ -675,9 +747,9 @@ pub struct GESGroupClass { impl ::std::fmt::Debug for GESGroupClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESGroupClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("_ges_reserved", &self._ges_reserved) - .finish() + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -696,9 +768,9 @@ pub struct GESImageSourceClass { impl ::std::fmt::Debug for GESImageSourceClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESImageSourceClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("_ges_reserved", &self._ges_reserved) - .finish() + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -720,10 +792,10 @@ pub struct GESLayerClass { impl ::std::fmt::Debug for GESLayerClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESLayerClass @ {:?}", self as *const _)) - .field("get_objects", &self.get_objects) - .field("object_added", &self.object_added) - .field("object_removed", &self.object_removed) - .finish() + .field("get_objects", &self.get_objects) + .field("object_added", &self.object_added) + .field("object_removed", &self.object_removed) + .finish() } } @@ -741,10 +813,13 @@ pub struct GESMetaContainerInterface { impl ::std::fmt::Debug for GESMetaContainerInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GESMetaContainerInterface @ {:?}", self as *const _)) - .field("parent_iface", &self.parent_iface) - .field("_ges_reserved", &self._ges_reserved) - .finish() + f.debug_struct(&format!( + "GESMetaContainerInterface @ {:?}", + self as *const _ + )) + .field("parent_iface", &self.parent_iface) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -758,9 +833,9 @@ pub struct GESMultiFileSourceClass { impl ::std::fmt::Debug for GESMultiFileSourceClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESMultiFileSourceClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("_ges_reserved", &self._ges_reserved) - .finish() + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -779,7 +854,7 @@ pub struct GESOperationClass { impl ::std::fmt::Debug for GESOperationClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESOperationClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -793,7 +868,7 @@ pub struct GESOperationClipClass { impl ::std::fmt::Debug for GESOperationClipClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESOperationClipClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -817,8 +892,8 @@ pub struct GESOverlayClipClass { impl ::std::fmt::Debug for GESOverlayClipClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESOverlayClipClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -837,7 +912,7 @@ pub struct GESPipelineClass { impl ::std::fmt::Debug for GESPipelineClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESPipelineClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -856,7 +931,7 @@ pub struct GESPitiviFormatterClass { impl ::std::fmt::Debug for GESPitiviFormatterClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESPitiviFormatterClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -872,8 +947,12 @@ pub struct GESProjectClass { pub asset_added: Option, pub asset_loading: Option, pub asset_removed: Option, - pub missing_uri: Option *mut c_char>, - pub loading_error: Option gboolean>, + pub missing_uri: Option< + unsafe extern "C" fn(*mut GESProject, *mut glib::GError, *mut GESAsset) -> *mut c_char, + >, + pub loading_error: Option< + unsafe extern "C" fn(*mut GESProject, *mut glib::GError, *mut c_char, GType) -> gboolean, + >, pub loaded: Option gboolean>, pub _ges_reserved: [gpointer; 4], } @@ -881,15 +960,15 @@ pub struct GESProjectClass { impl ::std::fmt::Debug for GESProjectClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESProjectClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("asset_added", &self.asset_added) - .field("asset_loading", &self.asset_loading) - .field("asset_removed", &self.asset_removed) - .field("missing_uri", &self.missing_uri) - .field("loading_error", &self.loading_error) - .field("loaded", &self.loaded) - .field("_ges_reserved", &self._ges_reserved) - .finish() + .field("parent_class", &self.parent_class) + .field("asset_added", &self.asset_added) + .field("asset_loading", &self.asset_loading) + .field("asset_removed", &self.asset_removed) + .field("missing_uri", &self.missing_uri) + .field("loading_error", &self.loading_error) + .field("loaded", &self.loaded) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -908,7 +987,7 @@ pub struct GESSourceClass { impl ::std::fmt::Debug for GESSourceClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESSourceClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -922,7 +1001,7 @@ pub struct GESSourceClipClass { impl ::std::fmt::Debug for GESSourceClipClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESSourceClipClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -946,7 +1025,7 @@ pub struct GESTestClipClass { impl ::std::fmt::Debug for GESTestClipClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTestClipClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -965,8 +1044,8 @@ pub struct GESTextOverlayClass { impl ::std::fmt::Debug for GESTextOverlayClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTextOverlayClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -980,7 +1059,7 @@ pub struct GESTextOverlayClipClass { impl ::std::fmt::Debug for GESTextOverlayClipClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTextOverlayClipClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1003,21 +1082,22 @@ pub struct GESTimelineClass { pub layer_added: Option, pub layer_removed: Option, pub group_added: Option, - pub group_removed: Option, + pub group_removed: + Option, pub _ges_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GESTimelineClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTimelineClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("track_added", &self.track_added) - .field("track_removed", &self.track_removed) - .field("layer_added", &self.layer_added) - .field("layer_removed", &self.layer_removed) - .field("group_added", &self.group_added) - .field("group_removed", &self.group_removed) - .finish() + .field("parent_class", &self.parent_class) + .field("track_added", &self.track_added) + .field("track_removed", &self.track_removed) + .field("layer_added", &self.layer_added) + .field("layer_removed", &self.layer_removed) + .field("group_added", &self.group_added) + .field("group_removed", &self.group_removed) + .finish() } } @@ -1025,11 +1105,16 @@ impl ::std::fmt::Debug for GESTimelineClass { #[derive(Copy, Clone)] pub struct GESTimelineElementClass { pub parent_class: gobject::GInitiallyUnownedClass, - pub set_parent: Option gboolean>, - pub set_start: Option gboolean>, - pub set_inpoint: Option gboolean>, - pub set_duration: Option gboolean>, - pub set_max_duration: Option gboolean>, + pub set_parent: + Option gboolean>, + pub set_start: + Option gboolean>, + pub set_inpoint: + Option gboolean>, + pub set_duration: + Option gboolean>, + pub set_max_duration: + Option gboolean>, pub set_priority: Option gboolean>, pub ripple: Option gboolean>, pub ripple_end: Option gboolean>, @@ -1037,11 +1122,33 @@ pub struct GESTimelineElementClass { pub roll_end: Option gboolean>, pub trim: Option gboolean>, pub deep_copy: Option, - pub paste: Option *mut GESTimelineElement>, - pub list_children_properties: Option *mut *mut gobject::GParamSpec>, - pub lookup_child: Option gboolean>, + pub paste: Option< + unsafe extern "C" fn( + *mut GESTimelineElement, + *mut GESTimelineElement, + gst::GstClockTime, + ) -> *mut GESTimelineElement, + >, + pub list_children_properties: Option< + unsafe extern "C" fn(*mut GESTimelineElement, *mut c_uint) -> *mut *mut gobject::GParamSpec, + >, + pub lookup_child: Option< + unsafe extern "C" fn( + *mut GESTimelineElement, + *const c_char, + *mut *mut gobject::GObject, + *mut *mut gobject::GParamSpec, + ) -> gboolean, + >, pub get_track_types: Option GESTrackType>, - pub set_child_property: Option, + pub set_child_property: Option< + unsafe extern "C" fn( + *mut GESTimelineElement, + *mut gobject::GObject, + *mut gobject::GParamSpec, + *mut gobject::GValue, + ), + >, pub get_layer_priority: Option u32>, pub _ges_reserved: [gpointer; 16], } @@ -1049,26 +1156,26 @@ pub struct GESTimelineElementClass { impl ::std::fmt::Debug for GESTimelineElementClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTimelineElementClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("set_parent", &self.set_parent) - .field("set_start", &self.set_start) - .field("set_inpoint", &self.set_inpoint) - .field("set_duration", &self.set_duration) - .field("set_max_duration", &self.set_max_duration) - .field("set_priority", &self.set_priority) - .field("ripple", &self.ripple) - .field("ripple_end", &self.ripple_end) - .field("roll_start", &self.roll_start) - .field("roll_end", &self.roll_end) - .field("trim", &self.trim) - .field("deep_copy", &self.deep_copy) - .field("paste", &self.paste) - .field("list_children_properties", &self.list_children_properties) - .field("lookup_child", &self.lookup_child) - .field("get_track_types", &self.get_track_types) - .field("set_child_property", &self.set_child_property) - .field("get_layer_priority", &self.get_layer_priority) - .finish() + .field("parent_class", &self.parent_class) + .field("set_parent", &self.set_parent) + .field("set_start", &self.set_start) + .field("set_inpoint", &self.set_inpoint) + .field("set_duration", &self.set_duration) + .field("set_max_duration", &self.set_max_duration) + .field("set_priority", &self.set_priority) + .field("ripple", &self.ripple) + .field("ripple_end", &self.ripple_end) + .field("roll_start", &self.roll_start) + .field("roll_end", &self.roll_end) + .field("trim", &self.trim) + .field("deep_copy", &self.deep_copy) + .field("paste", &self.paste) + .field("list_children_properties", &self.list_children_properties) + .field("lookup_child", &self.lookup_child) + .field("get_track_types", &self.get_track_types) + .field("set_child_property", &self.set_child_property) + .field("get_layer_priority", &self.get_layer_priority) + .finish() } } @@ -1092,7 +1199,7 @@ pub struct GESTitleClipClass { impl ::std::fmt::Debug for GESTitleClipClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTitleClipClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1111,8 +1218,8 @@ pub struct GESTitleSourceClass { impl ::std::fmt::Debug for GESTitleSourceClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTitleSourceClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -1132,8 +1239,8 @@ pub struct GESTrackClass { impl ::std::fmt::Debug for GESTrackClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTrackClass @ {:?}", self as *const _)) - .field("get_mixing_element", &self.get_mixing_element) - .finish() + .field("get_mixing_element", &self.get_mixing_element) + .finish() } } @@ -1146,10 +1253,13 @@ pub struct GESTrackElementAssetClass { impl ::std::fmt::Debug for GESTrackElementAssetClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GESTrackElementAssetClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("_ges_reserved", &self._ges_reserved) - .finish() + f.debug_struct(&format!( + "GESTrackElementAssetClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -1163,26 +1273,36 @@ pub type GESTrackElementAssetPrivate = *mut _GESTrackElementAssetPrivate; pub struct GESTrackElementClass { pub parent_class: GESTimelineElementClass, pub nleobject_factorytype: *const c_char, - pub create_gnl_object: Option *mut gst::GstElement>, + pub create_gnl_object: + Option *mut gst::GstElement>, pub create_element: Option *mut gst::GstElement>, pub active_changed: Option, pub changed: Option, - pub list_children_properties: Option *mut *mut gobject::GParamSpec>, - pub lookup_child: Option gboolean>, + pub list_children_properties: Option< + unsafe extern "C" fn(*mut GESTrackElement, *mut c_uint) -> *mut *mut gobject::GParamSpec, + >, + pub lookup_child: Option< + unsafe extern "C" fn( + *mut GESTrackElement, + *const c_char, + *mut *mut gst::GstElement, + *mut *mut gobject::GParamSpec, + ) -> gboolean, + >, pub _ges_reserved: [gpointer; 20], } impl ::std::fmt::Debug for GESTrackElementClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTrackElementClass @ {:?}", self as *const _)) - .field("nleobject_factorytype", &self.nleobject_factorytype) - .field("create_gnl_object", &self.create_gnl_object) - .field("create_element", &self.create_element) - .field("active_changed", &self.active_changed) - .field("changed", &self.changed) - .field("list_children_properties", &self.list_children_properties) - .field("lookup_child", &self.lookup_child) - .finish() + .field("nleobject_factorytype", &self.nleobject_factorytype) + .field("create_gnl_object", &self.create_gnl_object) + .field("create_element", &self.create_element) + .field("active_changed", &self.active_changed) + .field("changed", &self.changed) + .field("list_children_properties", &self.list_children_properties) + .field("lookup_child", &self.lookup_child) + .finish() } } @@ -1206,7 +1326,7 @@ pub struct GESTransitionClass { impl ::std::fmt::Debug for GESTransitionClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTransitionClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1220,7 +1340,7 @@ pub struct GESTransitionClipClass { impl ::std::fmt::Debug for GESTransitionClipClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTransitionClipClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1240,16 +1360,23 @@ pub struct GESUriClipAssetClass { pub parent_class: GESClipAssetClass, pub discoverer: *mut gst_pbutils::GstDiscoverer, pub sync_discoverer: *mut gst_pbutils::GstDiscoverer, - pub discovered: Option, + pub discovered: Option< + unsafe extern "C" fn( + *mut gst_pbutils::GstDiscoverer, + *mut gst_pbutils::GstDiscovererInfo, + *mut glib::GError, + gpointer, + ), + >, pub _ges_reserved: [gpointer; 3], } impl ::std::fmt::Debug for GESUriClipAssetClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESUriClipAssetClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("discovered", &self.discovered) - .finish() + .field("parent_class", &self.parent_class) + .field("discovered", &self.discovered) + .finish() } } @@ -1268,7 +1395,7 @@ pub struct GESUriClipClass { impl ::std::fmt::Debug for GESUriClipClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESUriClipClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1287,9 +1414,9 @@ pub struct GESUriSourceAssetClass { impl ::std::fmt::Debug for GESUriSourceAssetClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESUriSourceAssetClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("_ges_reserved", &self._ges_reserved) - .finish() + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -1309,9 +1436,9 @@ pub struct GESVideoSourceClass { impl ::std::fmt::Debug for GESVideoSourceClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESVideoSourceClass @ {:?}", self as *const _)) - .field("create_source", &self.create_source) - .field("ABI", &self.ABI) - .finish() + .field("create_source", &self.create_source) + .field("ABI", &self.ABI) + .finish() } } @@ -1323,9 +1450,15 @@ pub struct GESVideoSourceClass_ABI_abi { impl ::std::fmt::Debug for GESVideoSourceClass_ABI_abi { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GESVideoSourceClass_ABI_abi @ {:?}", self as *const _)) - .field("disable_scale_in_compositor", &self.disable_scale_in_compositor) - .finish() + f.debug_struct(&format!( + "GESVideoSourceClass_ABI_abi @ {:?}", + self as *const _ + )) + .field( + "disable_scale_in_compositor", + &self.disable_scale_in_compositor, + ) + .finish() } } @@ -1344,9 +1477,9 @@ pub struct GESVideoTestSourceClass { impl ::std::fmt::Debug for GESVideoTestSourceClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESVideoTestSourceClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("_ges_reserved", &self._ges_reserved) - .finish() + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -1365,9 +1498,9 @@ pub struct GESVideoTrackClass { impl ::std::fmt::Debug for GESVideoTrackClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESVideoTrackClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("_ges_reserved", &self._ges_reserved) - .finish() + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -1386,8 +1519,8 @@ pub struct GESVideoTransitionClass { impl ::std::fmt::Debug for GESVideoTransitionClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESVideoTransitionClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -1406,7 +1539,7 @@ pub struct GESVideoUriSourceClass { impl ::std::fmt::Debug for GESVideoUriSourceClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESVideoUriSourceClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1425,9 +1558,9 @@ pub struct GESXmlFormatterClass { impl ::std::fmt::Debug for GESXmlFormatterClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESXmlFormatterClass @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("_ges_reserved", &self._ges_reserved) - .finish() + .field("parent", &self.parent) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -1448,8 +1581,8 @@ pub struct GESAsset { impl ::std::fmt::Debug for GESAsset { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESAsset @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1464,7 +1597,7 @@ pub struct GESAudioSource { impl ::std::fmt::Debug for GESAudioSource { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESAudioSource @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1479,8 +1612,8 @@ pub struct GESAudioTestSource { impl ::std::fmt::Debug for GESAudioTestSource { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESAudioTestSource @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1495,8 +1628,8 @@ pub struct GESAudioTrack { impl ::std::fmt::Debug for GESAudioTrack { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESAudioTrack @ {:?}", self as *const _)) - .field("parent_instance", &self.parent_instance) - .finish() + .field("parent_instance", &self.parent_instance) + .finish() } } @@ -1511,8 +1644,8 @@ pub struct GESAudioTransition { impl ::std::fmt::Debug for GESAudioTransition { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESAudioTransition @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1528,7 +1661,7 @@ pub struct GESAudioUriSource { impl ::std::fmt::Debug for GESAudioUriSource { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESAudioUriSource @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1543,7 +1676,7 @@ pub struct GESBaseEffect { impl ::std::fmt::Debug for GESBaseEffect { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESBaseEffect @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1558,7 +1691,7 @@ pub struct GESBaseEffectClip { impl ::std::fmt::Debug for GESBaseEffectClip { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESBaseEffectClip @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1573,7 +1706,7 @@ pub struct GESBaseTransitionClip { impl ::std::fmt::Debug for GESBaseTransitionClip { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESBaseTransitionClip @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1588,8 +1721,8 @@ pub struct GESBaseXmlFormatter { impl ::std::fmt::Debug for GESBaseXmlFormatter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESBaseXmlFormatter @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1604,8 +1737,8 @@ pub struct GESClip { impl ::std::fmt::Debug for GESClip { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESClip @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1620,8 +1753,8 @@ pub struct GESClipAsset { impl ::std::fmt::Debug for GESClipAsset { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESClipAsset @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1635,9 +1768,9 @@ pub struct GESCommandLineFormatter { impl ::std::fmt::Debug for GESCommandLineFormatter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESCommandLineFormatter @ {:?}", self as *const _)) - .field("parent_instance", &self.parent_instance) - .field("priv_", &self.priv_) - .finish() + .field("parent_instance", &self.parent_instance) + .field("priv_", &self.priv_) + .finish() } } @@ -1656,12 +1789,12 @@ pub struct GESContainer { impl ::std::fmt::Debug for GESContainer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESContainer @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("children", &self.children) - .field("height", &self.height) - .field("children_control_mode", &self.children_control_mode) - .field("initiated_move", &self.initiated_move) - .finish() + .field("parent", &self.parent) + .field("children", &self.children) + .field("height", &self.height) + .field("children_control_mode", &self.children_control_mode) + .field("initiated_move", &self.initiated_move) + .finish() } } @@ -1676,7 +1809,7 @@ pub struct GESEffect { impl ::std::fmt::Debug for GESEffect { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESEffect @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1691,10 +1824,10 @@ pub struct GESEffectAsset { impl ::std::fmt::Debug for GESEffectAsset { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESEffectAsset @ {:?}", self as *const _)) - .field("parent_instance", &self.parent_instance) - .field("priv_", &self.priv_) - .field("_ges_reserved", &self._ges_reserved) - .finish() + .field("parent_instance", &self.parent_instance) + .field("priv_", &self.priv_) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -1709,7 +1842,7 @@ pub struct GESEffectClip { impl ::std::fmt::Debug for GESEffectClip { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESEffectClip @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1726,8 +1859,8 @@ pub struct GESFormatter { impl ::std::fmt::Debug for GESFormatter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESFormatter @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1742,8 +1875,8 @@ pub struct GESGroup { impl ::std::fmt::Debug for GESGroup { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESGroup @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1759,7 +1892,7 @@ pub struct GESImageSource { impl ::std::fmt::Debug for GESImageSource { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESImageSource @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1777,13 +1910,13 @@ pub struct GESLayer { impl ::std::fmt::Debug for GESLayer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESLayer @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("timeline", &self.timeline) - .field("min_nle_priority", &self.min_nle_priority) - .field("max_nle_priority", &self.max_nle_priority) - .field("priv_", &self.priv_) - .field("_ges_reserved", &self._ges_reserved) - .finish() + .field("parent", &self.parent) + .field("timeline", &self.timeline) + .field("min_nle_priority", &self.min_nle_priority) + .field("max_nle_priority", &self.max_nle_priority) + .field("priv_", &self.priv_) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -1799,7 +1932,7 @@ pub struct GESMultiFileSource { impl ::std::fmt::Debug for GESMultiFileSource { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESMultiFileSource @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1814,7 +1947,7 @@ pub struct GESOperation { impl ::std::fmt::Debug for GESOperation { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESOperation @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1829,7 +1962,7 @@ pub struct GESOperationClip { impl ::std::fmt::Debug for GESOperationClip { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESOperationClip @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1844,7 +1977,7 @@ pub struct GESOverlayClip { impl ::std::fmt::Debug for GESOverlayClip { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESOverlayClip @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1859,7 +1992,7 @@ pub struct GESPipeline { impl ::std::fmt::Debug for GESPipeline { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESPipeline @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1874,8 +2007,8 @@ pub struct GESPitiviFormatter { impl ::std::fmt::Debug for GESPitiviFormatter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESPitiviFormatter @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1890,8 +2023,8 @@ pub struct GESProject { impl ::std::fmt::Debug for GESProject { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESProject @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1906,7 +2039,7 @@ pub struct GESSource { impl ::std::fmt::Debug for GESSource { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESSource @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1921,8 +2054,8 @@ pub struct GESSourceClip { impl ::std::fmt::Debug for GESSourceClip { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESSourceClip @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1937,8 +2070,8 @@ pub struct GESTestClip { impl ::std::fmt::Debug for GESTestClip { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTestClip @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1953,8 +2086,8 @@ pub struct GESTextOverlay { impl ::std::fmt::Debug for GESTextOverlay { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTextOverlay @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1969,8 +2102,8 @@ pub struct GESTextOverlayClip { impl ::std::fmt::Debug for GESTextOverlayClip { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTextOverlayClip @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1987,10 +2120,10 @@ pub struct GESTimeline { impl ::std::fmt::Debug for GESTimeline { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTimeline @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("layers", &self.layers) - .field("tracks", &self.tracks) - .finish() + .field("parent", &self.parent) + .field("layers", &self.layers) + .field("tracks", &self.tracks) + .finish() } } @@ -2014,17 +2147,17 @@ pub struct GESTimelineElement { impl ::std::fmt::Debug for GESTimelineElement { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTimelineElement @ {:?}", self as *const _)) - .field("parent_instance", &self.parent_instance) - .field("parent", &self.parent) - .field("asset", &self.asset) - .field("start", &self.start) - .field("inpoint", &self.inpoint) - .field("duration", &self.duration) - .field("maxduration", &self.maxduration) - .field("priority", &self.priority) - .field("timeline", &self.timeline) - .field("name", &self.name) - .finish() + .field("parent_instance", &self.parent_instance) + .field("parent", &self.parent) + .field("asset", &self.asset) + .field("start", &self.start) + .field("inpoint", &self.inpoint) + .field("duration", &self.duration) + .field("maxduration", &self.maxduration) + .field("priority", &self.priority) + .field("timeline", &self.timeline) + .field("name", &self.name) + .finish() } } @@ -2039,8 +2172,8 @@ pub struct GESTitleClip { impl ::std::fmt::Debug for GESTitleClip { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTitleClip @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -2055,8 +2188,8 @@ pub struct GESTitleSource { impl ::std::fmt::Debug for GESTitleSource { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTitleSource @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -2072,9 +2205,9 @@ pub struct GESTrack { impl ::std::fmt::Debug for GESTrack { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTrack @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("type_", &self.type_) - .finish() + .field("parent", &self.parent) + .field("type_", &self.type_) + .finish() } } @@ -2091,8 +2224,8 @@ pub struct GESTrackElement { impl ::std::fmt::Debug for GESTrackElement { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTrackElement @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -2107,8 +2240,8 @@ pub struct GESTrackElementAsset { impl ::std::fmt::Debug for GESTrackElementAsset { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTrackElementAsset @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -2123,7 +2256,7 @@ pub struct GESTransition { impl ::std::fmt::Debug for GESTransition { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTransition @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -2139,8 +2272,8 @@ pub struct GESTransitionClip { impl ::std::fmt::Debug for GESTransitionClip { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESTransitionClip @ {:?}", self as *const _)) - .field("vtype", &self.vtype) - .finish() + .field("vtype", &self.vtype) + .finish() } } @@ -2155,8 +2288,8 @@ pub struct GESUriClip { impl ::std::fmt::Debug for GESUriClip { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESUriClip @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -2171,8 +2304,8 @@ pub struct GESUriClipAsset { impl ::std::fmt::Debug for GESUriClipAsset { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESUriClipAsset @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -2187,8 +2320,8 @@ pub struct GESUriSourceAsset { impl ::std::fmt::Debug for GESUriSourceAsset { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESUriSourceAsset @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -2203,7 +2336,7 @@ pub struct GESVideoSource { impl ::std::fmt::Debug for GESVideoSource { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESVideoSource @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -2218,7 +2351,7 @@ pub struct GESVideoTestSource { impl ::std::fmt::Debug for GESVideoTestSource { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESVideoTestSource @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -2233,8 +2366,8 @@ pub struct GESVideoTrack { impl ::std::fmt::Debug for GESVideoTrack { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESVideoTrack @ {:?}", self as *const _)) - .field("parent_instance", &self.parent_instance) - .finish() + .field("parent_instance", &self.parent_instance) + .finish() } } @@ -2249,8 +2382,8 @@ pub struct GESVideoTransition { impl ::std::fmt::Debug for GESVideoTransition { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESVideoTransition @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -2266,7 +2399,7 @@ pub struct GESVideoUriSource { impl ::std::fmt::Debug for GESVideoUriSource { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESVideoUriSource @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -2281,10 +2414,10 @@ pub struct GESXmlFormatter { impl ::std::fmt::Debug for GESXmlFormatter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GESXmlFormatter @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("priv_", &self.priv_) - .field("_ges_reserved", &self._ges_reserved) - .finish() + .field("parent", &self.parent) + .field("priv_", &self.priv_) + .field("_ges_reserved", &self._ges_reserved) + .finish() } } @@ -2307,7 +2440,6 @@ impl ::std::fmt::Debug for GESMetaContainer { } } - extern "C" { //========================================================================= @@ -2360,27 +2492,58 @@ extern "C" { //========================================================================= // GESEffectClass //========================================================================= - pub fn ges_effect_class_register_rate_property(klass: *mut GESEffectClass, element_name: *const c_char, property_name: *const c_char) -> gboolean; + pub fn ges_effect_class_register_rate_property( + klass: *mut GESEffectClass, + element_name: *const c_char, + property_name: *const c_char, + ) -> gboolean; //========================================================================= // GESFormatterClass //========================================================================= - pub fn ges_formatter_class_register_metas(klass: *mut GESFormatterClass, name: *const c_char, description: *const c_char, extension: *const c_char, mimetype: *const c_char, version: c_double, rank: gst::GstRank); + pub fn ges_formatter_class_register_metas( + klass: *mut GESFormatterClass, + name: *const c_char, + description: *const c_char, + extension: *const c_char, + mimetype: *const c_char, + version: c_double, + rank: gst::GstRank, + ); //========================================================================= // GESUriClipAssetClass //========================================================================= - pub fn ges_uri_clip_asset_class_set_timeout(klass: *mut GESUriClipAssetClass, timeout: gst::GstClockTime); + pub fn ges_uri_clip_asset_class_set_timeout( + klass: *mut GESUriClipAssetClass, + timeout: gst::GstClockTime, + ); //========================================================================= // GESAsset //========================================================================= pub fn ges_asset_get_type() -> GType; pub fn ges_asset_needs_reload(extractable_type: GType, id: *const c_char) -> gboolean; - pub fn ges_asset_request(extractable_type: GType, id: *const c_char, error: *mut *mut glib::GError) -> *mut GESAsset; - pub fn ges_asset_request_async(extractable_type: GType, id: *const c_char, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); - pub fn ges_asset_request_finish(res: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> *mut GESAsset; - pub fn ges_asset_extract(self_: *mut GESAsset, error: *mut *mut glib::GError) -> *mut GESExtractable; + pub fn ges_asset_request( + extractable_type: GType, + id: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GESAsset; + pub fn ges_asset_request_async( + extractable_type: GType, + id: *const c_char, + cancellable: *mut gio::GCancellable, + callback: gio::GAsyncReadyCallback, + user_data: gpointer, + ); + pub fn ges_asset_request_finish( + res: *mut gio::GAsyncResult, + error: *mut *mut glib::GError, + ) -> *mut GESAsset; + pub fn ges_asset_extract( + self_: *mut GESAsset, + error: *mut *mut glib::GError, + ) -> *mut GESExtractable; #[cfg(any(feature = "v1_8", feature = "dox"))] pub fn ges_asset_get_error(self_: *mut GESAsset) -> *mut glib::GError; pub fn ges_asset_get_extractable_type(self_: *mut GESAsset) -> GType; @@ -2447,17 +2610,37 @@ extern "C" { //========================================================================= pub fn ges_clip_get_type() -> GType; pub fn ges_clip_add_asset(clip: *mut GESClip, asset: *mut GESAsset) -> *mut GESTrackElement; - pub fn ges_clip_find_track_element(clip: *mut GESClip, track: *mut GESTrack, type_: GType) -> *mut GESTrackElement; - pub fn ges_clip_find_track_elements(clip: *mut GESClip, track: *mut GESTrack, track_type: GESTrackType, type_: GType) -> *mut glib::GList; + pub fn ges_clip_find_track_element( + clip: *mut GESClip, + track: *mut GESTrack, + type_: GType, + ) -> *mut GESTrackElement; + pub fn ges_clip_find_track_elements( + clip: *mut GESClip, + track: *mut GESTrack, + track_type: GESTrackType, + type_: GType, + ) -> *mut glib::GList; pub fn ges_clip_get_layer(clip: *mut GESClip) -> *mut GESLayer; pub fn ges_clip_get_supported_formats(clip: *mut GESClip) -> GESTrackType; pub fn ges_clip_get_top_effect_index(clip: *mut GESClip, effect: *mut GESBaseEffect) -> c_int; - pub fn ges_clip_get_top_effect_position(clip: *mut GESClip, effect: *mut GESBaseEffect) -> c_int; + pub fn ges_clip_get_top_effect_position( + clip: *mut GESClip, + effect: *mut GESBaseEffect, + ) -> c_int; pub fn ges_clip_get_top_effects(clip: *mut GESClip) -> *mut glib::GList; pub fn ges_clip_move_to_layer(clip: *mut GESClip, layer: *mut GESLayer) -> gboolean; pub fn ges_clip_set_supported_formats(clip: *mut GESClip, supportedformats: GESTrackType); - pub fn ges_clip_set_top_effect_index(clip: *mut GESClip, effect: *mut GESBaseEffect, newindex: c_uint) -> gboolean; - pub fn ges_clip_set_top_effect_priority(clip: *mut GESClip, effect: *mut GESBaseEffect, newpriority: c_uint) -> gboolean; + pub fn ges_clip_set_top_effect_index( + clip: *mut GESClip, + effect: *mut GESBaseEffect, + newindex: c_uint, + ) -> gboolean; + pub fn ges_clip_set_top_effect_priority( + clip: *mut GESClip, + effect: *mut GESBaseEffect, + newpriority: c_uint, + ) -> gboolean; pub fn ges_clip_split(clip: *mut GESClip, position: u64) -> *mut GESClip; //========================================================================= @@ -2465,24 +2648,49 @@ extern "C" { //========================================================================= pub fn ges_clip_asset_get_type() -> GType; pub fn ges_clip_asset_get_supported_formats(self_: *mut GESClipAsset) -> GESTrackType; - pub fn ges_clip_asset_set_supported_formats(self_: *mut GESClipAsset, supportedformats: GESTrackType); + pub fn ges_clip_asset_set_supported_formats( + self_: *mut GESClipAsset, + supportedformats: GESTrackType, + ); //========================================================================= // GESCommandLineFormatter //========================================================================= pub fn ges_command_line_formatter_get_type() -> GType; - pub fn ges_command_line_formatter_get_help(nargs: c_int, commands: *mut *mut c_char) -> *mut c_char; + pub fn ges_command_line_formatter_get_help( + nargs: c_int, + commands: *mut *mut c_char, + ) -> *mut c_char; //========================================================================= // GESContainer //========================================================================= pub fn ges_container_get_type() -> GType; pub fn ges_container_group(containers: *mut glib::GList) -> *mut GESContainer; - pub fn ges_container_add(container: *mut GESContainer, child: *mut GESTimelineElement) -> gboolean; - pub fn ges_container_edit(container: *mut GESContainer, layers: *mut glib::GList, new_layer_priority: c_int, mode: GESEditMode, edge: GESEdge, position: u64) -> gboolean; - pub fn ges_container_get_children(container: *mut GESContainer, recursive: gboolean) -> *mut glib::GList; - pub fn ges_container_remove(container: *mut GESContainer, child: *mut GESTimelineElement) -> gboolean; - pub fn ges_container_ungroup(container: *mut GESContainer, recursive: gboolean) -> *mut glib::GList; + pub fn ges_container_add( + container: *mut GESContainer, + child: *mut GESTimelineElement, + ) -> gboolean; + pub fn ges_container_edit( + container: *mut GESContainer, + layers: *mut glib::GList, + new_layer_priority: c_int, + mode: GESEditMode, + edge: GESEdge, + position: u64, + ) -> gboolean; + pub fn ges_container_get_children( + container: *mut GESContainer, + recursive: gboolean, + ) -> *mut glib::GList; + pub fn ges_container_remove( + container: *mut GESContainer, + child: *mut GESTimelineElement, + ) -> gboolean; + pub fn ges_container_ungroup( + container: *mut GESContainer, + recursive: gboolean, + ) -> *mut glib::GList; //========================================================================= // GESEffect @@ -2499,17 +2707,37 @@ extern "C" { // GESEffectClip //========================================================================= pub fn ges_effect_clip_get_type() -> GType; - pub fn ges_effect_clip_new(video_bin_description: *const c_char, audio_bin_description: *const c_char) -> *mut GESEffectClip; + pub fn ges_effect_clip_new( + video_bin_description: *const c_char, + audio_bin_description: *const c_char, + ) -> *mut GESEffectClip; //========================================================================= // GESFormatter //========================================================================= pub fn ges_formatter_get_type() -> GType; - pub fn ges_formatter_can_load_uri(uri: *const c_char, error: *mut *mut glib::GError) -> gboolean; - pub fn ges_formatter_can_save_uri(uri: *const c_char, error: *mut *mut glib::GError) -> gboolean; + pub fn ges_formatter_can_load_uri( + uri: *const c_char, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn ges_formatter_can_save_uri( + uri: *const c_char, + error: *mut *mut glib::GError, + ) -> gboolean; pub fn ges_formatter_get_default() -> *mut GESAsset; - pub fn ges_formatter_load_from_uri(formatter: *mut GESFormatter, timeline: *mut GESTimeline, uri: *const c_char, error: *mut *mut glib::GError) -> gboolean; - pub fn ges_formatter_save_to_uri(formatter: *mut GESFormatter, timeline: *mut GESTimeline, uri: *const c_char, overwrite: gboolean, error: *mut *mut glib::GError) -> gboolean; + pub fn ges_formatter_load_from_uri( + formatter: *mut GESFormatter, + timeline: *mut GESTimeline, + uri: *const c_char, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn ges_formatter_save_to_uri( + formatter: *mut GESFormatter, + timeline: *mut GESTimeline, + uri: *const c_char, + overwrite: gboolean, + error: *mut *mut glib::GError, + ) -> gboolean; //========================================================================= // GESGroup @@ -2527,11 +2755,22 @@ extern "C" { //========================================================================= pub fn ges_layer_get_type() -> GType; pub fn ges_layer_new() -> *mut GESLayer; - pub fn ges_layer_add_asset(layer: *mut GESLayer, asset: *mut GESAsset, start: gst::GstClockTime, inpoint: gst::GstClockTime, duration: gst::GstClockTime, track_types: GESTrackType) -> *mut GESClip; + pub fn ges_layer_add_asset( + layer: *mut GESLayer, + asset: *mut GESAsset, + start: gst::GstClockTime, + inpoint: gst::GstClockTime, + duration: gst::GstClockTime, + track_types: GESTrackType, + ) -> *mut GESClip; pub fn ges_layer_add_clip(layer: *mut GESLayer, clip: *mut GESClip) -> gboolean; pub fn ges_layer_get_auto_transition(layer: *mut GESLayer) -> gboolean; pub fn ges_layer_get_clips(layer: *mut GESLayer) -> *mut glib::GList; - pub fn ges_layer_get_clips_in_interval(layer: *mut GESLayer, start: gst::GstClockTime, end: gst::GstClockTime) -> *mut glib::GList; + pub fn ges_layer_get_clips_in_interval( + layer: *mut GESLayer, + start: gst::GstClockTime, + end: gst::GstClockTime, + ) -> *mut glib::GList; pub fn ges_layer_get_duration(layer: *mut GESLayer) -> gst::GstClockTime; pub fn ges_layer_get_priority(layer: *mut GESLayer) -> c_uint; pub fn ges_layer_get_timeline(layer: *mut GESLayer) -> *mut GESTimeline; @@ -2568,16 +2807,37 @@ extern "C" { pub fn ges_pipeline_get_type() -> GType; pub fn ges_pipeline_new() -> *mut GESPipeline; pub fn ges_pipeline_get_mode(pipeline: *mut GESPipeline) -> GESPipelineFlags; - pub fn ges_pipeline_get_thumbnail(self_: *mut GESPipeline, caps: *mut gst::GstCaps) -> *mut gst::GstSample; - pub fn ges_pipeline_get_thumbnail_rgb24(self_: *mut GESPipeline, width: c_int, height: c_int) -> *mut gst::GstSample; + pub fn ges_pipeline_get_thumbnail( + self_: *mut GESPipeline, + caps: *mut gst::GstCaps, + ) -> *mut gst::GstSample; + pub fn ges_pipeline_get_thumbnail_rgb24( + self_: *mut GESPipeline, + width: c_int, + height: c_int, + ) -> *mut gst::GstSample; pub fn ges_pipeline_preview_get_audio_sink(self_: *mut GESPipeline) -> *mut gst::GstElement; pub fn ges_pipeline_preview_get_video_sink(self_: *mut GESPipeline) -> *mut gst::GstElement; pub fn ges_pipeline_preview_set_audio_sink(self_: *mut GESPipeline, sink: *mut gst::GstElement); pub fn ges_pipeline_preview_set_video_sink(self_: *mut GESPipeline, sink: *mut gst::GstElement); - pub fn ges_pipeline_save_thumbnail(self_: *mut GESPipeline, width: c_int, height: c_int, format: *const c_char, location: *const c_char, error: *mut *mut glib::GError) -> gboolean; + pub fn ges_pipeline_save_thumbnail( + self_: *mut GESPipeline, + width: c_int, + height: c_int, + format: *const c_char, + location: *const c_char, + error: *mut *mut glib::GError, + ) -> gboolean; pub fn ges_pipeline_set_mode(pipeline: *mut GESPipeline, mode: GESPipelineFlags) -> gboolean; - pub fn ges_pipeline_set_render_settings(pipeline: *mut GESPipeline, output_uri: *const c_char, profile: *mut gst_pbutils::GstEncodingProfile) -> gboolean; - pub fn ges_pipeline_set_timeline(pipeline: *mut GESPipeline, timeline: *mut GESTimeline) -> gboolean; + pub fn ges_pipeline_set_render_settings( + pipeline: *mut GESPipeline, + output_uri: *const c_char, + profile: *mut gst_pbutils::GstEncodingProfile, + ) -> gboolean; + pub fn ges_pipeline_set_timeline( + pipeline: *mut GESPipeline, + timeline: *mut GESTimeline, + ) -> gboolean; //========================================================================= // GESPitiviFormatter @@ -2591,17 +2851,44 @@ extern "C" { pub fn ges_project_get_type() -> GType; pub fn ges_project_new(uri: *const c_char) -> *mut GESProject; pub fn ges_project_add_asset(project: *mut GESProject, asset: *mut GESAsset) -> gboolean; - pub fn ges_project_add_encoding_profile(project: *mut GESProject, profile: *mut gst_pbutils::GstEncodingProfile) -> gboolean; - pub fn ges_project_create_asset(project: *mut GESProject, id: *const c_char, extractable_type: GType) -> gboolean; - pub fn ges_project_create_asset_sync(project: *mut GESProject, id: *const c_char, extractable_type: GType, error: *mut *mut glib::GError) -> *mut GESAsset; - pub fn ges_project_get_asset(project: *mut GESProject, id: *const c_char, extractable_type: GType) -> *mut GESAsset; + pub fn ges_project_add_encoding_profile( + project: *mut GESProject, + profile: *mut gst_pbutils::GstEncodingProfile, + ) -> gboolean; + pub fn ges_project_create_asset( + project: *mut GESProject, + id: *const c_char, + extractable_type: GType, + ) -> gboolean; + pub fn ges_project_create_asset_sync( + project: *mut GESProject, + id: *const c_char, + extractable_type: GType, + error: *mut *mut glib::GError, + ) -> *mut GESAsset; + pub fn ges_project_get_asset( + project: *mut GESProject, + id: *const c_char, + extractable_type: GType, + ) -> *mut GESAsset; pub fn ges_project_get_loading_assets(project: *mut GESProject) -> *mut glib::GList; pub fn ges_project_get_uri(project: *mut GESProject) -> *mut c_char; pub fn ges_project_list_assets(project: *mut GESProject, filter: GType) -> *mut glib::GList; pub fn ges_project_list_encoding_profiles(project: *mut GESProject) -> *const glib::GList; - pub fn ges_project_load(project: *mut GESProject, timeline: *mut GESTimeline, error: *mut *mut glib::GError) -> gboolean; + pub fn ges_project_load( + project: *mut GESProject, + timeline: *mut GESTimeline, + error: *mut *mut glib::GError, + ) -> gboolean; pub fn ges_project_remove_asset(project: *mut GESProject, asset: *mut GESAsset) -> gboolean; - pub fn ges_project_save(project: *mut GESProject, timeline: *mut GESTimeline, uri: *const c_char, formatter_asset: *mut GESAsset, overwrite: gboolean, error: *mut *mut glib::GError) -> gboolean; + pub fn ges_project_save( + project: *mut GESProject, + timeline: *mut GESTimeline, + uri: *const c_char, + formatter_asset: *mut GESAsset, + overwrite: gboolean, + error: *mut *mut glib::GError, + ) -> gboolean; //========================================================================= // GESSource @@ -2661,7 +2948,10 @@ extern "C" { pub fn ges_text_overlay_clip_get_xpos(self_: *mut GESTextOverlayClip) -> c_double; pub fn ges_text_overlay_clip_get_ypos(self_: *mut GESTextOverlayClip) -> c_double; pub fn ges_text_overlay_clip_set_color(self_: *mut GESTextOverlayClip, color: u32); - pub fn ges_text_overlay_clip_set_font_desc(self_: *mut GESTextOverlayClip, font_desc: *const c_char); + pub fn ges_text_overlay_clip_set_font_desc( + self_: *mut GESTextOverlayClip, + font_desc: *const c_char, + ); pub fn ges_text_overlay_clip_set_halign(self_: *mut GESTextOverlayClip, halign: GESTextHAlign); pub fn ges_text_overlay_clip_set_text(self_: *mut GESTextOverlayClip, text: *const c_char); pub fn ges_text_overlay_clip_set_valign(self_: *mut GESTextOverlayClip, valign: GESTextVAlign); @@ -2674,7 +2964,10 @@ extern "C" { pub fn ges_timeline_get_type() -> GType; pub fn ges_timeline_new() -> *mut GESTimeline; pub fn ges_timeline_new_audio_video() -> *mut GESTimeline; - pub fn ges_timeline_new_from_uri(uri: *const c_char, error: *mut *mut glib::GError) -> *mut GESTimeline; + pub fn ges_timeline_new_from_uri( + uri: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GESTimeline; pub fn ges_timeline_add_layer(timeline: *mut GESTimeline, layer: *mut GESLayer) -> gboolean; pub fn ges_timeline_add_track(timeline: *mut GESTimeline, track: *mut GESTrack) -> gboolean; pub fn ges_timeline_append_layer(timeline: *mut GESTimeline) -> *mut GESLayer; @@ -2682,68 +2975,189 @@ extern "C" { pub fn ges_timeline_commit_sync(timeline: *mut GESTimeline) -> gboolean; pub fn ges_timeline_get_auto_transition(timeline: *mut GESTimeline) -> gboolean; pub fn ges_timeline_get_duration(timeline: *mut GESTimeline) -> gst::GstClockTime; - pub fn ges_timeline_get_element(timeline: *mut GESTimeline, name: *const c_char) -> *mut GESTimelineElement; + pub fn ges_timeline_get_element( + timeline: *mut GESTimeline, + name: *const c_char, + ) -> *mut GESTimelineElement; pub fn ges_timeline_get_groups(timeline: *mut GESTimeline) -> *mut glib::GList; pub fn ges_timeline_get_layer(timeline: *mut GESTimeline, priority: c_uint) -> *mut GESLayer; pub fn ges_timeline_get_layers(timeline: *mut GESTimeline) -> *mut glib::GList; - pub fn ges_timeline_get_pad_for_track(timeline: *mut GESTimeline, track: *mut GESTrack) -> *mut gst::GstPad; + pub fn ges_timeline_get_pad_for_track( + timeline: *mut GESTimeline, + track: *mut GESTrack, + ) -> *mut gst::GstPad; pub fn ges_timeline_get_snapping_distance(timeline: *mut GESTimeline) -> gst::GstClockTime; - pub fn ges_timeline_get_track_for_pad(timeline: *mut GESTimeline, pad: *mut gst::GstPad) -> *mut GESTrack; + pub fn ges_timeline_get_track_for_pad( + timeline: *mut GESTimeline, + pad: *mut gst::GstPad, + ) -> *mut GESTrack; pub fn ges_timeline_get_tracks(timeline: *mut GESTimeline) -> *mut glib::GList; pub fn ges_timeline_is_empty(timeline: *mut GESTimeline) -> gboolean; - pub fn ges_timeline_load_from_uri(timeline: *mut GESTimeline, uri: *const c_char, error: *mut *mut glib::GError) -> gboolean; - pub fn ges_timeline_move_layer(timeline: *mut GESTimeline, layer: *mut GESLayer, new_layer_priority: c_uint) -> gboolean; - pub fn ges_timeline_paste_element(timeline: *mut GESTimeline, element: *mut GESTimelineElement, position: gst::GstClockTime, layer_priority: c_int) -> *mut GESTimelineElement; + pub fn ges_timeline_load_from_uri( + timeline: *mut GESTimeline, + uri: *const c_char, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn ges_timeline_move_layer( + timeline: *mut GESTimeline, + layer: *mut GESLayer, + new_layer_priority: c_uint, + ) -> gboolean; + pub fn ges_timeline_paste_element( + timeline: *mut GESTimeline, + element: *mut GESTimelineElement, + position: gst::GstClockTime, + layer_priority: c_int, + ) -> *mut GESTimelineElement; pub fn ges_timeline_remove_layer(timeline: *mut GESTimeline, layer: *mut GESLayer) -> gboolean; pub fn ges_timeline_remove_track(timeline: *mut GESTimeline, track: *mut GESTrack) -> gboolean; - pub fn ges_timeline_save_to_uri(timeline: *mut GESTimeline, uri: *const c_char, formatter_asset: *mut GESAsset, overwrite: gboolean, error: *mut *mut glib::GError) -> gboolean; + pub fn ges_timeline_save_to_uri( + timeline: *mut GESTimeline, + uri: *const c_char, + formatter_asset: *mut GESAsset, + overwrite: gboolean, + error: *mut *mut glib::GError, + ) -> gboolean; pub fn ges_timeline_set_auto_transition(timeline: *mut GESTimeline, auto_transition: gboolean); - pub fn ges_timeline_set_snapping_distance(timeline: *mut GESTimeline, snapping_distance: gst::GstClockTime); + pub fn ges_timeline_set_snapping_distance( + timeline: *mut GESTimeline, + snapping_distance: gst::GstClockTime, + ); //========================================================================= // GESTimelineElement //========================================================================= pub fn ges_timeline_element_get_type() -> GType; - pub fn ges_timeline_element_add_child_property(self_: *mut GESTimelineElement, pspec: *mut gobject::GParamSpec, child: *mut gobject::GObject) -> gboolean; - pub fn ges_timeline_element_copy(self_: *mut GESTimelineElement, deep: gboolean) -> *mut GESTimelineElement; - pub fn ges_timeline_element_get_child_properties(self_: *mut GESTimelineElement, first_property_name: *const c_char, ...); - pub fn ges_timeline_element_get_child_property(self_: *mut GESTimelineElement, property_name: *const c_char, value: *mut gobject::GValue) -> gboolean; - pub fn ges_timeline_element_get_child_property_by_pspec(self_: *mut GESTimelineElement, pspec: *mut gobject::GParamSpec, value: *mut gobject::GValue); + pub fn ges_timeline_element_add_child_property( + self_: *mut GESTimelineElement, + pspec: *mut gobject::GParamSpec, + child: *mut gobject::GObject, + ) -> gboolean; + pub fn ges_timeline_element_copy( + self_: *mut GESTimelineElement, + deep: gboolean, + ) -> *mut GESTimelineElement; + pub fn ges_timeline_element_get_child_properties( + self_: *mut GESTimelineElement, + first_property_name: *const c_char, + ... + ); + pub fn ges_timeline_element_get_child_property( + self_: *mut GESTimelineElement, + property_name: *const c_char, + value: *mut gobject::GValue, + ) -> gboolean; + pub fn ges_timeline_element_get_child_property_by_pspec( + self_: *mut GESTimelineElement, + pspec: *mut gobject::GParamSpec, + value: *mut gobject::GValue, + ); //pub fn ges_timeline_element_get_child_property_valist(self_: *mut GESTimelineElement, first_property_name: *const c_char, var_args: /*Unimplemented*/va_list); pub fn ges_timeline_element_get_duration(self_: *mut GESTimelineElement) -> gst::GstClockTime; pub fn ges_timeline_element_get_inpoint(self_: *mut GESTimelineElement) -> gst::GstClockTime; pub fn ges_timeline_element_get_layer_priority(self_: *mut GESTimelineElement) -> u32; - pub fn ges_timeline_element_get_max_duration(self_: *mut GESTimelineElement) -> gst::GstClockTime; + pub fn ges_timeline_element_get_max_duration( + self_: *mut GESTimelineElement, + ) -> gst::GstClockTime; pub fn ges_timeline_element_get_name(self_: *mut GESTimelineElement) -> *mut c_char; - pub fn ges_timeline_element_get_parent(self_: *mut GESTimelineElement) -> *mut GESTimelineElement; + pub fn ges_timeline_element_get_parent( + self_: *mut GESTimelineElement, + ) -> *mut GESTimelineElement; pub fn ges_timeline_element_get_priority(self_: *mut GESTimelineElement) -> u32; pub fn ges_timeline_element_get_start(self_: *mut GESTimelineElement) -> gst::GstClockTime; pub fn ges_timeline_element_get_timeline(self_: *mut GESTimelineElement) -> *mut GESTimeline; - pub fn ges_timeline_element_get_toplevel_parent(self_: *mut GESTimelineElement) -> *mut GESTimelineElement; + pub fn ges_timeline_element_get_toplevel_parent( + self_: *mut GESTimelineElement, + ) -> *mut GESTimelineElement; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn ges_timeline_element_get_track_types(self_: *mut GESTimelineElement) -> GESTrackType; - pub fn ges_timeline_element_list_children_properties(self_: *mut GESTimelineElement, n_properties: *mut c_uint) -> *mut *mut gobject::GParamSpec; - pub fn ges_timeline_element_lookup_child(self_: *mut GESTimelineElement, prop_name: *const c_char, child: *mut *mut gobject::GObject, pspec: *mut *mut gobject::GParamSpec) -> gboolean; + pub fn ges_timeline_element_list_children_properties( + self_: *mut GESTimelineElement, + n_properties: *mut c_uint, + ) -> *mut *mut gobject::GParamSpec; + pub fn ges_timeline_element_lookup_child( + self_: *mut GESTimelineElement, + prop_name: *const c_char, + child: *mut *mut gobject::GObject, + pspec: *mut *mut gobject::GParamSpec, + ) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn ges_timeline_element_paste(self_: *mut GESTimelineElement, paste_position: gst::GstClockTime) -> *mut GESTimelineElement; - pub fn ges_timeline_element_remove_child_property(self_: *mut GESTimelineElement, pspec: *mut gobject::GParamSpec) -> gboolean; - pub fn ges_timeline_element_ripple(self_: *mut GESTimelineElement, start: gst::GstClockTime) -> gboolean; - pub fn ges_timeline_element_ripple_end(self_: *mut GESTimelineElement, end: gst::GstClockTime) -> gboolean; - pub fn ges_timeline_element_roll_end(self_: *mut GESTimelineElement, end: gst::GstClockTime) -> gboolean; - pub fn ges_timeline_element_roll_start(self_: *mut GESTimelineElement, start: gst::GstClockTime) -> gboolean; - pub fn ges_timeline_element_set_child_properties(self_: *mut GESTimelineElement, first_property_name: *const c_char, ...); - pub fn ges_timeline_element_set_child_property(self_: *mut GESTimelineElement, property_name: *const c_char, value: *const gobject::GValue) -> gboolean; - pub fn ges_timeline_element_set_child_property_by_pspec(self_: *mut GESTimelineElement, pspec: *mut gobject::GParamSpec, value: *const gobject::GValue); + pub fn ges_timeline_element_paste( + self_: *mut GESTimelineElement, + paste_position: gst::GstClockTime, + ) -> *mut GESTimelineElement; + pub fn ges_timeline_element_remove_child_property( + self_: *mut GESTimelineElement, + pspec: *mut gobject::GParamSpec, + ) -> gboolean; + pub fn ges_timeline_element_ripple( + self_: *mut GESTimelineElement, + start: gst::GstClockTime, + ) -> gboolean; + pub fn ges_timeline_element_ripple_end( + self_: *mut GESTimelineElement, + end: gst::GstClockTime, + ) -> gboolean; + pub fn ges_timeline_element_roll_end( + self_: *mut GESTimelineElement, + end: gst::GstClockTime, + ) -> gboolean; + pub fn ges_timeline_element_roll_start( + self_: *mut GESTimelineElement, + start: gst::GstClockTime, + ) -> gboolean; + pub fn ges_timeline_element_set_child_properties( + self_: *mut GESTimelineElement, + first_property_name: *const c_char, + ... + ); + pub fn ges_timeline_element_set_child_property( + self_: *mut GESTimelineElement, + property_name: *const c_char, + value: *const gobject::GValue, + ) -> gboolean; + pub fn ges_timeline_element_set_child_property_by_pspec( + self_: *mut GESTimelineElement, + pspec: *mut gobject::GParamSpec, + value: *const gobject::GValue, + ); //pub fn ges_timeline_element_set_child_property_valist(self_: *mut GESTimelineElement, first_property_name: *const c_char, var_args: /*Unimplemented*/va_list); - pub fn ges_timeline_element_set_duration(self_: *mut GESTimelineElement, duration: gst::GstClockTime) -> gboolean; - pub fn ges_timeline_element_set_inpoint(self_: *mut GESTimelineElement, inpoint: gst::GstClockTime) -> gboolean; - pub fn ges_timeline_element_set_max_duration(self_: *mut GESTimelineElement, maxduration: gst::GstClockTime) -> gboolean; - pub fn ges_timeline_element_set_name(self_: *mut GESTimelineElement, name: *const c_char) -> gboolean; - pub fn ges_timeline_element_set_parent(self_: *mut GESTimelineElement, parent: *mut GESTimelineElement) -> gboolean; - pub fn ges_timeline_element_set_priority(self_: *mut GESTimelineElement, priority: u32) -> gboolean; - pub fn ges_timeline_element_set_start(self_: *mut GESTimelineElement, start: gst::GstClockTime) -> gboolean; - pub fn ges_timeline_element_set_timeline(self_: *mut GESTimelineElement, timeline: *mut GESTimeline) -> gboolean; - pub fn ges_timeline_element_trim(self_: *mut GESTimelineElement, start: gst::GstClockTime) -> gboolean; + pub fn ges_timeline_element_set_duration( + self_: *mut GESTimelineElement, + duration: gst::GstClockTime, + ) -> gboolean; + pub fn ges_timeline_element_set_inpoint( + self_: *mut GESTimelineElement, + inpoint: gst::GstClockTime, + ) -> gboolean; + pub fn ges_timeline_element_set_max_duration( + self_: *mut GESTimelineElement, + maxduration: gst::GstClockTime, + ) -> gboolean; + pub fn ges_timeline_element_set_name( + self_: *mut GESTimelineElement, + name: *const c_char, + ) -> gboolean; + pub fn ges_timeline_element_set_parent( + self_: *mut GESTimelineElement, + parent: *mut GESTimelineElement, + ) -> gboolean; + pub fn ges_timeline_element_set_priority( + self_: *mut GESTimelineElement, + priority: u32, + ) -> gboolean; + pub fn ges_timeline_element_set_start( + self_: *mut GESTimelineElement, + start: gst::GstClockTime, + ) -> gboolean; + pub fn ges_timeline_element_set_timeline( + self_: *mut GESTimelineElement, + timeline: *mut GESTimeline, + ) -> gboolean; + pub fn ges_timeline_element_trim( + self_: *mut GESTimelineElement, + start: gst::GstClockTime, + ) -> gboolean; //========================================================================= // GESTitleClip @@ -2799,8 +3213,12 @@ extern "C" { pub fn ges_track_get_elements(track: *mut GESTrack) -> *mut glib::GList; pub fn ges_track_get_mixing(track: *mut GESTrack) -> gboolean; pub fn ges_track_get_timeline(track: *mut GESTrack) -> *const GESTimeline; - pub fn ges_track_remove_element(track: *mut GESTrack, object: *mut GESTrackElement) -> gboolean; - pub fn ges_track_set_create_element_for_gap_func(track: *mut GESTrack, func: GESCreateElementForGapFunc); + pub fn ges_track_remove_element(track: *mut GESTrack, object: *mut GESTrackElement) + -> gboolean; + pub fn ges_track_set_create_element_for_gap_func( + track: *mut GESTrack, + func: GESCreateElementForGapFunc, + ); pub fn ges_track_set_mixing(track: *mut GESTrack, mixing: gboolean); pub fn ges_track_set_restriction_caps(track: *mut GESTrack, caps: *const gst::GstCaps); pub fn ges_track_set_timeline(track: *mut GESTrack, timeline: *mut GESTimeline); @@ -2810,14 +3228,43 @@ extern "C" { // GESTrackElement //========================================================================= pub fn ges_track_element_get_type() -> GType; - pub fn ges_track_element_add_children_props(self_: *mut GESTrackElement, element: *mut gst::GstElement, wanted_categories: *mut *const c_char, blacklist: *mut *const c_char, whitelist: *mut *const c_char); - pub fn ges_track_element_edit(object: *mut GESTrackElement, layers: *mut glib::GList, mode: GESEditMode, edge: GESEdge, position: u64) -> gboolean; - pub fn ges_track_element_get_all_control_bindings(trackelement: *mut GESTrackElement) -> *mut glib::GHashTable; - pub fn ges_track_element_get_child_properties(object: *mut GESTrackElement, first_property_name: *const c_char, ...); - pub fn ges_track_element_get_child_property(object: *mut GESTrackElement, property_name: *const c_char, value: *mut gobject::GValue) -> gboolean; - pub fn ges_track_element_get_child_property_by_pspec(object: *mut GESTrackElement, pspec: *mut gobject::GParamSpec, value: *mut gobject::GValue); + pub fn ges_track_element_add_children_props( + self_: *mut GESTrackElement, + element: *mut gst::GstElement, + wanted_categories: *mut *const c_char, + blacklist: *mut *const c_char, + whitelist: *mut *const c_char, + ); + pub fn ges_track_element_edit( + object: *mut GESTrackElement, + layers: *mut glib::GList, + mode: GESEditMode, + edge: GESEdge, + position: u64, + ) -> gboolean; + pub fn ges_track_element_get_all_control_bindings( + trackelement: *mut GESTrackElement, + ) -> *mut glib::GHashTable; + pub fn ges_track_element_get_child_properties( + object: *mut GESTrackElement, + first_property_name: *const c_char, + ... + ); + pub fn ges_track_element_get_child_property( + object: *mut GESTrackElement, + property_name: *const c_char, + value: *mut gobject::GValue, + ) -> gboolean; + pub fn ges_track_element_get_child_property_by_pspec( + object: *mut GESTrackElement, + pspec: *mut gobject::GParamSpec, + value: *mut gobject::GValue, + ); //pub fn ges_track_element_get_child_property_valist(object: *mut GESTrackElement, first_property_name: *const c_char, var_args: /*Unimplemented*/va_list); - pub fn ges_track_element_get_control_binding(object: *mut GESTrackElement, property_name: *const c_char) -> *mut gst::GstControlBinding; + pub fn ges_track_element_get_control_binding( + object: *mut GESTrackElement, + property_name: *const c_char, + ) -> *mut gst::GstControlBinding; pub fn ges_track_element_get_element(object: *mut GESTrackElement) -> *mut gst::GstElement; pub fn ges_track_element_get_gnlobject(object: *mut GESTrackElement) -> *mut gst::GstElement; #[cfg(any(feature = "v1_6", feature = "dox"))] @@ -2825,23 +3272,56 @@ extern "C" { pub fn ges_track_element_get_track(object: *mut GESTrackElement) -> *mut GESTrack; pub fn ges_track_element_get_track_type(object: *mut GESTrackElement) -> GESTrackType; pub fn ges_track_element_is_active(object: *mut GESTrackElement) -> gboolean; - pub fn ges_track_element_list_children_properties(object: *mut GESTrackElement, n_properties: *mut c_uint) -> *mut *mut gobject::GParamSpec; - pub fn ges_track_element_lookup_child(object: *mut GESTrackElement, prop_name: *const c_char, element: *mut *mut gst::GstElement, pspec: *mut *mut gobject::GParamSpec) -> gboolean; - pub fn ges_track_element_remove_control_binding(object: *mut GESTrackElement, property_name: *const c_char) -> gboolean; - pub fn ges_track_element_set_active(object: *mut GESTrackElement, active: gboolean) -> gboolean; - pub fn ges_track_element_set_child_properties(object: *mut GESTrackElement, first_property_name: *const c_char, ...); - pub fn ges_track_element_set_child_property(object: *mut GESTrackElement, property_name: *const c_char, value: *mut gobject::GValue) -> gboolean; - pub fn ges_track_element_set_child_property_by_pspec(object: *mut GESTrackElement, pspec: *mut gobject::GParamSpec, value: *mut gobject::GValue); + pub fn ges_track_element_list_children_properties( + object: *mut GESTrackElement, + n_properties: *mut c_uint, + ) -> *mut *mut gobject::GParamSpec; + pub fn ges_track_element_lookup_child( + object: *mut GESTrackElement, + prop_name: *const c_char, + element: *mut *mut gst::GstElement, + pspec: *mut *mut gobject::GParamSpec, + ) -> gboolean; + pub fn ges_track_element_remove_control_binding( + object: *mut GESTrackElement, + property_name: *const c_char, + ) -> gboolean; + pub fn ges_track_element_set_active(object: *mut GESTrackElement, active: gboolean) + -> gboolean; + pub fn ges_track_element_set_child_properties( + object: *mut GESTrackElement, + first_property_name: *const c_char, + ... + ); + pub fn ges_track_element_set_child_property( + object: *mut GESTrackElement, + property_name: *const c_char, + value: *mut gobject::GValue, + ) -> gboolean; + pub fn ges_track_element_set_child_property_by_pspec( + object: *mut GESTrackElement, + pspec: *mut gobject::GParamSpec, + value: *mut gobject::GValue, + ); //pub fn ges_track_element_set_child_property_valist(object: *mut GESTrackElement, first_property_name: *const c_char, var_args: /*Unimplemented*/va_list); - pub fn ges_track_element_set_control_source(object: *mut GESTrackElement, source: *mut gst::GstControlSource, property_name: *const c_char, binding_type: *const c_char) -> gboolean; + pub fn ges_track_element_set_control_source( + object: *mut GESTrackElement, + source: *mut gst::GstControlSource, + property_name: *const c_char, + binding_type: *const c_char, + ) -> gboolean; pub fn ges_track_element_set_track_type(object: *mut GESTrackElement, type_: GESTrackType); //========================================================================= // GESTrackElementAsset //========================================================================= pub fn ges_track_element_asset_get_type() -> GType; - pub fn ges_track_element_asset_get_track_type(asset: *mut GESTrackElementAsset) -> GESTrackType; - pub fn ges_track_element_asset_set_track_type(asset: *mut GESTrackElementAsset, type_: GESTrackType); + pub fn ges_track_element_asset_get_track_type(asset: *mut GESTrackElementAsset) + -> GESTrackType; + pub fn ges_track_element_asset_set_track_type( + asset: *mut GESTrackElementAsset, + type_: GESTrackType, + ); //========================================================================= // GESTransition @@ -2852,7 +3332,8 @@ extern "C" { // GESTransitionClip //========================================================================= pub fn ges_transition_clip_get_type() -> GType; - pub fn ges_transition_clip_new(vtype: GESVideoStandardTransitionType) -> *mut GESTransitionClip; + pub fn ges_transition_clip_new(vtype: GESVideoStandardTransitionType) + -> *mut GESTransitionClip; pub fn ges_transition_clip_new_for_nick(nick: *mut c_char) -> *mut GESTransitionClip; //========================================================================= @@ -2870,11 +3351,24 @@ extern "C" { // GESUriClipAsset //========================================================================= pub fn ges_uri_clip_asset_get_type() -> GType; - pub fn ges_uri_clip_asset_finish(res: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> *mut GESUriClipAsset; - pub fn ges_uri_clip_asset_new(uri: *const c_char, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); - pub fn ges_uri_clip_asset_request_sync(uri: *const c_char, error: *mut *mut glib::GError) -> *mut GESUriClipAsset; + pub fn ges_uri_clip_asset_finish( + res: *mut gio::GAsyncResult, + error: *mut *mut glib::GError, + ) -> *mut GESUriClipAsset; + pub fn ges_uri_clip_asset_new( + uri: *const c_char, + cancellable: *mut gio::GCancellable, + callback: gio::GAsyncReadyCallback, + user_data: gpointer, + ); + pub fn ges_uri_clip_asset_request_sync( + uri: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GESUriClipAsset; pub fn ges_uri_clip_asset_get_duration(self_: *mut GESUriClipAsset) -> gst::GstClockTime; - pub fn ges_uri_clip_asset_get_info(self_: *const GESUriClipAsset) -> *mut gst_pbutils::GstDiscovererInfo; + pub fn ges_uri_clip_asset_get_info( + self_: *const GESUriClipAsset, + ) -> *mut gst_pbutils::GstDiscovererInfo; pub fn ges_uri_clip_asset_get_stream_assets(self_: *mut GESUriClipAsset) -> *const glib::GList; pub fn ges_uri_clip_asset_is_image(self_: *mut GESUriClipAsset) -> gboolean; @@ -2882,8 +3376,12 @@ extern "C" { // GESUriSourceAsset //========================================================================= pub fn ges_uri_source_asset_get_type() -> GType; - pub fn ges_uri_source_asset_get_filesource_asset(asset: *mut GESUriSourceAsset) -> *const GESUriClipAsset; - pub fn ges_uri_source_asset_get_stream_info(asset: *mut GESUriSourceAsset) -> *mut gst_pbutils::GstDiscovererStreamInfo; + pub fn ges_uri_source_asset_get_filesource_asset( + asset: *mut GESUriSourceAsset, + ) -> *const GESUriClipAsset; + pub fn ges_uri_source_asset_get_stream_info( + asset: *mut GESUriSourceAsset, + ) -> *mut gst_pbutils::GstDiscovererStreamInfo; pub fn ges_uri_source_asset_get_stream_uri(asset: *mut GESUriSourceAsset) -> *const c_char; //========================================================================= @@ -2895,8 +3393,13 @@ extern "C" { // GESVideoTestSource //========================================================================= pub fn ges_video_test_source_get_type() -> GType; - pub fn ges_video_test_source_get_pattern(source: *mut GESVideoTestSource) -> GESVideoTestPattern; - pub fn ges_video_test_source_set_pattern(self_: *mut GESVideoTestSource, pattern: GESVideoTestPattern); + pub fn ges_video_test_source_get_pattern( + source: *mut GESVideoTestSource, + ) -> GESVideoTestPattern; + pub fn ges_video_test_source_set_pattern( + self_: *mut GESVideoTestSource, + pattern: GESVideoTestPattern, + ); //========================================================================= // GESVideoTrack @@ -2910,11 +3413,16 @@ extern "C" { pub fn ges_video_transition_get_type() -> GType; pub fn ges_video_transition_new() -> *mut GESVideoTransition; pub fn ges_video_transition_get_border(self_: *mut GESVideoTransition) -> c_int; - pub fn ges_video_transition_get_transition_type(trans: *mut GESVideoTransition) -> GESVideoStandardTransitionType; + pub fn ges_video_transition_get_transition_type( + trans: *mut GESVideoTransition, + ) -> GESVideoStandardTransitionType; pub fn ges_video_transition_is_inverted(self_: *mut GESVideoTransition) -> gboolean; pub fn ges_video_transition_set_border(self_: *mut GESVideoTransition, value: c_uint); pub fn ges_video_transition_set_inverted(self_: *mut GESVideoTransition, inverted: gboolean); - pub fn ges_video_transition_set_transition_type(self_: *mut GESVideoTransition, type_: GESVideoStandardTransitionType) -> gboolean; + pub fn ges_video_transition_set_transition_type( + self_: *mut GESVideoTransition, + type_: GESVideoStandardTransitionType, + ) -> gboolean; //========================================================================= // GESVideoUriSource @@ -2938,43 +3446,196 @@ extern "C" { // GESMetaContainer //========================================================================= pub fn ges_meta_container_get_type() -> GType; - pub fn ges_meta_container_add_metas_from_string(container: *mut GESMetaContainer, str: *const c_char) -> gboolean; - pub fn ges_meta_container_check_meta_registered(container: *mut GESMetaContainer, meta_item: *const c_char, flags: *mut GESMetaFlag, type_: *mut GType) -> gboolean; - pub fn ges_meta_container_foreach(container: *mut GESMetaContainer, func: GESMetaForeachFunc, user_data: gpointer); - pub fn ges_meta_container_get_boolean(container: *mut GESMetaContainer, meta_item: *const c_char, dest: *mut gboolean) -> gboolean; - pub fn ges_meta_container_get_date(container: *mut GESMetaContainer, meta_item: *const c_char, dest: *mut *mut glib::GDate) -> gboolean; - pub fn ges_meta_container_get_date_time(container: *mut GESMetaContainer, meta_item: *const c_char, dest: *mut *mut gst::GstDateTime) -> gboolean; - pub fn ges_meta_container_get_double(container: *mut GESMetaContainer, meta_item: *const c_char, dest: *mut c_double) -> gboolean; - pub fn ges_meta_container_get_float(container: *mut GESMetaContainer, meta_item: *const c_char, dest: *mut c_float) -> gboolean; - pub fn ges_meta_container_get_int(container: *mut GESMetaContainer, meta_item: *const c_char, dest: *mut c_int) -> gboolean; - pub fn ges_meta_container_get_int64(container: *mut GESMetaContainer, meta_item: *const c_char, dest: *mut i64) -> gboolean; - pub fn ges_meta_container_get_meta(container: *mut GESMetaContainer, key: *const c_char) -> *const gobject::GValue; - pub fn ges_meta_container_get_string(container: *mut GESMetaContainer, meta_item: *const c_char) -> *const c_char; - pub fn ges_meta_container_get_uint(container: *mut GESMetaContainer, meta_item: *const c_char, dest: *mut c_uint) -> gboolean; - pub fn ges_meta_container_get_uint64(container: *mut GESMetaContainer, meta_item: *const c_char, dest: *mut u64) -> gboolean; + pub fn ges_meta_container_add_metas_from_string( + container: *mut GESMetaContainer, + str: *const c_char, + ) -> gboolean; + pub fn ges_meta_container_check_meta_registered( + container: *mut GESMetaContainer, + meta_item: *const c_char, + flags: *mut GESMetaFlag, + type_: *mut GType, + ) -> gboolean; + pub fn ges_meta_container_foreach( + container: *mut GESMetaContainer, + func: GESMetaForeachFunc, + user_data: gpointer, + ); + pub fn ges_meta_container_get_boolean( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut gboolean, + ) -> gboolean; + pub fn ges_meta_container_get_date( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut *mut glib::GDate, + ) -> gboolean; + pub fn ges_meta_container_get_date_time( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut *mut gst::GstDateTime, + ) -> gboolean; + pub fn ges_meta_container_get_double( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut c_double, + ) -> gboolean; + pub fn ges_meta_container_get_float( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut c_float, + ) -> gboolean; + pub fn ges_meta_container_get_int( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut c_int, + ) -> gboolean; + pub fn ges_meta_container_get_int64( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut i64, + ) -> gboolean; + pub fn ges_meta_container_get_meta( + container: *mut GESMetaContainer, + key: *const c_char, + ) -> *const gobject::GValue; + pub fn ges_meta_container_get_string( + container: *mut GESMetaContainer, + meta_item: *const c_char, + ) -> *const c_char; + pub fn ges_meta_container_get_uint( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut c_uint, + ) -> gboolean; + pub fn ges_meta_container_get_uint64( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut u64, + ) -> gboolean; pub fn ges_meta_container_metas_to_string(container: *mut GESMetaContainer) -> *mut c_char; - pub fn ges_meta_container_register_meta(container: *mut GESMetaContainer, flags: GESMetaFlag, meta_item: *const c_char, value: *const gobject::GValue) -> gboolean; - pub fn ges_meta_container_register_meta_boolean(container: *mut GESMetaContainer, flags: GESMetaFlag, meta_item: *const c_char, value: gboolean) -> gboolean; - pub fn ges_meta_container_register_meta_date(container: *mut GESMetaContainer, flags: GESMetaFlag, meta_item: *const c_char, value: *const glib::GDate) -> gboolean; - pub fn ges_meta_container_register_meta_date_time(container: *mut GESMetaContainer, flags: GESMetaFlag, meta_item: *const c_char, value: *const gst::GstDateTime) -> gboolean; - pub fn ges_meta_container_register_meta_double(container: *mut GESMetaContainer, flags: GESMetaFlag, meta_item: *const c_char, value: c_double) -> gboolean; - pub fn ges_meta_container_register_meta_float(container: *mut GESMetaContainer, flags: GESMetaFlag, meta_item: *const c_char, value: c_float) -> gboolean; - pub fn ges_meta_container_register_meta_int(container: *mut GESMetaContainer, flags: GESMetaFlag, meta_item: *const c_char, value: c_int) -> gboolean; - pub fn ges_meta_container_register_meta_int64(container: *mut GESMetaContainer, flags: GESMetaFlag, meta_item: *const c_char, value: i64) -> gboolean; - pub fn ges_meta_container_register_meta_string(container: *mut GESMetaContainer, flags: GESMetaFlag, meta_item: *const c_char, value: *const c_char) -> gboolean; - pub fn ges_meta_container_register_meta_uint(container: *mut GESMetaContainer, flags: GESMetaFlag, meta_item: *const c_char, value: c_uint) -> gboolean; - pub fn ges_meta_container_register_meta_uint64(container: *mut GESMetaContainer, flags: GESMetaFlag, meta_item: *const c_char, value: u64) -> gboolean; - pub fn ges_meta_container_set_boolean(container: *mut GESMetaContainer, meta_item: *const c_char, value: gboolean) -> gboolean; - pub fn ges_meta_container_set_date(container: *mut GESMetaContainer, meta_item: *const c_char, value: *const glib::GDate) -> gboolean; - pub fn ges_meta_container_set_date_time(container: *mut GESMetaContainer, meta_item: *const c_char, value: *const gst::GstDateTime) -> gboolean; - pub fn ges_meta_container_set_double(container: *mut GESMetaContainer, meta_item: *const c_char, value: c_double) -> gboolean; - pub fn ges_meta_container_set_float(container: *mut GESMetaContainer, meta_item: *const c_char, value: c_float) -> gboolean; - pub fn ges_meta_container_set_int(container: *mut GESMetaContainer, meta_item: *const c_char, value: c_int) -> gboolean; - pub fn ges_meta_container_set_int64(container: *mut GESMetaContainer, meta_item: *const c_char, value: i64) -> gboolean; - pub fn ges_meta_container_set_meta(container: *mut GESMetaContainer, meta_item: *const c_char, value: *const gobject::GValue) -> gboolean; - pub fn ges_meta_container_set_string(container: *mut GESMetaContainer, meta_item: *const c_char, value: *const c_char) -> gboolean; - pub fn ges_meta_container_set_uint(container: *mut GESMetaContainer, meta_item: *const c_char, value: c_uint) -> gboolean; - pub fn ges_meta_container_set_uint64(container: *mut GESMetaContainer, meta_item: *const c_char, value: u64) -> gboolean; + pub fn ges_meta_container_register_meta( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: *const gobject::GValue, + ) -> gboolean; + pub fn ges_meta_container_register_meta_boolean( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: gboolean, + ) -> gboolean; + pub fn ges_meta_container_register_meta_date( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: *const glib::GDate, + ) -> gboolean; + pub fn ges_meta_container_register_meta_date_time( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: *const gst::GstDateTime, + ) -> gboolean; + pub fn ges_meta_container_register_meta_double( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: c_double, + ) -> gboolean; + pub fn ges_meta_container_register_meta_float( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: c_float, + ) -> gboolean; + pub fn ges_meta_container_register_meta_int( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: c_int, + ) -> gboolean; + pub fn ges_meta_container_register_meta_int64( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: i64, + ) -> gboolean; + pub fn ges_meta_container_register_meta_string( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: *const c_char, + ) -> gboolean; + pub fn ges_meta_container_register_meta_uint( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: c_uint, + ) -> gboolean; + pub fn ges_meta_container_register_meta_uint64( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: u64, + ) -> gboolean; + pub fn ges_meta_container_set_boolean( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: gboolean, + ) -> gboolean; + pub fn ges_meta_container_set_date( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: *const glib::GDate, + ) -> gboolean; + pub fn ges_meta_container_set_date_time( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: *const gst::GstDateTime, + ) -> gboolean; + pub fn ges_meta_container_set_double( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: c_double, + ) -> gboolean; + pub fn ges_meta_container_set_float( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: c_float, + ) -> gboolean; + pub fn ges_meta_container_set_int( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: c_int, + ) -> gboolean; + pub fn ges_meta_container_set_int64( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: i64, + ) -> gboolean; + pub fn ges_meta_container_set_meta( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: *const gobject::GValue, + ) -> gboolean; + pub fn ges_meta_container_set_string( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: *const c_char, + ) -> gboolean; + pub fn ges_meta_container_set_uint( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: c_uint, + ) -> gboolean; + pub fn ges_meta_container_set_uint64( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: u64, + ) -> gboolean; //========================================================================= // Other functions @@ -2982,14 +3643,26 @@ extern "C" { pub fn ges_add_missing_uri_relocation_uri(uri: *const c_char, recurse: gboolean) -> gboolean; pub fn ges_deinit(); pub fn ges_init() -> gboolean; - pub fn ges_init_check(argc: *mut c_int, argv: *mut *mut *mut c_char, error: *mut *mut glib::GError) -> gboolean; + pub fn ges_init_check( + argc: *mut c_int, + argv: *mut *mut *mut c_char, + error: *mut *mut glib::GError, + ) -> gboolean; pub fn ges_init_get_option_group() -> *mut glib::GOptionGroup; pub fn ges_is_initialized() -> gboolean; pub fn ges_list_assets(filter: GType) -> *mut glib::GList; - pub fn ges_play_sink_convert_frame(playsink: *mut gst::GstElement, caps: *mut gst::GstCaps) -> *mut gst::GstSample; + pub fn ges_play_sink_convert_frame( + playsink: *mut gst::GstElement, + caps: *mut gst::GstCaps, + ) -> *mut gst::GstSample; pub fn ges_pspec_equal(key_spec_1: gconstpointer, key_spec_2: gconstpointer) -> gboolean; pub fn ges_pspec_hash(key_spec: gconstpointer) -> c_uint; pub fn ges_validate_register_action_types() -> gboolean; - pub fn ges_version(major: *mut c_uint, minor: *mut c_uint, micro: *mut c_uint, nano: *mut c_uint); + pub fn ges_version( + major: *mut c_uint, + minor: *mut c_uint, + micro: *mut c_uint, + nano: *mut c_uint, + ); } diff --git a/gstreamer-editing-services-sys/tests/abi.rs b/gstreamer-editing-services-sys/tests/abi.rs index 6b262d17a..05a6dda7a 100644 --- a/gstreamer-editing-services-sys/tests/abi.rs +++ b/gstreamer-editing-services-sys/tests/abi.rs @@ -5,13 +5,13 @@ extern crate gstreamer_editing_services_sys; extern crate shell_words; extern crate tempdir; +use gstreamer_editing_services_sys::*; use std::env; use std::error::Error; -use std::path::Path; use std::mem::{align_of, size_of}; +use std::path::Path; use std::process::Command; use std::str; -use gstreamer_editing_services_sys::*; static PACKAGES: &[&str] = &["gst-editing-services-1.0"]; @@ -47,8 +47,7 @@ impl Compiler { cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { - return Err(format!("compilation command {:?} failed, {}", - &cmd, status).into()); + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } @@ -77,14 +76,12 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { cmd.args(packages); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {:?} returned {}", - &cmd, out.status).into()); + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } - #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, @@ -115,9 +112,8 @@ impl Results { fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", - self.passed, - self.failed, - self.failed_to_compile) + self.passed, self.failed, self.failed_to_compile + ) } fn expect_total_success(&self) { if self.failed == 0 { @@ -133,24 +129,28 @@ fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!("1", - get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), - "failed to obtain correct constant value for 1"); + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); - eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_value, c_value); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); } } }; @@ -166,24 +166,31 @@ fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!(Layout {size: 1, alignment: 1}, - get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), - "failed to obtain correct layout for char type"); + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); - eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_layout, &c_layout); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); } } }; @@ -203,15 +210,14 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result Result> { @@ -223,137 +229,834 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result(), alignment: align_of::()}), - ("GESAssetClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESAssetLoadingReturn", Layout {size: size_of::(), alignment: align_of::()}), - ("GESAudioSource", Layout {size: size_of::(), alignment: align_of::()}), - ("GESAudioSourceClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESAudioTestSource", Layout {size: size_of::(), alignment: align_of::()}), - ("GESAudioTestSourceClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESAudioTrack", Layout {size: size_of::(), alignment: align_of::()}), - ("GESAudioTrackClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESAudioTransition", Layout {size: size_of::(), alignment: align_of::()}), - ("GESAudioTransitionClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESAudioUriSource", Layout {size: size_of::(), alignment: align_of::()}), - ("GESAudioUriSourceClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESBaseEffect", Layout {size: size_of::(), alignment: align_of::()}), - ("GESBaseEffectClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESBaseEffectClip", Layout {size: size_of::(), alignment: align_of::()}), - ("GESBaseEffectClipClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESBaseTransitionClip", Layout {size: size_of::(), alignment: align_of::()}), - ("GESBaseTransitionClipClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESBaseXmlFormatter", Layout {size: size_of::(), alignment: align_of::()}), - ("GESBaseXmlFormatterClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESChildrenControlMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GESClip", Layout {size: size_of::(), alignment: align_of::()}), - ("GESClipAsset", Layout {size: size_of::(), alignment: align_of::()}), - ("GESClipAssetClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESClipClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESCommandLineFormatter", Layout {size: size_of::(), alignment: align_of::()}), - ("GESCommandLineFormatterClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESContainer", Layout {size: size_of::(), alignment: align_of::()}), - ("GESContainerClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESEdge", Layout {size: size_of::(), alignment: align_of::()}), - ("GESEditMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GESEffect", Layout {size: size_of::(), alignment: align_of::()}), - ("GESEffectAsset", Layout {size: size_of::(), alignment: align_of::()}), - ("GESEffectAssetClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESEffectClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESEffectClip", Layout {size: size_of::(), alignment: align_of::()}), - ("GESEffectClipClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESError", Layout {size: size_of::(), alignment: align_of::()}), - ("GESExtractableInterface", Layout {size: size_of::(), alignment: align_of::()}), - ("GESFormatter", Layout {size: size_of::(), alignment: align_of::()}), - ("GESFormatterClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESGroup", Layout {size: size_of::(), alignment: align_of::()}), - ("GESGroupClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESImageSource", Layout {size: size_of::(), alignment: align_of::()}), - ("GESImageSourceClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESLayer", Layout {size: size_of::(), alignment: align_of::()}), - ("GESLayerClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESMetaContainerInterface", Layout {size: size_of::(), alignment: align_of::()}), - ("GESMetaFlag", Layout {size: size_of::(), alignment: align_of::()}), - ("GESMultiFileSource", Layout {size: size_of::(), alignment: align_of::()}), - ("GESMultiFileSourceClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESOperation", Layout {size: size_of::(), alignment: align_of::()}), - ("GESOperationClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESOperationClip", Layout {size: size_of::(), alignment: align_of::()}), - ("GESOperationClipClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESOverlayClip", Layout {size: size_of::(), alignment: align_of::()}), - ("GESOverlayClipClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESPipeline", Layout {size: size_of::(), alignment: align_of::()}), - ("GESPipelineClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESPipelineFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GESPitiviFormatter", Layout {size: size_of::(), alignment: align_of::()}), - ("GESPitiviFormatterClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESProject", Layout {size: size_of::(), alignment: align_of::()}), - ("GESProjectClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESSource", Layout {size: size_of::(), alignment: align_of::()}), - ("GESSourceClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESSourceClip", Layout {size: size_of::(), alignment: align_of::()}), - ("GESSourceClipClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTestClip", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTestClipClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTextHAlign", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTextOverlay", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTextOverlayClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTextOverlayClip", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTextOverlayClipClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTextVAlign", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTimeline", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTimelineClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTimelineElement", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTimelineElementClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTitleClip", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTitleClipClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTitleSource", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTitleSourceClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTrack", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTrackClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTrackElement", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTrackElementAsset", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTrackElementAssetClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTrackElementClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTrackType", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTransition", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTransitionClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTransitionClip", Layout {size: size_of::(), alignment: align_of::()}), - ("GESTransitionClipClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESUriClip", Layout {size: size_of::(), alignment: align_of::()}), - ("GESUriClipAsset", Layout {size: size_of::(), alignment: align_of::()}), - ("GESUriClipAssetClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESUriClipClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESUriSourceAsset", Layout {size: size_of::(), alignment: align_of::()}), - ("GESUriSourceAssetClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESVideoSource", Layout {size: size_of::(), alignment: align_of::()}), - ("GESVideoSourceClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESVideoStandardTransitionType", Layout {size: size_of::(), alignment: align_of::()}), - ("GESVideoTestPattern", Layout {size: size_of::(), alignment: align_of::()}), - ("GESVideoTestSource", Layout {size: size_of::(), alignment: align_of::()}), - ("GESVideoTestSourceClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESVideoTrack", Layout {size: size_of::(), alignment: align_of::()}), - ("GESVideoTrackClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESVideoTransition", Layout {size: size_of::(), alignment: align_of::()}), - ("GESVideoTransitionClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESVideoUriSource", Layout {size: size_of::(), alignment: align_of::()}), - ("GESVideoUriSourceClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GESXmlFormatter", Layout {size: size_of::(), alignment: align_of::()}), - ("GESXmlFormatterClass", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GESAsset", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAssetClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAssetLoadingReturn", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioTestSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioTestSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioTrack", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioTrackClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioTransition", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioTransitionClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioUriSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioUriSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESBaseEffect", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESBaseEffectClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESBaseEffectClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESBaseEffectClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESBaseTransitionClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESBaseTransitionClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESBaseXmlFormatter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESBaseXmlFormatterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESChildrenControlMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESClipAsset", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESClipAssetClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESCommandLineFormatter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESCommandLineFormatterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESContainer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESContainerClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESEdge", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESEditMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESEffect", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESEffectAsset", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESEffectAssetClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESEffectClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESEffectClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESEffectClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESExtractableInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESFormatter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESFormatterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESGroup", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESGroupClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESImageSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESImageSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESLayer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESLayerClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESMetaContainerInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESMetaFlag", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESMultiFileSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESMultiFileSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESOperation", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESOperationClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESOperationClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESOperationClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESOverlayClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESOverlayClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESPipeline", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESPipelineClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESPipelineFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESPitiviFormatter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESPitiviFormatterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESProject", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESProjectClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESSourceClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESSourceClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTestClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTestClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTextHAlign", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTextOverlay", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTextOverlayClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTextOverlayClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTextOverlayClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTextVAlign", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTimeline", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTimelineClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTimelineElement", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTimelineElementClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTitleClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTitleClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTitleSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTitleSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTrack", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTrackClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTrackElement", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTrackElementAsset", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTrackElementAssetClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTrackElementClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTrackType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTransition", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTransitionClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTransitionClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTransitionClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESUriClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESUriClipAsset", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESUriClipAssetClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESUriClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESUriSourceAsset", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESUriSourceAssetClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoStandardTransitionType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoTestPattern", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoTestSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoTestSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoTrack", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoTrackClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoTransition", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoTransitionClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoUriSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoUriSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESXmlFormatter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESXmlFormatterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ @@ -417,8 +1120,14 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("GES_VERSION_MICRO", "0"), ("GES_VERSION_MINOR", "16"), ("GES_VERSION_NANO", "0"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL", "45"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DTL", "46"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL", + "45", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DTL", + "46", + ), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_H", "22"), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_V", "21"), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_D", "65"), @@ -429,66 +1138,186 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_TB", "2"), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_H", "44"), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_V", "43"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BC", "25"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BC", + "25", + ), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BL", "6"), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BR", "5"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_LC", "26"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_RC", "24"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TC", "23"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_LC", + "26", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_RC", + "24", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TC", + "23", + ), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TL", "3"), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TR", "4"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW12", "201"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW12", + "201", + ), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW3", "202"), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW6", "203"), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW9", "204"), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE", "512"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TL", "41"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TR", "42"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIH", "236"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIV", "235"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOH", "214"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOV", "213"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OH", "228"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OV", "227"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PD", "226"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDBL", "246"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDTL", "245"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PV", "225"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TL", + "41", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TR", + "42", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIH", + "236", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIV", + "235", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOH", + "214", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOV", + "213", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OH", + "228", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OV", + "227", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PD", + "226", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDBL", + "246", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDTL", + "245", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PV", + "225", + ), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_B", "233"), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CR", "212"), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CT", "211"), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_L", "234"), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_R", "232"), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_T", "231"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CI", "7"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CO", "8"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CI", + "7", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CO", + "8", + ), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_IRIS_RECT", "101"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DBD", "47"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DD", "48"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DBD", + "47", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DD", + "48", + ), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE", "0"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_FB", "207"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBH", "206"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBV", "205"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_B", "253"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_L", "252"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_R", "254"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_T", "251"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWB", "223"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBL", "242"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBR", "243"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWL", "224"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWR", "222"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWT", "221"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTL", "241"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTR", "244"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_FB", + "207", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBH", + "206", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBV", + "205", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_B", + "253", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_L", + "252", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_R", + "254", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_T", + "251", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWB", + "223", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBL", + "242", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBR", + "243", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWL", + "224", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWR", + "222", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWT", + "221", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTL", + "241", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTR", + "244", + ), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_D", "61"), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_L", "62"), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_R", "64"), ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_U", "63"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_H", "264"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_R", "261"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_U", "262"), - ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_V", "263"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_H", + "264", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_R", + "261", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_U", + "262", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_V", + "263", + ), ("(gint) GES_VIDEO_TEST_CHROMA_ZONE_PLATE", "16"), ("(gint) GES_VIDEO_TEST_GAMUT", "15"), ("(gint) GES_VIDEO_TEST_PATTERN_BLACK", "2"), @@ -508,5 +1337,3 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GES_VIDEO_TEST_PATTERN_WHITE", "3"), ("(gint) GES_VIDEO_TEST_ZONE_PLATE", "14"), ]; - - diff --git a/gstreamer-gl-sys/build.rs b/gstreamer-gl-sys/build.rs index 8ff17ed86..f2dad93e9 100644 --- a/gstreamer-gl-sys/build.rs +++ b/gstreamer-gl-sys/build.rs @@ -6,8 +6,8 @@ extern crate pkg_config; use pkg_config::{Config, Error}; use std::env; -use std::io::prelude::*; use std::io; +use std::io::prelude::*; use std::process; fn main() { @@ -34,7 +34,7 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()) + return Ok(()); } let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); @@ -56,8 +56,10 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } for path in library.link_paths.iter() { - println!("cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist")); + println!( + "cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist") + ); } } Ok(()) @@ -71,4 +73,3 @@ fn find() -> Result<(), Error> { Err(err) => Err(err), } } - diff --git a/gstreamer-gl-sys/src/lib.rs b/gstreamer-gl-sys/src/lib.rs index 2d3811cb6..93bef2ff9 100644 --- a/gstreamer-gl-sys/src/lib.rs +++ b/gstreamer-gl-sys/src/lib.rs @@ -3,23 +3,28 @@ // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] -extern crate libc; extern crate glib_sys as glib; extern crate gobject_sys as gobject; -extern crate gstreamer_sys as gst; extern crate gstreamer_base_sys as gst_base; +extern crate gstreamer_sys as gst; extern crate gstreamer_video_sys as gst_video; +extern crate libc; mod manual; pub use manual::*; #[allow(unused_imports)] -use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, - c_short, c_ushort, c_long, c_ulong, - c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; +use libc::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, + intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -109,12 +114,18 @@ pub const GST_GL_WINDOW_ERROR_OLD_LIBS: GstGLWindowError = 1; pub const GST_GL_WINDOW_ERROR_RESOURCE_UNAVAILABLE: GstGLWindowError = 2; // Constants -pub const GST_BUFFER_POOL_OPTION_GL_SYNC_META: *const c_char = b"GstBufferPoolOptionGLSyncMeta\0" as *const u8 as *const c_char; -pub const GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_2D: *const c_char = b"GstBufferPoolOptionGLTextureTarget2D\0" as *const u8 as *const c_char; -pub const GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_EXTERNAL_OES: *const c_char = b"GstBufferPoolOptionGLTextureTargetExternalOES\0" as *const u8 as *const c_char; -pub const GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_RECTANGLE: *const c_char = b"GstBufferPoolOptionGLTextureTargetRectangle\0" as *const u8 as *const c_char; -pub const GST_CAPS_FEATURE_MEMORY_GL_BUFFER: *const c_char = b"memory:GLBuffer\0" as *const u8 as *const c_char; -pub const GST_CAPS_FEATURE_MEMORY_GL_MEMORY: *const c_char = b"memory:GLMemory\0" as *const u8 as *const c_char; +pub const GST_BUFFER_POOL_OPTION_GL_SYNC_META: *const c_char = + b"GstBufferPoolOptionGLSyncMeta\0" as *const u8 as *const c_char; +pub const GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_2D: *const c_char = + b"GstBufferPoolOptionGLTextureTarget2D\0" as *const u8 as *const c_char; +pub const GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_EXTERNAL_OES: *const c_char = + b"GstBufferPoolOptionGLTextureTargetExternalOES\0" as *const u8 as *const c_char; +pub const GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_RECTANGLE: *const c_char = + b"GstBufferPoolOptionGLTextureTargetRectangle\0" as *const u8 as *const c_char; +pub const GST_CAPS_FEATURE_MEMORY_GL_BUFFER: *const c_char = + b"memory:GLBuffer\0" as *const u8 as *const c_char; +pub const GST_CAPS_FEATURE_MEMORY_GL_MEMORY: *const c_char = + b"memory:GLMemory\0" as *const u8 as *const c_char; pub const GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_ALLOC: c_int = 1; pub const GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_BUFFER: c_int = 16; pub const GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_USER: c_int = 65536; @@ -125,22 +136,33 @@ pub const GST_GL_API_GLES1_NAME: *const c_char = b"gles1\0" as *const u8 as *con pub const GST_GL_API_GLES2_NAME: *const c_char = b"gles2\0" as *const u8 as *const c_char; pub const GST_GL_API_OPENGL3_NAME: *const c_char = b"opengl3\0" as *const u8 as *const c_char; pub const GST_GL_API_OPENGL_NAME: *const c_char = b"opengl\0" as *const u8 as *const c_char; -pub const GST_GL_BASE_MEMORY_ALLOCATOR_NAME: *const c_char = b"GLBaseMemory\0" as *const u8 as *const c_char; +pub const GST_GL_BASE_MEMORY_ALLOCATOR_NAME: *const c_char = + b"GLBaseMemory\0" as *const u8 as *const c_char; pub const GST_GL_BUFFER_ALLOCATOR_NAME: *const c_char = b"GLBuffer\0" as *const u8 as *const c_char; pub const GST_GL_COLOR_CONVERT_FORMATS: *const c_char = b"{ RGBA, RGB, RGBx, BGR, BGRx, BGRA, xRGB, xBGR, ARGB, ABGR, Y444, I420, YV12, Y42B, Y41B, NV12, NV21, YUY2, UYVY, AYUV, VUYA, GRAY8, GRAY16_LE, GRAY16_BE, RGB16, BGR16, ARGB64 }\0" as *const u8 as *const c_char; -pub const GST_GL_CONTEXT_TYPE_CGL: *const c_char = b"gst.gl.context.CGL\0" as *const u8 as *const c_char; -pub const GST_GL_CONTEXT_TYPE_EAGL: *const c_char = b"gst.gl.context.EAGL\0" as *const u8 as *const c_char; -pub const GST_GL_CONTEXT_TYPE_EGL: *const c_char = b"gst.gl.context.EGL\0" as *const u8 as *const c_char; -pub const GST_GL_CONTEXT_TYPE_GLX: *const c_char = b"gst.gl.context.GLX\0" as *const u8 as *const c_char; -pub const GST_GL_CONTEXT_TYPE_WGL: *const c_char = b"gst.gl.context.WGL\0" as *const u8 as *const c_char; -pub const GST_GL_DISPLAY_CONTEXT_TYPE: *const c_char = b"gst.gl.GLDisplay\0" as *const u8 as *const c_char; +pub const GST_GL_CONTEXT_TYPE_CGL: *const c_char = + b"gst.gl.context.CGL\0" as *const u8 as *const c_char; +pub const GST_GL_CONTEXT_TYPE_EAGL: *const c_char = + b"gst.gl.context.EAGL\0" as *const u8 as *const c_char; +pub const GST_GL_CONTEXT_TYPE_EGL: *const c_char = + b"gst.gl.context.EGL\0" as *const u8 as *const c_char; +pub const GST_GL_CONTEXT_TYPE_GLX: *const c_char = + b"gst.gl.context.GLX\0" as *const u8 as *const c_char; +pub const GST_GL_CONTEXT_TYPE_WGL: *const c_char = + b"gst.gl.context.WGL\0" as *const u8 as *const c_char; +pub const GST_GL_DISPLAY_CONTEXT_TYPE: *const c_char = + b"gst.gl.GLDisplay\0" as *const u8 as *const c_char; pub const GST_GL_MEMORY_ALLOCATOR_NAME: *const c_char = b"GLMemory\0" as *const u8 as *const c_char; -pub const GST_GL_MEMORY_PBO_ALLOCATOR_NAME: *const c_char = b"GLMemoryPBO\0" as *const u8 as *const c_char; +pub const GST_GL_MEMORY_PBO_ALLOCATOR_NAME: *const c_char = + b"GLMemoryPBO\0" as *const u8 as *const c_char; pub const GST_GL_MEMORY_VIDEO_FORMATS_STR: *const c_char = b"{ RGBA, BGRA, RGBx, BGRx, ARGB, ABGR, xRGB, xBGR, RGB, BGR, RGB16, BGR16, AYUV, VUYA, I420, YV12, NV12, NV21, YUY2, UYVY, Y41B, Y42B, Y444, GRAY8, GRAY16_LE, GRAY16_BE, ARGB64 }\0" as *const u8 as *const c_char; -pub const GST_GL_RENDERBUFFER_ALLOCATOR_NAME: *const c_char = b"GLRenderbuffer\0" as *const u8 as *const c_char; +pub const GST_GL_RENDERBUFFER_ALLOCATOR_NAME: *const c_char = + b"GLRenderbuffer\0" as *const u8 as *const c_char; pub const GST_GL_TEXTURE_TARGET_2D_STR: *const c_char = b"2D\0" as *const u8 as *const c_char; -pub const GST_GL_TEXTURE_TARGET_EXTERNAL_OES_STR: *const c_char = b"external-oes\0" as *const u8 as *const c_char; -pub const GST_GL_TEXTURE_TARGET_RECTANGLE_STR: *const c_char = b"rectangle\0" as *const u8 as *const c_char; +pub const GST_GL_TEXTURE_TARGET_EXTERNAL_OES_STR: *const c_char = + b"external-oes\0" as *const u8 as *const c_char; +pub const GST_GL_TEXTURE_TARGET_RECTANGLE_STR: *const c_char = + b"rectangle\0" as *const u8 as *const c_char; pub const GST_MAP_GL: c_int = 131072; // Flags @@ -185,17 +207,29 @@ pub const GST_GLSL_PROFILE_COMPATIBILITY: GstGLSLProfile = 4; pub const GST_GLSL_PROFILE_ANY: GstGLSLProfile = 4294967295; // Callbacks -pub type GstGLAllocationParamsCopyFunc = Option; +pub type GstGLAllocationParamsCopyFunc = + Option; pub type GstGLAllocationParamsFreeFunc = Option; pub type GstGLAsyncDebugLogGetMessage = Option *mut c_char>; -pub type GstGLBaseMemoryAllocatorAllocFunction = Option *mut GstGLBaseMemory>; -pub type GstGLBaseMemoryAllocatorCopyFunction = Option *mut GstGLBaseMemory>; -pub type GstGLBaseMemoryAllocatorCreateFunction = Option gboolean>; -pub type GstGLBaseMemoryAllocatorDestroyFunction = Option; -pub type GstGLBaseMemoryAllocatorMapFunction = Option gpointer>; -pub type GstGLBaseMemoryAllocatorUnmapFunction = Option; +pub type GstGLBaseMemoryAllocatorAllocFunction = Option< + unsafe extern "C" fn( + *mut GstGLBaseMemoryAllocator, + *mut GstGLAllocationParams, + ) -> *mut GstGLBaseMemory, +>; +pub type GstGLBaseMemoryAllocatorCopyFunction = + Option *mut GstGLBaseMemory>; +pub type GstGLBaseMemoryAllocatorCreateFunction = + Option gboolean>; +pub type GstGLBaseMemoryAllocatorDestroyFunction = + Option; +pub type GstGLBaseMemoryAllocatorMapFunction = + Option gpointer>; +pub type GstGLBaseMemoryAllocatorUnmapFunction = + Option; pub type GstGLContextThreadFunc = Option; -pub type GstGLFilterRenderFunc = Option gboolean>; +pub type GstGLFilterRenderFunc = + Option gboolean>; pub type GstGLFramebufferFunc = Option gboolean>; pub type GstGLWindowCB = Option; pub type GstGLWindowResizeCB = Option; @@ -221,18 +255,18 @@ pub struct GstGLAllocationParams { impl ::std::fmt::Debug for GstGLAllocationParams { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLAllocationParams @ {:?}", self as *const _)) - .field("struct_size", &self.struct_size) - .field("copy", &self.copy) - .field("free", &self.free) - .field("alloc_flags", &self.alloc_flags) - .field("alloc_size", &self.alloc_size) - .field("alloc_params", &self.alloc_params) - .field("context", &self.context) - .field("notify", &self.notify) - .field("user_data", &self.user_data) - .field("wrapped_data", &self.wrapped_data) - .field("gl_handle", &self.gl_handle) - .finish() + .field("struct_size", &self.struct_size) + .field("copy", &self.copy) + .field("free", &self.free) + .field("alloc_flags", &self.alloc_flags) + .field("alloc_size", &self.alloc_size) + .field("alloc_params", &self.alloc_params) + .field("context", &self.context) + .field("notify", &self.notify) + .field("user_data", &self.user_data) + .field("wrapped_data", &self.wrapped_data) + .field("gl_handle", &self.gl_handle) + .finish() } } @@ -256,7 +290,7 @@ pub struct GstGLAsyncDebug { impl ::std::fmt::Debug for GstGLAsyncDebug { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLAsyncDebug @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -267,19 +301,25 @@ pub struct GstGLBaseFilterClass { pub supported_gl_api: GstGLAPI, pub gl_start: Option gboolean>, pub gl_stop: Option, - pub gl_set_caps: Option gboolean>, + pub gl_set_caps: Option< + unsafe extern "C" fn( + *mut GstGLBaseFilter, + *mut gst::GstCaps, + *mut gst::GstCaps, + ) -> gboolean, + >, pub _padding: [gpointer; 4], } impl ::std::fmt::Debug for GstGLBaseFilterClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLBaseFilterClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("supported_gl_api", &self.supported_gl_api) - .field("gl_start", &self.gl_start) - .field("gl_stop", &self.gl_stop) - .field("gl_set_caps", &self.gl_set_caps) - .finish() + .field("parent_class", &self.parent_class) + .field("supported_gl_api", &self.supported_gl_api) + .field("gl_start", &self.gl_start) + .field("gl_stop", &self.gl_stop) + .field("gl_set_caps", &self.gl_set_caps) + .finish() } } @@ -309,15 +349,15 @@ pub struct GstGLBaseMemory { impl ::std::fmt::Debug for GstGLBaseMemory { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLBaseMemory @ {:?}", self as *const _)) - .field("mem", &self.mem) - .field("context", &self.context) - .field("lock", &self.lock) - .field("map_flags", &self.map_flags) - .field("map_count", &self.map_count) - .field("gl_map_count", &self.gl_map_count) - .field("data", &self.data) - .field("query", &self.query) - .finish() + .field("mem", &self.mem) + .field("context", &self.context) + .field("lock", &self.lock) + .field("map_flags", &self.map_flags) + .field("map_count", &self.map_count) + .field("gl_map_count", &self.gl_map_count) + .field("data", &self.data) + .field("query", &self.query) + .finish() } } @@ -336,15 +376,18 @@ pub struct GstGLBaseMemoryAllocatorClass { impl ::std::fmt::Debug for GstGLBaseMemoryAllocatorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstGLBaseMemoryAllocatorClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("alloc", &self.alloc) - .field("create", &self.create) - .field("map", &self.map) - .field("unmap", &self.unmap) - .field("copy", &self.copy) - .field("destroy", &self.destroy) - .finish() + f.debug_struct(&format!( + "GstGLBaseMemoryAllocatorClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("alloc", &self.alloc) + .field("create", &self.create) + .field("map", &self.map) + .field("unmap", &self.unmap) + .field("copy", &self.copy) + .field("destroy", &self.destroy) + .finish() } } @@ -360,11 +403,11 @@ pub struct GstGLBuffer { impl ::std::fmt::Debug for GstGLBuffer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLBuffer @ {:?}", self as *const _)) - .field("mem", &self.mem) - .field("id", &self.id) - .field("target", &self.target) - .field("usage_hints", &self.usage_hints) - .finish() + .field("mem", &self.mem) + .field("id", &self.id) + .field("target", &self.target) + .field("usage_hints", &self.usage_hints) + .finish() } } @@ -379,11 +422,14 @@ pub struct GstGLBufferAllocationParams { impl ::std::fmt::Debug for GstGLBufferAllocationParams { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstGLBufferAllocationParams @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("gl_target", &self.gl_target) - .field("gl_usage", &self.gl_usage) - .finish() + f.debug_struct(&format!( + "GstGLBufferAllocationParams @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .field("gl_target", &self.gl_target) + .field("gl_usage", &self.gl_usage) + .finish() } } @@ -396,9 +442,12 @@ pub struct GstGLBufferAllocatorClass { impl ::std::fmt::Debug for GstGLBufferAllocatorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstGLBufferAllocatorClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + f.debug_struct(&format!( + "GstGLBufferAllocatorClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() } } @@ -412,8 +461,8 @@ pub struct GstGLBufferPoolClass { impl ::std::fmt::Debug for GstGLBufferPoolClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLBufferPoolClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -432,7 +481,7 @@ pub struct GstGLColorConvertClass { impl ::std::fmt::Debug for GstGLColorConvertClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLColorConvertClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -451,32 +500,41 @@ pub struct GstGLContextClass { pub get_gl_platform: Option GstGLPlatform>, pub get_proc_address: Option gpointer>, pub activate: Option gboolean>, - pub choose_format: Option gboolean>, - pub create_context: Option gboolean>, + pub choose_format: + Option gboolean>, + pub create_context: Option< + unsafe extern "C" fn( + *mut GstGLContext, + GstGLAPI, + *mut GstGLContext, + *mut *mut glib::GError, + ) -> gboolean, + >, pub destroy_context: Option, pub swap_buffers: Option, pub check_feature: Option gboolean>, - pub get_gl_platform_version: Option, + pub get_gl_platform_version: + Option, pub _reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstGLContextClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLContextClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("get_current_context", &self.get_current_context) - .field("get_gl_context", &self.get_gl_context) - .field("get_gl_api", &self.get_gl_api) - .field("get_gl_platform", &self.get_gl_platform) - .field("get_proc_address", &self.get_proc_address) - .field("activate", &self.activate) - .field("choose_format", &self.choose_format) - .field("create_context", &self.create_context) - .field("destroy_context", &self.destroy_context) - .field("swap_buffers", &self.swap_buffers) - .field("check_feature", &self.check_feature) - .field("get_gl_platform_version", &self.get_gl_platform_version) - .finish() + .field("parent_class", &self.parent_class) + .field("get_current_context", &self.get_current_context) + .field("get_gl_context", &self.get_gl_context) + .field("get_gl_api", &self.get_gl_api) + .field("get_gl_platform", &self.get_gl_platform) + .field("get_proc_address", &self.get_proc_address) + .field("activate", &self.activate) + .field("choose_format", &self.choose_format) + .field("create_context", &self.create_context) + .field("destroy_context", &self.destroy_context) + .field("swap_buffers", &self.swap_buffers) + .field("check_feature", &self.check_feature) + .field("get_gl_platform_version", &self.get_gl_platform_version) + .finish() } } @@ -497,10 +555,10 @@ pub struct GstGLDisplayClass { impl ::std::fmt::Debug for GstGLDisplayClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLDisplayClass @ {:?}", self as *const _)) - .field("object_class", &self.object_class) - .field("get_handle", &self.get_handle) - .field("create_window", &self.create_window) - .finish() + .field("object_class", &self.object_class) + .field("get_handle", &self.get_handle) + .field("create_window", &self.create_window) + .finish() } } @@ -516,9 +574,9 @@ pub struct GstGLDisplayEGLClass { impl ::std::fmt::Debug for GstGLDisplayEGLClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLDisplayEGLClass @ {:?}", self as *const _)) - .field("object_class", &self.object_class) - .field("_padding", &self._padding) - .finish() + .field("object_class", &self.object_class) + .field("_padding", &self._padding) + .finish() } } @@ -538,10 +596,13 @@ pub struct GstGLDisplayWaylandClass { #[cfg(any(feature = "wayland", feature = "dox"))] impl ::std::fmt::Debug for GstGLDisplayWaylandClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstGLDisplayWaylandClass @ {:?}", self as *const _)) - .field("object_class", &self.object_class) - .field("_padding", &self._padding) - .finish() + f.debug_struct(&format!( + "GstGLDisplayWaylandClass @ {:?}", + self as *const _ + )) + .field("object_class", &self.object_class) + .field("_padding", &self._padding) + .finish() } } @@ -557,9 +618,9 @@ pub struct GstGLDisplayX11Class { impl ::std::fmt::Debug for GstGLDisplayX11Class { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLDisplayX11Class @ {:?}", self as *const _)) - .field("object_class", &self.object_class) - .field("_padding", &self._padding) - .finish() + .field("object_class", &self.object_class) + .field("_padding", &self._padding) + .finish() } } @@ -567,24 +628,41 @@ impl ::std::fmt::Debug for GstGLDisplayX11Class { #[derive(Copy, Clone)] pub struct GstGLFilterClass { pub parent_class: GstGLBaseFilterClass, - pub set_caps: Option gboolean>, - pub filter: Option gboolean>, - pub filter_texture: Option gboolean>, + pub set_caps: Option< + unsafe extern "C" fn(*mut GstGLFilter, *mut gst::GstCaps, *mut gst::GstCaps) -> gboolean, + >, + pub filter: Option< + unsafe extern "C" fn( + *mut GstGLFilter, + *mut gst::GstBuffer, + *mut gst::GstBuffer, + ) -> gboolean, + >, + pub filter_texture: Option< + unsafe extern "C" fn(*mut GstGLFilter, *mut GstGLMemory, *mut GstGLMemory) -> gboolean, + >, pub init_fbo: Option gboolean>, - pub transform_internal_caps: Option *mut gst::GstCaps>, + pub transform_internal_caps: Option< + unsafe extern "C" fn( + *mut GstGLFilter, + gst::GstPadDirection, + *mut gst::GstCaps, + *mut gst::GstCaps, + ) -> *mut gst::GstCaps, + >, pub _padding: [gpointer; 4], } impl ::std::fmt::Debug for GstGLFilterClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLFilterClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("set_caps", &self.set_caps) - .field("filter", &self.filter) - .field("filter_texture", &self.filter_texture) - .field("init_fbo", &self.init_fbo) - .field("transform_internal_caps", &self.transform_internal_caps) - .finish() + .field("parent_class", &self.parent_class) + .field("set_caps", &self.set_caps) + .field("filter", &self.filter) + .field("filter_texture", &self.filter_texture) + .field("init_fbo", &self.init_fbo) + .field("transform_internal_caps", &self.transform_internal_caps) + .finish() } } @@ -598,7 +676,7 @@ pub struct GstGLFramebufferClass { impl ::std::fmt::Debug for GstGLFramebufferClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLFramebufferClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -632,18 +710,18 @@ pub struct GstGLMemory { impl ::std::fmt::Debug for GstGLMemory { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLMemory @ {:?}", self as *const _)) - .field("mem", &self.mem) - .field("tex_id", &self.tex_id) - .field("tex_target", &self.tex_target) - .field("tex_format", &self.tex_format) - .field("info", &self.info) - .field("valign", &self.valign) - .field("plane", &self.plane) - .field("tex_scaling", &self.tex_scaling) - .field("texture_wrapped", &self.texture_wrapped) - .field("unpack_length", &self.unpack_length) - .field("tex_width", &self.tex_width) - .finish() + .field("mem", &self.mem) + .field("tex_id", &self.tex_id) + .field("tex_target", &self.tex_target) + .field("tex_format", &self.tex_format) + .field("info", &self.info) + .field("valign", &self.valign) + .field("plane", &self.plane) + .field("tex_scaling", &self.tex_scaling) + .field("texture_wrapped", &self.texture_wrapped) + .field("unpack_length", &self.unpack_length) + .field("tex_width", &self.tex_width) + .finish() } } @@ -659,11 +737,14 @@ pub struct GstGLMemoryAllocatorClass { impl ::std::fmt::Debug for GstGLMemoryAllocatorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstGLMemoryAllocatorClass @ {:?}", self as *const _)) - .field("map", &self.map) - .field("copy", &self.copy) - .field("unmap", &self.unmap) - .finish() + f.debug_struct(&format!( + "GstGLMemoryAllocatorClass @ {:?}", + self as *const _ + )) + .field("map", &self.map) + .field("copy", &self.copy) + .field("unmap", &self.unmap) + .finish() } } @@ -678,7 +759,7 @@ pub struct GstGLMemoryPBO { impl ::std::fmt::Debug for GstGLMemoryPBO { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLMemoryPBO @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -691,9 +772,12 @@ pub struct GstGLMemoryPBOAllocatorClass { impl ::std::fmt::Debug for GstGLMemoryPBOAllocatorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstGLMemoryPBOAllocatorClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + f.debug_struct(&format!( + "GstGLMemoryPBOAllocatorClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() } } @@ -706,9 +790,12 @@ pub struct GstGLOverlayCompositorClass { impl ::std::fmt::Debug for GstGLOverlayCompositorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstGLOverlayCompositorClass @ {:?}", self as *const _)) - .field("object_class", &self.object_class) - .finish() + f.debug_struct(&format!( + "GstGLOverlayCompositorClass @ {:?}", + self as *const _ + )) + .field("object_class", &self.object_class) + .finish() } } @@ -727,7 +814,7 @@ pub struct GstGLQuery { impl ::std::fmt::Debug for GstGLQuery { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLQuery @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -746,12 +833,12 @@ pub struct GstGLRenderbuffer { impl ::std::fmt::Debug for GstGLRenderbuffer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLRenderbuffer @ {:?}", self as *const _)) - .field("renderbuffer_id", &self.renderbuffer_id) - .field("renderbuffer_format", &self.renderbuffer_format) - .field("width", &self.width) - .field("height", &self.height) - .field("renderbuffer_wrapped", &self.renderbuffer_wrapped) - .finish() + .field("renderbuffer_id", &self.renderbuffer_id) + .field("renderbuffer_format", &self.renderbuffer_format) + .field("width", &self.width) + .field("height", &self.height) + .field("renderbuffer_wrapped", &self.renderbuffer_wrapped) + .finish() } } @@ -767,11 +854,14 @@ pub struct GstGLRenderbufferAllocationParams { impl ::std::fmt::Debug for GstGLRenderbufferAllocationParams { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstGLRenderbufferAllocationParams @ {:?}", self as *const _)) - .field("renderbuffer_format", &self.renderbuffer_format) - .field("width", &self.width) - .field("height", &self.height) - .finish() + f.debug_struct(&format!( + "GstGLRenderbufferAllocationParams @ {:?}", + self as *const _ + )) + .field("renderbuffer_format", &self.renderbuffer_format) + .field("width", &self.width) + .field("height", &self.height) + .finish() } } @@ -784,9 +874,12 @@ pub struct GstGLRenderbufferAllocatorClass { impl ::std::fmt::Debug for GstGLRenderbufferAllocatorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstGLRenderbufferAllocatorClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + f.debug_struct(&format!( + "GstGLRenderbufferAllocatorClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() } } @@ -800,7 +893,7 @@ pub struct GstGLSLStageClass { impl ::std::fmt::Debug for GstGLSLStageClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLSLStageClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -818,7 +911,7 @@ pub struct GstGLShaderClass { impl ::std::fmt::Debug for GstGLShaderClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLShaderClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -839,7 +932,14 @@ pub struct GstGLSyncMeta { pub wait_gl: Option, pub wait_cpu: Option, pub wait_cpu_gl: Option, - pub copy: Option, + pub copy: Option< + unsafe extern "C" fn( + *mut GstGLSyncMeta, + *mut gst::GstBuffer, + *mut GstGLSyncMeta, + *mut gst::GstBuffer, + ), + >, pub free: Option, pub free_gl: Option, } @@ -847,19 +947,19 @@ pub struct GstGLSyncMeta { impl ::std::fmt::Debug for GstGLSyncMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLSyncMeta @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("context", &self.context) - .field("data", &self.data) - .field("set_sync", &self.set_sync) - .field("set_sync_gl", &self.set_sync_gl) - .field("wait", &self.wait) - .field("wait_gl", &self.wait_gl) - .field("wait_cpu", &self.wait_cpu) - .field("wait_cpu_gl", &self.wait_cpu_gl) - .field("copy", &self.copy) - .field("free", &self.free) - .field("free_gl", &self.free_gl) - .finish() + .field("parent", &self.parent) + .field("context", &self.context) + .field("data", &self.data) + .field("set_sync", &self.set_sync) + .field("set_sync_gl", &self.set_sync_gl) + .field("wait", &self.wait) + .field("wait_gl", &self.wait_gl) + .field("wait_cpu", &self.wait_cpu) + .field("wait_cpu_gl", &self.wait_cpu_gl) + .field("copy", &self.copy) + .field("free", &self.free) + .field("free_gl", &self.free_gl) + .finish() } } @@ -873,8 +973,8 @@ pub struct GstGLUploadClass { impl ::std::fmt::Debug for GstGLUploadClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLUploadClass @ {:?}", self as *const _)) - .field("object_class", &self.object_class) - .finish() + .field("object_class", &self.object_class) + .finish() } } @@ -897,14 +997,17 @@ pub struct GstGLVideoAllocationParams { impl ::std::fmt::Debug for GstGLVideoAllocationParams { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstGLVideoAllocationParams @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("v_info", &self.v_info) - .field("plane", &self.plane) - .field("valign", &self.valign) - .field("target", &self.target) - .field("tex_format", &self.tex_format) - .finish() + f.debug_struct(&format!( + "GstGLVideoAllocationParams @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .field("v_info", &self.v_info) + .field("plane", &self.plane) + .field("valign", &self.valign) + .field("target", &self.target) + .field("tex_format", &self.tex_format) + .finish() } } @@ -918,7 +1021,7 @@ pub struct GstGLViewConvertClass { impl ::std::fmt::Debug for GstGLViewConvertClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLViewConvertClass @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -938,13 +1041,16 @@ pub struct GstGLWindowClass { pub run: Option, pub quit: Option, pub send_message: Option, - pub send_message_async: Option, + pub send_message_async: Option< + unsafe extern "C" fn(*mut GstGLWindow, GstGLWindowCB, gpointer, glib::GDestroyNotify), + >, pub open: Option gboolean>, pub close: Option, pub handle_events: Option, pub set_preferred_size: Option, pub show: Option, - pub set_render_rectangle: Option gboolean>, + pub set_render_rectangle: + Option gboolean>, pub queue_resize: Option, pub controls_viewport: Option gboolean>, pub _reserved: [gpointer; 3], @@ -953,24 +1059,24 @@ pub struct GstGLWindowClass { impl ::std::fmt::Debug for GstGLWindowClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLWindowClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("get_display", &self.get_display) - .field("set_window_handle", &self.set_window_handle) - .field("get_window_handle", &self.get_window_handle) - .field("draw", &self.draw) - .field("run", &self.run) - .field("quit", &self.quit) - .field("send_message", &self.send_message) - .field("send_message_async", &self.send_message_async) - .field("open", &self.open) - .field("close", &self.close) - .field("handle_events", &self.handle_events) - .field("set_preferred_size", &self.set_preferred_size) - .field("show", &self.show) - .field("set_render_rectangle", &self.set_render_rectangle) - .field("queue_resize", &self.queue_resize) - .field("controls_viewport", &self.controls_viewport) - .finish() + .field("parent_class", &self.parent_class) + .field("get_display", &self.get_display) + .field("set_window_handle", &self.set_window_handle) + .field("get_window_handle", &self.get_window_handle) + .field("draw", &self.draw) + .field("run", &self.run) + .field("quit", &self.quit) + .field("send_message", &self.send_message) + .field("send_message_async", &self.send_message_async) + .field("open", &self.open) + .field("close", &self.close) + .field("handle_events", &self.handle_events) + .field("set_preferred_size", &self.set_preferred_size) + .field("show", &self.show) + .field("set_render_rectangle", &self.set_render_rectangle) + .field("queue_resize", &self.queue_resize) + .field("controls_viewport", &self.controls_viewport) + .finish() } } @@ -995,12 +1101,12 @@ pub struct GstGLBaseFilter { impl ::std::fmt::Debug for GstGLBaseFilter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLBaseFilter @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("display", &self.display) - .field("context", &self.context) - .field("in_caps", &self.in_caps) - .field("out_caps", &self.out_caps) - .finish() + .field("parent", &self.parent) + .field("display", &self.display) + .field("context", &self.context) + .field("in_caps", &self.in_caps) + .field("out_caps", &self.out_caps) + .finish() } } @@ -1014,8 +1120,11 @@ pub struct GstGLBaseMemoryAllocator { impl ::std::fmt::Debug for GstGLBaseMemoryAllocator { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstGLBaseMemoryAllocator @ {:?}", self as *const _)) - .finish() + f.debug_struct(&format!( + "GstGLBaseMemoryAllocator @ {:?}", + self as *const _ + )) + .finish() } } @@ -1029,8 +1138,8 @@ pub struct GstGLBufferAllocator { impl ::std::fmt::Debug for GstGLBufferAllocator { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLBufferAllocator @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1046,9 +1155,9 @@ pub struct GstGLBufferPool { impl ::std::fmt::Debug for GstGLBufferPool { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLBufferPool @ {:?}", self as *const _)) - .field("bufferpool", &self.bufferpool) - .field("context", &self.context) - .finish() + .field("bufferpool", &self.bufferpool) + .field("context", &self.context) + .finish() } } @@ -1072,7 +1181,7 @@ pub struct GstGLColorConvert { impl ::std::fmt::Debug for GstGLColorConvert { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLColorConvert @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1090,8 +1199,8 @@ pub struct GstGLContext { impl ::std::fmt::Debug for GstGLContext { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLContext @ {:?}", self as *const _)) - .field("gl_vtable", &self.gl_vtable) - .finish() + .field("gl_vtable", &self.gl_vtable) + .finish() } } @@ -1110,7 +1219,7 @@ pub struct GstGLDisplay { impl ::std::fmt::Debug for GstGLDisplay { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLDisplay @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1128,8 +1237,8 @@ pub struct GstGLDisplayEGL { impl ::std::fmt::Debug for GstGLDisplayEGL { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLDisplayEGL @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1151,13 +1260,13 @@ pub struct GstGLDisplayWayland { impl ::std::fmt::Debug for GstGLDisplayWayland { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLDisplayWayland @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("display", &self.display) - .field("registry", &self.registry) - .field("compositor", &self.compositor) - .field("subcompositor", &self.subcompositor) - .field("wl_shell", &self.wl_shell) - .finish() + .field("parent", &self.parent) + .field("display", &self.display) + .field("registry", &self.registry) + .field("compositor", &self.compositor) + .field("subcompositor", &self.subcompositor) + .field("wl_shell", &self.wl_shell) + .finish() } } @@ -1177,7 +1286,7 @@ pub struct GstGLDisplayX11 { impl ::std::fmt::Debug for GstGLDisplayX11 { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLDisplayX11 @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1207,14 +1316,14 @@ pub struct GstGLFilter { impl ::std::fmt::Debug for GstGLFilter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLFilter @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("in_info", &self.in_info) - .field("out_info", &self.out_info) - .field("in_texture_target", &self.in_texture_target) - .field("out_texture_target", &self.out_texture_target) - .field("out_caps", &self.out_caps) - .field("fbo", &self.fbo) - .finish() + .field("parent", &self.parent) + .field("in_info", &self.in_info) + .field("out_info", &self.out_info) + .field("in_texture_target", &self.in_texture_target) + .field("out_texture_target", &self.out_texture_target) + .field("out_caps", &self.out_caps) + .field("fbo", &self.fbo) + .finish() } } @@ -1232,7 +1341,7 @@ pub struct GstGLFramebuffer { impl ::std::fmt::Debug for GstGLFramebuffer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLFramebuffer @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1246,7 +1355,7 @@ pub struct GstGLMemoryAllocator { impl ::std::fmt::Debug for GstGLMemoryAllocator { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLMemoryAllocator @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1260,8 +1369,8 @@ pub struct GstGLMemoryPBOAllocator { impl ::std::fmt::Debug for GstGLMemoryPBOAllocator { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLMemoryPBOAllocator @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1282,7 +1391,7 @@ pub struct GstGLOverlayCompositor { impl ::std::fmt::Debug for GstGLOverlayCompositor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLOverlayCompositor @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1295,9 +1404,12 @@ pub struct GstGLRenderbufferAllocator { impl ::std::fmt::Debug for GstGLRenderbufferAllocator { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstGLRenderbufferAllocator @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + f.debug_struct(&format!( + "GstGLRenderbufferAllocator @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .finish() } } @@ -1313,7 +1425,7 @@ pub struct GstGLSLStage { impl ::std::fmt::Debug for GstGLSLStage { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLSLStage @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1329,9 +1441,9 @@ pub struct GstGLShader { impl ::std::fmt::Debug for GstGLShader { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLShader @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("context", &self.context) - .finish() + .field("parent", &self.parent) + .field("context", &self.context) + .finish() } } @@ -1347,9 +1459,9 @@ pub struct GstGLUpload { impl ::std::fmt::Debug for GstGLUpload { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLUpload @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("context", &self.context) - .finish() + .field("parent", &self.parent) + .field("context", &self.context) + .finish() } } @@ -1379,23 +1491,23 @@ pub struct GstGLViewConvert { impl ::std::fmt::Debug for GstGLViewConvert { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLViewConvert @ {:?}", self as *const _)) - .field("object", &self.object) - .field("context", &self.context) - .field("shader", &self.shader) - .field("input_mode_override", &self.input_mode_override) - .field("input_flags_override", &self.input_flags_override) - .field("output_mode_override", &self.output_mode_override) - .field("output_flags_override", &self.output_flags_override) - .field("downmix_mode", &self.downmix_mode) - .field("in_info", &self.in_info) - .field("out_info", &self.out_info) - .field("from_texture_target", &self.from_texture_target) - .field("to_texture_target", &self.to_texture_target) - .field("caps_passthrough", &self.caps_passthrough) - .field("initted", &self.initted) - .field("reconfigure", &self.reconfigure) - .field("fbo", &self.fbo) - .finish() + .field("object", &self.object) + .field("context", &self.context) + .field("shader", &self.shader) + .field("input_mode_override", &self.input_mode_override) + .field("input_flags_override", &self.input_flags_override) + .field("output_mode_override", &self.output_mode_override) + .field("output_flags_override", &self.output_flags_override) + .field("downmix_mode", &self.downmix_mode) + .field("in_info", &self.in_info) + .field("out_info", &self.out_info) + .field("from_texture_target", &self.from_texture_target) + .field("to_texture_target", &self.to_texture_target) + .field("caps_passthrough", &self.caps_passthrough) + .field("initted", &self.initted) + .field("reconfigure", &self.reconfigure) + .field("fbo", &self.fbo) + .finish() } } @@ -1425,7 +1537,7 @@ pub struct GstGLWindow { impl ::std::fmt::Debug for GstGLWindow { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGLWindow @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1447,11 +1559,19 @@ extern "C" { // GstGLFormat //========================================================================= pub fn gst_gl_format_get_type() -> GType; - pub fn gst_gl_format_from_video_info(context: *mut GstGLContext, vinfo: *mut gst_video::GstVideoInfo, plane: c_uint) -> GstGLFormat; + pub fn gst_gl_format_from_video_info( + context: *mut GstGLContext, + vinfo: *mut gst_video::GstVideoInfo, + plane: c_uint, + ) -> GstGLFormat; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_gl_format_is_supported(context: *mut GstGLContext, format: GstGLFormat) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_gl_format_type_from_sized_gl_format(format: GstGLFormat, unsized_format: *mut GstGLFormat, gl_type: *mut c_uint); + pub fn gst_gl_format_type_from_sized_gl_format( + format: GstGLFormat, + unsized_format: *mut GstGLFormat, + gl_type: *mut c_uint, + ); pub fn gst_gl_format_type_n_bytes(format: c_uint, type_: c_uint) -> c_uint; //========================================================================= @@ -1470,8 +1590,15 @@ extern "C" { //========================================================================= pub fn gst_glsl_version_get_type() -> GType; pub fn gst_glsl_version_from_string(string: *const c_char) -> GstGLSLVersion; - pub fn gst_glsl_version_profile_from_string(string: *const c_char, version_ret: *mut GstGLSLVersion, profile_ret: *mut GstGLSLProfile) -> gboolean; - pub fn gst_glsl_version_profile_to_string(version: GstGLSLVersion, profile: GstGLSLProfile) -> *mut c_char; + pub fn gst_glsl_version_profile_from_string( + string: *const c_char, + version_ret: *mut GstGLSLVersion, + profile_ret: *mut GstGLSLProfile, + ) -> gboolean; + pub fn gst_glsl_version_profile_to_string( + version: GstGLSLVersion, + profile: GstGLSLProfile, + ) -> *mut c_char; pub fn gst_glsl_version_to_string(version: GstGLSLVersion) -> *const c_char; //========================================================================= @@ -1485,7 +1612,8 @@ extern "C" { pub fn gst_gl_texture_target_get_type() -> GType; pub fn gst_gl_texture_target_from_gl(target: c_uint) -> GstGLTextureTarget; pub fn gst_gl_texture_target_from_string(str: *const c_char) -> GstGLTextureTarget; - pub fn gst_gl_texture_target_to_buffer_pool_option(target: GstGLTextureTarget) -> *const c_char; + pub fn gst_gl_texture_target_to_buffer_pool_option(target: GstGLTextureTarget) + -> *const c_char; pub fn gst_gl_texture_target_to_gl(target: GstGLTextureTarget) -> c_uint; pub fn gst_gl_texture_target_to_string(target: GstGLTextureTarget) -> *const c_char; @@ -1535,11 +1663,29 @@ extern "C" { // GstGLAllocationParams //========================================================================= pub fn gst_gl_allocation_params_get_type() -> GType; - pub fn gst_gl_allocation_params_copy(src: *mut GstGLAllocationParams) -> *mut GstGLAllocationParams; - pub fn gst_gl_allocation_params_copy_data(src: *mut GstGLAllocationParams, dest: *mut GstGLAllocationParams); + pub fn gst_gl_allocation_params_copy( + src: *mut GstGLAllocationParams, + ) -> *mut GstGLAllocationParams; + pub fn gst_gl_allocation_params_copy_data( + src: *mut GstGLAllocationParams, + dest: *mut GstGLAllocationParams, + ); pub fn gst_gl_allocation_params_free(params: *mut GstGLAllocationParams); pub fn gst_gl_allocation_params_free_data(params: *mut GstGLAllocationParams); - pub fn gst_gl_allocation_params_init(params: *mut GstGLAllocationParams, struct_size: size_t, alloc_flags: c_uint, copy: GstGLAllocationParamsCopyFunc, free: GstGLAllocationParamsFreeFunc, context: *mut GstGLContext, alloc_size: size_t, alloc_params: *mut gst::GstAllocationParams, wrapped_data: gpointer, gl_handle: gpointer, user_data: gpointer, notify: glib::GDestroyNotify) -> gboolean; + pub fn gst_gl_allocation_params_init( + params: *mut GstGLAllocationParams, + struct_size: size_t, + alloc_flags: c_uint, + copy: GstGLAllocationParamsCopyFunc, + free: GstGLAllocationParamsFreeFunc, + context: *mut GstGLContext, + alloc_size: size_t, + alloc_params: *mut gst::GstAllocationParams, + wrapped_data: gpointer, + gl_handle: gpointer, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> gboolean; //========================================================================= // GstGLAsyncDebug @@ -1548,7 +1694,17 @@ extern "C" { pub fn gst_gl_async_debug_freeze(ad: *mut GstGLAsyncDebug); pub fn gst_gl_async_debug_init(ad: *mut GstGLAsyncDebug); pub fn gst_gl_async_debug_output_log_msg(ad: *mut GstGLAsyncDebug); - pub fn gst_gl_async_debug_store_log_msg(ad: *mut GstGLAsyncDebug, cat: *mut gst::GstDebugCategory, level: gst::GstDebugLevel, file: *const c_char, function: *const c_char, line: c_int, object: *mut gobject::GObject, format: *const c_char, ...); + pub fn gst_gl_async_debug_store_log_msg( + ad: *mut GstGLAsyncDebug, + cat: *mut gst::GstDebugCategory, + level: gst::GstDebugLevel, + file: *const c_char, + function: *const c_char, + line: c_int, + object: *mut gobject::GObject, + format: *const c_char, + ... + ); //pub fn gst_gl_async_debug_store_log_msg_valist(ad: *mut GstGLAsyncDebug, cat: *mut gst::GstDebugCategory, level: gst::GstDebugLevel, file: *const c_char, function: *const c_char, line: c_int, object: *mut gobject::GObject, format: *const c_char, varargs: /*Unimplemented*/va_list); pub fn gst_gl_async_debug_thaw(ad: *mut GstGLAsyncDebug); pub fn gst_gl_async_debug_unset(ad: *mut GstGLAsyncDebug); @@ -1559,9 +1715,26 @@ extern "C" { //========================================================================= pub fn gst_gl_base_memory_get_type() -> GType; pub fn gst_gl_base_memory_alloc_data(gl_mem: *mut GstGLBaseMemory) -> gboolean; - pub fn gst_gl_base_memory_init(mem: *mut GstGLBaseMemory, allocator: *mut gst::GstAllocator, parent: *mut gst::GstMemory, context: *mut GstGLContext, params: *mut gst::GstAllocationParams, size: size_t, user_data: gpointer, notify: glib::GDestroyNotify); - pub fn gst_gl_base_memory_memcpy(src: *mut GstGLBaseMemory, dest: *mut GstGLBaseMemory, offset: ssize_t, size: ssize_t) -> gboolean; - pub fn gst_gl_base_memory_alloc(allocator: *mut GstGLBaseMemoryAllocator, params: *mut GstGLAllocationParams) -> *mut GstGLBaseMemory; + pub fn gst_gl_base_memory_init( + mem: *mut GstGLBaseMemory, + allocator: *mut gst::GstAllocator, + parent: *mut gst::GstMemory, + context: *mut GstGLContext, + params: *mut gst::GstAllocationParams, + size: size_t, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_gl_base_memory_memcpy( + src: *mut GstGLBaseMemory, + dest: *mut GstGLBaseMemory, + offset: ssize_t, + size: ssize_t, + ) -> gboolean; + pub fn gst_gl_base_memory_alloc( + allocator: *mut GstGLBaseMemoryAllocator, + params: *mut GstGLAllocationParams, + ) -> *mut GstGLBaseMemory; pub fn gst_gl_base_memory_init_once(); //========================================================================= @@ -1573,28 +1746,77 @@ extern "C" { // GstGLBufferAllocationParams //========================================================================= pub fn gst_gl_buffer_allocation_params_get_type() -> GType; - pub fn gst_gl_buffer_allocation_params_new(context: *mut GstGLContext, alloc_size: size_t, alloc_params: *mut gst::GstAllocationParams, gl_target: c_uint, gl_usage: c_uint) -> *mut GstGLBufferAllocationParams; + pub fn gst_gl_buffer_allocation_params_new( + context: *mut GstGLContext, + alloc_size: size_t, + alloc_params: *mut gst::GstAllocationParams, + gl_target: c_uint, + gl_usage: c_uint, + ) -> *mut GstGLBufferAllocationParams; //========================================================================= // GstGLMemory //========================================================================= - pub fn gst_gl_memory_copy_into(gl_mem: *mut GstGLMemory, tex_id: c_uint, target: GstGLTextureTarget, tex_format: GstGLFormat, width: c_int, height: c_int) -> gboolean; - pub fn gst_gl_memory_copy_teximage(src: *mut GstGLMemory, tex_id: c_uint, out_target: GstGLTextureTarget, out_tex_format: GstGLFormat, out_width: c_int, out_height: c_int) -> gboolean; + pub fn gst_gl_memory_copy_into( + gl_mem: *mut GstGLMemory, + tex_id: c_uint, + target: GstGLTextureTarget, + tex_format: GstGLFormat, + width: c_int, + height: c_int, + ) -> gboolean; + pub fn gst_gl_memory_copy_teximage( + src: *mut GstGLMemory, + tex_id: c_uint, + out_target: GstGLTextureTarget, + out_tex_format: GstGLFormat, + out_width: c_int, + out_height: c_int, + ) -> gboolean; pub fn gst_gl_memory_get_texture_format(gl_mem: *mut GstGLMemory) -> GstGLFormat; pub fn gst_gl_memory_get_texture_height(gl_mem: *mut GstGLMemory) -> c_int; pub fn gst_gl_memory_get_texture_id(gl_mem: *mut GstGLMemory) -> c_uint; pub fn gst_gl_memory_get_texture_target(gl_mem: *mut GstGLMemory) -> GstGLTextureTarget; pub fn gst_gl_memory_get_texture_width(gl_mem: *mut GstGLMemory) -> c_int; - pub fn gst_gl_memory_init(mem: *mut GstGLMemory, allocator: *mut gst::GstAllocator, parent: *mut gst::GstMemory, context: *mut GstGLContext, target: GstGLTextureTarget, tex_format: GstGLFormat, params: *mut gst::GstAllocationParams, info: *mut gst_video::GstVideoInfo, plane: c_uint, valign: *mut gst_video::GstVideoAlignment, user_data: gpointer, notify: glib::GDestroyNotify); + pub fn gst_gl_memory_init( + mem: *mut GstGLMemory, + allocator: *mut gst::GstAllocator, + parent: *mut gst::GstMemory, + context: *mut GstGLContext, + target: GstGLTextureTarget, + tex_format: GstGLFormat, + params: *mut gst::GstAllocationParams, + info: *mut gst_video::GstVideoInfo, + plane: c_uint, + valign: *mut gst_video::GstVideoAlignment, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); pub fn gst_gl_memory_read_pixels(gl_mem: *mut GstGLMemory, read_pointer: gpointer) -> gboolean; pub fn gst_gl_memory_texsubimage(gl_mem: *mut GstGLMemory, read_pointer: gpointer); pub fn gst_gl_memory_init_once(); - pub fn gst_gl_memory_setup_buffer(allocator: *mut GstGLMemoryAllocator, buffer: *mut gst::GstBuffer, params: *mut GstGLVideoAllocationParams, tex_formats: *mut GstGLFormat, wrapped_data: *mut gpointer, n_wrapped_pointers: size_t) -> gboolean; + pub fn gst_gl_memory_setup_buffer( + allocator: *mut GstGLMemoryAllocator, + buffer: *mut gst::GstBuffer, + params: *mut GstGLVideoAllocationParams, + tex_formats: *mut GstGLFormat, + wrapped_data: *mut gpointer, + n_wrapped_pointers: size_t, + ) -> gboolean; //========================================================================= // GstGLMemoryPBO //========================================================================= - pub fn gst_gl_memory_pbo_copy_into_texture(gl_mem: *mut GstGLMemoryPBO, tex_id: c_uint, target: GstGLTextureTarget, tex_format: GstGLFormat, width: c_int, height: c_int, stride: c_int, respecify: gboolean) -> gboolean; + pub fn gst_gl_memory_pbo_copy_into_texture( + gl_mem: *mut GstGLMemoryPBO, + tex_id: c_uint, + target: GstGLTextureTarget, + tex_format: GstGLFormat, + width: c_int, + height: c_int, + stride: c_int, + respecify: gboolean, + ) -> gboolean; pub fn gst_gl_memory_pbo_download_transfer(gl_mem: *mut GstGLMemoryPBO); pub fn gst_gl_memory_pbo_upload_transfer(gl_mem: *mut GstGLMemoryPBO); pub fn gst_gl_memory_pbo_init_once(); @@ -1605,12 +1827,23 @@ extern "C" { pub fn gst_gl_query_counter(query: *mut GstGLQuery); pub fn gst_gl_query_end(query: *mut GstGLQuery); pub fn gst_gl_query_free(query: *mut GstGLQuery); - pub fn gst_gl_query_init(query: *mut GstGLQuery, context: *mut GstGLContext, query_type: GstGLQueryType); + pub fn gst_gl_query_init( + query: *mut GstGLQuery, + context: *mut GstGLContext, + query_type: GstGLQueryType, + ); pub fn gst_gl_query_result(query: *mut GstGLQuery) -> u64; pub fn gst_gl_query_start(query: *mut GstGLQuery); pub fn gst_gl_query_unset(query: *mut GstGLQuery); - pub fn gst_gl_query_local_gl_context(element: *mut gst::GstElement, direction: gst::GstPadDirection, context_ptr: *mut *mut GstGLContext) -> gboolean; - pub fn gst_gl_query_new(context: *mut GstGLContext, query_type: GstGLQueryType) -> *mut GstGLQuery; + pub fn gst_gl_query_local_gl_context( + element: *mut gst::GstElement, + direction: gst::GstPadDirection, + context_ptr: *mut *mut GstGLContext, + ) -> gboolean; + pub fn gst_gl_query_new( + context: *mut GstGLContext, + query_type: GstGLQueryType, + ) -> *mut GstGLQuery; //========================================================================= // GstGLRenderbuffer @@ -1625,13 +1858,31 @@ extern "C" { // GstGLRenderbufferAllocationParams //========================================================================= pub fn gst_gl_renderbuffer_allocation_params_get_type() -> GType; - pub fn gst_gl_renderbuffer_allocation_params_new(context: *mut GstGLContext, alloc_params: *mut gst::GstAllocationParams, renderbuffer_format: GstGLFormat, width: c_uint, height: c_uint) -> *mut GstGLRenderbufferAllocationParams; - pub fn gst_gl_renderbuffer_allocation_params_new_wrapped(context: *mut GstGLContext, alloc_params: *mut gst::GstAllocationParams, renderbuffer_format: GstGLFormat, width: c_uint, height: c_uint, gl_handle: gpointer, user_data: gpointer, notify: glib::GDestroyNotify) -> *mut GstGLRenderbufferAllocationParams; + pub fn gst_gl_renderbuffer_allocation_params_new( + context: *mut GstGLContext, + alloc_params: *mut gst::GstAllocationParams, + renderbuffer_format: GstGLFormat, + width: c_uint, + height: c_uint, + ) -> *mut GstGLRenderbufferAllocationParams; + pub fn gst_gl_renderbuffer_allocation_params_new_wrapped( + context: *mut GstGLContext, + alloc_params: *mut gst::GstAllocationParams, + renderbuffer_format: GstGLFormat, + width: c_uint, + height: c_uint, + gl_handle: gpointer, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstGLRenderbufferAllocationParams; //========================================================================= // GstGLSyncMeta //========================================================================= - pub fn gst_gl_sync_meta_set_sync_point(sync_meta: *mut GstGLSyncMeta, context: *mut GstGLContext); + pub fn gst_gl_sync_meta_set_sync_point( + sync_meta: *mut GstGLSyncMeta, + context: *mut GstGLContext, + ); pub fn gst_gl_sync_meta_wait(sync_meta: *mut GstGLSyncMeta, context: *mut GstGLContext); pub fn gst_gl_sync_meta_wait_cpu(sync_meta: *mut GstGLSyncMeta, context: *mut GstGLContext); pub fn gst_gl_sync_meta_get_info() -> *const gst::GstMetaInfo; @@ -1640,13 +1891,74 @@ extern "C" { // GstGLVideoAllocationParams //========================================================================= pub fn gst_gl_video_allocation_params_get_type() -> GType; - pub fn gst_gl_video_allocation_params_new(context: *mut GstGLContext, alloc_params: *mut gst::GstAllocationParams, v_info: *mut gst_video::GstVideoInfo, plane: c_uint, valign: *mut gst_video::GstVideoAlignment, target: GstGLTextureTarget, tex_format: GstGLFormat) -> *mut GstGLVideoAllocationParams; - pub fn gst_gl_video_allocation_params_new_wrapped_data(context: *mut GstGLContext, alloc_params: *mut gst::GstAllocationParams, v_info: *mut gst_video::GstVideoInfo, plane: c_uint, valign: *mut gst_video::GstVideoAlignment, target: GstGLTextureTarget, tex_format: GstGLFormat, wrapped_data: gpointer, user_data: gpointer, notify: glib::GDestroyNotify) -> *mut GstGLVideoAllocationParams; - pub fn gst_gl_video_allocation_params_new_wrapped_gl_handle(context: *mut GstGLContext, alloc_params: *mut gst::GstAllocationParams, v_info: *mut gst_video::GstVideoInfo, plane: c_uint, valign: *mut gst_video::GstVideoAlignment, target: GstGLTextureTarget, tex_format: GstGLFormat, gl_handle: gpointer, user_data: gpointer, notify: glib::GDestroyNotify) -> *mut GstGLVideoAllocationParams; - pub fn gst_gl_video_allocation_params_new_wrapped_texture(context: *mut GstGLContext, alloc_params: *mut gst::GstAllocationParams, v_info: *mut gst_video::GstVideoInfo, plane: c_uint, valign: *mut gst_video::GstVideoAlignment, target: GstGLTextureTarget, tex_format: GstGLFormat, tex_id: c_uint, user_data: gpointer, notify: glib::GDestroyNotify) -> *mut GstGLVideoAllocationParams; - pub fn gst_gl_video_allocation_params_copy_data(src_vid: *mut GstGLVideoAllocationParams, dest_vid: *mut GstGLVideoAllocationParams); + pub fn gst_gl_video_allocation_params_new( + context: *mut GstGLContext, + alloc_params: *mut gst::GstAllocationParams, + v_info: *mut gst_video::GstVideoInfo, + plane: c_uint, + valign: *mut gst_video::GstVideoAlignment, + target: GstGLTextureTarget, + tex_format: GstGLFormat, + ) -> *mut GstGLVideoAllocationParams; + pub fn gst_gl_video_allocation_params_new_wrapped_data( + context: *mut GstGLContext, + alloc_params: *mut gst::GstAllocationParams, + v_info: *mut gst_video::GstVideoInfo, + plane: c_uint, + valign: *mut gst_video::GstVideoAlignment, + target: GstGLTextureTarget, + tex_format: GstGLFormat, + wrapped_data: gpointer, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstGLVideoAllocationParams; + pub fn gst_gl_video_allocation_params_new_wrapped_gl_handle( + context: *mut GstGLContext, + alloc_params: *mut gst::GstAllocationParams, + v_info: *mut gst_video::GstVideoInfo, + plane: c_uint, + valign: *mut gst_video::GstVideoAlignment, + target: GstGLTextureTarget, + tex_format: GstGLFormat, + gl_handle: gpointer, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstGLVideoAllocationParams; + pub fn gst_gl_video_allocation_params_new_wrapped_texture( + context: *mut GstGLContext, + alloc_params: *mut gst::GstAllocationParams, + v_info: *mut gst_video::GstVideoInfo, + plane: c_uint, + valign: *mut gst_video::GstVideoAlignment, + target: GstGLTextureTarget, + tex_format: GstGLFormat, + tex_id: c_uint, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstGLVideoAllocationParams; + pub fn gst_gl_video_allocation_params_copy_data( + src_vid: *mut GstGLVideoAllocationParams, + dest_vid: *mut GstGLVideoAllocationParams, + ); pub fn gst_gl_video_allocation_params_free_data(params: *mut GstGLVideoAllocationParams); - pub fn gst_gl_video_allocation_params_init_full(params: *mut GstGLVideoAllocationParams, struct_size: size_t, alloc_flags: c_uint, copy: GstGLAllocationParamsCopyFunc, free: GstGLAllocationParamsFreeFunc, context: *mut GstGLContext, alloc_params: *mut gst::GstAllocationParams, v_info: *mut gst_video::GstVideoInfo, plane: c_uint, valign: *mut gst_video::GstVideoAlignment, target: GstGLTextureTarget, tex_format: GstGLFormat, wrapped_data: gpointer, gl_handle: gpointer, user_data: gpointer, notify: glib::GDestroyNotify) -> gboolean; + pub fn gst_gl_video_allocation_params_init_full( + params: *mut GstGLVideoAllocationParams, + struct_size: size_t, + alloc_flags: c_uint, + copy: GstGLAllocationParamsCopyFunc, + free: GstGLAllocationParamsFreeFunc, + context: *mut GstGLContext, + alloc_params: *mut gst::GstAllocationParams, + v_info: *mut gst_video::GstVideoInfo, + plane: c_uint, + valign: *mut gst_video::GstVideoAlignment, + target: GstGLTextureTarget, + tex_format: GstGLFormat, + wrapped_data: gpointer, + gl_handle: gpointer, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> gboolean; //========================================================================= // GstGLBaseFilter @@ -1676,69 +1988,174 @@ extern "C" { //========================================================================= pub fn gst_gl_color_convert_get_type() -> GType; pub fn gst_gl_color_convert_new(context: *mut GstGLContext) -> *mut GstGLColorConvert; - pub fn gst_gl_color_convert_fixate_caps(context: *mut GstGLContext, direction: gst::GstPadDirection, caps: *mut gst::GstCaps, other: *mut gst::GstCaps) -> *mut gst::GstCaps; - pub fn gst_gl_color_convert_transform_caps(context: *mut GstGLContext, direction: gst::GstPadDirection, caps: *mut gst::GstCaps, filter: *mut gst::GstCaps) -> *mut gst::GstCaps; - pub fn gst_gl_color_convert_decide_allocation(convert: *mut GstGLColorConvert, query: *mut gst::GstQuery) -> gboolean; - pub fn gst_gl_color_convert_perform(convert: *mut GstGLColorConvert, inbuf: *mut gst::GstBuffer) -> *mut gst::GstBuffer; - pub fn gst_gl_color_convert_set_caps(convert: *mut GstGLColorConvert, in_caps: *mut gst::GstCaps, out_caps: *mut gst::GstCaps) -> gboolean; + pub fn gst_gl_color_convert_fixate_caps( + context: *mut GstGLContext, + direction: gst::GstPadDirection, + caps: *mut gst::GstCaps, + other: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; + pub fn gst_gl_color_convert_transform_caps( + context: *mut GstGLContext, + direction: gst::GstPadDirection, + caps: *mut gst::GstCaps, + filter: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; + pub fn gst_gl_color_convert_decide_allocation( + convert: *mut GstGLColorConvert, + query: *mut gst::GstQuery, + ) -> gboolean; + pub fn gst_gl_color_convert_perform( + convert: *mut GstGLColorConvert, + inbuf: *mut gst::GstBuffer, + ) -> *mut gst::GstBuffer; + pub fn gst_gl_color_convert_set_caps( + convert: *mut GstGLColorConvert, + in_caps: *mut gst::GstCaps, + out_caps: *mut gst::GstCaps, + ) -> gboolean; //========================================================================= // GstGLContext //========================================================================= pub fn gst_gl_context_get_type() -> GType; pub fn gst_gl_context_new(display: *mut GstGLDisplay) -> *mut GstGLContext; - pub fn gst_gl_context_new_wrapped(display: *mut GstGLDisplay, handle: uintptr_t, context_type: GstGLPlatform, available_apis: GstGLAPI) -> *mut GstGLContext; - pub fn gst_gl_context_default_get_proc_address(gl_api: GstGLAPI, name: *const c_char) -> gpointer; + pub fn gst_gl_context_new_wrapped( + display: *mut GstGLDisplay, + handle: uintptr_t, + context_type: GstGLPlatform, + available_apis: GstGLAPI, + ) -> *mut GstGLContext; + pub fn gst_gl_context_default_get_proc_address( + gl_api: GstGLAPI, + name: *const c_char, + ) -> gpointer; pub fn gst_gl_context_get_current() -> *mut GstGLContext; - pub fn gst_gl_context_get_current_gl_api(platform: GstGLPlatform, major: *mut c_uint, minor: *mut c_uint) -> GstGLAPI; + pub fn gst_gl_context_get_current_gl_api( + platform: GstGLPlatform, + major: *mut c_uint, + minor: *mut c_uint, + ) -> GstGLAPI; pub fn gst_gl_context_get_current_gl_context(context_type: GstGLPlatform) -> uintptr_t; - pub fn gst_gl_context_get_proc_address_with_platform(context_type: GstGLPlatform, gl_api: GstGLAPI, name: *const c_char) -> gpointer; + pub fn gst_gl_context_get_proc_address_with_platform( + context_type: GstGLPlatform, + gl_api: GstGLAPI, + name: *const c_char, + ) -> gpointer; pub fn gst_gl_context_activate(context: *mut GstGLContext, activate: gboolean) -> gboolean; - pub fn gst_gl_context_can_share(context: *mut GstGLContext, other_context: *mut GstGLContext) -> gboolean; - pub fn gst_gl_context_check_feature(context: *mut GstGLContext, feature: *const c_char) -> gboolean; - pub fn gst_gl_context_check_framebuffer_status(context: *mut GstGLContext, fbo_target: c_uint) -> gboolean; - pub fn gst_gl_context_check_gl_version(context: *mut GstGLContext, api: GstGLAPI, maj: c_int, min: c_int) -> gboolean; + pub fn gst_gl_context_can_share( + context: *mut GstGLContext, + other_context: *mut GstGLContext, + ) -> gboolean; + pub fn gst_gl_context_check_feature( + context: *mut GstGLContext, + feature: *const c_char, + ) -> gboolean; + pub fn gst_gl_context_check_framebuffer_status( + context: *mut GstGLContext, + fbo_target: c_uint, + ) -> gboolean; + pub fn gst_gl_context_check_gl_version( + context: *mut GstGLContext, + api: GstGLAPI, + maj: c_int, + min: c_int, + ) -> gboolean; pub fn gst_gl_context_clear_framebuffer(context: *mut GstGLContext); pub fn gst_gl_context_clear_shader(context: *mut GstGLContext); - pub fn gst_gl_context_create(context: *mut GstGLContext, other_context: *mut GstGLContext, error: *mut *mut glib::GError) -> gboolean; + pub fn gst_gl_context_create( + context: *mut GstGLContext, + other_context: *mut GstGLContext, + error: *mut *mut glib::GError, + ) -> gboolean; pub fn gst_gl_context_destroy(context: *mut GstGLContext); - pub fn gst_gl_context_fill_info(context: *mut GstGLContext, error: *mut *mut glib::GError) -> gboolean; + pub fn gst_gl_context_fill_info( + context: *mut GstGLContext, + error: *mut *mut glib::GError, + ) -> gboolean; pub fn gst_gl_context_get_display(context: *mut GstGLContext) -> *mut GstGLDisplay; pub fn gst_gl_context_get_gl_api(context: *mut GstGLContext) -> GstGLAPI; pub fn gst_gl_context_get_gl_context(context: *mut GstGLContext) -> uintptr_t; pub fn gst_gl_context_get_gl_platform(context: *mut GstGLContext) -> GstGLPlatform; - pub fn gst_gl_context_get_gl_platform_version(context: *mut GstGLContext, major: *mut c_int, minor: *mut c_int); - pub fn gst_gl_context_get_gl_version(context: *mut GstGLContext, maj: *mut c_int, min: *mut c_int); - pub fn gst_gl_context_get_proc_address(context: *mut GstGLContext, name: *const c_char) -> gpointer; + pub fn gst_gl_context_get_gl_platform_version( + context: *mut GstGLContext, + major: *mut c_int, + minor: *mut c_int, + ); + pub fn gst_gl_context_get_gl_version( + context: *mut GstGLContext, + maj: *mut c_int, + min: *mut c_int, + ); + pub fn gst_gl_context_get_proc_address( + context: *mut GstGLContext, + name: *const c_char, + ) -> gpointer; pub fn gst_gl_context_get_thread(context: *mut GstGLContext) -> *mut glib::GThread; pub fn gst_gl_context_get_window(context: *mut GstGLContext) -> *mut GstGLWindow; pub fn gst_gl_context_is_shared(context: *mut GstGLContext) -> gboolean; pub fn gst_gl_context_set_shared_with(context: *mut GstGLContext, share: *mut GstGLContext); - pub fn gst_gl_context_set_window(context: *mut GstGLContext, window: *mut GstGLWindow) -> gboolean; - pub fn gst_gl_context_supports_glsl_profile_version(context: *mut GstGLContext, version: GstGLSLVersion, profile: GstGLSLProfile) -> gboolean; + pub fn gst_gl_context_set_window( + context: *mut GstGLContext, + window: *mut GstGLWindow, + ) -> gboolean; + pub fn gst_gl_context_supports_glsl_profile_version( + context: *mut GstGLContext, + version: GstGLSLVersion, + profile: GstGLSLProfile, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_gl_context_supports_precision(context: *mut GstGLContext, version: GstGLSLVersion, profile: GstGLSLProfile) -> gboolean; + pub fn gst_gl_context_supports_precision( + context: *mut GstGLContext, + version: GstGLSLVersion, + profile: GstGLSLProfile, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_gl_context_supports_precision_highp(context: *mut GstGLContext, version: GstGLSLVersion, profile: GstGLSLProfile) -> gboolean; + pub fn gst_gl_context_supports_precision_highp( + context: *mut GstGLContext, + version: GstGLSLVersion, + profile: GstGLSLProfile, + ) -> gboolean; pub fn gst_gl_context_swap_buffers(context: *mut GstGLContext); - pub fn gst_gl_context_thread_add(context: *mut GstGLContext, func: GstGLContextThreadFunc, data: gpointer); + pub fn gst_gl_context_thread_add( + context: *mut GstGLContext, + func: GstGLContextThreadFunc, + data: gpointer, + ); //========================================================================= // GstGLDisplay //========================================================================= pub fn gst_gl_display_get_type() -> GType; pub fn gst_gl_display_new() -> *mut GstGLDisplay; - pub fn gst_gl_display_add_context(display: *mut GstGLDisplay, context: *mut GstGLContext) -> gboolean; - pub fn gst_gl_display_create_context(display: *mut GstGLDisplay, other_context: *mut GstGLContext, p_context: *mut *mut GstGLContext, error: *mut *mut glib::GError) -> gboolean; + pub fn gst_gl_display_add_context( + display: *mut GstGLDisplay, + context: *mut GstGLContext, + ) -> gboolean; + pub fn gst_gl_display_create_context( + display: *mut GstGLDisplay, + other_context: *mut GstGLContext, + p_context: *mut *mut GstGLContext, + error: *mut *mut glib::GError, + ) -> gboolean; pub fn gst_gl_display_create_window(display: *mut GstGLDisplay) -> *mut GstGLWindow; pub fn gst_gl_display_filter_gl_api(display: *mut GstGLDisplay, gl_api: GstGLAPI); - pub fn gst_gl_display_find_window(display: *mut GstGLDisplay, data: gpointer, compare_func: glib::GCompareFunc) -> *mut GstGLWindow; + pub fn gst_gl_display_find_window( + display: *mut GstGLDisplay, + data: gpointer, + compare_func: glib::GCompareFunc, + ) -> *mut GstGLWindow; pub fn gst_gl_display_get_gl_api(display: *mut GstGLDisplay) -> GstGLAPI; pub fn gst_gl_display_get_gl_api_unlocked(display: *mut GstGLDisplay) -> GstGLAPI; - pub fn gst_gl_display_get_gl_context_for_thread(display: *mut GstGLDisplay, thread: *mut glib::GThread) -> *mut GstGLContext; + pub fn gst_gl_display_get_gl_context_for_thread( + display: *mut GstGLDisplay, + thread: *mut glib::GThread, + ) -> *mut GstGLContext; pub fn gst_gl_display_get_handle(display: *mut GstGLDisplay) -> uintptr_t; pub fn gst_gl_display_get_handle_type(display: *mut GstGLDisplay) -> GstGLDisplayType; - pub fn gst_gl_display_remove_window(display: *mut GstGLDisplay, window: *mut GstGLWindow) -> gboolean; + pub fn gst_gl_display_remove_window( + display: *mut GstGLDisplay, + window: *mut GstGLWindow, + ) -> gboolean; //========================================================================= // GstGLDisplayEGL @@ -1750,7 +2167,10 @@ extern "C" { #[cfg(any(feature = "egl", feature = "dox"))] pub fn gst_gl_display_egl_new_with_egl_display(display: gpointer) -> *mut GstGLDisplayEGL; #[cfg(any(feature = "egl", feature = "dox"))] - pub fn gst_gl_display_egl_get_from_native(type_: GstGLDisplayType, display: uintptr_t) -> gpointer; + pub fn gst_gl_display_egl_get_from_native( + type_: GstGLDisplayType, + display: uintptr_t, + ) -> gpointer; //========================================================================= // GstGLDisplayWayland @@ -1778,27 +2198,61 @@ extern "C" { pub fn gst_gl_filter_get_type() -> GType; pub fn gst_gl_filter_add_rgba_pad_templates(klass: *mut GstGLFilterClass); pub fn gst_gl_filter_draw_fullscreen_quad(filter: *mut GstGLFilter); - pub fn gst_gl_filter_filter_texture(filter: *mut GstGLFilter, inbuf: *mut gst::GstBuffer, outbuf: *mut gst::GstBuffer) -> gboolean; - pub fn gst_gl_filter_render_to_target(filter: *mut GstGLFilter, input: *mut GstGLMemory, output: *mut GstGLMemory, func: GstGLFilterRenderFunc, data: gpointer) -> gboolean; - pub fn gst_gl_filter_render_to_target_with_shader(filter: *mut GstGLFilter, input: *mut GstGLMemory, output: *mut GstGLMemory, shader: *mut GstGLShader); + pub fn gst_gl_filter_filter_texture( + filter: *mut GstGLFilter, + inbuf: *mut gst::GstBuffer, + outbuf: *mut gst::GstBuffer, + ) -> gboolean; + pub fn gst_gl_filter_render_to_target( + filter: *mut GstGLFilter, + input: *mut GstGLMemory, + output: *mut GstGLMemory, + func: GstGLFilterRenderFunc, + data: gpointer, + ) -> gboolean; + pub fn gst_gl_filter_render_to_target_with_shader( + filter: *mut GstGLFilter, + input: *mut GstGLMemory, + output: *mut GstGLMemory, + shader: *mut GstGLShader, + ); //========================================================================= // GstGLFramebuffer //========================================================================= pub fn gst_gl_framebuffer_get_type() -> GType; pub fn gst_gl_framebuffer_new(context: *mut GstGLContext) -> *mut GstGLFramebuffer; - pub fn gst_gl_framebuffer_new_with_default_depth(context: *mut GstGLContext, width: c_uint, height: c_uint) -> *mut GstGLFramebuffer; - pub fn gst_gl_framebuffer_attach(fb: *mut GstGLFramebuffer, attachment_point: c_uint, mem: *mut GstGLBaseMemory); + pub fn gst_gl_framebuffer_new_with_default_depth( + context: *mut GstGLContext, + width: c_uint, + height: c_uint, + ) -> *mut GstGLFramebuffer; + pub fn gst_gl_framebuffer_attach( + fb: *mut GstGLFramebuffer, + attachment_point: c_uint, + mem: *mut GstGLBaseMemory, + ); pub fn gst_gl_framebuffer_bind(fb: *mut GstGLFramebuffer); - pub fn gst_gl_framebuffer_draw_to_texture(fb: *mut GstGLFramebuffer, mem: *mut GstGLMemory, func: GstGLFramebufferFunc, user_data: gpointer) -> gboolean; - pub fn gst_gl_framebuffer_get_effective_dimensions(fb: *mut GstGLFramebuffer, width: *mut c_uint, height: *mut c_uint); + pub fn gst_gl_framebuffer_draw_to_texture( + fb: *mut GstGLFramebuffer, + mem: *mut GstGLMemory, + func: GstGLFramebufferFunc, + user_data: gpointer, + ) -> gboolean; + pub fn gst_gl_framebuffer_get_effective_dimensions( + fb: *mut GstGLFramebuffer, + width: *mut c_uint, + height: *mut c_uint, + ); pub fn gst_gl_framebuffer_get_id(fb: *mut GstGLFramebuffer) -> c_uint; //========================================================================= // GstGLMemoryAllocator //========================================================================= pub fn gst_gl_memory_allocator_get_type() -> GType; - pub fn gst_gl_memory_allocator_get_default(context: *mut GstGLContext) -> *mut GstGLMemoryAllocator; + pub fn gst_gl_memory_allocator_get_default( + context: *mut GstGLContext, + ) -> *mut GstGLMemoryAllocator; //========================================================================= // GstGLMemoryPBOAllocator @@ -1809,11 +2263,15 @@ extern "C" { // GstGLOverlayCompositor //========================================================================= pub fn gst_gl_overlay_compositor_get_type() -> GType; - pub fn gst_gl_overlay_compositor_new(context: *mut GstGLContext) -> *mut GstGLOverlayCompositor; + pub fn gst_gl_overlay_compositor_new(context: *mut GstGLContext) + -> *mut GstGLOverlayCompositor; pub fn gst_gl_overlay_compositor_add_caps(caps: *mut gst::GstCaps) -> *mut gst::GstCaps; pub fn gst_gl_overlay_compositor_draw_overlays(compositor: *mut GstGLOverlayCompositor); pub fn gst_gl_overlay_compositor_free_overlays(compositor: *mut GstGLOverlayCompositor); - pub fn gst_gl_overlay_compositor_upload_overlays(compositor: *mut GstGLOverlayCompositor, buf: *mut gst::GstBuffer); + pub fn gst_gl_overlay_compositor_upload_overlays( + compositor: *mut GstGLOverlayCompositor, + buf: *mut gst::GstBuffer, + ); //========================================================================= // GstGLRenderbufferAllocator @@ -1827,67 +2285,268 @@ extern "C" { pub fn gst_glsl_stage_new(context: *mut GstGLContext, type_: c_uint) -> *mut GstGLSLStage; pub fn gst_glsl_stage_new_default_fragment(context: *mut GstGLContext) -> *mut GstGLSLStage; pub fn gst_glsl_stage_new_default_vertex(context: *mut GstGLContext) -> *mut GstGLSLStage; - pub fn gst_glsl_stage_new_with_string(context: *mut GstGLContext, type_: c_uint, version: GstGLSLVersion, profile: GstGLSLProfile, str: *const c_char) -> *mut GstGLSLStage; - pub fn gst_glsl_stage_new_with_strings(context: *mut GstGLContext, type_: c_uint, version: GstGLSLVersion, profile: GstGLSLProfile, n_strings: c_int, str: *mut *const c_char) -> *mut GstGLSLStage; - pub fn gst_glsl_stage_compile(stage: *mut GstGLSLStage, error: *mut *mut glib::GError) -> gboolean; + pub fn gst_glsl_stage_new_with_string( + context: *mut GstGLContext, + type_: c_uint, + version: GstGLSLVersion, + profile: GstGLSLProfile, + str: *const c_char, + ) -> *mut GstGLSLStage; + pub fn gst_glsl_stage_new_with_strings( + context: *mut GstGLContext, + type_: c_uint, + version: GstGLSLVersion, + profile: GstGLSLProfile, + n_strings: c_int, + str: *mut *const c_char, + ) -> *mut GstGLSLStage; + pub fn gst_glsl_stage_compile( + stage: *mut GstGLSLStage, + error: *mut *mut glib::GError, + ) -> gboolean; pub fn gst_glsl_stage_get_handle(stage: *mut GstGLSLStage) -> c_uint; pub fn gst_glsl_stage_get_profile(stage: *mut GstGLSLStage) -> GstGLSLProfile; pub fn gst_glsl_stage_get_shader_type(stage: *mut GstGLSLStage) -> c_uint; pub fn gst_glsl_stage_get_version(stage: *mut GstGLSLStage) -> GstGLSLVersion; - pub fn gst_glsl_stage_set_strings(stage: *mut GstGLSLStage, version: GstGLSLVersion, profile: GstGLSLProfile, n_strings: c_int, str: *mut *const c_char) -> gboolean; + pub fn gst_glsl_stage_set_strings( + stage: *mut GstGLSLStage, + version: GstGLSLVersion, + profile: GstGLSLProfile, + n_strings: c_int, + str: *mut *const c_char, + ) -> gboolean; //========================================================================= // GstGLShader //========================================================================= pub fn gst_gl_shader_get_type() -> GType; pub fn gst_gl_shader_new(context: *mut GstGLContext) -> *mut GstGLShader; - pub fn gst_gl_shader_new_default(context: *mut GstGLContext, error: *mut *mut glib::GError) -> *mut GstGLShader; - pub fn gst_gl_shader_new_link_with_stages(context: *mut GstGLContext, error: *mut *mut glib::GError, ...) -> *mut GstGLShader; - pub fn gst_gl_shader_new_with_stages(context: *mut GstGLContext, error: *mut *mut glib::GError, ...) -> *mut GstGLShader; + pub fn gst_gl_shader_new_default( + context: *mut GstGLContext, + error: *mut *mut glib::GError, + ) -> *mut GstGLShader; + pub fn gst_gl_shader_new_link_with_stages( + context: *mut GstGLContext, + error: *mut *mut glib::GError, + ... + ) -> *mut GstGLShader; + pub fn gst_gl_shader_new_with_stages( + context: *mut GstGLContext, + error: *mut *mut glib::GError, + ... + ) -> *mut GstGLShader; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_gl_shader_string_fragment_external_oes_get_default(context: *mut GstGLContext, version: GstGLSLVersion, profile: GstGLSLProfile) -> *mut c_char; + pub fn gst_gl_shader_string_fragment_external_oes_get_default( + context: *mut GstGLContext, + version: GstGLSLVersion, + profile: GstGLSLProfile, + ) -> *mut c_char; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_gl_shader_string_fragment_get_default(context: *mut GstGLContext, version: GstGLSLVersion, profile: GstGLSLProfile) -> *mut c_char; + pub fn gst_gl_shader_string_fragment_get_default( + context: *mut GstGLContext, + version: GstGLSLVersion, + profile: GstGLSLProfile, + ) -> *mut c_char; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_gl_shader_string_get_highest_precision(context: *mut GstGLContext, version: GstGLSLVersion, profile: GstGLSLProfile) -> *const c_char; + pub fn gst_gl_shader_string_get_highest_precision( + context: *mut GstGLContext, + version: GstGLSLVersion, + profile: GstGLSLProfile, + ) -> *const c_char; pub fn gst_gl_shader_attach(shader: *mut GstGLShader, stage: *mut GstGLSLStage) -> gboolean; - pub fn gst_gl_shader_attach_unlocked(shader: *mut GstGLShader, stage: *mut GstGLSLStage) -> gboolean; - pub fn gst_gl_shader_bind_attribute_location(shader: *mut GstGLShader, index: c_uint, name: *const c_char); - pub fn gst_gl_shader_bind_frag_data_location(shader: *mut GstGLShader, index: c_uint, name: *const c_char); - pub fn gst_gl_shader_compile_attach_stage(shader: *mut GstGLShader, stage: *mut GstGLSLStage, error: *mut *mut glib::GError) -> gboolean; + pub fn gst_gl_shader_attach_unlocked( + shader: *mut GstGLShader, + stage: *mut GstGLSLStage, + ) -> gboolean; + pub fn gst_gl_shader_bind_attribute_location( + shader: *mut GstGLShader, + index: c_uint, + name: *const c_char, + ); + pub fn gst_gl_shader_bind_frag_data_location( + shader: *mut GstGLShader, + index: c_uint, + name: *const c_char, + ); + pub fn gst_gl_shader_compile_attach_stage( + shader: *mut GstGLShader, + stage: *mut GstGLSLStage, + error: *mut *mut glib::GError, + ) -> gboolean; pub fn gst_gl_shader_detach(shader: *mut GstGLShader, stage: *mut GstGLSLStage); pub fn gst_gl_shader_detach_unlocked(shader: *mut GstGLShader, stage: *mut GstGLSLStage); - pub fn gst_gl_shader_get_attribute_location(shader: *mut GstGLShader, name: *const c_char) -> c_int; + pub fn gst_gl_shader_get_attribute_location( + shader: *mut GstGLShader, + name: *const c_char, + ) -> c_int; pub fn gst_gl_shader_get_program_handle(shader: *mut GstGLShader) -> c_int; pub fn gst_gl_shader_is_linked(shader: *mut GstGLShader) -> gboolean; pub fn gst_gl_shader_link(shader: *mut GstGLShader, error: *mut *mut glib::GError) -> gboolean; pub fn gst_gl_shader_release(shader: *mut GstGLShader); pub fn gst_gl_shader_release_unlocked(shader: *mut GstGLShader); - pub fn gst_gl_shader_set_uniform_1f(shader: *mut GstGLShader, name: *const c_char, value: c_float); - pub fn gst_gl_shader_set_uniform_1fv(shader: *mut GstGLShader, name: *const c_char, count: c_uint, value: *const c_float); - pub fn gst_gl_shader_set_uniform_1i(shader: *mut GstGLShader, name: *const c_char, value: c_int); - pub fn gst_gl_shader_set_uniform_1iv(shader: *mut GstGLShader, name: *const c_char, count: c_uint, value: *const c_int); - pub fn gst_gl_shader_set_uniform_2f(shader: *mut GstGLShader, name: *const c_char, v0: c_float, v1: c_float); - pub fn gst_gl_shader_set_uniform_2fv(shader: *mut GstGLShader, name: *const c_char, count: c_uint, value: *const c_float); - pub fn gst_gl_shader_set_uniform_2i(shader: *mut GstGLShader, name: *const c_char, v0: c_int, v1: c_int); - pub fn gst_gl_shader_set_uniform_2iv(shader: *mut GstGLShader, name: *const c_char, count: c_uint, value: *const c_int); - pub fn gst_gl_shader_set_uniform_3f(shader: *mut GstGLShader, name: *const c_char, v0: c_float, v1: c_float, v2: c_float); - pub fn gst_gl_shader_set_uniform_3fv(shader: *mut GstGLShader, name: *const c_char, count: c_uint, value: *const c_float); - pub fn gst_gl_shader_set_uniform_3i(shader: *mut GstGLShader, name: *const c_char, v0: c_int, v1: c_int, v2: c_int); - pub fn gst_gl_shader_set_uniform_3iv(shader: *mut GstGLShader, name: *const c_char, count: c_uint, value: *const c_int); - pub fn gst_gl_shader_set_uniform_4f(shader: *mut GstGLShader, name: *const c_char, v0: c_float, v1: c_float, v2: c_float, v3: c_float); - pub fn gst_gl_shader_set_uniform_4fv(shader: *mut GstGLShader, name: *const c_char, count: c_uint, value: *const c_float); - pub fn gst_gl_shader_set_uniform_4i(shader: *mut GstGLShader, name: *const c_char, v0: c_int, v1: c_int, v2: c_int, v3: c_int); - pub fn gst_gl_shader_set_uniform_4iv(shader: *mut GstGLShader, name: *const c_char, count: c_uint, value: *const c_int); - pub fn gst_gl_shader_set_uniform_matrix_2fv(shader: *mut GstGLShader, name: *const c_char, count: c_int, transpose: gboolean, value: *const c_float); - pub fn gst_gl_shader_set_uniform_matrix_2x3fv(shader: *mut GstGLShader, name: *const c_char, count: c_int, transpose: gboolean, value: *const c_float); - pub fn gst_gl_shader_set_uniform_matrix_2x4fv(shader: *mut GstGLShader, name: *const c_char, count: c_int, transpose: gboolean, value: *const c_float); - pub fn gst_gl_shader_set_uniform_matrix_3fv(shader: *mut GstGLShader, name: *const c_char, count: c_int, transpose: gboolean, value: *const c_float); - pub fn gst_gl_shader_set_uniform_matrix_3x2fv(shader: *mut GstGLShader, name: *const c_char, count: c_int, transpose: gboolean, value: *const c_float); - pub fn gst_gl_shader_set_uniform_matrix_3x4fv(shader: *mut GstGLShader, name: *const c_char, count: c_int, transpose: gboolean, value: *const c_float); - pub fn gst_gl_shader_set_uniform_matrix_4fv(shader: *mut GstGLShader, name: *const c_char, count: c_int, transpose: gboolean, value: *const c_float); - pub fn gst_gl_shader_set_uniform_matrix_4x2fv(shader: *mut GstGLShader, name: *const c_char, count: c_int, transpose: gboolean, value: *const c_float); - pub fn gst_gl_shader_set_uniform_matrix_4x3fv(shader: *mut GstGLShader, name: *const c_char, count: c_int, transpose: gboolean, value: *const c_float); + pub fn gst_gl_shader_set_uniform_1f( + shader: *mut GstGLShader, + name: *const c_char, + value: c_float, + ); + pub fn gst_gl_shader_set_uniform_1fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_uint, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_1i( + shader: *mut GstGLShader, + name: *const c_char, + value: c_int, + ); + pub fn gst_gl_shader_set_uniform_1iv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_uint, + value: *const c_int, + ); + pub fn gst_gl_shader_set_uniform_2f( + shader: *mut GstGLShader, + name: *const c_char, + v0: c_float, + v1: c_float, + ); + pub fn gst_gl_shader_set_uniform_2fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_uint, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_2i( + shader: *mut GstGLShader, + name: *const c_char, + v0: c_int, + v1: c_int, + ); + pub fn gst_gl_shader_set_uniform_2iv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_uint, + value: *const c_int, + ); + pub fn gst_gl_shader_set_uniform_3f( + shader: *mut GstGLShader, + name: *const c_char, + v0: c_float, + v1: c_float, + v2: c_float, + ); + pub fn gst_gl_shader_set_uniform_3fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_uint, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_3i( + shader: *mut GstGLShader, + name: *const c_char, + v0: c_int, + v1: c_int, + v2: c_int, + ); + pub fn gst_gl_shader_set_uniform_3iv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_uint, + value: *const c_int, + ); + pub fn gst_gl_shader_set_uniform_4f( + shader: *mut GstGLShader, + name: *const c_char, + v0: c_float, + v1: c_float, + v2: c_float, + v3: c_float, + ); + pub fn gst_gl_shader_set_uniform_4fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_uint, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_4i( + shader: *mut GstGLShader, + name: *const c_char, + v0: c_int, + v1: c_int, + v2: c_int, + v3: c_int, + ); + pub fn gst_gl_shader_set_uniform_4iv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_uint, + value: *const c_int, + ); + pub fn gst_gl_shader_set_uniform_matrix_2fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_matrix_2x3fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_matrix_2x4fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_matrix_3fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_matrix_3x2fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_matrix_3x4fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_matrix_4fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_matrix_4x2fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_matrix_4x3fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); pub fn gst_gl_shader_use(shader: *mut GstGLShader); //========================================================================= @@ -1896,26 +2555,75 @@ extern "C" { pub fn gst_gl_upload_get_type() -> GType; pub fn gst_gl_upload_new(context: *mut GstGLContext) -> *mut GstGLUpload; pub fn gst_gl_upload_get_input_template_caps() -> *mut gst::GstCaps; - pub fn gst_gl_upload_get_caps(upload: *mut GstGLUpload, in_caps: *mut *mut gst::GstCaps, out_caps: *mut *mut gst::GstCaps); - pub fn gst_gl_upload_perform_with_buffer(upload: *mut GstGLUpload, buffer: *mut gst::GstBuffer, outbuf_ptr: *mut *mut gst::GstBuffer) -> GstGLUploadReturn; - pub fn gst_gl_upload_propose_allocation(upload: *mut GstGLUpload, decide_query: *mut gst::GstQuery, query: *mut gst::GstQuery); - pub fn gst_gl_upload_set_caps(upload: *mut GstGLUpload, in_caps: *mut gst::GstCaps, out_caps: *mut gst::GstCaps) -> gboolean; + pub fn gst_gl_upload_get_caps( + upload: *mut GstGLUpload, + in_caps: *mut *mut gst::GstCaps, + out_caps: *mut *mut gst::GstCaps, + ); + pub fn gst_gl_upload_perform_with_buffer( + upload: *mut GstGLUpload, + buffer: *mut gst::GstBuffer, + outbuf_ptr: *mut *mut gst::GstBuffer, + ) -> GstGLUploadReturn; + pub fn gst_gl_upload_propose_allocation( + upload: *mut GstGLUpload, + decide_query: *mut gst::GstQuery, + query: *mut gst::GstQuery, + ); + pub fn gst_gl_upload_set_caps( + upload: *mut GstGLUpload, + in_caps: *mut gst::GstCaps, + out_caps: *mut gst::GstCaps, + ) -> gboolean; pub fn gst_gl_upload_set_context(upload: *mut GstGLUpload, context: *mut GstGLContext); - pub fn gst_gl_upload_transform_caps(upload: *mut GstGLUpload, context: *mut GstGLContext, direction: gst::GstPadDirection, caps: *mut gst::GstCaps, filter: *mut gst::GstCaps) -> *mut gst::GstCaps; + pub fn gst_gl_upload_transform_caps( + upload: *mut GstGLUpload, + context: *mut GstGLContext, + direction: gst::GstPadDirection, + caps: *mut gst::GstCaps, + filter: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; //========================================================================= // GstGLViewConvert //========================================================================= pub fn gst_gl_view_convert_get_type() -> GType; pub fn gst_gl_view_convert_new() -> *mut GstGLViewConvert; - pub fn gst_gl_view_convert_fixate_caps(viewconvert: *mut GstGLViewConvert, direction: gst::GstPadDirection, caps: *mut gst::GstCaps, othercaps: *mut gst::GstCaps) -> *mut gst::GstCaps; - pub fn gst_gl_view_convert_get_output(viewconvert: *mut GstGLViewConvert, outbuf_ptr: *mut *mut gst::GstBuffer) -> gst::GstFlowReturn; - pub fn gst_gl_view_convert_perform(viewconvert: *mut GstGLViewConvert, inbuf: *mut gst::GstBuffer) -> *mut gst::GstBuffer; + pub fn gst_gl_view_convert_fixate_caps( + viewconvert: *mut GstGLViewConvert, + direction: gst::GstPadDirection, + caps: *mut gst::GstCaps, + othercaps: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; + pub fn gst_gl_view_convert_get_output( + viewconvert: *mut GstGLViewConvert, + outbuf_ptr: *mut *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; + pub fn gst_gl_view_convert_perform( + viewconvert: *mut GstGLViewConvert, + inbuf: *mut gst::GstBuffer, + ) -> *mut gst::GstBuffer; pub fn gst_gl_view_convert_reset(viewconvert: *mut GstGLViewConvert); - pub fn gst_gl_view_convert_set_caps(viewconvert: *mut GstGLViewConvert, in_caps: *mut gst::GstCaps, out_caps: *mut gst::GstCaps) -> gboolean; - pub fn gst_gl_view_convert_set_context(viewconvert: *mut GstGLViewConvert, context: *mut GstGLContext); - pub fn gst_gl_view_convert_submit_input_buffer(viewconvert: *mut GstGLViewConvert, is_discont: gboolean, input: *mut gst::GstBuffer) -> gst::GstFlowReturn; - pub fn gst_gl_view_convert_transform_caps(viewconvert: *mut GstGLViewConvert, direction: gst::GstPadDirection, caps: *mut gst::GstCaps, filter: *mut gst::GstCaps) -> *mut gst::GstCaps; + pub fn gst_gl_view_convert_set_caps( + viewconvert: *mut GstGLViewConvert, + in_caps: *mut gst::GstCaps, + out_caps: *mut gst::GstCaps, + ) -> gboolean; + pub fn gst_gl_view_convert_set_context( + viewconvert: *mut GstGLViewConvert, + context: *mut GstGLContext, + ); + pub fn gst_gl_view_convert_submit_input_buffer( + viewconvert: *mut GstGLViewConvert, + is_discont: gboolean, + input: *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; + pub fn gst_gl_view_convert_transform_caps( + viewconvert: *mut GstGLViewConvert, + direction: gst::GstPadDirection, + caps: *mut gst::GstCaps, + filter: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; //========================================================================= // GstGLWindow @@ -1927,50 +2635,155 @@ extern "C" { pub fn gst_gl_window_draw(window: *mut GstGLWindow); pub fn gst_gl_window_get_context(window: *mut GstGLWindow) -> *mut GstGLContext; pub fn gst_gl_window_get_display(window: *mut GstGLWindow) -> uintptr_t; - pub fn gst_gl_window_get_surface_dimensions(window: *mut GstGLWindow, width: *mut c_uint, height: *mut c_uint); + pub fn gst_gl_window_get_surface_dimensions( + window: *mut GstGLWindow, + width: *mut c_uint, + height: *mut c_uint, + ); pub fn gst_gl_window_get_window_handle(window: *mut GstGLWindow) -> uintptr_t; pub fn gst_gl_window_handle_events(window: *mut GstGLWindow, handle_events: gboolean); pub fn gst_gl_window_queue_resize(window: *mut GstGLWindow); pub fn gst_gl_window_quit(window: *mut GstGLWindow); pub fn gst_gl_window_resize(window: *mut GstGLWindow, width: c_uint, height: c_uint); pub fn gst_gl_window_run(window: *mut GstGLWindow); - pub fn gst_gl_window_send_key_event(window: *mut GstGLWindow, event_type: *const c_char, key_str: *const c_char); - pub fn gst_gl_window_send_message(window: *mut GstGLWindow, callback: GstGLWindowCB, data: gpointer); - pub fn gst_gl_window_send_message_async(window: *mut GstGLWindow, callback: GstGLWindowCB, data: gpointer, destroy: glib::GDestroyNotify); - pub fn gst_gl_window_send_mouse_event(window: *mut GstGLWindow, event_type: *const c_char, button: c_int, posx: c_double, posy: c_double); - pub fn gst_gl_window_set_close_callback(window: *mut GstGLWindow, callback: GstGLWindowCB, data: gpointer, destroy_notify: glib::GDestroyNotify); - pub fn gst_gl_window_set_draw_callback(window: *mut GstGLWindow, callback: GstGLWindowCB, data: gpointer, destroy_notify: glib::GDestroyNotify); + pub fn gst_gl_window_send_key_event( + window: *mut GstGLWindow, + event_type: *const c_char, + key_str: *const c_char, + ); + pub fn gst_gl_window_send_message( + window: *mut GstGLWindow, + callback: GstGLWindowCB, + data: gpointer, + ); + pub fn gst_gl_window_send_message_async( + window: *mut GstGLWindow, + callback: GstGLWindowCB, + data: gpointer, + destroy: glib::GDestroyNotify, + ); + pub fn gst_gl_window_send_mouse_event( + window: *mut GstGLWindow, + event_type: *const c_char, + button: c_int, + posx: c_double, + posy: c_double, + ); + pub fn gst_gl_window_set_close_callback( + window: *mut GstGLWindow, + callback: GstGLWindowCB, + data: gpointer, + destroy_notify: glib::GDestroyNotify, + ); + pub fn gst_gl_window_set_draw_callback( + window: *mut GstGLWindow, + callback: GstGLWindowCB, + data: gpointer, + destroy_notify: glib::GDestroyNotify, + ); pub fn gst_gl_window_set_preferred_size(window: *mut GstGLWindow, width: c_int, height: c_int); - pub fn gst_gl_window_set_render_rectangle(window: *mut GstGLWindow, x: c_int, y: c_int, width: c_int, height: c_int) -> gboolean; - pub fn gst_gl_window_set_resize_callback(window: *mut GstGLWindow, callback: GstGLWindowResizeCB, data: gpointer, destroy_notify: glib::GDestroyNotify); + pub fn gst_gl_window_set_render_rectangle( + window: *mut GstGLWindow, + x: c_int, + y: c_int, + width: c_int, + height: c_int, + ) -> gboolean; + pub fn gst_gl_window_set_resize_callback( + window: *mut GstGLWindow, + callback: GstGLWindowResizeCB, + data: gpointer, + destroy_notify: glib::GDestroyNotify, + ); pub fn gst_gl_window_set_window_handle(window: *mut GstGLWindow, handle: uintptr_t); pub fn gst_gl_window_show(window: *mut GstGLWindow); //========================================================================= // Other functions //========================================================================= - pub fn gst_buffer_add_gl_sync_meta(context: *mut GstGLContext, buffer: *mut gst::GstBuffer) -> *mut GstGLSyncMeta; - pub fn gst_buffer_add_gl_sync_meta_full(context: *mut GstGLContext, buffer: *mut gst::GstBuffer, data: gpointer) -> *mut GstGLSyncMeta; - pub fn gst_buffer_pool_config_get_gl_allocation_params(config: *mut gst::GstStructure) -> *mut GstGLAllocationParams; - pub fn gst_buffer_pool_config_set_gl_allocation_params(config: *mut gst::GstStructure, params: *mut GstGLAllocationParams); - pub fn gst_context_get_gl_display(context: *mut gst::GstContext, display: *mut *mut GstGLDisplay) -> gboolean; + pub fn gst_buffer_add_gl_sync_meta( + context: *mut GstGLContext, + buffer: *mut gst::GstBuffer, + ) -> *mut GstGLSyncMeta; + pub fn gst_buffer_add_gl_sync_meta_full( + context: *mut GstGLContext, + buffer: *mut gst::GstBuffer, + data: gpointer, + ) -> *mut GstGLSyncMeta; + pub fn gst_buffer_pool_config_get_gl_allocation_params( + config: *mut gst::GstStructure, + ) -> *mut GstGLAllocationParams; + pub fn gst_buffer_pool_config_set_gl_allocation_params( + config: *mut gst::GstStructure, + params: *mut GstGLAllocationParams, + ); + pub fn gst_context_get_gl_display( + context: *mut gst::GstContext, + display: *mut *mut GstGLDisplay, + ) -> gboolean; pub fn gst_context_set_gl_display(context: *mut gst::GstContext, display: *mut GstGLDisplay); pub fn gst_gl_check_extension(name: *const c_char, ext: *const c_char) -> gboolean; - pub fn gst_gl_element_propagate_display_context(element: *mut gst::GstElement, display: *mut GstGLDisplay); - pub fn gst_gl_ensure_element_data(element: gpointer, display_ptr: *mut *mut GstGLDisplay, other_context_ptr: *mut *mut GstGLContext) -> gboolean; - pub fn gst_gl_get_plane_data_size(info: *mut gst_video::GstVideoInfo, align: *mut gst_video::GstVideoAlignment, plane: c_uint) -> size_t; - pub fn gst_gl_get_plane_start(info: *mut gst_video::GstVideoInfo, valign: *mut gst_video::GstVideoAlignment, plane: c_uint) -> size_t; - pub fn gst_gl_handle_context_query(element: *mut gst::GstElement, query: *mut gst::GstQuery, display: *mut GstGLDisplay, context: *mut GstGLContext, other_context: *mut GstGLContext) -> gboolean; - pub fn gst_gl_handle_set_context(element: *mut gst::GstElement, context: *mut gst::GstContext, display: *mut *mut GstGLDisplay, other_context: *mut *mut GstGLContext) -> gboolean; + pub fn gst_gl_element_propagate_display_context( + element: *mut gst::GstElement, + display: *mut GstGLDisplay, + ); + pub fn gst_gl_ensure_element_data( + element: gpointer, + display_ptr: *mut *mut GstGLDisplay, + other_context_ptr: *mut *mut GstGLContext, + ) -> gboolean; + pub fn gst_gl_get_plane_data_size( + info: *mut gst_video::GstVideoInfo, + align: *mut gst_video::GstVideoAlignment, + plane: c_uint, + ) -> size_t; + pub fn gst_gl_get_plane_start( + info: *mut gst_video::GstVideoInfo, + valign: *mut gst_video::GstVideoAlignment, + plane: c_uint, + ) -> size_t; + pub fn gst_gl_handle_context_query( + element: *mut gst::GstElement, + query: *mut gst::GstQuery, + display: *mut GstGLDisplay, + context: *mut GstGLContext, + other_context: *mut GstGLContext, + ) -> gboolean; + pub fn gst_gl_handle_set_context( + element: *mut gst::GstElement, + context: *mut gst::GstContext, + display: *mut *mut GstGLDisplay, + other_context: *mut *mut GstGLContext, + ) -> gboolean; pub fn gst_gl_insert_debug_marker(context: *mut GstGLContext, format: *const c_char, ...); - pub fn gst_gl_sized_gl_format_from_gl_format_type(context: *mut GstGLContext, format: c_uint, type_: c_uint) -> c_uint; + pub fn gst_gl_sized_gl_format_from_gl_format_type( + context: *mut GstGLContext, + format: c_uint, + type_: c_uint, + ) -> c_uint; pub fn gst_gl_stereo_downmix_mode_get_type() -> GType; pub fn gst_gl_sync_meta_api_get_type() -> GType; - pub fn gst_gl_value_get_texture_target_mask(value: *const gobject::GValue) -> GstGLTextureTarget; - pub fn gst_gl_value_set_texture_target(value: *mut gobject::GValue, target: GstGLTextureTarget) -> gboolean; - pub fn gst_gl_value_set_texture_target_from_mask(value: *mut gobject::GValue, target_mask: GstGLTextureTarget) -> gboolean; - pub fn gst_gl_version_to_glsl_version(gl_api: GstGLAPI, maj: c_int, min: c_int) -> GstGLSLVersion; - pub fn gst_glsl_string_get_version_profile(s: *const c_char, version: *mut GstGLSLVersion, profile: *mut GstGLSLProfile) -> gboolean; + pub fn gst_gl_value_get_texture_target_mask( + value: *const gobject::GValue, + ) -> GstGLTextureTarget; + pub fn gst_gl_value_set_texture_target( + value: *mut gobject::GValue, + target: GstGLTextureTarget, + ) -> gboolean; + pub fn gst_gl_value_set_texture_target_from_mask( + value: *mut gobject::GValue, + target_mask: GstGLTextureTarget, + ) -> gboolean; + pub fn gst_gl_version_to_glsl_version( + gl_api: GstGLAPI, + maj: c_int, + min: c_int, + ) -> GstGLSLVersion; + pub fn gst_glsl_string_get_version_profile( + s: *const c_char, + version: *mut GstGLSLVersion, + profile: *mut GstGLSLProfile, + ) -> gboolean; pub fn gst_is_gl_base_memory(mem: *mut gst::GstMemory) -> gboolean; pub fn gst_is_gl_buffer(mem: *mut gst::GstMemory) -> gboolean; pub fn gst_is_gl_memory(mem: *mut gst::GstMemory) -> gboolean; diff --git a/gstreamer-gl-sys/src/manual.rs b/gstreamer-gl-sys/src/manual.rs index c9eb530b5..de3fc164f 100644 --- a/gstreamer-gl-sys/src/manual.rs +++ b/gstreamer-gl-sys/src/manual.rs @@ -2,7 +2,8 @@ use libc::c_char; // See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/497 #[cfg(any(feature = "egl", feature = "dox"))] -pub const GST_GL_DISPLAY_EGL_NAME: *const c_char = b"gst.gl.display.egl\0" as *const u8 as *const c_char; +pub const GST_GL_DISPLAY_EGL_NAME: *const c_char = + b"gst.gl.display.egl\0" as *const u8 as *const c_char; // See https://gitlab.gnome.org/GNOME/gobject-introspection/issues/238 pub const GST_GL_COLOR_CONVERT_VIDEO_CAPS: *const c_char = b"video/x-raw(memory:GLMemory), format = (string) { RGBA, RGB, RGBx, BGR, BGRx, BGRA, xRGB, xBGR, ARGB, ABGR, Y444, I420, YV12, Y42B, Y41B, NV12, NV21, YUY2, UYVY, AYUV, GRAY8, GRAY16_LE, GRAY16_BE, RGB16, BGR16 }, width = (int) [ 1, max ], height = (int) [ 1, max ], framerate = (fraction) [ 0, max ], texture-target = (string) { 2D, rectangle, external-oes } ; video/x-raw(memory:GLMemory,meta:GstVideoOverlayComposition), format = (string) { RGBA, RGB, RGBx, BGR, BGRx, BGRA, xRGB, xBGR, ARGB, ABGR, Y444, I420, YV12, Y42B, Y41B, NV12, NV21, YUY2, UYVY, AYUV, GRAY8, GRAY16_LE, GRAY16_BE, RGB16, BGR16 }, width = (int) [ 1, max ], height = (int) [ 1, max ], framerate = (fraction) [ 0, max ], texture-target = (string) { 2D, rectangle, external-oes }\0" as *const u8 as *const c_char; diff --git a/gstreamer-gl-sys/tests/abi.rs b/gstreamer-gl-sys/tests/abi.rs index 954f67310..aa3d9edfc 100644 --- a/gstreamer-gl-sys/tests/abi.rs +++ b/gstreamer-gl-sys/tests/abi.rs @@ -5,13 +5,13 @@ extern crate gstreamer_gl_sys; extern crate shell_words; extern crate tempdir; +use gstreamer_gl_sys::*; use std::env; use std::error::Error; -use std::path::Path; use std::mem::{align_of, size_of}; +use std::path::Path; use std::process::Command; use std::str; -use gstreamer_gl_sys::*; static PACKAGES: &[&str] = &["gstreamer-gl-1.0"]; @@ -47,8 +47,7 @@ impl Compiler { cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { - return Err(format!("compilation command {:?} failed, {}", - &cmd, status).into()); + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } @@ -77,14 +76,12 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { cmd.args(packages); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {:?} returned {}", - &cmd, out.status).into()); + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } - #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, @@ -115,9 +112,8 @@ impl Results { fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", - self.passed, - self.failed, - self.failed_to_compile) + self.passed, self.failed, self.failed_to_compile + ) } fn expect_total_success(&self) { if self.failed == 0 { @@ -133,24 +129,28 @@ fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!("1", - get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), - "failed to obtain correct constant value for 1"); + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); - eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_value, c_value); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); } } }; @@ -166,24 +166,31 @@ fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!(Layout {size: 1, alignment: 1}, - get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), - "failed to obtain correct layout for char type"); + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); - eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_layout, &c_layout); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); } } }; @@ -203,15 +210,14 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result Result> { @@ -223,96 +229,511 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result(), alignment: align_of::()}), - ("GstGLAllocationParams", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLAsyncDebug", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLBaseFilter", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLBaseFilterClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLBaseMemory", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLBaseMemoryAllocator", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLBaseMemoryAllocatorClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLBaseMemoryError", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLBaseMemoryTransfer", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLBuffer", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLBufferAllocationParams", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLBufferAllocator", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLBufferAllocatorClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLBufferPool", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLBufferPoolClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLColorConvert", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLColorConvertClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLContext", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLContextClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLContextError", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLDisplay", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLDisplayClass", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstGLAPI", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLAllocationParams", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLAsyncDebug", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBaseFilter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBaseFilterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBaseMemory", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBaseMemoryAllocator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBaseMemoryAllocatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBaseMemoryError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBaseMemoryTransfer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBuffer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBufferAllocationParams", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBufferAllocator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBufferAllocatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBufferPool", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBufferPoolClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLColorConvert", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLColorConvertClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLContext", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLContextClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLContextError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLDisplay", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLDisplayClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), #[cfg(any(feature = "egl", feature = "dox"))] - ("GstGLDisplayEGL", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstGLDisplayEGL", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), #[cfg(any(feature = "egl", feature = "dox"))] - ("GstGLDisplayEGLClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLDisplayType", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstGLDisplayEGLClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLDisplayType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), #[cfg(any(feature = "wayland", feature = "dox"))] - ("GstGLDisplayWayland", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstGLDisplayWayland", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), #[cfg(any(feature = "wayland", feature = "dox"))] - ("GstGLDisplayWaylandClass", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstGLDisplayWaylandClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), #[cfg(any(feature = "x11", feature = "dox"))] - ("GstGLDisplayX11", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstGLDisplayX11", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), #[cfg(any(feature = "x11", feature = "dox"))] - ("GstGLDisplayX11Class", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLFilter", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLFilterClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLFormat", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLFramebuffer", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLFramebufferClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLMemory", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLMemoryAllocator", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLMemoryAllocatorClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLMemoryPBO", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLMemoryPBOAllocator", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLMemoryPBOAllocatorClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLOverlayCompositor", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLOverlayCompositorClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLPlatform", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLQuery", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLQueryType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLRenderbuffer", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLRenderbufferAllocationParams", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLRenderbufferAllocator", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLRenderbufferAllocatorClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLSLError", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLSLProfile", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLSLStage", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLSLStageClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLSLVersion", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLShader", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLShaderClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLStereoDownmix", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLSyncMeta", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLTextureTarget", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLUpload", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLUploadClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLUploadReturn", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLVideoAllocationParams", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLViewConvert", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLViewConvertClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLWindow", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLWindowClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGLWindowError", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstGLDisplayX11Class", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLFilter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLFilterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLFormat", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLFramebuffer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLFramebufferClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLMemory", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLMemoryAllocator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLMemoryAllocatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLMemoryPBO", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLMemoryPBOAllocator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLMemoryPBOAllocatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLOverlayCompositor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLOverlayCompositorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLPlatform", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLQuery", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLQueryType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLRenderbuffer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLRenderbufferAllocationParams", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLRenderbufferAllocator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLRenderbufferAllocatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLSLError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLSLProfile", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLSLStage", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLSLStageClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLSLVersion", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLShader", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLShaderClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLStereoDownmix", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLSyncMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLTextureTarget", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLUpload", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLUploadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLUploadReturn", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLVideoAllocationParams", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLViewConvert", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLViewConvertClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLWindow", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLWindowClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLWindowError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ @@ -443,5 +864,3 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_GL_WINDOW_ERROR_RESOURCE_UNAVAILABLE", "2"), ("GST_MAP_GL", "131072"), ]; - - diff --git a/gstreamer-mpegts-sys/build.rs b/gstreamer-mpegts-sys/build.rs index 76a99cfa6..31f1fc86d 100644 --- a/gstreamer-mpegts-sys/build.rs +++ b/gstreamer-mpegts-sys/build.rs @@ -6,8 +6,8 @@ extern crate pkg_config; use pkg_config::{Config, Error}; use std::env; -use std::io::prelude::*; use std::io; +use std::io::prelude::*; use std::process; fn main() { @@ -48,7 +48,7 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()) + return Ok(()); } let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); @@ -70,8 +70,10 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } for path in library.link_paths.iter() { - println!("cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist")); + println!( + "cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist") + ); } } Ok(()) @@ -85,4 +87,3 @@ fn find() -> Result<(), Error> { Err(err) => Err(err), } } - diff --git a/gstreamer-mpegts-sys/src/lib.rs b/gstreamer-mpegts-sys/src/lib.rs index 1a4fb9711..8623a8793 100644 --- a/gstreamer-mpegts-sys/src/lib.rs +++ b/gstreamer-mpegts-sys/src/lib.rs @@ -3,17 +3,22 @@ // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] -extern crate libc; extern crate glib_sys as glib; extern crate gobject_sys as gobject; extern crate gstreamer_sys as gst; +extern crate libc; #[allow(unused_imports)] -use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, - c_short, c_ushort, c_long, c_ulong, - c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; +use libc::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, + intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -410,7 +415,8 @@ pub const GST_MTS_TABLE_ID_ATSC_DATA_SERVICE: GstMpegtsSectionATSCTableID = 207; pub const GST_MTS_TABLE_ID_ATSC_NETWORK_RESOURCE: GstMpegtsSectionATSCTableID = 209; pub const GST_MTS_TABLE_ID_ATSC_LONG_TERM_SERVICE: GstMpegtsSectionATSCTableID = 210; pub const GST_MTS_TABLE_ID_ATSC_DIRECTED_CHANNEL_CHANGE: GstMpegtsSectionATSCTableID = 211; -pub const GST_MTS_TABLE_ID_ATSC_DIRECTED_CHANNEL_CHANGE_SECTION_CODE: GstMpegtsSectionATSCTableID = 212; +pub const GST_MTS_TABLE_ID_ATSC_DIRECTED_CHANNEL_CHANGE_SECTION_CODE: GstMpegtsSectionATSCTableID = + 212; pub const GST_MTS_TABLE_ID_ATSC_AGGREGATE_EVENT_INFORMATION: GstMpegtsSectionATSCTableID = 214; pub const GST_MTS_TABLE_ID_ATSC_AGGREGATE_EXTENDED_TEXT: GstMpegtsSectionATSCTableID = 215; pub const GST_MTS_TABLE_ID_ATSC_AGGREGATE_DATA_EVENT: GstMpegtsSectionATSCTableID = 217; @@ -587,10 +593,10 @@ pub struct GstMpegtsAtscEIT { impl ::std::fmt::Debug for GstMpegtsAtscEIT { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsAtscEIT @ {:?}", self as *const _)) - .field("source_id", &self.source_id) - .field("protocol_version", &self.protocol_version) - .field("events", &self.events) - .finish() + .field("source_id", &self.source_id) + .field("protocol_version", &self.protocol_version) + .field("events", &self.events) + .finish() } } @@ -608,13 +614,13 @@ pub struct GstMpegtsAtscEITEvent { impl ::std::fmt::Debug for GstMpegtsAtscEITEvent { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsAtscEITEvent @ {:?}", self as *const _)) - .field("event_id", &self.event_id) - .field("start_time", &self.start_time) - .field("etm_location", &self.etm_location) - .field("length_in_seconds", &self.length_in_seconds) - .field("titles", &self.titles) - .field("descriptors", &self.descriptors) - .finish() + .field("event_id", &self.event_id) + .field("start_time", &self.start_time) + .field("etm_location", &self.etm_location) + .field("length_in_seconds", &self.length_in_seconds) + .field("titles", &self.titles) + .field("descriptors", &self.descriptors) + .finish() } } @@ -630,11 +636,11 @@ pub struct GstMpegtsAtscETT { impl ::std::fmt::Debug for GstMpegtsAtscETT { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsAtscETT @ {:?}", self as *const _)) - .field("ett_table_id_extension", &self.ett_table_id_extension) - .field("protocol_version", &self.protocol_version) - .field("etm_id", &self.etm_id) - .field("messages", &self.messages) - .finish() + .field("ett_table_id_extension", &self.ett_table_id_extension) + .field("protocol_version", &self.protocol_version) + .field("etm_id", &self.etm_id) + .field("messages", &self.messages) + .finish() } } @@ -650,11 +656,11 @@ pub struct GstMpegtsAtscMGT { impl ::std::fmt::Debug for GstMpegtsAtscMGT { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsAtscMGT @ {:?}", self as *const _)) - .field("protocol_version", &self.protocol_version) - .field("tables_defined", &self.tables_defined) - .field("tables", &self.tables) - .field("descriptors", &self.descriptors) - .finish() + .field("protocol_version", &self.protocol_version) + .field("tables_defined", &self.tables_defined) + .field("tables", &self.tables) + .field("descriptors", &self.descriptors) + .finish() } } @@ -671,12 +677,12 @@ pub struct GstMpegtsAtscMGTTable { impl ::std::fmt::Debug for GstMpegtsAtscMGTTable { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsAtscMGTTable @ {:?}", self as *const _)) - .field("table_type", &self.table_type) - .field("pid", &self.pid) - .field("version_number", &self.version_number) - .field("number_bytes", &self.number_bytes) - .field("descriptors", &self.descriptors) - .finish() + .field("table_type", &self.table_type) + .field("pid", &self.pid) + .field("version_number", &self.version_number) + .field("number_bytes", &self.number_bytes) + .field("descriptors", &self.descriptors) + .finish() } } @@ -690,9 +696,9 @@ pub struct GstMpegtsAtscMultString { impl ::std::fmt::Debug for GstMpegtsAtscMultString { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsAtscMultString @ {:?}", self as *const _)) - .field("iso_639_langcode", &self.iso_639_langcode) - .field("segments", &self.segments) - .finish() + .field("iso_639_langcode", &self.iso_639_langcode) + .field("segments", &self.segments) + .finish() } } @@ -712,15 +718,15 @@ pub struct GstMpegtsAtscSTT { impl ::std::fmt::Debug for GstMpegtsAtscSTT { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsAtscSTT @ {:?}", self as *const _)) - .field("protocol_version", &self.protocol_version) - .field("system_time", &self.system_time) - .field("gps_utc_offset", &self.gps_utc_offset) - .field("ds_status", &self.ds_status) - .field("ds_dayofmonth", &self.ds_dayofmonth) - .field("ds_hour", &self.ds_hour) - .field("descriptors", &self.descriptors) - .field("utc_datetime", &self.utc_datetime) - .finish() + .field("protocol_version", &self.protocol_version) + .field("system_time", &self.system_time) + .field("gps_utc_offset", &self.gps_utc_offset) + .field("ds_status", &self.ds_status) + .field("ds_dayofmonth", &self.ds_dayofmonth) + .field("ds_hour", &self.ds_hour) + .field("descriptors", &self.descriptors) + .field("utc_datetime", &self.utc_datetime) + .finish() } } @@ -736,13 +742,16 @@ pub struct GstMpegtsAtscStringSegment { impl ::std::fmt::Debug for GstMpegtsAtscStringSegment { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsAtscStringSegment @ {:?}", self as *const _)) - .field("compression_type", &self.compression_type) - .field("mode", &self.mode) - .field("compressed_data_size", &self.compressed_data_size) - .field("compressed_data", &self.compressed_data) - .field("cached_string", &self.cached_string) - .finish() + f.debug_struct(&format!( + "GstMpegtsAtscStringSegment @ {:?}", + self as *const _ + )) + .field("compression_type", &self.compression_type) + .field("mode", &self.mode) + .field("compressed_data_size", &self.compressed_data_size) + .field("compressed_data", &self.compressed_data) + .field("cached_string", &self.cached_string) + .finish() } } @@ -758,11 +767,11 @@ pub struct GstMpegtsAtscVCT { impl ::std::fmt::Debug for GstMpegtsAtscVCT { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsAtscVCT @ {:?}", self as *const _)) - .field("transport_stream_id", &self.transport_stream_id) - .field("protocol_version", &self.protocol_version) - .field("sources", &self.sources) - .field("descriptors", &self.descriptors) - .finish() + .field("transport_stream_id", &self.transport_stream_id) + .field("protocol_version", &self.protocol_version) + .field("sources", &self.sources) + .field("descriptors", &self.descriptors) + .finish() } } @@ -790,23 +799,23 @@ pub struct GstMpegtsAtscVCTSource { impl ::std::fmt::Debug for GstMpegtsAtscVCTSource { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsAtscVCTSource @ {:?}", self as *const _)) - .field("short_name", &self.short_name) - .field("major_channel_number", &self.major_channel_number) - .field("minor_channel_number", &self.minor_channel_number) - .field("modulation_mode", &self.modulation_mode) - .field("carrier_frequency", &self.carrier_frequency) - .field("channel_TSID", &self.channel_TSID) - .field("program_number", &self.program_number) - .field("ETM_location", &self.ETM_location) - .field("access_controlled", &self.access_controlled) - .field("hidden", &self.hidden) - .field("path_select", &self.path_select) - .field("out_of_band", &self.out_of_band) - .field("hide_guide", &self.hide_guide) - .field("service_type", &self.service_type) - .field("source_id", &self.source_id) - .field("descriptors", &self.descriptors) - .finish() + .field("short_name", &self.short_name) + .field("major_channel_number", &self.major_channel_number) + .field("minor_channel_number", &self.minor_channel_number) + .field("modulation_mode", &self.modulation_mode) + .field("carrier_frequency", &self.carrier_frequency) + .field("channel_TSID", &self.channel_TSID) + .field("program_number", &self.program_number) + .field("ETM_location", &self.ETM_location) + .field("access_controlled", &self.access_controlled) + .field("hidden", &self.hidden) + .field("path_select", &self.path_select) + .field("out_of_band", &self.out_of_band) + .field("hide_guide", &self.hide_guide) + .field("service_type", &self.service_type) + .field("source_id", &self.source_id) + .field("descriptors", &self.descriptors) + .finish() } } @@ -820,9 +829,9 @@ pub struct GstMpegtsBAT { impl ::std::fmt::Debug for GstMpegtsBAT { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsBAT @ {:?}", self as *const _)) - .field("descriptors", &self.descriptors) - .field("streams", &self.streams) - .finish() + .field("descriptors", &self.descriptors) + .field("streams", &self.streams) + .finish() } } @@ -837,10 +846,10 @@ pub struct GstMpegtsBATStream { impl ::std::fmt::Debug for GstMpegtsBATStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsBATStream @ {:?}", self as *const _)) - .field("transport_stream_id", &self.transport_stream_id) - .field("original_network_id", &self.original_network_id) - .field("descriptors", &self.descriptors) - .finish() + .field("transport_stream_id", &self.transport_stream_id) + .field("original_network_id", &self.original_network_id) + .field("descriptors", &self.descriptors) + .finish() } } @@ -856,13 +865,16 @@ pub struct GstMpegtsCableDeliverySystemDescriptor { impl ::std::fmt::Debug for GstMpegtsCableDeliverySystemDescriptor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsCableDeliverySystemDescriptor @ {:?}", self as *const _)) - .field("frequency", &self.frequency) - .field("outer_fec", &self.outer_fec) - .field("modulation", &self.modulation) - .field("symbol_rate", &self.symbol_rate) - .field("fec_inner", &self.fec_inner) - .finish() + f.debug_struct(&format!( + "GstMpegtsCableDeliverySystemDescriptor @ {:?}", + self as *const _ + )) + .field("frequency", &self.frequency) + .field("outer_fec", &self.outer_fec) + .field("modulation", &self.modulation) + .field("symbol_rate", &self.symbol_rate) + .field("fec_inner", &self.fec_inner) + .finish() } } @@ -878,13 +890,16 @@ pub struct GstMpegtsComponentDescriptor { impl ::std::fmt::Debug for GstMpegtsComponentDescriptor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsComponentDescriptor @ {:?}", self as *const _)) - .field("stream_content", &self.stream_content) - .field("component_type", &self.component_type) - .field("component_tag", &self.component_tag) - .field("language_code", &self.language_code) - .field("text", &self.text) - .finish() + f.debug_struct(&format!( + "GstMpegtsComponentDescriptor @ {:?}", + self as *const _ + )) + .field("stream_content", &self.stream_content) + .field("component_type", &self.component_type) + .field("component_tag", &self.component_tag) + .field("language_code", &self.language_code) + .field("text", &self.text) + .finish() } } @@ -899,10 +914,10 @@ pub struct GstMpegtsContent { impl ::std::fmt::Debug for GstMpegtsContent { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsContent @ {:?}", self as *const _)) - .field("content_nibble_1", &self.content_nibble_1) - .field("content_nibble_2", &self.content_nibble_2) - .field("user_byte", &self.user_byte) - .finish() + .field("content_nibble_1", &self.content_nibble_1) + .field("content_nibble_2", &self.content_nibble_2) + .field("user_byte", &self.user_byte) + .finish() } } @@ -920,14 +935,17 @@ pub struct GstMpegtsDVBLinkageDescriptor { impl ::std::fmt::Debug for GstMpegtsDVBLinkageDescriptor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsDVBLinkageDescriptor @ {:?}", self as *const _)) - .field("transport_stream_id", &self.transport_stream_id) - .field("original_network_id", &self.original_network_id) - .field("service_id", &self.service_id) - .field("linkage_type", &self.linkage_type) - .field("private_data_length", &self.private_data_length) - .field("private_data_bytes", &self.private_data_bytes) - .finish() + f.debug_struct(&format!( + "GstMpegtsDVBLinkageDescriptor @ {:?}", + self as *const _ + )) + .field("transport_stream_id", &self.transport_stream_id) + .field("original_network_id", &self.original_network_id) + .field("service_id", &self.service_id) + .field("linkage_type", &self.linkage_type) + .field("private_data_length", &self.private_data_length) + .field("private_data_bytes", &self.private_data_bytes) + .finish() } } @@ -941,11 +959,14 @@ pub struct GstMpegtsDVBLinkageEvent { impl ::std::fmt::Debug for GstMpegtsDVBLinkageEvent { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsDVBLinkageEvent @ {:?}", self as *const _)) - .field("target_event_id", &self.target_event_id) - .field("target_listed", &self.target_listed) - .field("event_simulcast", &self.event_simulcast) - .finish() + f.debug_struct(&format!( + "GstMpegtsDVBLinkageEvent @ {:?}", + self as *const _ + )) + .field("target_event_id", &self.target_event_id) + .field("target_listed", &self.target_listed) + .field("event_simulcast", &self.event_simulcast) + .finish() } } @@ -967,19 +988,28 @@ pub struct GstMpegtsDVBLinkageExtendedEvent { impl ::std::fmt::Debug for GstMpegtsDVBLinkageExtendedEvent { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsDVBLinkageExtendedEvent @ {:?}", self as *const _)) - .field("target_event_id", &self.target_event_id) - .field("target_listed", &self.target_listed) - .field("event_simulcast", &self.event_simulcast) - .field("link_type", &self.link_type) - .field("target_id_type", &self.target_id_type) - .field("original_network_id_flag", &self.original_network_id_flag) - .field("service_id_flag", &self.service_id_flag) - .field("user_defined_id", &self.user_defined_id) - .field("target_transport_stream_id", &self.target_transport_stream_id) - .field("target_original_network_id", &self.target_original_network_id) - .field("target_service_id", &self.target_service_id) - .finish() + f.debug_struct(&format!( + "GstMpegtsDVBLinkageExtendedEvent @ {:?}", + self as *const _ + )) + .field("target_event_id", &self.target_event_id) + .field("target_listed", &self.target_listed) + .field("event_simulcast", &self.event_simulcast) + .field("link_type", &self.link_type) + .field("target_id_type", &self.target_id_type) + .field("original_network_id_flag", &self.original_network_id_flag) + .field("service_id_flag", &self.service_id_flag) + .field("user_defined_id", &self.user_defined_id) + .field( + "target_transport_stream_id", + &self.target_transport_stream_id, + ) + .field( + "target_original_network_id", + &self.target_original_network_id, + ) + .field("target_service_id", &self.target_service_id) + .finish() } } @@ -994,12 +1024,15 @@ pub struct GstMpegtsDVBLinkageMobileHandOver { impl ::std::fmt::Debug for GstMpegtsDVBLinkageMobileHandOver { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsDVBLinkageMobileHandOver @ {:?}", self as *const _)) - .field("hand_over_type", &self.hand_over_type) - .field("origin_type", &self.origin_type) - .field("network_id", &self.network_id) - .field("initial_service_id", &self.initial_service_id) - .finish() + f.debug_struct(&format!( + "GstMpegtsDVBLinkageMobileHandOver @ {:?}", + self as *const _ + )) + .field("hand_over_type", &self.hand_over_type) + .field("origin_type", &self.origin_type) + .field("network_id", &self.network_id) + .field("initial_service_id", &self.initial_service_id) + .finish() } } @@ -1012,10 +1045,13 @@ pub struct GstMpegtsDVBParentalRatingItem { impl ::std::fmt::Debug for GstMpegtsDVBParentalRatingItem { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsDVBParentalRatingItem @ {:?}", self as *const _)) - .field("country_code", &self.country_code) - .field("rating", &self.rating) - .finish() + f.debug_struct(&format!( + "GstMpegtsDVBParentalRatingItem @ {:?}", + self as *const _ + )) + .field("country_code", &self.country_code) + .field("rating", &self.rating) + .finish() } } @@ -1028,10 +1064,13 @@ pub struct GstMpegtsDVBServiceListItem { impl ::std::fmt::Debug for GstMpegtsDVBServiceListItem { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsDVBServiceListItem @ {:?}", self as *const _)) - .field("service_id", &self.service_id) - .field("type_", &self.type_) - .finish() + f.debug_struct(&format!( + "GstMpegtsDVBServiceListItem @ {:?}", + self as *const _ + )) + .field("service_id", &self.service_id) + .field("type_", &self.type_) + .finish() } } @@ -1048,14 +1087,17 @@ pub struct GstMpegtsDataBroadcastDescriptor { impl ::std::fmt::Debug for GstMpegtsDataBroadcastDescriptor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsDataBroadcastDescriptor @ {:?}", self as *const _)) - .field("data_broadcast_id", &self.data_broadcast_id) - .field("component_tag", &self.component_tag) - .field("length", &self.length) - .field("selector_bytes", &self.selector_bytes) - .field("language_code", &self.language_code) - .field("text", &self.text) - .finish() + f.debug_struct(&format!( + "GstMpegtsDataBroadcastDescriptor @ {:?}", + self as *const _ + )) + .field("data_broadcast_id", &self.data_broadcast_id) + .field("component_tag", &self.component_tag) + .field("length", &self.length) + .field("selector_bytes", &self.selector_bytes) + .field("language_code", &self.language_code) + .field("text", &self.text) + .finish() } } @@ -1072,11 +1114,11 @@ pub struct GstMpegtsDescriptor { impl ::std::fmt::Debug for GstMpegtsDescriptor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsDescriptor @ {:?}", self as *const _)) - .field("tag", &self.tag) - .field("tag_extension", &self.tag_extension) - .field("length", &self.length) - .field("data", &self.data) - .finish() + .field("tag", &self.tag) + .field("tag_extension", &self.tag_extension) + .field("length", &self.length) + .field("data", &self.data) + .finish() } } @@ -1089,10 +1131,13 @@ pub struct GstMpegtsDvbMultilingualBouquetNameItem { impl ::std::fmt::Debug for GstMpegtsDvbMultilingualBouquetNameItem { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsDvbMultilingualBouquetNameItem @ {:?}", self as *const _)) - .field("language_code", &self.language_code) - .field("bouquet_name", &self.bouquet_name) - .finish() + f.debug_struct(&format!( + "GstMpegtsDvbMultilingualBouquetNameItem @ {:?}", + self as *const _ + )) + .field("language_code", &self.language_code) + .field("bouquet_name", &self.bouquet_name) + .finish() } } @@ -1105,10 +1150,13 @@ pub struct GstMpegtsDvbMultilingualComponentItem { impl ::std::fmt::Debug for GstMpegtsDvbMultilingualComponentItem { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsDvbMultilingualComponentItem @ {:?}", self as *const _)) - .field("language_code", &self.language_code) - .field("description", &self.description) - .finish() + f.debug_struct(&format!( + "GstMpegtsDvbMultilingualComponentItem @ {:?}", + self as *const _ + )) + .field("language_code", &self.language_code) + .field("description", &self.description) + .finish() } } @@ -1121,10 +1169,13 @@ pub struct GstMpegtsDvbMultilingualNetworkNameItem { impl ::std::fmt::Debug for GstMpegtsDvbMultilingualNetworkNameItem { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsDvbMultilingualNetworkNameItem @ {:?}", self as *const _)) - .field("language_code", &self.language_code) - .field("network_name", &self.network_name) - .finish() + f.debug_struct(&format!( + "GstMpegtsDvbMultilingualNetworkNameItem @ {:?}", + self as *const _ + )) + .field("language_code", &self.language_code) + .field("network_name", &self.network_name) + .finish() } } @@ -1138,11 +1189,14 @@ pub struct GstMpegtsDvbMultilingualServiceNameItem { impl ::std::fmt::Debug for GstMpegtsDvbMultilingualServiceNameItem { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsDvbMultilingualServiceNameItem @ {:?}", self as *const _)) - .field("language_code", &self.language_code) - .field("provider_name", &self.provider_name) - .field("service_name", &self.service_name) - .finish() + f.debug_struct(&format!( + "GstMpegtsDvbMultilingualServiceNameItem @ {:?}", + self as *const _ + )) + .field("language_code", &self.language_code) + .field("provider_name", &self.provider_name) + .field("service_name", &self.service_name) + .finish() } } @@ -1161,14 +1215,17 @@ pub struct GstMpegtsEIT { impl ::std::fmt::Debug for GstMpegtsEIT { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsEIT @ {:?}", self as *const _)) - .field("transport_stream_id", &self.transport_stream_id) - .field("original_network_id", &self.original_network_id) - .field("segment_last_section_number", &self.segment_last_section_number) - .field("last_table_id", &self.last_table_id) - .field("actual_stream", &self.actual_stream) - .field("present_following", &self.present_following) - .field("events", &self.events) - .finish() + .field("transport_stream_id", &self.transport_stream_id) + .field("original_network_id", &self.original_network_id) + .field( + "segment_last_section_number", + &self.segment_last_section_number, + ) + .field("last_table_id", &self.last_table_id) + .field("actual_stream", &self.actual_stream) + .field("present_following", &self.present_following) + .field("events", &self.events) + .finish() } } @@ -1186,13 +1243,13 @@ pub struct GstMpegtsEITEvent { impl ::std::fmt::Debug for GstMpegtsEITEvent { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsEITEvent @ {:?}", self as *const _)) - .field("event_id", &self.event_id) - .field("start_time", &self.start_time) - .field("duration", &self.duration) - .field("running_status", &self.running_status) - .field("free_CA_mode", &self.free_CA_mode) - .field("descriptors", &self.descriptors) - .finish() + .field("event_id", &self.event_id) + .field("start_time", &self.start_time) + .field("duration", &self.duration) + .field("running_status", &self.running_status) + .field("free_CA_mode", &self.free_CA_mode) + .field("descriptors", &self.descriptors) + .finish() } } @@ -1208,13 +1265,16 @@ pub struct GstMpegtsExtendedEventDescriptor { impl ::std::fmt::Debug for GstMpegtsExtendedEventDescriptor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsExtendedEventDescriptor @ {:?}", self as *const _)) - .field("descriptor_number", &self.descriptor_number) - .field("last_descriptor_number", &self.last_descriptor_number) - .field("language_code", &self.language_code) - .field("items", &self.items) - .field("text", &self.text) - .finish() + f.debug_struct(&format!( + "GstMpegtsExtendedEventDescriptor @ {:?}", + self as *const _ + )) + .field("descriptor_number", &self.descriptor_number) + .field("last_descriptor_number", &self.last_descriptor_number) + .field("language_code", &self.language_code) + .field("items", &self.items) + .field("text", &self.text) + .finish() } } @@ -1227,10 +1287,13 @@ pub struct GstMpegtsExtendedEventItem { impl ::std::fmt::Debug for GstMpegtsExtendedEventItem { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsExtendedEventItem @ {:?}", self as *const _)) - .field("item_description", &self.item_description) - .field("item", &self.item) - .finish() + f.debug_struct(&format!( + "GstMpegtsExtendedEventItem @ {:?}", + self as *const _ + )) + .field("item_description", &self.item_description) + .field("item", &self.item) + .finish() } } @@ -1244,9 +1307,12 @@ pub struct GstMpegtsISO639LanguageDescriptor { impl ::std::fmt::Debug for GstMpegtsISO639LanguageDescriptor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsISO639LanguageDescriptor @ {:?}", self as *const _)) - .field("nb_language", &self.nb_language) - .finish() + f.debug_struct(&format!( + "GstMpegtsISO639LanguageDescriptor @ {:?}", + self as *const _ + )) + .field("nb_language", &self.nb_language) + .finish() } } @@ -1261,10 +1327,10 @@ pub struct GstMpegtsLogicalChannel { impl ::std::fmt::Debug for GstMpegtsLogicalChannel { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsLogicalChannel @ {:?}", self as *const _)) - .field("service_id", &self.service_id) - .field("visible_service", &self.visible_service) - .field("logical_channel_number", &self.logical_channel_number) - .finish() + .field("service_id", &self.service_id) + .field("visible_service", &self.visible_service) + .field("logical_channel_number", &self.logical_channel_number) + .finish() } } @@ -1277,9 +1343,12 @@ pub struct GstMpegtsLogicalChannelDescriptor { impl ::std::fmt::Debug for GstMpegtsLogicalChannelDescriptor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsLogicalChannelDescriptor @ {:?}", self as *const _)) - .field("nb_channels", &self.nb_channels) - .finish() + f.debug_struct(&format!( + "GstMpegtsLogicalChannelDescriptor @ {:?}", + self as *const _ + )) + .field("nb_channels", &self.nb_channels) + .finish() } } @@ -1295,11 +1364,11 @@ pub struct GstMpegtsNIT { impl ::std::fmt::Debug for GstMpegtsNIT { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsNIT @ {:?}", self as *const _)) - .field("actual_network", &self.actual_network) - .field("network_id", &self.network_id) - .field("descriptors", &self.descriptors) - .field("streams", &self.streams) - .finish() + .field("actual_network", &self.actual_network) + .field("network_id", &self.network_id) + .field("descriptors", &self.descriptors) + .field("streams", &self.streams) + .finish() } } @@ -1314,10 +1383,10 @@ pub struct GstMpegtsNITStream { impl ::std::fmt::Debug for GstMpegtsNITStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsNITStream @ {:?}", self as *const _)) - .field("transport_stream_id", &self.transport_stream_id) - .field("original_network_id", &self.original_network_id) - .field("descriptors", &self.descriptors) - .finish() + .field("transport_stream_id", &self.transport_stream_id) + .field("original_network_id", &self.original_network_id) + .field("descriptors", &self.descriptors) + .finish() } } @@ -1333,11 +1402,11 @@ pub struct GstMpegtsPMT { impl ::std::fmt::Debug for GstMpegtsPMT { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsPMT @ {:?}", self as *const _)) - .field("pcr_pid", &self.pcr_pid) - .field("program_number", &self.program_number) - .field("descriptors", &self.descriptors) - .field("streams", &self.streams) - .finish() + .field("pcr_pid", &self.pcr_pid) + .field("program_number", &self.program_number) + .field("descriptors", &self.descriptors) + .field("streams", &self.streams) + .finish() } } @@ -1352,10 +1421,10 @@ pub struct GstMpegtsPMTStream { impl ::std::fmt::Debug for GstMpegtsPMTStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsPMTStream @ {:?}", self as *const _)) - .field("stream_type", &self.stream_type) - .field("pid", &self.pid) - .field("descriptors", &self.descriptors) - .finish() + .field("stream_type", &self.stream_type) + .field("pid", &self.pid) + .field("descriptors", &self.descriptors) + .finish() } } @@ -1369,9 +1438,12 @@ pub struct GstMpegtsPatProgram { impl ::std::fmt::Debug for GstMpegtsPatProgram { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsPatProgram @ {:?}", self as *const _)) - .field("program_number", &self.program_number) - .field("network_or_program_map_PID", &self.network_or_program_map_PID) - .finish() + .field("program_number", &self.program_number) + .field( + "network_or_program_map_PID", + &self.network_or_program_map_PID, + ) + .finish() } } @@ -1387,11 +1459,11 @@ pub struct GstMpegtsSDT { impl ::std::fmt::Debug for GstMpegtsSDT { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsSDT @ {:?}", self as *const _)) - .field("original_network_id", &self.original_network_id) - .field("actual_ts", &self.actual_ts) - .field("transport_stream_id", &self.transport_stream_id) - .field("services", &self.services) - .finish() + .field("original_network_id", &self.original_network_id) + .field("actual_ts", &self.actual_ts) + .field("transport_stream_id", &self.transport_stream_id) + .field("services", &self.services) + .finish() } } @@ -1409,13 +1481,16 @@ pub struct GstMpegtsSDTService { impl ::std::fmt::Debug for GstMpegtsSDTService { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsSDTService @ {:?}", self as *const _)) - .field("service_id", &self.service_id) - .field("EIT_schedule_flag", &self.EIT_schedule_flag) - .field("EIT_present_following_flag", &self.EIT_present_following_flag) - .field("running_status", &self.running_status) - .field("free_CA_mode", &self.free_CA_mode) - .field("descriptors", &self.descriptors) - .finish() + .field("service_id", &self.service_id) + .field("EIT_schedule_flag", &self.EIT_schedule_flag) + .field( + "EIT_present_following_flag", + &self.EIT_present_following_flag, + ) + .field("running_status", &self.running_status) + .field("free_CA_mode", &self.free_CA_mode) + .field("descriptors", &self.descriptors) + .finish() } } @@ -1435,17 +1510,20 @@ pub struct GstMpegtsSatelliteDeliverySystemDescriptor { impl ::std::fmt::Debug for GstMpegtsSatelliteDeliverySystemDescriptor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsSatelliteDeliverySystemDescriptor @ {:?}", self as *const _)) - .field("frequency", &self.frequency) - .field("orbital_position", &self.orbital_position) - .field("west_east", &self.west_east) - .field("polarization", &self.polarization) - .field("roll_off", &self.roll_off) - .field("modulation_system", &self.modulation_system) - .field("modulation_type", &self.modulation_type) - .field("symbol_rate", &self.symbol_rate) - .field("fec_inner", &self.fec_inner) - .finish() + f.debug_struct(&format!( + "GstMpegtsSatelliteDeliverySystemDescriptor @ {:?}", + self as *const _ + )) + .field("frequency", &self.frequency) + .field("orbital_position", &self.orbital_position) + .field("west_east", &self.west_east) + .field("polarization", &self.polarization) + .field("roll_off", &self.roll_off) + .field("modulation_system", &self.modulation_system) + .field("modulation_type", &self.modulation_type) + .field("symbol_rate", &self.symbol_rate) + .field("fec_inner", &self.fec_inner) + .finish() } } @@ -1475,16 +1553,16 @@ pub struct GstMpegtsSection { impl ::std::fmt::Debug for GstMpegtsSection { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsSection @ {:?}", self as *const _)) - .field("section_type", &self.section_type) - .field("pid", &self.pid) - .field("table_id", &self.table_id) - .field("subtable_extension", &self.subtable_extension) - .field("version_number", &self.version_number) - .field("current_next_indicator", &self.current_next_indicator) - .field("section_number", &self.section_number) - .field("last_section_number", &self.last_section_number) - .field("crc", &self.crc) - .finish() + .field("section_type", &self.section_type) + .field("pid", &self.pid) + .field("table_id", &self.table_id) + .field("subtable_extension", &self.subtable_extension) + .field("version_number", &self.version_number) + .field("current_next_indicator", &self.current_next_indicator) + .field("section_number", &self.section_number) + .field("last_section_number", &self.last_section_number) + .field("crc", &self.crc) + .finish() } } @@ -1498,11 +1576,14 @@ pub struct GstMpegtsT2DeliverySystemCell { impl ::std::fmt::Debug for GstMpegtsT2DeliverySystemCell { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsT2DeliverySystemCell @ {:?}", self as *const _)) - .field("cell_id", &self.cell_id) - .field("centre_frequencies", &self.centre_frequencies) - .field("sub_cells", &self.sub_cells) - .finish() + f.debug_struct(&format!( + "GstMpegtsT2DeliverySystemCell @ {:?}", + self as *const _ + )) + .field("cell_id", &self.cell_id) + .field("centre_frequencies", &self.centre_frequencies) + .field("sub_cells", &self.sub_cells) + .finish() } } @@ -1515,10 +1596,13 @@ pub struct GstMpegtsT2DeliverySystemCellExtension { impl ::std::fmt::Debug for GstMpegtsT2DeliverySystemCellExtension { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsT2DeliverySystemCellExtension @ {:?}", self as *const _)) - .field("cell_id_extension", &self.cell_id_extension) - .field("transposer_frequency", &self.transposer_frequency) - .finish() + f.debug_struct(&format!( + "GstMpegtsT2DeliverySystemCellExtension @ {:?}", + self as *const _ + )) + .field("cell_id_extension", &self.cell_id_extension) + .field("transposer_frequency", &self.transposer_frequency) + .finish() } } @@ -1538,17 +1622,20 @@ pub struct GstMpegtsT2DeliverySystemDescriptor { impl ::std::fmt::Debug for GstMpegtsT2DeliverySystemDescriptor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsT2DeliverySystemDescriptor @ {:?}", self as *const _)) - .field("plp_id", &self.plp_id) - .field("t2_system_id", &self.t2_system_id) - .field("siso_miso", &self.siso_miso) - .field("bandwidth", &self.bandwidth) - .field("guard_interval", &self.guard_interval) - .field("transmission_mode", &self.transmission_mode) - .field("other_frequency", &self.other_frequency) - .field("tfs", &self.tfs) - .field("cells", &self.cells) - .finish() + f.debug_struct(&format!( + "GstMpegtsT2DeliverySystemDescriptor @ {:?}", + self as *const _ + )) + .field("plp_id", &self.plp_id) + .field("t2_system_id", &self.t2_system_id) + .field("siso_miso", &self.siso_miso) + .field("bandwidth", &self.bandwidth) + .field("guard_interval", &self.guard_interval) + .field("transmission_mode", &self.transmission_mode) + .field("other_frequency", &self.other_frequency) + .field("tfs", &self.tfs) + .field("cells", &self.cells) + .finish() } } @@ -1562,9 +1649,9 @@ pub struct GstMpegtsTOT { impl ::std::fmt::Debug for GstMpegtsTOT { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMpegtsTOT @ {:?}", self as *const _)) - .field("utc_time", &self.utc_time) - .field("descriptors", &self.descriptors) - .finish() + .field("utc_time", &self.utc_time) + .field("descriptors", &self.descriptors) + .finish() } } @@ -1587,20 +1674,23 @@ pub struct GstMpegtsTerrestrialDeliverySystemDescriptor { impl ::std::fmt::Debug for GstMpegtsTerrestrialDeliverySystemDescriptor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstMpegtsTerrestrialDeliverySystemDescriptor @ {:?}", self as *const _)) - .field("frequency", &self.frequency) - .field("bandwidth", &self.bandwidth) - .field("priority", &self.priority) - .field("time_slicing", &self.time_slicing) - .field("mpe_fec", &self.mpe_fec) - .field("constellation", &self.constellation) - .field("hierarchy", &self.hierarchy) - .field("code_rate_hp", &self.code_rate_hp) - .field("code_rate_lp", &self.code_rate_lp) - .field("guard_interval", &self.guard_interval) - .field("transmission_mode", &self.transmission_mode) - .field("other_frequency", &self.other_frequency) - .finish() + f.debug_struct(&format!( + "GstMpegtsTerrestrialDeliverySystemDescriptor @ {:?}", + self as *const _ + )) + .field("frequency", &self.frequency) + .field("bandwidth", &self.bandwidth) + .field("priority", &self.priority) + .field("time_slicing", &self.time_slicing) + .field("mpe_fec", &self.mpe_fec) + .field("constellation", &self.constellation) + .field("hierarchy", &self.hierarchy) + .field("code_rate_hp", &self.code_rate_hp) + .field("code_rate_lp", &self.code_rate_lp) + .field("guard_interval", &self.guard_interval) + .field("transmission_mode", &self.transmission_mode) + .field("other_frequency", &self.other_frequency) + .finish() } } @@ -1640,13 +1730,17 @@ extern "C" { // GstMpegtsAtscSTT //========================================================================= pub fn gst_mpegts_atsc_stt_get_type() -> GType; - pub fn gst_mpegts_atsc_stt_get_datetime_utc(stt: *mut GstMpegtsAtscSTT) -> *mut gst::GstDateTime; + pub fn gst_mpegts_atsc_stt_get_datetime_utc( + stt: *mut GstMpegtsAtscSTT, + ) -> *mut gst::GstDateTime; //========================================================================= // GstMpegtsAtscStringSegment //========================================================================= pub fn gst_mpegts_atsc_string_segment_get_type() -> GType; - pub fn gst_mpegts_atsc_string_segment_get_string(seg: *mut GstMpegtsAtscStringSegment) -> *const c_char; + pub fn gst_mpegts_atsc_string_segment_get_string( + seg: *mut GstMpegtsAtscStringSegment, + ) -> *const c_char; //========================================================================= // GstMpegtsAtscVCT @@ -1672,7 +1766,9 @@ extern "C" { // GstMpegtsCableDeliverySystemDescriptor //========================================================================= pub fn gst_mpegts_dvb_cable_delivery_system_descriptor_get_type() -> GType; - pub fn gst_mpegts_dvb_cable_delivery_system_descriptor_free(source: *mut GstMpegtsCableDeliverySystemDescriptor); + pub fn gst_mpegts_dvb_cable_delivery_system_descriptor_free( + source: *mut GstMpegtsCableDeliverySystemDescriptor, + ); //========================================================================= // GstMpegtsComponentDescriptor @@ -1689,9 +1785,15 @@ extern "C" { //========================================================================= pub fn gst_mpegts_dvb_linkage_descriptor_get_type() -> GType; pub fn gst_mpegts_dvb_linkage_descriptor_free(source: *mut GstMpegtsDVBLinkageDescriptor); - pub fn gst_mpegts_dvb_linkage_descriptor_get_event(desc: *const GstMpegtsDVBLinkageDescriptor) -> *const GstMpegtsDVBLinkageEvent; - pub fn gst_mpegts_dvb_linkage_descriptor_get_extended_event(desc: *const GstMpegtsDVBLinkageDescriptor) -> *const glib::GPtrArray; - pub fn gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over(desc: *const GstMpegtsDVBLinkageDescriptor) -> *const GstMpegtsDVBLinkageMobileHandOver; + pub fn gst_mpegts_dvb_linkage_descriptor_get_event( + desc: *const GstMpegtsDVBLinkageDescriptor, + ) -> *const GstMpegtsDVBLinkageEvent; + pub fn gst_mpegts_dvb_linkage_descriptor_get_extended_event( + desc: *const GstMpegtsDVBLinkageDescriptor, + ) -> *const glib::GPtrArray; + pub fn gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over( + desc: *const GstMpegtsDVBLinkageDescriptor, + ) -> *const GstMpegtsDVBLinkageMobileHandOver; //========================================================================= // GstMpegtsDVBLinkageEvent @@ -1722,55 +1824,208 @@ extern "C" { // GstMpegtsDataBroadcastDescriptor //========================================================================= pub fn gst_mpegts_dvb_data_broadcast_descriptor_get_type() -> GType; - pub fn gst_mpegts_dvb_data_broadcast_descriptor_free(source: *mut GstMpegtsDataBroadcastDescriptor); + pub fn gst_mpegts_dvb_data_broadcast_descriptor_free( + source: *mut GstMpegtsDataBroadcastDescriptor, + ); //========================================================================= // GstMpegtsDescriptor //========================================================================= pub fn gst_mpegts_descriptor_get_type() -> GType; pub fn gst_mpegts_descriptor_free(desc: *mut GstMpegtsDescriptor); - pub fn gst_mpegts_descriptor_parse_ca(descriptor: *mut GstMpegtsDescriptor, ca_system_id: *mut u16, ca_pid: *mut u16, private_data: *mut *const u8, private_data_size: *mut size_t) -> gboolean; - pub fn gst_mpegts_descriptor_parse_cable_delivery_system(descriptor: *const GstMpegtsDescriptor, res: *mut GstMpegtsCableDeliverySystemDescriptor) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_bouquet_name(descriptor: *const GstMpegtsDescriptor, bouquet_name: *mut *mut c_char) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_ca_identifier(descriptor: *const GstMpegtsDescriptor, list: *mut *mut glib::GArray) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_component(descriptor: *const GstMpegtsDescriptor, res: *mut *mut GstMpegtsComponentDescriptor) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_content(descriptor: *const GstMpegtsDescriptor, content: *mut *mut glib::GPtrArray) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_data_broadcast(descriptor: *const GstMpegtsDescriptor, res: *mut *mut GstMpegtsDataBroadcastDescriptor) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_data_broadcast_id(descriptor: *const GstMpegtsDescriptor, data_broadcast_id: *mut u16, id_selector_bytes: *mut *mut u8, len: *mut u8) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_extended_event(descriptor: *const GstMpegtsDescriptor, res: *mut *mut GstMpegtsExtendedEventDescriptor) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_frequency_list(descriptor: *const GstMpegtsDescriptor, offset: *mut gboolean, list: *mut *mut glib::GArray) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_linkage(descriptor: *const GstMpegtsDescriptor, res: *mut *mut GstMpegtsDVBLinkageDescriptor) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name(descriptor: *const GstMpegtsDescriptor, bouquet_name_items: *mut *mut glib::GPtrArray) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_multilingual_component(descriptor: *const GstMpegtsDescriptor, component_tag: *mut u8, component_description_items: *mut *mut glib::GPtrArray) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_multilingual_network_name(descriptor: *const GstMpegtsDescriptor, network_name_items: *mut *mut glib::GPtrArray) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_multilingual_service_name(descriptor: *const GstMpegtsDescriptor, service_name_items: *mut *mut glib::GPtrArray) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_network_name(descriptor: *const GstMpegtsDescriptor, name: *mut *mut c_char) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_parental_rating(descriptor: *const GstMpegtsDescriptor, rating: *mut *mut glib::GPtrArray) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_private_data_specifier(descriptor: *const GstMpegtsDescriptor, private_data_specifier: *mut u32, private_data: *mut *mut u8, length: *mut u8) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_scrambling(descriptor: *const GstMpegtsDescriptor, scrambling_mode: *mut GstMpegtsDVBScramblingModeType) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_service(descriptor: *const GstMpegtsDescriptor, service_type: *mut GstMpegtsDVBServiceType, service_name: *mut *mut c_char, provider_name: *mut *mut c_char) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_service_list(descriptor: *const GstMpegtsDescriptor, list: *mut *mut glib::GPtrArray) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_short_event(descriptor: *const GstMpegtsDescriptor, language_code: *mut *mut c_char, event_name: *mut *mut c_char, text: *mut *mut c_char) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_stream_identifier(descriptor: *const GstMpegtsDescriptor, component_tag: *mut u8) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_stuffing(descriptor: *const GstMpegtsDescriptor, stuffing_bytes: *mut *mut u8) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_subtitling_idx(descriptor: *const GstMpegtsDescriptor, idx: c_uint, lang: *mut *mut c_char, type_: *mut u8, composition_page_id: *mut u16, ancillary_page_id: *mut u16) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_subtitling_nb(descriptor: *const GstMpegtsDescriptor) -> c_uint; - pub fn gst_mpegts_descriptor_parse_dvb_t2_delivery_system(descriptor: *const GstMpegtsDescriptor, res: *mut *mut GstMpegtsT2DeliverySystemDescriptor) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_teletext_idx(descriptor: *const GstMpegtsDescriptor, idx: c_uint, language_code: *mut *mut c_char, teletext_type: *mut GstMpegtsDVBTeletextType, magazine_number: *mut u8, page_number: *mut u8) -> gboolean; - pub fn gst_mpegts_descriptor_parse_dvb_teletext_nb(descriptor: *const GstMpegtsDescriptor) -> c_uint; - pub fn gst_mpegts_descriptor_parse_iso_639_language(descriptor: *const GstMpegtsDescriptor, res: *mut *mut GstMpegtsISO639LanguageDescriptor) -> gboolean; - pub fn gst_mpegts_descriptor_parse_iso_639_language_idx(descriptor: *const GstMpegtsDescriptor, idx: c_uint, lang: *mut *mut c_char, audio_type: *mut GstMpegtsIso639AudioType) -> gboolean; - pub fn gst_mpegts_descriptor_parse_iso_639_language_nb(descriptor: *const GstMpegtsDescriptor) -> c_uint; - pub fn gst_mpegts_descriptor_parse_logical_channel(descriptor: *const GstMpegtsDescriptor, res: *mut GstMpegtsLogicalChannelDescriptor) -> gboolean; - pub fn gst_mpegts_descriptor_parse_satellite_delivery_system(descriptor: *const GstMpegtsDescriptor, res: *mut GstMpegtsSatelliteDeliverySystemDescriptor) -> gboolean; - pub fn gst_mpegts_descriptor_parse_terrestrial_delivery_system(descriptor: *const GstMpegtsDescriptor, res: *mut GstMpegtsTerrestrialDeliverySystemDescriptor) -> gboolean; - pub fn gst_mpegts_descriptor_from_custom(tag: u8, data: *const u8, length: size_t) -> *mut GstMpegtsDescriptor; - pub fn gst_mpegts_descriptor_from_custom_with_extension(tag: u8, tag_extension: u8, data: *const u8, length: size_t) -> *mut GstMpegtsDescriptor; - pub fn gst_mpegts_descriptor_from_dvb_network_name(name: *const c_char) -> *mut GstMpegtsDescriptor; - pub fn gst_mpegts_descriptor_from_dvb_service(service_type: GstMpegtsDVBServiceType, service_name: *const c_char, service_provider: *const c_char) -> *mut GstMpegtsDescriptor; - pub fn gst_mpegts_descriptor_from_dvb_subtitling(lang: *const c_char, type_: u8, composition: u16, ancillary: u16) -> *mut GstMpegtsDescriptor; - pub fn gst_mpegts_descriptor_from_iso_639_language(language: *const c_char) -> *mut GstMpegtsDescriptor; - pub fn gst_mpegts_descriptor_from_registration(format_identifier: *const c_char, additional_info: *mut u8, additional_info_length: size_t) -> *mut GstMpegtsDescriptor; + pub fn gst_mpegts_descriptor_parse_ca( + descriptor: *mut GstMpegtsDescriptor, + ca_system_id: *mut u16, + ca_pid: *mut u16, + private_data: *mut *const u8, + private_data_size: *mut size_t, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_cable_delivery_system( + descriptor: *const GstMpegtsDescriptor, + res: *mut GstMpegtsCableDeliverySystemDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_bouquet_name( + descriptor: *const GstMpegtsDescriptor, + bouquet_name: *mut *mut c_char, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_ca_identifier( + descriptor: *const GstMpegtsDescriptor, + list: *mut *mut glib::GArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_component( + descriptor: *const GstMpegtsDescriptor, + res: *mut *mut GstMpegtsComponentDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_content( + descriptor: *const GstMpegtsDescriptor, + content: *mut *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_data_broadcast( + descriptor: *const GstMpegtsDescriptor, + res: *mut *mut GstMpegtsDataBroadcastDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_data_broadcast_id( + descriptor: *const GstMpegtsDescriptor, + data_broadcast_id: *mut u16, + id_selector_bytes: *mut *mut u8, + len: *mut u8, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_extended_event( + descriptor: *const GstMpegtsDescriptor, + res: *mut *mut GstMpegtsExtendedEventDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_frequency_list( + descriptor: *const GstMpegtsDescriptor, + offset: *mut gboolean, + list: *mut *mut glib::GArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_linkage( + descriptor: *const GstMpegtsDescriptor, + res: *mut *mut GstMpegtsDVBLinkageDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name( + descriptor: *const GstMpegtsDescriptor, + bouquet_name_items: *mut *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_multilingual_component( + descriptor: *const GstMpegtsDescriptor, + component_tag: *mut u8, + component_description_items: *mut *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_multilingual_network_name( + descriptor: *const GstMpegtsDescriptor, + network_name_items: *mut *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_multilingual_service_name( + descriptor: *const GstMpegtsDescriptor, + service_name_items: *mut *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_network_name( + descriptor: *const GstMpegtsDescriptor, + name: *mut *mut c_char, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_parental_rating( + descriptor: *const GstMpegtsDescriptor, + rating: *mut *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_private_data_specifier( + descriptor: *const GstMpegtsDescriptor, + private_data_specifier: *mut u32, + private_data: *mut *mut u8, + length: *mut u8, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_scrambling( + descriptor: *const GstMpegtsDescriptor, + scrambling_mode: *mut GstMpegtsDVBScramblingModeType, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_service( + descriptor: *const GstMpegtsDescriptor, + service_type: *mut GstMpegtsDVBServiceType, + service_name: *mut *mut c_char, + provider_name: *mut *mut c_char, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_service_list( + descriptor: *const GstMpegtsDescriptor, + list: *mut *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_short_event( + descriptor: *const GstMpegtsDescriptor, + language_code: *mut *mut c_char, + event_name: *mut *mut c_char, + text: *mut *mut c_char, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_stream_identifier( + descriptor: *const GstMpegtsDescriptor, + component_tag: *mut u8, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_stuffing( + descriptor: *const GstMpegtsDescriptor, + stuffing_bytes: *mut *mut u8, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_subtitling_idx( + descriptor: *const GstMpegtsDescriptor, + idx: c_uint, + lang: *mut *mut c_char, + type_: *mut u8, + composition_page_id: *mut u16, + ancillary_page_id: *mut u16, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_subtitling_nb( + descriptor: *const GstMpegtsDescriptor, + ) -> c_uint; + pub fn gst_mpegts_descriptor_parse_dvb_t2_delivery_system( + descriptor: *const GstMpegtsDescriptor, + res: *mut *mut GstMpegtsT2DeliverySystemDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_teletext_idx( + descriptor: *const GstMpegtsDescriptor, + idx: c_uint, + language_code: *mut *mut c_char, + teletext_type: *mut GstMpegtsDVBTeletextType, + magazine_number: *mut u8, + page_number: *mut u8, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_teletext_nb( + descriptor: *const GstMpegtsDescriptor, + ) -> c_uint; + pub fn gst_mpegts_descriptor_parse_iso_639_language( + descriptor: *const GstMpegtsDescriptor, + res: *mut *mut GstMpegtsISO639LanguageDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_iso_639_language_idx( + descriptor: *const GstMpegtsDescriptor, + idx: c_uint, + lang: *mut *mut c_char, + audio_type: *mut GstMpegtsIso639AudioType, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_iso_639_language_nb( + descriptor: *const GstMpegtsDescriptor, + ) -> c_uint; + pub fn gst_mpegts_descriptor_parse_logical_channel( + descriptor: *const GstMpegtsDescriptor, + res: *mut GstMpegtsLogicalChannelDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_satellite_delivery_system( + descriptor: *const GstMpegtsDescriptor, + res: *mut GstMpegtsSatelliteDeliverySystemDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_terrestrial_delivery_system( + descriptor: *const GstMpegtsDescriptor, + res: *mut GstMpegtsTerrestrialDeliverySystemDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_from_custom( + tag: u8, + data: *const u8, + length: size_t, + ) -> *mut GstMpegtsDescriptor; + pub fn gst_mpegts_descriptor_from_custom_with_extension( + tag: u8, + tag_extension: u8, + data: *const u8, + length: size_t, + ) -> *mut GstMpegtsDescriptor; + pub fn gst_mpegts_descriptor_from_dvb_network_name( + name: *const c_char, + ) -> *mut GstMpegtsDescriptor; + pub fn gst_mpegts_descriptor_from_dvb_service( + service_type: GstMpegtsDVBServiceType, + service_name: *const c_char, + service_provider: *const c_char, + ) -> *mut GstMpegtsDescriptor; + pub fn gst_mpegts_descriptor_from_dvb_subtitling( + lang: *const c_char, + type_: u8, + composition: u16, + ancillary: u16, + ) -> *mut GstMpegtsDescriptor; + pub fn gst_mpegts_descriptor_from_iso_639_language( + language: *const c_char, + ) -> *mut GstMpegtsDescriptor; + pub fn gst_mpegts_descriptor_from_registration( + format_identifier: *const c_char, + additional_info: *mut u8, + additional_info_length: size_t, + ) -> *mut GstMpegtsDescriptor; //========================================================================= // GstMpegtsDvbMultilingualBouquetNameItem @@ -1817,7 +2072,9 @@ extern "C" { // GstMpegtsISO639LanguageDescriptor //========================================================================= pub fn gst_mpegts_iso_639_language_get_type() -> GType; - pub fn gst_mpegts_iso_639_language_descriptor_free(desc: *mut GstMpegtsISO639LanguageDescriptor); + pub fn gst_mpegts_iso_639_language_descriptor_free( + desc: *mut GstMpegtsISO639LanguageDescriptor, + ); //========================================================================= // GstMpegtsLogicalChannel @@ -1880,13 +2137,29 @@ extern "C" { // GstMpegtsSection //========================================================================= pub fn gst_mpegts_section_get_type() -> GType; - pub fn gst_mpegts_section_new(pid: u16, data: *mut u8, data_size: size_t) -> *mut GstMpegtsSection; - pub fn gst_mpegts_section_get_atsc_cvct(section: *mut GstMpegtsSection) -> *const GstMpegtsAtscVCT; - pub fn gst_mpegts_section_get_atsc_eit(section: *mut GstMpegtsSection) -> *const GstMpegtsAtscEIT; - pub fn gst_mpegts_section_get_atsc_ett(section: *mut GstMpegtsSection) -> *const GstMpegtsAtscETT; - pub fn gst_mpegts_section_get_atsc_mgt(section: *mut GstMpegtsSection) -> *const GstMpegtsAtscMGT; - pub fn gst_mpegts_section_get_atsc_stt(section: *mut GstMpegtsSection) -> *const GstMpegtsAtscSTT; - pub fn gst_mpegts_section_get_atsc_tvct(section: *mut GstMpegtsSection) -> *const GstMpegtsAtscVCT; + pub fn gst_mpegts_section_new( + pid: u16, + data: *mut u8, + data_size: size_t, + ) -> *mut GstMpegtsSection; + pub fn gst_mpegts_section_get_atsc_cvct( + section: *mut GstMpegtsSection, + ) -> *const GstMpegtsAtscVCT; + pub fn gst_mpegts_section_get_atsc_eit( + section: *mut GstMpegtsSection, + ) -> *const GstMpegtsAtscEIT; + pub fn gst_mpegts_section_get_atsc_ett( + section: *mut GstMpegtsSection, + ) -> *const GstMpegtsAtscETT; + pub fn gst_mpegts_section_get_atsc_mgt( + section: *mut GstMpegtsSection, + ) -> *const GstMpegtsAtscMGT; + pub fn gst_mpegts_section_get_atsc_stt( + section: *mut GstMpegtsSection, + ) -> *const GstMpegtsAtscSTT; + pub fn gst_mpegts_section_get_atsc_tvct( + section: *mut GstMpegtsSection, + ) -> *const GstMpegtsAtscVCT; pub fn gst_mpegts_section_get_bat(section: *mut GstMpegtsSection) -> *const GstMpegtsBAT; pub fn gst_mpegts_section_get_cat(section: *mut GstMpegtsSection) -> *mut glib::GPtrArray; pub fn gst_mpegts_section_get_data(section: *mut GstMpegtsSection) -> *mut glib::GBytes; @@ -1898,10 +2171,19 @@ extern "C" { pub fn gst_mpegts_section_get_tdt(section: *mut GstMpegtsSection) -> *mut gst::GstDateTime; pub fn gst_mpegts_section_get_tot(section: *mut GstMpegtsSection) -> *const GstMpegtsTOT; pub fn gst_mpegts_section_get_tsdt(section: *mut GstMpegtsSection) -> *mut glib::GPtrArray; - pub fn gst_mpegts_section_packetize(section: *mut GstMpegtsSection, output_size: *mut size_t) -> *mut u8; - pub fn gst_mpegts_section_send_event(section: *mut GstMpegtsSection, element: *mut gst::GstElement) -> gboolean; + pub fn gst_mpegts_section_packetize( + section: *mut GstMpegtsSection, + output_size: *mut size_t, + ) -> *mut u8; + pub fn gst_mpegts_section_send_event( + section: *mut GstMpegtsSection, + element: *mut gst::GstElement, + ) -> gboolean; pub fn gst_mpegts_section_from_nit(nit: *mut GstMpegtsNIT) -> *mut GstMpegtsSection; - pub fn gst_mpegts_section_from_pat(programs: *mut glib::GPtrArray, ts_id: u16) -> *mut GstMpegtsSection; + pub fn gst_mpegts_section_from_pat( + programs: *mut glib::GPtrArray, + ts_id: u16, + ) -> *mut GstMpegtsSection; pub fn gst_mpegts_section_from_pmt(pmt: *mut GstMpegtsPMT, pid: u16) -> *mut GstMpegtsSection; pub fn gst_mpegts_section_from_sdt(sdt: *mut GstMpegtsSDT) -> *mut GstMpegtsSection; @@ -1919,7 +2201,9 @@ extern "C" { // GstMpegtsT2DeliverySystemDescriptor //========================================================================= pub fn gst_mpegts_t2_delivery_system_descriptor_get_type() -> GType; - pub fn gst_mpegts_t2_delivery_system_descriptor_free(source: *mut GstMpegtsT2DeliverySystemDescriptor); + pub fn gst_mpegts_t2_delivery_system_descriptor_free( + source: *mut GstMpegtsT2DeliverySystemDescriptor, + ); //========================================================================= // GstMpegtsTOT @@ -1936,10 +2220,17 @@ extern "C" { //========================================================================= pub fn gst_mpegts_dvb_component_descriptor_free(source: *mut GstMpegtsComponentDescriptor); pub fn gst_event_parse_mpegts_section(event: *mut gst::GstEvent) -> *mut GstMpegtsSection; - pub fn gst_mpegts_find_descriptor(descriptors: *mut glib::GPtrArray, tag: u8) -> *const GstMpegtsDescriptor; + pub fn gst_mpegts_find_descriptor( + descriptors: *mut glib::GPtrArray, + tag: u8, + ) -> *const GstMpegtsDescriptor; pub fn gst_mpegts_initialize(); - pub fn gst_message_new_mpegts_section(parent: *mut gst::GstObject, section: *mut GstMpegtsSection) -> *mut gst::GstMessage; - pub fn gst_message_parse_mpegts_section(message: *mut gst::GstMessage) -> *mut GstMpegtsSection; + pub fn gst_message_new_mpegts_section( + parent: *mut gst::GstObject, + section: *mut GstMpegtsSection, + ) -> *mut gst::GstMessage; + pub fn gst_message_parse_mpegts_section(message: *mut gst::GstMessage) + -> *mut GstMpegtsSection; pub fn gst_mpegts_parse_descriptors(buffer: *mut u8, buf_len: size_t) -> *mut glib::GPtrArray; pub fn gst_mpegts_pat_new() -> *mut glib::GPtrArray; diff --git a/gstreamer-mpegts-sys/tests/abi.rs b/gstreamer-mpegts-sys/tests/abi.rs index 3c67f2b00..34653e343 100644 --- a/gstreamer-mpegts-sys/tests/abi.rs +++ b/gstreamer-mpegts-sys/tests/abi.rs @@ -5,13 +5,13 @@ extern crate gstreamer_mpegts_sys; extern crate shell_words; extern crate tempdir; +use gstreamer_mpegts_sys::*; use std::env; use std::error::Error; -use std::path::Path; use std::mem::{align_of, size_of}; +use std::path::Path; use std::process::Command; use std::str; -use gstreamer_mpegts_sys::*; static PACKAGES: &[&str] = &["gstreamer-mpegts-1.0"]; @@ -47,8 +47,7 @@ impl Compiler { cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { - return Err(format!("compilation command {:?} failed, {}", - &cmd, status).into()); + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } @@ -77,14 +76,12 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { cmd.args(packages); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {:?} returned {}", - &cmd, out.status).into()); + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } - #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, @@ -115,9 +112,8 @@ impl Results { fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", - self.passed, - self.failed, - self.failed_to_compile) + self.passed, self.failed, self.failed_to_compile + ) } fn expect_total_success(&self) { if self.failed == 0 { @@ -133,24 +129,28 @@ fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!("1", - get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), - "failed to obtain correct constant value for 1"); + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); - eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_value, c_value); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); } } }; @@ -166,24 +166,31 @@ fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!(Layout {size: 1, alignment: 1}, - get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), - "failed to obtain correct layout for char type"); + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); - eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_layout, &c_layout); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); } } }; @@ -203,15 +210,14 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result Result> { @@ -223,115 +229,620 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result(), alignment: align_of::()}), - ("GstMpegtsAtscEIT", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsAtscEITEvent", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsAtscETT", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsAtscMGT", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsAtscMGTTable", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsAtscMGTTableType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsAtscMultString", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsAtscSTT", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsAtscStringSegment", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsAtscVCT", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsAtscVCTSource", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsBAT", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsBATStream", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsCableDeliverySystemDescriptor", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsCableOuterFECScheme", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsComponentDescriptor", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsComponentStreamContent", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsContent", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsContentNibbleHi", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDVBCodeRate", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDVBDescriptorType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDVBExtendedDescriptorType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDVBLinkageDescriptor", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDVBLinkageEvent", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDVBLinkageExtendedEvent", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDVBLinkageHandOverType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDVBLinkageMobileHandOver", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDVBLinkageType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDVBParentalRatingItem", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDVBScramblingModeType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDVBServiceListItem", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDVBServiceType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDVBTeletextType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDataBroadcastDescriptor", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDescriptor", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDescriptorType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDvbMultilingualBouquetNameItem", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDvbMultilingualComponentItem", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDvbMultilingualNetworkNameItem", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsDvbMultilingualServiceNameItem", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsEIT", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsEITEvent", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsExtendedEventDescriptor", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsExtendedEventItem", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsISDBDescriptorType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsISO639LanguageDescriptor", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsIso639AudioType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsLogicalChannel", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsLogicalChannelDescriptor", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsMiscDescriptorType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsModulationType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsNIT", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsNITStream", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsPMT", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsPMTStream", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsPatProgram", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsRunningStatus", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsSDT", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsSDTService", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsSatelliteDeliverySystemDescriptor", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsSatellitePolarizationType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsSatelliteRolloff", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsScteStreamType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsSection", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsSectionATSCTableID", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsSectionDVBTableID", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsSectionSCTETableID", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsSectionTableID", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsSectionType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsStreamType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsT2DeliverySystemCell", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsT2DeliverySystemCellExtension", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsT2DeliverySystemDescriptor", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsTOT", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsTerrestrialDeliverySystemDescriptor", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsTerrestrialGuardInterval", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsTerrestrialHierarchy", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMpegtsTerrestrialTransmissionMode", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstMpegtsATSCDescriptorType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscEIT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscEITEvent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscETT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscMGT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscMGTTable", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscMGTTableType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscMultString", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscSTT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscStringSegment", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscVCT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscVCTSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsBAT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsBATStream", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsCableDeliverySystemDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsCableOuterFECScheme", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsComponentDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsComponentStreamContent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsContent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsContentNibbleHi", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBCodeRate", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBDescriptorType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBExtendedDescriptorType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBLinkageDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBLinkageEvent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBLinkageExtendedEvent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBLinkageHandOverType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBLinkageMobileHandOver", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBLinkageType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBParentalRatingItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBScramblingModeType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBServiceListItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBServiceType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBTeletextType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDataBroadcastDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDescriptorType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDvbMultilingualBouquetNameItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDvbMultilingualComponentItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDvbMultilingualNetworkNameItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDvbMultilingualServiceNameItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsEIT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsEITEvent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsExtendedEventDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsExtendedEventItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsISDBDescriptorType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsISO639LanguageDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsIso639AudioType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsLogicalChannel", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsLogicalChannelDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsMiscDescriptorType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsModulationType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsNIT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsNITStream", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsPMT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsPMTStream", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsPatProgram", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsRunningStatus", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSDT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSDTService", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSatelliteDeliverySystemDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSatellitePolarizationType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSatelliteRolloff", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsScteStreamType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSection", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSectionATSCTableID", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSectionDVBTableID", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSectionSCTETableID", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSectionTableID", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSectionType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsStreamType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsT2DeliverySystemCell", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsT2DeliverySystemCellExtension", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsT2DeliverySystemDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsTOT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsTerrestrialDeliverySystemDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsTerrestrialGuardInterval", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsTerrestrialHierarchy", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsTerrestrialTransmissionMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) ADDITIONAL_INFO_PAGE", "3"), - ("(gint) GST_DVB_SERVICE_ADVANCED_CODEC_DIGITAL_RADIO_SOUND", "10"), - ("(gint) GST_DVB_SERVICE_ADVANCED_CODEC_HD_DIGITAL_TELEVISION", "25"), - ("(gint) GST_DVB_SERVICE_ADVANCED_CODEC_HD_NVOD_REFERENCE", "27"), - ("(gint) GST_DVB_SERVICE_ADVANCED_CODEC_HD_NVOD_TIME_SHIFTED", "26"), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_DIGITAL_RADIO_SOUND", + "10", + ), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_HD_DIGITAL_TELEVISION", + "25", + ), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_HD_NVOD_REFERENCE", + "27", + ), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_HD_NVOD_TIME_SHIFTED", + "26", + ), ("(gint) GST_DVB_SERVICE_ADVANCED_CODEC_MOSAIC", "11"), - ("(gint) GST_DVB_SERVICE_ADVANCED_CODEC_SD_DIGITAL_TELEVISION", "22"), - ("(gint) GST_DVB_SERVICE_ADVANCED_CODEC_SD_NVOD_REFERENCE", "24"), - ("(gint) GST_DVB_SERVICE_ADVANCED_CODEC_SD_NVOD_TIME_SHIFTED", "23"), - ("(gint) GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_DIGITAL_TELEVISION", "28"), - ("(gint) GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_NVOD_REFERENCE", "30"), - ("(gint) GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_NVOD_TIME_SHIFTED", "29"), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_SD_DIGITAL_TELEVISION", + "22", + ), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_SD_NVOD_REFERENCE", + "24", + ), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_SD_NVOD_TIME_SHIFTED", + "23", + ), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_DIGITAL_TELEVISION", + "28", + ), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_NVOD_REFERENCE", + "30", + ), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_NVOD_TIME_SHIFTED", + "29", + ), ("(gint) GST_DVB_SERVICE_DATA_BROADCAST", "12"), ("(gint) GST_DVB_SERVICE_DIGITAL_RADIO_SOUND", "2"), ("(gint) GST_DVB_SERVICE_DIGITAL_TELEVISION", "1"), @@ -356,7 +867,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_MPEGTS_AUDIO_TYPE_CLEAN_EFFECTS", "1"), ("(gint) GST_MPEGTS_AUDIO_TYPE_HEARING_IMPAIRED", "2"), ("(gint) GST_MPEGTS_AUDIO_TYPE_UNDEFINED", "0"), - ("(gint) GST_MPEGTS_AUDIO_TYPE_VISUAL_IMPAIRED_COMMENTARY", "3"), + ( + "(gint) GST_MPEGTS_AUDIO_TYPE_VISUAL_IMPAIRED_COMMENTARY", + "3", + ), ("(gint) GST_MPEGTS_CABLE_OUTER_FEC_NONE", "1"), ("(gint) GST_MPEGTS_CABLE_OUTER_FEC_RS_204_188", "2"), ("(gint) GST_MPEGTS_CABLE_OUTER_FEC_UNDEFINED", "0"), @@ -378,7 +892,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_MPEGTS_DVB_LINKAGE_EXTENDED_EVENT", "14"), ("(gint) GST_MPEGTS_DVB_LINKAGE_HAND_OVER_ASSOCIATED", "3"), ("(gint) GST_MPEGTS_DVB_LINKAGE_HAND_OVER_IDENTICAL", "1"), - ("(gint) GST_MPEGTS_DVB_LINKAGE_HAND_OVER_LOCAL_VARIATION", "2"), + ( + "(gint) GST_MPEGTS_DVB_LINKAGE_HAND_OVER_LOCAL_VARIATION", + "2", + ), ("(gint) GST_MPEGTS_DVB_LINKAGE_HAND_OVER_RESERVED", "0"), ("(gint) GST_MPEGTS_DVB_LINKAGE_INFORMATION", "1"), ("(gint) GST_MPEGTS_DVB_LINKAGE_IP_MAC_NOTIFICATION", "11"), @@ -387,7 +904,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_MPEGTS_DVB_LINKAGE_RESERVED_00", "0"), ("(gint) GST_MPEGTS_DVB_LINKAGE_SERVICE_REPLACEMENT", "5"), ("(gint) GST_MPEGTS_DVB_LINKAGE_SYSTEM_SOFTWARE_UPDATE", "9"), - ("(gint) GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_COMPLETE_SI", "4"), + ( + "(gint) GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_COMPLETE_SI", + "4", + ), ("(gint) GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_INT", "12"), ("(gint) GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_SSU", "10"), ("(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_ATIS_0", "112"), @@ -395,8 +915,14 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_CISSA", "16"), ("(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA1", "1"), ("(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA2", "2"), - ("(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_FULL_ENHANCED", "5"), - ("(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_MINIMAL_ENHANCED", "4"), + ( + "(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_FULL_ENHANCED", + "5", + ), + ( + "(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_MINIMAL_ENHANCED", + "4", + ), ("(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_STANDARD", "3"), ("(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_RESERVED", "0"), ("(gint) GST_MPEGTS_FEC_1_2", "1"), @@ -456,7 +982,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_MPEGTS_RUNNING_STATUS_OFF_AIR", "5"), ("(gint) GST_MPEGTS_RUNNING_STATUS_PAUSING", "3"), ("(gint) GST_MPEGTS_RUNNING_STATUS_RUNNING", "4"), - ("(gint) GST_MPEGTS_RUNNING_STATUS_STARTS_IN_FEW_SECONDS", "2"), + ( + "(gint) GST_MPEGTS_RUNNING_STATUS_STARTS_IN_FEW_SECONDS", + "2", + ), ("(gint) GST_MPEGTS_RUNNING_STATUS_UNDEFINED", "0"), ("(gint) GST_MPEGTS_SECTION_ATSC_CVCT", "12"), ("(gint) GST_MPEGTS_SECTION_ATSC_EIT", "15"), @@ -497,10 +1026,16 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_MPEGTS_STREAM_TYPE_H_222_1", "9"), ("(gint) GST_MPEGTS_STREAM_TYPE_IPMP_STREAM", "127"), ("(gint) GST_MPEGTS_STREAM_TYPE_METADATA_DATA_CAROUSEL", "23"), - ("(gint) GST_MPEGTS_STREAM_TYPE_METADATA_OBJECT_CAROUSEL", "24"), + ( + "(gint) GST_MPEGTS_STREAM_TYPE_METADATA_OBJECT_CAROUSEL", + "24", + ), ("(gint) GST_MPEGTS_STREAM_TYPE_METADATA_PES_PACKETS", "21"), ("(gint) GST_MPEGTS_STREAM_TYPE_METADATA_SECTIONS", "22"), - ("(gint) GST_MPEGTS_STREAM_TYPE_METADATA_SYNCHRONIZED_DOWNLOAD", "25"), + ( + "(gint) GST_MPEGTS_STREAM_TYPE_METADATA_SYNCHRONIZED_DOWNLOAD", + "25", + ), ("(gint) GST_MPEGTS_STREAM_TYPE_MHEG", "7"), ("(gint) GST_MPEGTS_STREAM_TYPE_MPEG2_IPMP", "26"), ("(gint) GST_MPEGTS_STREAM_TYPE_MPEG4_TIMED_TEXT", "29"), @@ -518,14 +1053,26 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_MPEGTS_STREAM_TYPE_SL_FLEXMUX_SECTIONS", "19"), ("(gint) GST_MPEGTS_STREAM_TYPE_SYNCHRONIZED_DOWNLOAD", "20"), ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_H264", "27"), - ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_H264_MVC_SUB_BITSTREAM", "32"), - ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_H264_STEREO_ADDITIONAL_VIEW", "35"), - ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_H264_SVC_SUB_BITSTREAM", "31"), + ( + "(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_H264_MVC_SUB_BITSTREAM", + "32", + ), + ( + "(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_H264_STEREO_ADDITIONAL_VIEW", + "35", + ), + ( + "(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_H264_SVC_SUB_BITSTREAM", + "31", + ), ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_HEVC", "36"), ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_JP2K", "33"), ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG1", "1"), ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG2", "2"), - ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG2_STEREO_ADDITIONAL_VIEW", "34"), + ( + "(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG2_STEREO_ADDITIONAL_VIEW", + "34", + ), ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG4", "16"), ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_RVC", "30"), ("(gint) GST_MPEGTS_TRANSMISSION_MODE_16K", "5"), @@ -553,7 +1100,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_MTS_DESC_ATSC_GENRE", "171"), ("(gint) GST_MTS_DESC_ATSC_GROUP_LINK", "184"), ("(gint) GST_MTS_DESC_ATSC_MODULE_LINK", "180"), - ("(gint) GST_MTS_DESC_ATSC_MULTIPROTOCOL_ENCAPSULATION", "167"), + ( + "(gint) GST_MTS_DESC_ATSC_MULTIPROTOCOL_ENCAPSULATION", + "167", + ), ("(gint) GST_MTS_DESC_ATSC_PID_COUNT", "165"), ("(gint) GST_MTS_DESC_ATSC_PRIVATE_INFORMATION", "173"), ("(gint) GST_MTS_DESC_ATSC_REDISTRIBUTION_CONTROL", "170"), @@ -616,7 +1166,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_MTS_DESC_DVB_PDC", "105"), ("(gint) GST_MTS_DESC_DVB_PRIVATE_DATA_SPECIFIER", "95"), ("(gint) GST_MTS_DESC_DVB_RELATED_CONTENT", "116"), - ("(gint) GST_MTS_DESC_DVB_S2_SATELLITE_DELIVERY_SYSTEM", "121"), + ( + "(gint) GST_MTS_DESC_DVB_S2_SATELLITE_DELIVERY_SYSTEM", + "121", + ), ("(gint) GST_MTS_DESC_DVB_SATELLITE_DELIVERY_SYSTEM", "67"), ("(gint) GST_MTS_DESC_DVB_SCRAMBLING", "101"), ("(gint) GST_MTS_DESC_DVB_SERVICE", "72"), @@ -732,24 +1285,48 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_MTS_DESC_VIDEO_WINDOW", "8"), ("(gint) GST_MTS_TABLE_ID_14496_OBJET_DESCRIPTOR", "5"), ("(gint) GST_MTS_TABLE_ID_14496_SCENE_DESCRIPTION", "4"), - ("(gint) GST_MTS_TABLE_ID_APPLICATION_INFORMATION_TABLE", "116"), + ( + "(gint) GST_MTS_TABLE_ID_APPLICATION_INFORMATION_TABLE", + "116", + ), ("(gint) GST_MTS_TABLE_ID_ATSC_AGGREGATE_DATA_EVENT", "217"), - ("(gint) GST_MTS_TABLE_ID_ATSC_AGGREGATE_EVENT_INFORMATION", "214"), - ("(gint) GST_MTS_TABLE_ID_ATSC_AGGREGATE_EXTENDED_TEXT", "215"), + ( + "(gint) GST_MTS_TABLE_ID_ATSC_AGGREGATE_EVENT_INFORMATION", + "214", + ), + ( + "(gint) GST_MTS_TABLE_ID_ATSC_AGGREGATE_EXTENDED_TEXT", + "215", + ), ("(gint) GST_MTS_TABLE_ID_ATSC_CABLE_VIRTUAL_CHANNEL", "201"), - ("(gint) GST_MTS_TABLE_ID_ATSC_CHANNEL_OR_EVENT_EXTENDED_TEXT", "204"), + ( + "(gint) GST_MTS_TABLE_ID_ATSC_CHANNEL_OR_EVENT_EXTENDED_TEXT", + "204", + ), ("(gint) GST_MTS_TABLE_ID_ATSC_DATA_EVENT", "206"), ("(gint) GST_MTS_TABLE_ID_ATSC_DATA_SERVICE", "207"), - ("(gint) GST_MTS_TABLE_ID_ATSC_DIRECTED_CHANNEL_CHANGE", "211"), - ("(gint) GST_MTS_TABLE_ID_ATSC_DIRECTED_CHANNEL_CHANGE_SECTION_CODE", "212"), + ( + "(gint) GST_MTS_TABLE_ID_ATSC_DIRECTED_CHANNEL_CHANGE", + "211", + ), + ( + "(gint) GST_MTS_TABLE_ID_ATSC_DIRECTED_CHANNEL_CHANGE_SECTION_CODE", + "212", + ), ("(gint) GST_MTS_TABLE_ID_ATSC_EVENT_INFORMATION", "203"), ("(gint) GST_MTS_TABLE_ID_ATSC_LONG_TERM_SERVICE", "210"), ("(gint) GST_MTS_TABLE_ID_ATSC_MASTER_GUIDE", "199"), ("(gint) GST_MTS_TABLE_ID_ATSC_NETWORK_RESOURCE", "209"), ("(gint) GST_MTS_TABLE_ID_ATSC_RATING_REGION", "202"), - ("(gint) GST_MTS_TABLE_ID_ATSC_SATELLITE_VIRTUAL_CHANNEL", "218"), + ( + "(gint) GST_MTS_TABLE_ID_ATSC_SATELLITE_VIRTUAL_CHANNEL", + "218", + ), ("(gint) GST_MTS_TABLE_ID_ATSC_SYSTEM_TIME", "205"), - ("(gint) GST_MTS_TABLE_ID_ATSC_TERRESTRIAL_VIRTUAL_CHANNEL", "200"), + ( + "(gint) GST_MTS_TABLE_ID_ATSC_TERRESTRIAL_VIRTUAL_CHANNEL", + "200", + ), ("(gint) GST_MTS_TABLE_ID_BOUQUET_ASSOCIATION", "74"), ("(gint) GST_MTS_TABLE_ID_CA_MESSAGE_ECM_0", "128"), ("(gint) GST_MTS_TABLE_ID_CA_MESSAGE_ECM_1", "129"), @@ -761,25 +1338,55 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_MTS_TABLE_ID_CONTENT_IDENTIFIER", "119"), ("(gint) GST_MTS_TABLE_ID_DISCONTINUITY_INFORMATION", "126"), ("(gint) GST_MTS_TABLE_ID_DSM_CC_ADDRESSABLE_SECTIONS", "63"), - ("(gint) GST_MTS_TABLE_ID_DSM_CC_DOWNLOAD_DATA_MESSAGES", "60"), - ("(gint) GST_MTS_TABLE_ID_DSM_CC_MULTIPROTO_ENCAPSULATED_DATA", "58"), + ( + "(gint) GST_MTS_TABLE_ID_DSM_CC_DOWNLOAD_DATA_MESSAGES", + "60", + ), + ( + "(gint) GST_MTS_TABLE_ID_DSM_CC_MULTIPROTO_ENCAPSULATED_DATA", + "58", + ), ("(gint) GST_MTS_TABLE_ID_DSM_CC_PRIVATE_DATA", "62"), ("(gint) GST_MTS_TABLE_ID_DSM_CC_STREAM_DESCRIPTORS", "61"), ("(gint) GST_MTS_TABLE_ID_DSM_CC_U_N_MESSAGES", "59"), - ("(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_ACTUAL_TS_PRESENT", "78"), - ("(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_ACTUAL_TS_SCHEDULE_1", "80"), - ("(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_ACTUAL_TS_SCHEDULE_N", "95"), - ("(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_OTHER_TS_PRESENT", "79"), - ("(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_OTHER_TS_SCHEDULE_1", "96"), - ("(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_OTHER_TS_SCHEDULE_N", "111"), + ( + "(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_ACTUAL_TS_PRESENT", + "78", + ), + ( + "(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_ACTUAL_TS_SCHEDULE_1", + "80", + ), + ( + "(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_ACTUAL_TS_SCHEDULE_N", + "95", + ), + ( + "(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_OTHER_TS_PRESENT", + "79", + ), + ( + "(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_OTHER_TS_SCHEDULE_1", + "96", + ), + ( + "(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_OTHER_TS_SCHEDULE_N", + "111", + ), ("(gint) GST_MTS_TABLE_ID_FCT", "161"), ("(gint) GST_MTS_TABLE_ID_IPMP_CONTROL_INFORMATION", "7"), ("(gint) GST_MTS_TABLE_ID_LL_FEC_PARITY_DATA_TABLE", "177"), ("(gint) GST_MTS_TABLE_ID_METADATA", "6"), ("(gint) GST_MTS_TABLE_ID_MPE_FEC", "120"), ("(gint) GST_MTS_TABLE_ID_MPE_IFEC", "122"), - ("(gint) GST_MTS_TABLE_ID_NETWORK_INFORMATION_ACTUAL_NETWORK", "64"), - ("(gint) GST_MTS_TABLE_ID_NETWORK_INFORMATION_OTHER_NETWORK", "65"), + ( + "(gint) GST_MTS_TABLE_ID_NETWORK_INFORMATION_ACTUAL_NETWORK", + "64", + ), + ( + "(gint) GST_MTS_TABLE_ID_NETWORK_INFORMATION_OTHER_NETWORK", + "65", + ), ("(gint) GST_MTS_TABLE_ID_PCR_PACKET_PAYLOAD", "166"), ("(gint) GST_MTS_TABLE_ID_PROGRAM_ASSOCIATION", "0"), ("(gint) GST_MTS_TABLE_ID_RELATED_CONTENT", "118"), @@ -794,7 +1401,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_MTS_TABLE_ID_SCTE_RESERVED", "225"), ("(gint) GST_MTS_TABLE_ID_SCTE_SPLICE", "252"), ("(gint) GST_MTS_TABLE_ID_SELECTION_INFORMATION", "127"), - ("(gint) GST_MTS_TABLE_ID_SERVICE_DESCRIPTION_ACTUAL_TS", "66"), + ( + "(gint) GST_MTS_TABLE_ID_SERVICE_DESCRIPTION_ACTUAL_TS", + "66", + ), ("(gint) GST_MTS_TABLE_ID_SERVICE_DESCRIPTION_OTHER_TS", "70"), ("(gint) GST_MTS_TABLE_ID_SPT", "163"), ("(gint) GST_MTS_TABLE_ID_STUFFING", "114"), @@ -803,7 +1413,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_MTS_TABLE_ID_TIM", "176"), ("(gint) GST_MTS_TABLE_ID_TIME_DATE", "112"), ("(gint) GST_MTS_TABLE_ID_TIME_OFFSET", "115"), - ("(gint) GST_MTS_TABLE_ID_TRANSMISSION_MODE_SUPPORT_PAYLOAD", "170"), + ( + "(gint) GST_MTS_TABLE_ID_TRANSMISSION_MODE_SUPPORT_PAYLOAD", + "170", + ), ("(gint) GST_MTS_TABLE_ID_TS_DESCRIPTION", "3"), ("(gint) GST_MTS_TABLE_ID_TS_PROGRAM_MAP", "2"), ("(gint) GST_MTS_TABLE_ID_UNSET", "255"), @@ -812,5 +1425,3 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) PROGRAMME_SCHEDULE_PAGE", "4"), ("(gint) SUBTITLE_PAGE", "2"), ]; - - diff --git a/gstreamer-net-sys/build.rs b/gstreamer-net-sys/build.rs index aeb97cb97..bb1b24a71 100644 --- a/gstreamer-net-sys/build.rs +++ b/gstreamer-net-sys/build.rs @@ -6,8 +6,8 @@ extern crate pkg_config; use pkg_config::{Config, Error}; use std::env; -use std::io::prelude::*; use std::io; +use std::io::prelude::*; use std::process; fn main() { @@ -48,7 +48,7 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()) + return Ok(()); } let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); @@ -70,8 +70,10 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } for path in library.link_paths.iter() { - println!("cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist")); + println!( + "cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist") + ); } } Ok(()) @@ -85,4 +87,3 @@ fn find() -> Result<(), Error> { Err(err) => Err(err), } } - diff --git a/gstreamer-net-sys/src/lib.rs b/gstreamer-net-sys/src/lib.rs index 68e59c6a3..0cd89daca 100644 --- a/gstreamer-net-sys/src/lib.rs +++ b/gstreamer-net-sys/src/lib.rs @@ -3,18 +3,23 @@ // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] -extern crate libc; +extern crate gio_sys as gio; extern crate glib_sys as glib; extern crate gobject_sys as gobject; -extern crate gio_sys as gio; extern crate gstreamer_sys as gst; +extern crate libc; #[allow(unused_imports)] -use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, - c_short, c_ushort, c_long, c_ulong, - c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; +use libc::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, + intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -22,13 +27,18 @@ use glib::{gboolean, gconstpointer, gpointer, GType}; // Constants pub const GST_NET_TIME_PACKET_SIZE: c_int = 16; pub const GST_PTP_CLOCK_ID_NONE: u64 = 18446744073709551615; -pub const GST_PTP_STATISTICS_BEST_MASTER_CLOCK_SELECTED: *const c_char = b"GstPtpStatisticsBestMasterClockSelected\0" as *const u8 as *const c_char; -pub const GST_PTP_STATISTICS_NEW_DOMAIN_FOUND: *const c_char = b"GstPtpStatisticsNewDomainFound\0" as *const u8 as *const c_char; -pub const GST_PTP_STATISTICS_PATH_DELAY_MEASURED: *const c_char = b"GstPtpStatisticsPathDelayMeasured\0" as *const u8 as *const c_char; -pub const GST_PTP_STATISTICS_TIME_UPDATED: *const c_char = b"GstPtpStatisticsTimeUpdated\0" as *const u8 as *const c_char; +pub const GST_PTP_STATISTICS_BEST_MASTER_CLOCK_SELECTED: *const c_char = + b"GstPtpStatisticsBestMasterClockSelected\0" as *const u8 as *const c_char; +pub const GST_PTP_STATISTICS_NEW_DOMAIN_FOUND: *const c_char = + b"GstPtpStatisticsNewDomainFound\0" as *const u8 as *const c_char; +pub const GST_PTP_STATISTICS_PATH_DELAY_MEASURED: *const c_char = + b"GstPtpStatisticsPathDelayMeasured\0" as *const u8 as *const c_char; +pub const GST_PTP_STATISTICS_TIME_UPDATED: *const c_char = + b"GstPtpStatisticsTimeUpdated\0" as *const u8 as *const c_char; // Callbacks -pub type GstPtpStatisticsCallback = Option gboolean>; +pub type GstPtpStatisticsCallback = + Option gboolean>; // Records #[repr(C)] @@ -41,9 +51,9 @@ pub struct GstNetAddressMeta { impl ::std::fmt::Debug for GstNetAddressMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstNetAddressMeta @ {:?}", self as *const _)) - .field("meta", &self.meta) - .field("addr", &self.addr) - .finish() + .field("meta", &self.meta) + .field("addr", &self.addr) + .finish() } } @@ -57,8 +67,8 @@ pub struct GstNetClientClockClass { impl ::std::fmt::Debug for GstNetClientClockClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstNetClientClockClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -76,10 +86,13 @@ pub struct GstNetControlMessageMeta { impl ::std::fmt::Debug for GstNetControlMessageMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstNetControlMessageMeta @ {:?}", self as *const _)) - .field("meta", &self.meta) - .field("message", &self.message) - .finish() + f.debug_struct(&format!( + "GstNetControlMessageMeta @ {:?}", + self as *const _ + )) + .field("meta", &self.meta) + .field("message", &self.message) + .finish() } } @@ -93,9 +106,9 @@ pub struct GstNetTimePacket { impl ::std::fmt::Debug for GstNetTimePacket { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstNetTimePacket @ {:?}", self as *const _)) - .field("local_time", &self.local_time) - .field("remote_time", &self.remote_time) - .finish() + .field("local_time", &self.local_time) + .field("remote_time", &self.remote_time) + .finish() } } @@ -109,9 +122,9 @@ pub struct GstNetTimeProviderClass { impl ::std::fmt::Debug for GstNetTimeProviderClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstNetTimeProviderClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("_gst_reserved", &self._gst_reserved) - .finish() + .field("parent_class", &self.parent_class) + .field("_gst_reserved", &self._gst_reserved) + .finish() } } @@ -130,8 +143,8 @@ pub struct GstNtpClockClass { impl ::std::fmt::Debug for GstNtpClockClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstNtpClockClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -145,8 +158,8 @@ pub struct GstPtpClockClass { impl ::std::fmt::Debug for GstPtpClockClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPtpClockClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -167,8 +180,8 @@ pub struct GstNetClientClock { impl ::std::fmt::Debug for GstNetClientClock { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstNetClientClock @ {:?}", self as *const _)) - .field("clock", &self.clock) - .finish() + .field("clock", &self.clock) + .finish() } } @@ -183,8 +196,8 @@ pub struct GstNetTimeProvider { impl ::std::fmt::Debug for GstNetTimeProvider { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstNetTimeProvider @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -199,8 +212,8 @@ pub struct GstNtpClock { impl ::std::fmt::Debug for GstNtpClock { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstNtpClock @ {:?}", self as *const _)) - .field("clock", &self.clock) - .finish() + .field("clock", &self.clock) + .finish() } } @@ -215,8 +228,8 @@ pub struct GstPtpClock { impl ::std::fmt::Debug for GstPtpClock { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPtpClock @ {:?}", self as *const _)) - .field("clock", &self.clock) - .finish() + .field("clock", &self.clock) + .finish() } } @@ -239,28 +252,51 @@ extern "C" { pub fn gst_net_time_packet_new(buffer: *const u8) -> *mut GstNetTimePacket; pub fn gst_net_time_packet_copy(packet: *const GstNetTimePacket) -> *mut GstNetTimePacket; pub fn gst_net_time_packet_free(packet: *mut GstNetTimePacket); - pub fn gst_net_time_packet_send(packet: *const GstNetTimePacket, socket: *mut gio::GSocket, dest_address: *mut gio::GSocketAddress, error: *mut *mut glib::GError) -> gboolean; + pub fn gst_net_time_packet_send( + packet: *const GstNetTimePacket, + socket: *mut gio::GSocket, + dest_address: *mut gio::GSocketAddress, + error: *mut *mut glib::GError, + ) -> gboolean; pub fn gst_net_time_packet_serialize(packet: *const GstNetTimePacket) -> *mut u8; - pub fn gst_net_time_packet_receive(socket: *mut gio::GSocket, src_address: *mut *mut gio::GSocketAddress, error: *mut *mut glib::GError) -> *mut GstNetTimePacket; + pub fn gst_net_time_packet_receive( + socket: *mut gio::GSocket, + src_address: *mut *mut gio::GSocketAddress, + error: *mut *mut glib::GError, + ) -> *mut GstNetTimePacket; //========================================================================= // GstNetClientClock //========================================================================= pub fn gst_net_client_clock_get_type() -> GType; - pub fn gst_net_client_clock_new(name: *const c_char, remote_address: *const c_char, remote_port: c_int, base_time: gst::GstClockTime) -> *mut gst::GstClock; + pub fn gst_net_client_clock_new( + name: *const c_char, + remote_address: *const c_char, + remote_port: c_int, + base_time: gst::GstClockTime, + ) -> *mut gst::GstClock; //========================================================================= // GstNetTimeProvider //========================================================================= pub fn gst_net_time_provider_get_type() -> GType; - pub fn gst_net_time_provider_new(clock: *mut gst::GstClock, address: *const c_char, port: c_int) -> *mut GstNetTimeProvider; + pub fn gst_net_time_provider_new( + clock: *mut gst::GstClock, + address: *const c_char, + port: c_int, + ) -> *mut GstNetTimeProvider; //========================================================================= // GstNtpClock //========================================================================= pub fn gst_ntp_clock_get_type() -> GType; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_ntp_clock_new(name: *const c_char, remote_address: *const c_char, remote_port: c_int, base_time: gst::GstClockTime) -> *mut gst::GstClock; + pub fn gst_ntp_clock_new( + name: *const c_char, + remote_address: *const c_char, + remote_port: c_int, + base_time: gst::GstClockTime, + ) -> *mut gst::GstClock; //========================================================================= // GstPtpClock @@ -272,8 +308,14 @@ extern "C" { //========================================================================= // Other functions //========================================================================= - pub fn gst_buffer_add_net_address_meta(buffer: *mut gst::GstBuffer, addr: *mut gio::GSocketAddress) -> *mut GstNetAddressMeta; - pub fn gst_buffer_add_net_control_message_meta(buffer: *mut gst::GstBuffer, message: *mut gio::GSocketControlMessage) -> *mut GstNetControlMessageMeta; + pub fn gst_buffer_add_net_address_meta( + buffer: *mut gst::GstBuffer, + addr: *mut gio::GSocketAddress, + ) -> *mut GstNetAddressMeta; + pub fn gst_buffer_add_net_control_message_meta( + buffer: *mut gst::GstBuffer, + message: *mut gio::GSocketControlMessage, + ) -> *mut GstNetControlMessageMeta; pub fn gst_buffer_get_net_address_meta(buffer: *mut gst::GstBuffer) -> *mut GstNetAddressMeta; pub fn gst_net_address_meta_api_get_type() -> GType; pub fn gst_net_control_message_meta_api_get_type() -> GType; @@ -286,7 +328,11 @@ extern "C" { #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_ptp_is_supported() -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_ptp_statistics_callback_add(callback: GstPtpStatisticsCallback, user_data: gpointer, destroy_data: glib::GDestroyNotify) -> c_ulong; + pub fn gst_ptp_statistics_callback_add( + callback: GstPtpStatisticsCallback, + user_data: gpointer, + destroy_data: glib::GDestroyNotify, + ) -> c_ulong; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_ptp_statistics_callback_remove(id: c_ulong); diff --git a/gstreamer-net-sys/tests/abi.rs b/gstreamer-net-sys/tests/abi.rs index 377a69550..97f8c0a71 100644 --- a/gstreamer-net-sys/tests/abi.rs +++ b/gstreamer-net-sys/tests/abi.rs @@ -5,13 +5,13 @@ extern crate gstreamer_net_sys; extern crate shell_words; extern crate tempdir; +use gstreamer_net_sys::*; use std::env; use std::error::Error; -use std::path::Path; use std::mem::{align_of, size_of}; +use std::path::Path; use std::process::Command; use std::str; -use gstreamer_net_sys::*; static PACKAGES: &[&str] = &["gstreamer-net-1.0"]; @@ -47,8 +47,7 @@ impl Compiler { cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { - return Err(format!("compilation command {:?} failed, {}", - &cmd, status).into()); + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } @@ -77,14 +76,12 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { cmd.args(packages); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {:?} returned {}", - &cmd, out.status).into()); + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } - #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, @@ -115,9 +112,8 @@ impl Results { fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", - self.passed, - self.failed, - self.failed_to_compile) + self.passed, self.failed, self.failed_to_compile + ) } fn expect_total_success(&self) { if self.failed == 0 { @@ -133,24 +129,28 @@ fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!("1", - get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), - "failed to obtain correct constant value for 1"); + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); - eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_value, c_value); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); } } }; @@ -166,24 +166,31 @@ fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!(Layout {size: 1, alignment: 1}, - get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), - "failed to obtain correct layout for char type"); + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); - eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_layout, &c_layout); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); } } }; @@ -203,15 +210,14 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result Result> { @@ -223,41 +229,118 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result(), alignment: align_of::()}), - ("GstNetClientClock", Layout {size: size_of::(), alignment: align_of::()}), - ("GstNetClientClockClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstNetControlMessageMeta", Layout {size: size_of::(), alignment: align_of::()}), - ("GstNetTimePacket", Layout {size: size_of::(), alignment: align_of::()}), - ("GstNetTimeProvider", Layout {size: size_of::(), alignment: align_of::()}), - ("GstNetTimeProviderClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstNtpClock", Layout {size: size_of::(), alignment: align_of::()}), - ("GstNtpClockClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPtpClock", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPtpClockClass", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstNetAddressMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNetClientClock", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNetClientClockClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNetControlMessageMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNetTimePacket", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNetTimeProvider", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNetTimeProviderClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNtpClock", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNtpClockClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPtpClock", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPtpClockClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ ("GST_NET_TIME_PACKET_SIZE", "16"), ("GST_PTP_CLOCK_ID_NONE", "18446744073709551615"), - ("GST_PTP_STATISTICS_BEST_MASTER_CLOCK_SELECTED", "GstPtpStatisticsBestMasterClockSelected"), - ("GST_PTP_STATISTICS_NEW_DOMAIN_FOUND", "GstPtpStatisticsNewDomainFound"), - ("GST_PTP_STATISTICS_PATH_DELAY_MEASURED", "GstPtpStatisticsPathDelayMeasured"), - ("GST_PTP_STATISTICS_TIME_UPDATED", "GstPtpStatisticsTimeUpdated"), + ( + "GST_PTP_STATISTICS_BEST_MASTER_CLOCK_SELECTED", + "GstPtpStatisticsBestMasterClockSelected", + ), + ( + "GST_PTP_STATISTICS_NEW_DOMAIN_FOUND", + "GstPtpStatisticsNewDomainFound", + ), + ( + "GST_PTP_STATISTICS_PATH_DELAY_MEASURED", + "GstPtpStatisticsPathDelayMeasured", + ), + ( + "GST_PTP_STATISTICS_TIME_UPDATED", + "GstPtpStatisticsTimeUpdated", + ), ]; - - diff --git a/gstreamer-pbutils-sys/build.rs b/gstreamer-pbutils-sys/build.rs index cbb823490..4eed61681 100644 --- a/gstreamer-pbutils-sys/build.rs +++ b/gstreamer-pbutils-sys/build.rs @@ -6,8 +6,8 @@ extern crate pkg_config; use pkg_config::{Config, Error}; use std::env; -use std::io::prelude::*; use std::io; +use std::io::prelude::*; use std::process; fn main() { @@ -46,7 +46,7 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()) + return Ok(()); } let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); @@ -68,8 +68,10 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } for path in library.link_paths.iter() { - println!("cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist")); + println!( + "cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist") + ); } } Ok(()) @@ -83,4 +85,3 @@ fn find() -> Result<(), Error> { Err(err) => Err(err), } } - diff --git a/gstreamer-pbutils-sys/src/lib.rs b/gstreamer-pbutils-sys/src/lib.rs index 2125c7e8c..b52c00bf1 100644 --- a/gstreamer-pbutils-sys/src/lib.rs +++ b/gstreamer-pbutils-sys/src/lib.rs @@ -3,19 +3,24 @@ // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] -extern crate libc; extern crate glib_sys as glib; extern crate gobject_sys as gobject; -extern crate gstreamer_sys as gst; extern crate gstreamer_audio_sys as gst_audio; +extern crate gstreamer_sys as gst; extern crate gstreamer_video_sys as gst_video; +extern crate libc; #[allow(unused_imports)] -use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, - c_short, c_ushort, c_long, c_ulong, - c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; +use libc::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, + intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -66,9 +71,12 @@ pub const GST_INSTALL_PLUGINS_INSTALL_IN_PROGRESS: GstInstallPluginsReturn = 203 // Constants pub const GST_ENCODING_CATEGORY_CAPTURE: *const c_char = b"capture\0" as *const u8 as *const c_char; pub const GST_ENCODING_CATEGORY_DEVICE: *const c_char = b"device\0" as *const u8 as *const c_char; -pub const GST_ENCODING_CATEGORY_FILE_EXTENSION: *const c_char = b"file-extension\0" as *const u8 as *const c_char; -pub const GST_ENCODING_CATEGORY_ONLINE_SERVICE: *const c_char = b"online-service\0" as *const u8 as *const c_char; -pub const GST_ENCODING_CATEGORY_STORAGE_EDITING: *const c_char = b"storage-editing\0" as *const u8 as *const c_char; +pub const GST_ENCODING_CATEGORY_FILE_EXTENSION: *const c_char = + b"file-extension\0" as *const u8 as *const c_char; +pub const GST_ENCODING_CATEGORY_ONLINE_SERVICE: *const c_char = + b"online-service\0" as *const u8 as *const c_char; +pub const GST_ENCODING_CATEGORY_STORAGE_EDITING: *const c_char = + b"storage-editing\0" as *const u8 as *const c_char; // Flags pub type GstDiscovererSerializeFlags = c_uint; @@ -79,8 +87,15 @@ pub const GST_DISCOVERER_SERIALIZE_MISC: GstDiscovererSerializeFlags = 4; pub const GST_DISCOVERER_SERIALIZE_ALL: GstDiscovererSerializeFlags = 7; // Callbacks -pub type GstAudioVisualizerShaderFunc = Option; -pub type GstInstallPluginsResultFunc = Option; +pub type GstAudioVisualizerShaderFunc = Option< + unsafe extern "C" fn( + *mut GstAudioVisualizer, + *const gst_video::GstVideoFrame, + *mut gst_video::GstVideoFrame, + ), +>; +pub type GstInstallPluginsResultFunc = + Option; // Records #[repr(C)] @@ -88,17 +103,24 @@ pub type GstInstallPluginsResultFunc = Option gboolean>, - pub render: Option gboolean>, - pub decide_allocation: Option gboolean>, + pub render: Option< + unsafe extern "C" fn( + *mut GstAudioVisualizer, + *mut gst::GstBuffer, + *mut gst_video::GstVideoFrame, + ) -> gboolean, + >, + pub decide_allocation: + Option gboolean>, } impl ::std::fmt::Debug for GstAudioVisualizerClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioVisualizerClass @ {:?}", self as *const _)) - .field("setup", &self.setup) - .field("render", &self.render) - .field("decide_allocation", &self.decide_allocation) - .finish() + .field("setup", &self.setup) + .field("render", &self.render) + .field("decide_allocation", &self.decide_allocation) + .finish() } } @@ -113,7 +135,9 @@ pub struct GstDiscovererClass { pub parentclass: gobject::GObjectClass, pub finished: Option, pub starting: Option, - pub discovered: Option, + pub discovered: Option< + unsafe extern "C" fn(*mut GstDiscoverer, *mut GstDiscovererInfo, *const glib::GError), + >, pub source_setup: Option, pub _reserved: [gpointer; 4], } @@ -121,13 +145,13 @@ pub struct GstDiscovererClass { impl ::std::fmt::Debug for GstDiscovererClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDiscovererClass @ {:?}", self as *const _)) - .field("parentclass", &self.parentclass) - .field("finished", &self.finished) - .field("starting", &self.starting) - .field("discovered", &self.discovered) - .field("source_setup", &self.source_setup) - .field("_reserved", &self._reserved) - .finish() + .field("parentclass", &self.parentclass) + .field("finished", &self.finished) + .field("starting", &self.starting) + .field("discovered", &self.discovered) + .field("source_setup", &self.source_setup) + .field("_reserved", &self._reserved) + .finish() } } @@ -161,8 +185,11 @@ pub struct GstInstallPluginsContext(c_void); impl ::std::fmt::Debug for GstInstallPluginsContext { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstInstallPluginsContext @ {:?}", self as *const _)) - .finish() + f.debug_struct(&format!( + "GstInstallPluginsContext @ {:?}", + self as *const _ + )) + .finish() } } @@ -180,11 +207,11 @@ pub struct GstAudioVisualizer { impl ::std::fmt::Debug for GstAudioVisualizer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAudioVisualizer @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("req_spf", &self.req_spf) - .field("vinfo", &self.vinfo) - .field("ainfo", &self.ainfo) - .finish() + .field("parent", &self.parent) + .field("req_spf", &self.req_spf) + .field("vinfo", &self.vinfo) + .field("ainfo", &self.ainfo) + .finish() } } @@ -199,8 +226,8 @@ pub struct GstDiscoverer { impl ::std::fmt::Debug for GstDiscoverer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDiscoverer @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -210,7 +237,7 @@ pub struct GstDiscovererAudioInfo(c_void); impl ::std::fmt::Debug for GstDiscovererAudioInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDiscovererAudioInfo @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -219,8 +246,11 @@ pub struct GstDiscovererContainerInfo(c_void); impl ::std::fmt::Debug for GstDiscovererContainerInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstDiscovererContainerInfo @ {:?}", self as *const _)) - .finish() + f.debug_struct(&format!( + "GstDiscovererContainerInfo @ {:?}", + self as *const _ + )) + .finish() } } @@ -230,7 +260,7 @@ pub struct GstDiscovererInfo(c_void); impl ::std::fmt::Debug for GstDiscovererInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDiscovererInfo @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -240,7 +270,7 @@ pub struct GstDiscovererStreamInfo(c_void); impl ::std::fmt::Debug for GstDiscovererStreamInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDiscovererStreamInfo @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -249,8 +279,11 @@ pub struct GstDiscovererSubtitleInfo(c_void); impl ::std::fmt::Debug for GstDiscovererSubtitleInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstDiscovererSubtitleInfo @ {:?}", self as *const _)) - .finish() + f.debug_struct(&format!( + "GstDiscovererSubtitleInfo @ {:?}", + self as *const _ + )) + .finish() } } @@ -260,7 +293,7 @@ pub struct GstDiscovererVideoInfo(c_void); impl ::std::fmt::Debug for GstDiscovererVideoInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDiscovererVideoInfo @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -270,7 +303,7 @@ pub struct GstEncodingAudioProfile(c_void); impl ::std::fmt::Debug for GstEncodingAudioProfile { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstEncodingAudioProfile @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -279,8 +312,11 @@ pub struct GstEncodingContainerProfile(c_void); impl ::std::fmt::Debug for GstEncodingContainerProfile { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstEncodingContainerProfile @ {:?}", self as *const _)) - .finish() + f.debug_struct(&format!( + "GstEncodingContainerProfile @ {:?}", + self as *const _ + )) + .finish() } } @@ -290,7 +326,7 @@ pub struct GstEncodingProfile(c_void); impl ::std::fmt::Debug for GstEncodingProfile { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstEncodingProfile @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -300,7 +336,7 @@ pub struct GstEncodingTarget(c_void); impl ::std::fmt::Debug for GstEncodingTarget { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstEncodingTarget @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -310,7 +346,7 @@ pub struct GstEncodingVideoProfile(c_void); impl ::std::fmt::Debug for GstEncodingVideoProfile { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstEncodingVideoProfile @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -342,14 +378,25 @@ extern "C" { //========================================================================= pub fn gst_install_plugins_context_get_type() -> GType; pub fn gst_install_plugins_context_new() -> *mut GstInstallPluginsContext; - pub fn gst_install_plugins_context_copy(ctx: *mut GstInstallPluginsContext) -> *mut GstInstallPluginsContext; + pub fn gst_install_plugins_context_copy( + ctx: *mut GstInstallPluginsContext, + ) -> *mut GstInstallPluginsContext; pub fn gst_install_plugins_context_free(ctx: *mut GstInstallPluginsContext); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_install_plugins_context_set_confirm_search(ctx: *mut GstInstallPluginsContext, confirm_search: gboolean); + pub fn gst_install_plugins_context_set_confirm_search( + ctx: *mut GstInstallPluginsContext, + confirm_search: gboolean, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_install_plugins_context_set_desktop_id(ctx: *mut GstInstallPluginsContext, desktop_id: *const c_char); + pub fn gst_install_plugins_context_set_desktop_id( + ctx: *mut GstInstallPluginsContext, + desktop_id: *const c_char, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_install_plugins_context_set_startup_notification_id(ctx: *mut GstInstallPluginsContext, startup_id: *const c_char); + pub fn gst_install_plugins_context_set_startup_notification_id( + ctx: *mut GstInstallPluginsContext, + startup_id: *const c_char, + ); pub fn gst_install_plugins_context_set_xid(ctx: *mut GstInstallPluginsContext, xid: c_uint); //========================================================================= @@ -361,9 +408,19 @@ extern "C" { // GstDiscoverer //========================================================================= pub fn gst_discoverer_get_type() -> GType; - pub fn gst_discoverer_new(timeout: gst::GstClockTime, error: *mut *mut glib::GError) -> *mut GstDiscoverer; - pub fn gst_discoverer_discover_uri(discoverer: *mut GstDiscoverer, uri: *const c_char, error: *mut *mut glib::GError) -> *mut GstDiscovererInfo; - pub fn gst_discoverer_discover_uri_async(discoverer: *mut GstDiscoverer, uri: *const c_char) -> gboolean; + pub fn gst_discoverer_new( + timeout: gst::GstClockTime, + error: *mut *mut glib::GError, + ) -> *mut GstDiscoverer; + pub fn gst_discoverer_discover_uri( + discoverer: *mut GstDiscoverer, + uri: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GstDiscovererInfo; + pub fn gst_discoverer_discover_uri_async( + discoverer: *mut GstDiscoverer, + uri: *const c_char, + ) -> gboolean; pub fn gst_discoverer_start(discoverer: *mut GstDiscoverer); pub fn gst_discoverer_stop(discoverer: *mut GstDiscoverer); @@ -376,63 +433,103 @@ extern "C" { pub fn gst_discoverer_audio_info_get_channel_mask(info: *const GstDiscovererAudioInfo) -> u64; pub fn gst_discoverer_audio_info_get_channels(info: *const GstDiscovererAudioInfo) -> c_uint; pub fn gst_discoverer_audio_info_get_depth(info: *const GstDiscovererAudioInfo) -> c_uint; - pub fn gst_discoverer_audio_info_get_language(info: *const GstDiscovererAudioInfo) -> *const c_char; - pub fn gst_discoverer_audio_info_get_max_bitrate(info: *const GstDiscovererAudioInfo) -> c_uint; - pub fn gst_discoverer_audio_info_get_sample_rate(info: *const GstDiscovererAudioInfo) -> c_uint; + pub fn gst_discoverer_audio_info_get_language( + info: *const GstDiscovererAudioInfo, + ) -> *const c_char; + pub fn gst_discoverer_audio_info_get_max_bitrate(info: *const GstDiscovererAudioInfo) + -> c_uint; + pub fn gst_discoverer_audio_info_get_sample_rate(info: *const GstDiscovererAudioInfo) + -> c_uint; //========================================================================= // GstDiscovererContainerInfo //========================================================================= pub fn gst_discoverer_container_info_get_type() -> GType; - pub fn gst_discoverer_container_info_get_streams(info: *mut GstDiscovererContainerInfo) -> *mut glib::GList; + pub fn gst_discoverer_container_info_get_streams( + info: *mut GstDiscovererContainerInfo, + ) -> *mut glib::GList; //========================================================================= // GstDiscovererInfo //========================================================================= pub fn gst_discoverer_info_get_type() -> GType; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_discoverer_info_from_variant(variant: *mut glib::GVariant) -> *mut GstDiscovererInfo; + pub fn gst_discoverer_info_from_variant(variant: *mut glib::GVariant) + -> *mut GstDiscovererInfo; pub fn gst_discoverer_info_copy(ptr: *mut GstDiscovererInfo) -> *mut GstDiscovererInfo; pub fn gst_discoverer_info_get_audio_streams(info: *mut GstDiscovererInfo) -> *mut glib::GList; - pub fn gst_discoverer_info_get_container_streams(info: *mut GstDiscovererInfo) -> *mut glib::GList; + pub fn gst_discoverer_info_get_container_streams( + info: *mut GstDiscovererInfo, + ) -> *mut glib::GList; pub fn gst_discoverer_info_get_duration(info: *const GstDiscovererInfo) -> gst::GstClockTime; #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_discoverer_info_get_live(info: *const GstDiscovererInfo) -> gboolean; - pub fn gst_discoverer_info_get_misc(info: *const GstDiscovererInfo) -> *const gst::GstStructure; + pub fn gst_discoverer_info_get_misc(info: *const GstDiscovererInfo) + -> *const gst::GstStructure; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_discoverer_info_get_missing_elements_installer_details(info: *const GstDiscovererInfo) -> *mut *const c_char; + pub fn gst_discoverer_info_get_missing_elements_installer_details( + info: *const GstDiscovererInfo, + ) -> *mut *const c_char; pub fn gst_discoverer_info_get_result(info: *const GstDiscovererInfo) -> GstDiscovererResult; pub fn gst_discoverer_info_get_seekable(info: *const GstDiscovererInfo) -> gboolean; - pub fn gst_discoverer_info_get_stream_info(info: *mut GstDiscovererInfo) -> *mut GstDiscovererStreamInfo; + pub fn gst_discoverer_info_get_stream_info( + info: *mut GstDiscovererInfo, + ) -> *mut GstDiscovererStreamInfo; pub fn gst_discoverer_info_get_stream_list(info: *mut GstDiscovererInfo) -> *mut glib::GList; - pub fn gst_discoverer_info_get_streams(info: *mut GstDiscovererInfo, streamtype: GType) -> *mut glib::GList; - pub fn gst_discoverer_info_get_subtitle_streams(info: *mut GstDiscovererInfo) -> *mut glib::GList; + pub fn gst_discoverer_info_get_streams( + info: *mut GstDiscovererInfo, + streamtype: GType, + ) -> *mut glib::GList; + pub fn gst_discoverer_info_get_subtitle_streams( + info: *mut GstDiscovererInfo, + ) -> *mut glib::GList; pub fn gst_discoverer_info_get_tags(info: *const GstDiscovererInfo) -> *const gst::GstTagList; pub fn gst_discoverer_info_get_toc(info: *const GstDiscovererInfo) -> *const gst::GstToc; pub fn gst_discoverer_info_get_uri(info: *const GstDiscovererInfo) -> *const c_char; pub fn gst_discoverer_info_get_video_streams(info: *mut GstDiscovererInfo) -> *mut glib::GList; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_discoverer_info_to_variant(info: *mut GstDiscovererInfo, flags: GstDiscovererSerializeFlags) -> *mut glib::GVariant; + pub fn gst_discoverer_info_to_variant( + info: *mut GstDiscovererInfo, + flags: GstDiscovererSerializeFlags, + ) -> *mut glib::GVariant; //========================================================================= // GstDiscovererStreamInfo //========================================================================= pub fn gst_discoverer_stream_info_get_type() -> GType; pub fn gst_discoverer_stream_info_list_free(infos: *mut glib::GList); - pub fn gst_discoverer_stream_info_get_caps(info: *mut GstDiscovererStreamInfo) -> *mut gst::GstCaps; - pub fn gst_discoverer_stream_info_get_misc(info: *mut GstDiscovererStreamInfo) -> *const gst::GstStructure; - pub fn gst_discoverer_stream_info_get_next(info: *mut GstDiscovererStreamInfo) -> *mut GstDiscovererStreamInfo; - pub fn gst_discoverer_stream_info_get_previous(info: *mut GstDiscovererStreamInfo) -> *mut GstDiscovererStreamInfo; - pub fn gst_discoverer_stream_info_get_stream_id(info: *mut GstDiscovererStreamInfo) -> *const c_char; - pub fn gst_discoverer_stream_info_get_stream_type_nick(info: *mut GstDiscovererStreamInfo) -> *const c_char; - pub fn gst_discoverer_stream_info_get_tags(info: *mut GstDiscovererStreamInfo) -> *const gst::GstTagList; - pub fn gst_discoverer_stream_info_get_toc(info: *mut GstDiscovererStreamInfo) -> *const gst::GstToc; + pub fn gst_discoverer_stream_info_get_caps( + info: *mut GstDiscovererStreamInfo, + ) -> *mut gst::GstCaps; + pub fn gst_discoverer_stream_info_get_misc( + info: *mut GstDiscovererStreamInfo, + ) -> *const gst::GstStructure; + pub fn gst_discoverer_stream_info_get_next( + info: *mut GstDiscovererStreamInfo, + ) -> *mut GstDiscovererStreamInfo; + pub fn gst_discoverer_stream_info_get_previous( + info: *mut GstDiscovererStreamInfo, + ) -> *mut GstDiscovererStreamInfo; + pub fn gst_discoverer_stream_info_get_stream_id( + info: *mut GstDiscovererStreamInfo, + ) -> *const c_char; + pub fn gst_discoverer_stream_info_get_stream_type_nick( + info: *mut GstDiscovererStreamInfo, + ) -> *const c_char; + pub fn gst_discoverer_stream_info_get_tags( + info: *mut GstDiscovererStreamInfo, + ) -> *const gst::GstTagList; + pub fn gst_discoverer_stream_info_get_toc( + info: *mut GstDiscovererStreamInfo, + ) -> *const gst::GstToc; //========================================================================= // GstDiscovererSubtitleInfo //========================================================================= pub fn gst_discoverer_subtitle_info_get_type() -> GType; - pub fn gst_discoverer_subtitle_info_get_language(info: *const GstDiscovererSubtitleInfo) -> *const c_char; + pub fn gst_discoverer_subtitle_info_get_language( + info: *const GstDiscovererSubtitleInfo, + ) -> *const c_char; //========================================================================= // GstDiscovererVideoInfo @@ -440,93 +537,188 @@ extern "C" { pub fn gst_discoverer_video_info_get_type() -> GType; pub fn gst_discoverer_video_info_get_bitrate(info: *const GstDiscovererVideoInfo) -> c_uint; pub fn gst_discoverer_video_info_get_depth(info: *const GstDiscovererVideoInfo) -> c_uint; - pub fn gst_discoverer_video_info_get_framerate_denom(info: *const GstDiscovererVideoInfo) -> c_uint; - pub fn gst_discoverer_video_info_get_framerate_num(info: *const GstDiscovererVideoInfo) -> c_uint; + pub fn gst_discoverer_video_info_get_framerate_denom( + info: *const GstDiscovererVideoInfo, + ) -> c_uint; + pub fn gst_discoverer_video_info_get_framerate_num( + info: *const GstDiscovererVideoInfo, + ) -> c_uint; pub fn gst_discoverer_video_info_get_height(info: *const GstDiscovererVideoInfo) -> c_uint; - pub fn gst_discoverer_video_info_get_max_bitrate(info: *const GstDiscovererVideoInfo) -> c_uint; + pub fn gst_discoverer_video_info_get_max_bitrate(info: *const GstDiscovererVideoInfo) + -> c_uint; pub fn gst_discoverer_video_info_get_par_denom(info: *const GstDiscovererVideoInfo) -> c_uint; pub fn gst_discoverer_video_info_get_par_num(info: *const GstDiscovererVideoInfo) -> c_uint; pub fn gst_discoverer_video_info_get_width(info: *const GstDiscovererVideoInfo) -> c_uint; pub fn gst_discoverer_video_info_is_image(info: *const GstDiscovererVideoInfo) -> gboolean; - pub fn gst_discoverer_video_info_is_interlaced(info: *const GstDiscovererVideoInfo) -> gboolean; + pub fn gst_discoverer_video_info_is_interlaced(info: *const GstDiscovererVideoInfo) + -> gboolean; //========================================================================= // GstEncodingAudioProfile //========================================================================= pub fn gst_encoding_audio_profile_get_type() -> GType; - pub fn gst_encoding_audio_profile_new(format: *mut gst::GstCaps, preset: *const c_char, restriction: *mut gst::GstCaps, presence: c_uint) -> *mut GstEncodingAudioProfile; + pub fn gst_encoding_audio_profile_new( + format: *mut gst::GstCaps, + preset: *const c_char, + restriction: *mut gst::GstCaps, + presence: c_uint, + ) -> *mut GstEncodingAudioProfile; //========================================================================= // GstEncodingContainerProfile //========================================================================= pub fn gst_encoding_container_profile_get_type() -> GType; - pub fn gst_encoding_container_profile_new(name: *const c_char, description: *const c_char, format: *mut gst::GstCaps, preset: *const c_char) -> *mut GstEncodingContainerProfile; - pub fn gst_encoding_container_profile_add_profile(container: *mut GstEncodingContainerProfile, profile: *mut GstEncodingProfile) -> gboolean; - pub fn gst_encoding_container_profile_contains_profile(container: *mut GstEncodingContainerProfile, profile: *mut GstEncodingProfile) -> gboolean; - pub fn gst_encoding_container_profile_get_profiles(profile: *mut GstEncodingContainerProfile) -> *const glib::GList; + pub fn gst_encoding_container_profile_new( + name: *const c_char, + description: *const c_char, + format: *mut gst::GstCaps, + preset: *const c_char, + ) -> *mut GstEncodingContainerProfile; + pub fn gst_encoding_container_profile_add_profile( + container: *mut GstEncodingContainerProfile, + profile: *mut GstEncodingProfile, + ) -> gboolean; + pub fn gst_encoding_container_profile_contains_profile( + container: *mut GstEncodingContainerProfile, + profile: *mut GstEncodingProfile, + ) -> gboolean; + pub fn gst_encoding_container_profile_get_profiles( + profile: *mut GstEncodingContainerProfile, + ) -> *const glib::GList; //========================================================================= // GstEncodingProfile //========================================================================= pub fn gst_encoding_profile_get_type() -> GType; - pub fn gst_encoding_profile_find(targetname: *const c_char, profilename: *const c_char, category: *const c_char) -> *mut GstEncodingProfile; - pub fn gst_encoding_profile_from_discoverer(info: *mut GstDiscovererInfo) -> *mut GstEncodingProfile; + pub fn gst_encoding_profile_find( + targetname: *const c_char, + profilename: *const c_char, + category: *const c_char, + ) -> *mut GstEncodingProfile; + pub fn gst_encoding_profile_from_discoverer( + info: *mut GstDiscovererInfo, + ) -> *mut GstEncodingProfile; #[cfg(any(feature = "v1_12", feature = "dox"))] pub fn gst_encoding_profile_copy(self_: *mut GstEncodingProfile) -> *mut GstEncodingProfile; - pub fn gst_encoding_profile_get_allow_dynamic_output(profile: *mut GstEncodingProfile) -> gboolean; + pub fn gst_encoding_profile_get_allow_dynamic_output( + profile: *mut GstEncodingProfile, + ) -> gboolean; pub fn gst_encoding_profile_get_description(profile: *mut GstEncodingProfile) -> *const c_char; - pub fn gst_encoding_profile_get_file_extension(profile: *mut GstEncodingProfile) -> *const c_char; + pub fn gst_encoding_profile_get_file_extension( + profile: *mut GstEncodingProfile, + ) -> *const c_char; pub fn gst_encoding_profile_get_format(profile: *mut GstEncodingProfile) -> *mut gst::GstCaps; - pub fn gst_encoding_profile_get_input_caps(profile: *mut GstEncodingProfile) -> *mut gst::GstCaps; + pub fn gst_encoding_profile_get_input_caps( + profile: *mut GstEncodingProfile, + ) -> *mut gst::GstCaps; pub fn gst_encoding_profile_get_name(profile: *mut GstEncodingProfile) -> *const c_char; pub fn gst_encoding_profile_get_presence(profile: *mut GstEncodingProfile) -> c_uint; pub fn gst_encoding_profile_get_preset(profile: *mut GstEncodingProfile) -> *const c_char; pub fn gst_encoding_profile_get_preset_name(profile: *mut GstEncodingProfile) -> *const c_char; - pub fn gst_encoding_profile_get_restriction(profile: *mut GstEncodingProfile) -> *mut gst::GstCaps; + pub fn gst_encoding_profile_get_restriction( + profile: *mut GstEncodingProfile, + ) -> *mut gst::GstCaps; pub fn gst_encoding_profile_get_type_nick(profile: *mut GstEncodingProfile) -> *const c_char; pub fn gst_encoding_profile_is_enabled(profile: *mut GstEncodingProfile) -> gboolean; - pub fn gst_encoding_profile_is_equal(a: *mut GstEncodingProfile, b: *mut GstEncodingProfile) -> gboolean; - pub fn gst_encoding_profile_set_allow_dynamic_output(profile: *mut GstEncodingProfile, allow_dynamic_output: gboolean); - pub fn gst_encoding_profile_set_description(profile: *mut GstEncodingProfile, description: *const c_char); + pub fn gst_encoding_profile_is_equal( + a: *mut GstEncodingProfile, + b: *mut GstEncodingProfile, + ) -> gboolean; + pub fn gst_encoding_profile_set_allow_dynamic_output( + profile: *mut GstEncodingProfile, + allow_dynamic_output: gboolean, + ); + pub fn gst_encoding_profile_set_description( + profile: *mut GstEncodingProfile, + description: *const c_char, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_encoding_profile_set_enabled(profile: *mut GstEncodingProfile, enabled: gboolean); - pub fn gst_encoding_profile_set_format(profile: *mut GstEncodingProfile, format: *mut gst::GstCaps); + pub fn gst_encoding_profile_set_format( + profile: *mut GstEncodingProfile, + format: *mut gst::GstCaps, + ); pub fn gst_encoding_profile_set_name(profile: *mut GstEncodingProfile, name: *const c_char); pub fn gst_encoding_profile_set_presence(profile: *mut GstEncodingProfile, presence: c_uint); pub fn gst_encoding_profile_set_preset(profile: *mut GstEncodingProfile, preset: *const c_char); - pub fn gst_encoding_profile_set_preset_name(profile: *mut GstEncodingProfile, preset_name: *const c_char); - pub fn gst_encoding_profile_set_restriction(profile: *mut GstEncodingProfile, restriction: *mut gst::GstCaps); + pub fn gst_encoding_profile_set_preset_name( + profile: *mut GstEncodingProfile, + preset_name: *const c_char, + ); + pub fn gst_encoding_profile_set_restriction( + profile: *mut GstEncodingProfile, + restriction: *mut gst::GstCaps, + ); //========================================================================= // GstEncodingTarget //========================================================================= pub fn gst_encoding_target_get_type() -> GType; - pub fn gst_encoding_target_new(name: *const c_char, category: *const c_char, description: *const c_char, profiles: *const glib::GList) -> *mut GstEncodingTarget; - pub fn gst_encoding_target_load(name: *const c_char, category: *const c_char, error: *mut *mut glib::GError) -> *mut GstEncodingTarget; - pub fn gst_encoding_target_load_from_file(filepath: *const c_char, error: *mut *mut glib::GError) -> *mut GstEncodingTarget; - pub fn gst_encoding_target_add_profile(target: *mut GstEncodingTarget, profile: *mut GstEncodingProfile) -> gboolean; + pub fn gst_encoding_target_new( + name: *const c_char, + category: *const c_char, + description: *const c_char, + profiles: *const glib::GList, + ) -> *mut GstEncodingTarget; + pub fn gst_encoding_target_load( + name: *const c_char, + category: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GstEncodingTarget; + pub fn gst_encoding_target_load_from_file( + filepath: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GstEncodingTarget; + pub fn gst_encoding_target_add_profile( + target: *mut GstEncodingTarget, + profile: *mut GstEncodingProfile, + ) -> gboolean; pub fn gst_encoding_target_get_category(target: *mut GstEncodingTarget) -> *const c_char; pub fn gst_encoding_target_get_description(target: *mut GstEncodingTarget) -> *const c_char; pub fn gst_encoding_target_get_name(target: *mut GstEncodingTarget) -> *const c_char; - pub fn gst_encoding_target_get_profile(target: *mut GstEncodingTarget, name: *const c_char) -> *mut GstEncodingProfile; + pub fn gst_encoding_target_get_profile( + target: *mut GstEncodingTarget, + name: *const c_char, + ) -> *mut GstEncodingProfile; pub fn gst_encoding_target_get_profiles(target: *mut GstEncodingTarget) -> *const glib::GList; - pub fn gst_encoding_target_save(target: *mut GstEncodingTarget, error: *mut *mut glib::GError) -> gboolean; - pub fn gst_encoding_target_save_to_file(target: *mut GstEncodingTarget, filepath: *const c_char, error: *mut *mut glib::GError) -> gboolean; + pub fn gst_encoding_target_save( + target: *mut GstEncodingTarget, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn gst_encoding_target_save_to_file( + target: *mut GstEncodingTarget, + filepath: *const c_char, + error: *mut *mut glib::GError, + ) -> gboolean; //========================================================================= // GstEncodingVideoProfile //========================================================================= pub fn gst_encoding_video_profile_get_type() -> GType; - pub fn gst_encoding_video_profile_new(format: *mut gst::GstCaps, preset: *const c_char, restriction: *mut gst::GstCaps, presence: c_uint) -> *mut GstEncodingVideoProfile; + pub fn gst_encoding_video_profile_new( + format: *mut gst::GstCaps, + preset: *const c_char, + restriction: *mut gst::GstCaps, + presence: c_uint, + ) -> *mut GstEncodingVideoProfile; pub fn gst_encoding_video_profile_get_pass(prof: *mut GstEncodingVideoProfile) -> c_uint; - pub fn gst_encoding_video_profile_get_variableframerate(prof: *mut GstEncodingVideoProfile) -> gboolean; + pub fn gst_encoding_video_profile_get_variableframerate( + prof: *mut GstEncodingVideoProfile, + ) -> gboolean; pub fn gst_encoding_video_profile_set_pass(prof: *mut GstEncodingVideoProfile, pass: c_uint); - pub fn gst_encoding_video_profile_set_variableframerate(prof: *mut GstEncodingVideoProfile, variableframerate: gboolean); + pub fn gst_encoding_video_profile_set_variableframerate( + prof: *mut GstEncodingVideoProfile, + variableframerate: gboolean, + ); //========================================================================= // Other functions //========================================================================= - pub fn gst_codec_utils_aac_caps_set_level_and_profile(caps: *mut gst::GstCaps, audio_config: *const u8, len: c_uint) -> gboolean; + pub fn gst_codec_utils_aac_caps_set_level_and_profile( + caps: *mut gst::GstCaps, + audio_config: *const u8, + len: c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_codec_utils_aac_get_channels(audio_config: *const u8, len: c_uint) -> c_uint; pub fn gst_codec_utils_aac_get_index_from_sample_rate(rate: c_uint) -> c_int; @@ -535,53 +727,150 @@ extern "C" { #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_codec_utils_aac_get_sample_rate(audio_config: *const u8, len: c_uint) -> c_uint; pub fn gst_codec_utils_aac_get_sample_rate_from_index(sr_idx: c_uint) -> c_uint; - pub fn gst_codec_utils_h264_caps_set_level_and_profile(caps: *mut gst::GstCaps, sps: *const u8, len: c_uint) -> gboolean; + pub fn gst_codec_utils_h264_caps_set_level_and_profile( + caps: *mut gst::GstCaps, + sps: *const u8, + len: c_uint, + ) -> gboolean; pub fn gst_codec_utils_h264_get_level(sps: *const u8, len: c_uint) -> *const c_char; pub fn gst_codec_utils_h264_get_level_idc(level: *const c_char) -> u8; pub fn gst_codec_utils_h264_get_profile(sps: *const u8, len: c_uint) -> *const c_char; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_codec_utils_h265_caps_set_level_tier_and_profile(caps: *mut gst::GstCaps, profile_tier_level: *const u8, len: c_uint) -> gboolean; + pub fn gst_codec_utils_h265_caps_set_level_tier_and_profile( + caps: *mut gst::GstCaps, + profile_tier_level: *const u8, + len: c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_codec_utils_h265_get_level(profile_tier_level: *const u8, len: c_uint) -> *const c_char; + pub fn gst_codec_utils_h265_get_level( + profile_tier_level: *const u8, + len: c_uint, + ) -> *const c_char; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_codec_utils_h265_get_level_idc(level: *const c_char) -> u8; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_codec_utils_h265_get_profile(profile_tier_level: *const u8, len: c_uint) -> *const c_char; + pub fn gst_codec_utils_h265_get_profile( + profile_tier_level: *const u8, + len: c_uint, + ) -> *const c_char; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_codec_utils_h265_get_tier(profile_tier_level: *const u8, len: c_uint) -> *const c_char; - pub fn gst_codec_utils_mpeg4video_caps_set_level_and_profile(caps: *mut gst::GstCaps, vis_obj_seq: *const u8, len: c_uint) -> gboolean; - pub fn gst_codec_utils_mpeg4video_get_level(vis_obj_seq: *const u8, len: c_uint) -> *const c_char; - pub fn gst_codec_utils_mpeg4video_get_profile(vis_obj_seq: *const u8, len: c_uint) -> *const c_char; + pub fn gst_codec_utils_h265_get_tier( + profile_tier_level: *const u8, + len: c_uint, + ) -> *const c_char; + pub fn gst_codec_utils_mpeg4video_caps_set_level_and_profile( + caps: *mut gst::GstCaps, + vis_obj_seq: *const u8, + len: c_uint, + ) -> gboolean; + pub fn gst_codec_utils_mpeg4video_get_level( + vis_obj_seq: *const u8, + len: c_uint, + ) -> *const c_char; + pub fn gst_codec_utils_mpeg4video_get_profile( + vis_obj_seq: *const u8, + len: c_uint, + ) -> *const c_char; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_codec_utils_opus_create_caps(rate: u32, channels: u8, channel_mapping_family: u8, stream_count: u8, coupled_count: u8, channel_mapping: *const u8) -> *mut gst::GstCaps; + pub fn gst_codec_utils_opus_create_caps( + rate: u32, + channels: u8, + channel_mapping_family: u8, + stream_count: u8, + coupled_count: u8, + channel_mapping: *const u8, + ) -> *mut gst::GstCaps; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_codec_utils_opus_create_caps_from_header(header: *mut gst::GstBuffer, comments: *mut gst::GstBuffer) -> *mut gst::GstCaps; + pub fn gst_codec_utils_opus_create_caps_from_header( + header: *mut gst::GstBuffer, + comments: *mut gst::GstBuffer, + ) -> *mut gst::GstCaps; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_codec_utils_opus_create_header(rate: u32, channels: u8, channel_mapping_family: u8, stream_count: u8, coupled_count: u8, channel_mapping: *const u8, pre_skip: u16, output_gain: i16) -> *mut gst::GstBuffer; + pub fn gst_codec_utils_opus_create_header( + rate: u32, + channels: u8, + channel_mapping_family: u8, + stream_count: u8, + coupled_count: u8, + channel_mapping: *const u8, + pre_skip: u16, + output_gain: i16, + ) -> *mut gst::GstBuffer; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_codec_utils_opus_parse_caps(caps: *mut gst::GstCaps, rate: *mut u32, channels: *mut u8, channel_mapping_family: *mut u8, stream_count: *mut u8, coupled_count: *mut u8, channel_mapping: *mut [u8; 256]) -> gboolean; + pub fn gst_codec_utils_opus_parse_caps( + caps: *mut gst::GstCaps, + rate: *mut u32, + channels: *mut u8, + channel_mapping_family: *mut u8, + stream_count: *mut u8, + coupled_count: *mut u8, + channel_mapping: *mut [u8; 256], + ) -> gboolean; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_codec_utils_opus_parse_header(header: *mut gst::GstBuffer, rate: *mut u32, channels: *mut u8, channel_mapping_family: *mut u8, stream_count: *mut u8, coupled_count: *mut u8, channel_mapping: *mut [u8; 256], pre_skip: *mut u16, output_gain: *mut i16) -> gboolean; + pub fn gst_codec_utils_opus_parse_header( + header: *mut gst::GstBuffer, + rate: *mut u32, + channels: *mut u8, + channel_mapping_family: *mut u8, + stream_count: *mut u8, + coupled_count: *mut u8, + channel_mapping: *mut [u8; 256], + pre_skip: *mut u16, + output_gain: *mut i16, + ) -> gboolean; pub fn gst_encoding_list_all_targets(categoryname: *const c_char) -> *mut glib::GList; pub fn gst_encoding_list_available_categories() -> *mut glib::GList; - pub fn gst_install_plugins_async(details: *const *const c_char, ctx: *mut GstInstallPluginsContext, func: GstInstallPluginsResultFunc, user_data: gpointer) -> GstInstallPluginsReturn; + pub fn gst_install_plugins_async( + details: *const *const c_char, + ctx: *mut GstInstallPluginsContext, + func: GstInstallPluginsResultFunc, + user_data: gpointer, + ) -> GstInstallPluginsReturn; pub fn gst_install_plugins_installation_in_progress() -> gboolean; pub fn gst_install_plugins_supported() -> gboolean; - pub fn gst_install_plugins_sync(details: *const *const c_char, ctx: *mut GstInstallPluginsContext) -> GstInstallPluginsReturn; + pub fn gst_install_plugins_sync( + details: *const *const c_char, + ctx: *mut GstInstallPluginsContext, + ) -> GstInstallPluginsReturn; pub fn gst_is_missing_plugin_message(msg: *mut gst::GstMessage) -> gboolean; - pub fn gst_missing_decoder_installer_detail_new(decode_caps: *const gst::GstCaps) -> *mut c_char; - pub fn gst_missing_decoder_message_new(element: *mut gst::GstElement, decode_caps: *const gst::GstCaps) -> *mut gst::GstMessage; + pub fn gst_missing_decoder_installer_detail_new( + decode_caps: *const gst::GstCaps, + ) -> *mut c_char; + pub fn gst_missing_decoder_message_new( + element: *mut gst::GstElement, + decode_caps: *const gst::GstCaps, + ) -> *mut gst::GstMessage; pub fn gst_missing_element_installer_detail_new(factory_name: *const c_char) -> *mut c_char; - pub fn gst_missing_element_message_new(element: *mut gst::GstElement, factory_name: *const c_char) -> *mut gst::GstMessage; - pub fn gst_missing_encoder_installer_detail_new(encode_caps: *const gst::GstCaps) -> *mut c_char; - pub fn gst_missing_encoder_message_new(element: *mut gst::GstElement, encode_caps: *const gst::GstCaps) -> *mut gst::GstMessage; + pub fn gst_missing_element_message_new( + element: *mut gst::GstElement, + factory_name: *const c_char, + ) -> *mut gst::GstMessage; + pub fn gst_missing_encoder_installer_detail_new( + encode_caps: *const gst::GstCaps, + ) -> *mut c_char; + pub fn gst_missing_encoder_message_new( + element: *mut gst::GstElement, + encode_caps: *const gst::GstCaps, + ) -> *mut gst::GstMessage; pub fn gst_missing_plugin_message_get_description(msg: *mut gst::GstMessage) -> *mut c_char; - pub fn gst_missing_plugin_message_get_installer_detail(msg: *mut gst::GstMessage) -> *mut c_char; + pub fn gst_missing_plugin_message_get_installer_detail( + msg: *mut gst::GstMessage, + ) -> *mut c_char; pub fn gst_missing_uri_sink_installer_detail_new(protocol: *const c_char) -> *mut c_char; - pub fn gst_missing_uri_sink_message_new(element: *mut gst::GstElement, protocol: *const c_char) -> *mut gst::GstMessage; + pub fn gst_missing_uri_sink_message_new( + element: *mut gst::GstElement, + protocol: *const c_char, + ) -> *mut gst::GstMessage; pub fn gst_missing_uri_source_installer_detail_new(protocol: *const c_char) -> *mut c_char; - pub fn gst_missing_uri_source_message_new(element: *mut gst::GstElement, protocol: *const c_char) -> *mut gst::GstMessage; - pub fn gst_pb_utils_add_codec_description_to_tag_list(taglist: *mut gst::GstTagList, codec_tag: *const c_char, caps: *const gst::GstCaps) -> gboolean; + pub fn gst_missing_uri_source_message_new( + element: *mut gst::GstElement, + protocol: *const c_char, + ) -> *mut gst::GstMessage; + pub fn gst_pb_utils_add_codec_description_to_tag_list( + taglist: *mut gst::GstTagList, + codec_tag: *const c_char, + caps: *const gst::GstCaps, + ) -> gboolean; pub fn gst_pb_utils_get_codec_description(caps: *const gst::GstCaps) -> *mut c_char; pub fn gst_pb_utils_get_decoder_description(caps: *const gst::GstCaps) -> *mut c_char; pub fn gst_pb_utils_get_element_description(factory_name: *const c_char) -> *mut c_char; @@ -589,7 +878,12 @@ extern "C" { pub fn gst_pb_utils_get_sink_description(protocol: *const c_char) -> *mut c_char; pub fn gst_pb_utils_get_source_description(protocol: *const c_char) -> *mut c_char; pub fn gst_pb_utils_init(); - pub fn gst_plugins_base_version(major: *mut c_uint, minor: *mut c_uint, micro: *mut c_uint, nano: *mut c_uint); + pub fn gst_plugins_base_version( + major: *mut c_uint, + minor: *mut c_uint, + micro: *mut c_uint, + nano: *mut c_uint, + ); pub fn gst_plugins_base_version_string() -> *mut c_char; } diff --git a/gstreamer-pbutils-sys/tests/abi.rs b/gstreamer-pbutils-sys/tests/abi.rs index 26b1ba6f8..6521850e7 100644 --- a/gstreamer-pbutils-sys/tests/abi.rs +++ b/gstreamer-pbutils-sys/tests/abi.rs @@ -5,13 +5,13 @@ extern crate gstreamer_pbutils_sys; extern crate shell_words; extern crate tempdir; +use gstreamer_pbutils_sys::*; use std::env; use std::error::Error; -use std::path::Path; use std::mem::{align_of, size_of}; +use std::path::Path; use std::process::Command; use std::str; -use gstreamer_pbutils_sys::*; static PACKAGES: &[&str] = &["gstreamer-pbutils-1.0"]; @@ -47,8 +47,7 @@ impl Compiler { cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { - return Err(format!("compilation command {:?} failed, {}", - &cmd, status).into()); + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } @@ -77,14 +76,12 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { cmd.args(packages); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {:?} returned {}", - &cmd, out.status).into()); + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } - #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, @@ -115,9 +112,8 @@ impl Results { fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", - self.passed, - self.failed, - self.failed_to_compile) + self.passed, self.failed, self.failed_to_compile + ) } fn expect_total_success(&self) { if self.failed == 0 { @@ -133,24 +129,28 @@ fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!("1", - get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), - "failed to obtain correct constant value for 1"); + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); - eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_value, c_value); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); } } }; @@ -166,24 +166,31 @@ fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!(Layout {size: 1, alignment: 1}, - get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), - "failed to obtain correct layout for char type"); + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); - eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_layout, &c_layout); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); } } }; @@ -203,15 +210,14 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result Result> { @@ -223,48 +229,154 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result(), alignment: align_of::()}), - ("GstAudioVisualizerClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAudioVisualizerShader", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDiscoverer", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDiscovererAudioInfoClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDiscovererClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDiscovererContainerInfoClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDiscovererInfoClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDiscovererResult", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDiscovererSerializeFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDiscovererStreamInfoClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDiscovererSubtitleInfoClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDiscovererVideoInfoClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstEncodingTargetClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstInstallPluginsReturn", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstAudioVisualizer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioVisualizerClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioVisualizerShader", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscoverer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererAudioInfoClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererContainerInfoClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererInfoClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererSerializeFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererStreamInfoClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererSubtitleInfoClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererVideoInfoClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstEncodingTargetClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstInstallPluginsReturn", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_AUDIO_VISUALIZER_SHADER_FADE", "1"), ("(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN", "3"), - ("(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN", "7"), - ("(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT", "6"), + ( + "(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN", + "7", + ), + ( + "(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT", + "6", + ), ("(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT", "4"), - ("(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT", "5"), + ( + "(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT", + "5", + ), ("(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP", "2"), - ("(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN", "9"), - ("(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT", "8"), + ( + "(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN", + "9", + ), + ( + "(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT", + "8", + ), ("(gint) GST_AUDIO_VISUALIZER_SHADER_NONE", "0"), ("(gint) GST_DISCOVERER_BUSY", "4"), ("(gint) GST_DISCOVERER_ERROR", "2"), @@ -294,5 +406,3 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_INSTALL_PLUGINS_SUCCESS", "0"), ("(gint) GST_INSTALL_PLUGINS_USER_ABORT", "4"), ]; - - diff --git a/gstreamer-player-sys/build.rs b/gstreamer-player-sys/build.rs index cdff50c82..eea7e1b4c 100644 --- a/gstreamer-player-sys/build.rs +++ b/gstreamer-player-sys/build.rs @@ -6,8 +6,8 @@ extern crate pkg_config; use pkg_config::{Config, Error}; use std::env; -use std::io::prelude::*; use std::io; +use std::io::prelude::*; use std::process; fn main() { @@ -36,7 +36,7 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()) + return Ok(()); } let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); @@ -58,8 +58,10 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } for path in library.link_paths.iter() { - println!("cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist")); + println!( + "cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist") + ); } } Ok(()) @@ -73,4 +75,3 @@ fn find() -> Result<(), Error> { Err(err) => Err(err), } } - diff --git a/gstreamer-player-sys/src/lib.rs b/gstreamer-player-sys/src/lib.rs index afe04cb18..0e903bf68 100644 --- a/gstreamer-player-sys/src/lib.rs +++ b/gstreamer-player-sys/src/lib.rs @@ -3,18 +3,23 @@ // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] -extern crate libc; extern crate glib_sys as glib; extern crate gobject_sys as gobject; extern crate gstreamer_sys as gst; extern crate gstreamer_video_sys as gst_video; +extern crate libc; #[allow(unused_imports)] -use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, - c_short, c_ushort, c_long, c_ulong, - c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; +use libc::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, + intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -59,7 +64,8 @@ pub type GstPlayerClass = *mut _GstPlayerClass; #[repr(C)] pub struct _GstPlayerGMainContextSignalDispatcherClass(c_void); -pub type GstPlayerGMainContextSignalDispatcherClass = *mut _GstPlayerGMainContextSignalDispatcherClass; +pub type GstPlayerGMainContextSignalDispatcherClass = + *mut _GstPlayerGMainContextSignalDispatcherClass; #[repr(C)] pub struct _GstPlayerMediaInfoClass(c_void); @@ -70,15 +76,26 @@ pub type GstPlayerMediaInfoClass = *mut _GstPlayerMediaInfoClass; #[derive(Copy, Clone)] pub struct GstPlayerSignalDispatcherInterface { pub parent_iface: gobject::GTypeInterface, - pub dispatch: Option, + pub dispatch: Option< + unsafe extern "C" fn( + *mut GstPlayerSignalDispatcher, + *mut GstPlayer, + GstPlayerSignalDispatcherFunc, + gpointer, + glib::GDestroyNotify, + ), + >, } impl ::std::fmt::Debug for GstPlayerSignalDispatcherInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstPlayerSignalDispatcherInterface @ {:?}", self as *const _)) - .field("parent_iface", &self.parent_iface) - .field("dispatch", &self.dispatch) - .finish() + f.debug_struct(&format!( + "GstPlayerSignalDispatcherInterface @ {:?}", + self as *const _ + )) + .field("parent_iface", &self.parent_iface) + .field("dispatch", &self.dispatch) + .finish() } } @@ -106,15 +123,20 @@ pub type GstPlayerVideoOverlayVideoRendererClass = *mut _GstPlayerVideoOverlayVi #[derive(Copy, Clone)] pub struct GstPlayerVideoRendererInterface { pub parent_iface: gobject::GTypeInterface, - pub create_video_sink: Option *mut gst::GstElement>, + pub create_video_sink: Option< + unsafe extern "C" fn(*mut GstPlayerVideoRenderer, *mut GstPlayer) -> *mut gst::GstElement, + >, } impl ::std::fmt::Debug for GstPlayerVideoRendererInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstPlayerVideoRendererInterface @ {:?}", self as *const _)) - .field("parent_iface", &self.parent_iface) - .field("create_video_sink", &self.create_video_sink) - .finish() + f.debug_struct(&format!( + "GstPlayerVideoRendererInterface @ {:?}", + self as *const _ + )) + .field("parent_iface", &self.parent_iface) + .field("create_video_sink", &self.create_video_sink) + .finish() } } @@ -128,9 +150,9 @@ pub struct GstPlayerVisualization { impl ::std::fmt::Debug for GstPlayerVisualization { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPlayerVisualization @ {:?}", self as *const _)) - .field("name", &self.name) - .field("description", &self.description) - .finish() + .field("name", &self.name) + .field("description", &self.description) + .finish() } } @@ -141,7 +163,7 @@ pub struct GstPlayer(c_void); impl ::std::fmt::Debug for GstPlayer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPlayer @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -151,7 +173,7 @@ pub struct GstPlayerAudioInfo(c_void); impl ::std::fmt::Debug for GstPlayerAudioInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPlayerAudioInfo @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -160,8 +182,11 @@ pub struct GstPlayerGMainContextSignalDispatcher(c_void); impl ::std::fmt::Debug for GstPlayerGMainContextSignalDispatcher { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstPlayerGMainContextSignalDispatcher @ {:?}", self as *const _)) - .finish() + f.debug_struct(&format!( + "GstPlayerGMainContextSignalDispatcher @ {:?}", + self as *const _ + )) + .finish() } } @@ -171,7 +196,7 @@ pub struct GstPlayerMediaInfo(c_void); impl ::std::fmt::Debug for GstPlayerMediaInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPlayerMediaInfo @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -181,7 +206,7 @@ pub struct GstPlayerStreamInfo(c_void); impl ::std::fmt::Debug for GstPlayerStreamInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPlayerStreamInfo @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -191,7 +216,7 @@ pub struct GstPlayerSubtitleInfo(c_void); impl ::std::fmt::Debug for GstPlayerSubtitleInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPlayerSubtitleInfo @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -201,7 +226,7 @@ pub struct GstPlayerVideoInfo(c_void); impl ::std::fmt::Debug for GstPlayerVideoInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPlayerVideoInfo @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -210,8 +235,11 @@ pub struct GstPlayerVideoOverlayVideoRenderer(c_void); impl ::std::fmt::Debug for GstPlayerVideoOverlayVideoRenderer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstPlayerVideoOverlayVideoRenderer @ {:?}", self as *const _)) - .finish() + f.debug_struct(&format!( + "GstPlayerVideoOverlayVideoRenderer @ {:?}", + self as *const _ + )) + .finish() } } @@ -234,14 +262,15 @@ impl ::std::fmt::Debug for GstPlayerVideoRenderer { } } - extern "C" { //========================================================================= // GstPlayerColorBalanceType //========================================================================= pub fn gst_player_color_balance_type_get_type() -> GType; - pub fn gst_player_color_balance_type_get_name(type_: GstPlayerColorBalanceType) -> *const c_char; + pub fn gst_player_color_balance_type_get_name( + type_: GstPlayerColorBalanceType, + ) -> *const c_char; //========================================================================= // GstPlayerError @@ -260,18 +289,28 @@ extern "C" { // GstPlayerVisualization //========================================================================= pub fn gst_player_visualization_get_type() -> GType; - pub fn gst_player_visualization_copy(vis: *const GstPlayerVisualization) -> *mut GstPlayerVisualization; + pub fn gst_player_visualization_copy( + vis: *const GstPlayerVisualization, + ) -> *mut GstPlayerVisualization; pub fn gst_player_visualization_free(vis: *mut GstPlayerVisualization); //========================================================================= // GstPlayer //========================================================================= pub fn gst_player_get_type() -> GType; - pub fn gst_player_new(video_renderer: *mut GstPlayerVideoRenderer, signal_dispatcher: *mut GstPlayerSignalDispatcher) -> *mut GstPlayer; - pub fn gst_player_config_get_position_update_interval(config: *const gst::GstStructure) -> c_uint; + pub fn gst_player_new( + video_renderer: *mut GstPlayerVideoRenderer, + signal_dispatcher: *mut GstPlayerSignalDispatcher, + ) -> *mut GstPlayer; + pub fn gst_player_config_get_position_update_interval( + config: *const gst::GstStructure, + ) -> c_uint; pub fn gst_player_config_get_seek_accurate(config: *const gst::GstStructure) -> gboolean; pub fn gst_player_config_get_user_agent(config: *const gst::GstStructure) -> *mut c_char; - pub fn gst_player_config_set_position_update_interval(config: *mut gst::GstStructure, interval: c_uint); + pub fn gst_player_config_set_position_update_interval( + config: *mut gst::GstStructure, + interval: c_uint, + ); pub fn gst_player_config_set_seek_accurate(config: *mut gst::GstStructure, accurate: gboolean); pub fn gst_player_config_set_user_agent(config: *mut gst::GstStructure, agent: *const c_char); pub fn gst_player_get_audio_streams(info: *const GstPlayerMediaInfo) -> *mut glib::GList; @@ -280,16 +319,25 @@ extern "C" { pub fn gst_player_visualizations_free(viss: *mut *mut GstPlayerVisualization); pub fn gst_player_visualizations_get() -> *mut *mut GstPlayerVisualization; pub fn gst_player_get_audio_video_offset(player: *mut GstPlayer) -> i64; - pub fn gst_player_get_color_balance(player: *mut GstPlayer, type_: GstPlayerColorBalanceType) -> c_double; + pub fn gst_player_get_color_balance( + player: *mut GstPlayer, + type_: GstPlayerColorBalanceType, + ) -> c_double; pub fn gst_player_get_config(player: *mut GstPlayer) -> *mut gst::GstStructure; pub fn gst_player_get_current_audio_track(player: *mut GstPlayer) -> *mut GstPlayerAudioInfo; - pub fn gst_player_get_current_subtitle_track(player: *mut GstPlayer) -> *mut GstPlayerSubtitleInfo; + pub fn gst_player_get_current_subtitle_track( + player: *mut GstPlayer, + ) -> *mut GstPlayerSubtitleInfo; pub fn gst_player_get_current_video_track(player: *mut GstPlayer) -> *mut GstPlayerVideoInfo; pub fn gst_player_get_current_visualization(player: *mut GstPlayer) -> *mut c_char; pub fn gst_player_get_duration(player: *mut GstPlayer) -> gst::GstClockTime; pub fn gst_player_get_media_info(player: *mut GstPlayer) -> *mut GstPlayerMediaInfo; - pub fn gst_player_get_multiview_flags(player: *mut GstPlayer) -> gst_video::GstVideoMultiviewFlags; - pub fn gst_player_get_multiview_mode(player: *mut GstPlayer) -> gst_video::GstVideoMultiviewFramePacking; + pub fn gst_player_get_multiview_flags( + player: *mut GstPlayer, + ) -> gst_video::GstVideoMultiviewFlags; + pub fn gst_player_get_multiview_mode( + player: *mut GstPlayer, + ) -> gst_video::GstVideoMultiviewFramePacking; pub fn gst_player_get_mute(player: *mut GstPlayer) -> gboolean; pub fn gst_player_get_pipeline(player: *mut GstPlayer) -> *mut gst::GstElement; pub fn gst_player_get_position(player: *mut GstPlayer) -> gst::GstClockTime; @@ -298,7 +346,11 @@ extern "C" { #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_player_get_subtitle_video_offset(player: *mut GstPlayer) -> i64; pub fn gst_player_get_uri(player: *mut GstPlayer) -> *mut c_char; - pub fn gst_player_get_video_snapshot(player: *mut GstPlayer, format: GstPlayerSnapshotFormat, config: *const gst::GstStructure) -> *mut gst::GstSample; + pub fn gst_player_get_video_snapshot( + player: *mut GstPlayer, + format: GstPlayerSnapshotFormat, + config: *const gst::GstStructure, + ) -> *mut gst::GstSample; pub fn gst_player_get_volume(player: *mut GstPlayer) -> c_double; pub fn gst_player_has_color_balance(player: *mut GstPlayer) -> gboolean; pub fn gst_player_pause(player: *mut GstPlayer); @@ -307,10 +359,23 @@ extern "C" { pub fn gst_player_set_audio_track(player: *mut GstPlayer, stream_index: c_int) -> gboolean; pub fn gst_player_set_audio_track_enabled(player: *mut GstPlayer, enabled: gboolean); pub fn gst_player_set_audio_video_offset(player: *mut GstPlayer, offset: i64); - pub fn gst_player_set_color_balance(player: *mut GstPlayer, type_: GstPlayerColorBalanceType, value: c_double); - pub fn gst_player_set_config(player: *mut GstPlayer, config: *mut gst::GstStructure) -> gboolean; - pub fn gst_player_set_multiview_flags(player: *mut GstPlayer, flags: gst_video::GstVideoMultiviewFlags); - pub fn gst_player_set_multiview_mode(player: *mut GstPlayer, mode: gst_video::GstVideoMultiviewFramePacking); + pub fn gst_player_set_color_balance( + player: *mut GstPlayer, + type_: GstPlayerColorBalanceType, + value: c_double, + ); + pub fn gst_player_set_config( + player: *mut GstPlayer, + config: *mut gst::GstStructure, + ) -> gboolean; + pub fn gst_player_set_multiview_flags( + player: *mut GstPlayer, + flags: gst_video::GstVideoMultiviewFlags, + ); + pub fn gst_player_set_multiview_mode( + player: *mut GstPlayer, + mode: gst_video::GstVideoMultiviewFramePacking, + ); pub fn gst_player_set_mute(player: *mut GstPlayer, val: gboolean); pub fn gst_player_set_rate(player: *mut GstPlayer, rate: c_double); pub fn gst_player_set_subtitle_track(player: *mut GstPlayer, stream_index: c_int) -> gboolean; @@ -340,26 +405,47 @@ extern "C" { // GstPlayerGMainContextSignalDispatcher //========================================================================= pub fn gst_player_g_main_context_signal_dispatcher_get_type() -> GType; - pub fn gst_player_g_main_context_signal_dispatcher_new(application_context: *mut glib::GMainContext) -> *mut GstPlayerSignalDispatcher; + pub fn gst_player_g_main_context_signal_dispatcher_new( + application_context: *mut glib::GMainContext, + ) -> *mut GstPlayerSignalDispatcher; //========================================================================= // GstPlayerMediaInfo //========================================================================= pub fn gst_player_media_info_get_type() -> GType; - pub fn gst_player_media_info_get_audio_streams(info: *const GstPlayerMediaInfo) -> *mut glib::GList; - pub fn gst_player_media_info_get_container_format(info: *const GstPlayerMediaInfo) -> *const c_char; - pub fn gst_player_media_info_get_duration(info: *const GstPlayerMediaInfo) -> gst::GstClockTime; - pub fn gst_player_media_info_get_image_sample(info: *const GstPlayerMediaInfo) -> *mut gst::GstSample; - pub fn gst_player_media_info_get_number_of_audio_streams(info: *const GstPlayerMediaInfo) -> c_uint; + pub fn gst_player_media_info_get_audio_streams( + info: *const GstPlayerMediaInfo, + ) -> *mut glib::GList; + pub fn gst_player_media_info_get_container_format( + info: *const GstPlayerMediaInfo, + ) -> *const c_char; + pub fn gst_player_media_info_get_duration(info: *const GstPlayerMediaInfo) + -> gst::GstClockTime; + pub fn gst_player_media_info_get_image_sample( + info: *const GstPlayerMediaInfo, + ) -> *mut gst::GstSample; + pub fn gst_player_media_info_get_number_of_audio_streams( + info: *const GstPlayerMediaInfo, + ) -> c_uint; pub fn gst_player_media_info_get_number_of_streams(info: *const GstPlayerMediaInfo) -> c_uint; - pub fn gst_player_media_info_get_number_of_subtitle_streams(info: *const GstPlayerMediaInfo) -> c_uint; - pub fn gst_player_media_info_get_number_of_video_streams(info: *const GstPlayerMediaInfo) -> c_uint; - pub fn gst_player_media_info_get_stream_list(info: *const GstPlayerMediaInfo) -> *mut glib::GList; - pub fn gst_player_media_info_get_subtitle_streams(info: *const GstPlayerMediaInfo) -> *mut glib::GList; + pub fn gst_player_media_info_get_number_of_subtitle_streams( + info: *const GstPlayerMediaInfo, + ) -> c_uint; + pub fn gst_player_media_info_get_number_of_video_streams( + info: *const GstPlayerMediaInfo, + ) -> c_uint; + pub fn gst_player_media_info_get_stream_list( + info: *const GstPlayerMediaInfo, + ) -> *mut glib::GList; + pub fn gst_player_media_info_get_subtitle_streams( + info: *const GstPlayerMediaInfo, + ) -> *mut glib::GList; pub fn gst_player_media_info_get_tags(info: *const GstPlayerMediaInfo) -> *mut gst::GstTagList; pub fn gst_player_media_info_get_title(info: *const GstPlayerMediaInfo) -> *const c_char; pub fn gst_player_media_info_get_uri(info: *const GstPlayerMediaInfo) -> *const c_char; - pub fn gst_player_media_info_get_video_streams(info: *const GstPlayerMediaInfo) -> *mut glib::GList; + pub fn gst_player_media_info_get_video_streams( + info: *const GstPlayerMediaInfo, + ) -> *mut glib::GList; pub fn gst_player_media_info_is_live(info: *const GstPlayerMediaInfo) -> gboolean; pub fn gst_player_media_info_is_seekable(info: *const GstPlayerMediaInfo) -> gboolean; @@ -370,37 +456,75 @@ extern "C" { pub fn gst_player_stream_info_get_caps(info: *const GstPlayerStreamInfo) -> *mut gst::GstCaps; pub fn gst_player_stream_info_get_codec(info: *const GstPlayerStreamInfo) -> *const c_char; pub fn gst_player_stream_info_get_index(info: *const GstPlayerStreamInfo) -> c_int; - pub fn gst_player_stream_info_get_stream_type(info: *const GstPlayerStreamInfo) -> *const c_char; - pub fn gst_player_stream_info_get_tags(info: *const GstPlayerStreamInfo) -> *mut gst::GstTagList; + pub fn gst_player_stream_info_get_stream_type( + info: *const GstPlayerStreamInfo, + ) -> *const c_char; + pub fn gst_player_stream_info_get_tags( + info: *const GstPlayerStreamInfo, + ) -> *mut gst::GstTagList; //========================================================================= // GstPlayerSubtitleInfo //========================================================================= pub fn gst_player_subtitle_info_get_type() -> GType; - pub fn gst_player_subtitle_info_get_language(info: *const GstPlayerSubtitleInfo) -> *const c_char; + pub fn gst_player_subtitle_info_get_language( + info: *const GstPlayerSubtitleInfo, + ) -> *const c_char; //========================================================================= // GstPlayerVideoInfo //========================================================================= pub fn gst_player_video_info_get_type() -> GType; pub fn gst_player_video_info_get_bitrate(info: *const GstPlayerVideoInfo) -> c_int; - pub fn gst_player_video_info_get_framerate(info: *const GstPlayerVideoInfo, fps_n: *mut c_int, fps_d: *mut c_int); + pub fn gst_player_video_info_get_framerate( + info: *const GstPlayerVideoInfo, + fps_n: *mut c_int, + fps_d: *mut c_int, + ); pub fn gst_player_video_info_get_height(info: *const GstPlayerVideoInfo) -> c_int; pub fn gst_player_video_info_get_max_bitrate(info: *const GstPlayerVideoInfo) -> c_int; - pub fn gst_player_video_info_get_pixel_aspect_ratio(info: *const GstPlayerVideoInfo, par_n: *mut c_uint, par_d: *mut c_uint); + pub fn gst_player_video_info_get_pixel_aspect_ratio( + info: *const GstPlayerVideoInfo, + par_n: *mut c_uint, + par_d: *mut c_uint, + ); pub fn gst_player_video_info_get_width(info: *const GstPlayerVideoInfo) -> c_int; //========================================================================= // GstPlayerVideoOverlayVideoRenderer //========================================================================= pub fn gst_player_video_overlay_video_renderer_get_type() -> GType; - pub fn gst_player_video_overlay_video_renderer_new(window_handle: gpointer) -> *mut GstPlayerVideoRenderer; - pub fn gst_player_video_overlay_video_renderer_new_with_sink(window_handle: gpointer, video_sink: *mut gst::GstElement) -> *mut GstPlayerVideoRenderer; - pub fn gst_player_video_overlay_video_renderer_expose(self_: *mut GstPlayerVideoOverlayVideoRenderer); - pub fn gst_player_video_overlay_video_renderer_get_render_rectangle(self_: *mut GstPlayerVideoOverlayVideoRenderer, x: *mut c_int, y: *mut c_int, width: *mut c_int, height: *mut c_int); - pub fn gst_player_video_overlay_video_renderer_get_window_handle(self_: *mut GstPlayerVideoOverlayVideoRenderer) -> gpointer; - pub fn gst_player_video_overlay_video_renderer_set_render_rectangle(self_: *mut GstPlayerVideoOverlayVideoRenderer, x: c_int, y: c_int, width: c_int, height: c_int); - pub fn gst_player_video_overlay_video_renderer_set_window_handle(self_: *mut GstPlayerVideoOverlayVideoRenderer, window_handle: gpointer); + pub fn gst_player_video_overlay_video_renderer_new( + window_handle: gpointer, + ) -> *mut GstPlayerVideoRenderer; + pub fn gst_player_video_overlay_video_renderer_new_with_sink( + window_handle: gpointer, + video_sink: *mut gst::GstElement, + ) -> *mut GstPlayerVideoRenderer; + pub fn gst_player_video_overlay_video_renderer_expose( + self_: *mut GstPlayerVideoOverlayVideoRenderer, + ); + pub fn gst_player_video_overlay_video_renderer_get_render_rectangle( + self_: *mut GstPlayerVideoOverlayVideoRenderer, + x: *mut c_int, + y: *mut c_int, + width: *mut c_int, + height: *mut c_int, + ); + pub fn gst_player_video_overlay_video_renderer_get_window_handle( + self_: *mut GstPlayerVideoOverlayVideoRenderer, + ) -> gpointer; + pub fn gst_player_video_overlay_video_renderer_set_render_rectangle( + self_: *mut GstPlayerVideoOverlayVideoRenderer, + x: c_int, + y: c_int, + width: c_int, + height: c_int, + ); + pub fn gst_player_video_overlay_video_renderer_set_window_handle( + self_: *mut GstPlayerVideoOverlayVideoRenderer, + window_handle: gpointer, + ); //========================================================================= // GstPlayerSignalDispatcher diff --git a/gstreamer-player-sys/tests/abi.rs b/gstreamer-player-sys/tests/abi.rs index a73688431..6361a132e 100644 --- a/gstreamer-player-sys/tests/abi.rs +++ b/gstreamer-player-sys/tests/abi.rs @@ -5,13 +5,13 @@ extern crate gstreamer_player_sys; extern crate shell_words; extern crate tempdir; +use gstreamer_player_sys::*; use std::env; use std::error::Error; -use std::path::Path; use std::mem::{align_of, size_of}; +use std::path::Path; use std::process::Command; use std::str; -use gstreamer_player_sys::*; static PACKAGES: &[&str] = &["gstreamer-player-1.0"]; @@ -47,8 +47,7 @@ impl Compiler { cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { - return Err(format!("compilation command {:?} failed, {}", - &cmd, status).into()); + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } @@ -77,14 +76,12 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { cmd.args(packages); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {:?} returned {}", - &cmd, out.status).into()); + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } - #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, @@ -115,9 +112,8 @@ impl Results { fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", - self.passed, - self.failed, - self.failed_to_compile) + self.passed, self.failed, self.failed_to_compile + ) } fn expect_total_success(&self) { if self.failed == 0 { @@ -133,24 +129,28 @@ fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!("1", - get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), - "failed to obtain correct constant value for 1"); + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); - eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_value, c_value); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); } } }; @@ -166,24 +166,31 @@ fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!(Layout {size: 1, alignment: 1}, - get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), - "failed to obtain correct layout for char type"); + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); - eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_layout, &c_layout); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); } } }; @@ -203,15 +210,14 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result Result> { @@ -223,28 +229,71 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result(), alignment: align_of::()}), - ("GstPlayerError", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPlayerSignalDispatcherInterface", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPlayerSnapshotFormat", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPlayerState", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPlayerVideoRendererInterface", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPlayerVisualization", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstPlayerColorBalanceType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPlayerError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPlayerSignalDispatcherInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPlayerSnapshotFormat", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPlayerState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPlayerVideoRendererInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPlayerVisualization", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ @@ -263,5 +312,3 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_PLAYER_THUMBNAIL_RAW_NATIVE", "0"), ("(gint) GST_PLAYER_THUMBNAIL_RAW_xRGB", "1"), ]; - - diff --git a/gstreamer-rtsp-server-sys/build.rs b/gstreamer-rtsp-server-sys/build.rs index 0c6fe1034..a812a73b9 100644 --- a/gstreamer-rtsp-server-sys/build.rs +++ b/gstreamer-rtsp-server-sys/build.rs @@ -6,8 +6,8 @@ extern crate pkg_config; use pkg_config::{Config, Error}; use std::env; -use std::io::prelude::*; use std::io; +use std::io::prelude::*; use std::process; fn main() { @@ -48,7 +48,7 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()) + return Ok(()); } let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); @@ -70,8 +70,10 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } for path in library.link_paths.iter() { - println!("cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist")); + println!( + "cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist") + ); } } Ok(()) @@ -85,4 +87,3 @@ fn find() -> Result<(), Error> { Err(err) => Err(err), } } - diff --git a/gstreamer-rtsp-server-sys/src/lib.rs b/gstreamer-rtsp-server-sys/src/lib.rs index c674bca93..52cad5d7e 100644 --- a/gstreamer-rtsp-server-sys/src/lib.rs +++ b/gstreamer-rtsp-server-sys/src/lib.rs @@ -3,21 +3,26 @@ // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] -extern crate libc; +extern crate gio_sys as gio; extern crate glib_sys as glib; extern crate gobject_sys as gobject; -extern crate gio_sys as gio; -extern crate gstreamer_sys as gst; extern crate gstreamer_net_sys as gst_net; -extern crate gstreamer_sdp_sys as gst_sdp; extern crate gstreamer_rtsp_sys as gst_rtsp; +extern crate gstreamer_sdp_sys as gst_sdp; +extern crate gstreamer_sys as gst; +extern crate libc; #[allow(unused_imports)] -use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, - c_short, c_ushort, c_long, c_ulong, - c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; +use libc::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, + intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -58,18 +63,29 @@ pub const GST_RTSP_THREAD_TYPE_CLIENT: GstRTSPThreadType = 0; pub const GST_RTSP_THREAD_TYPE_MEDIA: GstRTSPThreadType = 1; // Constants -pub const GST_RTSP_ADDRESS_POOL_ANY_IPV4: *const c_char = b"0.0.0.0\0" as *const u8 as *const c_char; +pub const GST_RTSP_ADDRESS_POOL_ANY_IPV4: *const c_char = + b"0.0.0.0\0" as *const u8 as *const c_char; pub const GST_RTSP_ADDRESS_POOL_ANY_IPV6: *const c_char = b"::\0" as *const u8 as *const c_char; -pub const GST_RTSP_AUTH_CHECK_CONNECT: *const c_char = b"auth.check.connect\0" as *const u8 as *const c_char; -pub const GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_ACCESS: *const c_char = b"auth.check.media.factory.access\0" as *const u8 as *const c_char; -pub const GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_CONSTRUCT: *const c_char = b"auth.check.media.factory.construct\0" as *const u8 as *const c_char; -pub const GST_RTSP_AUTH_CHECK_TRANSPORT_CLIENT_SETTINGS: *const c_char = b"auth.check.transport.client-settings\0" as *const u8 as *const c_char; -pub const GST_RTSP_AUTH_CHECK_URL: *const c_char = b"auth.check.url\0" as *const u8 as *const c_char; -pub const GST_RTSP_ONVIF_BACKCHANNEL_REQUIREMENT: *const c_char = b"www.onvif.org/ver20/backchannel\0" as *const u8 as *const c_char; -pub const GST_RTSP_PERM_MEDIA_FACTORY_ACCESS: *const c_char = b"media.factory.access\0" as *const u8 as *const c_char; -pub const GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT: *const c_char = b"media.factory.construct\0" as *const u8 as *const c_char; -pub const GST_RTSP_TOKEN_MEDIA_FACTORY_ROLE: *const c_char = b"media.factory.role\0" as *const u8 as *const c_char; -pub const GST_RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS: *const c_char = b"transport.client-settings\0" as *const u8 as *const c_char; +pub const GST_RTSP_AUTH_CHECK_CONNECT: *const c_char = + b"auth.check.connect\0" as *const u8 as *const c_char; +pub const GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_ACCESS: *const c_char = + b"auth.check.media.factory.access\0" as *const u8 as *const c_char; +pub const GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_CONSTRUCT: *const c_char = + b"auth.check.media.factory.construct\0" as *const u8 as *const c_char; +pub const GST_RTSP_AUTH_CHECK_TRANSPORT_CLIENT_SETTINGS: *const c_char = + b"auth.check.transport.client-settings\0" as *const u8 as *const c_char; +pub const GST_RTSP_AUTH_CHECK_URL: *const c_char = + b"auth.check.url\0" as *const u8 as *const c_char; +pub const GST_RTSP_ONVIF_BACKCHANNEL_REQUIREMENT: *const c_char = + b"www.onvif.org/ver20/backchannel\0" as *const u8 as *const c_char; +pub const GST_RTSP_PERM_MEDIA_FACTORY_ACCESS: *const c_char = + b"media.factory.access\0" as *const u8 as *const c_char; +pub const GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT: *const c_char = + b"media.factory.construct\0" as *const u8 as *const c_char; +pub const GST_RTSP_TOKEN_MEDIA_FACTORY_ROLE: *const c_char = + b"media.factory.role\0" as *const u8 as *const c_char; +pub const GST_RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS: *const c_char = + b"transport.client-settings\0" as *const u8 as *const c_char; // Flags pub type GstRTSPAddressFlags = c_uint; @@ -85,18 +101,58 @@ pub const GST_RTSP_TRANSPORT_MODE_PLAY: GstRTSPTransportMode = 1; pub const GST_RTSP_TRANSPORT_MODE_RECORD: GstRTSPTransportMode = 2; // Callbacks -pub type GstRTSPClientSendFunc = Option gboolean>; -pub type GstRTSPClientSendMessagesFunc = Option gboolean>; -pub type GstRTSPClientSessionFilterFunc = Option GstRTSPFilterResult>; +pub type GstRTSPClientSendFunc = Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut gst_rtsp::GstRTSPMessage, + gboolean, + gpointer, + ) -> gboolean, +>; +pub type GstRTSPClientSendMessagesFunc = Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut gst_rtsp::GstRTSPMessage, + c_uint, + gboolean, + gpointer, + ) -> gboolean, +>; +pub type GstRTSPClientSessionFilterFunc = Option< + unsafe extern "C" fn(*mut GstRTSPClient, *mut GstRTSPSession, gpointer) -> GstRTSPFilterResult, +>; pub type GstRTSPKeepAliveFunc = Option; pub type GstRTSPMessageSentFunc = Option; -pub type GstRTSPSendFunc = Option gboolean>; -pub type GstRTSPSendListFunc = Option gboolean>; -pub type GstRTSPServerClientFilterFunc = Option GstRTSPFilterResult>; -pub type GstRTSPSessionFilterFunc = Option GstRTSPFilterResult>; -pub type GstRTSPSessionPoolFilterFunc = Option GstRTSPFilterResult>; -pub type GstRTSPSessionPoolFunc = Option gboolean>; -pub type GstRTSPStreamTransportFilterFunc = Option GstRTSPFilterResult>; +pub type GstRTSPSendFunc = + Option gboolean>; +pub type GstRTSPSendListFunc = + Option gboolean>; +pub type GstRTSPServerClientFilterFunc = Option< + unsafe extern "C" fn(*mut GstRTSPServer, *mut GstRTSPClient, gpointer) -> GstRTSPFilterResult, +>; +pub type GstRTSPSessionFilterFunc = Option< + unsafe extern "C" fn( + *mut GstRTSPSession, + *mut GstRTSPSessionMedia, + gpointer, + ) -> GstRTSPFilterResult, +>; +pub type GstRTSPSessionPoolFilterFunc = Option< + unsafe extern "C" fn( + *mut GstRTSPSessionPool, + *mut GstRTSPSession, + gpointer, + ) -> GstRTSPFilterResult, +>; +pub type GstRTSPSessionPoolFunc = + Option gboolean>; +pub type GstRTSPStreamTransportFilterFunc = Option< + unsafe extern "C" fn( + *mut GstRTSPStream, + *mut GstRTSPStreamTransport, + gpointer, + ) -> GstRTSPFilterResult, +>; // Records #[repr(C)] @@ -113,12 +169,12 @@ pub struct GstRTSPAddress { impl ::std::fmt::Debug for GstRTSPAddress { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPAddress @ {:?}", self as *const _)) - .field("pool", &self.pool) - .field("address", &self.address) - .field("port", &self.port) - .field("n_ports", &self.n_ports) - .field("ttl", &self.ttl) - .finish() + .field("pool", &self.pool) + .field("address", &self.address) + .field("port", &self.port) + .field("n_ports", &self.n_ports) + .field("ttl", &self.ttl) + .finish() } } @@ -132,8 +188,8 @@ pub struct GstRTSPAddressPoolClass { impl ::std::fmt::Debug for GstRTSPAddressPoolClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPAddressPoolClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -146,22 +202,36 @@ pub type GstRTSPAddressPoolPrivate = *mut _GstRTSPAddressPoolPrivate; #[derive(Copy, Clone)] pub struct GstRTSPAuthClass { pub parent_class: gobject::GObjectClass, - pub authenticate: Option gboolean>, - pub check: Option gboolean>, - pub generate_authenticate_header: Option, - pub accept_certificate: Option gboolean>, + pub authenticate: + Option gboolean>, + pub check: Option< + unsafe extern "C" fn(*mut GstRTSPAuth, *mut GstRTSPContext, *const c_char) -> gboolean, + >, + pub generate_authenticate_header: + Option, + pub accept_certificate: Option< + unsafe extern "C" fn( + *mut GstRTSPAuth, + *mut gio::GTlsConnection, + *mut gio::GTlsCertificate, + gio::GTlsCertificateFlags, + ) -> gboolean, + >, pub _gst_reserved: [gpointer; 3], } impl ::std::fmt::Debug for GstRTSPAuthClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPAuthClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("authenticate", &self.authenticate) - .field("check", &self.check) - .field("generate_authenticate_header", &self.generate_authenticate_header) - .field("accept_certificate", &self.accept_certificate) - .finish() + .field("parent_class", &self.parent_class) + .field("authenticate", &self.authenticate) + .field("check", &self.check) + .field( + "generate_authenticate_header", + &self.generate_authenticate_header, + ) + .field("accept_certificate", &self.accept_certificate) + .finish() } } @@ -174,12 +244,33 @@ pub type GstRTSPAuthPrivate = *mut _GstRTSPAuthPrivate; #[derive(Copy, Clone)] pub struct GstRTSPClientClass { pub parent_class: gobject::GObjectClass, - pub create_sdp: Option *mut gst_sdp::GstSDPMessage>, - pub configure_client_media: Option gboolean>, - pub configure_client_transport: Option gboolean>, - pub params_set: Option gst_rtsp::GstRTSPResult>, - pub params_get: Option gst_rtsp::GstRTSPResult>, - pub make_path_from_uri: Option *mut c_char>, + pub create_sdp: Option< + unsafe extern "C" fn(*mut GstRTSPClient, *mut GstRTSPMedia) -> *mut gst_sdp::GstSDPMessage, + >, + pub configure_client_media: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPMedia, + *mut GstRTSPStream, + *mut GstRTSPContext, + ) -> gboolean, + >, + pub configure_client_transport: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + *mut gst_rtsp::GstRTSPTransport, + ) -> gboolean, + >, + pub params_set: Option< + unsafe extern "C" fn(*mut GstRTSPClient, *mut GstRTSPContext) -> gst_rtsp::GstRTSPResult, + >, + pub params_get: Option< + unsafe extern "C" fn(*mut GstRTSPClient, *mut GstRTSPContext) -> gst_rtsp::GstRTSPResult, + >, + pub make_path_from_uri: Option< + unsafe extern "C" fn(*mut GstRTSPClient, *const gst_rtsp::GstRTSPUrl) -> *mut c_char, + >, pub closed: Option, pub new_session: Option, pub options_request: Option, @@ -188,66 +279,146 @@ pub struct GstRTSPClientClass { pub play_request: Option, pub pause_request: Option, pub teardown_request: Option, - pub set_parameter_request: Option, - pub get_parameter_request: Option, + pub set_parameter_request: + Option, + pub get_parameter_request: + Option, pub handle_response: Option, - pub tunnel_http_response: Option, - pub send_message: Option, - pub handle_sdp: Option gboolean>, + pub tunnel_http_response: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut gst_rtsp::GstRTSPMessage, + *mut gst_rtsp::GstRTSPMessage, + ), + >, + pub send_message: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + *mut gst_rtsp::GstRTSPMessage, + ), + >, + pub handle_sdp: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + *mut GstRTSPMedia, + *mut gst_sdp::GstSDPMessage, + ) -> gboolean, + >, pub announce_request: Option, pub record_request: Option, - pub check_requirements: Option *mut c_char>, - pub pre_options_request: Option gst_rtsp::GstRTSPStatusCode>, - pub pre_describe_request: Option gst_rtsp::GstRTSPStatusCode>, - pub pre_setup_request: Option gst_rtsp::GstRTSPStatusCode>, - pub pre_play_request: Option gst_rtsp::GstRTSPStatusCode>, - pub pre_pause_request: Option gst_rtsp::GstRTSPStatusCode>, - pub pre_teardown_request: Option gst_rtsp::GstRTSPStatusCode>, - pub pre_set_parameter_request: Option gst_rtsp::GstRTSPStatusCode>, - pub pre_get_parameter_request: Option gst_rtsp::GstRTSPStatusCode>, - pub pre_announce_request: Option gst_rtsp::GstRTSPStatusCode>, - pub pre_record_request: Option gst_rtsp::GstRTSPStatusCode>, + pub check_requirements: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + *mut *mut c_char, + ) -> *mut c_char, + >, + pub pre_options_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_describe_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_setup_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_play_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_pause_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_teardown_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_set_parameter_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_get_parameter_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_announce_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_record_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, pub _gst_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstRTSPClientClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPClientClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("create_sdp", &self.create_sdp) - .field("configure_client_media", &self.configure_client_media) - .field("configure_client_transport", &self.configure_client_transport) - .field("params_set", &self.params_set) - .field("params_get", &self.params_get) - .field("make_path_from_uri", &self.make_path_from_uri) - .field("closed", &self.closed) - .field("new_session", &self.new_session) - .field("options_request", &self.options_request) - .field("describe_request", &self.describe_request) - .field("setup_request", &self.setup_request) - .field("play_request", &self.play_request) - .field("pause_request", &self.pause_request) - .field("teardown_request", &self.teardown_request) - .field("set_parameter_request", &self.set_parameter_request) - .field("get_parameter_request", &self.get_parameter_request) - .field("handle_response", &self.handle_response) - .field("tunnel_http_response", &self.tunnel_http_response) - .field("send_message", &self.send_message) - .field("handle_sdp", &self.handle_sdp) - .field("announce_request", &self.announce_request) - .field("record_request", &self.record_request) - .field("check_requirements", &self.check_requirements) - .field("pre_options_request", &self.pre_options_request) - .field("pre_describe_request", &self.pre_describe_request) - .field("pre_setup_request", &self.pre_setup_request) - .field("pre_play_request", &self.pre_play_request) - .field("pre_pause_request", &self.pre_pause_request) - .field("pre_teardown_request", &self.pre_teardown_request) - .field("pre_set_parameter_request", &self.pre_set_parameter_request) - .field("pre_get_parameter_request", &self.pre_get_parameter_request) - .field("pre_announce_request", &self.pre_announce_request) - .field("pre_record_request", &self.pre_record_request) - .finish() + .field("parent_class", &self.parent_class) + .field("create_sdp", &self.create_sdp) + .field("configure_client_media", &self.configure_client_media) + .field( + "configure_client_transport", + &self.configure_client_transport, + ) + .field("params_set", &self.params_set) + .field("params_get", &self.params_get) + .field("make_path_from_uri", &self.make_path_from_uri) + .field("closed", &self.closed) + .field("new_session", &self.new_session) + .field("options_request", &self.options_request) + .field("describe_request", &self.describe_request) + .field("setup_request", &self.setup_request) + .field("play_request", &self.play_request) + .field("pause_request", &self.pause_request) + .field("teardown_request", &self.teardown_request) + .field("set_parameter_request", &self.set_parameter_request) + .field("get_parameter_request", &self.get_parameter_request) + .field("handle_response", &self.handle_response) + .field("tunnel_http_response", &self.tunnel_http_response) + .field("send_message", &self.send_message) + .field("handle_sdp", &self.handle_sdp) + .field("announce_request", &self.announce_request) + .field("record_request", &self.record_request) + .field("check_requirements", &self.check_requirements) + .field("pre_options_request", &self.pre_options_request) + .field("pre_describe_request", &self.pre_describe_request) + .field("pre_setup_request", &self.pre_setup_request) + .field("pre_play_request", &self.pre_play_request) + .field("pre_pause_request", &self.pre_pause_request) + .field("pre_teardown_request", &self.pre_teardown_request) + .field("pre_set_parameter_request", &self.pre_set_parameter_request) + .field("pre_get_parameter_request", &self.pre_get_parameter_request) + .field("pre_announce_request", &self.pre_announce_request) + .field("pre_record_request", &self.pre_record_request) + .finish() } } @@ -280,22 +451,22 @@ pub struct GstRTSPContext { impl ::std::fmt::Debug for GstRTSPContext { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPContext @ {:?}", self as *const _)) - .field("server", &self.server) - .field("conn", &self.conn) - .field("client", &self.client) - .field("request", &self.request) - .field("uri", &self.uri) - .field("method", &self.method) - .field("auth", &self.auth) - .field("token", &self.token) - .field("session", &self.session) - .field("sessmedia", &self.sessmedia) - .field("factory", &self.factory) - .field("media", &self.media) - .field("stream", &self.stream) - .field("response", &self.response) - .field("trans", &self.trans) - .finish() + .field("server", &self.server) + .field("conn", &self.conn) + .field("client", &self.client) + .field("request", &self.request) + .field("uri", &self.uri) + .field("method", &self.method) + .field("auth", &self.auth) + .field("token", &self.token) + .field("session", &self.session) + .field("sessmedia", &self.sessmedia) + .field("factory", &self.factory) + .field("media", &self.media) + .field("stream", &self.stream) + .field("response", &self.response) + .field("trans", &self.trans) + .finish() } } @@ -303,50 +474,65 @@ impl ::std::fmt::Debug for GstRTSPContext { #[derive(Copy, Clone)] pub struct GstRTSPMediaClass { pub parent_class: gobject::GObjectClass, - pub handle_message: Option gboolean>, + pub handle_message: + Option gboolean>, pub prepare: Option gboolean>, pub unprepare: Option gboolean>, pub suspend: Option gboolean>, pub unsuspend: Option gboolean>, - pub convert_range: Option gboolean>, + pub convert_range: Option< + unsafe extern "C" fn( + *mut GstRTSPMedia, + *mut gst_rtsp::GstRTSPTimeRange, + gst_rtsp::GstRTSPRangeUnit, + ) -> gboolean, + >, pub query_position: Option gboolean>, pub query_stop: Option gboolean>, pub create_rtpbin: Option *mut gst::GstElement>, - pub setup_rtpbin: Option gboolean>, - pub setup_sdp: Option gboolean>, + pub setup_rtpbin: + Option gboolean>, + pub setup_sdp: Option< + unsafe extern "C" fn( + *mut GstRTSPMedia, + *mut gst_sdp::GstSDPMessage, + *mut GstSDPInfo, + ) -> gboolean, + >, pub new_stream: Option, pub removed_stream: Option, pub prepared: Option, pub unprepared: Option, pub target_state: Option, pub new_state: Option, - pub handle_sdp: Option gboolean>, + pub handle_sdp: + Option gboolean>, pub _gst_reserved: [gpointer; 19], } impl ::std::fmt::Debug for GstRTSPMediaClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPMediaClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("handle_message", &self.handle_message) - .field("prepare", &self.prepare) - .field("unprepare", &self.unprepare) - .field("suspend", &self.suspend) - .field("unsuspend", &self.unsuspend) - .field("convert_range", &self.convert_range) - .field("query_position", &self.query_position) - .field("query_stop", &self.query_stop) - .field("create_rtpbin", &self.create_rtpbin) - .field("setup_rtpbin", &self.setup_rtpbin) - .field("setup_sdp", &self.setup_sdp) - .field("new_stream", &self.new_stream) - .field("removed_stream", &self.removed_stream) - .field("prepared", &self.prepared) - .field("unprepared", &self.unprepared) - .field("target_state", &self.target_state) - .field("new_state", &self.new_state) - .field("handle_sdp", &self.handle_sdp) - .finish() + .field("parent_class", &self.parent_class) + .field("handle_message", &self.handle_message) + .field("prepare", &self.prepare) + .field("unprepare", &self.unprepare) + .field("suspend", &self.suspend) + .field("unsuspend", &self.unsuspend) + .field("convert_range", &self.convert_range) + .field("query_position", &self.query_position) + .field("query_stop", &self.query_stop) + .field("create_rtpbin", &self.create_rtpbin) + .field("setup_rtpbin", &self.setup_rtpbin) + .field("setup_sdp", &self.setup_sdp) + .field("new_stream", &self.new_stream) + .field("removed_stream", &self.removed_stream) + .field("prepared", &self.prepared) + .field("unprepared", &self.unprepared) + .field("target_state", &self.target_state) + .field("new_state", &self.new_state) + .field("handle_sdp", &self.handle_sdp) + .finish() } } @@ -354,28 +540,46 @@ impl ::std::fmt::Debug for GstRTSPMediaClass { #[derive(Copy, Clone)] pub struct GstRTSPMediaFactoryClass { pub parent_class: gobject::GObjectClass, - pub gen_key: Option *mut c_char>, - pub create_element: Option *mut gst::GstElement>, - pub construct: Option *mut GstRTSPMedia>, - pub create_pipeline: Option *mut gst::GstElement>, + pub gen_key: Option< + unsafe extern "C" fn(*mut GstRTSPMediaFactory, *const gst_rtsp::GstRTSPUrl) -> *mut c_char, + >, + pub create_element: Option< + unsafe extern "C" fn( + *mut GstRTSPMediaFactory, + *const gst_rtsp::GstRTSPUrl, + ) -> *mut gst::GstElement, + >, + pub construct: Option< + unsafe extern "C" fn( + *mut GstRTSPMediaFactory, + *const gst_rtsp::GstRTSPUrl, + ) -> *mut GstRTSPMedia, + >, + pub create_pipeline: Option< + unsafe extern "C" fn(*mut GstRTSPMediaFactory, *mut GstRTSPMedia) -> *mut gst::GstElement, + >, pub configure: Option, - pub media_constructed: Option, + pub media_constructed: + Option, pub media_configure: Option, pub _gst_reserved: [gpointer; 20], } impl ::std::fmt::Debug for GstRTSPMediaFactoryClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstRTSPMediaFactoryClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("gen_key", &self.gen_key) - .field("create_element", &self.create_element) - .field("construct", &self.construct) - .field("create_pipeline", &self.create_pipeline) - .field("configure", &self.configure) - .field("media_constructed", &self.media_constructed) - .field("media_configure", &self.media_configure) - .finish() + f.debug_struct(&format!( + "GstRTSPMediaFactoryClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("gen_key", &self.gen_key) + .field("create_element", &self.create_element) + .field("construct", &self.construct) + .field("create_pipeline", &self.create_pipeline) + .field("configure", &self.configure) + .field("media_constructed", &self.media_constructed) + .field("media_configure", &self.media_configure) + .finish() } } @@ -393,9 +597,12 @@ pub struct GstRTSPMediaFactoryURIClass { impl ::std::fmt::Debug for GstRTSPMediaFactoryURIClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstRTSPMediaFactoryURIClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + f.debug_struct(&format!( + "GstRTSPMediaFactoryURIClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() } } @@ -413,16 +620,18 @@ pub type GstRTSPMediaPrivate = *mut _GstRTSPMediaPrivate; #[derive(Copy, Clone)] pub struct GstRTSPMountPointsClass { pub parent_class: gobject::GObjectClass, - pub make_path: Option *mut c_char>, + pub make_path: Option< + unsafe extern "C" fn(*mut GstRTSPMountPoints, *const gst_rtsp::GstRTSPUrl) -> *mut c_char, + >, pub _gst_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstRTSPMountPointsClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPMountPointsClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("make_path", &self.make_path) - .finish() + .field("parent_class", &self.parent_class) + .field("make_path", &self.make_path) + .finish() } } @@ -441,8 +650,8 @@ pub struct GstRTSPOnvifClientClass { impl ::std::fmt::Debug for GstRTSPOnvifClientClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPOnvifClientClass @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -456,8 +665,8 @@ pub struct GstRTSPOnvifMediaClass { impl ::std::fmt::Debug for GstRTSPOnvifMediaClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPOnvifMediaClass @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -465,16 +674,20 @@ impl ::std::fmt::Debug for GstRTSPOnvifMediaClass { #[derive(Copy, Clone)] pub struct GstRTSPOnvifMediaFactoryClass { pub parent: GstRTSPMediaFactoryClass, - pub has_backchannel_support: Option gboolean>, + pub has_backchannel_support: + Option gboolean>, pub _gst_reserved: [gpointer; 20], } impl ::std::fmt::Debug for GstRTSPOnvifMediaFactoryClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstRTSPOnvifMediaFactoryClass @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("has_backchannel_support", &self.has_backchannel_support) - .finish() + f.debug_struct(&format!( + "GstRTSPOnvifMediaFactoryClass @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .field("has_backchannel_support", &self.has_backchannel_support) + .finish() } } @@ -498,8 +711,8 @@ pub struct GstRTSPOnvifServerClass { impl ::std::fmt::Debug for GstRTSPOnvifServerClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPOnvifServerClass @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -512,8 +725,8 @@ pub struct GstRTSPPermissions { impl ::std::fmt::Debug for GstRTSPPermissions { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPPermissions @ {:?}", self as *const _)) - .field("mini_object", &self.mini_object) - .finish() + .field("mini_object", &self.mini_object) + .finish() } } @@ -529,10 +742,10 @@ pub struct GstRTSPServerClass { impl ::std::fmt::Debug for GstRTSPServerClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPServerClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("create_client", &self.create_client) - .field("client_connected", &self.client_connected) - .finish() + .field("parent_class", &self.parent_class) + .field("create_client", &self.create_client) + .field("client_connected", &self.client_connected) + .finish() } } @@ -551,8 +764,8 @@ pub struct GstRTSPSessionClass { impl ::std::fmt::Debug for GstRTSPSessionClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPSessionClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -565,9 +778,12 @@ pub struct GstRTSPSessionMediaClass { impl ::std::fmt::Debug for GstRTSPSessionMediaClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstRTSPSessionMediaClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + f.debug_struct(&format!( + "GstRTSPSessionMediaClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() } } @@ -581,7 +797,8 @@ pub type GstRTSPSessionMediaPrivate = *mut _GstRTSPSessionMediaPrivate; pub struct GstRTSPSessionPoolClass { pub parent_class: gobject::GObjectClass, pub create_session_id: Option *mut c_char>, - pub create_session: Option *mut GstRTSPSession>, + pub create_session: + Option *mut GstRTSPSession>, pub session_removed: Option, pub _gst_reserved: [gpointer; 19], } @@ -589,11 +806,11 @@ pub struct GstRTSPSessionPoolClass { impl ::std::fmt::Debug for GstRTSPSessionPoolClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPSessionPoolClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("create_session_id", &self.create_session_id) - .field("create_session", &self.create_session) - .field("session_removed", &self.session_removed) - .finish() + .field("parent_class", &self.parent_class) + .field("create_session_id", &self.create_session_id) + .field("create_session", &self.create_session) + .field("session_removed", &self.session_removed) + .finish() } } @@ -617,8 +834,8 @@ pub struct GstRTSPStreamClass { impl ::std::fmt::Debug for GstRTSPStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPStreamClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -636,9 +853,12 @@ pub struct GstRTSPStreamTransportClass { impl ::std::fmt::Debug for GstRTSPStreamTransportClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstRTSPStreamTransportClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + f.debug_struct(&format!( + "GstRTSPStreamTransportClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() } } @@ -659,11 +879,11 @@ pub struct GstRTSPThread { impl ::std::fmt::Debug for GstRTSPThread { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPThread @ {:?}", self as *const _)) - .field("mini_object", &self.mini_object) - .field("type_", &self.type_) - .field("context", &self.context) - .field("loop_", &self.loop_) - .finish() + .field("mini_object", &self.mini_object) + .field("type_", &self.type_) + .field("context", &self.context) + .field("loop_", &self.loop_) + .finish() } } @@ -672,8 +892,16 @@ impl ::std::fmt::Debug for GstRTSPThread { pub struct GstRTSPThreadPoolClass { pub parent_class: gobject::GObjectClass, pub pool: *mut glib::GThreadPool, - pub get_thread: Option *mut GstRTSPThread>, - pub configure_thread: Option, + pub get_thread: Option< + unsafe extern "C" fn( + *mut GstRTSPThreadPool, + GstRTSPThreadType, + *mut GstRTSPContext, + ) -> *mut GstRTSPThread, + >, + pub configure_thread: Option< + unsafe extern "C" fn(*mut GstRTSPThreadPool, *mut GstRTSPThread, *mut GstRTSPContext), + >, pub thread_enter: Option, pub thread_leave: Option, pub _gst_reserved: [gpointer; 4], @@ -682,13 +910,13 @@ pub struct GstRTSPThreadPoolClass { impl ::std::fmt::Debug for GstRTSPThreadPoolClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPThreadPoolClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("pool", &self.pool) - .field("get_thread", &self.get_thread) - .field("configure_thread", &self.configure_thread) - .field("thread_enter", &self.thread_enter) - .field("thread_leave", &self.thread_leave) - .finish() + .field("parent_class", &self.parent_class) + .field("pool", &self.pool) + .field("get_thread", &self.get_thread) + .field("configure_thread", &self.configure_thread) + .field("thread_enter", &self.thread_enter) + .field("thread_leave", &self.thread_leave) + .finish() } } @@ -706,8 +934,8 @@ pub struct GstRTSPToken { impl ::std::fmt::Debug for GstRTSPToken { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPToken @ {:?}", self as *const _)) - .field("mini_object", &self.mini_object) - .finish() + .field("mini_object", &self.mini_object) + .finish() } } @@ -721,9 +949,9 @@ pub struct GstSDPInfo { impl ::std::fmt::Debug for GstSDPInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstSDPInfo @ {:?}", self as *const _)) - .field("is_ipv6", &self.is_ipv6) - .field("server_ip", &self.server_ip) - .finish() + .field("is_ipv6", &self.is_ipv6) + .field("server_ip", &self.server_ip) + .finish() } } @@ -739,8 +967,8 @@ pub struct GstRTSPAddressPool { impl ::std::fmt::Debug for GstRTSPAddressPool { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPAddressPool @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -755,8 +983,8 @@ pub struct GstRTSPAuth { impl ::std::fmt::Debug for GstRTSPAuth { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPAuth @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -771,8 +999,8 @@ pub struct GstRTSPClient { impl ::std::fmt::Debug for GstRTSPClient { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPClient @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -787,8 +1015,8 @@ pub struct GstRTSPMedia { impl ::std::fmt::Debug for GstRTSPMedia { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPMedia @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -803,8 +1031,8 @@ pub struct GstRTSPMediaFactory { impl ::std::fmt::Debug for GstRTSPMediaFactory { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPMediaFactory @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -819,8 +1047,8 @@ pub struct GstRTSPMediaFactoryURI { impl ::std::fmt::Debug for GstRTSPMediaFactoryURI { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPMediaFactoryURI @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -835,8 +1063,8 @@ pub struct GstRTSPMountPoints { impl ::std::fmt::Debug for GstRTSPMountPoints { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPMountPoints @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -850,8 +1078,8 @@ pub struct GstRTSPOnvifClient { impl ::std::fmt::Debug for GstRTSPOnvifClient { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPOnvifClient @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -866,9 +1094,9 @@ pub struct GstRTSPOnvifMedia { impl ::std::fmt::Debug for GstRTSPOnvifMedia { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPOnvifMedia @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("priv_", &self.priv_) - .finish() + .field("parent", &self.parent) + .field("priv_", &self.priv_) + .finish() } } @@ -882,10 +1110,13 @@ pub struct GstRTSPOnvifMediaFactory { impl ::std::fmt::Debug for GstRTSPOnvifMediaFactory { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstRTSPOnvifMediaFactory @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("priv_", &self.priv_) - .finish() + f.debug_struct(&format!( + "GstRTSPOnvifMediaFactory @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .field("priv_", &self.priv_) + .finish() } } @@ -899,8 +1130,8 @@ pub struct GstRTSPOnvifServer { impl ::std::fmt::Debug for GstRTSPOnvifServer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPOnvifServer @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -915,8 +1146,8 @@ pub struct GstRTSPServer { impl ::std::fmt::Debug for GstRTSPServer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPServer @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -931,8 +1162,8 @@ pub struct GstRTSPSession { impl ::std::fmt::Debug for GstRTSPSession { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPSession @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -947,8 +1178,8 @@ pub struct GstRTSPSessionMedia { impl ::std::fmt::Debug for GstRTSPSessionMedia { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPSessionMedia @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -963,8 +1194,8 @@ pub struct GstRTSPSessionPool { impl ::std::fmt::Debug for GstRTSPSessionPool { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPSessionPool @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -979,8 +1210,8 @@ pub struct GstRTSPStream { impl ::std::fmt::Debug for GstRTSPStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPStream @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -995,8 +1226,8 @@ pub struct GstRTSPStreamTransport { impl ::std::fmt::Debug for GstRTSPStreamTransport { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPStreamTransport @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1011,8 +1242,8 @@ pub struct GstRTSPThreadPool { impl ::std::fmt::Debug for GstRTSPThreadPool { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPThreadPool @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -1053,16 +1284,42 @@ extern "C" { pub fn gst_rtsp_permissions_get_type() -> GType; pub fn gst_rtsp_permissions_new() -> *mut GstRTSPPermissions; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_permissions_add_permission_for_role(permissions: *mut GstRTSPPermissions, role: *const c_char, permission: *const c_char, allowed: gboolean); - pub fn gst_rtsp_permissions_add_role(permissions: *mut GstRTSPPermissions, role: *const c_char, fieldname: *const c_char, ...); + pub fn gst_rtsp_permissions_add_permission_for_role( + permissions: *mut GstRTSPPermissions, + role: *const c_char, + permission: *const c_char, + allowed: gboolean, + ); + pub fn gst_rtsp_permissions_add_role( + permissions: *mut GstRTSPPermissions, + role: *const c_char, + fieldname: *const c_char, + ... + ); #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_permissions_add_role_empty(permissions: *mut GstRTSPPermissions, role: *const c_char); + pub fn gst_rtsp_permissions_add_role_empty( + permissions: *mut GstRTSPPermissions, + role: *const c_char, + ); #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_permissions_add_role_from_structure(permissions: *mut GstRTSPPermissions, structure: *mut gst::GstStructure); + pub fn gst_rtsp_permissions_add_role_from_structure( + permissions: *mut GstRTSPPermissions, + structure: *mut gst::GstStructure, + ); //pub fn gst_rtsp_permissions_add_role_valist(permissions: *mut GstRTSPPermissions, role: *const c_char, fieldname: *const c_char, var_args: /*Unimplemented*/va_list); - pub fn gst_rtsp_permissions_get_role(permissions: *mut GstRTSPPermissions, role: *const c_char) -> *const gst::GstStructure; - pub fn gst_rtsp_permissions_is_allowed(permissions: *mut GstRTSPPermissions, role: *const c_char, permission: *const c_char) -> gboolean; - pub fn gst_rtsp_permissions_remove_role(permissions: *mut GstRTSPPermissions, role: *const c_char); + pub fn gst_rtsp_permissions_get_role( + permissions: *mut GstRTSPPermissions, + role: *const c_char, + ) -> *const gst::GstStructure; + pub fn gst_rtsp_permissions_is_allowed( + permissions: *mut GstRTSPPermissions, + role: *const c_char, + permission: *const c_char, + ) -> gboolean; + pub fn gst_rtsp_permissions_remove_role( + permissions: *mut GstRTSPPermissions, + role: *const c_char, + ); //========================================================================= // GstRTSPThread @@ -1079,13 +1336,24 @@ extern "C" { pub fn gst_rtsp_token_new(firstfield: *const c_char, ...) -> *mut GstRTSPToken; pub fn gst_rtsp_token_new_empty() -> *mut GstRTSPToken; //pub fn gst_rtsp_token_new_valist(firstfield: *const c_char, var_args: /*Unimplemented*/va_list) -> *mut GstRTSPToken; - pub fn gst_rtsp_token_get_string(token: *mut GstRTSPToken, field: *const c_char) -> *const c_char; + pub fn gst_rtsp_token_get_string( + token: *mut GstRTSPToken, + field: *const c_char, + ) -> *const c_char; pub fn gst_rtsp_token_get_structure(token: *mut GstRTSPToken) -> *const gst::GstStructure; pub fn gst_rtsp_token_is_allowed(token: *mut GstRTSPToken, field: *const c_char) -> gboolean; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_token_set_bool(token: *mut GstRTSPToken, field: *const c_char, bool_value: gboolean); + pub fn gst_rtsp_token_set_bool( + token: *mut GstRTSPToken, + field: *const c_char, + bool_value: gboolean, + ); #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_token_set_string(token: *mut GstRTSPToken, field: *const c_char, string_value: *const c_char); + pub fn gst_rtsp_token_set_string( + token: *mut GstRTSPToken, + field: *const c_char, + string_value: *const c_char, + ); pub fn gst_rtsp_token_writable_structure(token: *mut GstRTSPToken) -> *mut gst::GstStructure; //========================================================================= @@ -1093,12 +1361,30 @@ extern "C" { //========================================================================= pub fn gst_rtsp_address_pool_get_type() -> GType; pub fn gst_rtsp_address_pool_new() -> *mut GstRTSPAddressPool; - pub fn gst_rtsp_address_pool_acquire_address(pool: *mut GstRTSPAddressPool, flags: GstRTSPAddressFlags, n_ports: c_int) -> *mut GstRTSPAddress; - pub fn gst_rtsp_address_pool_add_range(pool: *mut GstRTSPAddressPool, min_address: *const c_char, max_address: *const c_char, min_port: u16, max_port: u16, ttl: u8) -> gboolean; + pub fn gst_rtsp_address_pool_acquire_address( + pool: *mut GstRTSPAddressPool, + flags: GstRTSPAddressFlags, + n_ports: c_int, + ) -> *mut GstRTSPAddress; + pub fn gst_rtsp_address_pool_add_range( + pool: *mut GstRTSPAddressPool, + min_address: *const c_char, + max_address: *const c_char, + min_port: u16, + max_port: u16, + ttl: u8, + ) -> gboolean; pub fn gst_rtsp_address_pool_clear(pool: *mut GstRTSPAddressPool); pub fn gst_rtsp_address_pool_dump(pool: *mut GstRTSPAddressPool); pub fn gst_rtsp_address_pool_has_unicast_addresses(pool: *mut GstRTSPAddressPool) -> gboolean; - pub fn gst_rtsp_address_pool_reserve_address(pool: *mut GstRTSPAddressPool, ip_address: *const c_char, port: c_uint, n_ports: c_uint, ttl: c_uint, address: *mut *mut GstRTSPAddress) -> GstRTSPAddressPoolResult; + pub fn gst_rtsp_address_pool_reserve_address( + pool: *mut GstRTSPAddressPool, + ip_address: *const c_char, + port: c_uint, + n_ports: c_uint, + ttl: c_uint, + address: *mut *mut GstRTSPAddress, + ) -> GstRTSPAddressPoolResult; //========================================================================= // GstRTSPAuth @@ -1107,20 +1393,37 @@ extern "C" { pub fn gst_rtsp_auth_new() -> *mut GstRTSPAuth; pub fn gst_rtsp_auth_check(check: *const c_char) -> gboolean; pub fn gst_rtsp_auth_make_basic(user: *const c_char, pass: *const c_char) -> *mut c_char; - pub fn gst_rtsp_auth_add_basic(auth: *mut GstRTSPAuth, basic: *const c_char, token: *mut GstRTSPToken); + pub fn gst_rtsp_auth_add_basic( + auth: *mut GstRTSPAuth, + basic: *const c_char, + token: *mut GstRTSPToken, + ); #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_rtsp_auth_add_digest(auth: *mut GstRTSPAuth, user: *const c_char, pass: *const c_char, token: *mut GstRTSPToken); + pub fn gst_rtsp_auth_add_digest( + auth: *mut GstRTSPAuth, + user: *const c_char, + pass: *const c_char, + token: *mut GstRTSPToken, + ); pub fn gst_rtsp_auth_get_default_token(auth: *mut GstRTSPAuth) -> *mut GstRTSPToken; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_rtsp_auth_get_realm(auth: *mut GstRTSPAuth) -> *mut c_char; #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_rtsp_auth_get_supported_methods(auth: *mut GstRTSPAuth) -> gst_rtsp::GstRTSPAuthMethod; - pub fn gst_rtsp_auth_get_tls_authentication_mode(auth: *mut GstRTSPAuth) -> gio::GTlsAuthenticationMode; + pub fn gst_rtsp_auth_get_supported_methods( + auth: *mut GstRTSPAuth, + ) -> gst_rtsp::GstRTSPAuthMethod; + pub fn gst_rtsp_auth_get_tls_authentication_mode( + auth: *mut GstRTSPAuth, + ) -> gio::GTlsAuthenticationMode; pub fn gst_rtsp_auth_get_tls_certificate(auth: *mut GstRTSPAuth) -> *mut gio::GTlsCertificate; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_rtsp_auth_get_tls_database(auth: *mut GstRTSPAuth) -> *mut gio::GTlsDatabase; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_auth_parse_htdigest(auth: *mut GstRTSPAuth, path: *const c_char, token: *mut GstRTSPToken) -> gboolean; + pub fn gst_rtsp_auth_parse_htdigest( + auth: *mut GstRTSPAuth, + path: *const c_char, + token: *mut GstRTSPToken, + ) -> gboolean; pub fn gst_rtsp_auth_remove_basic(auth: *mut GstRTSPAuth, basic: *const c_char); #[cfg(any(feature = "v1_12", feature = "dox"))] pub fn gst_rtsp_auth_remove_digest(auth: *mut GstRTSPAuth, user: *const c_char); @@ -1128,10 +1431,19 @@ extern "C" { #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_rtsp_auth_set_realm(auth: *mut GstRTSPAuth, realm: *const c_char); #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_rtsp_auth_set_supported_methods(auth: *mut GstRTSPAuth, methods: gst_rtsp::GstRTSPAuthMethod); + pub fn gst_rtsp_auth_set_supported_methods( + auth: *mut GstRTSPAuth, + methods: gst_rtsp::GstRTSPAuthMethod, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_rtsp_auth_set_tls_authentication_mode(auth: *mut GstRTSPAuth, mode: gio::GTlsAuthenticationMode); - pub fn gst_rtsp_auth_set_tls_certificate(auth: *mut GstRTSPAuth, cert: *mut gio::GTlsCertificate); + pub fn gst_rtsp_auth_set_tls_authentication_mode( + auth: *mut GstRTSPAuth, + mode: gio::GTlsAuthenticationMode, + ); + pub fn gst_rtsp_auth_set_tls_certificate( + auth: *mut GstRTSPAuth, + cert: *mut gio::GTlsCertificate, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_rtsp_auth_set_tls_database(auth: *mut GstRTSPAuth, database: *mut gio::GTlsDatabase); @@ -1140,25 +1452,63 @@ extern "C" { //========================================================================= pub fn gst_rtsp_client_get_type() -> GType; pub fn gst_rtsp_client_new() -> *mut GstRTSPClient; - pub fn gst_rtsp_client_attach(client: *mut GstRTSPClient, context: *mut glib::GMainContext) -> c_uint; + pub fn gst_rtsp_client_attach( + client: *mut GstRTSPClient, + context: *mut glib::GMainContext, + ) -> c_uint; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_rtsp_client_close(client: *mut GstRTSPClient); pub fn gst_rtsp_client_get_auth(client: *mut GstRTSPClient) -> *mut GstRTSPAuth; - pub fn gst_rtsp_client_get_connection(client: *mut GstRTSPClient) -> *mut gst_rtsp::GstRTSPConnection; + pub fn gst_rtsp_client_get_connection( + client: *mut GstRTSPClient, + ) -> *mut gst_rtsp::GstRTSPConnection; pub fn gst_rtsp_client_get_mount_points(client: *mut GstRTSPClient) -> *mut GstRTSPMountPoints; pub fn gst_rtsp_client_get_session_pool(client: *mut GstRTSPClient) -> *mut GstRTSPSessionPool; pub fn gst_rtsp_client_get_thread_pool(client: *mut GstRTSPClient) -> *mut GstRTSPThreadPool; - pub fn gst_rtsp_client_handle_message(client: *mut GstRTSPClient, message: *mut gst_rtsp::GstRTSPMessage) -> gst_rtsp::GstRTSPResult; - pub fn gst_rtsp_client_send_message(client: *mut GstRTSPClient, session: *mut GstRTSPSession, message: *mut gst_rtsp::GstRTSPMessage) -> gst_rtsp::GstRTSPResult; - pub fn gst_rtsp_client_session_filter(client: *mut GstRTSPClient, func: GstRTSPClientSessionFilterFunc, user_data: gpointer) -> *mut glib::GList; + pub fn gst_rtsp_client_handle_message( + client: *mut GstRTSPClient, + message: *mut gst_rtsp::GstRTSPMessage, + ) -> gst_rtsp::GstRTSPResult; + pub fn gst_rtsp_client_send_message( + client: *mut GstRTSPClient, + session: *mut GstRTSPSession, + message: *mut gst_rtsp::GstRTSPMessage, + ) -> gst_rtsp::GstRTSPResult; + pub fn gst_rtsp_client_session_filter( + client: *mut GstRTSPClient, + func: GstRTSPClientSessionFilterFunc, + user_data: gpointer, + ) -> *mut glib::GList; pub fn gst_rtsp_client_set_auth(client: *mut GstRTSPClient, auth: *mut GstRTSPAuth); - pub fn gst_rtsp_client_set_connection(client: *mut GstRTSPClient, conn: *mut gst_rtsp::GstRTSPConnection) -> gboolean; - pub fn gst_rtsp_client_set_mount_points(client: *mut GstRTSPClient, mounts: *mut GstRTSPMountPoints); - pub fn gst_rtsp_client_set_send_func(client: *mut GstRTSPClient, func: GstRTSPClientSendFunc, user_data: gpointer, notify: glib::GDestroyNotify); + pub fn gst_rtsp_client_set_connection( + client: *mut GstRTSPClient, + conn: *mut gst_rtsp::GstRTSPConnection, + ) -> gboolean; + pub fn gst_rtsp_client_set_mount_points( + client: *mut GstRTSPClient, + mounts: *mut GstRTSPMountPoints, + ); + pub fn gst_rtsp_client_set_send_func( + client: *mut GstRTSPClient, + func: GstRTSPClientSendFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_client_set_send_messages_func(client: *mut GstRTSPClient, func: GstRTSPClientSendMessagesFunc, user_data: gpointer, notify: glib::GDestroyNotify); - pub fn gst_rtsp_client_set_session_pool(client: *mut GstRTSPClient, pool: *mut GstRTSPSessionPool); - pub fn gst_rtsp_client_set_thread_pool(client: *mut GstRTSPClient, pool: *mut GstRTSPThreadPool); + pub fn gst_rtsp_client_set_send_messages_func( + client: *mut GstRTSPClient, + func: GstRTSPClientSendMessagesFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_rtsp_client_set_session_pool( + client: *mut GstRTSPClient, + pool: *mut GstRTSPSessionPool, + ); + pub fn gst_rtsp_client_set_thread_pool( + client: *mut GstRTSPClient, + pool: *mut GstRTSPThreadPool, + ); //========================================================================= // GstRTSPMedia @@ -1167,9 +1517,19 @@ extern "C" { pub fn gst_rtsp_media_new(element: *mut gst::GstElement) -> *mut GstRTSPMedia; pub fn gst_rtsp_media_collect_streams(media: *mut GstRTSPMedia); #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_media_complete_pipeline(media: *mut GstRTSPMedia, transports: *mut glib::GPtrArray) -> gboolean; - pub fn gst_rtsp_media_create_stream(media: *mut GstRTSPMedia, payloader: *mut gst::GstElement, pad: *mut gst::GstPad) -> *mut GstRTSPStream; - pub fn gst_rtsp_media_find_stream(media: *mut GstRTSPMedia, control: *const c_char) -> *mut GstRTSPStream; + pub fn gst_rtsp_media_complete_pipeline( + media: *mut GstRTSPMedia, + transports: *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_rtsp_media_create_stream( + media: *mut GstRTSPMedia, + payloader: *mut gst::GstElement, + pad: *mut gst::GstPad, + ) -> *mut GstRTSPStream; + pub fn gst_rtsp_media_find_stream( + media: *mut GstRTSPMedia, + control: *const c_char, + ) -> *mut GstRTSPStream; pub fn gst_rtsp_media_get_address_pool(media: *mut GstRTSPMedia) -> *mut GstRTSPAddressPool; pub fn gst_rtsp_media_get_base_time(media: *mut GstRTSPMedia) -> gst::GstClockTime; pub fn gst_rtsp_media_get_buffer_size(media: *mut GstRTSPMedia) -> c_uint; @@ -1185,15 +1545,28 @@ extern "C" { pub fn gst_rtsp_media_get_profiles(media: *mut GstRTSPMedia) -> gst_rtsp::GstRTSPProfile; pub fn gst_rtsp_media_get_protocols(media: *mut GstRTSPMedia) -> gst_rtsp::GstRTSPLowerTrans; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_rtsp_media_get_publish_clock_mode(media: *mut GstRTSPMedia) -> GstRTSPPublishClockMode; - pub fn gst_rtsp_media_get_range_string(media: *mut GstRTSPMedia, play: gboolean, unit: gst_rtsp::GstRTSPRangeUnit) -> *mut c_char; + pub fn gst_rtsp_media_get_publish_clock_mode( + media: *mut GstRTSPMedia, + ) -> GstRTSPPublishClockMode; + pub fn gst_rtsp_media_get_range_string( + media: *mut GstRTSPMedia, + play: gboolean, + unit: gst_rtsp::GstRTSPRangeUnit, + ) -> *mut c_char; pub fn gst_rtsp_media_get_retransmission_time(media: *mut GstRTSPMedia) -> gst::GstClockTime; pub fn gst_rtsp_media_get_status(media: *mut GstRTSPMedia) -> GstRTSPMediaStatus; pub fn gst_rtsp_media_get_stream(media: *mut GstRTSPMedia, idx: c_uint) -> *mut GstRTSPStream; pub fn gst_rtsp_media_get_suspend_mode(media: *mut GstRTSPMedia) -> GstRTSPSuspendMode; - pub fn gst_rtsp_media_get_time_provider(media: *mut GstRTSPMedia, address: *const c_char, port: u16) -> *mut gst_net::GstNetTimeProvider; + pub fn gst_rtsp_media_get_time_provider( + media: *mut GstRTSPMedia, + address: *const c_char, + port: u16, + ) -> *mut gst_net::GstNetTimeProvider; pub fn gst_rtsp_media_get_transport_mode(media: *mut GstRTSPMedia) -> GstRTSPTransportMode; - pub fn gst_rtsp_media_handle_sdp(media: *mut GstRTSPMedia, sdp: *mut gst_sdp::GstSDPMessage) -> gboolean; + pub fn gst_rtsp_media_handle_sdp( + media: *mut GstRTSPMedia, + sdp: *mut gst_sdp::GstSDPMessage, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_rtsp_media_is_bind_mcast_address(media: *mut GstRTSPMedia) -> gboolean; pub fn gst_rtsp_media_is_eos_shutdown(media: *mut GstRTSPMedia) -> gboolean; @@ -1202,38 +1575,81 @@ extern "C" { pub fn gst_rtsp_media_is_stop_on_disconnect(media: *mut GstRTSPMedia) -> gboolean; pub fn gst_rtsp_media_is_time_provider(media: *mut GstRTSPMedia) -> gboolean; pub fn gst_rtsp_media_n_streams(media: *mut GstRTSPMedia) -> c_uint; - pub fn gst_rtsp_media_prepare(media: *mut GstRTSPMedia, thread: *mut GstRTSPThread) -> gboolean; - pub fn gst_rtsp_media_seek(media: *mut GstRTSPMedia, range: *mut gst_rtsp::GstRTSPTimeRange) -> gboolean; + pub fn gst_rtsp_media_prepare(media: *mut GstRTSPMedia, thread: *mut GstRTSPThread) + -> gboolean; + pub fn gst_rtsp_media_seek( + media: *mut GstRTSPMedia, + range: *mut gst_rtsp::GstRTSPTimeRange, + ) -> gboolean; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_media_seek_full(media: *mut GstRTSPMedia, range: *mut gst_rtsp::GstRTSPTimeRange, flags: gst::GstSeekFlags) -> gboolean; + pub fn gst_rtsp_media_seek_full( + media: *mut GstRTSPMedia, + range: *mut gst_rtsp::GstRTSPTimeRange, + flags: gst::GstSeekFlags, + ) -> gboolean; #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_rtsp_media_seekable(media: *mut GstRTSPMedia) -> gst::GstClockTimeDiff; pub fn gst_rtsp_media_set_address_pool(media: *mut GstRTSPMedia, pool: *mut GstRTSPAddressPool); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_media_set_bind_mcast_address(media: *mut GstRTSPMedia, bind_mcast_addr: gboolean); + pub fn gst_rtsp_media_set_bind_mcast_address( + media: *mut GstRTSPMedia, + bind_mcast_addr: gboolean, + ); pub fn gst_rtsp_media_set_buffer_size(media: *mut GstRTSPMedia, size: c_uint); pub fn gst_rtsp_media_set_clock(media: *mut GstRTSPMedia, clock: *mut gst::GstClock); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_media_set_do_retransmission(media: *mut GstRTSPMedia, do_retransmission: gboolean); + pub fn gst_rtsp_media_set_do_retransmission( + media: *mut GstRTSPMedia, + do_retransmission: gboolean, + ); pub fn gst_rtsp_media_set_eos_shutdown(media: *mut GstRTSPMedia, eos_shutdown: gboolean); pub fn gst_rtsp_media_set_latency(media: *mut GstRTSPMedia, latency: c_uint); #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_rtsp_media_set_max_mcast_ttl(media: *mut GstRTSPMedia, ttl: c_uint) -> gboolean; - pub fn gst_rtsp_media_set_multicast_iface(media: *mut GstRTSPMedia, multicast_iface: *const c_char); - pub fn gst_rtsp_media_set_permissions(media: *mut GstRTSPMedia, permissions: *mut GstRTSPPermissions); + pub fn gst_rtsp_media_set_multicast_iface( + media: *mut GstRTSPMedia, + multicast_iface: *const c_char, + ); + pub fn gst_rtsp_media_set_permissions( + media: *mut GstRTSPMedia, + permissions: *mut GstRTSPPermissions, + ); pub fn gst_rtsp_media_set_pipeline_state(media: *mut GstRTSPMedia, state: gst::GstState); - pub fn gst_rtsp_media_set_profiles(media: *mut GstRTSPMedia, profiles: gst_rtsp::GstRTSPProfile); - pub fn gst_rtsp_media_set_protocols(media: *mut GstRTSPMedia, protocols: gst_rtsp::GstRTSPLowerTrans); + pub fn gst_rtsp_media_set_profiles( + media: *mut GstRTSPMedia, + profiles: gst_rtsp::GstRTSPProfile, + ); + pub fn gst_rtsp_media_set_protocols( + media: *mut GstRTSPMedia, + protocols: gst_rtsp::GstRTSPLowerTrans, + ); #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_rtsp_media_set_publish_clock_mode(media: *mut GstRTSPMedia, mode: GstRTSPPublishClockMode); - pub fn gst_rtsp_media_set_retransmission_time(media: *mut GstRTSPMedia, time: gst::GstClockTime); + pub fn gst_rtsp_media_set_publish_clock_mode( + media: *mut GstRTSPMedia, + mode: GstRTSPPublishClockMode, + ); + pub fn gst_rtsp_media_set_retransmission_time( + media: *mut GstRTSPMedia, + time: gst::GstClockTime, + ); pub fn gst_rtsp_media_set_reusable(media: *mut GstRTSPMedia, reusable: gboolean); pub fn gst_rtsp_media_set_shared(media: *mut GstRTSPMedia, shared: gboolean); - pub fn gst_rtsp_media_set_state(media: *mut GstRTSPMedia, state: gst::GstState, transports: *mut glib::GPtrArray) -> gboolean; - pub fn gst_rtsp_media_set_stop_on_disconnect(media: *mut GstRTSPMedia, stop_on_disconnect: gboolean); + pub fn gst_rtsp_media_set_state( + media: *mut GstRTSPMedia, + state: gst::GstState, + transports: *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_rtsp_media_set_stop_on_disconnect( + media: *mut GstRTSPMedia, + stop_on_disconnect: gboolean, + ); pub fn gst_rtsp_media_set_suspend_mode(media: *mut GstRTSPMedia, mode: GstRTSPSuspendMode); pub fn gst_rtsp_media_set_transport_mode(media: *mut GstRTSPMedia, mode: GstRTSPTransportMode); - pub fn gst_rtsp_media_setup_sdp(media: *mut GstRTSPMedia, sdp: *mut gst_sdp::GstSDPMessage, info: *mut GstSDPInfo) -> gboolean; + pub fn gst_rtsp_media_setup_sdp( + media: *mut GstRTSPMedia, + sdp: *mut gst_sdp::GstSDPMessage, + info: *mut GstSDPInfo, + ) -> gboolean; pub fn gst_rtsp_media_suspend(media: *mut GstRTSPMedia) -> gboolean; pub fn gst_rtsp_media_take_pipeline(media: *mut GstRTSPMedia, pipeline: *mut gst::GstPipeline); pub fn gst_rtsp_media_unprepare(media: *mut GstRTSPMedia) -> gboolean; @@ -1245,63 +1661,154 @@ extern "C" { //========================================================================= pub fn gst_rtsp_media_factory_get_type() -> GType; pub fn gst_rtsp_media_factory_new() -> *mut GstRTSPMediaFactory; - pub fn gst_rtsp_media_factory_add_role(factory: *mut GstRTSPMediaFactory, role: *const c_char, fieldname: *const c_char, ...); + pub fn gst_rtsp_media_factory_add_role( + factory: *mut GstRTSPMediaFactory, + role: *const c_char, + fieldname: *const c_char, + ... + ); #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_media_factory_add_role_from_structure(factory: *mut GstRTSPMediaFactory, structure: *mut gst::GstStructure); - pub fn gst_rtsp_media_factory_construct(factory: *mut GstRTSPMediaFactory, url: *const gst_rtsp::GstRTSPUrl) -> *mut GstRTSPMedia; - pub fn gst_rtsp_media_factory_create_element(factory: *mut GstRTSPMediaFactory, url: *const gst_rtsp::GstRTSPUrl) -> *mut gst::GstElement; - pub fn gst_rtsp_media_factory_get_address_pool(factory: *mut GstRTSPMediaFactory) -> *mut GstRTSPAddressPool; + pub fn gst_rtsp_media_factory_add_role_from_structure( + factory: *mut GstRTSPMediaFactory, + structure: *mut gst::GstStructure, + ); + pub fn gst_rtsp_media_factory_construct( + factory: *mut GstRTSPMediaFactory, + url: *const gst_rtsp::GstRTSPUrl, + ) -> *mut GstRTSPMedia; + pub fn gst_rtsp_media_factory_create_element( + factory: *mut GstRTSPMediaFactory, + url: *const gst_rtsp::GstRTSPUrl, + ) -> *mut gst::GstElement; + pub fn gst_rtsp_media_factory_get_address_pool( + factory: *mut GstRTSPMediaFactory, + ) -> *mut GstRTSPAddressPool; pub fn gst_rtsp_media_factory_get_buffer_size(factory: *mut GstRTSPMediaFactory) -> c_uint; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_rtsp_media_factory_get_clock(factory: *mut GstRTSPMediaFactory) -> *mut gst::GstClock; + pub fn gst_rtsp_media_factory_get_clock( + factory: *mut GstRTSPMediaFactory, + ) -> *mut gst::GstClock; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_media_factory_get_do_retransmission(factory: *mut GstRTSPMediaFactory) -> gboolean; + pub fn gst_rtsp_media_factory_get_do_retransmission( + factory: *mut GstRTSPMediaFactory, + ) -> gboolean; pub fn gst_rtsp_media_factory_get_latency(factory: *mut GstRTSPMediaFactory) -> c_uint; pub fn gst_rtsp_media_factory_get_launch(factory: *mut GstRTSPMediaFactory) -> *mut c_char; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_rtsp_media_factory_get_max_mcast_ttl(factory: *mut GstRTSPMediaFactory) -> c_uint; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_rtsp_media_factory_get_media_gtype(factory: *mut GstRTSPMediaFactory) -> GType; - pub fn gst_rtsp_media_factory_get_multicast_iface(factory: *mut GstRTSPMediaFactory) -> *mut c_char; - pub fn gst_rtsp_media_factory_get_permissions(factory: *mut GstRTSPMediaFactory) -> *mut GstRTSPPermissions; - pub fn gst_rtsp_media_factory_get_profiles(factory: *mut GstRTSPMediaFactory) -> gst_rtsp::GstRTSPProfile; - pub fn gst_rtsp_media_factory_get_protocols(factory: *mut GstRTSPMediaFactory) -> gst_rtsp::GstRTSPLowerTrans; + pub fn gst_rtsp_media_factory_get_multicast_iface( + factory: *mut GstRTSPMediaFactory, + ) -> *mut c_char; + pub fn gst_rtsp_media_factory_get_permissions( + factory: *mut GstRTSPMediaFactory, + ) -> *mut GstRTSPPermissions; + pub fn gst_rtsp_media_factory_get_profiles( + factory: *mut GstRTSPMediaFactory, + ) -> gst_rtsp::GstRTSPProfile; + pub fn gst_rtsp_media_factory_get_protocols( + factory: *mut GstRTSPMediaFactory, + ) -> gst_rtsp::GstRTSPLowerTrans; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_rtsp_media_factory_get_publish_clock_mode(factory: *mut GstRTSPMediaFactory) -> GstRTSPPublishClockMode; - pub fn gst_rtsp_media_factory_get_retransmission_time(factory: *mut GstRTSPMediaFactory) -> gst::GstClockTime; - pub fn gst_rtsp_media_factory_get_suspend_mode(factory: *mut GstRTSPMediaFactory) -> GstRTSPSuspendMode; - pub fn gst_rtsp_media_factory_get_transport_mode(factory: *mut GstRTSPMediaFactory) -> GstRTSPTransportMode; + pub fn gst_rtsp_media_factory_get_publish_clock_mode( + factory: *mut GstRTSPMediaFactory, + ) -> GstRTSPPublishClockMode; + pub fn gst_rtsp_media_factory_get_retransmission_time( + factory: *mut GstRTSPMediaFactory, + ) -> gst::GstClockTime; + pub fn gst_rtsp_media_factory_get_suspend_mode( + factory: *mut GstRTSPMediaFactory, + ) -> GstRTSPSuspendMode; + pub fn gst_rtsp_media_factory_get_transport_mode( + factory: *mut GstRTSPMediaFactory, + ) -> GstRTSPTransportMode; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_media_factory_is_bind_mcast_address(factory: *mut GstRTSPMediaFactory) -> gboolean; + pub fn gst_rtsp_media_factory_is_bind_mcast_address( + factory: *mut GstRTSPMediaFactory, + ) -> gboolean; pub fn gst_rtsp_media_factory_is_eos_shutdown(factory: *mut GstRTSPMediaFactory) -> gboolean; pub fn gst_rtsp_media_factory_is_shared(factory: *mut GstRTSPMediaFactory) -> gboolean; - pub fn gst_rtsp_media_factory_is_stop_on_disonnect(factory: *mut GstRTSPMediaFactory) -> gboolean; - pub fn gst_rtsp_media_factory_set_address_pool(factory: *mut GstRTSPMediaFactory, pool: *mut GstRTSPAddressPool); + pub fn gst_rtsp_media_factory_is_stop_on_disonnect( + factory: *mut GstRTSPMediaFactory, + ) -> gboolean; + pub fn gst_rtsp_media_factory_set_address_pool( + factory: *mut GstRTSPMediaFactory, + pool: *mut GstRTSPAddressPool, + ); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_media_factory_set_bind_mcast_address(factory: *mut GstRTSPMediaFactory, bind_mcast_addr: gboolean); + pub fn gst_rtsp_media_factory_set_bind_mcast_address( + factory: *mut GstRTSPMediaFactory, + bind_mcast_addr: gboolean, + ); pub fn gst_rtsp_media_factory_set_buffer_size(factory: *mut GstRTSPMediaFactory, size: c_uint); #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_rtsp_media_factory_set_clock(factory: *mut GstRTSPMediaFactory, clock: *mut gst::GstClock); + pub fn gst_rtsp_media_factory_set_clock( + factory: *mut GstRTSPMediaFactory, + clock: *mut gst::GstClock, + ); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_media_factory_set_do_retransmission(factory: *mut GstRTSPMediaFactory, do_retransmission: gboolean); - pub fn gst_rtsp_media_factory_set_eos_shutdown(factory: *mut GstRTSPMediaFactory, eos_shutdown: gboolean); + pub fn gst_rtsp_media_factory_set_do_retransmission( + factory: *mut GstRTSPMediaFactory, + do_retransmission: gboolean, + ); + pub fn gst_rtsp_media_factory_set_eos_shutdown( + factory: *mut GstRTSPMediaFactory, + eos_shutdown: gboolean, + ); pub fn gst_rtsp_media_factory_set_latency(factory: *mut GstRTSPMediaFactory, latency: c_uint); - pub fn gst_rtsp_media_factory_set_launch(factory: *mut GstRTSPMediaFactory, launch: *const c_char); + pub fn gst_rtsp_media_factory_set_launch( + factory: *mut GstRTSPMediaFactory, + launch: *const c_char, + ); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_media_factory_set_max_mcast_ttl(factory: *mut GstRTSPMediaFactory, ttl: c_uint) -> gboolean; + pub fn gst_rtsp_media_factory_set_max_mcast_ttl( + factory: *mut GstRTSPMediaFactory, + ttl: c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_rtsp_media_factory_set_media_gtype(factory: *mut GstRTSPMediaFactory, media_gtype: GType); - pub fn gst_rtsp_media_factory_set_multicast_iface(factory: *mut GstRTSPMediaFactory, multicast_iface: *const c_char); - pub fn gst_rtsp_media_factory_set_permissions(factory: *mut GstRTSPMediaFactory, permissions: *mut GstRTSPPermissions); - pub fn gst_rtsp_media_factory_set_profiles(factory: *mut GstRTSPMediaFactory, profiles: gst_rtsp::GstRTSPProfile); - pub fn gst_rtsp_media_factory_set_protocols(factory: *mut GstRTSPMediaFactory, protocols: gst_rtsp::GstRTSPLowerTrans); + pub fn gst_rtsp_media_factory_set_media_gtype( + factory: *mut GstRTSPMediaFactory, + media_gtype: GType, + ); + pub fn gst_rtsp_media_factory_set_multicast_iface( + factory: *mut GstRTSPMediaFactory, + multicast_iface: *const c_char, + ); + pub fn gst_rtsp_media_factory_set_permissions( + factory: *mut GstRTSPMediaFactory, + permissions: *mut GstRTSPPermissions, + ); + pub fn gst_rtsp_media_factory_set_profiles( + factory: *mut GstRTSPMediaFactory, + profiles: gst_rtsp::GstRTSPProfile, + ); + pub fn gst_rtsp_media_factory_set_protocols( + factory: *mut GstRTSPMediaFactory, + protocols: gst_rtsp::GstRTSPLowerTrans, + ); #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_rtsp_media_factory_set_publish_clock_mode(factory: *mut GstRTSPMediaFactory, mode: GstRTSPPublishClockMode); - pub fn gst_rtsp_media_factory_set_retransmission_time(factory: *mut GstRTSPMediaFactory, time: gst::GstClockTime); + pub fn gst_rtsp_media_factory_set_publish_clock_mode( + factory: *mut GstRTSPMediaFactory, + mode: GstRTSPPublishClockMode, + ); + pub fn gst_rtsp_media_factory_set_retransmission_time( + factory: *mut GstRTSPMediaFactory, + time: gst::GstClockTime, + ); pub fn gst_rtsp_media_factory_set_shared(factory: *mut GstRTSPMediaFactory, shared: gboolean); - pub fn gst_rtsp_media_factory_set_stop_on_disconnect(factory: *mut GstRTSPMediaFactory, stop_on_disconnect: gboolean); - pub fn gst_rtsp_media_factory_set_suspend_mode(factory: *mut GstRTSPMediaFactory, mode: GstRTSPSuspendMode); - pub fn gst_rtsp_media_factory_set_transport_mode(factory: *mut GstRTSPMediaFactory, mode: GstRTSPTransportMode); + pub fn gst_rtsp_media_factory_set_stop_on_disconnect( + factory: *mut GstRTSPMediaFactory, + stop_on_disconnect: gboolean, + ); + pub fn gst_rtsp_media_factory_set_suspend_mode( + factory: *mut GstRTSPMediaFactory, + mode: GstRTSPSuspendMode, + ); + pub fn gst_rtsp_media_factory_set_transport_mode( + factory: *mut GstRTSPMediaFactory, + mode: GstRTSPTransportMode, + ); //========================================================================= // GstRTSPMediaFactoryURI @@ -1309,17 +1816,34 @@ extern "C" { pub fn gst_rtsp_media_factory_uri_get_type() -> GType; pub fn gst_rtsp_media_factory_uri_new() -> *mut GstRTSPMediaFactoryURI; pub fn gst_rtsp_media_factory_uri_get_uri(factory: *mut GstRTSPMediaFactoryURI) -> *mut c_char; - pub fn gst_rtsp_media_factory_uri_set_uri(factory: *mut GstRTSPMediaFactoryURI, uri: *const c_char); + pub fn gst_rtsp_media_factory_uri_set_uri( + factory: *mut GstRTSPMediaFactoryURI, + uri: *const c_char, + ); //========================================================================= // GstRTSPMountPoints //========================================================================= pub fn gst_rtsp_mount_points_get_type() -> GType; pub fn gst_rtsp_mount_points_new() -> *mut GstRTSPMountPoints; - pub fn gst_rtsp_mount_points_add_factory(mounts: *mut GstRTSPMountPoints, path: *const c_char, factory: *mut GstRTSPMediaFactory); - pub fn gst_rtsp_mount_points_make_path(mounts: *mut GstRTSPMountPoints, url: *const gst_rtsp::GstRTSPUrl) -> *mut c_char; - pub fn gst_rtsp_mount_points_match(mounts: *mut GstRTSPMountPoints, path: *const c_char, matched: *mut c_int) -> *mut GstRTSPMediaFactory; - pub fn gst_rtsp_mount_points_remove_factory(mounts: *mut GstRTSPMountPoints, path: *const c_char); + pub fn gst_rtsp_mount_points_add_factory( + mounts: *mut GstRTSPMountPoints, + path: *const c_char, + factory: *mut GstRTSPMediaFactory, + ); + pub fn gst_rtsp_mount_points_make_path( + mounts: *mut GstRTSPMountPoints, + url: *const gst_rtsp::GstRTSPUrl, + ) -> *mut c_char; + pub fn gst_rtsp_mount_points_match( + mounts: *mut GstRTSPMountPoints, + path: *const c_char, + matched: *mut c_int, + ) -> *mut GstRTSPMediaFactory; + pub fn gst_rtsp_mount_points_remove_factory( + mounts: *mut GstRTSPMountPoints, + path: *const c_char, + ); //========================================================================= // GstRTSPOnvifClient @@ -1335,7 +1859,10 @@ extern "C" { #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_rtsp_onvif_media_get_backchannel_bandwidth(media: *mut GstRTSPOnvifMedia) -> c_uint; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_onvif_media_set_backchannel_bandwidth(media: *mut GstRTSPOnvifMedia, bandwidth: c_uint); + pub fn gst_rtsp_onvif_media_set_backchannel_bandwidth( + media: *mut GstRTSPOnvifMedia, + bandwidth: c_uint, + ); //========================================================================= // GstRTSPOnvifMediaFactory @@ -1344,17 +1871,32 @@ extern "C" { #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_rtsp_onvif_media_factory_new() -> *mut GstRTSPMediaFactory; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_onvif_media_factory_requires_backchannel(factory: *mut GstRTSPMediaFactory, ctx: *mut GstRTSPContext) -> gboolean; + pub fn gst_rtsp_onvif_media_factory_requires_backchannel( + factory: *mut GstRTSPMediaFactory, + ctx: *mut GstRTSPContext, + ) -> gboolean; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_onvif_media_factory_get_backchannel_bandwidth(factory: *mut GstRTSPOnvifMediaFactory) -> c_uint; + pub fn gst_rtsp_onvif_media_factory_get_backchannel_bandwidth( + factory: *mut GstRTSPOnvifMediaFactory, + ) -> c_uint; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_onvif_media_factory_get_backchannel_launch(factory: *mut GstRTSPOnvifMediaFactory) -> *mut c_char; + pub fn gst_rtsp_onvif_media_factory_get_backchannel_launch( + factory: *mut GstRTSPOnvifMediaFactory, + ) -> *mut c_char; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_onvif_media_factory_has_backchannel_support(factory: *mut GstRTSPOnvifMediaFactory) -> gboolean; + pub fn gst_rtsp_onvif_media_factory_has_backchannel_support( + factory: *mut GstRTSPOnvifMediaFactory, + ) -> gboolean; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_onvif_media_factory_set_backchannel_bandwidth(factory: *mut GstRTSPOnvifMediaFactory, bandwidth: c_uint); + pub fn gst_rtsp_onvif_media_factory_set_backchannel_bandwidth( + factory: *mut GstRTSPOnvifMediaFactory, + bandwidth: c_uint, + ); #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_onvif_media_factory_set_backchannel_launch(factory: *mut GstRTSPOnvifMediaFactory, launch: *const c_char); + pub fn gst_rtsp_onvif_media_factory_set_backchannel_launch( + factory: *mut GstRTSPOnvifMediaFactory, + launch: *const c_char, + ); //========================================================================= // GstRTSPOnvifServer @@ -1367,11 +1909,30 @@ extern "C" { //========================================================================= pub fn gst_rtsp_server_get_type() -> GType; pub fn gst_rtsp_server_new() -> *mut GstRTSPServer; - pub fn gst_rtsp_server_io_func(socket: *mut gio::GSocket, condition: glib::GIOCondition, server: *mut GstRTSPServer) -> gboolean; - pub fn gst_rtsp_server_attach(server: *mut GstRTSPServer, context: *mut glib::GMainContext) -> c_uint; - pub fn gst_rtsp_server_client_filter(server: *mut GstRTSPServer, func: GstRTSPServerClientFilterFunc, user_data: gpointer) -> *mut glib::GList; - pub fn gst_rtsp_server_create_socket(server: *mut GstRTSPServer, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut gio::GSocket; - pub fn gst_rtsp_server_create_source(server: *mut GstRTSPServer, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut glib::GSource; + pub fn gst_rtsp_server_io_func( + socket: *mut gio::GSocket, + condition: glib::GIOCondition, + server: *mut GstRTSPServer, + ) -> gboolean; + pub fn gst_rtsp_server_attach( + server: *mut GstRTSPServer, + context: *mut glib::GMainContext, + ) -> c_uint; + pub fn gst_rtsp_server_client_filter( + server: *mut GstRTSPServer, + func: GstRTSPServerClientFilterFunc, + user_data: gpointer, + ) -> *mut glib::GList; + pub fn gst_rtsp_server_create_socket( + server: *mut GstRTSPServer, + cancellable: *mut gio::GCancellable, + error: *mut *mut glib::GError, + ) -> *mut gio::GSocket; + pub fn gst_rtsp_server_create_source( + server: *mut GstRTSPServer, + cancellable: *mut gio::GCancellable, + error: *mut *mut glib::GError, + ) -> *mut glib::GSource; pub fn gst_rtsp_server_get_address(server: *mut GstRTSPServer) -> *mut c_char; pub fn gst_rtsp_server_get_auth(server: *mut GstRTSPServer) -> *mut GstRTSPAuth; pub fn gst_rtsp_server_get_backlog(server: *mut GstRTSPServer) -> c_int; @@ -1383,11 +1944,26 @@ extern "C" { pub fn gst_rtsp_server_set_address(server: *mut GstRTSPServer, address: *const c_char); pub fn gst_rtsp_server_set_auth(server: *mut GstRTSPServer, auth: *mut GstRTSPAuth); pub fn gst_rtsp_server_set_backlog(server: *mut GstRTSPServer, backlog: c_int); - pub fn gst_rtsp_server_set_mount_points(server: *mut GstRTSPServer, mounts: *mut GstRTSPMountPoints); + pub fn gst_rtsp_server_set_mount_points( + server: *mut GstRTSPServer, + mounts: *mut GstRTSPMountPoints, + ); pub fn gst_rtsp_server_set_service(server: *mut GstRTSPServer, service: *const c_char); - pub fn gst_rtsp_server_set_session_pool(server: *mut GstRTSPServer, pool: *mut GstRTSPSessionPool); - pub fn gst_rtsp_server_set_thread_pool(server: *mut GstRTSPServer, pool: *mut GstRTSPThreadPool); - pub fn gst_rtsp_server_transfer_connection(server: *mut GstRTSPServer, socket: *mut gio::GSocket, ip: *const c_char, port: c_int, initial_buffer: *const c_char) -> gboolean; + pub fn gst_rtsp_server_set_session_pool( + server: *mut GstRTSPServer, + pool: *mut GstRTSPSessionPool, + ); + pub fn gst_rtsp_server_set_thread_pool( + server: *mut GstRTSPServer, + pool: *mut GstRTSPThreadPool, + ); + pub fn gst_rtsp_server_transfer_connection( + server: *mut GstRTSPServer, + socket: *mut gio::GSocket, + ip: *const c_char, + port: c_int, + initial_buffer: *const c_char, + ) -> gboolean; //========================================================================= // GstRTSPSession @@ -1395,18 +1971,39 @@ extern "C" { pub fn gst_rtsp_session_get_type() -> GType; pub fn gst_rtsp_session_new(sessionid: *const c_char) -> *mut GstRTSPSession; pub fn gst_rtsp_session_allow_expire(session: *mut GstRTSPSession); - pub fn gst_rtsp_session_filter(sess: *mut GstRTSPSession, func: GstRTSPSessionFilterFunc, user_data: gpointer) -> *mut glib::GList; + pub fn gst_rtsp_session_filter( + sess: *mut GstRTSPSession, + func: GstRTSPSessionFilterFunc, + user_data: gpointer, + ) -> *mut glib::GList; pub fn gst_rtsp_session_get_header(session: *mut GstRTSPSession) -> *mut c_char; - pub fn gst_rtsp_session_get_media(sess: *mut GstRTSPSession, path: *const c_char, matched: *mut c_int) -> *mut GstRTSPSessionMedia; + pub fn gst_rtsp_session_get_media( + sess: *mut GstRTSPSession, + path: *const c_char, + matched: *mut c_int, + ) -> *mut GstRTSPSessionMedia; pub fn gst_rtsp_session_get_sessionid(session: *mut GstRTSPSession) -> *const c_char; pub fn gst_rtsp_session_get_timeout(session: *mut GstRTSPSession) -> c_uint; - pub fn gst_rtsp_session_is_expired(session: *mut GstRTSPSession, now: *mut glib::GTimeVal) -> gboolean; + pub fn gst_rtsp_session_is_expired( + session: *mut GstRTSPSession, + now: *mut glib::GTimeVal, + ) -> gboolean; pub fn gst_rtsp_session_is_expired_usec(session: *mut GstRTSPSession, now: i64) -> gboolean; - pub fn gst_rtsp_session_manage_media(sess: *mut GstRTSPSession, path: *const c_char, media: *mut GstRTSPMedia) -> *mut GstRTSPSessionMedia; - pub fn gst_rtsp_session_next_timeout(session: *mut GstRTSPSession, now: *mut glib::GTimeVal) -> c_int; + pub fn gst_rtsp_session_manage_media( + sess: *mut GstRTSPSession, + path: *const c_char, + media: *mut GstRTSPMedia, + ) -> *mut GstRTSPSessionMedia; + pub fn gst_rtsp_session_next_timeout( + session: *mut GstRTSPSession, + now: *mut glib::GTimeVal, + ) -> c_int; pub fn gst_rtsp_session_next_timeout_usec(session: *mut GstRTSPSession, now: i64) -> c_int; pub fn gst_rtsp_session_prevent_expire(session: *mut GstRTSPSession); - pub fn gst_rtsp_session_release_media(sess: *mut GstRTSPSession, media: *mut GstRTSPSessionMedia) -> gboolean; + pub fn gst_rtsp_session_release_media( + sess: *mut GstRTSPSession, + media: *mut GstRTSPSessionMedia, + ) -> gboolean; pub fn gst_rtsp_session_set_timeout(session: *mut GstRTSPSession, timeout: c_uint); pub fn gst_rtsp_session_touch(session: *mut GstRTSPSession); @@ -1414,19 +2011,48 @@ extern "C" { // GstRTSPSessionMedia //========================================================================= pub fn gst_rtsp_session_media_get_type() -> GType; - pub fn gst_rtsp_session_media_new(path: *const c_char, media: *mut GstRTSPMedia) -> *mut GstRTSPSessionMedia; - pub fn gst_rtsp_session_media_alloc_channels(media: *mut GstRTSPSessionMedia, range: *mut gst_rtsp::GstRTSPRange) -> gboolean; - pub fn gst_rtsp_session_media_get_base_time(media: *mut GstRTSPSessionMedia) -> gst::GstClockTime; + pub fn gst_rtsp_session_media_new( + path: *const c_char, + media: *mut GstRTSPMedia, + ) -> *mut GstRTSPSessionMedia; + pub fn gst_rtsp_session_media_alloc_channels( + media: *mut GstRTSPSessionMedia, + range: *mut gst_rtsp::GstRTSPRange, + ) -> gboolean; + pub fn gst_rtsp_session_media_get_base_time( + media: *mut GstRTSPSessionMedia, + ) -> gst::GstClockTime; pub fn gst_rtsp_session_media_get_media(media: *mut GstRTSPSessionMedia) -> *mut GstRTSPMedia; pub fn gst_rtsp_session_media_get_rtpinfo(media: *mut GstRTSPSessionMedia) -> *mut c_char; - pub fn gst_rtsp_session_media_get_rtsp_state(media: *mut GstRTSPSessionMedia) -> gst_rtsp::GstRTSPState; - pub fn gst_rtsp_session_media_get_transport(media: *mut GstRTSPSessionMedia, idx: c_uint) -> *mut GstRTSPStreamTransport; + pub fn gst_rtsp_session_media_get_rtsp_state( + media: *mut GstRTSPSessionMedia, + ) -> gst_rtsp::GstRTSPState; + pub fn gst_rtsp_session_media_get_transport( + media: *mut GstRTSPSessionMedia, + idx: c_uint, + ) -> *mut GstRTSPStreamTransport; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_session_media_get_transports(media: *mut GstRTSPSessionMedia) -> *mut glib::GPtrArray; - pub fn gst_rtsp_session_media_matches(media: *mut GstRTSPSessionMedia, path: *const c_char, matched: *mut c_int) -> gboolean; - pub fn gst_rtsp_session_media_set_rtsp_state(media: *mut GstRTSPSessionMedia, state: gst_rtsp::GstRTSPState); - pub fn gst_rtsp_session_media_set_state(media: *mut GstRTSPSessionMedia, state: gst::GstState) -> gboolean; - pub fn gst_rtsp_session_media_set_transport(media: *mut GstRTSPSessionMedia, stream: *mut GstRTSPStream, tr: *mut gst_rtsp::GstRTSPTransport) -> *mut GstRTSPStreamTransport; + pub fn gst_rtsp_session_media_get_transports( + media: *mut GstRTSPSessionMedia, + ) -> *mut glib::GPtrArray; + pub fn gst_rtsp_session_media_matches( + media: *mut GstRTSPSessionMedia, + path: *const c_char, + matched: *mut c_int, + ) -> gboolean; + pub fn gst_rtsp_session_media_set_rtsp_state( + media: *mut GstRTSPSessionMedia, + state: gst_rtsp::GstRTSPState, + ); + pub fn gst_rtsp_session_media_set_state( + media: *mut GstRTSPSessionMedia, + state: gst::GstState, + ) -> gboolean; + pub fn gst_rtsp_session_media_set_transport( + media: *mut GstRTSPSessionMedia, + stream: *mut GstRTSPStream, + tr: *mut gst_rtsp::GstRTSPTransport, + ) -> *mut GstRTSPStreamTransport; //========================================================================= // GstRTSPSessionPool @@ -1436,24 +2062,55 @@ extern "C" { pub fn gst_rtsp_session_pool_cleanup(pool: *mut GstRTSPSessionPool) -> c_uint; pub fn gst_rtsp_session_pool_create(pool: *mut GstRTSPSessionPool) -> *mut GstRTSPSession; pub fn gst_rtsp_session_pool_create_watch(pool: *mut GstRTSPSessionPool) -> *mut glib::GSource; - pub fn gst_rtsp_session_pool_filter(pool: *mut GstRTSPSessionPool, func: GstRTSPSessionPoolFilterFunc, user_data: gpointer) -> *mut glib::GList; - pub fn gst_rtsp_session_pool_find(pool: *mut GstRTSPSessionPool, sessionid: *const c_char) -> *mut GstRTSPSession; + pub fn gst_rtsp_session_pool_filter( + pool: *mut GstRTSPSessionPool, + func: GstRTSPSessionPoolFilterFunc, + user_data: gpointer, + ) -> *mut glib::GList; + pub fn gst_rtsp_session_pool_find( + pool: *mut GstRTSPSessionPool, + sessionid: *const c_char, + ) -> *mut GstRTSPSession; pub fn gst_rtsp_session_pool_get_max_sessions(pool: *mut GstRTSPSessionPool) -> c_uint; pub fn gst_rtsp_session_pool_get_n_sessions(pool: *mut GstRTSPSessionPool) -> c_uint; - pub fn gst_rtsp_session_pool_remove(pool: *mut GstRTSPSessionPool, sess: *mut GstRTSPSession) -> gboolean; + pub fn gst_rtsp_session_pool_remove( + pool: *mut GstRTSPSessionPool, + sess: *mut GstRTSPSession, + ) -> gboolean; pub fn gst_rtsp_session_pool_set_max_sessions(pool: *mut GstRTSPSessionPool, max: c_uint); //========================================================================= // GstRTSPStream //========================================================================= pub fn gst_rtsp_stream_get_type() -> GType; - pub fn gst_rtsp_stream_new(idx: c_uint, payloader: *mut gst::GstElement, pad: *mut gst::GstPad) -> *mut GstRTSPStream; + pub fn gst_rtsp_stream_new( + idx: c_uint, + payloader: *mut gst::GstElement, + pad: *mut gst::GstPad, + ) -> *mut GstRTSPStream; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_stream_add_multicast_client_address(stream: *mut GstRTSPStream, destination: *const c_char, rtp_port: c_uint, rtcp_port: c_uint, family: gio::GSocketFamily) -> gboolean; - pub fn gst_rtsp_stream_add_transport(stream: *mut GstRTSPStream, trans: *mut GstRTSPStreamTransport) -> gboolean; - pub fn gst_rtsp_stream_allocate_udp_sockets(stream: *mut GstRTSPStream, family: gio::GSocketFamily, transport: *mut gst_rtsp::GstRTSPTransport, use_client_settings: gboolean) -> gboolean; + pub fn gst_rtsp_stream_add_multicast_client_address( + stream: *mut GstRTSPStream, + destination: *const c_char, + rtp_port: c_uint, + rtcp_port: c_uint, + family: gio::GSocketFamily, + ) -> gboolean; + pub fn gst_rtsp_stream_add_transport( + stream: *mut GstRTSPStream, + trans: *mut GstRTSPStreamTransport, + ) -> gboolean; + pub fn gst_rtsp_stream_allocate_udp_sockets( + stream: *mut GstRTSPStream, + family: gio::GSocketFamily, + transport: *mut gst_rtsp::GstRTSPTransport, + use_client_settings: gboolean, + ) -> gboolean; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_stream_complete_stream(stream: *mut GstRTSPStream, transport: *const gst_rtsp::GstRTSPTransport) -> gboolean; + pub fn gst_rtsp_stream_complete_stream( + stream: *mut GstRTSPStream, + transport: *const gst_rtsp::GstRTSPTransport, + ) -> gboolean; pub fn gst_rtsp_stream_get_address_pool(stream: *mut GstRTSPStream) -> *mut GstRTSPAddressPool; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_rtsp_stream_get_buffer_size(stream: *mut GstRTSPStream) -> c_uint; @@ -1466,25 +2123,56 @@ extern "C" { #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_rtsp_stream_get_max_mcast_ttl(stream: *mut GstRTSPStream) -> c_uint; pub fn gst_rtsp_stream_get_mtu(stream: *mut GstRTSPStream) -> c_uint; - pub fn gst_rtsp_stream_get_multicast_address(stream: *mut GstRTSPStream, family: gio::GSocketFamily) -> *mut GstRTSPAddress; + pub fn gst_rtsp_stream_get_multicast_address( + stream: *mut GstRTSPStream, + family: gio::GSocketFamily, + ) -> *mut GstRTSPAddress; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_stream_get_multicast_client_addresses(stream: *mut GstRTSPStream) -> *mut c_char; + pub fn gst_rtsp_stream_get_multicast_client_addresses( + stream: *mut GstRTSPStream, + ) -> *mut c_char; pub fn gst_rtsp_stream_get_multicast_iface(stream: *mut GstRTSPStream) -> *mut c_char; pub fn gst_rtsp_stream_get_profiles(stream: *mut GstRTSPStream) -> gst_rtsp::GstRTSPProfile; - pub fn gst_rtsp_stream_get_protocols(stream: *mut GstRTSPStream) -> gst_rtsp::GstRTSPLowerTrans; + pub fn gst_rtsp_stream_get_protocols(stream: *mut GstRTSPStream) + -> gst_rtsp::GstRTSPLowerTrans; pub fn gst_rtsp_stream_get_pt(stream: *mut GstRTSPStream) -> c_uint; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_rtsp_stream_get_publish_clock_mode(stream: *mut GstRTSPStream) -> GstRTSPPublishClockMode; + pub fn gst_rtsp_stream_get_publish_clock_mode( + stream: *mut GstRTSPStream, + ) -> GstRTSPPublishClockMode; pub fn gst_rtsp_stream_get_retransmission_pt(stream: *mut GstRTSPStream) -> c_uint; - pub fn gst_rtsp_stream_get_retransmission_time(stream: *mut GstRTSPStream) -> gst::GstClockTime; + pub fn gst_rtsp_stream_get_retransmission_time(stream: *mut GstRTSPStream) + -> gst::GstClockTime; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_stream_get_rtcp_multicast_socket(stream: *mut GstRTSPStream, family: gio::GSocketFamily) -> *mut gio::GSocket; - pub fn gst_rtsp_stream_get_rtcp_socket(stream: *mut GstRTSPStream, family: gio::GSocketFamily) -> *mut gio::GSocket; - pub fn gst_rtsp_stream_get_rtp_multicast_socket(stream: *mut GstRTSPStream, family: gio::GSocketFamily) -> *mut gio::GSocket; - pub fn gst_rtsp_stream_get_rtp_socket(stream: *mut GstRTSPStream, family: gio::GSocketFamily) -> *mut gio::GSocket; - pub fn gst_rtsp_stream_get_rtpinfo(stream: *mut GstRTSPStream, rtptime: *mut c_uint, seq: *mut c_uint, clock_rate: *mut c_uint, running_time: *mut gst::GstClockTime) -> gboolean; + pub fn gst_rtsp_stream_get_rtcp_multicast_socket( + stream: *mut GstRTSPStream, + family: gio::GSocketFamily, + ) -> *mut gio::GSocket; + pub fn gst_rtsp_stream_get_rtcp_socket( + stream: *mut GstRTSPStream, + family: gio::GSocketFamily, + ) -> *mut gio::GSocket; + pub fn gst_rtsp_stream_get_rtp_multicast_socket( + stream: *mut GstRTSPStream, + family: gio::GSocketFamily, + ) -> *mut gio::GSocket; + pub fn gst_rtsp_stream_get_rtp_socket( + stream: *mut GstRTSPStream, + family: gio::GSocketFamily, + ) -> *mut gio::GSocket; + pub fn gst_rtsp_stream_get_rtpinfo( + stream: *mut GstRTSPStream, + rtptime: *mut c_uint, + seq: *mut c_uint, + clock_rate: *mut c_uint, + running_time: *mut gst::GstClockTime, + ) -> gboolean; pub fn gst_rtsp_stream_get_rtpsession(stream: *mut GstRTSPStream) -> *mut gobject::GObject; - pub fn gst_rtsp_stream_get_server_port(stream: *mut GstRTSPStream, server_port: *mut gst_rtsp::GstRTSPRange, family: gio::GSocketFamily); + pub fn gst_rtsp_stream_get_server_port( + stream: *mut GstRTSPStream, + server_port: *mut gst_rtsp::GstRTSPRange, + family: gio::GSocketFamily, + ); pub fn gst_rtsp_stream_get_sinkpad(stream: *mut GstRTSPStream) -> *mut gst::GstPad; pub fn gst_rtsp_stream_get_srcpad(stream: *mut GstRTSPStream) -> *mut gst::GstPad; pub fn gst_rtsp_stream_get_srtp_encoder(stream: *mut GstRTSPStream) -> *mut gst::GstElement; @@ -1495,8 +2183,14 @@ extern "C" { #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_rtsp_stream_get_ulpfec_pt(stream: *mut GstRTSPStream) -> c_uint; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_stream_handle_keymgmt(stream: *mut GstRTSPStream, keymgmt: *const c_char) -> gboolean; - pub fn gst_rtsp_stream_has_control(stream: *mut GstRTSPStream, control: *const c_char) -> gboolean; + pub fn gst_rtsp_stream_handle_keymgmt( + stream: *mut GstRTSPStream, + keymgmt: *const c_char, + ) -> gboolean; + pub fn gst_rtsp_stream_has_control( + stream: *mut GstRTSPStream, + control: *const c_char, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_rtsp_stream_is_bind_mcast_address(stream: *mut GstRTSPStream) -> gboolean; pub fn gst_rtsp_stream_is_blocking(stream: *mut GstRTSPStream) -> gboolean; @@ -1507,28 +2201,77 @@ extern "C" { pub fn gst_rtsp_stream_is_receiver(stream: *mut GstRTSPStream) -> gboolean; #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_rtsp_stream_is_sender(stream: *mut GstRTSPStream) -> gboolean; - pub fn gst_rtsp_stream_is_transport_supported(stream: *mut GstRTSPStream, transport: *mut gst_rtsp::GstRTSPTransport) -> gboolean; - pub fn gst_rtsp_stream_join_bin(stream: *mut GstRTSPStream, bin: *mut gst::GstBin, rtpbin: *mut gst::GstElement, state: gst::GstState) -> gboolean; - pub fn gst_rtsp_stream_leave_bin(stream: *mut GstRTSPStream, bin: *mut gst::GstBin, rtpbin: *mut gst::GstElement) -> gboolean; - pub fn gst_rtsp_stream_query_position(stream: *mut GstRTSPStream, position: *mut i64) -> gboolean; + pub fn gst_rtsp_stream_is_transport_supported( + stream: *mut GstRTSPStream, + transport: *mut gst_rtsp::GstRTSPTransport, + ) -> gboolean; + pub fn gst_rtsp_stream_join_bin( + stream: *mut GstRTSPStream, + bin: *mut gst::GstBin, + rtpbin: *mut gst::GstElement, + state: gst::GstState, + ) -> gboolean; + pub fn gst_rtsp_stream_leave_bin( + stream: *mut GstRTSPStream, + bin: *mut gst::GstBin, + rtpbin: *mut gst::GstElement, + ) -> gboolean; + pub fn gst_rtsp_stream_query_position( + stream: *mut GstRTSPStream, + position: *mut i64, + ) -> gboolean; pub fn gst_rtsp_stream_query_stop(stream: *mut GstRTSPStream, stop: *mut i64) -> gboolean; - pub fn gst_rtsp_stream_recv_rtcp(stream: *mut GstRTSPStream, buffer: *mut gst::GstBuffer) -> gst::GstFlowReturn; - pub fn gst_rtsp_stream_recv_rtp(stream: *mut GstRTSPStream, buffer: *mut gst::GstBuffer) -> gst::GstFlowReturn; - pub fn gst_rtsp_stream_remove_transport(stream: *mut GstRTSPStream, trans: *mut GstRTSPStreamTransport) -> gboolean; + pub fn gst_rtsp_stream_recv_rtcp( + stream: *mut GstRTSPStream, + buffer: *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; + pub fn gst_rtsp_stream_recv_rtp( + stream: *mut GstRTSPStream, + buffer: *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; + pub fn gst_rtsp_stream_remove_transport( + stream: *mut GstRTSPStream, + trans: *mut GstRTSPStreamTransport, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_stream_request_aux_receiver(stream: *mut GstRTSPStream, sessid: c_uint) -> *mut gst::GstElement; + pub fn gst_rtsp_stream_request_aux_receiver( + stream: *mut GstRTSPStream, + sessid: c_uint, + ) -> *mut gst::GstElement; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_rtsp_stream_request_aux_sender(stream: *mut GstRTSPStream, sessid: c_uint) -> *mut gst::GstElement; + pub fn gst_rtsp_stream_request_aux_sender( + stream: *mut GstRTSPStream, + sessid: c_uint, + ) -> *mut gst::GstElement; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_stream_request_ulpfec_decoder(stream: *mut GstRTSPStream, rtpbin: *mut gst::GstElement, sessid: c_uint) -> *mut gst::GstElement; + pub fn gst_rtsp_stream_request_ulpfec_decoder( + stream: *mut GstRTSPStream, + rtpbin: *mut gst::GstElement, + sessid: c_uint, + ) -> *mut gst::GstElement; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_stream_request_ulpfec_encoder(stream: *mut GstRTSPStream, sessid: c_uint) -> *mut gst::GstElement; - pub fn gst_rtsp_stream_reserve_address(stream: *mut GstRTSPStream, address: *const c_char, port: c_uint, n_ports: c_uint, ttl: c_uint) -> *mut GstRTSPAddress; + pub fn gst_rtsp_stream_request_ulpfec_encoder( + stream: *mut GstRTSPStream, + sessid: c_uint, + ) -> *mut gst::GstElement; + pub fn gst_rtsp_stream_reserve_address( + stream: *mut GstRTSPStream, + address: *const c_char, + port: c_uint, + n_ports: c_uint, + ttl: c_uint, + ) -> *mut GstRTSPAddress; #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_rtsp_stream_seekable(stream: *mut GstRTSPStream) -> gboolean; - pub fn gst_rtsp_stream_set_address_pool(stream: *mut GstRTSPStream, pool: *mut GstRTSPAddressPool); + pub fn gst_rtsp_stream_set_address_pool( + stream: *mut GstRTSPStream, + pool: *mut GstRTSPAddressPool, + ); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_stream_set_bind_mcast_address(stream: *mut GstRTSPStream, bind_mcast_addr: gboolean); + pub fn gst_rtsp_stream_set_bind_mcast_address( + stream: *mut GstRTSPStream, + bind_mcast_addr: gboolean, + ); pub fn gst_rtsp_stream_set_blocked(stream: *mut GstRTSPStream, blocked: gboolean) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_rtsp_stream_set_buffer_size(stream: *mut GstRTSPStream, size: c_uint); @@ -1538,22 +2281,49 @@ extern "C" { #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_rtsp_stream_set_max_mcast_ttl(stream: *mut GstRTSPStream, ttl: c_uint) -> gboolean; pub fn gst_rtsp_stream_set_mtu(stream: *mut GstRTSPStream, mtu: c_uint); - pub fn gst_rtsp_stream_set_multicast_iface(stream: *mut GstRTSPStream, multicast_iface: *const c_char); - pub fn gst_rtsp_stream_set_profiles(stream: *mut GstRTSPStream, profiles: gst_rtsp::GstRTSPProfile); - pub fn gst_rtsp_stream_set_protocols(stream: *mut GstRTSPStream, protocols: gst_rtsp::GstRTSPLowerTrans); - pub fn gst_rtsp_stream_set_pt_map(stream: *mut GstRTSPStream, pt: c_uint, caps: *mut gst::GstCaps); + pub fn gst_rtsp_stream_set_multicast_iface( + stream: *mut GstRTSPStream, + multicast_iface: *const c_char, + ); + pub fn gst_rtsp_stream_set_profiles( + stream: *mut GstRTSPStream, + profiles: gst_rtsp::GstRTSPProfile, + ); + pub fn gst_rtsp_stream_set_protocols( + stream: *mut GstRTSPStream, + protocols: gst_rtsp::GstRTSPLowerTrans, + ); + pub fn gst_rtsp_stream_set_pt_map( + stream: *mut GstRTSPStream, + pt: c_uint, + caps: *mut gst::GstCaps, + ); #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_rtsp_stream_set_publish_clock_mode(stream: *mut GstRTSPStream, mode: GstRTSPPublishClockMode); + pub fn gst_rtsp_stream_set_publish_clock_mode( + stream: *mut GstRTSPStream, + mode: GstRTSPPublishClockMode, + ); pub fn gst_rtsp_stream_set_retransmission_pt(stream: *mut GstRTSPStream, rtx_pt: c_uint); - pub fn gst_rtsp_stream_set_retransmission_time(stream: *mut GstRTSPStream, time: gst::GstClockTime); + pub fn gst_rtsp_stream_set_retransmission_time( + stream: *mut GstRTSPStream, + time: gst::GstClockTime, + ); pub fn gst_rtsp_stream_set_seqnum_offset(stream: *mut GstRTSPStream, seqnum: u16); #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_rtsp_stream_set_ulpfec_percentage(stream: *mut GstRTSPStream, percentage: c_uint); #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_rtsp_stream_set_ulpfec_pt(stream: *mut GstRTSPStream, pt: c_uint); - pub fn gst_rtsp_stream_transport_filter(stream: *mut GstRTSPStream, func: GstRTSPStreamTransportFilterFunc, user_data: gpointer) -> *mut glib::GList; + pub fn gst_rtsp_stream_transport_filter( + stream: *mut GstRTSPStream, + func: GstRTSPStreamTransportFilterFunc, + user_data: gpointer, + ) -> *mut glib::GList; pub fn gst_rtsp_stream_unblock_linked(stream: *mut GstRTSPStream) -> gboolean; - pub fn gst_rtsp_stream_update_crypto(stream: *mut GstRTSPStream, ssrc: c_uint, crypto: *mut gst::GstCaps) -> gboolean; + pub fn gst_rtsp_stream_update_crypto( + stream: *mut GstRTSPStream, + ssrc: c_uint, + crypto: *mut gst::GstCaps, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_rtsp_stream_verify_mcast_ttl(stream: *mut GstRTSPStream, ttl: c_uint) -> gboolean; @@ -1561,31 +2331,93 @@ extern "C" { // GstRTSPStreamTransport //========================================================================= pub fn gst_rtsp_stream_transport_get_type() -> GType; - pub fn gst_rtsp_stream_transport_new(stream: *mut GstRTSPStream, tr: *mut gst_rtsp::GstRTSPTransport) -> *mut GstRTSPStreamTransport; - pub fn gst_rtsp_stream_transport_get_rtpinfo(trans: *mut GstRTSPStreamTransport, start_time: gst::GstClockTime) -> *mut c_char; - pub fn gst_rtsp_stream_transport_get_stream(trans: *mut GstRTSPStreamTransport) -> *mut GstRTSPStream; - pub fn gst_rtsp_stream_transport_get_transport(trans: *mut GstRTSPStreamTransport) -> *const gst_rtsp::GstRTSPTransport; - pub fn gst_rtsp_stream_transport_get_url(trans: *mut GstRTSPStreamTransport) -> *const gst_rtsp::GstRTSPUrl; + pub fn gst_rtsp_stream_transport_new( + stream: *mut GstRTSPStream, + tr: *mut gst_rtsp::GstRTSPTransport, + ) -> *mut GstRTSPStreamTransport; + pub fn gst_rtsp_stream_transport_get_rtpinfo( + trans: *mut GstRTSPStreamTransport, + start_time: gst::GstClockTime, + ) -> *mut c_char; + pub fn gst_rtsp_stream_transport_get_stream( + trans: *mut GstRTSPStreamTransport, + ) -> *mut GstRTSPStream; + pub fn gst_rtsp_stream_transport_get_transport( + trans: *mut GstRTSPStreamTransport, + ) -> *const gst_rtsp::GstRTSPTransport; + pub fn gst_rtsp_stream_transport_get_url( + trans: *mut GstRTSPStreamTransport, + ) -> *const gst_rtsp::GstRTSPUrl; pub fn gst_rtsp_stream_transport_is_timed_out(trans: *mut GstRTSPStreamTransport) -> gboolean; pub fn gst_rtsp_stream_transport_keep_alive(trans: *mut GstRTSPStreamTransport); #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_rtsp_stream_transport_message_sent(trans: *mut GstRTSPStreamTransport); - pub fn gst_rtsp_stream_transport_recv_data(trans: *mut GstRTSPStreamTransport, channel: c_uint, buffer: *mut gst::GstBuffer) -> gst::GstFlowReturn; - pub fn gst_rtsp_stream_transport_send_rtcp(trans: *mut GstRTSPStreamTransport, buffer: *mut gst::GstBuffer) -> gboolean; + pub fn gst_rtsp_stream_transport_recv_data( + trans: *mut GstRTSPStreamTransport, + channel: c_uint, + buffer: *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; + pub fn gst_rtsp_stream_transport_send_rtcp( + trans: *mut GstRTSPStreamTransport, + buffer: *mut gst::GstBuffer, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_stream_transport_send_rtcp_list(trans: *mut GstRTSPStreamTransport, buffer_list: *mut gst::GstBufferList) -> gboolean; - pub fn gst_rtsp_stream_transport_send_rtp(trans: *mut GstRTSPStreamTransport, buffer: *mut gst::GstBuffer) -> gboolean; + pub fn gst_rtsp_stream_transport_send_rtcp_list( + trans: *mut GstRTSPStreamTransport, + buffer_list: *mut gst::GstBufferList, + ) -> gboolean; + pub fn gst_rtsp_stream_transport_send_rtp( + trans: *mut GstRTSPStreamTransport, + buffer: *mut gst::GstBuffer, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_stream_transport_send_rtp_list(trans: *mut GstRTSPStreamTransport, buffer_list: *mut gst::GstBufferList) -> gboolean; - pub fn gst_rtsp_stream_transport_set_active(trans: *mut GstRTSPStreamTransport, active: gboolean) -> gboolean; - pub fn gst_rtsp_stream_transport_set_callbacks(trans: *mut GstRTSPStreamTransport, send_rtp: GstRTSPSendFunc, send_rtcp: GstRTSPSendFunc, user_data: gpointer, notify: glib::GDestroyNotify); - pub fn gst_rtsp_stream_transport_set_keepalive(trans: *mut GstRTSPStreamTransport, keep_alive: GstRTSPKeepAliveFunc, user_data: gpointer, notify: glib::GDestroyNotify); + pub fn gst_rtsp_stream_transport_send_rtp_list( + trans: *mut GstRTSPStreamTransport, + buffer_list: *mut gst::GstBufferList, + ) -> gboolean; + pub fn gst_rtsp_stream_transport_set_active( + trans: *mut GstRTSPStreamTransport, + active: gboolean, + ) -> gboolean; + pub fn gst_rtsp_stream_transport_set_callbacks( + trans: *mut GstRTSPStreamTransport, + send_rtp: GstRTSPSendFunc, + send_rtcp: GstRTSPSendFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_rtsp_stream_transport_set_keepalive( + trans: *mut GstRTSPStreamTransport, + keep_alive: GstRTSPKeepAliveFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_stream_transport_set_list_callbacks(trans: *mut GstRTSPStreamTransport, send_rtp_list: GstRTSPSendListFunc, send_rtcp_list: GstRTSPSendListFunc, user_data: gpointer, notify: glib::GDestroyNotify); - pub fn gst_rtsp_stream_transport_set_message_sent(trans: *mut GstRTSPStreamTransport, message_sent: GstRTSPMessageSentFunc, user_data: gpointer, notify: glib::GDestroyNotify); - pub fn gst_rtsp_stream_transport_set_timed_out(trans: *mut GstRTSPStreamTransport, timedout: gboolean); - pub fn gst_rtsp_stream_transport_set_transport(trans: *mut GstRTSPStreamTransport, tr: *mut gst_rtsp::GstRTSPTransport); - pub fn gst_rtsp_stream_transport_set_url(trans: *mut GstRTSPStreamTransport, url: *const gst_rtsp::GstRTSPUrl); + pub fn gst_rtsp_stream_transport_set_list_callbacks( + trans: *mut GstRTSPStreamTransport, + send_rtp_list: GstRTSPSendListFunc, + send_rtcp_list: GstRTSPSendListFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_rtsp_stream_transport_set_message_sent( + trans: *mut GstRTSPStreamTransport, + message_sent: GstRTSPMessageSentFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_rtsp_stream_transport_set_timed_out( + trans: *mut GstRTSPStreamTransport, + timedout: gboolean, + ); + pub fn gst_rtsp_stream_transport_set_transport( + trans: *mut GstRTSPStreamTransport, + tr: *mut gst_rtsp::GstRTSPTransport, + ); + pub fn gst_rtsp_stream_transport_set_url( + trans: *mut GstRTSPStreamTransport, + url: *const gst_rtsp::GstRTSPUrl, + ); //========================================================================= // GstRTSPThreadPool @@ -1594,18 +2426,42 @@ extern "C" { pub fn gst_rtsp_thread_pool_new() -> *mut GstRTSPThreadPool; pub fn gst_rtsp_thread_pool_cleanup(); pub fn gst_rtsp_thread_pool_get_max_threads(pool: *mut GstRTSPThreadPool) -> c_int; - pub fn gst_rtsp_thread_pool_get_thread(pool: *mut GstRTSPThreadPool, type_: GstRTSPThreadType, ctx: *mut GstRTSPContext) -> *mut GstRTSPThread; + pub fn gst_rtsp_thread_pool_get_thread( + pool: *mut GstRTSPThreadPool, + type_: GstRTSPThreadType, + ctx: *mut GstRTSPContext, + ) -> *mut GstRTSPThread; pub fn gst_rtsp_thread_pool_set_max_threads(pool: *mut GstRTSPThreadPool, max_threads: c_int); //========================================================================= // Other functions //========================================================================= pub fn gst_rtsp_context_get_type() -> GType; - pub fn gst_rtsp_params_get(client: *mut GstRTSPClient, ctx: *mut GstRTSPContext) -> gst_rtsp::GstRTSPResult; - pub fn gst_rtsp_params_set(client: *mut GstRTSPClient, ctx: *mut GstRTSPContext) -> gst_rtsp::GstRTSPResult; - pub fn gst_rtsp_sdp_from_media(sdp: *mut gst_sdp::GstSDPMessage, info: *mut GstSDPInfo, media: *mut GstRTSPMedia) -> gboolean; - pub fn gst_rtsp_sdp_from_stream(sdp: *mut gst_sdp::GstSDPMessage, info: *mut GstSDPInfo, stream: *mut GstRTSPStream) -> gboolean; + pub fn gst_rtsp_params_get( + client: *mut GstRTSPClient, + ctx: *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPResult; + pub fn gst_rtsp_params_set( + client: *mut GstRTSPClient, + ctx: *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPResult; + pub fn gst_rtsp_sdp_from_media( + sdp: *mut gst_sdp::GstSDPMessage, + info: *mut GstSDPInfo, + media: *mut GstRTSPMedia, + ) -> gboolean; + pub fn gst_rtsp_sdp_from_stream( + sdp: *mut gst_sdp::GstSDPMessage, + info: *mut GstSDPInfo, + stream: *mut GstRTSPStream, + ) -> gboolean; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_sdp_make_media(sdp: *mut gst_sdp::GstSDPMessage, info: *mut GstSDPInfo, stream: *mut GstRTSPStream, caps: *mut gst::GstCaps, profile: gst_rtsp::GstRTSPProfile) -> gboolean; + pub fn gst_rtsp_sdp_make_media( + sdp: *mut gst_sdp::GstSDPMessage, + info: *mut GstSDPInfo, + stream: *mut GstRTSPStream, + caps: *mut gst::GstCaps, + profile: gst_rtsp::GstRTSPProfile, + ) -> gboolean; } diff --git a/gstreamer-rtsp-server-sys/tests/abi.rs b/gstreamer-rtsp-server-sys/tests/abi.rs index 113eeaf81..3f92a80c2 100644 --- a/gstreamer-rtsp-server-sys/tests/abi.rs +++ b/gstreamer-rtsp-server-sys/tests/abi.rs @@ -5,13 +5,13 @@ extern crate gstreamer_rtsp_server_sys; extern crate shell_words; extern crate tempdir; +use gstreamer_rtsp_server_sys::*; use std::env; use std::error::Error; -use std::path::Path; use std::mem::{align_of, size_of}; +use std::path::Path; use std::process::Command; use std::str; -use gstreamer_rtsp_server_sys::*; static PACKAGES: &[&str] = &["gstreamer-rtsp-server-1.0"]; @@ -47,8 +47,7 @@ impl Compiler { cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { - return Err(format!("compilation command {:?} failed, {}", - &cmd, status).into()); + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } @@ -77,14 +76,12 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { cmd.args(packages); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {:?} returned {}", - &cmd, out.status).into()); + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } - #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, @@ -115,9 +112,8 @@ impl Results { fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", - self.passed, - self.failed, - self.failed_to_compile) + self.passed, self.failed, self.failed_to_compile + ) } fn expect_total_success(&self) { if self.failed == 0 { @@ -133,24 +129,28 @@ fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!("1", - get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), - "failed to obtain correct constant value for 1"); + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); - eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_value, c_value); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); } } }; @@ -166,24 +166,31 @@ fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!(Layout {size: 1, alignment: 1}, - get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), - "failed to obtain correct layout for char type"); + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); - eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_layout, &c_layout); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); } } }; @@ -203,15 +210,14 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result Result> { @@ -223,71 +229,372 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result(), alignment: align_of::()}), - ("GstRTSPAddressFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPAddressPool", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPAddressPoolClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPAddressPoolResult", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPAuth", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPAuthClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPClient", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPClientClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPContext", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPFilterResult", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPMedia", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPMediaClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPMediaFactory", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPMediaFactoryClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPMediaFactoryURI", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPMediaFactoryURIClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPMediaStatus", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPMountPoints", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPMountPointsClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPOnvifClient", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPOnvifClientClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPOnvifMedia", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPOnvifMediaClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPOnvifMediaFactory", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPOnvifMediaFactoryClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPOnvifServer", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPOnvifServerClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPPermissions", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPPublishClockMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPServer", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPServerClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPSession", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPSessionClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPSessionMedia", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPSessionMediaClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPSessionPool", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPSessionPoolClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPStream", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPStreamClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPStreamTransport", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPStreamTransportClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPSuspendMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPThread", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPThreadPool", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPThreadPoolClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPThreadType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPToken", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPTransportMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSDPInfo", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstRTSPAddress", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPAddressFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPAddressPool", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPAddressPoolClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPAddressPoolResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPAuth", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPAuthClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPClient", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPClientClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPContext", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPFilterResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMedia", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMediaClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMediaFactory", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMediaFactoryClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMediaFactoryURI", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMediaFactoryURIClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMediaStatus", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMountPoints", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMountPointsClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPOnvifClient", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPOnvifClientClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPOnvifMedia", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPOnvifMediaClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPOnvifMediaFactory", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPOnvifMediaFactoryClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPOnvifServer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPOnvifServerClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPPermissions", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPPublishClockMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPServer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPServerClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPSession", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPSessionClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPSessionMedia", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPSessionMediaClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPSessionPool", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPSessionPoolClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPStream", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPStreamClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPStreamTransport", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPStreamTransportClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPSuspendMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPThread", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPThreadPool", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPThreadPoolClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPThreadType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPToken", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPTransportMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ @@ -305,9 +612,18 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_RTSP_ADDRESS_POOL_ERESERVED", "-2"), ("(gint) GST_RTSP_ADDRESS_POOL_OK", "0"), ("GST_RTSP_AUTH_CHECK_CONNECT", "auth.check.connect"), - ("GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_ACCESS", "auth.check.media.factory.access"), - ("GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_CONSTRUCT", "auth.check.media.factory.construct"), - ("GST_RTSP_AUTH_CHECK_TRANSPORT_CLIENT_SETTINGS", "auth.check.transport.client-settings"), + ( + "GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_ACCESS", + "auth.check.media.factory.access", + ), + ( + "GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_CONSTRUCT", + "auth.check.media.factory.construct", + ), + ( + "GST_RTSP_AUTH_CHECK_TRANSPORT_CLIENT_SETTINGS", + "auth.check.transport.client-settings", + ), ("GST_RTSP_AUTH_CHECK_URL", "auth.check.url"), ("(gint) GST_RTSP_FILTER_KEEP", "1"), ("(gint) GST_RTSP_FILTER_REF", "2"), @@ -318,9 +634,15 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_RTSP_MEDIA_STATUS_SUSPENDED", "4"), ("(gint) GST_RTSP_MEDIA_STATUS_UNPREPARED", "0"), ("(gint) GST_RTSP_MEDIA_STATUS_UNPREPARING", "1"), - ("GST_RTSP_ONVIF_BACKCHANNEL_REQUIREMENT", "www.onvif.org/ver20/backchannel"), + ( + "GST_RTSP_ONVIF_BACKCHANNEL_REQUIREMENT", + "www.onvif.org/ver20/backchannel", + ), ("GST_RTSP_PERM_MEDIA_FACTORY_ACCESS", "media.factory.access"), - ("GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT", "media.factory.construct"), + ( + "GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT", + "media.factory.construct", + ), ("(gint) GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK", "1"), ("(gint) GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET", "2"), ("(gint) GST_RTSP_PUBLISH_CLOCK_MODE_NONE", "0"), @@ -330,9 +652,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_RTSP_THREAD_TYPE_CLIENT", "0"), ("(gint) GST_RTSP_THREAD_TYPE_MEDIA", "1"), ("GST_RTSP_TOKEN_MEDIA_FACTORY_ROLE", "media.factory.role"), - ("GST_RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS", "transport.client-settings"), + ( + "GST_RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS", + "transport.client-settings", + ), ("(guint) GST_RTSP_TRANSPORT_MODE_PLAY", "1"), ("(guint) GST_RTSP_TRANSPORT_MODE_RECORD", "2"), ]; - - diff --git a/gstreamer-rtsp-sys/build.rs b/gstreamer-rtsp-sys/build.rs index c1041c422..a80f0b062 100644 --- a/gstreamer-rtsp-sys/build.rs +++ b/gstreamer-rtsp-sys/build.rs @@ -6,8 +6,8 @@ extern crate pkg_config; use pkg_config::{Config, Error}; use std::env; -use std::io::prelude::*; use std::io; +use std::io::prelude::*; use std::process; fn main() { @@ -50,7 +50,7 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()) + return Ok(()); } let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); @@ -72,8 +72,10 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } for path in library.link_paths.iter() { - println!("cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist")); + println!( + "cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist") + ); } } Ok(()) @@ -87,4 +89,3 @@ fn find() -> Result<(), Error> { Err(err) => Err(err), } } - diff --git a/gstreamer-rtsp-sys/src/lib.rs b/gstreamer-rtsp-sys/src/lib.rs index eeaef9a10..492545ba1 100644 --- a/gstreamer-rtsp-sys/src/lib.rs +++ b/gstreamer-rtsp-sys/src/lib.rs @@ -3,19 +3,24 @@ // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] -extern crate libc; +extern crate gio_sys as gio; extern crate glib_sys as glib; extern crate gobject_sys as gobject; -extern crate gio_sys as gio; -extern crate gstreamer_sys as gst; extern crate gstreamer_sdp_sys as gst_sdp; +extern crate gstreamer_sys as gst; +extern crate libc; #[allow(unused_imports)] -use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, - c_short, c_ushort, c_long, c_ulong, - c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; +use libc::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, + intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -282,16 +287,26 @@ pub union GstRTSPMessage_type_data { impl ::std::fmt::Debug for GstRTSPMessage_type_data { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstRTSPMessage_type_data @ {:?}", self as *const _)) - .field("request", unsafe { &self.request }) - .field("response", unsafe { &self.response }) - .field("data", unsafe { &self.data }) - .finish() + f.debug_struct(&format!( + "GstRTSPMessage_type_data @ {:?}", + self as *const _ + )) + .field("request", unsafe { &self.request }) + .field("response", unsafe { &self.response }) + .field("data", unsafe { &self.data }) + .finish() } } // Callbacks -pub type GstRTSPConnectionAcceptCertificateFunc = Option gboolean>; +pub type GstRTSPConnectionAcceptCertificateFunc = Option< + unsafe extern "C" fn( + *mut gio::GTlsConnection, + *mut gio::GTlsCertificate, + gio::GTlsCertificateFlags, + gpointer, + ) -> gboolean, +>; // Records #[repr(C)] @@ -305,10 +320,10 @@ pub struct GstRTSPAuthCredential { impl ::std::fmt::Debug for GstRTSPAuthCredential { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPAuthCredential @ {:?}", self as *const _)) - .field("scheme", &self.scheme) - .field("params", &self.params) - .field("authorization", &self.authorization) - .finish() + .field("scheme", &self.scheme) + .field("params", &self.params) + .field("authorization", &self.authorization) + .finish() } } @@ -322,9 +337,9 @@ pub struct GstRTSPAuthParam { impl ::std::fmt::Debug for GstRTSPAuthParam { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPAuthParam @ {:?}", self as *const _)) - .field("name", &self.name) - .field("value", &self.value) - .finish() + .field("name", &self.name) + .field("value", &self.value) + .finish() } } @@ -337,34 +352,68 @@ pub type GstRTSPConnection = *mut _GstRTSPConnection; #[derive(Copy, Clone)] pub struct GstRTSPExtensionInterface { pub parent: gobject::GTypeInterface, - pub detect_server: Option gboolean>, - pub before_send: Option GstRTSPResult>, - pub after_send: Option GstRTSPResult>, - pub parse_sdp: Option GstRTSPResult>, - pub setup_media: Option GstRTSPResult>, - pub configure_stream: Option gboolean>, - pub get_transports: Option GstRTSPResult>, - pub stream_select: Option GstRTSPResult>, - pub send: Option GstRTSPResult>, - pub receive_request: Option GstRTSPResult>, + pub detect_server: + Option gboolean>, + pub before_send: + Option GstRTSPResult>, + pub after_send: Option< + unsafe extern "C" fn( + *mut GstRTSPExtension, + *mut GstRTSPMessage, + *mut GstRTSPMessage, + ) -> GstRTSPResult, + >, + pub parse_sdp: Option< + unsafe extern "C" fn( + *mut GstRTSPExtension, + *mut gst_sdp::GstSDPMessage, + *mut gst::GstStructure, + ) -> GstRTSPResult, + >, + pub setup_media: Option< + unsafe extern "C" fn(*mut GstRTSPExtension, *mut gst_sdp::GstSDPMedia) -> GstRTSPResult, + >, + pub configure_stream: + Option gboolean>, + pub get_transports: Option< + unsafe extern "C" fn( + *mut GstRTSPExtension, + GstRTSPLowerTrans, + *mut *mut c_char, + ) -> GstRTSPResult, + >, + pub stream_select: + Option GstRTSPResult>, + pub send: Option< + unsafe extern "C" fn( + *mut GstRTSPExtension, + *mut GstRTSPMessage, + *mut GstRTSPMessage, + ) -> GstRTSPResult, + >, + pub receive_request: + Option GstRTSPResult>, pub _gst_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstRTSPExtensionInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstRTSPExtensionInterface @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("detect_server", &self.detect_server) - .field("before_send", &self.before_send) - .field("after_send", &self.after_send) - .field("parse_sdp", &self.parse_sdp) - .field("setup_media", &self.setup_media) - .field("configure_stream", &self.configure_stream) - .field("get_transports", &self.get_transports) - .field("stream_select", &self.stream_select) - .field("send", &self.send) - .field("receive_request", &self.receive_request) - .finish() + f.debug_struct(&format!( + "GstRTSPExtensionInterface @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .field("detect_server", &self.detect_server) + .field("before_send", &self.before_send) + .field("after_send", &self.after_send) + .field("parse_sdp", &self.parse_sdp) + .field("setup_media", &self.setup_media) + .field("configure_stream", &self.configure_stream) + .field("get_transports", &self.get_transports) + .field("stream_select", &self.stream_select) + .field("send", &self.send) + .field("receive_request", &self.receive_request) + .finish() } } @@ -383,9 +432,9 @@ pub struct GstRTSPMessage { impl ::std::fmt::Debug for GstRTSPMessage { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPMessage @ {:?}", self as *const _)) - .field("type_", &self.type_) - .field("type_data", &self.type_data) - .finish() + .field("type_", &self.type_) + .field("type_data", &self.type_data) + .finish() } } @@ -397,9 +446,12 @@ pub struct GstRTSPMessage_type_data_data { impl ::std::fmt::Debug for GstRTSPMessage_type_data_data { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstRTSPMessage_type_data_data @ {:?}", self as *const _)) - .field("channel", &self.channel) - .finish() + f.debug_struct(&format!( + "GstRTSPMessage_type_data_data @ {:?}", + self as *const _ + )) + .field("channel", &self.channel) + .finish() } } @@ -413,11 +465,14 @@ pub struct GstRTSPMessage_type_data_request { impl ::std::fmt::Debug for GstRTSPMessage_type_data_request { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstRTSPMessage_type_data_request @ {:?}", self as *const _)) - .field("method", &self.method) - .field("uri", &self.uri) - .field("version", &self.version) - .finish() + f.debug_struct(&format!( + "GstRTSPMessage_type_data_request @ {:?}", + self as *const _ + )) + .field("method", &self.method) + .field("uri", &self.uri) + .field("version", &self.version) + .finish() } } @@ -431,11 +486,14 @@ pub struct GstRTSPMessage_type_data_response { impl ::std::fmt::Debug for GstRTSPMessage_type_data_response { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstRTSPMessage_type_data_response @ {:?}", self as *const _)) - .field("code", &self.code) - .field("reason", &self.reason) - .field("version", &self.version) - .finish() + f.debug_struct(&format!( + "GstRTSPMessage_type_data_response @ {:?}", + self as *const _ + )) + .field("code", &self.code) + .field("reason", &self.reason) + .field("version", &self.version) + .finish() } } @@ -449,9 +507,9 @@ pub struct GstRTSPRange { impl ::std::fmt::Debug for GstRTSPRange { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPRange @ {:?}", self as *const _)) - .field("min", &self.min) - .field("max", &self.max) - .finish() + .field("min", &self.min) + .field("max", &self.max) + .finish() } } @@ -465,9 +523,9 @@ pub struct GstRTSPTime { impl ::std::fmt::Debug for GstRTSPTime { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPTime @ {:?}", self as *const _)) - .field("type_", &self.type_) - .field("seconds", &self.seconds) - .finish() + .field("type_", &self.type_) + .field("seconds", &self.seconds) + .finish() } } @@ -483,11 +541,11 @@ pub struct GstRTSPTime2 { impl ::std::fmt::Debug for GstRTSPTime2 { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPTime2 @ {:?}", self as *const _)) - .field("frames", &self.frames) - .field("year", &self.year) - .field("month", &self.month) - .field("day", &self.day) - .finish() + .field("frames", &self.frames) + .field("year", &self.year) + .field("month", &self.month) + .field("day", &self.day) + .finish() } } @@ -504,12 +562,12 @@ pub struct GstRTSPTimeRange { impl ::std::fmt::Debug for GstRTSPTimeRange { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPTimeRange @ {:?}", self as *const _)) - .field("unit", &self.unit) - .field("min", &self.min) - .field("max", &self.max) - .field("min2", &self.min2) - .field("max2", &self.max2) - .finish() + .field("unit", &self.unit) + .field("min", &self.min) + .field("max", &self.max) + .field("min2", &self.min2) + .field("max2", &self.max2) + .finish() } } @@ -537,22 +595,22 @@ pub struct GstRTSPTransport { impl ::std::fmt::Debug for GstRTSPTransport { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPTransport @ {:?}", self as *const _)) - .field("trans", &self.trans) - .field("profile", &self.profile) - .field("lower_transport", &self.lower_transport) - .field("destination", &self.destination) - .field("source", &self.source) - .field("layers", &self.layers) - .field("mode_play", &self.mode_play) - .field("mode_record", &self.mode_record) - .field("append", &self.append) - .field("interleaved", &self.interleaved) - .field("ttl", &self.ttl) - .field("port", &self.port) - .field("client_port", &self.client_port) - .field("server_port", &self.server_port) - .field("ssrc", &self.ssrc) - .finish() + .field("trans", &self.trans) + .field("profile", &self.profile) + .field("lower_transport", &self.lower_transport) + .field("destination", &self.destination) + .field("source", &self.source) + .field("layers", &self.layers) + .field("mode_play", &self.mode_play) + .field("mode_record", &self.mode_record) + .field("append", &self.append) + .field("interleaved", &self.interleaved) + .field("ttl", &self.ttl) + .field("port", &self.port) + .field("client_port", &self.client_port) + .field("server_port", &self.server_port) + .field("ssrc", &self.ssrc) + .finish() } } @@ -572,15 +630,15 @@ pub struct GstRTSPUrl { impl ::std::fmt::Debug for GstRTSPUrl { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPUrl @ {:?}", self as *const _)) - .field("transports", &self.transports) - .field("family", &self.family) - .field("user", &self.user) - .field("passwd", &self.passwd) - .field("host", &self.host) - .field("port", &self.port) - .field("abspath", &self.abspath) - .field("query", &self.query) - .finish() + .field("transports", &self.transports) + .field("family", &self.family) + .field("user", &self.user) + .field("passwd", &self.passwd) + .field("host", &self.host) + .field("port", &self.port) + .field("abspath", &self.abspath) + .field("query", &self.query) + .finish() } } @@ -592,31 +650,51 @@ pub type GstRTSPWatch = *mut _GstRTSPWatch; #[repr(C)] #[derive(Copy, Clone)] pub struct GstRTSPWatchFuncs { - pub message_received: Option GstRTSPResult>, - pub message_sent: Option GstRTSPResult>, + pub message_received: Option< + unsafe extern "C" fn(*mut GstRTSPWatch, *mut GstRTSPMessage, gpointer) -> GstRTSPResult, + >, + pub message_sent: + Option GstRTSPResult>, pub closed: Option GstRTSPResult>, - pub error: Option GstRTSPResult>, - pub tunnel_start: Option GstRTSPStatusCode>, + pub error: + Option GstRTSPResult>, + pub tunnel_start: + Option GstRTSPStatusCode>, pub tunnel_complete: Option GstRTSPResult>, - pub error_full: Option GstRTSPResult>, + pub error_full: Option< + unsafe extern "C" fn( + *mut GstRTSPWatch, + GstRTSPResult, + *mut GstRTSPMessage, + c_uint, + gpointer, + ) -> GstRTSPResult, + >, pub tunnel_lost: Option GstRTSPResult>, - pub tunnel_http_response: Option GstRTSPResult>, + pub tunnel_http_response: Option< + unsafe extern "C" fn( + *mut GstRTSPWatch, + *mut GstRTSPMessage, + *mut GstRTSPMessage, + gpointer, + ) -> GstRTSPResult, + >, pub _gst_reserved: [gpointer; 3], } impl ::std::fmt::Debug for GstRTSPWatchFuncs { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRTSPWatchFuncs @ {:?}", self as *const _)) - .field("message_received", &self.message_received) - .field("message_sent", &self.message_sent) - .field("closed", &self.closed) - .field("error", &self.error) - .field("tunnel_start", &self.tunnel_start) - .field("tunnel_complete", &self.tunnel_complete) - .field("error_full", &self.error_full) - .field("tunnel_lost", &self.tunnel_lost) - .field("tunnel_http_response", &self.tunnel_http_response) - .finish() + .field("message_received", &self.message_received) + .field("message_sent", &self.message_sent) + .field("closed", &self.closed) + .field("error", &self.error) + .field("tunnel_start", &self.tunnel_start) + .field("tunnel_complete", &self.tunnel_complete) + .field("error_full", &self.error_full) + .field("tunnel_lost", &self.tunnel_lost) + .field("tunnel_http_response", &self.tunnel_http_response) + .finish() } } @@ -630,7 +708,6 @@ impl ::std::fmt::Debug for GstRTSPExtension { } } - extern "C" { //========================================================================= @@ -727,111 +804,314 @@ extern "C" { //========================================================================= pub fn gst_rtsp_connection_clear_auth_params(conn: *mut GstRTSPConnection); pub fn gst_rtsp_connection_close(conn: *mut GstRTSPConnection) -> GstRTSPResult; - pub fn gst_rtsp_connection_connect(conn: *mut GstRTSPConnection, timeout: *mut glib::GTimeVal) -> GstRTSPResult; + pub fn gst_rtsp_connection_connect( + conn: *mut GstRTSPConnection, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_rtsp_connection_connect_with_response(conn: *mut GstRTSPConnection, timeout: *mut glib::GTimeVal, response: *mut GstRTSPMessage) -> GstRTSPResult; - pub fn gst_rtsp_connection_do_tunnel(conn: *mut GstRTSPConnection, conn2: *mut GstRTSPConnection) -> GstRTSPResult; - pub fn gst_rtsp_connection_flush(conn: *mut GstRTSPConnection, flush: gboolean) -> GstRTSPResult; + pub fn gst_rtsp_connection_connect_with_response( + conn: *mut GstRTSPConnection, + timeout: *mut glib::GTimeVal, + response: *mut GstRTSPMessage, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_do_tunnel( + conn: *mut GstRTSPConnection, + conn2: *mut GstRTSPConnection, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_flush( + conn: *mut GstRTSPConnection, + flush: gboolean, + ) -> GstRTSPResult; pub fn gst_rtsp_connection_free(conn: *mut GstRTSPConnection) -> GstRTSPResult; pub fn gst_rtsp_connection_get_ip(conn: *const GstRTSPConnection) -> *const c_char; - pub fn gst_rtsp_connection_get_read_socket(conn: *const GstRTSPConnection) -> *mut gio::GSocket; + pub fn gst_rtsp_connection_get_read_socket(conn: *const GstRTSPConnection) + -> *mut gio::GSocket; pub fn gst_rtsp_connection_get_remember_session_id(conn: *mut GstRTSPConnection) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_rtsp_connection_get_tls(conn: *mut GstRTSPConnection, error: *mut *mut glib::GError) -> *mut gio::GTlsConnection; + pub fn gst_rtsp_connection_get_tls( + conn: *mut GstRTSPConnection, + error: *mut *mut glib::GError, + ) -> *mut gio::GTlsConnection; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_rtsp_connection_get_tls_database(conn: *mut GstRTSPConnection) -> *mut gio::GTlsDatabase; + pub fn gst_rtsp_connection_get_tls_database( + conn: *mut GstRTSPConnection, + ) -> *mut gio::GTlsDatabase; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_rtsp_connection_get_tls_interaction(conn: *mut GstRTSPConnection) -> *mut gio::GTlsInteraction; + pub fn gst_rtsp_connection_get_tls_interaction( + conn: *mut GstRTSPConnection, + ) -> *mut gio::GTlsInteraction; #[cfg(any(feature = "v1_2_1", feature = "dox"))] - pub fn gst_rtsp_connection_get_tls_validation_flags(conn: *mut GstRTSPConnection) -> gio::GTlsCertificateFlags; + pub fn gst_rtsp_connection_get_tls_validation_flags( + conn: *mut GstRTSPConnection, + ) -> gio::GTlsCertificateFlags; pub fn gst_rtsp_connection_get_tunnelid(conn: *const GstRTSPConnection) -> *const c_char; pub fn gst_rtsp_connection_get_url(conn: *const GstRTSPConnection) -> *mut GstRTSPUrl; - pub fn gst_rtsp_connection_get_write_socket(conn: *const GstRTSPConnection) -> *mut gio::GSocket; + pub fn gst_rtsp_connection_get_write_socket( + conn: *const GstRTSPConnection, + ) -> *mut gio::GSocket; pub fn gst_rtsp_connection_is_tunneled(conn: *const GstRTSPConnection) -> gboolean; - pub fn gst_rtsp_connection_next_timeout(conn: *mut GstRTSPConnection, timeout: *mut glib::GTimeVal) -> GstRTSPResult; - pub fn gst_rtsp_connection_poll(conn: *mut GstRTSPConnection, events: GstRTSPEvent, revents: *mut GstRTSPEvent, timeout: *mut glib::GTimeVal) -> GstRTSPResult; - pub fn gst_rtsp_connection_read(conn: *mut GstRTSPConnection, data: *mut u8, size: c_uint, timeout: *mut glib::GTimeVal) -> GstRTSPResult; - pub fn gst_rtsp_connection_receive(conn: *mut GstRTSPConnection, message: *mut GstRTSPMessage, timeout: *mut glib::GTimeVal) -> GstRTSPResult; + pub fn gst_rtsp_connection_next_timeout( + conn: *mut GstRTSPConnection, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_poll( + conn: *mut GstRTSPConnection, + events: GstRTSPEvent, + revents: *mut GstRTSPEvent, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_read( + conn: *mut GstRTSPConnection, + data: *mut u8, + size: c_uint, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_receive( + conn: *mut GstRTSPConnection, + message: *mut GstRTSPMessage, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; pub fn gst_rtsp_connection_reset_timeout(conn: *mut GstRTSPConnection) -> GstRTSPResult; - pub fn gst_rtsp_connection_send(conn: *mut GstRTSPConnection, message: *mut GstRTSPMessage, timeout: *mut glib::GTimeVal) -> GstRTSPResult; + pub fn gst_rtsp_connection_send( + conn: *mut GstRTSPConnection, + message: *mut GstRTSPMessage, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_connection_send_messages(conn: *mut GstRTSPConnection, messages: *mut GstRTSPMessage, n_messages: c_uint, timeout: *mut glib::GTimeVal) -> GstRTSPResult; + pub fn gst_rtsp_connection_send_messages( + conn: *mut GstRTSPConnection, + messages: *mut GstRTSPMessage, + n_messages: c_uint, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_connection_set_accept_certificate_func(conn: *mut GstRTSPConnection, func: GstRTSPConnectionAcceptCertificateFunc, user_data: gpointer, destroy_notify: glib::GDestroyNotify); - pub fn gst_rtsp_connection_set_auth(conn: *mut GstRTSPConnection, method: GstRTSPAuthMethod, user: *const c_char, pass: *const c_char) -> GstRTSPResult; - pub fn gst_rtsp_connection_set_auth_param(conn: *mut GstRTSPConnection, param: *const c_char, value: *const c_char); + pub fn gst_rtsp_connection_set_accept_certificate_func( + conn: *mut GstRTSPConnection, + func: GstRTSPConnectionAcceptCertificateFunc, + user_data: gpointer, + destroy_notify: glib::GDestroyNotify, + ); + pub fn gst_rtsp_connection_set_auth( + conn: *mut GstRTSPConnection, + method: GstRTSPAuthMethod, + user: *const c_char, + pass: *const c_char, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_set_auth_param( + conn: *mut GstRTSPConnection, + param: *const c_char, + value: *const c_char, + ); pub fn gst_rtsp_connection_set_http_mode(conn: *mut GstRTSPConnection, enable: gboolean); pub fn gst_rtsp_connection_set_ip(conn: *mut GstRTSPConnection, ip: *const c_char); - pub fn gst_rtsp_connection_set_proxy(conn: *mut GstRTSPConnection, host: *const c_char, port: c_uint) -> GstRTSPResult; - pub fn gst_rtsp_connection_set_qos_dscp(conn: *mut GstRTSPConnection, qos_dscp: c_uint) -> GstRTSPResult; - pub fn gst_rtsp_connection_set_remember_session_id(conn: *mut GstRTSPConnection, remember: gboolean); + pub fn gst_rtsp_connection_set_proxy( + conn: *mut GstRTSPConnection, + host: *const c_char, + port: c_uint, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_set_qos_dscp( + conn: *mut GstRTSPConnection, + qos_dscp: c_uint, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_set_remember_session_id( + conn: *mut GstRTSPConnection, + remember: gboolean, + ); #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_rtsp_connection_set_tls_database(conn: *mut GstRTSPConnection, database: *mut gio::GTlsDatabase); + pub fn gst_rtsp_connection_set_tls_database( + conn: *mut GstRTSPConnection, + database: *mut gio::GTlsDatabase, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_rtsp_connection_set_tls_interaction(conn: *mut GstRTSPConnection, interaction: *mut gio::GTlsInteraction); + pub fn gst_rtsp_connection_set_tls_interaction( + conn: *mut GstRTSPConnection, + interaction: *mut gio::GTlsInteraction, + ); #[cfg(any(feature = "v1_2_1", feature = "dox"))] - pub fn gst_rtsp_connection_set_tls_validation_flags(conn: *mut GstRTSPConnection, flags: gio::GTlsCertificateFlags) -> gboolean; + pub fn gst_rtsp_connection_set_tls_validation_flags( + conn: *mut GstRTSPConnection, + flags: gio::GTlsCertificateFlags, + ) -> gboolean; pub fn gst_rtsp_connection_set_tunneled(conn: *mut GstRTSPConnection, tunneled: gboolean); - pub fn gst_rtsp_connection_write(conn: *mut GstRTSPConnection, data: *const u8, size: c_uint, timeout: *mut glib::GTimeVal) -> GstRTSPResult; - pub fn gst_rtsp_connection_accept(socket: *mut gio::GSocket, conn: *mut *mut GstRTSPConnection, cancellable: *mut gio::GCancellable) -> GstRTSPResult; - pub fn gst_rtsp_connection_create(url: *const GstRTSPUrl, conn: *mut *mut GstRTSPConnection) -> GstRTSPResult; - pub fn gst_rtsp_connection_create_from_socket(socket: *mut gio::GSocket, ip: *const c_char, port: u16, initial_buffer: *const c_char, conn: *mut *mut GstRTSPConnection) -> GstRTSPResult; + pub fn gst_rtsp_connection_write( + conn: *mut GstRTSPConnection, + data: *const u8, + size: c_uint, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_accept( + socket: *mut gio::GSocket, + conn: *mut *mut GstRTSPConnection, + cancellable: *mut gio::GCancellable, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_create( + url: *const GstRTSPUrl, + conn: *mut *mut GstRTSPConnection, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_create_from_socket( + socket: *mut gio::GSocket, + ip: *const c_char, + port: u16, + initial_buffer: *const c_char, + conn: *mut *mut GstRTSPConnection, + ) -> GstRTSPResult; //========================================================================= // GstRTSPMessage //========================================================================= pub fn gst_rtsp_msg_get_type() -> GType; - pub fn gst_rtsp_message_add_header(msg: *mut GstRTSPMessage, field: GstRTSPHeaderField, value: *const c_char) -> GstRTSPResult; + pub fn gst_rtsp_message_add_header( + msg: *mut GstRTSPMessage, + field: GstRTSPHeaderField, + value: *const c_char, + ) -> GstRTSPResult; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_rtsp_message_add_header_by_name(msg: *mut GstRTSPMessage, header: *const c_char, value: *const c_char) -> GstRTSPResult; - pub fn gst_rtsp_message_append_headers(msg: *const GstRTSPMessage, str: *mut glib::GString) -> GstRTSPResult; + pub fn gst_rtsp_message_add_header_by_name( + msg: *mut GstRTSPMessage, + header: *const c_char, + value: *const c_char, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_append_headers( + msg: *const GstRTSPMessage, + str: *mut glib::GString, + ) -> GstRTSPResult; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_rtsp_message_copy(msg: *const GstRTSPMessage, copy: *mut *mut GstRTSPMessage) -> GstRTSPResult; + pub fn gst_rtsp_message_copy( + msg: *const GstRTSPMessage, + copy: *mut *mut GstRTSPMessage, + ) -> GstRTSPResult; pub fn gst_rtsp_message_dump(msg: *mut GstRTSPMessage) -> GstRTSPResult; pub fn gst_rtsp_message_free(msg: *mut GstRTSPMessage) -> GstRTSPResult; - pub fn gst_rtsp_message_get_body(msg: *const GstRTSPMessage, data: *mut *mut u8, size: *mut c_uint) -> GstRTSPResult; + pub fn gst_rtsp_message_get_body( + msg: *const GstRTSPMessage, + data: *mut *mut u8, + size: *mut c_uint, + ) -> GstRTSPResult; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_message_get_body_buffer(msg: *const GstRTSPMessage, buffer: *mut *mut gst::GstBuffer) -> GstRTSPResult; - pub fn gst_rtsp_message_get_header(msg: *const GstRTSPMessage, field: GstRTSPHeaderField, value: *mut *mut c_char, indx: c_int) -> GstRTSPResult; + pub fn gst_rtsp_message_get_body_buffer( + msg: *const GstRTSPMessage, + buffer: *mut *mut gst::GstBuffer, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_get_header( + msg: *const GstRTSPMessage, + field: GstRTSPHeaderField, + value: *mut *mut c_char, + indx: c_int, + ) -> GstRTSPResult; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_rtsp_message_get_header_by_name(msg: *mut GstRTSPMessage, header: *const c_char, value: *mut *mut c_char, index: c_int) -> GstRTSPResult; + pub fn gst_rtsp_message_get_header_by_name( + msg: *mut GstRTSPMessage, + header: *const c_char, + value: *mut *mut c_char, + index: c_int, + ) -> GstRTSPResult; pub fn gst_rtsp_message_get_type(msg: *mut GstRTSPMessage) -> GstRTSPMsgType; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_rtsp_message_has_body_buffer(msg: *const GstRTSPMessage) -> gboolean; pub fn gst_rtsp_message_init(msg: *mut GstRTSPMessage) -> GstRTSPResult; pub fn gst_rtsp_message_init_data(msg: *mut GstRTSPMessage, channel: u8) -> GstRTSPResult; - pub fn gst_rtsp_message_init_request(msg: *mut GstRTSPMessage, method: GstRTSPMethod, uri: *const c_char) -> GstRTSPResult; - pub fn gst_rtsp_message_init_response(msg: *mut GstRTSPMessage, code: GstRTSPStatusCode, reason: *const c_char, request: *const GstRTSPMessage) -> GstRTSPResult; + pub fn gst_rtsp_message_init_request( + msg: *mut GstRTSPMessage, + method: GstRTSPMethod, + uri: *const c_char, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_init_response( + msg: *mut GstRTSPMessage, + code: GstRTSPStatusCode, + reason: *const c_char, + request: *const GstRTSPMessage, + ) -> GstRTSPResult; #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_rtsp_message_parse_auth_credentials(msg: *mut GstRTSPMessage, field: GstRTSPHeaderField) -> *mut *mut GstRTSPAuthCredential; - pub fn gst_rtsp_message_parse_data(msg: *mut GstRTSPMessage, channel: *mut u8) -> GstRTSPResult; - pub fn gst_rtsp_message_parse_request(msg: *mut GstRTSPMessage, method: *mut GstRTSPMethod, uri: *mut *const c_char, version: *mut GstRTSPVersion) -> GstRTSPResult; - pub fn gst_rtsp_message_parse_response(msg: *mut GstRTSPMessage, code: *mut GstRTSPStatusCode, reason: *mut *const c_char, version: *mut GstRTSPVersion) -> GstRTSPResult; - pub fn gst_rtsp_message_remove_header(msg: *mut GstRTSPMessage, field: GstRTSPHeaderField, indx: c_int) -> GstRTSPResult; + pub fn gst_rtsp_message_parse_auth_credentials( + msg: *mut GstRTSPMessage, + field: GstRTSPHeaderField, + ) -> *mut *mut GstRTSPAuthCredential; + pub fn gst_rtsp_message_parse_data(msg: *mut GstRTSPMessage, channel: *mut u8) + -> GstRTSPResult; + pub fn gst_rtsp_message_parse_request( + msg: *mut GstRTSPMessage, + method: *mut GstRTSPMethod, + uri: *mut *const c_char, + version: *mut GstRTSPVersion, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_parse_response( + msg: *mut GstRTSPMessage, + code: *mut GstRTSPStatusCode, + reason: *mut *const c_char, + version: *mut GstRTSPVersion, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_remove_header( + msg: *mut GstRTSPMessage, + field: GstRTSPHeaderField, + indx: c_int, + ) -> GstRTSPResult; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_rtsp_message_remove_header_by_name(msg: *mut GstRTSPMessage, header: *const c_char, index: c_int) -> GstRTSPResult; - pub fn gst_rtsp_message_set_body(msg: *mut GstRTSPMessage, data: *const u8, size: c_uint) -> GstRTSPResult; + pub fn gst_rtsp_message_remove_header_by_name( + msg: *mut GstRTSPMessage, + header: *const c_char, + index: c_int, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_set_body( + msg: *mut GstRTSPMessage, + data: *const u8, + size: c_uint, + ) -> GstRTSPResult; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_message_set_body_buffer(msg: *mut GstRTSPMessage, buffer: *mut gst::GstBuffer) -> GstRTSPResult; - pub fn gst_rtsp_message_steal_body(msg: *mut GstRTSPMessage, data: *mut *mut u8, size: *mut c_uint) -> GstRTSPResult; + pub fn gst_rtsp_message_set_body_buffer( + msg: *mut GstRTSPMessage, + buffer: *mut gst::GstBuffer, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_steal_body( + msg: *mut GstRTSPMessage, + data: *mut *mut u8, + size: *mut c_uint, + ) -> GstRTSPResult; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_message_steal_body_buffer(msg: *mut GstRTSPMessage, buffer: *mut *mut gst::GstBuffer) -> GstRTSPResult; - pub fn gst_rtsp_message_take_body(msg: *mut GstRTSPMessage, data: *mut u8, size: c_uint) -> GstRTSPResult; + pub fn gst_rtsp_message_steal_body_buffer( + msg: *mut GstRTSPMessage, + buffer: *mut *mut gst::GstBuffer, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_take_body( + msg: *mut GstRTSPMessage, + data: *mut u8, + size: c_uint, + ) -> GstRTSPResult; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_message_take_body_buffer(msg: *mut GstRTSPMessage, buffer: *mut gst::GstBuffer) -> GstRTSPResult; - pub fn gst_rtsp_message_take_header(msg: *mut GstRTSPMessage, field: GstRTSPHeaderField, value: *mut c_char) -> GstRTSPResult; + pub fn gst_rtsp_message_take_body_buffer( + msg: *mut GstRTSPMessage, + buffer: *mut gst::GstBuffer, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_take_header( + msg: *mut GstRTSPMessage, + field: GstRTSPHeaderField, + value: *mut c_char, + ) -> GstRTSPResult; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_rtsp_message_take_header_by_name(msg: *mut GstRTSPMessage, header: *const c_char, value: *mut c_char) -> GstRTSPResult; + pub fn gst_rtsp_message_take_header_by_name( + msg: *mut GstRTSPMessage, + header: *const c_char, + value: *mut c_char, + ) -> GstRTSPResult; pub fn gst_rtsp_message_unset(msg: *mut GstRTSPMessage) -> GstRTSPResult; //========================================================================= // GstRTSPRange //========================================================================= - pub fn gst_rtsp_range_convert_units(range: *mut GstRTSPTimeRange, unit: GstRTSPRangeUnit) -> gboolean; + pub fn gst_rtsp_range_convert_units( + range: *mut GstRTSPTimeRange, + unit: GstRTSPRangeUnit, + ) -> gboolean; pub fn gst_rtsp_range_free(range: *mut GstRTSPTimeRange); #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_rtsp_range_get_times(range: *const GstRTSPTimeRange, min: *mut gst::GstClockTime, max: *mut gst::GstClockTime) -> gboolean; - pub fn gst_rtsp_range_parse(rangestr: *const c_char, range: *mut *mut GstRTSPTimeRange) -> GstRTSPResult; + pub fn gst_rtsp_range_get_times( + range: *const GstRTSPTimeRange, + min: *mut gst::GstClockTime, + max: *mut gst::GstClockTime, + ) -> gboolean; + pub fn gst_rtsp_range_parse( + rangestr: *const c_char, + range: *mut *mut GstRTSPTimeRange, + ) -> GstRTSPResult; pub fn gst_rtsp_range_to_string(range: *const GstRTSPTimeRange) -> *mut c_char; //========================================================================= @@ -840,12 +1120,25 @@ extern "C" { pub fn gst_rtsp_transport_as_text(transport: *mut GstRTSPTransport) -> *mut c_char; pub fn gst_rtsp_transport_free(transport: *mut GstRTSPTransport) -> GstRTSPResult; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_rtsp_transport_get_media_type(transport: *mut GstRTSPTransport, media_type: *mut *const c_char) -> GstRTSPResult; + pub fn gst_rtsp_transport_get_media_type( + transport: *mut GstRTSPTransport, + media_type: *mut *const c_char, + ) -> GstRTSPResult; pub fn gst_rtsp_transport_init(transport: *mut GstRTSPTransport) -> GstRTSPResult; - pub fn gst_rtsp_transport_get_manager(trans: GstRTSPTransMode, manager: *mut *const c_char, option: c_uint) -> GstRTSPResult; - pub fn gst_rtsp_transport_get_mime(trans: GstRTSPTransMode, mime: *mut *const c_char) -> GstRTSPResult; + pub fn gst_rtsp_transport_get_manager( + trans: GstRTSPTransMode, + manager: *mut *const c_char, + option: c_uint, + ) -> GstRTSPResult; + pub fn gst_rtsp_transport_get_mime( + trans: GstRTSPTransMode, + mime: *mut *const c_char, + ) -> GstRTSPResult; pub fn gst_rtsp_transport_new(transport: *mut *mut GstRTSPTransport) -> GstRTSPResult; - pub fn gst_rtsp_transport_parse(str: *const c_char, transport: *mut GstRTSPTransport) -> GstRTSPResult; + pub fn gst_rtsp_transport_parse( + str: *const c_char, + transport: *mut GstRTSPTransport, + ) -> GstRTSPResult; //========================================================================= // GstRTSPUrl @@ -862,37 +1155,104 @@ extern "C" { //========================================================================= // GstRTSPWatch //========================================================================= - pub fn gst_rtsp_watch_attach(watch: *mut GstRTSPWatch, context: *mut glib::GMainContext) -> c_uint; + pub fn gst_rtsp_watch_attach( + watch: *mut GstRTSPWatch, + context: *mut glib::GMainContext, + ) -> c_uint; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_rtsp_watch_get_send_backlog(watch: *mut GstRTSPWatch, bytes: *mut size_t, messages: *mut c_uint); + pub fn gst_rtsp_watch_get_send_backlog( + watch: *mut GstRTSPWatch, + bytes: *mut size_t, + messages: *mut c_uint, + ); pub fn gst_rtsp_watch_reset(watch: *mut GstRTSPWatch); - pub fn gst_rtsp_watch_send_message(watch: *mut GstRTSPWatch, message: *mut GstRTSPMessage, id: *mut c_uint) -> GstRTSPResult; + pub fn gst_rtsp_watch_send_message( + watch: *mut GstRTSPWatch, + message: *mut GstRTSPMessage, + id: *mut c_uint, + ) -> GstRTSPResult; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_watch_send_messages(watch: *mut GstRTSPWatch, messages: *mut GstRTSPMessage, n_messages: c_uint, id: *mut c_uint) -> GstRTSPResult; + pub fn gst_rtsp_watch_send_messages( + watch: *mut GstRTSPWatch, + messages: *mut GstRTSPMessage, + n_messages: c_uint, + id: *mut c_uint, + ) -> GstRTSPResult; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_rtsp_watch_set_flushing(watch: *mut GstRTSPWatch, flushing: gboolean); #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_rtsp_watch_set_send_backlog(watch: *mut GstRTSPWatch, bytes: size_t, messages: c_uint); + pub fn gst_rtsp_watch_set_send_backlog( + watch: *mut GstRTSPWatch, + bytes: size_t, + messages: c_uint, + ); pub fn gst_rtsp_watch_unref(watch: *mut GstRTSPWatch); #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_rtsp_watch_wait_backlog(watch: *mut GstRTSPWatch, timeout: *mut glib::GTimeVal) -> GstRTSPResult; - pub fn gst_rtsp_watch_write_data(watch: *mut GstRTSPWatch, data: *const u8, size: c_uint, id: *mut c_uint) -> GstRTSPResult; - pub fn gst_rtsp_watch_new(conn: *mut GstRTSPConnection, funcs: *mut GstRTSPWatchFuncs, user_data: gpointer, notify: glib::GDestroyNotify) -> *mut GstRTSPWatch; + pub fn gst_rtsp_watch_wait_backlog( + watch: *mut GstRTSPWatch, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; + pub fn gst_rtsp_watch_write_data( + watch: *mut GstRTSPWatch, + data: *const u8, + size: c_uint, + id: *mut c_uint, + ) -> GstRTSPResult; + pub fn gst_rtsp_watch_new( + conn: *mut GstRTSPConnection, + funcs: *mut GstRTSPWatchFuncs, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstRTSPWatch; //========================================================================= // GstRTSPExtension //========================================================================= pub fn gst_rtsp_extension_get_type() -> GType; - pub fn gst_rtsp_extension_after_send(ext: *mut GstRTSPExtension, req: *mut GstRTSPMessage, resp: *mut GstRTSPMessage) -> GstRTSPResult; - pub fn gst_rtsp_extension_before_send(ext: *mut GstRTSPExtension, req: *mut GstRTSPMessage) -> GstRTSPResult; - pub fn gst_rtsp_extension_configure_stream(ext: *mut GstRTSPExtension, caps: *mut gst::GstCaps) -> gboolean; - pub fn gst_rtsp_extension_detect_server(ext: *mut GstRTSPExtension, resp: *mut GstRTSPMessage) -> gboolean; - pub fn gst_rtsp_extension_get_transports(ext: *mut GstRTSPExtension, protocols: GstRTSPLowerTrans, transport: *mut *mut c_char) -> GstRTSPResult; - pub fn gst_rtsp_extension_parse_sdp(ext: *mut GstRTSPExtension, sdp: *mut gst_sdp::GstSDPMessage, s: *mut gst::GstStructure) -> GstRTSPResult; - pub fn gst_rtsp_extension_receive_request(ext: *mut GstRTSPExtension, req: *mut GstRTSPMessage) -> GstRTSPResult; - pub fn gst_rtsp_extension_send(ext: *mut GstRTSPExtension, req: *mut GstRTSPMessage, resp: *mut GstRTSPMessage) -> GstRTSPResult; - pub fn gst_rtsp_extension_setup_media(ext: *mut GstRTSPExtension, media: *mut gst_sdp::GstSDPMedia) -> GstRTSPResult; - pub fn gst_rtsp_extension_stream_select(ext: *mut GstRTSPExtension, url: *mut GstRTSPUrl) -> GstRTSPResult; + pub fn gst_rtsp_extension_after_send( + ext: *mut GstRTSPExtension, + req: *mut GstRTSPMessage, + resp: *mut GstRTSPMessage, + ) -> GstRTSPResult; + pub fn gst_rtsp_extension_before_send( + ext: *mut GstRTSPExtension, + req: *mut GstRTSPMessage, + ) -> GstRTSPResult; + pub fn gst_rtsp_extension_configure_stream( + ext: *mut GstRTSPExtension, + caps: *mut gst::GstCaps, + ) -> gboolean; + pub fn gst_rtsp_extension_detect_server( + ext: *mut GstRTSPExtension, + resp: *mut GstRTSPMessage, + ) -> gboolean; + pub fn gst_rtsp_extension_get_transports( + ext: *mut GstRTSPExtension, + protocols: GstRTSPLowerTrans, + transport: *mut *mut c_char, + ) -> GstRTSPResult; + pub fn gst_rtsp_extension_parse_sdp( + ext: *mut GstRTSPExtension, + sdp: *mut gst_sdp::GstSDPMessage, + s: *mut gst::GstStructure, + ) -> GstRTSPResult; + pub fn gst_rtsp_extension_receive_request( + ext: *mut GstRTSPExtension, + req: *mut GstRTSPMessage, + ) -> GstRTSPResult; + pub fn gst_rtsp_extension_send( + ext: *mut GstRTSPExtension, + req: *mut GstRTSPMessage, + resp: *mut GstRTSPMessage, + ) -> GstRTSPResult; + pub fn gst_rtsp_extension_setup_media( + ext: *mut GstRTSPExtension, + media: *mut gst_sdp::GstSDPMedia, + ) -> GstRTSPResult; + pub fn gst_rtsp_extension_stream_select( + ext: *mut GstRTSPExtension, + url: *mut GstRTSPUrl, + ) -> GstRTSPResult; //========================================================================= // Other functions @@ -902,15 +1262,38 @@ extern "C" { pub fn gst_rtsp_find_header_field(header: *const c_char) -> GstRTSPHeaderField; pub fn gst_rtsp_find_method(method: *const c_char) -> GstRTSPMethod; #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_rtsp_generate_digest_auth_response(algorithm: *const c_char, method: *const c_char, realm: *const c_char, username: *const c_char, password: *const c_char, uri: *const c_char, nonce: *const c_char) -> *mut c_char; + pub fn gst_rtsp_generate_digest_auth_response( + algorithm: *const c_char, + method: *const c_char, + realm: *const c_char, + username: *const c_char, + password: *const c_char, + uri: *const c_char, + nonce: *const c_char, + ) -> *mut c_char; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_rtsp_generate_digest_auth_response_from_md5(algorithm: *const c_char, method: *const c_char, md5: *const c_char, uri: *const c_char, nonce: *const c_char) -> *mut c_char; + pub fn gst_rtsp_generate_digest_auth_response_from_md5( + algorithm: *const c_char, + method: *const c_char, + md5: *const c_char, + uri: *const c_char, + nonce: *const c_char, + ) -> *mut c_char; pub fn gst_rtsp_header_allow_multiple(field: GstRTSPHeaderField) -> gboolean; pub fn gst_rtsp_header_as_text(field: GstRTSPHeaderField) -> *const c_char; pub fn gst_rtsp_message_new(msg: *mut *mut GstRTSPMessage) -> GstRTSPResult; pub fn gst_rtsp_message_new_data(msg: *mut *mut GstRTSPMessage, channel: u8) -> GstRTSPResult; - pub fn gst_rtsp_message_new_request(msg: *mut *mut GstRTSPMessage, method: GstRTSPMethod, uri: *const c_char) -> GstRTSPResult; - pub fn gst_rtsp_message_new_response(msg: *mut *mut GstRTSPMessage, code: GstRTSPStatusCode, reason: *const c_char, request: *const GstRTSPMessage) -> GstRTSPResult; + pub fn gst_rtsp_message_new_request( + msg: *mut *mut GstRTSPMessage, + method: GstRTSPMethod, + uri: *const c_char, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_new_response( + msg: *mut *mut GstRTSPMessage, + code: GstRTSPStatusCode, + reason: *const c_char, + request: *const GstRTSPMessage, + ) -> GstRTSPResult; pub fn gst_rtsp_options_as_text(options: GstRTSPMethod) -> *mut c_char; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_rtsp_options_from_text(options: *const c_char) -> GstRTSPMethod; diff --git a/gstreamer-rtsp-sys/tests/abi.rs b/gstreamer-rtsp-sys/tests/abi.rs index 13151ef9a..30fca4c75 100644 --- a/gstreamer-rtsp-sys/tests/abi.rs +++ b/gstreamer-rtsp-sys/tests/abi.rs @@ -5,13 +5,13 @@ extern crate gstreamer_rtsp_sys; extern crate shell_words; extern crate tempdir; +use gstreamer_rtsp_sys::*; use std::env; use std::error::Error; -use std::path::Path; use std::mem::{align_of, size_of}; +use std::path::Path; use std::process::Command; use std::str; -use gstreamer_rtsp_sys::*; static PACKAGES: &[&str] = &["gstreamer-rtsp-1.0"]; @@ -47,8 +47,7 @@ impl Compiler { cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { - return Err(format!("compilation command {:?} failed, {}", - &cmd, status).into()); + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } @@ -77,14 +76,12 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { cmd.args(packages); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {:?} returned {}", - &cmd, out.status).into()); + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } - #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, @@ -115,9 +112,8 @@ impl Results { fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", - self.passed, - self.failed, - self.failed_to_compile) + self.passed, self.failed, self.failed_to_compile + ) } fn expect_total_success(&self) { if self.failed == 0 { @@ -133,24 +129,28 @@ fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!("1", - get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), - "failed to obtain correct constant value for 1"); + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); - eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_value, c_value); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); } } }; @@ -166,24 +166,31 @@ fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!(Layout {size: 1, alignment: 1}, - get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), - "failed to obtain correct layout for char type"); + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); - eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_layout, &c_layout); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); } } }; @@ -203,15 +210,14 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result Result> { @@ -223,47 +229,204 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result(), alignment: align_of::()}), - ("GstRTSPAuthMethod", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPAuthParam", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPEvent", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPExtensionInterface", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPFamily", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPHeaderField", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPLowerTrans", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPMessage", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPMethod", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPMsgType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPProfile", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPRange", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPRangeUnit", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPResult", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPState", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPStatusCode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPTime", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPTime2", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPTimeRange", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPTimeType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPTransMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPTransport", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPUrl", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPVersion", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRTSPWatchFuncs", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstRTSPAuthCredential", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPAuthMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPAuthParam", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPEvent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPExtensionInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPFamily", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPHeaderField", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPLowerTrans", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMessage", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMsgType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPProfile", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPRange", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPRangeUnit", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPStatusCode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPTime", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPTime2", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPTimeRange", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPTimeType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPTransMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPTransport", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPUrl", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPVersion", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPWatchFuncs", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ @@ -435,7 +598,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_RTSP_STS_FORBIDDEN", "403"), ("(gint) GST_RTSP_STS_GATEWAY_TIMEOUT", "504"), ("(gint) GST_RTSP_STS_GONE", "410"), - ("(gint) GST_RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE", "456"), + ( + "(gint) GST_RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE", + "456", + ), ("(gint) GST_RTSP_STS_INTERNAL_SERVER_ERROR", "500"), ("(gint) GST_RTSP_STS_INVALID", "0"), ("(gint) GST_RTSP_STS_INVALID_RANGE", "457"), @@ -453,7 +619,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_RTSP_STS_NOT_IMPLEMENTED", "501"), ("(gint) GST_RTSP_STS_NOT_MODIFIED", "304"), ("(gint) GST_RTSP_STS_OK", "200"), - ("(gint) GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED", "460"), + ( + "(gint) GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED", + "460", + ), ("(gint) GST_RTSP_STS_OPTION_NOT_SUPPORTED", "551"), ("(gint) GST_RTSP_STS_PARAMETER_IS_READONLY", "458"), ("(gint) GST_RTSP_STS_PARAMETER_NOT_UNDERSTOOD", "451"), @@ -485,5 +654,3 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_RTSP_VERSION_2_0", "32"), ("(gint) GST_RTSP_VERSION_INVALID", "0"), ]; - - diff --git a/gstreamer-sdp-sys/build.rs b/gstreamer-sdp-sys/build.rs index 5f809f293..ea1f82676 100644 --- a/gstreamer-sdp-sys/build.rs +++ b/gstreamer-sdp-sys/build.rs @@ -6,8 +6,8 @@ extern crate pkg_config; use pkg_config::{Config, Error}; use std::env; -use std::io::prelude::*; use std::io; +use std::io::prelude::*; use std::process; fn main() { @@ -48,7 +48,7 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()) + return Ok(()); } let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); @@ -70,8 +70,10 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } for path in library.link_paths.iter() { - println!("cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist")); + println!( + "cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist") + ); } } Ok(()) @@ -85,4 +87,3 @@ fn find() -> Result<(), Error> { Err(err) => Err(err), } } - diff --git a/gstreamer-sdp-sys/src/lib.rs b/gstreamer-sdp-sys/src/lib.rs index 26b5ce4a2..eb2302660 100644 --- a/gstreamer-sdp-sys/src/lib.rs +++ b/gstreamer-sdp-sys/src/lib.rs @@ -3,17 +3,22 @@ // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] -extern crate libc; extern crate glib_sys as glib; extern crate gobject_sys as gobject; extern crate gstreamer_sys as gst; +extern crate libc; #[allow(unused_imports)] -use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, - c_short, c_ushort, c_long, c_ulong, - c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; +use libc::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, + intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -135,10 +140,10 @@ pub struct GstMIKEYMapSRTP { impl ::std::fmt::Debug for GstMIKEYMapSRTP { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMIKEYMapSRTP @ {:?}", self as *const _)) - .field("policy", &self.policy) - .field("ssrc", &self.ssrc) - .field("roc", &self.roc) - .finish() + .field("policy", &self.policy) + .field("ssrc", &self.ssrc) + .field("roc", &self.roc) + .finish() } } @@ -159,15 +164,15 @@ pub struct GstMIKEYMessage { impl ::std::fmt::Debug for GstMIKEYMessage { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMIKEYMessage @ {:?}", self as *const _)) - .field("version", &self.version) - .field("type_", &self.type_) - .field("V", &self.V) - .field("prf_func", &self.prf_func) - .field("CSB_id", &self.CSB_id) - .field("map_type", &self.map_type) - .field("map_info", &self.map_info) - .field("payloads", &self.payloads) - .finish() + .field("version", &self.version) + .field("type_", &self.type_) + .field("V", &self.V) + .field("prf_func", &self.prf_func) + .field("CSB_id", &self.CSB_id) + .field("map_type", &self.map_type) + .field("map_info", &self.map_info) + .field("payloads", &self.payloads) + .finish() } } @@ -182,9 +187,9 @@ pub struct GstMIKEYPayload { impl ::std::fmt::Debug for GstMIKEYPayload { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMIKEYPayload @ {:?}", self as *const _)) - .field("type_", &self.type_) - .field("len", &self.len) - .finish() + .field("type_", &self.type_) + .field("len", &self.len) + .finish() } } @@ -200,11 +205,11 @@ pub struct GstMIKEYPayloadKEMAC { impl ::std::fmt::Debug for GstMIKEYPayloadKEMAC { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMIKEYPayloadKEMAC @ {:?}", self as *const _)) - .field("pt", &self.pt) - .field("enc_alg", &self.enc_alg) - .field("mac_alg", &self.mac_alg) - .field("subpayloads", &self.subpayloads) - .finish() + .field("pt", &self.pt) + .field("enc_alg", &self.enc_alg) + .field("mac_alg", &self.mac_alg) + .field("subpayloads", &self.subpayloads) + .finish() } } @@ -225,16 +230,16 @@ pub struct GstMIKEYPayloadKeyData { impl ::std::fmt::Debug for GstMIKEYPayloadKeyData { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMIKEYPayloadKeyData @ {:?}", self as *const _)) - .field("pt", &self.pt) - .field("key_type", &self.key_type) - .field("key_len", &self.key_len) - .field("key_data", &self.key_data) - .field("salt_len", &self.salt_len) - .field("salt_data", &self.salt_data) - .field("kv_type", &self.kv_type) - .field("kv_len", &self.kv_len) - .field("kv_data", &self.kv_data) - .finish() + .field("pt", &self.pt) + .field("key_type", &self.key_type) + .field("key_len", &self.key_len) + .field("key_data", &self.key_data) + .field("salt_len", &self.salt_len) + .field("salt_data", &self.salt_data) + .field("kv_type", &self.kv_type) + .field("kv_len", &self.kv_len) + .field("kv_data", &self.kv_data) + .finish() } } @@ -250,11 +255,11 @@ pub struct GstMIKEYPayloadPKE { impl ::std::fmt::Debug for GstMIKEYPayloadPKE { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMIKEYPayloadPKE @ {:?}", self as *const _)) - .field("pt", &self.pt) - .field("C", &self.C) - .field("data_len", &self.data_len) - .field("data", &self.data) - .finish() + .field("pt", &self.pt) + .field("C", &self.C) + .field("data_len", &self.data_len) + .field("data", &self.data) + .finish() } } @@ -269,10 +274,10 @@ pub struct GstMIKEYPayloadRAND { impl ::std::fmt::Debug for GstMIKEYPayloadRAND { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMIKEYPayloadRAND @ {:?}", self as *const _)) - .field("pt", &self.pt) - .field("len", &self.len) - .field("rand", &self.rand) - .finish() + .field("pt", &self.pt) + .field("len", &self.len) + .field("rand", &self.rand) + .finish() } } @@ -288,11 +293,11 @@ pub struct GstMIKEYPayloadSP { impl ::std::fmt::Debug for GstMIKEYPayloadSP { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMIKEYPayloadSP @ {:?}", self as *const _)) - .field("pt", &self.pt) - .field("policy", &self.policy) - .field("proto", &self.proto) - .field("params", &self.params) - .finish() + .field("pt", &self.pt) + .field("policy", &self.policy) + .field("proto", &self.proto) + .field("params", &self.params) + .finish() } } @@ -307,10 +312,10 @@ pub struct GstMIKEYPayloadSPParam { impl ::std::fmt::Debug for GstMIKEYPayloadSPParam { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMIKEYPayloadSPParam @ {:?}", self as *const _)) - .field("type_", &self.type_) - .field("len", &self.len) - .field("val", &self.val) - .finish() + .field("type_", &self.type_) + .field("len", &self.len) + .field("val", &self.val) + .finish() } } @@ -325,10 +330,10 @@ pub struct GstMIKEYPayloadT { impl ::std::fmt::Debug for GstMIKEYPayloadT { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMIKEYPayloadT @ {:?}", self as *const _)) - .field("pt", &self.pt) - .field("type_", &self.type_) - .field("ts_value", &self.ts_value) - .finish() + .field("pt", &self.pt) + .field("type_", &self.type_) + .field("ts_value", &self.ts_value) + .finish() } } @@ -342,9 +347,9 @@ pub struct GstSDPAttribute { impl ::std::fmt::Debug for GstSDPAttribute { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstSDPAttribute @ {:?}", self as *const _)) - .field("key", &self.key) - .field("value", &self.value) - .finish() + .field("key", &self.key) + .field("value", &self.value) + .finish() } } @@ -358,9 +363,9 @@ pub struct GstSDPBandwidth { impl ::std::fmt::Debug for GstSDPBandwidth { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstSDPBandwidth @ {:?}", self as *const _)) - .field("bwtype", &self.bwtype) - .field("bandwidth", &self.bandwidth) - .finish() + .field("bwtype", &self.bwtype) + .field("bandwidth", &self.bandwidth) + .finish() } } @@ -377,12 +382,12 @@ pub struct GstSDPConnection { impl ::std::fmt::Debug for GstSDPConnection { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstSDPConnection @ {:?}", self as *const _)) - .field("nettype", &self.nettype) - .field("addrtype", &self.addrtype) - .field("address", &self.address) - .field("ttl", &self.ttl) - .field("addr_number", &self.addr_number) - .finish() + .field("nettype", &self.nettype) + .field("addrtype", &self.addrtype) + .field("address", &self.address) + .field("ttl", &self.ttl) + .field("addr_number", &self.addr_number) + .finish() } } @@ -396,9 +401,9 @@ pub struct GstSDPKey { impl ::std::fmt::Debug for GstSDPKey { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstSDPKey @ {:?}", self as *const _)) - .field("type_", &self.type_) - .field("data", &self.data) - .finish() + .field("type_", &self.type_) + .field("data", &self.data) + .finish() } } @@ -420,17 +425,17 @@ pub struct GstSDPMedia { impl ::std::fmt::Debug for GstSDPMedia { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstSDPMedia @ {:?}", self as *const _)) - .field("media", &self.media) - .field("port", &self.port) - .field("num_ports", &self.num_ports) - .field("proto", &self.proto) - .field("fmts", &self.fmts) - .field("information", &self.information) - .field("connections", &self.connections) - .field("bandwidths", &self.bandwidths) - .field("key", &self.key) - .field("attributes", &self.attributes) - .finish() + .field("media", &self.media) + .field("port", &self.port) + .field("num_ports", &self.num_ports) + .field("proto", &self.proto) + .field("fmts", &self.fmts) + .field("information", &self.information) + .field("connections", &self.connections) + .field("bandwidths", &self.bandwidths) + .field("key", &self.key) + .field("attributes", &self.attributes) + .finish() } } @@ -456,21 +461,21 @@ pub struct GstSDPMessage { impl ::std::fmt::Debug for GstSDPMessage { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstSDPMessage @ {:?}", self as *const _)) - .field("version", &self.version) - .field("origin", &self.origin) - .field("session_name", &self.session_name) - .field("information", &self.information) - .field("uri", &self.uri) - .field("emails", &self.emails) - .field("phones", &self.phones) - .field("connection", &self.connection) - .field("bandwidths", &self.bandwidths) - .field("times", &self.times) - .field("zones", &self.zones) - .field("key", &self.key) - .field("attributes", &self.attributes) - .field("medias", &self.medias) - .finish() + .field("version", &self.version) + .field("origin", &self.origin) + .field("session_name", &self.session_name) + .field("information", &self.information) + .field("uri", &self.uri) + .field("emails", &self.emails) + .field("phones", &self.phones) + .field("connection", &self.connection) + .field("bandwidths", &self.bandwidths) + .field("times", &self.times) + .field("zones", &self.zones) + .field("key", &self.key) + .field("attributes", &self.attributes) + .field("medias", &self.medias) + .finish() } } @@ -488,13 +493,13 @@ pub struct GstSDPOrigin { impl ::std::fmt::Debug for GstSDPOrigin { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstSDPOrigin @ {:?}", self as *const _)) - .field("username", &self.username) - .field("sess_id", &self.sess_id) - .field("sess_version", &self.sess_version) - .field("nettype", &self.nettype) - .field("addrtype", &self.addrtype) - .field("addr", &self.addr) - .finish() + .field("username", &self.username) + .field("sess_id", &self.sess_id) + .field("sess_version", &self.sess_version) + .field("nettype", &self.nettype) + .field("addrtype", &self.addrtype) + .field("addr", &self.addr) + .finish() } } @@ -509,10 +514,10 @@ pub struct GstSDPTime { impl ::std::fmt::Debug for GstSDPTime { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstSDPTime @ {:?}", self as *const _)) - .field("start", &self.start) - .field("stop", &self.stop) - .field("repeat", &self.repeat) - .finish() + .field("start", &self.start) + .field("stop", &self.stop) + .field("repeat", &self.repeat) + .finish() } } @@ -526,9 +531,9 @@ pub struct GstSDPZone { impl ::std::fmt::Debug for GstSDPZone { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstSDPZone @ {:?}", self as *const _)) - .field("time", &self.time) - .field("typed_time", &self.typed_time) - .finish() + .field("time", &self.time) + .field("typed_time", &self.typed_time) + .finish() } } @@ -541,55 +546,126 @@ extern "C" { #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_mikey_message_new() -> *mut GstMIKEYMessage; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_message_new_from_bytes(bytes: *mut glib::GBytes, info: *mut GstMIKEYDecryptInfo, error: *mut *mut glib::GError) -> *mut GstMIKEYMessage; + pub fn gst_mikey_message_new_from_bytes( + bytes: *mut glib::GBytes, + info: *mut GstMIKEYDecryptInfo, + error: *mut *mut glib::GError, + ) -> *mut GstMIKEYMessage; #[cfg(any(feature = "v1_8", feature = "dox"))] pub fn gst_mikey_message_new_from_caps(caps: *mut gst::GstCaps) -> *mut GstMIKEYMessage; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_message_new_from_data(data: gconstpointer, size: size_t, info: *mut GstMIKEYDecryptInfo, error: *mut *mut glib::GError) -> *mut GstMIKEYMessage; + pub fn gst_mikey_message_new_from_data( + data: gconstpointer, + size: size_t, + info: *mut GstMIKEYDecryptInfo, + error: *mut *mut glib::GError, + ) -> *mut GstMIKEYMessage; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_message_add_cs_srtp(msg: *mut GstMIKEYMessage, policy: u8, ssrc: u32, roc: u32) -> gboolean; + pub fn gst_mikey_message_add_cs_srtp( + msg: *mut GstMIKEYMessage, + policy: u8, + ssrc: u32, + roc: u32, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_message_add_payload(msg: *mut GstMIKEYMessage, payload: *mut GstMIKEYPayload) -> gboolean; + pub fn gst_mikey_message_add_payload( + msg: *mut GstMIKEYMessage, + payload: *mut GstMIKEYPayload, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_message_add_pke(msg: *mut GstMIKEYMessage, C: GstMIKEYCacheType, data_len: u16, data: *const u8) -> gboolean; + pub fn gst_mikey_message_add_pke( + msg: *mut GstMIKEYMessage, + C: GstMIKEYCacheType, + data_len: u16, + data: *const u8, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_message_add_rand(msg: *mut GstMIKEYMessage, len: u8, rand: *const u8) -> gboolean; + pub fn gst_mikey_message_add_rand( + msg: *mut GstMIKEYMessage, + len: u8, + rand: *const u8, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_mikey_message_add_rand_len(msg: *mut GstMIKEYMessage, len: u8) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_message_add_t(msg: *mut GstMIKEYMessage, type_: GstMIKEYTSType, ts_value: *const u8) -> gboolean; + pub fn gst_mikey_message_add_t( + msg: *mut GstMIKEYMessage, + type_: GstMIKEYTSType, + ts_value: *const u8, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_mikey_message_add_t_now_ntp_utc(msg: *mut GstMIKEYMessage) -> gboolean; #[cfg(any(feature = "v1_8", feature = "dox"))] pub fn gst_mikey_message_base64_encode(msg: *mut GstMIKEYMessage) -> *mut c_char; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_message_find_payload(msg: *const GstMIKEYMessage, type_: GstMIKEYPayloadType, nth: c_uint) -> *const GstMIKEYPayload; + pub fn gst_mikey_message_find_payload( + msg: *const GstMIKEYMessage, + type_: GstMIKEYPayloadType, + nth: c_uint, + ) -> *const GstMIKEYPayload; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_message_get_cs_srtp(msg: *const GstMIKEYMessage, idx: c_uint) -> *const GstMIKEYMapSRTP; + pub fn gst_mikey_message_get_cs_srtp( + msg: *const GstMIKEYMessage, + idx: c_uint, + ) -> *const GstMIKEYMapSRTP; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_mikey_message_get_n_cs(msg: *const GstMIKEYMessage) -> c_uint; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_mikey_message_get_n_payloads(msg: *const GstMIKEYMessage) -> c_uint; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_message_get_payload(msg: *const GstMIKEYMessage, idx: c_uint) -> *const GstMIKEYPayload; + pub fn gst_mikey_message_get_payload( + msg: *const GstMIKEYMessage, + idx: c_uint, + ) -> *const GstMIKEYPayload; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_message_insert_cs_srtp(msg: *mut GstMIKEYMessage, idx: c_int, map: *const GstMIKEYMapSRTP) -> gboolean; + pub fn gst_mikey_message_insert_cs_srtp( + msg: *mut GstMIKEYMessage, + idx: c_int, + map: *const GstMIKEYMapSRTP, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_message_insert_payload(msg: *mut GstMIKEYMessage, idx: c_uint, payload: *mut GstMIKEYPayload) -> gboolean; + pub fn gst_mikey_message_insert_payload( + msg: *mut GstMIKEYMessage, + idx: c_uint, + payload: *mut GstMIKEYPayload, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_mikey_message_remove_cs_srtp(msg: *mut GstMIKEYMessage, idx: c_int) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_mikey_message_remove_payload(msg: *mut GstMIKEYMessage, idx: c_uint) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_message_replace_cs_srtp(msg: *mut GstMIKEYMessage, idx: c_int, map: *const GstMIKEYMapSRTP) -> gboolean; + pub fn gst_mikey_message_replace_cs_srtp( + msg: *mut GstMIKEYMessage, + idx: c_int, + map: *const GstMIKEYMapSRTP, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_message_replace_payload(msg: *mut GstMIKEYMessage, idx: c_uint, payload: *mut GstMIKEYPayload) -> gboolean; + pub fn gst_mikey_message_replace_payload( + msg: *mut GstMIKEYMessage, + idx: c_uint, + payload: *mut GstMIKEYPayload, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_message_set_info(msg: *mut GstMIKEYMessage, version: u8, type_: GstMIKEYType, V: gboolean, prf_func: GstMIKEYPRFFunc, CSB_id: u32, map_type: GstMIKEYMapType) -> gboolean; + pub fn gst_mikey_message_set_info( + msg: *mut GstMIKEYMessage, + version: u8, + type_: GstMIKEYType, + V: gboolean, + prf_func: GstMIKEYPRFFunc, + CSB_id: u32, + map_type: GstMIKEYMapType, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_message_to_bytes(msg: *mut GstMIKEYMessage, info: *mut GstMIKEYEncryptInfo, error: *mut *mut glib::GError) -> *mut glib::GBytes; + pub fn gst_mikey_message_to_bytes( + msg: *mut GstMIKEYMessage, + info: *mut GstMIKEYEncryptInfo, + error: *mut *mut glib::GError, + ) -> *mut glib::GBytes; #[cfg(any(feature = "v1_8_1", feature = "dox"))] - pub fn gst_mikey_message_to_caps(msg: *const GstMIKEYMessage, caps: *mut gst::GstCaps) -> gboolean; + pub fn gst_mikey_message_to_caps( + msg: *const GstMIKEYMessage, + caps: *mut gst::GstCaps, + ) -> gboolean; //========================================================================= // GstMIKEYPayload @@ -598,39 +674,99 @@ extern "C" { #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_mikey_payload_new(type_: GstMIKEYPayloadType) -> *mut GstMIKEYPayload; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_payload_kemac_add_sub(payload: *mut GstMIKEYPayload, newpay: *mut GstMIKEYPayload) -> gboolean; + pub fn gst_mikey_payload_kemac_add_sub( + payload: *mut GstMIKEYPayload, + newpay: *mut GstMIKEYPayload, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_mikey_payload_kemac_get_n_sub(payload: *const GstMIKEYPayload) -> c_uint; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_payload_kemac_get_sub(payload: *const GstMIKEYPayload, idx: c_uint) -> *const GstMIKEYPayload; + pub fn gst_mikey_payload_kemac_get_sub( + payload: *const GstMIKEYPayload, + idx: c_uint, + ) -> *const GstMIKEYPayload; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_payload_kemac_remove_sub(payload: *mut GstMIKEYPayload, idx: c_uint) -> gboolean; + pub fn gst_mikey_payload_kemac_remove_sub( + payload: *mut GstMIKEYPayload, + idx: c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_payload_kemac_set(payload: *mut GstMIKEYPayload, enc_alg: GstMIKEYEncAlg, mac_alg: GstMIKEYMacAlg) -> gboolean; + pub fn gst_mikey_payload_kemac_set( + payload: *mut GstMIKEYPayload, + enc_alg: GstMIKEYEncAlg, + mac_alg: GstMIKEYMacAlg, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_payload_key_data_set_interval(payload: *mut GstMIKEYPayload, vf_len: u8, vf_data: *const u8, vt_len: u8, vt_data: *const u8) -> gboolean; + pub fn gst_mikey_payload_key_data_set_interval( + payload: *mut GstMIKEYPayload, + vf_len: u8, + vf_data: *const u8, + vt_len: u8, + vt_data: *const u8, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_payload_key_data_set_key(payload: *mut GstMIKEYPayload, key_type: GstMIKEYKeyDataType, key_len: u16, key_data: *const u8) -> gboolean; + pub fn gst_mikey_payload_key_data_set_key( + payload: *mut GstMIKEYPayload, + key_type: GstMIKEYKeyDataType, + key_len: u16, + key_data: *const u8, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_payload_key_data_set_salt(payload: *mut GstMIKEYPayload, salt_len: u16, salt_data: *const u8) -> gboolean; + pub fn gst_mikey_payload_key_data_set_salt( + payload: *mut GstMIKEYPayload, + salt_len: u16, + salt_data: *const u8, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_payload_key_data_set_spi(payload: *mut GstMIKEYPayload, spi_len: u8, spi_data: *const u8) -> gboolean; + pub fn gst_mikey_payload_key_data_set_spi( + payload: *mut GstMIKEYPayload, + spi_len: u8, + spi_data: *const u8, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_payload_pke_set(payload: *mut GstMIKEYPayload, C: GstMIKEYCacheType, data_len: u16, data: *const u8) -> gboolean; + pub fn gst_mikey_payload_pke_set( + payload: *mut GstMIKEYPayload, + C: GstMIKEYCacheType, + data_len: u16, + data: *const u8, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_payload_rand_set(payload: *mut GstMIKEYPayload, len: u8, rand: *const u8) -> gboolean; + pub fn gst_mikey_payload_rand_set( + payload: *mut GstMIKEYPayload, + len: u8, + rand: *const u8, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_payload_sp_add_param(payload: *mut GstMIKEYPayload, type_: u8, len: u8, val: *const u8) -> gboolean; + pub fn gst_mikey_payload_sp_add_param( + payload: *mut GstMIKEYPayload, + type_: u8, + len: u8, + val: *const u8, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_mikey_payload_sp_get_n_params(payload: *const GstMIKEYPayload) -> c_uint; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_payload_sp_get_param(payload: *const GstMIKEYPayload, idx: c_uint) -> *const GstMIKEYPayloadSPParam; + pub fn gst_mikey_payload_sp_get_param( + payload: *const GstMIKEYPayload, + idx: c_uint, + ) -> *const GstMIKEYPayloadSPParam; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_payload_sp_remove_param(payload: *mut GstMIKEYPayload, idx: c_uint) -> gboolean; + pub fn gst_mikey_payload_sp_remove_param( + payload: *mut GstMIKEYPayload, + idx: c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_payload_sp_set(payload: *mut GstMIKEYPayload, policy: c_uint, proto: GstMIKEYSecProto) -> gboolean; + pub fn gst_mikey_payload_sp_set( + payload: *mut GstMIKEYPayload, + policy: c_uint, + proto: GstMIKEYSecProto, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_mikey_payload_t_set(payload: *mut GstMIKEYPayload, type_: GstMIKEYTSType, ts_value: *const u8) -> gboolean; + pub fn gst_mikey_payload_t_set( + payload: *mut GstMIKEYPayload, + type_: GstMIKEYTSType, + ts_value: *const u8, + ) -> gboolean; //========================================================================= // GstSDPAttribute @@ -638,7 +774,11 @@ extern "C" { #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_sdp_attribute_clear(attr: *mut GstSDPAttribute) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_attribute_set(attr: *mut GstSDPAttribute, key: *const c_char, value: *const c_char) -> GstSDPResult; + pub fn gst_sdp_attribute_set( + attr: *mut GstSDPAttribute, + key: *const c_char, + value: *const c_char, + ) -> GstSDPResult; //========================================================================= // GstSDPBandwidth @@ -646,7 +786,11 @@ extern "C" { #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_sdp_bandwidth_clear(bw: *mut GstSDPBandwidth) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_bandwidth_set(bw: *mut GstSDPBandwidth, bwtype: *const c_char, bandwidth: c_uint) -> GstSDPResult; + pub fn gst_sdp_bandwidth_set( + bw: *mut GstSDPBandwidth, + bwtype: *const c_char, + bandwidth: c_uint, + ) -> GstSDPResult; //========================================================================= // GstSDPConnection @@ -654,32 +798,80 @@ extern "C" { #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_sdp_connection_clear(conn: *mut GstSDPConnection) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_connection_set(conn: *mut GstSDPConnection, nettype: *const c_char, addrtype: *const c_char, address: *const c_char, ttl: c_uint, addr_number: c_uint) -> GstSDPResult; + pub fn gst_sdp_connection_set( + conn: *mut GstSDPConnection, + nettype: *const c_char, + addrtype: *const c_char, + address: *const c_char, + ttl: c_uint, + addr_number: c_uint, + ) -> GstSDPResult; //========================================================================= // GstSDPMedia //========================================================================= - pub fn gst_sdp_media_add_attribute(media: *mut GstSDPMedia, key: *const c_char, value: *const c_char) -> GstSDPResult; - pub fn gst_sdp_media_add_bandwidth(media: *mut GstSDPMedia, bwtype: *const c_char, bandwidth: c_uint) -> GstSDPResult; - pub fn gst_sdp_media_add_connection(media: *mut GstSDPMedia, nettype: *const c_char, addrtype: *const c_char, address: *const c_char, ttl: c_uint, addr_number: c_uint) -> GstSDPResult; - pub fn gst_sdp_media_add_format(media: *mut GstSDPMedia, format: *const c_char) -> GstSDPResult; + pub fn gst_sdp_media_add_attribute( + media: *mut GstSDPMedia, + key: *const c_char, + value: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_media_add_bandwidth( + media: *mut GstSDPMedia, + bwtype: *const c_char, + bandwidth: c_uint, + ) -> GstSDPResult; + pub fn gst_sdp_media_add_connection( + media: *mut GstSDPMedia, + nettype: *const c_char, + addrtype: *const c_char, + address: *const c_char, + ttl: c_uint, + addr_number: c_uint, + ) -> GstSDPResult; + pub fn gst_sdp_media_add_format(media: *mut GstSDPMedia, format: *const c_char) + -> GstSDPResult; pub fn gst_sdp_media_as_text(media: *const GstSDPMedia) -> *mut c_char; pub fn gst_sdp_media_attributes_len(media: *const GstSDPMedia) -> c_uint; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_sdp_media_attributes_to_caps(media: *const GstSDPMedia, caps: *mut gst::GstCaps) -> GstSDPResult; + pub fn gst_sdp_media_attributes_to_caps( + media: *const GstSDPMedia, + caps: *mut gst::GstCaps, + ) -> GstSDPResult; pub fn gst_sdp_media_bandwidths_len(media: *const GstSDPMedia) -> c_uint; pub fn gst_sdp_media_connections_len(media: *const GstSDPMedia) -> c_uint; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_media_copy(media: *const GstSDPMedia, copy: *mut *mut GstSDPMedia) -> GstSDPResult; + pub fn gst_sdp_media_copy( + media: *const GstSDPMedia, + copy: *mut *mut GstSDPMedia, + ) -> GstSDPResult; pub fn gst_sdp_media_formats_len(media: *const GstSDPMedia) -> c_uint; pub fn gst_sdp_media_free(media: *mut GstSDPMedia) -> GstSDPResult; - pub fn gst_sdp_media_get_attribute(media: *const GstSDPMedia, idx: c_uint) -> *const GstSDPAttribute; - pub fn gst_sdp_media_get_attribute_val(media: *const GstSDPMedia, key: *const c_char) -> *const c_char; - pub fn gst_sdp_media_get_attribute_val_n(media: *const GstSDPMedia, key: *const c_char, nth: c_uint) -> *const c_char; - pub fn gst_sdp_media_get_bandwidth(media: *const GstSDPMedia, idx: c_uint) -> *const GstSDPBandwidth; + pub fn gst_sdp_media_get_attribute( + media: *const GstSDPMedia, + idx: c_uint, + ) -> *const GstSDPAttribute; + pub fn gst_sdp_media_get_attribute_val( + media: *const GstSDPMedia, + key: *const c_char, + ) -> *const c_char; + pub fn gst_sdp_media_get_attribute_val_n( + media: *const GstSDPMedia, + key: *const c_char, + nth: c_uint, + ) -> *const c_char; + pub fn gst_sdp_media_get_bandwidth( + media: *const GstSDPMedia, + idx: c_uint, + ) -> *const GstSDPBandwidth; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_sdp_media_get_caps_from_media(media: *const GstSDPMedia, pt: c_int) -> *mut gst::GstCaps; - pub fn gst_sdp_media_get_connection(media: *const GstSDPMedia, idx: c_uint) -> *const GstSDPConnection; + pub fn gst_sdp_media_get_caps_from_media( + media: *const GstSDPMedia, + pt: c_int, + ) -> *mut gst::GstCaps; + pub fn gst_sdp_media_get_connection( + media: *const GstSDPMedia, + idx: c_uint, + ) -> *const GstSDPConnection; pub fn gst_sdp_media_get_format(media: *const GstSDPMedia, idx: c_uint) -> *const c_char; pub fn gst_sdp_media_get_information(media: *const GstSDPMedia) -> *const c_char; pub fn gst_sdp_media_get_key(media: *const GstSDPMedia) -> *const GstSDPKey; @@ -689,15 +881,34 @@ extern "C" { pub fn gst_sdp_media_get_proto(media: *const GstSDPMedia) -> *const c_char; pub fn gst_sdp_media_init(media: *mut GstSDPMedia) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_media_insert_attribute(media: *mut GstSDPMedia, idx: c_int, attr: *mut GstSDPAttribute) -> GstSDPResult; + pub fn gst_sdp_media_insert_attribute( + media: *mut GstSDPMedia, + idx: c_int, + attr: *mut GstSDPAttribute, + ) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_media_insert_bandwidth(media: *mut GstSDPMedia, idx: c_int, bw: *mut GstSDPBandwidth) -> GstSDPResult; + pub fn gst_sdp_media_insert_bandwidth( + media: *mut GstSDPMedia, + idx: c_int, + bw: *mut GstSDPBandwidth, + ) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_media_insert_connection(media: *mut GstSDPMedia, idx: c_int, conn: *mut GstSDPConnection) -> GstSDPResult; + pub fn gst_sdp_media_insert_connection( + media: *mut GstSDPMedia, + idx: c_int, + conn: *mut GstSDPConnection, + ) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_media_insert_format(media: *mut GstSDPMedia, idx: c_int, format: *const c_char) -> GstSDPResult; + pub fn gst_sdp_media_insert_format( + media: *mut GstSDPMedia, + idx: c_int, + format: *const c_char, + ) -> GstSDPResult; #[cfg(any(feature = "v1_8_1", feature = "dox"))] - pub fn gst_sdp_media_parse_keymgmt(media: *const GstSDPMedia, mikey: *mut *mut GstMIKEYMessage) -> GstSDPResult; + pub fn gst_sdp_media_parse_keymgmt( + media: *const GstSDPMedia, + mikey: *mut *mut GstMIKEYMessage, + ) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_sdp_media_remove_attribute(media: *mut GstSDPMedia, idx: c_uint) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] @@ -707,48 +918,119 @@ extern "C" { #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_sdp_media_remove_format(media: *mut GstSDPMedia, idx: c_uint) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_media_replace_attribute(media: *mut GstSDPMedia, idx: c_uint, attr: *mut GstSDPAttribute) -> GstSDPResult; + pub fn gst_sdp_media_replace_attribute( + media: *mut GstSDPMedia, + idx: c_uint, + attr: *mut GstSDPAttribute, + ) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_media_replace_bandwidth(media: *mut GstSDPMedia, idx: c_uint, bw: *mut GstSDPBandwidth) -> GstSDPResult; + pub fn gst_sdp_media_replace_bandwidth( + media: *mut GstSDPMedia, + idx: c_uint, + bw: *mut GstSDPBandwidth, + ) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_media_replace_connection(media: *mut GstSDPMedia, idx: c_uint, conn: *mut GstSDPConnection) -> GstSDPResult; + pub fn gst_sdp_media_replace_connection( + media: *mut GstSDPMedia, + idx: c_uint, + conn: *mut GstSDPConnection, + ) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_media_replace_format(media: *mut GstSDPMedia, idx: c_uint, format: *const c_char) -> GstSDPResult; - pub fn gst_sdp_media_set_information(media: *mut GstSDPMedia, information: *const c_char) -> GstSDPResult; - pub fn gst_sdp_media_set_key(media: *mut GstSDPMedia, type_: *const c_char, data: *const c_char) -> GstSDPResult; + pub fn gst_sdp_media_replace_format( + media: *mut GstSDPMedia, + idx: c_uint, + format: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_media_set_information( + media: *mut GstSDPMedia, + information: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_media_set_key( + media: *mut GstSDPMedia, + type_: *const c_char, + data: *const c_char, + ) -> GstSDPResult; pub fn gst_sdp_media_set_media(media: *mut GstSDPMedia, med: *const c_char) -> GstSDPResult; - pub fn gst_sdp_media_set_port_info(media: *mut GstSDPMedia, port: c_uint, num_ports: c_uint) -> GstSDPResult; + pub fn gst_sdp_media_set_port_info( + media: *mut GstSDPMedia, + port: c_uint, + num_ports: c_uint, + ) -> GstSDPResult; pub fn gst_sdp_media_set_proto(media: *mut GstSDPMedia, proto: *const c_char) -> GstSDPResult; pub fn gst_sdp_media_uninit(media: *mut GstSDPMedia) -> GstSDPResult; pub fn gst_sdp_media_new(media: *mut *mut GstSDPMedia) -> GstSDPResult; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_sdp_media_set_media_from_caps(caps: *const gst::GstCaps, media: *mut GstSDPMedia) -> GstSDPResult; + pub fn gst_sdp_media_set_media_from_caps( + caps: *const gst::GstCaps, + media: *mut GstSDPMedia, + ) -> GstSDPResult; //========================================================================= // GstSDPMessage //========================================================================= pub fn gst_sdp_message_get_type() -> GType; - pub fn gst_sdp_message_add_attribute(msg: *mut GstSDPMessage, key: *const c_char, value: *const c_char) -> GstSDPResult; - pub fn gst_sdp_message_add_bandwidth(msg: *mut GstSDPMessage, bwtype: *const c_char, bandwidth: c_uint) -> GstSDPResult; - pub fn gst_sdp_message_add_email(msg: *mut GstSDPMessage, email: *const c_char) -> GstSDPResult; - pub fn gst_sdp_message_add_media(msg: *mut GstSDPMessage, media: *mut GstSDPMedia) -> GstSDPResult; - pub fn gst_sdp_message_add_phone(msg: *mut GstSDPMessage, phone: *const c_char) -> GstSDPResult; - pub fn gst_sdp_message_add_time(msg: *mut GstSDPMessage, start: *const c_char, stop: *const c_char, repeat: *mut *const c_char) -> GstSDPResult; - pub fn gst_sdp_message_add_zone(msg: *mut GstSDPMessage, adj_time: *const c_char, typed_time: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_add_attribute( + msg: *mut GstSDPMessage, + key: *const c_char, + value: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_message_add_bandwidth( + msg: *mut GstSDPMessage, + bwtype: *const c_char, + bandwidth: c_uint, + ) -> GstSDPResult; + pub fn gst_sdp_message_add_email(msg: *mut GstSDPMessage, email: *const c_char) + -> GstSDPResult; + pub fn gst_sdp_message_add_media( + msg: *mut GstSDPMessage, + media: *mut GstSDPMedia, + ) -> GstSDPResult; + pub fn gst_sdp_message_add_phone(msg: *mut GstSDPMessage, phone: *const c_char) + -> GstSDPResult; + pub fn gst_sdp_message_add_time( + msg: *mut GstSDPMessage, + start: *const c_char, + stop: *const c_char, + repeat: *mut *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_message_add_zone( + msg: *mut GstSDPMessage, + adj_time: *const c_char, + typed_time: *const c_char, + ) -> GstSDPResult; pub fn gst_sdp_message_as_text(msg: *const GstSDPMessage) -> *mut c_char; pub fn gst_sdp_message_attributes_len(msg: *const GstSDPMessage) -> c_uint; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_sdp_message_attributes_to_caps(msg: *const GstSDPMessage, caps: *mut gst::GstCaps) -> GstSDPResult; + pub fn gst_sdp_message_attributes_to_caps( + msg: *const GstSDPMessage, + caps: *mut gst::GstCaps, + ) -> GstSDPResult; pub fn gst_sdp_message_bandwidths_len(msg: *const GstSDPMessage) -> c_uint; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_message_copy(msg: *const GstSDPMessage, copy: *mut *mut GstSDPMessage) -> GstSDPResult; + pub fn gst_sdp_message_copy( + msg: *const GstSDPMessage, + copy: *mut *mut GstSDPMessage, + ) -> GstSDPResult; pub fn gst_sdp_message_dump(msg: *const GstSDPMessage) -> GstSDPResult; pub fn gst_sdp_message_emails_len(msg: *const GstSDPMessage) -> c_uint; pub fn gst_sdp_message_free(msg: *mut GstSDPMessage) -> GstSDPResult; - pub fn gst_sdp_message_get_attribute(msg: *const GstSDPMessage, idx: c_uint) -> *const GstSDPAttribute; - pub fn gst_sdp_message_get_attribute_val(msg: *const GstSDPMessage, key: *const c_char) -> *const c_char; - pub fn gst_sdp_message_get_attribute_val_n(msg: *const GstSDPMessage, key: *const c_char, nth: c_uint) -> *const c_char; - pub fn gst_sdp_message_get_bandwidth(msg: *const GstSDPMessage, idx: c_uint) -> *const GstSDPBandwidth; + pub fn gst_sdp_message_get_attribute( + msg: *const GstSDPMessage, + idx: c_uint, + ) -> *const GstSDPAttribute; + pub fn gst_sdp_message_get_attribute_val( + msg: *const GstSDPMessage, + key: *const c_char, + ) -> *const c_char; + pub fn gst_sdp_message_get_attribute_val_n( + msg: *const GstSDPMessage, + key: *const c_char, + nth: c_uint, + ) -> *const c_char; + pub fn gst_sdp_message_get_bandwidth( + msg: *const GstSDPMessage, + idx: c_uint, + ) -> *const GstSDPBandwidth; pub fn gst_sdp_message_get_connection(msg: *const GstSDPMessage) -> *const GstSDPConnection; pub fn gst_sdp_message_get_email(msg: *const GstSDPMessage, idx: c_uint) -> *const c_char; pub fn gst_sdp_message_get_information(msg: *const GstSDPMessage) -> *const c_char; @@ -763,20 +1045,47 @@ extern "C" { pub fn gst_sdp_message_get_zone(msg: *const GstSDPMessage, idx: c_uint) -> *const GstSDPZone; pub fn gst_sdp_message_init(msg: *mut GstSDPMessage) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_message_insert_attribute(msg: *mut GstSDPMessage, idx: c_int, attr: *mut GstSDPAttribute) -> GstSDPResult; + pub fn gst_sdp_message_insert_attribute( + msg: *mut GstSDPMessage, + idx: c_int, + attr: *mut GstSDPAttribute, + ) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_message_insert_bandwidth(msg: *mut GstSDPMessage, idx: c_int, bw: *mut GstSDPBandwidth) -> GstSDPResult; + pub fn gst_sdp_message_insert_bandwidth( + msg: *mut GstSDPMessage, + idx: c_int, + bw: *mut GstSDPBandwidth, + ) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_message_insert_email(msg: *mut GstSDPMessage, idx: c_int, email: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_insert_email( + msg: *mut GstSDPMessage, + idx: c_int, + email: *const c_char, + ) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_message_insert_phone(msg: *mut GstSDPMessage, idx: c_int, phone: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_insert_phone( + msg: *mut GstSDPMessage, + idx: c_int, + phone: *const c_char, + ) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_message_insert_time(msg: *mut GstSDPMessage, idx: c_int, t: *mut GstSDPTime) -> GstSDPResult; + pub fn gst_sdp_message_insert_time( + msg: *mut GstSDPMessage, + idx: c_int, + t: *mut GstSDPTime, + ) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_message_insert_zone(msg: *mut GstSDPMessage, idx: c_int, zone: *mut GstSDPZone) -> GstSDPResult; + pub fn gst_sdp_message_insert_zone( + msg: *mut GstSDPMessage, + idx: c_int, + zone: *mut GstSDPZone, + ) -> GstSDPResult; pub fn gst_sdp_message_medias_len(msg: *const GstSDPMessage) -> c_uint; #[cfg(any(feature = "v1_8_1", feature = "dox"))] - pub fn gst_sdp_message_parse_keymgmt(msg: *const GstSDPMessage, mikey: *mut *mut GstMIKEYMessage) -> GstSDPResult; + pub fn gst_sdp_message_parse_keymgmt( + msg: *const GstSDPMessage, + mikey: *mut *mut GstMIKEYMessage, + ) -> GstSDPResult; pub fn gst_sdp_message_phones_len(msg: *const GstSDPMessage) -> c_uint; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_sdp_message_remove_attribute(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult; @@ -791,32 +1100,91 @@ extern "C" { #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_sdp_message_remove_zone(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_message_replace_attribute(msg: *mut GstSDPMessage, idx: c_uint, attr: *mut GstSDPAttribute) -> GstSDPResult; + pub fn gst_sdp_message_replace_attribute( + msg: *mut GstSDPMessage, + idx: c_uint, + attr: *mut GstSDPAttribute, + ) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_message_replace_bandwidth(msg: *mut GstSDPMessage, idx: c_uint, bw: *mut GstSDPBandwidth) -> GstSDPResult; + pub fn gst_sdp_message_replace_bandwidth( + msg: *mut GstSDPMessage, + idx: c_uint, + bw: *mut GstSDPBandwidth, + ) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_message_replace_email(msg: *mut GstSDPMessage, idx: c_uint, email: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_replace_email( + msg: *mut GstSDPMessage, + idx: c_uint, + email: *const c_char, + ) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_message_replace_phone(msg: *mut GstSDPMessage, idx: c_uint, phone: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_replace_phone( + msg: *mut GstSDPMessage, + idx: c_uint, + phone: *const c_char, + ) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_message_replace_time(msg: *mut GstSDPMessage, idx: c_uint, t: *mut GstSDPTime) -> GstSDPResult; + pub fn gst_sdp_message_replace_time( + msg: *mut GstSDPMessage, + idx: c_uint, + t: *mut GstSDPTime, + ) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_message_replace_zone(msg: *mut GstSDPMessage, idx: c_uint, zone: *mut GstSDPZone) -> GstSDPResult; - pub fn gst_sdp_message_set_connection(msg: *mut GstSDPMessage, nettype: *const c_char, addrtype: *const c_char, address: *const c_char, ttl: c_uint, addr_number: c_uint) -> GstSDPResult; - pub fn gst_sdp_message_set_information(msg: *mut GstSDPMessage, information: *const c_char) -> GstSDPResult; - pub fn gst_sdp_message_set_key(msg: *mut GstSDPMessage, type_: *const c_char, data: *const c_char) -> GstSDPResult; - pub fn gst_sdp_message_set_origin(msg: *mut GstSDPMessage, username: *const c_char, sess_id: *const c_char, sess_version: *const c_char, nettype: *const c_char, addrtype: *const c_char, addr: *const c_char) -> GstSDPResult; - pub fn gst_sdp_message_set_session_name(msg: *mut GstSDPMessage, session_name: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_replace_zone( + msg: *mut GstSDPMessage, + idx: c_uint, + zone: *mut GstSDPZone, + ) -> GstSDPResult; + pub fn gst_sdp_message_set_connection( + msg: *mut GstSDPMessage, + nettype: *const c_char, + addrtype: *const c_char, + address: *const c_char, + ttl: c_uint, + addr_number: c_uint, + ) -> GstSDPResult; + pub fn gst_sdp_message_set_information( + msg: *mut GstSDPMessage, + information: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_message_set_key( + msg: *mut GstSDPMessage, + type_: *const c_char, + data: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_message_set_origin( + msg: *mut GstSDPMessage, + username: *const c_char, + sess_id: *const c_char, + sess_version: *const c_char, + nettype: *const c_char, + addrtype: *const c_char, + addr: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_message_set_session_name( + msg: *mut GstSDPMessage, + session_name: *const c_char, + ) -> GstSDPResult; pub fn gst_sdp_message_set_uri(msg: *mut GstSDPMessage, uri: *const c_char) -> GstSDPResult; - pub fn gst_sdp_message_set_version(msg: *mut GstSDPMessage, version: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_set_version( + msg: *mut GstSDPMessage, + version: *const c_char, + ) -> GstSDPResult; pub fn gst_sdp_message_times_len(msg: *const GstSDPMessage) -> c_uint; pub fn gst_sdp_message_uninit(msg: *mut GstSDPMessage) -> GstSDPResult; pub fn gst_sdp_message_zones_len(msg: *const GstSDPMessage) -> c_uint; pub fn gst_sdp_message_as_uri(scheme: *const c_char, msg: *const GstSDPMessage) -> *mut c_char; pub fn gst_sdp_message_new(msg: *mut *mut GstSDPMessage) -> GstSDPResult; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_sdp_message_new_from_text(text: *const c_char, msg: *mut *mut GstSDPMessage) -> GstSDPResult; - pub fn gst_sdp_message_parse_buffer(data: *const u8, size: c_uint, msg: *mut GstSDPMessage) -> GstSDPResult; + pub fn gst_sdp_message_new_from_text( + text: *const c_char, + msg: *mut *mut GstSDPMessage, + ) -> GstSDPResult; + pub fn gst_sdp_message_parse_buffer( + data: *const u8, + size: c_uint, + msg: *mut GstSDPMessage, + ) -> GstSDPResult; pub fn gst_sdp_message_parse_uri(uri: *const c_char, msg: *mut GstSDPMessage) -> GstSDPResult; //========================================================================= @@ -825,7 +1193,12 @@ extern "C" { #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_sdp_time_clear(t: *mut GstSDPTime) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_time_set(t: *mut GstSDPTime, start: *const c_char, stop: *const c_char, repeat: *mut *const c_char) -> GstSDPResult; + pub fn gst_sdp_time_set( + t: *mut GstSDPTime, + start: *const c_char, + stop: *const c_char, + repeat: *mut *const c_char, + ) -> GstSDPResult; //========================================================================= // GstSDPZone @@ -833,12 +1206,20 @@ extern "C" { #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_sdp_zone_clear(zone: *mut GstSDPZone) -> GstSDPResult; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_sdp_zone_set(zone: *mut GstSDPZone, adj_time: *const c_char, typed_time: *const c_char) -> GstSDPResult; + pub fn gst_sdp_zone_set( + zone: *mut GstSDPZone, + adj_time: *const c_char, + typed_time: *const c_char, + ) -> GstSDPResult; //========================================================================= // Other functions //========================================================================= - pub fn gst_sdp_address_is_multicast(nettype: *const c_char, addrtype: *const c_char, addr: *const c_char) -> gboolean; + pub fn gst_sdp_address_is_multicast( + nettype: *const c_char, + addrtype: *const c_char, + addr: *const c_char, + ) -> gboolean; #[cfg(any(feature = "v1_8", feature = "dox"))] pub fn gst_sdp_make_keymgmt(uri: *const c_char, base64: *const c_char) -> *mut c_char; diff --git a/gstreamer-sdp-sys/tests/abi.rs b/gstreamer-sdp-sys/tests/abi.rs index 301980bcf..3a24e4231 100644 --- a/gstreamer-sdp-sys/tests/abi.rs +++ b/gstreamer-sdp-sys/tests/abi.rs @@ -5,13 +5,13 @@ extern crate gstreamer_sdp_sys; extern crate shell_words; extern crate tempdir; +use gstreamer_sdp_sys::*; use std::env; use std::error::Error; -use std::path::Path; use std::mem::{align_of, size_of}; +use std::path::Path; use std::process::Command; use std::str; -use gstreamer_sdp_sys::*; static PACKAGES: &[&str] = &["gstreamer-sdp-1.0"]; @@ -47,8 +47,7 @@ impl Compiler { cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { - return Err(format!("compilation command {:?} failed, {}", - &cmd, status).into()); + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } @@ -77,14 +76,12 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { cmd.args(packages); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {:?} returned {}", - &cmd, out.status).into()); + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } - #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, @@ -115,9 +112,8 @@ impl Results { fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", - self.passed, - self.failed, - self.failed_to_compile) + self.passed, self.failed, self.failed_to_compile + ) } fn expect_total_success(&self) { if self.failed == 0 { @@ -133,24 +129,28 @@ fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!("1", - get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), - "failed to obtain correct constant value for 1"); + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); - eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_value, c_value); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); } } }; @@ -166,24 +166,31 @@ fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!(Layout {size: 1, alignment: 1}, - get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), - "failed to obtain correct layout for char type"); + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); - eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_layout, &c_layout); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); } } }; @@ -203,15 +210,14 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result Result> { @@ -223,53 +229,246 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result(), alignment: align_of::()}), - ("GstMIKEYEncAlg", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYKVType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYKeyDataType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYMacAlg", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYMapSRTP", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYMapType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYMessage", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYPRFFunc", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYPayload", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYPayloadKEMAC", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYPayloadKeyData", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYPayloadPKE", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYPayloadRAND", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYPayloadSP", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYPayloadSPParam", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYPayloadT", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYPayloadType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYSecProto", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYSecSRTP", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYTSType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMIKEYType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSDPAttribute", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSDPBandwidth", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSDPConnection", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSDPKey", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSDPMedia", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSDPMessage", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSDPOrigin", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSDPResult", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSDPTime", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSDPZone", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstMIKEYCacheType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYEncAlg", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYKVType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYKeyDataType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYMacAlg", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYMapSRTP", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYMapType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYMessage", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPRFFunc", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayload", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayloadKEMAC", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayloadKeyData", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayloadPKE", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayloadRAND", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayloadSP", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayloadSPParam", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayloadT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayloadType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYSecProto", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYSecSRTP", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYTSType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPAttribute", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPBandwidth", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPConnection", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPKey", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPMedia", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPMessage", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPOrigin", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPTime", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPZone", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ @@ -340,5 +539,3 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_SDP_EINVAL", "-1"), ("(gint) GST_SDP_OK", "0"), ]; - - diff --git a/gstreamer-sys/build.rs b/gstreamer-sys/build.rs index 9e56e74b4..9c4b16e75 100644 --- a/gstreamer-sys/build.rs +++ b/gstreamer-sys/build.rs @@ -6,8 +6,8 @@ extern crate pkg_config; use pkg_config::{Config, Error}; use std::env; -use std::io::prelude::*; use std::io; +use std::io::prelude::*; use std::process; fn main() { @@ -52,7 +52,7 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()) + return Ok(()); } let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); @@ -74,8 +74,10 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } for path in library.link_paths.iter() { - println!("cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist")); + println!( + "cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist") + ); } } Ok(()) @@ -89,4 +91,3 @@ fn find() -> Result<(), Error> { Err(err) => Err(err), } } - diff --git a/gstreamer-sys/src/lib.rs b/gstreamer-sys/src/lib.rs index f5216dac6..c2252eea7 100644 --- a/gstreamer-sys/src/lib.rs +++ b/gstreamer-sys/src/lib.rs @@ -3,16 +3,21 @@ // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] -extern crate libc; extern crate glib_sys as glib; extern crate gobject_sys as gobject; +extern crate libc; #[allow(unused_imports)] -use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, - c_short, c_ushort, c_long, c_ulong, - c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; +use libc::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, + intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -417,27 +422,43 @@ pub const GST_BUFFER_COPY_ALL: GstBufferCopyFlags = 15; pub const GST_BUFFER_COPY_METADATA: GstBufferCopyFlags = 7; pub const GST_BUFFER_OFFSET_NONE: u64 = 18446744073709551615; pub const GST_CAN_INLINE: c_int = 1; -pub const GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY: *const c_char = b"memory:SystemMemory\0" as *const u8 as *const c_char; +pub const GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY: *const c_char = + b"memory:SystemMemory\0" as *const u8 as *const c_char; pub const GST_CLOCK_TIME_NONE: GstClockTime = 18446744073709551615; pub const GST_DEBUG_BG_MASK: c_int = 240; pub const GST_DEBUG_FG_MASK: c_int = 15; pub const GST_DEBUG_FORMAT_MASK: c_int = 65280; -pub const GST_ELEMENT_FACTORY_KLASS_DECODER: *const c_char = b"Decoder\0" as *const u8 as *const c_char; -pub const GST_ELEMENT_FACTORY_KLASS_DECRYPTOR: *const c_char = b"Decryptor\0" as *const u8 as *const c_char; -pub const GST_ELEMENT_FACTORY_KLASS_DEMUXER: *const c_char = b"Demuxer\0" as *const u8 as *const c_char; -pub const GST_ELEMENT_FACTORY_KLASS_DEPAYLOADER: *const c_char = b"Depayloader\0" as *const u8 as *const c_char; -pub const GST_ELEMENT_FACTORY_KLASS_ENCODER: *const c_char = b"Encoder\0" as *const u8 as *const c_char; -pub const GST_ELEMENT_FACTORY_KLASS_ENCRYPTOR: *const c_char = b"Encryptor\0" as *const u8 as *const c_char; -pub const GST_ELEMENT_FACTORY_KLASS_FORMATTER: *const c_char = b"Formatter\0" as *const u8 as *const c_char; -pub const GST_ELEMENT_FACTORY_KLASS_HARDWARE: *const c_char = b"Hardware\0" as *const u8 as *const c_char; -pub const GST_ELEMENT_FACTORY_KLASS_MEDIA_AUDIO: *const c_char = b"Audio\0" as *const u8 as *const c_char; -pub const GST_ELEMENT_FACTORY_KLASS_MEDIA_IMAGE: *const c_char = b"Image\0" as *const u8 as *const c_char; -pub const GST_ELEMENT_FACTORY_KLASS_MEDIA_METADATA: *const c_char = b"Metadata\0" as *const u8 as *const c_char; -pub const GST_ELEMENT_FACTORY_KLASS_MEDIA_SUBTITLE: *const c_char = b"Subtitle\0" as *const u8 as *const c_char; -pub const GST_ELEMENT_FACTORY_KLASS_MEDIA_VIDEO: *const c_char = b"Video\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_DECODER: *const c_char = + b"Decoder\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_DECRYPTOR: *const c_char = + b"Decryptor\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_DEMUXER: *const c_char = + b"Demuxer\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_DEPAYLOADER: *const c_char = + b"Depayloader\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_ENCODER: *const c_char = + b"Encoder\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_ENCRYPTOR: *const c_char = + b"Encryptor\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_FORMATTER: *const c_char = + b"Formatter\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_HARDWARE: *const c_char = + b"Hardware\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_MEDIA_AUDIO: *const c_char = + b"Audio\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_MEDIA_IMAGE: *const c_char = + b"Image\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_MEDIA_METADATA: *const c_char = + b"Metadata\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_MEDIA_SUBTITLE: *const c_char = + b"Subtitle\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_MEDIA_VIDEO: *const c_char = + b"Video\0" as *const u8 as *const c_char; pub const GST_ELEMENT_FACTORY_KLASS_MUXER: *const c_char = b"Muxer\0" as *const u8 as *const c_char; -pub const GST_ELEMENT_FACTORY_KLASS_PARSER: *const c_char = b"Parser\0" as *const u8 as *const c_char; -pub const GST_ELEMENT_FACTORY_KLASS_PAYLOADER: *const c_char = b"Payloader\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_PARSER: *const c_char = + b"Parser\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_PAYLOADER: *const c_char = + b"Payloader\0" as *const u8 as *const c_char; pub const GST_ELEMENT_FACTORY_KLASS_SINK: *const c_char = b"Sink\0" as *const u8 as *const c_char; pub const GST_ELEMENT_FACTORY_KLASS_SRC: *const c_char = b"Source\0" as *const u8 as *const c_char; pub const GST_ELEMENT_FACTORY_TYPE_ANY: GstElementFactoryListType = 562949953421311; @@ -465,11 +486,14 @@ pub const GST_ELEMENT_FACTORY_TYPE_SINK: GstElementFactoryListType = 4; pub const GST_ELEMENT_FACTORY_TYPE_SRC: GstElementFactoryListType = 8; pub const GST_ELEMENT_FACTORY_TYPE_VIDEO_ENCODER: GstElementFactoryListType = 2814749767106562; pub const GST_ELEMENT_METADATA_AUTHOR: *const c_char = b"author\0" as *const u8 as *const c_char; -pub const GST_ELEMENT_METADATA_DESCRIPTION: *const c_char = b"description\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_METADATA_DESCRIPTION: *const c_char = + b"description\0" as *const u8 as *const c_char; pub const GST_ELEMENT_METADATA_DOC_URI: *const c_char = b"doc-uri\0" as *const u8 as *const c_char; -pub const GST_ELEMENT_METADATA_ICON_NAME: *const c_char = b"icon-name\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_METADATA_ICON_NAME: *const c_char = + b"icon-name\0" as *const u8 as *const c_char; pub const GST_ELEMENT_METADATA_KLASS: *const c_char = b"klass\0" as *const u8 as *const c_char; -pub const GST_ELEMENT_METADATA_LONGNAME: *const c_char = b"long-name\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_METADATA_LONGNAME: *const c_char = + b"long-name\0" as *const u8 as *const c_char; pub const GST_EVENT_NUM_SHIFT: c_int = 8; pub const GST_EVENT_TYPE_BOTH: GstEventTypeFlags = 3; pub const GST_FLAG_SET_MASK_EXACT: c_uint = 4294967295; @@ -487,63 +511,91 @@ pub const GST_PARAM_MUTABLE_PAUSED: c_int = 2048; pub const GST_PARAM_MUTABLE_PLAYING: c_int = 4096; pub const GST_PARAM_MUTABLE_READY: c_int = 1024; pub const GST_PARAM_USER_SHIFT: c_int = 65536; -pub const GST_PROTECTION_SYSTEM_ID_CAPS_FIELD: *const c_char = b"protection-system\0" as *const u8 as *const c_char; -pub const GST_PROTECTION_UNSPECIFIED_SYSTEM_ID: *const c_char = b"unspecified-system-id\0" as *const u8 as *const c_char; +pub const GST_PROTECTION_SYSTEM_ID_CAPS_FIELD: *const c_char = + b"protection-system\0" as *const u8 as *const c_char; +pub const GST_PROTECTION_UNSPECIFIED_SYSTEM_ID: *const c_char = + b"unspecified-system-id\0" as *const u8 as *const c_char; pub const GST_QUERY_NUM_SHIFT: c_int = 8; pub const GST_QUERY_TYPE_BOTH: GstQueryTypeFlags = 3; pub const GST_SECOND: GstClockTimeDiff = 1000000000; pub const GST_SEQNUM_INVALID: c_int = 0; pub const GST_TAG_ALBUM: *const c_char = b"album\0" as *const u8 as *const c_char; pub const GST_TAG_ALBUM_ARTIST: *const c_char = b"album-artist\0" as *const u8 as *const c_char; -pub const GST_TAG_ALBUM_ARTIST_SORTNAME: *const c_char = b"album-artist-sortname\0" as *const u8 as *const c_char; -pub const GST_TAG_ALBUM_GAIN: *const c_char = b"replaygain-album-gain\0" as *const u8 as *const c_char; -pub const GST_TAG_ALBUM_PEAK: *const c_char = b"replaygain-album-peak\0" as *const u8 as *const c_char; +pub const GST_TAG_ALBUM_ARTIST_SORTNAME: *const c_char = + b"album-artist-sortname\0" as *const u8 as *const c_char; +pub const GST_TAG_ALBUM_GAIN: *const c_char = + b"replaygain-album-gain\0" as *const u8 as *const c_char; +pub const GST_TAG_ALBUM_PEAK: *const c_char = + b"replaygain-album-peak\0" as *const u8 as *const c_char; pub const GST_TAG_ALBUM_SORTNAME: *const c_char = b"album-sortname\0" as *const u8 as *const c_char; -pub const GST_TAG_ALBUM_VOLUME_COUNT: *const c_char = b"album-disc-count\0" as *const u8 as *const c_char; -pub const GST_TAG_ALBUM_VOLUME_NUMBER: *const c_char = b"album-disc-number\0" as *const u8 as *const c_char; -pub const GST_TAG_APPLICATION_DATA: *const c_char = b"application-data\0" as *const u8 as *const c_char; -pub const GST_TAG_APPLICATION_NAME: *const c_char = b"application-name\0" as *const u8 as *const c_char; +pub const GST_TAG_ALBUM_VOLUME_COUNT: *const c_char = + b"album-disc-count\0" as *const u8 as *const c_char; +pub const GST_TAG_ALBUM_VOLUME_NUMBER: *const c_char = + b"album-disc-number\0" as *const u8 as *const c_char; +pub const GST_TAG_APPLICATION_DATA: *const c_char = + b"application-data\0" as *const u8 as *const c_char; +pub const GST_TAG_APPLICATION_NAME: *const c_char = + b"application-name\0" as *const u8 as *const c_char; pub const GST_TAG_ARTIST: *const c_char = b"artist\0" as *const u8 as *const c_char; -pub const GST_TAG_ARTIST_SORTNAME: *const c_char = b"artist-sortname\0" as *const u8 as *const c_char; +pub const GST_TAG_ARTIST_SORTNAME: *const c_char = + b"artist-sortname\0" as *const u8 as *const c_char; pub const GST_TAG_ATTACHMENT: *const c_char = b"attachment\0" as *const u8 as *const c_char; pub const GST_TAG_AUDIO_CODEC: *const c_char = b"audio-codec\0" as *const u8 as *const c_char; -pub const GST_TAG_BEATS_PER_MINUTE: *const c_char = b"beats-per-minute\0" as *const u8 as *const c_char; +pub const GST_TAG_BEATS_PER_MINUTE: *const c_char = + b"beats-per-minute\0" as *const u8 as *const c_char; pub const GST_TAG_BITRATE: *const c_char = b"bitrate\0" as *const u8 as *const c_char; pub const GST_TAG_CODEC: *const c_char = b"codec\0" as *const u8 as *const c_char; pub const GST_TAG_COMMENT: *const c_char = b"comment\0" as *const u8 as *const c_char; pub const GST_TAG_COMPOSER: *const c_char = b"composer\0" as *const u8 as *const c_char; -pub const GST_TAG_COMPOSER_SORTNAME: *const c_char = b"composer-sortname\0" as *const u8 as *const c_char; +pub const GST_TAG_COMPOSER_SORTNAME: *const c_char = + b"composer-sortname\0" as *const u8 as *const c_char; pub const GST_TAG_CONDUCTOR: *const c_char = b"conductor\0" as *const u8 as *const c_char; pub const GST_TAG_CONTACT: *const c_char = b"contact\0" as *const u8 as *const c_char; -pub const GST_TAG_CONTAINER_FORMAT: *const c_char = b"container-format\0" as *const u8 as *const c_char; +pub const GST_TAG_CONTAINER_FORMAT: *const c_char = + b"container-format\0" as *const u8 as *const c_char; pub const GST_TAG_COPYRIGHT: *const c_char = b"copyright\0" as *const u8 as *const c_char; pub const GST_TAG_COPYRIGHT_URI: *const c_char = b"copyright-uri\0" as *const u8 as *const c_char; pub const GST_TAG_DATE: *const c_char = b"date\0" as *const u8 as *const c_char; pub const GST_TAG_DATE_TIME: *const c_char = b"datetime\0" as *const u8 as *const c_char; pub const GST_TAG_DESCRIPTION: *const c_char = b"description\0" as *const u8 as *const c_char; -pub const GST_TAG_DEVICE_MANUFACTURER: *const c_char = b"device-manufacturer\0" as *const u8 as *const c_char; +pub const GST_TAG_DEVICE_MANUFACTURER: *const c_char = + b"device-manufacturer\0" as *const u8 as *const c_char; pub const GST_TAG_DEVICE_MODEL: *const c_char = b"device-model\0" as *const u8 as *const c_char; pub const GST_TAG_DURATION: *const c_char = b"duration\0" as *const u8 as *const c_char; pub const GST_TAG_ENCODED_BY: *const c_char = b"encoded-by\0" as *const u8 as *const c_char; pub const GST_TAG_ENCODER: *const c_char = b"encoder\0" as *const u8 as *const c_char; -pub const GST_TAG_ENCODER_VERSION: *const c_char = b"encoder-version\0" as *const u8 as *const c_char; -pub const GST_TAG_EXTENDED_COMMENT: *const c_char = b"extended-comment\0" as *const u8 as *const c_char; +pub const GST_TAG_ENCODER_VERSION: *const c_char = + b"encoder-version\0" as *const u8 as *const c_char; +pub const GST_TAG_EXTENDED_COMMENT: *const c_char = + b"extended-comment\0" as *const u8 as *const c_char; pub const GST_TAG_GENRE: *const c_char = b"genre\0" as *const u8 as *const c_char; -pub const GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION: *const c_char = b"geo-location-capture-direction\0" as *const u8 as *const c_char; -pub const GST_TAG_GEO_LOCATION_CITY: *const c_char = b"geo-location-city\0" as *const u8 as *const c_char; -pub const GST_TAG_GEO_LOCATION_COUNTRY: *const c_char = b"geo-location-country\0" as *const u8 as *const c_char; -pub const GST_TAG_GEO_LOCATION_ELEVATION: *const c_char = b"geo-location-elevation\0" as *const u8 as *const c_char; -pub const GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR: *const c_char = b"geo-location-horizontal-error\0" as *const u8 as *const c_char; -pub const GST_TAG_GEO_LOCATION_LATITUDE: *const c_char = b"geo-location-latitude\0" as *const u8 as *const c_char; -pub const GST_TAG_GEO_LOCATION_LONGITUDE: *const c_char = b"geo-location-longitude\0" as *const u8 as *const c_char; -pub const GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION: *const c_char = b"geo-location-movement-direction\0" as *const u8 as *const c_char; -pub const GST_TAG_GEO_LOCATION_MOVEMENT_SPEED: *const c_char = b"geo-location-movement-speed\0" as *const u8 as *const c_char; -pub const GST_TAG_GEO_LOCATION_NAME: *const c_char = b"geo-location-name\0" as *const u8 as *const c_char; -pub const GST_TAG_GEO_LOCATION_SUBLOCATION: *const c_char = b"geo-location-sublocation\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION: *const c_char = + b"geo-location-capture-direction\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_CITY: *const c_char = + b"geo-location-city\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_COUNTRY: *const c_char = + b"geo-location-country\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_ELEVATION: *const c_char = + b"geo-location-elevation\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR: *const c_char = + b"geo-location-horizontal-error\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_LATITUDE: *const c_char = + b"geo-location-latitude\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_LONGITUDE: *const c_char = + b"geo-location-longitude\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION: *const c_char = + b"geo-location-movement-direction\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_MOVEMENT_SPEED: *const c_char = + b"geo-location-movement-speed\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_NAME: *const c_char = + b"geo-location-name\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_SUBLOCATION: *const c_char = + b"geo-location-sublocation\0" as *const u8 as *const c_char; pub const GST_TAG_GROUPING: *const c_char = b"grouping\0" as *const u8 as *const c_char; pub const GST_TAG_HOMEPAGE: *const c_char = b"homepage\0" as *const u8 as *const c_char; pub const GST_TAG_IMAGE: *const c_char = b"image\0" as *const u8 as *const c_char; -pub const GST_TAG_IMAGE_ORIENTATION: *const c_char = b"image-orientation\0" as *const u8 as *const c_char; +pub const GST_TAG_IMAGE_ORIENTATION: *const c_char = + b"image-orientation\0" as *const u8 as *const c_char; pub const GST_TAG_INTERPRETED_BY: *const c_char = b"interpreted-by\0" as *const u8 as *const c_char; pub const GST_TAG_ISRC: *const c_char = b"isrc\0" as *const u8 as *const c_char; pub const GST_TAG_KEYWORDS: *const c_char = b"keywords\0" as *const u8 as *const c_char; @@ -553,28 +605,36 @@ pub const GST_TAG_LICENSE: *const c_char = b"license\0" as *const u8 as *const c pub const GST_TAG_LICENSE_URI: *const c_char = b"license-uri\0" as *const u8 as *const c_char; pub const GST_TAG_LOCATION: *const c_char = b"location\0" as *const u8 as *const c_char; pub const GST_TAG_LYRICS: *const c_char = b"lyrics\0" as *const u8 as *const c_char; -pub const GST_TAG_MAXIMUM_BITRATE: *const c_char = b"maximum-bitrate\0" as *const u8 as *const c_char; +pub const GST_TAG_MAXIMUM_BITRATE: *const c_char = + b"maximum-bitrate\0" as *const u8 as *const c_char; pub const GST_TAG_MIDI_BASE_NOTE: *const c_char = b"midi-base-note\0" as *const u8 as *const c_char; -pub const GST_TAG_MINIMUM_BITRATE: *const c_char = b"minimum-bitrate\0" as *const u8 as *const c_char; -pub const GST_TAG_NOMINAL_BITRATE: *const c_char = b"nominal-bitrate\0" as *const u8 as *const c_char; +pub const GST_TAG_MINIMUM_BITRATE: *const c_char = + b"minimum-bitrate\0" as *const u8 as *const c_char; +pub const GST_TAG_NOMINAL_BITRATE: *const c_char = + b"nominal-bitrate\0" as *const u8 as *const c_char; pub const GST_TAG_ORGANIZATION: *const c_char = b"organization\0" as *const u8 as *const c_char; pub const GST_TAG_PERFORMER: *const c_char = b"performer\0" as *const u8 as *const c_char; pub const GST_TAG_PREVIEW_IMAGE: *const c_char = b"preview-image\0" as *const u8 as *const c_char; pub const GST_TAG_PRIVATE_DATA: *const c_char = b"private-data\0" as *const u8 as *const c_char; pub const GST_TAG_PUBLISHER: *const c_char = b"publisher\0" as *const u8 as *const c_char; -pub const GST_TAG_REFERENCE_LEVEL: *const c_char = b"replaygain-reference-level\0" as *const u8 as *const c_char; +pub const GST_TAG_REFERENCE_LEVEL: *const c_char = + b"replaygain-reference-level\0" as *const u8 as *const c_char; pub const GST_TAG_SERIAL: *const c_char = b"serial\0" as *const u8 as *const c_char; -pub const GST_TAG_SHOW_EPISODE_NUMBER: *const c_char = b"show-episode-number\0" as *const u8 as *const c_char; +pub const GST_TAG_SHOW_EPISODE_NUMBER: *const c_char = + b"show-episode-number\0" as *const u8 as *const c_char; pub const GST_TAG_SHOW_NAME: *const c_char = b"show-name\0" as *const u8 as *const c_char; -pub const GST_TAG_SHOW_SEASON_NUMBER: *const c_char = b"show-season-number\0" as *const u8 as *const c_char; +pub const GST_TAG_SHOW_SEASON_NUMBER: *const c_char = + b"show-season-number\0" as *const u8 as *const c_char; pub const GST_TAG_SHOW_SORTNAME: *const c_char = b"show-sortname\0" as *const u8 as *const c_char; pub const GST_TAG_SUBTITLE_CODEC: *const c_char = b"subtitle-codec\0" as *const u8 as *const c_char; pub const GST_TAG_TITLE: *const c_char = b"title\0" as *const u8 as *const c_char; pub const GST_TAG_TITLE_SORTNAME: *const c_char = b"title-sortname\0" as *const u8 as *const c_char; pub const GST_TAG_TRACK_COUNT: *const c_char = b"track-count\0" as *const u8 as *const c_char; -pub const GST_TAG_TRACK_GAIN: *const c_char = b"replaygain-track-gain\0" as *const u8 as *const c_char; +pub const GST_TAG_TRACK_GAIN: *const c_char = + b"replaygain-track-gain\0" as *const u8 as *const c_char; pub const GST_TAG_TRACK_NUMBER: *const c_char = b"track-number\0" as *const u8 as *const c_char; -pub const GST_TAG_TRACK_PEAK: *const c_char = b"replaygain-track-peak\0" as *const u8 as *const c_char; +pub const GST_TAG_TRACK_PEAK: *const c_char = + b"replaygain-track-peak\0" as *const u8 as *const c_char; pub const GST_TAG_USER_RATING: *const c_char = b"user-rating\0" as *const u8 as *const c_char; pub const GST_TAG_VERSION: *const c_char = b"version\0" as *const u8 as *const c_char; pub const GST_TAG_VIDEO_CODEC: *const c_char = b"video-codec\0" as *const u8 as *const c_char; @@ -908,9 +968,9 @@ pub union GstControlBinding_ABI { impl ::std::fmt::Debug for GstControlBinding_ABI { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstControlBinding_ABI @ {:?}", self as *const _)) - .field("abi", unsafe { &self.abi }) - .field("_gst_reserved", unsafe { &self._gst_reserved }) - .finish() + .field("abi", unsafe { &self.abi }) + .field("_gst_reserved", unsafe { &self._gst_reserved }) + .finish() } } @@ -924,9 +984,9 @@ pub union GstPadProbeInfo_ABI { impl ::std::fmt::Debug for GstPadProbeInfo_ABI { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPadProbeInfo_ABI @ {:?}", self as *const _)) - .field("_gst_reserved", unsafe { &self._gst_reserved }) - .field("abi", unsafe { &self.abi }) - .finish() + .field("_gst_reserved", unsafe { &self._gst_reserved }) + .field("abi", unsafe { &self.abi }) + .finish() } } @@ -940,9 +1000,9 @@ pub union GstPadTemplate_ABI { impl ::std::fmt::Debug for GstPadTemplate_ABI { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPadTemplate_ABI @ {:?}", self as *const _)) - .field("_gst_reserved", unsafe { &self._gst_reserved }) - .field("abi", unsafe { &self.abi }) - .finish() + .field("_gst_reserved", unsafe { &self._gst_reserved }) + .field("abi", unsafe { &self.abi }) + .finish() } } @@ -956,80 +1016,161 @@ pub union GstPad_ABI { impl ::std::fmt::Debug for GstPad_ABI { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPad_ABI @ {:?}", self as *const _)) - .field("_gst_reserved", unsafe { &self._gst_reserved }) - .field("abi", unsafe { &self.abi }) - .finish() + .field("_gst_reserved", unsafe { &self._gst_reserved }) + .field("abi", unsafe { &self.abi }) + .finish() } } // Callbacks -pub type GstBufferForeachMetaFunc = Option gboolean>; -pub type GstBufferListFunc = Option gboolean>; -pub type GstBusFunc = Option gboolean>; -pub type GstBusSyncHandler = Option GstBusSyncReply>; -pub type GstCapsFilterMapFunc = Option gboolean>; -pub type GstCapsForeachFunc = Option gboolean>; -pub type GstCapsMapFunc = Option gboolean>; -pub type GstClockCallback = Option gboolean>; -pub type GstControlBindingConvert = Option; -pub type GstControlSourceGetValue = Option gboolean>; -pub type GstControlSourceGetValueArray = Option gboolean>; +pub type GstBufferForeachMetaFunc = + Option gboolean>; +pub type GstBufferListFunc = + Option gboolean>; +pub type GstBusFunc = + Option gboolean>; +pub type GstBusSyncHandler = + Option GstBusSyncReply>; +pub type GstCapsFilterMapFunc = + Option gboolean>; +pub type GstCapsForeachFunc = + Option gboolean>; +pub type GstCapsMapFunc = + Option gboolean>; +pub type GstClockCallback = + Option gboolean>; +pub type GstControlBindingConvert = + Option; +pub type GstControlSourceGetValue = + Option gboolean>; +pub type GstControlSourceGetValueArray = Option< + unsafe extern "C" fn( + *mut GstControlSource, + GstClockTime, + GstClockTime, + c_uint, + *mut c_double, + ) -> gboolean, +>; pub type GstDebugFuncPtr = Option; pub type GstElementCallAsyncFunc = Option; -pub type GstElementForeachPadFunc = Option gboolean>; -pub type GstIteratorCopyFunction = Option; -pub type GstIteratorFoldFunction = Option gboolean>; -pub type GstIteratorForeachFunction = Option; +pub type GstElementForeachPadFunc = + Option gboolean>; +pub type GstIteratorCopyFunction = + Option; +pub type GstIteratorFoldFunction = Option< + unsafe extern "C" fn(*const gobject::GValue, *mut gobject::GValue, gpointer) -> gboolean, +>; +pub type GstIteratorForeachFunction = + Option; pub type GstIteratorFreeFunction = Option; -pub type GstIteratorItemFunction = Option GstIteratorItem>; -pub type GstIteratorNextFunction = Option GstIteratorResult>; +pub type GstIteratorItemFunction = + Option GstIteratorItem>; +pub type GstIteratorNextFunction = + Option GstIteratorResult>; pub type GstIteratorResyncFunction = Option; -pub type GstLogFunction = Option; -pub type GstMemoryCopyFunction = Option *mut GstMemory>; -pub type GstMemoryIsSpanFunction = Option gboolean>; -pub type GstMemoryMapFullFunction = Option gpointer>; -pub type GstMemoryMapFunction = Option gpointer>; -pub type GstMemoryShareFunction = Option *mut GstMemory>; +pub type GstLogFunction = Option< + unsafe extern "C" fn( + *mut GstDebugCategory, + GstDebugLevel, + *const c_char, + *const c_char, + c_int, + *mut gobject::GObject, + *mut GstDebugMessage, + gpointer, + ), +>; +pub type GstMemoryCopyFunction = + Option *mut GstMemory>; +pub type GstMemoryIsSpanFunction = + Option gboolean>; +pub type GstMemoryMapFullFunction = + Option gpointer>; +pub type GstMemoryMapFunction = + Option gpointer>; +pub type GstMemoryShareFunction = + Option *mut GstMemory>; pub type GstMemoryUnmapFullFunction = Option; pub type GstMemoryUnmapFunction = Option; pub type GstMetaFreeFunction = Option; -pub type GstMetaInitFunction = Option gboolean>; -pub type GstMetaTransformFunction = Option gboolean>; -pub type GstMiniObjectCopyFunction = Option *mut GstMiniObject>; -pub type GstMiniObjectDisposeFunction = Option gboolean>; +pub type GstMetaInitFunction = + Option gboolean>; +pub type GstMetaTransformFunction = Option< + unsafe extern "C" fn( + *mut GstBuffer, + *mut GstMeta, + *mut GstBuffer, + glib::GQuark, + gpointer, + ) -> gboolean, +>; +pub type GstMiniObjectCopyFunction = + Option *mut GstMiniObject>; +pub type GstMiniObjectDisposeFunction = + Option gboolean>; pub type GstMiniObjectFreeFunction = Option; pub type GstMiniObjectNotify = Option; -pub type GstPadActivateFunction = Option gboolean>; -pub type GstPadActivateModeFunction = Option gboolean>; -pub type GstPadChainFunction = Option GstFlowReturn>; -pub type GstPadChainListFunction = Option GstFlowReturn>; -pub type GstPadEventFullFunction = Option GstFlowReturn>; -pub type GstPadEventFunction = Option gboolean>; +pub type GstPadActivateFunction = + Option gboolean>; +pub type GstPadActivateModeFunction = + Option gboolean>; +pub type GstPadChainFunction = + Option GstFlowReturn>; +pub type GstPadChainListFunction = + Option GstFlowReturn>; +pub type GstPadEventFullFunction = + Option GstFlowReturn>; +pub type GstPadEventFunction = + Option gboolean>; pub type GstPadForwardFunction = Option gboolean>; -pub type GstPadGetRangeFunction = Option GstFlowReturn>; -pub type GstPadIterIntLinkFunction = Option *mut GstIterator>; -pub type GstPadLinkFunction = Option GstPadLinkReturn>; -pub type GstPadProbeCallback = Option GstPadProbeReturn>; -pub type GstPadQueryFunction = Option gboolean>; -pub type GstPadStickyEventsForeachFunction = Option gboolean>; +pub type GstPadGetRangeFunction = Option< + unsafe extern "C" fn( + *mut GstPad, + *mut GstObject, + u64, + c_uint, + *mut *mut GstBuffer, + ) -> GstFlowReturn, +>; +pub type GstPadIterIntLinkFunction = + Option *mut GstIterator>; +pub type GstPadLinkFunction = + Option GstPadLinkReturn>; +pub type GstPadProbeCallback = + Option GstPadProbeReturn>; +pub type GstPadQueryFunction = + Option gboolean>; +pub type GstPadStickyEventsForeachFunction = + Option gboolean>; pub type GstPadUnlinkFunction = Option; -pub type GstPluginFeatureFilter = Option gboolean>; +pub type GstPluginFeatureFilter = + Option gboolean>; pub type GstPluginFilter = Option gboolean>; pub type GstPluginInitFullFunc = Option gboolean>; pub type GstPluginInitFunc = Option gboolean>; pub type GstPromiseChangeFunc = Option; -pub type GstStructureFilterMapFunc = Option gboolean>; -pub type GstStructureForeachFunc = Option gboolean>; -pub type GstStructureMapFunc = Option gboolean>; -pub type GstTagForeachFunc = Option; -pub type GstTagMergeFunc = Option; +pub type GstStructureFilterMapFunc = + Option gboolean>; +pub type GstStructureForeachFunc = + Option gboolean>; +pub type GstStructureMapFunc = + Option gboolean>; +pub type GstTagForeachFunc = + Option; +pub type GstTagMergeFunc = + Option; pub type GstTaskFunction = Option; pub type GstTaskPoolFunction = Option; -pub type GstTaskThreadFunc = Option; +pub type GstTaskThreadFunc = + Option; pub type GstTypeFindFunction = Option; -pub type GstValueCompareFunc = Option c_int>; -pub type GstValueDeserializeFunc = Option gboolean>; -pub type GstValueSerializeFunc = Option *mut c_char>; +pub type GstValueCompareFunc = + Option c_int>; +pub type GstValueDeserializeFunc = + Option gboolean>; +pub type GstValueSerializeFunc = + Option *mut c_char>; // Records #[repr(C)] @@ -1045,11 +1186,11 @@ pub struct GstAllocationParams { impl ::std::fmt::Debug for GstAllocationParams { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAllocationParams @ {:?}", self as *const _)) - .field("flags", &self.flags) - .field("align", &self.align) - .field("prefix", &self.prefix) - .field("padding", &self.padding) - .finish() + .field("flags", &self.flags) + .field("align", &self.align) + .field("prefix", &self.prefix) + .field("padding", &self.padding) + .finish() } } @@ -1057,7 +1198,9 @@ impl ::std::fmt::Debug for GstAllocationParams { #[derive(Copy, Clone)] pub struct GstAllocatorClass { pub object_class: GstObjectClass, - pub alloc: Option *mut GstMemory>, + pub alloc: Option< + unsafe extern "C" fn(*mut GstAllocator, size_t, *mut GstAllocationParams) -> *mut GstMemory, + >, pub free: Option, pub _gst_reserved: [gpointer; 4], } @@ -1065,10 +1208,10 @@ pub struct GstAllocatorClass { impl ::std::fmt::Debug for GstAllocatorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAllocatorClass @ {:?}", self as *const _)) - .field("object_class", &self.object_class) - .field("alloc", &self.alloc) - .field("free", &self.free) - .finish() + .field("object_class", &self.object_class) + .field("alloc", &self.alloc) + .field("free", &self.free) + .finish() } } @@ -1083,7 +1226,7 @@ pub struct GstAtomicQueue(c_void); impl ::std::fmt::Debug for GstAtomicQueue { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAtomicQueue @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1099,23 +1242,24 @@ pub struct GstBinClass { pub handle_message: Option, pub do_latency: Option gboolean>, pub deep_element_added: Option, - pub deep_element_removed: Option, + pub deep_element_removed: + Option, pub _gst_reserved: [gpointer; 2], } impl ::std::fmt::Debug for GstBinClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBinClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("element_added", &self.element_added) - .field("element_removed", &self.element_removed) - .field("add_element", &self.add_element) - .field("remove_element", &self.remove_element) - .field("handle_message", &self.handle_message) - .field("do_latency", &self.do_latency) - .field("deep_element_added", &self.deep_element_added) - .field("deep_element_removed", &self.deep_element_removed) - .finish() + .field("parent_class", &self.parent_class) + .field("element_added", &self.element_added) + .field("element_removed", &self.element_removed) + .field("add_element", &self.add_element) + .field("remove_element", &self.remove_element) + .field("handle_message", &self.handle_message) + .field("do_latency", &self.do_latency) + .field("deep_element_added", &self.deep_element_added) + .field("deep_element_removed", &self.deep_element_removed) + .finish() } } @@ -1139,14 +1283,14 @@ pub struct GstBuffer { impl ::std::fmt::Debug for GstBuffer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBuffer @ {:?}", self as *const _)) - .field("mini_object", &self.mini_object) - .field("pool", &self.pool) - .field("pts", &self.pts) - .field("dts", &self.dts) - .field("duration", &self.duration) - .field("offset", &self.offset) - .field("offset_end", &self.offset_end) - .finish() + .field("mini_object", &self.mini_object) + .field("pool", &self.pool) + .field("pts", &self.pts) + .field("dts", &self.dts) + .field("duration", &self.duration) + .field("offset", &self.offset) + .field("offset_end", &self.offset_end) + .finish() } } @@ -1156,7 +1300,7 @@ pub struct GstBufferList(c_void); impl ::std::fmt::Debug for GstBufferList { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBufferList @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1172,12 +1316,15 @@ pub struct GstBufferPoolAcquireParams { impl ::std::fmt::Debug for GstBufferPoolAcquireParams { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstBufferPoolAcquireParams @ {:?}", self as *const _)) - .field("format", &self.format) - .field("start", &self.start) - .field("stop", &self.stop) - .field("flags", &self.flags) - .finish() + f.debug_struct(&format!( + "GstBufferPoolAcquireParams @ {:?}", + self as *const _ + )) + .field("format", &self.format) + .field("start", &self.start) + .field("stop", &self.stop) + .field("flags", &self.flags) + .finish() } } @@ -1189,8 +1336,20 @@ pub struct GstBufferPoolClass { pub set_config: Option gboolean>, pub start: Option gboolean>, pub stop: Option gboolean>, - pub acquire_buffer: Option GstFlowReturn>, - pub alloc_buffer: Option GstFlowReturn>, + pub acquire_buffer: Option< + unsafe extern "C" fn( + *mut GstBufferPool, + *mut *mut GstBuffer, + *mut GstBufferPoolAcquireParams, + ) -> GstFlowReturn, + >, + pub alloc_buffer: Option< + unsafe extern "C" fn( + *mut GstBufferPool, + *mut *mut GstBuffer, + *mut GstBufferPoolAcquireParams, + ) -> GstFlowReturn, + >, pub reset_buffer: Option, pub release_buffer: Option, pub free_buffer: Option, @@ -1202,19 +1361,19 @@ pub struct GstBufferPoolClass { impl ::std::fmt::Debug for GstBufferPoolClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBufferPoolClass @ {:?}", self as *const _)) - .field("object_class", &self.object_class) - .field("get_options", &self.get_options) - .field("set_config", &self.set_config) - .field("start", &self.start) - .field("stop", &self.stop) - .field("acquire_buffer", &self.acquire_buffer) - .field("alloc_buffer", &self.alloc_buffer) - .field("reset_buffer", &self.reset_buffer) - .field("release_buffer", &self.release_buffer) - .field("free_buffer", &self.free_buffer) - .field("flush_start", &self.flush_start) - .field("flush_stop", &self.flush_stop) - .finish() + .field("object_class", &self.object_class) + .field("get_options", &self.get_options) + .field("set_config", &self.set_config) + .field("start", &self.start) + .field("stop", &self.stop) + .field("acquire_buffer", &self.acquire_buffer) + .field("alloc_buffer", &self.alloc_buffer) + .field("reset_buffer", &self.reset_buffer) + .field("release_buffer", &self.release_buffer) + .field("free_buffer", &self.free_buffer) + .field("flush_start", &self.flush_start) + .field("flush_stop", &self.flush_stop) + .finish() } } @@ -1235,10 +1394,10 @@ pub struct GstBusClass { impl ::std::fmt::Debug for GstBusClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBusClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("message", &self.message) - .field("sync_message", &self.sync_message) - .finish() + .field("parent_class", &self.parent_class) + .field("message", &self.message) + .field("sync_message", &self.sync_message) + .finish() } } @@ -1256,8 +1415,8 @@ pub struct GstCaps { impl ::std::fmt::Debug for GstCaps { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstCaps @ {:?}", self as *const _)) - .field("mini_object", &self.mini_object) - .finish() + .field("mini_object", &self.mini_object) + .finish() } } @@ -1267,7 +1426,7 @@ pub struct GstCapsFeatures(c_void); impl ::std::fmt::Debug for GstCapsFeatures { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstCapsFeatures @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1275,24 +1434,28 @@ impl ::std::fmt::Debug for GstCapsFeatures { #[derive(Copy, Clone)] pub struct GstChildProxyInterface { pub parent: gobject::GTypeInterface, - pub get_child_by_name: Option *mut gobject::GObject>, - pub get_child_by_index: Option *mut gobject::GObject>, + pub get_child_by_name: + Option *mut gobject::GObject>, + pub get_child_by_index: + Option *mut gobject::GObject>, pub get_children_count: Option c_uint>, - pub child_added: Option, - pub child_removed: Option, + pub child_added: + Option, + pub child_removed: + Option, pub _gst_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstChildProxyInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstChildProxyInterface @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("get_child_by_name", &self.get_child_by_name) - .field("get_child_by_index", &self.get_child_by_index) - .field("get_children_count", &self.get_children_count) - .field("child_added", &self.child_added) - .field("child_removed", &self.child_removed) - .finish() + .field("parent", &self.parent) + .field("get_child_by_name", &self.get_child_by_name) + .field("get_child_by_index", &self.get_child_by_index) + .field("get_children_count", &self.get_children_count) + .field("child_added", &self.child_added) + .field("child_removed", &self.child_removed) + .finish() } } @@ -1300,11 +1463,19 @@ impl ::std::fmt::Debug for GstChildProxyInterface { #[derive(Copy, Clone)] pub struct GstClockClass { pub parent_class: GstObjectClass, - pub change_resolution: Option GstClockTime>, + pub change_resolution: + Option GstClockTime>, pub get_resolution: Option GstClockTime>, pub get_internal_time: Option GstClockTime>, - pub wait: Option GstClockReturn>, - pub wait_async: Option GstClockReturn>, + pub wait: Option< + unsafe extern "C" fn( + *mut GstClock, + *mut GstClockEntry, + *mut GstClockTimeDiff, + ) -> GstClockReturn, + >, + pub wait_async: + Option GstClockReturn>, pub unschedule: Option, pub _gst_reserved: [gpointer; 4], } @@ -1312,14 +1483,14 @@ pub struct GstClockClass { impl ::std::fmt::Debug for GstClockClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstClockClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("change_resolution", &self.change_resolution) - .field("get_resolution", &self.get_resolution) - .field("get_internal_time", &self.get_internal_time) - .field("wait", &self.wait) - .field("wait_async", &self.wait_async) - .field("unschedule", &self.unschedule) - .finish() + .field("parent_class", &self.parent_class) + .field("change_resolution", &self.change_resolution) + .field("get_resolution", &self.get_resolution) + .field("get_internal_time", &self.get_internal_time) + .field("wait", &self.wait) + .field("wait_async", &self.wait_async) + .field("unschedule", &self.unschedule) + .finish() } } @@ -1343,18 +1514,18 @@ pub struct GstClockEntry { impl ::std::fmt::Debug for GstClockEntry { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstClockEntry @ {:?}", self as *const _)) - .field("refcount", &self.refcount) - .field("clock", &self.clock) - .field("type_", &self.type_) - .field("time", &self.time) - .field("interval", &self.interval) - .field("status", &self.status) - .field("func", &self.func) - .field("user_data", &self.user_data) - .field("destroy_data", &self.destroy_data) - .field("unscheduled", &self.unscheduled) - .field("woken_up", &self.woken_up) - .finish() + .field("refcount", &self.refcount) + .field("clock", &self.clock) + .field("type_", &self.type_) + .field("time", &self.time) + .field("interval", &self.interval) + .field("status", &self.status) + .field("func", &self.func) + .field("user_data", &self.user_data) + .field("destroy_data", &self.destroy_data) + .field("unscheduled", &self.unscheduled) + .field("woken_up", &self.woken_up) + .finish() } } @@ -1369,7 +1540,7 @@ pub struct GstContext(c_void); impl ::std::fmt::Debug for GstContext { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstContext @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1377,22 +1548,46 @@ impl ::std::fmt::Debug for GstContext { #[derive(Copy, Clone)] pub struct GstControlBindingClass { pub parent_class: GstObjectClass, - pub sync_values: Option gboolean>, - pub get_value: Option *mut gobject::GValue>, - pub get_value_array: Option gboolean>, - pub get_g_value_array: Option gboolean>, + pub sync_values: Option< + unsafe extern "C" fn( + *mut GstControlBinding, + *mut GstObject, + GstClockTime, + GstClockTime, + ) -> gboolean, + >, + pub get_value: + Option *mut gobject::GValue>, + pub get_value_array: Option< + unsafe extern "C" fn( + *mut GstControlBinding, + GstClockTime, + GstClockTime, + c_uint, + gpointer, + ) -> gboolean, + >, + pub get_g_value_array: Option< + unsafe extern "C" fn( + *mut GstControlBinding, + GstClockTime, + GstClockTime, + c_uint, + *mut gobject::GValue, + ) -> gboolean, + >, pub _gst_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstControlBindingClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstControlBindingClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("sync_values", &self.sync_values) - .field("get_value", &self.get_value) - .field("get_value_array", &self.get_value_array) - .field("get_g_value_array", &self.get_g_value_array) - .finish() + .field("parent_class", &self.parent_class) + .field("sync_values", &self.sync_values) + .field("get_value", &self.get_value) + .field("get_value_array", &self.get_value_array) + .field("get_g_value_array", &self.get_g_value_array) + .finish() } } @@ -1409,9 +1604,12 @@ pub struct GstControlBinding_ABI_abi { impl ::std::fmt::Debug for GstControlBinding_ABI_abi { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstControlBinding_ABI_abi @ {:?}", self as *const _)) - .field("priv_", &self.priv_) - .finish() + f.debug_struct(&format!( + "GstControlBinding_ABI_abi @ {:?}", + self as *const _ + )) + .field("priv_", &self.priv_) + .finish() } } @@ -1425,8 +1623,8 @@ pub struct GstControlSourceClass { impl ::std::fmt::Debug for GstControlSourceClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstControlSourceClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -1436,7 +1634,7 @@ pub struct GstDateTime(c_void); impl ::std::fmt::Debug for GstDateTime { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDateTime @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1452,7 +1650,7 @@ pub struct GstDebugCategory { impl ::std::fmt::Debug for GstDebugCategory { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDebugCategory @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1465,18 +1663,20 @@ pub type GstDebugMessage = *mut _GstDebugMessage; #[derive(Copy, Clone)] pub struct GstDeviceClass { pub parent_class: GstObjectClass, - pub create_element: Option *mut GstElement>, - pub reconfigure_element: Option gboolean>, + pub create_element: + Option *mut GstElement>, + pub reconfigure_element: + Option gboolean>, pub _gst_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstDeviceClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDeviceClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("create_element", &self.create_element) - .field("reconfigure_element", &self.reconfigure_element) - .finish() + .field("parent_class", &self.parent_class) + .field("create_element", &self.create_element) + .field("reconfigure_element", &self.reconfigure_element) + .finish() } } @@ -1490,8 +1690,8 @@ pub struct GstDeviceMonitorClass { impl ::std::fmt::Debug for GstDeviceMonitorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDeviceMonitorClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -1520,12 +1720,12 @@ pub struct GstDeviceProviderClass { impl ::std::fmt::Debug for GstDeviceProviderClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDeviceProviderClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("factory", &self.factory) - .field("probe", &self.probe) - .field("start", &self.start) - .field("stop", &self.stop) - .finish() + .field("parent_class", &self.parent_class) + .field("factory", &self.factory) + .field("probe", &self.probe) + .field("start", &self.start) + .field("stop", &self.stop) + .finish() } } @@ -1556,11 +1756,26 @@ pub struct GstElementClass { pub pad_added: Option, pub pad_removed: Option, pub no_more_pads: Option, - pub request_new_pad: Option *mut GstPad>, + pub request_new_pad: Option< + unsafe extern "C" fn( + *mut GstElement, + *mut GstPadTemplate, + *const c_char, + *const GstCaps, + ) -> *mut GstPad, + >, pub release_pad: Option, - pub get_state: Option GstStateChangeReturn>, + pub get_state: Option< + unsafe extern "C" fn( + *mut GstElement, + *mut GstState, + *mut GstState, + GstClockTime, + ) -> GstStateChangeReturn, + >, pub set_state: Option GstStateChangeReturn>, - pub change_state: Option GstStateChangeReturn>, + pub change_state: + Option GstStateChangeReturn>, pub state_changed: Option, pub set_bus: Option, pub provide_clock: Option *mut GstClock>, @@ -1575,29 +1790,29 @@ pub struct GstElementClass { impl ::std::fmt::Debug for GstElementClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstElementClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("metadata", &self.metadata) - .field("elementfactory", &self.elementfactory) - .field("padtemplates", &self.padtemplates) - .field("numpadtemplates", &self.numpadtemplates) - .field("pad_templ_cookie", &self.pad_templ_cookie) - .field("pad_added", &self.pad_added) - .field("pad_removed", &self.pad_removed) - .field("no_more_pads", &self.no_more_pads) - .field("request_new_pad", &self.request_new_pad) - .field("release_pad", &self.release_pad) - .field("get_state", &self.get_state) - .field("set_state", &self.set_state) - .field("change_state", &self.change_state) - .field("state_changed", &self.state_changed) - .field("set_bus", &self.set_bus) - .field("provide_clock", &self.provide_clock) - .field("set_clock", &self.set_clock) - .field("send_event", &self.send_event) - .field("query", &self.query) - .field("post_message", &self.post_message) - .field("set_context", &self.set_context) - .finish() + .field("parent_class", &self.parent_class) + .field("metadata", &self.metadata) + .field("elementfactory", &self.elementfactory) + .field("padtemplates", &self.padtemplates) + .field("numpadtemplates", &self.numpadtemplates) + .field("pad_templ_cookie", &self.pad_templ_cookie) + .field("pad_added", &self.pad_added) + .field("pad_removed", &self.pad_removed) + .field("no_more_pads", &self.no_more_pads) + .field("request_new_pad", &self.request_new_pad) + .field("release_pad", &self.release_pad) + .field("get_state", &self.get_state) + .field("set_state", &self.set_state) + .field("change_state", &self.change_state) + .field("state_changed", &self.state_changed) + .field("set_bus", &self.set_bus) + .field("provide_clock", &self.provide_clock) + .field("set_clock", &self.set_clock) + .field("send_event", &self.send_event) + .field("query", &self.query) + .field("post_message", &self.post_message) + .field("set_context", &self.set_context) + .finish() } } @@ -1618,11 +1833,11 @@ pub struct GstEvent { impl ::std::fmt::Debug for GstEvent { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstEvent @ {:?}", self as *const _)) - .field("mini_object", &self.mini_object) - .field("type_", &self.type_) - .field("timestamp", &self.timestamp) - .field("seqnum", &self.seqnum) - .finish() + .field("mini_object", &self.mini_object) + .field("type_", &self.type_) + .field("timestamp", &self.timestamp) + .field("seqnum", &self.seqnum) + .finish() } } @@ -1638,11 +1853,11 @@ pub struct GstFormatDefinition { impl ::std::fmt::Debug for GstFormatDefinition { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstFormatDefinition @ {:?}", self as *const _)) - .field("value", &self.value) - .field("nick", &self.nick) - .field("description", &self.description) - .field("quark", &self.quark) - .finish() + .field("value", &self.value) + .field("nick", &self.nick) + .field("description", &self.description) + .field("quark", &self.quark) + .finish() } } @@ -1656,8 +1871,8 @@ pub struct GstGhostPadClass { impl ::std::fmt::Debug for GstGhostPadClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGhostPadClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -1686,18 +1901,18 @@ pub struct GstIterator { impl ::std::fmt::Debug for GstIterator { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstIterator @ {:?}", self as *const _)) - .field("copy", &self.copy) - .field("next", &self.next) - .field("item", &self.item) - .field("resync", &self.resync) - .field("free", &self.free) - .field("pushed", &self.pushed) - .field("type_", &self.type_) - .field("lock", &self.lock) - .field("cookie", &self.cookie) - .field("master_cookie", &self.master_cookie) - .field("size", &self.size) - .finish() + .field("copy", &self.copy) + .field("next", &self.next) + .field("item", &self.item) + .field("resync", &self.resync) + .field("free", &self.free) + .field("pushed", &self.pushed) + .field("type_", &self.type_) + .field("lock", &self.lock) + .field("cookie", &self.cookie) + .field("master_cookie", &self.master_cookie) + .field("size", &self.size) + .finish() } } @@ -1716,13 +1931,13 @@ pub struct GstMapInfo { impl ::std::fmt::Debug for GstMapInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMapInfo @ {:?}", self as *const _)) - .field("memory", &self.memory) - .field("flags", &self.flags) - .field("data", &self.data) - .field("size", &self.size) - .field("maxsize", &self.maxsize) - .field("user_data", &self.user_data) - .finish() + .field("memory", &self.memory) + .field("flags", &self.flags) + .field("data", &self.data) + .field("size", &self.size) + .field("maxsize", &self.maxsize) + .field("user_data", &self.user_data) + .finish() } } @@ -1741,14 +1956,14 @@ pub struct GstMemory { impl ::std::fmt::Debug for GstMemory { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMemory @ {:?}", self as *const _)) - .field("mini_object", &self.mini_object) - .field("allocator", &self.allocator) - .field("parent", &self.parent) - .field("maxsize", &self.maxsize) - .field("align", &self.align) - .field("offset", &self.offset) - .field("size", &self.size) - .finish() + .field("mini_object", &self.mini_object) + .field("allocator", &self.allocator) + .field("parent", &self.parent) + .field("maxsize", &self.maxsize) + .field("align", &self.align) + .field("offset", &self.offset) + .field("size", &self.size) + .finish() } } @@ -1767,12 +1982,12 @@ pub struct GstMessage { impl ::std::fmt::Debug for GstMessage { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMessage @ {:?}", self as *const _)) - .field("mini_object", &self.mini_object) - .field("type_", &self.type_) - .field("timestamp", &self.timestamp) - .field("src", &self.src) - .field("seqnum", &self.seqnum) - .finish() + .field("mini_object", &self.mini_object) + .field("type_", &self.type_) + .field("timestamp", &self.timestamp) + .field("src", &self.src) + .field("seqnum", &self.seqnum) + .finish() } } @@ -1786,9 +2001,9 @@ pub struct GstMeta { impl ::std::fmt::Debug for GstMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMeta @ {:?}", self as *const _)) - .field("flags", &self.flags) - .field("info", &self.info) - .finish() + .field("flags", &self.flags) + .field("info", &self.info) + .finish() } } @@ -1806,13 +2021,13 @@ pub struct GstMetaInfo { impl ::std::fmt::Debug for GstMetaInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMetaInfo @ {:?}", self as *const _)) - .field("api", &self.api) - .field("type_", &self.type_) - .field("size", &self.size) - .field("init_func", &self.init_func) - .field("free_func", &self.free_func) - .field("transform_func", &self.transform_func) - .finish() + .field("api", &self.api) + .field("type_", &self.type_) + .field("size", &self.size) + .field("init_func", &self.init_func) + .field("free_func", &self.free_func) + .field("transform_func", &self.transform_func) + .finish() } } @@ -1827,10 +2042,10 @@ pub struct GstMetaTransformCopy { impl ::std::fmt::Debug for GstMetaTransformCopy { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMetaTransformCopy @ {:?}", self as *const _)) - .field("region", &self.region) - .field("offset", &self.offset) - .field("size", &self.size) - .finish() + .field("region", &self.region) + .field("offset", &self.offset) + .field("size", &self.size) + .finish() } } @@ -1851,14 +2066,14 @@ pub struct GstMiniObject { impl ::std::fmt::Debug for GstMiniObject { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstMiniObject @ {:?}", self as *const _)) - .field("type_", &self.type_) - .field("refcount", &self.refcount) - .field("lockstate", &self.lockstate) - .field("flags", &self.flags) - .field("copy", &self.copy) - .field("dispose", &self.dispose) - .field("free", &self.free) - .finish() + .field("type_", &self.type_) + .field("refcount", &self.refcount) + .field("lockstate", &self.lockstate) + .field("flags", &self.flags) + .field("copy", &self.copy) + .field("dispose", &self.dispose) + .field("free", &self.free) + .finish() } } @@ -1867,17 +2082,18 @@ impl ::std::fmt::Debug for GstMiniObject { pub struct GstObjectClass { pub parent_class: gobject::GInitiallyUnownedClass, pub path_string_separator: *const c_char, - pub deep_notify: Option, + pub deep_notify: + Option, pub _gst_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstObjectClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstObjectClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("path_string_separator", &self.path_string_separator) - .field("deep_notify", &self.deep_notify) - .finish() + .field("parent_class", &self.parent_class) + .field("path_string_separator", &self.path_string_separator) + .field("deep_notify", &self.deep_notify) + .finish() } } @@ -1893,10 +2109,10 @@ pub struct GstPadClass { impl ::std::fmt::Debug for GstPadClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPadClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("linked", &self.linked) - .field("unlinked", &self.unlinked) - .finish() + .field("parent_class", &self.parent_class) + .field("linked", &self.linked) + .field("unlinked", &self.unlinked) + .finish() } } @@ -1919,13 +2135,13 @@ pub struct GstPadProbeInfo { impl ::std::fmt::Debug for GstPadProbeInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPadProbeInfo @ {:?}", self as *const _)) - .field("type_", &self.type_) - .field("id", &self.id) - .field("data", &self.data) - .field("offset", &self.offset) - .field("size", &self.size) - .field("ABI", &self.ABI) - .finish() + .field("type_", &self.type_) + .field("id", &self.id) + .field("data", &self.data) + .field("offset", &self.offset) + .field("size", &self.size) + .field("ABI", &self.ABI) + .finish() } } @@ -1938,8 +2154,8 @@ pub struct GstPadProbeInfo_ABI_abi { impl ::std::fmt::Debug for GstPadProbeInfo_ABI_abi { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPadProbeInfo_ABI_abi @ {:?}", self as *const _)) - .field("flow_ret", &self.flow_ret) - .finish() + .field("flow_ret", &self.flow_ret) + .finish() } } @@ -1954,9 +2170,9 @@ pub struct GstPadTemplateClass { impl ::std::fmt::Debug for GstPadTemplateClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPadTemplateClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("pad_created", &self.pad_created) - .finish() + .field("parent_class", &self.parent_class) + .field("pad_created", &self.pad_created) + .finish() } } @@ -1969,8 +2185,8 @@ pub struct GstPadTemplate_ABI_abi { impl ::std::fmt::Debug for GstPadTemplate_ABI_abi { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPadTemplate_ABI_abi @ {:?}", self as *const _)) - .field("gtype", &self.gtype) - .finish() + .field("gtype", &self.gtype) + .finish() } } @@ -1984,9 +2200,9 @@ pub struct GstPad_ABI_abi { impl ::std::fmt::Debug for GstPad_ABI_abi { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPad_ABI_abi @ {:?}", self as *const _)) - .field("last_flowret", &self.last_flowret) - .field("eventfullfunc", &self.eventfullfunc) - .finish() + .field("last_flowret", &self.last_flowret) + .field("eventfullfunc", &self.eventfullfunc) + .finish() } } @@ -2000,9 +2216,9 @@ pub struct GstParamSpecArray { impl ::std::fmt::Debug for GstParamSpecArray { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstParamSpecArray @ {:?}", self as *const _)) - .field("parent_instance", &self.parent_instance) - .field("element_spec", &self.element_spec) - .finish() + .field("parent_instance", &self.parent_instance) + .field("element_spec", &self.element_spec) + .finish() } } @@ -2021,14 +2237,14 @@ pub struct GstParamSpecFraction { impl ::std::fmt::Debug for GstParamSpecFraction { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstParamSpecFraction @ {:?}", self as *const _)) - .field("parent_instance", &self.parent_instance) - .field("min_num", &self.min_num) - .field("min_den", &self.min_den) - .field("max_num", &self.max_num) - .field("max_den", &self.max_den) - .field("def_num", &self.def_num) - .field("def_den", &self.def_den) - .finish() + .field("parent_instance", &self.parent_instance) + .field("min_num", &self.min_num) + .field("min_den", &self.min_den) + .field("max_num", &self.max_num) + .field("max_den", &self.max_den) + .field("def_num", &self.def_num) + .field("def_den", &self.def_den) + .finish() } } @@ -2042,9 +2258,9 @@ pub struct GstParentBufferMeta { impl ::std::fmt::Debug for GstParentBufferMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstParentBufferMeta @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("buffer", &self.buffer) - .finish() + .field("parent", &self.parent) + .field("buffer", &self.buffer) + .finish() } } @@ -2054,7 +2270,7 @@ pub struct GstParseContext(c_void); impl ::std::fmt::Debug for GstParseContext { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstParseContext @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -2068,8 +2284,8 @@ pub struct GstPipelineClass { impl ::std::fmt::Debug for GstPipelineClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPipelineClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -2103,18 +2319,18 @@ pub struct GstPluginDesc { impl ::std::fmt::Debug for GstPluginDesc { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPluginDesc @ {:?}", self as *const _)) - .field("major_version", &self.major_version) - .field("minor_version", &self.minor_version) - .field("name", &self.name) - .field("description", &self.description) - .field("plugin_init", &self.plugin_init) - .field("version", &self.version) - .field("license", &self.license) - .field("source", &self.source) - .field("package", &self.package) - .field("origin", &self.origin) - .field("release_datetime", &self.release_datetime) - .finish() + .field("major_version", &self.major_version) + .field("minor_version", &self.minor_version) + .field("name", &self.name) + .field("description", &self.description) + .field("plugin_init", &self.plugin_init) + .field("version", &self.version) + .field("license", &self.license) + .field("source", &self.source) + .field("package", &self.package) + .field("origin", &self.origin) + .field("release_datetime", &self.release_datetime) + .finish() } } @@ -2138,8 +2354,8 @@ pub struct GstPollFD { impl ::std::fmt::Debug for GstPollFD { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPollFD @ {:?}", self as *const _)) - .field("fd", &self.fd) - .finish() + .field("fd", &self.fd) + .finish() } } @@ -2151,26 +2367,41 @@ pub struct GstPresetInterface { pub get_property_names: Option *mut *mut c_char>, pub load_preset: Option gboolean>, pub save_preset: Option gboolean>, - pub rename_preset: Option gboolean>, + pub rename_preset: + Option gboolean>, pub delete_preset: Option gboolean>, - pub set_meta: Option gboolean>, - pub get_meta: Option gboolean>, + pub set_meta: Option< + unsafe extern "C" fn( + *mut GstPreset, + *const c_char, + *const c_char, + *mut *mut c_char, + ) -> gboolean, + >, + pub get_meta: Option< + unsafe extern "C" fn( + *mut GstPreset, + *const c_char, + *const c_char, + *mut *mut c_char, + ) -> gboolean, + >, pub _gst_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstPresetInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPresetInterface @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("get_preset_names", &self.get_preset_names) - .field("get_property_names", &self.get_property_names) - .field("load_preset", &self.load_preset) - .field("save_preset", &self.save_preset) - .field("rename_preset", &self.rename_preset) - .field("delete_preset", &self.delete_preset) - .field("set_meta", &self.set_meta) - .field("get_meta", &self.get_meta) - .finish() + .field("parent", &self.parent) + .field("get_preset_names", &self.get_preset_names) + .field("get_property_names", &self.get_property_names) + .field("load_preset", &self.load_preset) + .field("save_preset", &self.save_preset) + .field("rename_preset", &self.rename_preset) + .field("delete_preset", &self.delete_preset) + .field("set_meta", &self.set_meta) + .field("get_meta", &self.get_meta) + .finish() } } @@ -2183,8 +2414,8 @@ pub struct GstPromise { impl ::std::fmt::Debug for GstPromise { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPromise @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -2198,9 +2429,9 @@ pub struct GstProtectionMeta { impl ::std::fmt::Debug for GstProtectionMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstProtectionMeta @ {:?}", self as *const _)) - .field("meta", &self.meta) - .field("info", &self.info) - .finish() + .field("meta", &self.meta) + .field("info", &self.info) + .finish() } } @@ -2214,8 +2445,8 @@ pub struct GstProxyPadClass { impl ::std::fmt::Debug for GstProxyPadClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstProxyPadClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -2234,9 +2465,9 @@ pub struct GstQuery { impl ::std::fmt::Debug for GstQuery { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstQuery @ {:?}", self as *const _)) - .field("mini_object", &self.mini_object) - .field("type_", &self.type_) - .finish() + .field("mini_object", &self.mini_object) + .field("type_", &self.type_) + .finish() } } @@ -2251,12 +2482,15 @@ pub struct GstReferenceTimestampMeta { impl ::std::fmt::Debug for GstReferenceTimestampMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstReferenceTimestampMeta @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("reference", &self.reference) - .field("timestamp", &self.timestamp) - .field("duration", &self.duration) - .finish() + f.debug_struct(&format!( + "GstReferenceTimestampMeta @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .field("reference", &self.reference) + .field("timestamp", &self.timestamp) + .field("duration", &self.duration) + .finish() } } @@ -2269,8 +2503,8 @@ pub struct GstRegistryClass { impl ::std::fmt::Debug for GstRegistryClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRegistryClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -2285,7 +2519,7 @@ pub struct GstSample(c_void); impl ::std::fmt::Debug for GstSample { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstSample @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -2309,18 +2543,18 @@ pub struct GstSegment { impl ::std::fmt::Debug for GstSegment { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstSegment @ {:?}", self as *const _)) - .field("flags", &self.flags) - .field("rate", &self.rate) - .field("applied_rate", &self.applied_rate) - .field("format", &self.format) - .field("base", &self.base) - .field("offset", &self.offset) - .field("start", &self.start) - .field("stop", &self.stop) - .field("time", &self.time) - .field("position", &self.position) - .field("duration", &self.duration) - .finish() + .field("flags", &self.flags) + .field("rate", &self.rate) + .field("applied_rate", &self.applied_rate) + .field("format", &self.format) + .field("base", &self.base) + .field("offset", &self.offset) + .field("start", &self.start) + .field("stop", &self.stop) + .field("time", &self.time) + .field("position", &self.position) + .field("duration", &self.duration) + .finish() } } @@ -2335,9 +2569,9 @@ pub struct GstStaticCaps { impl ::std::fmt::Debug for GstStaticCaps { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstStaticCaps @ {:?}", self as *const _)) - .field("caps", &self.caps) - .field("string", &self.string) - .finish() + .field("caps", &self.caps) + .field("string", &self.string) + .finish() } } @@ -2353,11 +2587,11 @@ pub struct GstStaticPadTemplate { impl ::std::fmt::Debug for GstStaticPadTemplate { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstStaticPadTemplate @ {:?}", self as *const _)) - .field("name_template", &self.name_template) - .field("direction", &self.direction) - .field("presence", &self.presence) - .field("static_caps", &self.static_caps) - .finish() + .field("name_template", &self.name_template) + .field("direction", &self.direction) + .field("presence", &self.presence) + .field("static_caps", &self.static_caps) + .finish() } } @@ -2371,8 +2605,8 @@ pub struct GstStreamClass { impl ::std::fmt::Debug for GstStreamClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstStreamClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -2380,16 +2614,21 @@ impl ::std::fmt::Debug for GstStreamClass { #[derive(Copy, Clone)] pub struct GstStreamCollectionClass { pub parent_class: GstObjectClass, - pub stream_notify: Option, + pub stream_notify: Option< + unsafe extern "C" fn(*mut GstStreamCollection, *mut GstStream, *mut gobject::GParamSpec), + >, pub _gst_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstStreamCollectionClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstStreamCollectionClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("stream_notify", &self.stream_notify) - .finish() + f.debug_struct(&format!( + "GstStreamCollectionClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("stream_notify", &self.stream_notify) + .finish() } } @@ -2413,8 +2652,8 @@ pub struct GstStructure { impl ::std::fmt::Debug for GstStructure { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstStructure @ {:?}", self as *const _)) - .field("type_", &self.type_) - .finish() + .field("type_", &self.type_) + .finish() } } @@ -2428,8 +2667,8 @@ pub struct GstSystemClockClass { impl ::std::fmt::Debug for GstSystemClockClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstSystemClockClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -2447,8 +2686,8 @@ pub struct GstTagList { impl ::std::fmt::Debug for GstTagList { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTagList @ {:?}", self as *const _)) - .field("mini_object", &self.mini_object) - .finish() + .field("mini_object", &self.mini_object) + .finish() } } @@ -2461,8 +2700,8 @@ pub struct GstTagSetterInterface { impl ::std::fmt::Debug for GstTagSetterInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTagSetterInterface @ {:?}", self as *const _)) - .field("g_iface", &self.g_iface) - .finish() + .field("g_iface", &self.g_iface) + .finish() } } @@ -2477,8 +2716,8 @@ pub struct GstTaskClass { impl ::std::fmt::Debug for GstTaskClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTaskClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -2488,7 +2727,14 @@ pub struct GstTaskPoolClass { pub parent_class: GstObjectClass, pub prepare: Option, pub cleanup: Option, - pub push: Option gpointer>, + pub push: Option< + unsafe extern "C" fn( + *mut GstTaskPool, + GstTaskPoolFunction, + gpointer, + *mut *mut glib::GError, + ) -> gpointer, + >, pub join: Option, pub _gst_reserved: [gpointer; 4], } @@ -2496,12 +2742,12 @@ pub struct GstTaskPoolClass { impl ::std::fmt::Debug for GstTaskPoolClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTaskPoolClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("prepare", &self.prepare) - .field("cleanup", &self.cleanup) - .field("push", &self.push) - .field("join", &self.join) - .finish() + .field("parent_class", &self.parent_class) + .field("prepare", &self.prepare) + .field("cleanup", &self.cleanup) + .field("push", &self.push) + .field("join", &self.join) + .finish() } } @@ -2520,9 +2766,9 @@ pub struct GstTimedValue { impl ::std::fmt::Debug for GstTimedValue { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTimedValue @ {:?}", self as *const _)) - .field("timestamp", &self.timestamp) - .field("value", &self.value) - .finish() + .field("timestamp", &self.timestamp) + .field("value", &self.value) + .finish() } } @@ -2532,7 +2778,7 @@ pub struct GstToc(c_void); impl ::std::fmt::Debug for GstToc { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstToc @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -2542,7 +2788,7 @@ pub struct GstTocEntry(c_void); impl ::std::fmt::Debug for GstTocEntry { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTocEntry @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -2555,8 +2801,8 @@ pub struct GstTocSetterInterface { impl ::std::fmt::Debug for GstTocSetterInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTocSetterInterface @ {:?}", self as *const _)) - .field("g_iface", &self.g_iface) - .finish() + .field("g_iface", &self.g_iface) + .finish() } } @@ -2570,8 +2816,8 @@ pub struct GstTracerClass { impl ::std::fmt::Debug for GstTracerClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTracerClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -2603,11 +2849,11 @@ pub struct GstTypeFind { impl ::std::fmt::Debug for GstTypeFind { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTypeFind @ {:?}", self as *const _)) - .field("peek", &self.peek) - .field("suggest", &self.suggest) - .field("data", &self.data) - .field("get_length", &self.get_length) - .finish() + .field("peek", &self.peek) + .field("suggest", &self.suggest) + .field("data", &self.data) + .field("get_length", &self.get_length) + .finish() } } @@ -2623,18 +2869,20 @@ pub struct GstURIHandlerInterface { pub get_type: Option GstURIType>, pub get_protocols: Option *const *const c_char>, pub get_uri: Option *mut c_char>, - pub set_uri: Option gboolean>, + pub set_uri: Option< + unsafe extern "C" fn(*mut GstURIHandler, *const c_char, *mut *mut glib::GError) -> gboolean, + >, } impl ::std::fmt::Debug for GstURIHandlerInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstURIHandlerInterface @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("get_type", &self.get_type) - .field("get_protocols", &self.get_protocols) - .field("get_uri", &self.get_uri) - .field("set_uri", &self.set_uri) - .finish() + .field("parent", &self.parent) + .field("get_type", &self.get_type) + .field("get_protocols", &self.get_protocols) + .field("get_uri", &self.get_uri) + .field("set_uri", &self.set_uri) + .finish() } } @@ -2644,7 +2892,7 @@ pub struct GstUri(c_void); impl ::std::fmt::Debug for GstUri { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstUri @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -2661,11 +2909,11 @@ pub struct GstValueTable { impl ::std::fmt::Debug for GstValueTable { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstValueTable @ {:?}", self as *const _)) - .field("type_", &self.type_) - .field("compare", &self.compare) - .field("serialize", &self.serialize) - .field("deserialize", &self.deserialize) - .finish() + .field("type_", &self.type_) + .field("compare", &self.compare) + .field("serialize", &self.serialize) + .field("deserialize", &self.deserialize) + .finish() } } @@ -2689,16 +2937,16 @@ pub struct GstAllocator { impl ::std::fmt::Debug for GstAllocator { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstAllocator @ {:?}", self as *const _)) - .field("object", &self.object) - .field("mem_type", &self.mem_type) - .field("mem_map", &self.mem_map) - .field("mem_unmap", &self.mem_unmap) - .field("mem_copy", &self.mem_copy) - .field("mem_share", &self.mem_share) - .field("mem_is_span", &self.mem_is_span) - .field("mem_map_full", &self.mem_map_full) - .field("mem_unmap_full", &self.mem_unmap_full) - .finish() + .field("object", &self.object) + .field("mem_type", &self.mem_type) + .field("mem_map", &self.mem_map) + .field("mem_unmap", &self.mem_unmap) + .field("mem_copy", &self.mem_copy) + .field("mem_share", &self.mem_share) + .field("mem_is_span", &self.mem_is_span) + .field("mem_map_full", &self.mem_map_full) + .field("mem_unmap_full", &self.mem_unmap_full) + .finish() } } @@ -2723,18 +2971,18 @@ pub struct GstBin { impl ::std::fmt::Debug for GstBin { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBin @ {:?}", self as *const _)) - .field("element", &self.element) - .field("numchildren", &self.numchildren) - .field("children", &self.children) - .field("children_cookie", &self.children_cookie) - .field("child_bus", &self.child_bus) - .field("messages", &self.messages) - .field("polling", &self.polling) - .field("state_dirty", &self.state_dirty) - .field("clock_dirty", &self.clock_dirty) - .field("provided_clock", &self.provided_clock) - .field("clock_provider", &self.clock_provider) - .finish() + .field("element", &self.element) + .field("numchildren", &self.numchildren) + .field("children", &self.children) + .field("children_cookie", &self.children_cookie) + .field("child_bus", &self.child_bus) + .field("messages", &self.messages) + .field("polling", &self.polling) + .field("state_dirty", &self.state_dirty) + .field("clock_dirty", &self.clock_dirty) + .field("provided_clock", &self.provided_clock) + .field("clock_provider", &self.clock_provider) + .finish() } } @@ -2744,7 +2992,7 @@ pub struct GstBitmask(c_void); impl ::std::fmt::Debug for GstBitmask { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBitmask @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -2760,9 +3008,9 @@ pub struct GstBufferPool { impl ::std::fmt::Debug for GstBufferPool { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBufferPool @ {:?}", self as *const _)) - .field("object", &self.object) - .field("flushing", &self.flushing) - .finish() + .field("object", &self.object) + .field("flushing", &self.flushing) + .finish() } } @@ -2777,8 +3025,8 @@ pub struct GstBus { impl ::std::fmt::Debug for GstBus { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstBus @ {:?}", self as *const _)) - .field("object", &self.object) - .finish() + .field("object", &self.object) + .finish() } } @@ -2793,8 +3041,8 @@ pub struct GstClock { impl ::std::fmt::Debug for GstClock { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstClock @ {:?}", self as *const _)) - .field("object", &self.object) - .finish() + .field("object", &self.object) + .finish() } } @@ -2812,11 +3060,11 @@ pub struct GstControlBinding { impl ::std::fmt::Debug for GstControlBinding { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstControlBinding @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("name", &self.name) - .field("pspec", &self.pspec) - .field("ABI", &self.ABI) - .finish() + .field("parent", &self.parent) + .field("name", &self.name) + .field("pspec", &self.pspec) + .field("ABI", &self.ABI) + .finish() } } @@ -2832,10 +3080,10 @@ pub struct GstControlSource { impl ::std::fmt::Debug for GstControlSource { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstControlSource @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("get_value", &self.get_value) - .field("get_value_array", &self.get_value_array) - .finish() + .field("parent", &self.parent) + .field("get_value", &self.get_value) + .field("get_value_array", &self.get_value_array) + .finish() } } @@ -2850,8 +3098,8 @@ pub struct GstDevice { impl ::std::fmt::Debug for GstDevice { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDevice @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -2866,8 +3114,8 @@ pub struct GstDeviceMonitor { impl ::std::fmt::Debug for GstDeviceMonitor { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDeviceMonitor @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -2883,9 +3131,9 @@ pub struct GstDeviceProvider { impl ::std::fmt::Debug for GstDeviceProvider { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDeviceProvider @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("devices", &self.devices) - .finish() + .field("parent", &self.parent) + .field("devices", &self.devices) + .finish() } } @@ -2894,8 +3142,11 @@ pub struct GstDeviceProviderFactory(c_void); impl ::std::fmt::Debug for GstDeviceProviderFactory { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstDeviceProviderFactory @ {:?}", self as *const _)) - .finish() + f.debug_struct(&format!( + "GstDeviceProviderFactory @ {:?}", + self as *const _ + )) + .finish() } } @@ -2905,7 +3156,7 @@ pub struct GstDoubleRange(c_void); impl ::std::fmt::Debug for GstDoubleRange { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDoubleRange @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -2915,7 +3166,7 @@ pub struct GstDynamicTypeFactory(c_void); impl ::std::fmt::Debug for GstDynamicTypeFactory { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstDynamicTypeFactory @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -2949,28 +3200,28 @@ pub struct GstElement { impl ::std::fmt::Debug for GstElement { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstElement @ {:?}", self as *const _)) - .field("object", &self.object) - .field("state_lock", &self.state_lock) - .field("state_cond", &self.state_cond) - .field("state_cookie", &self.state_cookie) - .field("target_state", &self.target_state) - .field("current_state", &self.current_state) - .field("next_state", &self.next_state) - .field("pending_state", &self.pending_state) - .field("last_return", &self.last_return) - .field("bus", &self.bus) - .field("clock", &self.clock) - .field("base_time", &self.base_time) - .field("start_time", &self.start_time) - .field("numpads", &self.numpads) - .field("pads", &self.pads) - .field("numsrcpads", &self.numsrcpads) - .field("srcpads", &self.srcpads) - .field("numsinkpads", &self.numsinkpads) - .field("sinkpads", &self.sinkpads) - .field("pads_cookie", &self.pads_cookie) - .field("contexts", &self.contexts) - .finish() + .field("object", &self.object) + .field("state_lock", &self.state_lock) + .field("state_cond", &self.state_cond) + .field("state_cookie", &self.state_cookie) + .field("target_state", &self.target_state) + .field("current_state", &self.current_state) + .field("next_state", &self.next_state) + .field("pending_state", &self.pending_state) + .field("last_return", &self.last_return) + .field("bus", &self.bus) + .field("clock", &self.clock) + .field("base_time", &self.base_time) + .field("start_time", &self.start_time) + .field("numpads", &self.numpads) + .field("pads", &self.pads) + .field("numsrcpads", &self.numsrcpads) + .field("srcpads", &self.srcpads) + .field("numsinkpads", &self.numsinkpads) + .field("sinkpads", &self.sinkpads) + .field("pads_cookie", &self.pads_cookie) + .field("contexts", &self.contexts) + .finish() } } @@ -2980,7 +3231,7 @@ pub struct GstElementFactory(c_void); impl ::std::fmt::Debug for GstElementFactory { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstElementFactory @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -2990,7 +3241,7 @@ pub struct GstFlagSet(c_void); impl ::std::fmt::Debug for GstFlagSet { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstFlagSet @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -3000,7 +3251,7 @@ pub struct GstFraction(c_void); impl ::std::fmt::Debug for GstFraction { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstFraction @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -3010,7 +3261,7 @@ pub struct GstFractionRange(c_void); impl ::std::fmt::Debug for GstFractionRange { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstFractionRange @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -3024,8 +3275,8 @@ pub struct GstGhostPad { impl ::std::fmt::Debug for GstGhostPad { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstGhostPad @ {:?}", self as *const _)) - .field("pad", &self.pad) - .finish() + .field("pad", &self.pad) + .finish() } } @@ -3035,7 +3286,7 @@ pub struct GstInt64Range(c_void); impl ::std::fmt::Debug for GstInt64Range { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstInt64Range @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -3045,7 +3296,7 @@ pub struct GstIntRange(c_void); impl ::std::fmt::Debug for GstIntRange { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstIntRange @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -3066,12 +3317,12 @@ pub struct GstObject { impl ::std::fmt::Debug for GstObject { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstObject @ {:?}", self as *const _)) - .field("object", &self.object) - .field("lock", &self.lock) - .field("name", &self.name) - .field("parent", &self.parent) - .field("flags", &self.flags) - .finish() + .field("object", &self.object) + .field("lock", &self.lock) + .field("name", &self.name) + .field("parent", &self.parent) + .field("flags", &self.flags) + .finish() } } @@ -3128,12 +3379,12 @@ pub struct GstPad { impl ::std::fmt::Debug for GstPad { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPad @ {:?}", self as *const _)) - .field("object", &self.object) - .field("element_private", &self.element_private) - .field("padtemplate", &self.padtemplate) - .field("direction", &self.direction) - .field("ABI", &self.ABI) - .finish() + .field("object", &self.object) + .field("element_private", &self.element_private) + .field("padtemplate", &self.padtemplate) + .field("direction", &self.direction) + .field("ABI", &self.ABI) + .finish() } } @@ -3151,13 +3402,13 @@ pub struct GstPadTemplate { impl ::std::fmt::Debug for GstPadTemplate { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPadTemplate @ {:?}", self as *const _)) - .field("object", &self.object) - .field("name_template", &self.name_template) - .field("direction", &self.direction) - .field("presence", &self.presence) - .field("caps", &self.caps) - .field("ABI", &self.ABI) - .finish() + .field("object", &self.object) + .field("name_template", &self.name_template) + .field("direction", &self.direction) + .field("presence", &self.presence) + .field("caps", &self.caps) + .field("ABI", &self.ABI) + .finish() } } @@ -3167,7 +3418,7 @@ pub struct GstParamArray(c_void); impl ::std::fmt::Debug for GstParamArray { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstParamArray @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -3177,7 +3428,7 @@ pub struct GstParamFraction(c_void); impl ::std::fmt::Debug for GstParamFraction { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstParamFraction @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -3195,11 +3446,11 @@ pub struct GstPipeline { impl ::std::fmt::Debug for GstPipeline { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPipeline @ {:?}", self as *const _)) - .field("bin", &self.bin) - .field("fixed_clock", &self.fixed_clock) - .field("stream_time", &self.stream_time) - .field("delay", &self.delay) - .finish() + .field("bin", &self.bin) + .field("fixed_clock", &self.fixed_clock) + .field("stream_time", &self.stream_time) + .field("delay", &self.delay) + .finish() } } @@ -3209,7 +3460,7 @@ pub struct GstPlugin(c_void); impl ::std::fmt::Debug for GstPlugin { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPlugin @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -3219,7 +3470,7 @@ pub struct GstPluginFeature(c_void); impl ::std::fmt::Debug for GstPluginFeature { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstPluginFeature @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -3233,8 +3484,8 @@ pub struct GstProxyPad { impl ::std::fmt::Debug for GstProxyPad { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstProxyPad @ {:?}", self as *const _)) - .field("pad", &self.pad) - .finish() + .field("pad", &self.pad) + .finish() } } @@ -3248,8 +3499,8 @@ pub struct GstRegistry { impl ::std::fmt::Debug for GstRegistry { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstRegistry @ {:?}", self as *const _)) - .field("object", &self.object) - .finish() + .field("object", &self.object) + .finish() } } @@ -3265,8 +3516,8 @@ pub struct GstStream { impl ::std::fmt::Debug for GstStream { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstStream @ {:?}", self as *const _)) - .field("stream_id", &self.stream_id) - .finish() + .field("stream_id", &self.stream_id) + .finish() } } @@ -3282,7 +3533,7 @@ pub struct GstStreamCollection { impl ::std::fmt::Debug for GstStreamCollection { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstStreamCollection @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -3297,8 +3548,8 @@ pub struct GstSystemClock { impl ::std::fmt::Debug for GstSystemClock { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstSystemClock @ {:?}", self as *const _)) - .field("clock", &self.clock) - .finish() + .field("clock", &self.clock) + .finish() } } @@ -3321,15 +3572,15 @@ pub struct GstTask { impl ::std::fmt::Debug for GstTask { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTask @ {:?}", self as *const _)) - .field("object", &self.object) - .field("state", &self.state) - .field("cond", &self.cond) - .field("lock", &self.lock) - .field("func", &self.func) - .field("user_data", &self.user_data) - .field("notify", &self.notify) - .field("running", &self.running) - .finish() + .field("object", &self.object) + .field("state", &self.state) + .field("cond", &self.cond) + .field("lock", &self.lock) + .field("func", &self.func) + .field("user_data", &self.user_data) + .field("notify", &self.notify) + .field("running", &self.running) + .finish() } } @@ -3344,8 +3595,8 @@ pub struct GstTaskPool { impl ::std::fmt::Debug for GstTaskPool { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTaskPool @ {:?}", self as *const _)) - .field("object", &self.object) - .finish() + .field("object", &self.object) + .finish() } } @@ -3360,8 +3611,8 @@ pub struct GstTracer { impl ::std::fmt::Debug for GstTracer { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTracer @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + .field("parent", &self.parent) + .finish() } } @@ -3371,7 +3622,7 @@ pub struct GstTracerFactory(c_void); impl ::std::fmt::Debug for GstTracerFactory { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTracerFactory @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -3381,7 +3632,7 @@ pub struct GstTracerRecord(c_void); impl ::std::fmt::Debug for GstTracerRecord { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTracerRecord @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -3391,7 +3642,7 @@ pub struct GstTypeFindFactory(c_void); impl ::std::fmt::Debug for GstTypeFindFactory { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTypeFindFactory @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -3401,7 +3652,7 @@ pub struct GstValueArray(c_void); impl ::std::fmt::Debug for GstValueArray { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstValueArray @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -3411,7 +3662,7 @@ pub struct GstValueList(c_void); impl ::std::fmt::Debug for GstValueList { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstValueList @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -3461,7 +3712,6 @@ impl ::std::fmt::Debug for GstURIHandler { } } - extern "C" { //========================================================================= @@ -3906,7 +4156,9 @@ extern "C" { // GstAllocationParams //========================================================================= pub fn gst_allocation_params_get_type() -> GType; - pub fn gst_allocation_params_copy(params: *const GstAllocationParams) -> *mut GstAllocationParams; + pub fn gst_allocation_params_copy( + params: *const GstAllocationParams, + ) -> *mut GstAllocationParams; pub fn gst_allocation_params_free(params: *mut GstAllocationParams); pub fn gst_allocation_params_init(params: *mut GstAllocationParams); @@ -3927,57 +4179,172 @@ extern "C" { //========================================================================= pub fn gst_buffer_get_type() -> GType; pub fn gst_buffer_new() -> *mut GstBuffer; - pub fn gst_buffer_new_allocate(allocator: *mut GstAllocator, size: size_t, params: *mut GstAllocationParams) -> *mut GstBuffer; + pub fn gst_buffer_new_allocate( + allocator: *mut GstAllocator, + size: size_t, + params: *mut GstAllocationParams, + ) -> *mut GstBuffer; pub fn gst_buffer_new_wrapped(data: gpointer, size: size_t) -> *mut GstBuffer; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_buffer_new_wrapped_bytes(bytes: *mut glib::GBytes) -> *mut GstBuffer; - pub fn gst_buffer_new_wrapped_full(flags: GstMemoryFlags, data: gpointer, maxsize: size_t, offset: size_t, size: size_t, user_data: gpointer, notify: glib::GDestroyNotify) -> *mut GstBuffer; - pub fn gst_buffer_add_meta(buffer: *mut GstBuffer, info: *const GstMetaInfo, params: gpointer) -> *mut GstMeta; + pub fn gst_buffer_new_wrapped_full( + flags: GstMemoryFlags, + data: gpointer, + maxsize: size_t, + offset: size_t, + size: size_t, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstBuffer; + pub fn gst_buffer_add_meta( + buffer: *mut GstBuffer, + info: *const GstMetaInfo, + params: gpointer, + ) -> *mut GstMeta; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_buffer_add_parent_buffer_meta(buffer: *mut GstBuffer, ref_: *mut GstBuffer) -> *mut GstParentBufferMeta; + pub fn gst_buffer_add_parent_buffer_meta( + buffer: *mut GstBuffer, + ref_: *mut GstBuffer, + ) -> *mut GstParentBufferMeta; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_buffer_add_protection_meta(buffer: *mut GstBuffer, info: *mut GstStructure) -> *mut GstProtectionMeta; + pub fn gst_buffer_add_protection_meta( + buffer: *mut GstBuffer, + info: *mut GstStructure, + ) -> *mut GstProtectionMeta; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_buffer_add_reference_timestamp_meta(buffer: *mut GstBuffer, reference: *mut GstCaps, timestamp: GstClockTime, duration: GstClockTime) -> *mut GstReferenceTimestampMeta; + pub fn gst_buffer_add_reference_timestamp_meta( + buffer: *mut GstBuffer, + reference: *mut GstCaps, + timestamp: GstClockTime, + duration: GstClockTime, + ) -> *mut GstReferenceTimestampMeta; pub fn gst_buffer_append(buf1: *mut GstBuffer, buf2: *mut GstBuffer) -> *mut GstBuffer; pub fn gst_buffer_append_memory(buffer: *mut GstBuffer, mem: *mut GstMemory); - pub fn gst_buffer_append_region(buf1: *mut GstBuffer, buf2: *mut GstBuffer, offset: ssize_t, size: ssize_t) -> *mut GstBuffer; + pub fn gst_buffer_append_region( + buf1: *mut GstBuffer, + buf2: *mut GstBuffer, + offset: ssize_t, + size: ssize_t, + ) -> *mut GstBuffer; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_buffer_copy_deep(buf: *const GstBuffer) -> *mut GstBuffer; - pub fn gst_buffer_copy_into(dest: *mut GstBuffer, src: *mut GstBuffer, flags: GstBufferCopyFlags, offset: size_t, size: size_t) -> gboolean; - pub fn gst_buffer_copy_region(parent: *mut GstBuffer, flags: GstBufferCopyFlags, offset: size_t, size: size_t) -> *mut GstBuffer; - pub fn gst_buffer_extract(buffer: *mut GstBuffer, offset: size_t, dest: gpointer, size: size_t) -> size_t; + pub fn gst_buffer_copy_into( + dest: *mut GstBuffer, + src: *mut GstBuffer, + flags: GstBufferCopyFlags, + offset: size_t, + size: size_t, + ) -> gboolean; + pub fn gst_buffer_copy_region( + parent: *mut GstBuffer, + flags: GstBufferCopyFlags, + offset: size_t, + size: size_t, + ) -> *mut GstBuffer; + pub fn gst_buffer_extract( + buffer: *mut GstBuffer, + offset: size_t, + dest: gpointer, + size: size_t, + ) -> size_t; #[cfg(any(feature = "v1_0_10", feature = "dox"))] - pub fn gst_buffer_extract_dup(buffer: *mut GstBuffer, offset: size_t, size: size_t, dest: *mut u8, dest_size: *mut size_t); - pub fn gst_buffer_fill(buffer: *mut GstBuffer, offset: size_t, src: gconstpointer, size: size_t) -> size_t; - pub fn gst_buffer_find_memory(buffer: *mut GstBuffer, offset: size_t, size: size_t, idx: *mut c_uint, length: *mut c_uint, skip: *mut size_t) -> gboolean; - pub fn gst_buffer_foreach_meta(buffer: *mut GstBuffer, func: GstBufferForeachMetaFunc, user_data: gpointer) -> gboolean; + pub fn gst_buffer_extract_dup( + buffer: *mut GstBuffer, + offset: size_t, + size: size_t, + dest: *mut u8, + dest_size: *mut size_t, + ); + pub fn gst_buffer_fill( + buffer: *mut GstBuffer, + offset: size_t, + src: gconstpointer, + size: size_t, + ) -> size_t; + pub fn gst_buffer_find_memory( + buffer: *mut GstBuffer, + offset: size_t, + size: size_t, + idx: *mut c_uint, + length: *mut c_uint, + skip: *mut size_t, + ) -> gboolean; + pub fn gst_buffer_foreach_meta( + buffer: *mut GstBuffer, + func: GstBufferForeachMetaFunc, + user_data: gpointer, + ) -> gboolean; pub fn gst_buffer_get_all_memory(buffer: *mut GstBuffer) -> *mut GstMemory; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_buffer_get_flags(buffer: *mut GstBuffer) -> GstBufferFlags; pub fn gst_buffer_get_memory(buffer: *mut GstBuffer, idx: c_uint) -> *mut GstMemory; - pub fn gst_buffer_get_memory_range(buffer: *mut GstBuffer, idx: c_uint, length: c_int) -> *mut GstMemory; + pub fn gst_buffer_get_memory_range( + buffer: *mut GstBuffer, + idx: c_uint, + length: c_int, + ) -> *mut GstMemory; pub fn gst_buffer_get_meta(buffer: *mut GstBuffer, api: GType) -> *mut GstMeta; #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_buffer_get_n_meta(buffer: *mut GstBuffer, api_type: GType) -> c_uint; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_buffer_get_reference_timestamp_meta(buffer: *mut GstBuffer, reference: *mut GstCaps) -> *mut GstReferenceTimestampMeta; + pub fn gst_buffer_get_reference_timestamp_meta( + buffer: *mut GstBuffer, + reference: *mut GstCaps, + ) -> *mut GstReferenceTimestampMeta; pub fn gst_buffer_get_size(buffer: *mut GstBuffer) -> size_t; - pub fn gst_buffer_get_sizes(buffer: *mut GstBuffer, offset: *mut size_t, maxsize: *mut size_t) -> size_t; - pub fn gst_buffer_get_sizes_range(buffer: *mut GstBuffer, idx: c_uint, length: c_int, offset: *mut size_t, maxsize: *mut size_t) -> size_t; + pub fn gst_buffer_get_sizes( + buffer: *mut GstBuffer, + offset: *mut size_t, + maxsize: *mut size_t, + ) -> size_t; + pub fn gst_buffer_get_sizes_range( + buffer: *mut GstBuffer, + idx: c_uint, + length: c_int, + offset: *mut size_t, + maxsize: *mut size_t, + ) -> size_t; pub fn gst_buffer_has_flags(buffer: *mut GstBuffer, flags: GstBufferFlags) -> gboolean; pub fn gst_buffer_insert_memory(buffer: *mut GstBuffer, idx: c_int, mem: *mut GstMemory); #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_buffer_is_all_memory_writable(buffer: *mut GstBuffer) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_buffer_is_memory_range_writable(buffer: *mut GstBuffer, idx: c_uint, length: c_int) -> gboolean; + pub fn gst_buffer_is_memory_range_writable( + buffer: *mut GstBuffer, + idx: c_uint, + length: c_int, + ) -> gboolean; pub fn gst_buffer_iterate_meta(buffer: *mut GstBuffer, state: *mut gpointer) -> *mut GstMeta; #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_buffer_iterate_meta_filtered(buffer: *mut GstBuffer, state: *mut gpointer, meta_api_type: GType) -> *mut GstMeta; - pub fn gst_buffer_map(buffer: *mut GstBuffer, info: *mut GstMapInfo, flags: GstMapFlags) -> gboolean; - pub fn gst_buffer_map_range(buffer: *mut GstBuffer, idx: c_uint, length: c_int, info: *mut GstMapInfo, flags: GstMapFlags) -> gboolean; - pub fn gst_buffer_memcmp(buffer: *mut GstBuffer, offset: size_t, mem: gconstpointer, size: size_t) -> c_int; - pub fn gst_buffer_memset(buffer: *mut GstBuffer, offset: size_t, val: u8, size: size_t) -> size_t; + pub fn gst_buffer_iterate_meta_filtered( + buffer: *mut GstBuffer, + state: *mut gpointer, + meta_api_type: GType, + ) -> *mut GstMeta; + pub fn gst_buffer_map( + buffer: *mut GstBuffer, + info: *mut GstMapInfo, + flags: GstMapFlags, + ) -> gboolean; + pub fn gst_buffer_map_range( + buffer: *mut GstBuffer, + idx: c_uint, + length: c_int, + info: *mut GstMapInfo, + flags: GstMapFlags, + ) -> gboolean; + pub fn gst_buffer_memcmp( + buffer: *mut GstBuffer, + offset: size_t, + mem: gconstpointer, + size: size_t, + ) -> c_int; + pub fn gst_buffer_memset( + buffer: *mut GstBuffer, + offset: size_t, + val: u8, + size: size_t, + ) -> size_t; pub fn gst_buffer_n_memory(buffer: *mut GstBuffer) -> c_uint; pub fn gst_buffer_peek_memory(buffer: *mut GstBuffer, idx: c_uint) -> *mut GstMemory; pub fn gst_buffer_prepend_memory(buffer: *mut GstBuffer, mem: *mut GstMemory); @@ -3987,9 +4354,20 @@ extern "C" { pub fn gst_buffer_remove_meta(buffer: *mut GstBuffer, meta: *mut GstMeta) -> gboolean; pub fn gst_buffer_replace_all_memory(buffer: *mut GstBuffer, mem: *mut GstMemory); pub fn gst_buffer_replace_memory(buffer: *mut GstBuffer, idx: c_uint, mem: *mut GstMemory); - pub fn gst_buffer_replace_memory_range(buffer: *mut GstBuffer, idx: c_uint, length: c_int, mem: *mut GstMemory); + pub fn gst_buffer_replace_memory_range( + buffer: *mut GstBuffer, + idx: c_uint, + length: c_int, + mem: *mut GstMemory, + ); pub fn gst_buffer_resize(buffer: *mut GstBuffer, offset: ssize_t, size: ssize_t); - pub fn gst_buffer_resize_range(buffer: *mut GstBuffer, idx: c_uint, length: c_int, offset: ssize_t, size: ssize_t) -> gboolean; + pub fn gst_buffer_resize_range( + buffer: *mut GstBuffer, + idx: c_uint, + length: c_int, + offset: ssize_t, + size: ssize_t, + ) -> gboolean; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_buffer_set_flags(buffer: *mut GstBuffer, flags: GstBufferFlags) -> gboolean; pub fn gst_buffer_set_size(buffer: *mut GstBuffer, size: ssize_t); @@ -4009,7 +4387,11 @@ extern "C" { pub fn gst_buffer_list_calculate_size(list: *mut GstBufferList) -> size_t; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_buffer_list_copy_deep(list: *const GstBufferList) -> *mut GstBufferList; - pub fn gst_buffer_list_foreach(list: *mut GstBufferList, func: GstBufferListFunc, user_data: gpointer) -> gboolean; + pub fn gst_buffer_list_foreach( + list: *mut GstBufferList, + func: GstBufferListFunc, + user_data: gpointer, + ) -> gboolean; pub fn gst_buffer_list_get(list: *mut GstBufferList, idx: c_uint) -> *mut GstBuffer; #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_buffer_list_get_writable(list: *mut GstBufferList, idx: c_uint) -> *mut GstBuffer; @@ -4026,26 +4408,46 @@ extern "C" { pub fn gst_caps_new_empty_simple(media_type: *const c_char) -> *mut GstCaps; pub fn gst_caps_new_full(struct1: *mut GstStructure, ...) -> *mut GstCaps; //pub fn gst_caps_new_full_valist(structure: *mut GstStructure, var_args: /*Unimplemented*/va_list) -> *mut GstCaps; - pub fn gst_caps_new_simple(media_type: *const c_char, fieldname: *const c_char, ...) -> *mut GstCaps; + pub fn gst_caps_new_simple( + media_type: *const c_char, + fieldname: *const c_char, + ... + ) -> *mut GstCaps; pub fn gst_caps_append(caps1: *mut GstCaps, caps2: *mut GstCaps); pub fn gst_caps_append_structure(caps: *mut GstCaps, structure: *mut GstStructure); #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_caps_append_structure_full(caps: *mut GstCaps, structure: *mut GstStructure, features: *mut GstCapsFeatures); + pub fn gst_caps_append_structure_full( + caps: *mut GstCaps, + structure: *mut GstStructure, + features: *mut GstCapsFeatures, + ); pub fn gst_caps_can_intersect(caps1: *const GstCaps, caps2: *const GstCaps) -> gboolean; pub fn gst_caps_copy(caps: *const GstCaps) -> *mut GstCaps; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_caps_copy_nth(caps: *const GstCaps, nth: c_uint) -> *mut GstCaps; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_caps_filter_and_map_in_place(caps: *mut GstCaps, func: GstCapsFilterMapFunc, user_data: gpointer); + pub fn gst_caps_filter_and_map_in_place( + caps: *mut GstCaps, + func: GstCapsFilterMapFunc, + user_data: gpointer, + ); pub fn gst_caps_fixate(caps: *mut GstCaps) -> *mut GstCaps; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_caps_foreach(caps: *const GstCaps, func: GstCapsForeachFunc, user_data: gpointer) -> gboolean; + pub fn gst_caps_foreach( + caps: *const GstCaps, + func: GstCapsForeachFunc, + user_data: gpointer, + ) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_caps_get_features(caps: *const GstCaps, index: c_uint) -> *mut GstCapsFeatures; pub fn gst_caps_get_size(caps: *const GstCaps) -> c_uint; pub fn gst_caps_get_structure(caps: *const GstCaps, index: c_uint) -> *mut GstStructure; pub fn gst_caps_intersect(caps1: *mut GstCaps, caps2: *mut GstCaps) -> *mut GstCaps; - pub fn gst_caps_intersect_full(caps1: *mut GstCaps, caps2: *mut GstCaps, mode: GstCapsIntersectMode) -> *mut GstCaps; + pub fn gst_caps_intersect_full( + caps1: *mut GstCaps, + caps2: *mut GstCaps, + mode: GstCapsIntersectMode, + ) -> *mut GstCaps; pub fn gst_caps_is_always_compatible(caps1: *const GstCaps, caps2: *const GstCaps) -> gboolean; pub fn gst_caps_is_any(caps: *const GstCaps) -> gboolean; pub fn gst_caps_is_empty(caps: *const GstCaps) -> gboolean; @@ -4054,15 +4456,33 @@ extern "C" { pub fn gst_caps_is_fixed(caps: *const GstCaps) -> gboolean; pub fn gst_caps_is_strictly_equal(caps1: *const GstCaps, caps2: *const GstCaps) -> gboolean; pub fn gst_caps_is_subset(subset: *const GstCaps, superset: *const GstCaps) -> gboolean; - pub fn gst_caps_is_subset_structure(caps: *const GstCaps, structure: *const GstStructure) -> gboolean; + pub fn gst_caps_is_subset_structure( + caps: *const GstCaps, + structure: *const GstStructure, + ) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_caps_is_subset_structure_full(caps: *const GstCaps, structure: *const GstStructure, features: *const GstCapsFeatures) -> gboolean; + pub fn gst_caps_is_subset_structure_full( + caps: *const GstCaps, + structure: *const GstStructure, + features: *const GstCapsFeatures, + ) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_caps_map_in_place(caps: *mut GstCaps, func: GstCapsMapFunc, user_data: gpointer) -> gboolean; + pub fn gst_caps_map_in_place( + caps: *mut GstCaps, + func: GstCapsMapFunc, + user_data: gpointer, + ) -> gboolean; pub fn gst_caps_merge(caps1: *mut GstCaps, caps2: *mut GstCaps) -> *mut GstCaps; - pub fn gst_caps_merge_structure(caps: *mut GstCaps, structure: *mut GstStructure) -> *mut GstCaps; + pub fn gst_caps_merge_structure( + caps: *mut GstCaps, + structure: *mut GstStructure, + ) -> *mut GstCaps; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_caps_merge_structure_full(caps: *mut GstCaps, structure: *mut GstStructure, features: *mut GstCapsFeatures) -> *mut GstCaps; + pub fn gst_caps_merge_structure_full( + caps: *mut GstCaps, + structure: *mut GstStructure, + features: *mut GstCapsFeatures, + ) -> *mut GstCaps; pub fn gst_caps_normalize(caps: *mut GstCaps) -> *mut GstCaps; pub fn gst_caps_remove_structure(caps: *mut GstCaps, idx: c_uint); #[cfg(any(feature = "v1_2", feature = "dox"))] @@ -4071,7 +4491,11 @@ extern "C" { pub fn gst_caps_set_features_simple(caps: *mut GstCaps, features: *mut GstCapsFeatures); pub fn gst_caps_set_simple(caps: *mut GstCaps, field: *const c_char, ...); //pub fn gst_caps_set_simple_valist(caps: *mut GstCaps, field: *const c_char, varargs: /*Unimplemented*/va_list); - pub fn gst_caps_set_value(caps: *mut GstCaps, field: *const c_char, value: *const gobject::GValue); + pub fn gst_caps_set_value( + caps: *mut GstCaps, + field: *const c_char, + value: *const gobject::GValue, + ); pub fn gst_caps_simplify(caps: *mut GstCaps) -> *mut GstCaps; pub fn gst_caps_steal_structure(caps: *mut GstCaps, index: c_uint) -> *mut GstStructure; pub fn gst_caps_subtract(minuend: *mut GstCaps, subtrahend: *mut GstCaps) -> *mut GstCaps; @@ -4100,9 +4524,15 @@ extern "C" { #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_caps_features_add_id(features: *mut GstCapsFeatures, feature: glib::GQuark); #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_caps_features_contains(features: *const GstCapsFeatures, feature: *const c_char) -> gboolean; + pub fn gst_caps_features_contains( + features: *const GstCapsFeatures, + feature: *const c_char, + ) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_caps_features_contains_id(features: *const GstCapsFeatures, feature: glib::GQuark) -> gboolean; + pub fn gst_caps_features_contains_id( + features: *const GstCapsFeatures, + feature: glib::GQuark, + ) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_caps_features_copy(features: *const GstCapsFeatures) -> *mut GstCapsFeatures; #[cfg(any(feature = "v1_2", feature = "dox"))] @@ -4110,19 +4540,28 @@ extern "C" { #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_caps_features_get_nth(features: *const GstCapsFeatures, i: c_uint) -> *const c_char; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_caps_features_get_nth_id(features: *const GstCapsFeatures, i: c_uint) -> glib::GQuark; + pub fn gst_caps_features_get_nth_id( + features: *const GstCapsFeatures, + i: c_uint, + ) -> glib::GQuark; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_caps_features_get_size(features: *const GstCapsFeatures) -> c_uint; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_caps_features_is_any(features: *const GstCapsFeatures) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_caps_features_is_equal(features1: *const GstCapsFeatures, features2: *const GstCapsFeatures) -> gboolean; + pub fn gst_caps_features_is_equal( + features1: *const GstCapsFeatures, + features2: *const GstCapsFeatures, + ) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_caps_features_remove(features: *mut GstCapsFeatures, feature: *const c_char); #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_caps_features_remove_id(features: *mut GstCapsFeatures, feature: glib::GQuark); #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_caps_features_set_parent_refcount(features: *mut GstCapsFeatures, refcount: *mut c_int) -> gboolean; + pub fn gst_caps_features_set_parent_refcount( + features: *mut GstCapsFeatures, + refcount: *mut c_int, + ) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_caps_features_to_string(features: *const GstCapsFeatures) -> *mut c_char; #[cfg(any(feature = "v1_2", feature = "dox"))] @@ -4139,7 +4578,10 @@ extern "C" { #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_context_get_structure(context: *const GstContext) -> *const GstStructure; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_context_has_context_type(context: *const GstContext, context_type: *const c_char) -> gboolean; + pub fn gst_context_has_context_type( + context: *const GstContext, + context_type: *const c_char, + ) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_context_is_persistent(context: *const GstContext) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] @@ -4149,12 +4591,27 @@ extern "C" { // GstDateTime //========================================================================= pub fn gst_date_time_get_type() -> GType; - pub fn gst_date_time_new(tzoffset: c_float, year: c_int, month: c_int, day: c_int, hour: c_int, minute: c_int, seconds: c_double) -> *mut GstDateTime; + pub fn gst_date_time_new( + tzoffset: c_float, + year: c_int, + month: c_int, + day: c_int, + hour: c_int, + minute: c_int, + seconds: c_double, + ) -> *mut GstDateTime; pub fn gst_date_time_new_from_g_date_time(dt: *mut glib::GDateTime) -> *mut GstDateTime; pub fn gst_date_time_new_from_iso8601_string(string: *const c_char) -> *mut GstDateTime; pub fn gst_date_time_new_from_unix_epoch_local_time(secs: i64) -> *mut GstDateTime; pub fn gst_date_time_new_from_unix_epoch_utc(secs: i64) -> *mut GstDateTime; - pub fn gst_date_time_new_local_time(year: c_int, month: c_int, day: c_int, hour: c_int, minute: c_int, seconds: c_double) -> *mut GstDateTime; + pub fn gst_date_time_new_local_time( + year: c_int, + month: c_int, + day: c_int, + hour: c_int, + minute: c_int, + seconds: c_double, + ) -> *mut GstDateTime; pub fn gst_date_time_new_now_local_time() -> *mut GstDateTime; pub fn gst_date_time_new_now_utc() -> *mut GstDateTime; pub fn gst_date_time_new_y(year: c_int) -> *mut GstDateTime; @@ -4198,39 +4655,106 @@ extern "C" { // GstDeviceProviderClass //========================================================================= #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_provider_class_add_metadata(klass: *mut GstDeviceProviderClass, key: *const c_char, value: *const c_char); + pub fn gst_device_provider_class_add_metadata( + klass: *mut GstDeviceProviderClass, + key: *const c_char, + value: *const c_char, + ); #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_provider_class_add_static_metadata(klass: *mut GstDeviceProviderClass, key: *const c_char, value: *const c_char); + pub fn gst_device_provider_class_add_static_metadata( + klass: *mut GstDeviceProviderClass, + key: *const c_char, + value: *const c_char, + ); #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_provider_class_get_metadata(klass: *mut GstDeviceProviderClass, key: *const c_char) -> *const c_char; + pub fn gst_device_provider_class_get_metadata( + klass: *mut GstDeviceProviderClass, + key: *const c_char, + ) -> *const c_char; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_provider_class_set_metadata(klass: *mut GstDeviceProviderClass, longname: *const c_char, classification: *const c_char, description: *const c_char, author: *const c_char); + pub fn gst_device_provider_class_set_metadata( + klass: *mut GstDeviceProviderClass, + longname: *const c_char, + classification: *const c_char, + description: *const c_char, + author: *const c_char, + ); #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_provider_class_set_static_metadata(klass: *mut GstDeviceProviderClass, longname: *const c_char, classification: *const c_char, description: *const c_char, author: *const c_char); + pub fn gst_device_provider_class_set_static_metadata( + klass: *mut GstDeviceProviderClass, + longname: *const c_char, + classification: *const c_char, + description: *const c_char, + author: *const c_char, + ); //========================================================================= // GstElementClass //========================================================================= - pub fn gst_element_class_add_metadata(klass: *mut GstElementClass, key: *const c_char, value: *const c_char); - pub fn gst_element_class_add_pad_template(klass: *mut GstElementClass, templ: *mut GstPadTemplate); - pub fn gst_element_class_add_static_metadata(klass: *mut GstElementClass, key: *const c_char, value: *const c_char); + pub fn gst_element_class_add_metadata( + klass: *mut GstElementClass, + key: *const c_char, + value: *const c_char, + ); + pub fn gst_element_class_add_pad_template( + klass: *mut GstElementClass, + templ: *mut GstPadTemplate, + ); + pub fn gst_element_class_add_static_metadata( + klass: *mut GstElementClass, + key: *const c_char, + value: *const c_char, + ); #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_element_class_add_static_pad_template(klass: *mut GstElementClass, static_templ: *mut GstStaticPadTemplate); + pub fn gst_element_class_add_static_pad_template( + klass: *mut GstElementClass, + static_templ: *mut GstStaticPadTemplate, + ); #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_element_class_add_static_pad_template_with_gtype(klass: *mut GstElementClass, static_templ: *mut GstStaticPadTemplate, pad_type: GType); - pub fn gst_element_class_get_metadata(klass: *mut GstElementClass, key: *const c_char) -> *const c_char; - pub fn gst_element_class_get_pad_template(element_class: *mut GstElementClass, name: *const c_char) -> *mut GstPadTemplate; - pub fn gst_element_class_get_pad_template_list(element_class: *mut GstElementClass) -> *mut glib::GList; - pub fn gst_element_class_set_metadata(klass: *mut GstElementClass, longname: *const c_char, classification: *const c_char, description: *const c_char, author: *const c_char); - pub fn gst_element_class_set_static_metadata(klass: *mut GstElementClass, longname: *const c_char, classification: *const c_char, description: *const c_char, author: *const c_char); + pub fn gst_element_class_add_static_pad_template_with_gtype( + klass: *mut GstElementClass, + static_templ: *mut GstStaticPadTemplate, + pad_type: GType, + ); + pub fn gst_element_class_get_metadata( + klass: *mut GstElementClass, + key: *const c_char, + ) -> *const c_char; + pub fn gst_element_class_get_pad_template( + element_class: *mut GstElementClass, + name: *const c_char, + ) -> *mut GstPadTemplate; + pub fn gst_element_class_get_pad_template_list( + element_class: *mut GstElementClass, + ) -> *mut glib::GList; + pub fn gst_element_class_set_metadata( + klass: *mut GstElementClass, + longname: *const c_char, + classification: *const c_char, + description: *const c_char, + author: *const c_char, + ); + pub fn gst_element_class_set_static_metadata( + klass: *mut GstElementClass, + longname: *const c_char, + classification: *const c_char, + description: *const c_char, + author: *const c_char, + ); //========================================================================= // GstEvent //========================================================================= pub fn gst_event_get_type() -> GType; - pub fn gst_event_new_buffer_size(format: GstFormat, minsize: i64, maxsize: i64, async: gboolean) -> *mut GstEvent; + pub fn gst_event_new_buffer_size( + format: GstFormat, + minsize: i64, + maxsize: i64, + async: gboolean, + ) -> *mut GstEvent; pub fn gst_event_new_caps(caps: *mut GstCaps) -> *mut GstEvent; - pub fn gst_event_new_custom(type_: GstEventType, structure: *mut GstStructure) -> *mut GstEvent; + pub fn gst_event_new_custom(type_: GstEventType, structure: *mut GstStructure) + -> *mut GstEvent; pub fn gst_event_new_eos() -> *mut GstEvent; pub fn gst_event_new_flush_start() -> *mut GstEvent; pub fn gst_event_new_flush_stop(reset_time: gboolean) -> *mut GstEvent; @@ -4238,16 +4762,39 @@ extern "C" { pub fn gst_event_new_latency(latency: GstClockTime) -> *mut GstEvent; pub fn gst_event_new_navigation(structure: *mut GstStructure) -> *mut GstEvent; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_event_new_protection(system_id: *const c_char, data: *mut GstBuffer, origin: *const c_char) -> *mut GstEvent; - pub fn gst_event_new_qos(type_: GstQOSType, proportion: c_double, diff: GstClockTimeDiff, timestamp: GstClockTime) -> *mut GstEvent; + pub fn gst_event_new_protection( + system_id: *const c_char, + data: *mut GstBuffer, + origin: *const c_char, + ) -> *mut GstEvent; + pub fn gst_event_new_qos( + type_: GstQOSType, + proportion: c_double, + diff: GstClockTimeDiff, + timestamp: GstClockTime, + ) -> *mut GstEvent; pub fn gst_event_new_reconfigure() -> *mut GstEvent; - pub fn gst_event_new_seek(rate: c_double, format: GstFormat, flags: GstSeekFlags, start_type: GstSeekType, start: i64, stop_type: GstSeekType, stop: i64) -> *mut GstEvent; + pub fn gst_event_new_seek( + rate: c_double, + format: GstFormat, + flags: GstSeekFlags, + start_type: GstSeekType, + start: i64, + stop_type: GstSeekType, + stop: i64, + ) -> *mut GstEvent; pub fn gst_event_new_segment(segment: *const GstSegment) -> *mut GstEvent; pub fn gst_event_new_segment_done(format: GstFormat, position: i64) -> *mut GstEvent; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_event_new_select_streams(streams: *mut glib::GList) -> *mut GstEvent; pub fn gst_event_new_sink_message(name: *const c_char, msg: *mut GstMessage) -> *mut GstEvent; - pub fn gst_event_new_step(format: GstFormat, amount: u64, rate: c_double, flush: gboolean, intermediate: gboolean) -> *mut GstEvent; + pub fn gst_event_new_step( + format: GstFormat, + amount: u64, + rate: c_double, + flush: gboolean, + intermediate: gboolean, + ) -> *mut GstEvent; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_event_new_stream_collection(collection: *mut GstStreamCollection) -> *mut GstEvent; #[cfg(any(feature = "v1_10", feature = "dox"))] @@ -4262,29 +4809,76 @@ extern "C" { pub fn gst_event_get_seqnum(event: *mut GstEvent) -> u32; pub fn gst_event_get_structure(event: *mut GstEvent) -> *const GstStructure; pub fn gst_event_has_name(event: *mut GstEvent, name: *const c_char) -> gboolean; - pub fn gst_event_parse_buffer_size(event: *mut GstEvent, format: *mut GstFormat, minsize: *mut i64, maxsize: *mut i64, async: *mut gboolean); + pub fn gst_event_parse_buffer_size( + event: *mut GstEvent, + format: *mut GstFormat, + minsize: *mut i64, + maxsize: *mut i64, + async: *mut gboolean, + ); pub fn gst_event_parse_caps(event: *mut GstEvent, caps: *mut *mut GstCaps); pub fn gst_event_parse_flush_stop(event: *mut GstEvent, reset_time: *mut gboolean); - pub fn gst_event_parse_gap(event: *mut GstEvent, timestamp: *mut GstClockTime, duration: *mut GstClockTime); + pub fn gst_event_parse_gap( + event: *mut GstEvent, + timestamp: *mut GstClockTime, + duration: *mut GstClockTime, + ); #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_event_parse_group_id(event: *mut GstEvent, group_id: *mut c_uint) -> gboolean; pub fn gst_event_parse_latency(event: *mut GstEvent, latency: *mut GstClockTime); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_event_parse_protection(event: *mut GstEvent, system_id: *mut *const c_char, data: *mut *mut GstBuffer, origin: *mut *const c_char); - pub fn gst_event_parse_qos(event: *mut GstEvent, type_: *mut GstQOSType, proportion: *mut c_double, diff: *mut GstClockTimeDiff, timestamp: *mut GstClockTime); - pub fn gst_event_parse_seek(event: *mut GstEvent, rate: *mut c_double, format: *mut GstFormat, flags: *mut GstSeekFlags, start_type: *mut GstSeekType, start: *mut i64, stop_type: *mut GstSeekType, stop: *mut i64); + pub fn gst_event_parse_protection( + event: *mut GstEvent, + system_id: *mut *const c_char, + data: *mut *mut GstBuffer, + origin: *mut *const c_char, + ); + pub fn gst_event_parse_qos( + event: *mut GstEvent, + type_: *mut GstQOSType, + proportion: *mut c_double, + diff: *mut GstClockTimeDiff, + timestamp: *mut GstClockTime, + ); + pub fn gst_event_parse_seek( + event: *mut GstEvent, + rate: *mut c_double, + format: *mut GstFormat, + flags: *mut GstSeekFlags, + start_type: *mut GstSeekType, + start: *mut i64, + stop_type: *mut GstSeekType, + stop: *mut i64, + ); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_event_parse_seek_trickmode_interval(event: *mut GstEvent, interval: *mut GstClockTime); + pub fn gst_event_parse_seek_trickmode_interval( + event: *mut GstEvent, + interval: *mut GstClockTime, + ); pub fn gst_event_parse_segment(event: *mut GstEvent, segment: *mut *const GstSegment); - pub fn gst_event_parse_segment_done(event: *mut GstEvent, format: *mut GstFormat, position: *mut i64); + pub fn gst_event_parse_segment_done( + event: *mut GstEvent, + format: *mut GstFormat, + position: *mut i64, + ); #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_event_parse_select_streams(event: *mut GstEvent, streams: *mut *mut glib::GList); pub fn gst_event_parse_sink_message(event: *mut GstEvent, msg: *mut *mut GstMessage); - pub fn gst_event_parse_step(event: *mut GstEvent, format: *mut GstFormat, amount: *mut u64, rate: *mut c_double, flush: *mut gboolean, intermediate: *mut gboolean); + pub fn gst_event_parse_step( + event: *mut GstEvent, + format: *mut GstFormat, + amount: *mut u64, + rate: *mut c_double, + flush: *mut gboolean, + intermediate: *mut gboolean, + ); #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_event_parse_stream(event: *mut GstEvent, stream: *mut *mut GstStream); #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_event_parse_stream_collection(event: *mut GstEvent, collection: *mut *mut GstStreamCollection); + pub fn gst_event_parse_stream_collection( + event: *mut GstEvent, + collection: *mut *mut GstStreamCollection, + ); #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_event_parse_stream_flags(event: *mut GstEvent, flags: *mut GstStreamFlags); #[cfg(any(feature = "v1_10", feature = "dox"))] @@ -4310,16 +4904,55 @@ extern "C" { // GstIterator //========================================================================= pub fn gst_iterator_get_type() -> GType; - pub fn gst_iterator_new(size: c_uint, type_: GType, lock: *mut glib::GMutex, master_cookie: *mut u32, copy: GstIteratorCopyFunction, next: GstIteratorNextFunction, item: GstIteratorItemFunction, resync: GstIteratorResyncFunction, free: GstIteratorFreeFunction) -> *mut GstIterator; - pub fn gst_iterator_new_list(type_: GType, lock: *mut glib::GMutex, master_cookie: *mut u32, list: *mut *mut glib::GList, owner: *mut gobject::GObject, item: GstIteratorItemFunction) -> *mut GstIterator; - pub fn gst_iterator_new_single(type_: GType, object: *const gobject::GValue) -> *mut GstIterator; + pub fn gst_iterator_new( + size: c_uint, + type_: GType, + lock: *mut glib::GMutex, + master_cookie: *mut u32, + copy: GstIteratorCopyFunction, + next: GstIteratorNextFunction, + item: GstIteratorItemFunction, + resync: GstIteratorResyncFunction, + free: GstIteratorFreeFunction, + ) -> *mut GstIterator; + pub fn gst_iterator_new_list( + type_: GType, + lock: *mut glib::GMutex, + master_cookie: *mut u32, + list: *mut *mut glib::GList, + owner: *mut gobject::GObject, + item: GstIteratorItemFunction, + ) -> *mut GstIterator; + pub fn gst_iterator_new_single( + type_: GType, + object: *const gobject::GValue, + ) -> *mut GstIterator; pub fn gst_iterator_copy(it: *const GstIterator) -> *mut GstIterator; - pub fn gst_iterator_filter(it: *mut GstIterator, func: glib::GCompareFunc, user_data: *const gobject::GValue) -> *mut GstIterator; - pub fn gst_iterator_find_custom(it: *mut GstIterator, func: glib::GCompareFunc, elem: *mut gobject::GValue, user_data: gpointer) -> gboolean; - pub fn gst_iterator_fold(it: *mut GstIterator, func: GstIteratorFoldFunction, ret: *mut gobject::GValue, user_data: gpointer) -> GstIteratorResult; - pub fn gst_iterator_foreach(it: *mut GstIterator, func: GstIteratorForeachFunction, user_data: gpointer) -> GstIteratorResult; + pub fn gst_iterator_filter( + it: *mut GstIterator, + func: glib::GCompareFunc, + user_data: *const gobject::GValue, + ) -> *mut GstIterator; + pub fn gst_iterator_find_custom( + it: *mut GstIterator, + func: glib::GCompareFunc, + elem: *mut gobject::GValue, + user_data: gpointer, + ) -> gboolean; + pub fn gst_iterator_fold( + it: *mut GstIterator, + func: GstIteratorFoldFunction, + ret: *mut gobject::GValue, + user_data: gpointer, + ) -> GstIteratorResult; + pub fn gst_iterator_foreach( + it: *mut GstIterator, + func: GstIteratorForeachFunction, + user_data: gpointer, + ) -> GstIteratorResult; pub fn gst_iterator_free(it: *mut GstIterator); - pub fn gst_iterator_next(it: *mut GstIterator, elem: *mut gobject::GValue) -> GstIteratorResult; + pub fn gst_iterator_next(it: *mut GstIterator, elem: *mut gobject::GValue) + -> GstIteratorResult; pub fn gst_iterator_push(it: *mut GstIterator, other: *mut GstIterator); pub fn gst_iterator_resync(it: *mut GstIterator); @@ -4327,15 +4960,48 @@ extern "C" { // GstMemory //========================================================================= pub fn gst_memory_get_type() -> GType; - pub fn gst_memory_new_wrapped(flags: GstMemoryFlags, data: gpointer, maxsize: size_t, offset: size_t, size: size_t, user_data: gpointer, notify: glib::GDestroyNotify) -> *mut GstMemory; + pub fn gst_memory_new_wrapped( + flags: GstMemoryFlags, + data: gpointer, + maxsize: size_t, + offset: size_t, + size: size_t, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstMemory; pub fn gst_memory_copy(mem: *mut GstMemory, offset: ssize_t, size: ssize_t) -> *mut GstMemory; - pub fn gst_memory_get_sizes(mem: *mut GstMemory, offset: *mut size_t, maxsize: *mut size_t) -> size_t; - pub fn gst_memory_init(mem: *mut GstMemory, flags: GstMemoryFlags, allocator: *mut GstAllocator, parent: *mut GstMemory, maxsize: size_t, align: size_t, offset: size_t, size: size_t); - pub fn gst_memory_is_span(mem1: *mut GstMemory, mem2: *mut GstMemory, offset: *mut size_t) -> gboolean; + pub fn gst_memory_get_sizes( + mem: *mut GstMemory, + offset: *mut size_t, + maxsize: *mut size_t, + ) -> size_t; + pub fn gst_memory_init( + mem: *mut GstMemory, + flags: GstMemoryFlags, + allocator: *mut GstAllocator, + parent: *mut GstMemory, + maxsize: size_t, + align: size_t, + offset: size_t, + size: size_t, + ); + pub fn gst_memory_is_span( + mem1: *mut GstMemory, + mem2: *mut GstMemory, + offset: *mut size_t, + ) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_memory_is_type(mem: *mut GstMemory, mem_type: *const c_char) -> gboolean; - pub fn gst_memory_make_mapped(mem: *mut GstMemory, info: *mut GstMapInfo, flags: GstMapFlags) -> *mut GstMemory; - pub fn gst_memory_map(mem: *mut GstMemory, info: *mut GstMapInfo, flags: GstMapFlags) -> gboolean; + pub fn gst_memory_make_mapped( + mem: *mut GstMemory, + info: *mut GstMapInfo, + flags: GstMapFlags, + ) -> *mut GstMemory; + pub fn gst_memory_map( + mem: *mut GstMemory, + info: *mut GstMapInfo, + flags: GstMapFlags, + ) -> gboolean; pub fn gst_memory_resize(mem: *mut GstMemory, offset: ssize_t, size: size_t); pub fn gst_memory_share(mem: *mut GstMemory, offset: ssize_t, size: ssize_t) -> *mut GstMemory; pub fn gst_memory_unmap(mem: *mut GstMemory, info: *mut GstMapInfo); @@ -4344,131 +5010,413 @@ extern "C" { // GstMessage //========================================================================= pub fn gst_message_get_type() -> GType; - pub fn gst_message_new_application(src: *mut GstObject, structure: *mut GstStructure) -> *mut GstMessage; - pub fn gst_message_new_async_done(src: *mut GstObject, running_time: GstClockTime) -> *mut GstMessage; + pub fn gst_message_new_application( + src: *mut GstObject, + structure: *mut GstStructure, + ) -> *mut GstMessage; + pub fn gst_message_new_async_done( + src: *mut GstObject, + running_time: GstClockTime, + ) -> *mut GstMessage; pub fn gst_message_new_async_start(src: *mut GstObject) -> *mut GstMessage; pub fn gst_message_new_buffering(src: *mut GstObject, percent: c_int) -> *mut GstMessage; - pub fn gst_message_new_clock_lost(src: *mut GstObject, clock: *mut GstClock) -> *mut GstMessage; - pub fn gst_message_new_clock_provide(src: *mut GstObject, clock: *mut GstClock, ready: gboolean) -> *mut GstMessage; - pub fn gst_message_new_custom(type_: GstMessageType, src: *mut GstObject, structure: *mut GstStructure) -> *mut GstMessage; + pub fn gst_message_new_clock_lost(src: *mut GstObject, clock: *mut GstClock) + -> *mut GstMessage; + pub fn gst_message_new_clock_provide( + src: *mut GstObject, + clock: *mut GstClock, + ready: gboolean, + ) -> *mut GstMessage; + pub fn gst_message_new_custom( + type_: GstMessageType, + src: *mut GstObject, + structure: *mut GstStructure, + ) -> *mut GstMessage; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_message_new_device_added(src: *mut GstObject, device: *mut GstDevice) -> *mut GstMessage; + pub fn gst_message_new_device_added( + src: *mut GstObject, + device: *mut GstDevice, + ) -> *mut GstMessage; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_message_new_device_changed(src: *mut GstObject, device: *mut GstDevice, changed_device: *mut GstDevice) -> *mut GstMessage; + pub fn gst_message_new_device_changed( + src: *mut GstObject, + device: *mut GstDevice, + changed_device: *mut GstDevice, + ) -> *mut GstMessage; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_message_new_device_removed(src: *mut GstObject, device: *mut GstDevice) -> *mut GstMessage; + pub fn gst_message_new_device_removed( + src: *mut GstObject, + device: *mut GstDevice, + ) -> *mut GstMessage; pub fn gst_message_new_duration_changed(src: *mut GstObject) -> *mut GstMessage; - pub fn gst_message_new_element(src: *mut GstObject, structure: *mut GstStructure) -> *mut GstMessage; + pub fn gst_message_new_element( + src: *mut GstObject, + structure: *mut GstStructure, + ) -> *mut GstMessage; pub fn gst_message_new_eos(src: *mut GstObject) -> *mut GstMessage; - pub fn gst_message_new_error(src: *mut GstObject, error: *mut glib::GError, debug: *const c_char) -> *mut GstMessage; + pub fn gst_message_new_error( + src: *mut GstObject, + error: *mut glib::GError, + debug: *const c_char, + ) -> *mut GstMessage; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_message_new_error_with_details(src: *mut GstObject, error: *mut glib::GError, debug: *const c_char, details: *mut GstStructure) -> *mut GstMessage; + pub fn gst_message_new_error_with_details( + src: *mut GstObject, + error: *mut glib::GError, + debug: *const c_char, + details: *mut GstStructure, + ) -> *mut GstMessage; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_message_new_have_context(src: *mut GstObject, context: *mut GstContext) -> *mut GstMessage; - pub fn gst_message_new_info(src: *mut GstObject, error: *mut glib::GError, debug: *const c_char) -> *mut GstMessage; + pub fn gst_message_new_have_context( + src: *mut GstObject, + context: *mut GstContext, + ) -> *mut GstMessage; + pub fn gst_message_new_info( + src: *mut GstObject, + error: *mut glib::GError, + debug: *const c_char, + ) -> *mut GstMessage; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_message_new_info_with_details(src: *mut GstObject, error: *mut glib::GError, debug: *const c_char, details: *mut GstStructure) -> *mut GstMessage; + pub fn gst_message_new_info_with_details( + src: *mut GstObject, + error: *mut glib::GError, + debug: *const c_char, + details: *mut GstStructure, + ) -> *mut GstMessage; pub fn gst_message_new_latency(src: *mut GstObject) -> *mut GstMessage; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_message_new_need_context(src: *mut GstObject, context_type: *const c_char) -> *mut GstMessage; + pub fn gst_message_new_need_context( + src: *mut GstObject, + context_type: *const c_char, + ) -> *mut GstMessage; pub fn gst_message_new_new_clock(src: *mut GstObject, clock: *mut GstClock) -> *mut GstMessage; - pub fn gst_message_new_progress(src: *mut GstObject, type_: GstProgressType, code: *const c_char, text: *const c_char) -> *mut GstMessage; + pub fn gst_message_new_progress( + src: *mut GstObject, + type_: GstProgressType, + code: *const c_char, + text: *const c_char, + ) -> *mut GstMessage; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_message_new_property_notify(src: *mut GstObject, property_name: *const c_char, val: *mut gobject::GValue) -> *mut GstMessage; - pub fn gst_message_new_qos(src: *mut GstObject, live: gboolean, running_time: u64, stream_time: u64, timestamp: u64, duration: u64) -> *mut GstMessage; + pub fn gst_message_new_property_notify( + src: *mut GstObject, + property_name: *const c_char, + val: *mut gobject::GValue, + ) -> *mut GstMessage; + pub fn gst_message_new_qos( + src: *mut GstObject, + live: gboolean, + running_time: u64, + stream_time: u64, + timestamp: u64, + duration: u64, + ) -> *mut GstMessage; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_message_new_redirect(src: *mut GstObject, location: *const c_char, tag_list: *mut GstTagList, entry_struct: *const GstStructure) -> *mut GstMessage; + pub fn gst_message_new_redirect( + src: *mut GstObject, + location: *const c_char, + tag_list: *mut GstTagList, + entry_struct: *const GstStructure, + ) -> *mut GstMessage; pub fn gst_message_new_request_state(src: *mut GstObject, state: GstState) -> *mut GstMessage; - pub fn gst_message_new_reset_time(src: *mut GstObject, running_time: GstClockTime) -> *mut GstMessage; - pub fn gst_message_new_segment_done(src: *mut GstObject, format: GstFormat, position: i64) -> *mut GstMessage; - pub fn gst_message_new_segment_start(src: *mut GstObject, format: GstFormat, position: i64) -> *mut GstMessage; - pub fn gst_message_new_state_changed(src: *mut GstObject, oldstate: GstState, newstate: GstState, pending: GstState) -> *mut GstMessage; + pub fn gst_message_new_reset_time( + src: *mut GstObject, + running_time: GstClockTime, + ) -> *mut GstMessage; + pub fn gst_message_new_segment_done( + src: *mut GstObject, + format: GstFormat, + position: i64, + ) -> *mut GstMessage; + pub fn gst_message_new_segment_start( + src: *mut GstObject, + format: GstFormat, + position: i64, + ) -> *mut GstMessage; + pub fn gst_message_new_state_changed( + src: *mut GstObject, + oldstate: GstState, + newstate: GstState, + pending: GstState, + ) -> *mut GstMessage; pub fn gst_message_new_state_dirty(src: *mut GstObject) -> *mut GstMessage; - pub fn gst_message_new_step_done(src: *mut GstObject, format: GstFormat, amount: u64, rate: c_double, flush: gboolean, intermediate: gboolean, duration: u64, eos: gboolean) -> *mut GstMessage; - pub fn gst_message_new_step_start(src: *mut GstObject, active: gboolean, format: GstFormat, amount: u64, rate: c_double, flush: gboolean, intermediate: gboolean) -> *mut GstMessage; + pub fn gst_message_new_step_done( + src: *mut GstObject, + format: GstFormat, + amount: u64, + rate: c_double, + flush: gboolean, + intermediate: gboolean, + duration: u64, + eos: gboolean, + ) -> *mut GstMessage; + pub fn gst_message_new_step_start( + src: *mut GstObject, + active: gboolean, + format: GstFormat, + amount: u64, + rate: c_double, + flush: gboolean, + intermediate: gboolean, + ) -> *mut GstMessage; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_message_new_stream_collection(src: *mut GstObject, collection: *mut GstStreamCollection) -> *mut GstMessage; + pub fn gst_message_new_stream_collection( + src: *mut GstObject, + collection: *mut GstStreamCollection, + ) -> *mut GstMessage; pub fn gst_message_new_stream_start(src: *mut GstObject) -> *mut GstMessage; - pub fn gst_message_new_stream_status(src: *mut GstObject, type_: GstStreamStatusType, owner: *mut GstElement) -> *mut GstMessage; + pub fn gst_message_new_stream_status( + src: *mut GstObject, + type_: GstStreamStatusType, + owner: *mut GstElement, + ) -> *mut GstMessage; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_message_new_streams_selected(src: *mut GstObject, collection: *mut GstStreamCollection) -> *mut GstMessage; - pub fn gst_message_new_structure_change(src: *mut GstObject, type_: GstStructureChangeType, owner: *mut GstElement, busy: gboolean) -> *mut GstMessage; + pub fn gst_message_new_streams_selected( + src: *mut GstObject, + collection: *mut GstStreamCollection, + ) -> *mut GstMessage; + pub fn gst_message_new_structure_change( + src: *mut GstObject, + type_: GstStructureChangeType, + owner: *mut GstElement, + busy: gboolean, + ) -> *mut GstMessage; pub fn gst_message_new_tag(src: *mut GstObject, tag_list: *mut GstTagList) -> *mut GstMessage; - pub fn gst_message_new_toc(src: *mut GstObject, toc: *mut GstToc, updated: gboolean) -> *mut GstMessage; - pub fn gst_message_new_warning(src: *mut GstObject, error: *mut glib::GError, debug: *const c_char) -> *mut GstMessage; + pub fn gst_message_new_toc( + src: *mut GstObject, + toc: *mut GstToc, + updated: gboolean, + ) -> *mut GstMessage; + pub fn gst_message_new_warning( + src: *mut GstObject, + error: *mut glib::GError, + debug: *const c_char, + ) -> *mut GstMessage; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_message_new_warning_with_details(src: *mut GstObject, error: *mut glib::GError, debug: *const c_char, details: *mut GstStructure) -> *mut GstMessage; + pub fn gst_message_new_warning_with_details( + src: *mut GstObject, + error: *mut glib::GError, + debug: *const c_char, + details: *mut GstStructure, + ) -> *mut GstMessage; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_message_add_redirect_entry(message: *mut GstMessage, location: *const c_char, tag_list: *mut GstTagList, entry_struct: *const GstStructure); + pub fn gst_message_add_redirect_entry( + message: *mut GstMessage, + location: *const c_char, + tag_list: *mut GstTagList, + entry_struct: *const GstStructure, + ); #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_message_get_num_redirect_entries(message: *mut GstMessage) -> size_t; pub fn gst_message_get_seqnum(message: *mut GstMessage) -> u32; - pub fn gst_message_get_stream_status_object(message: *mut GstMessage) -> *const gobject::GValue; + pub fn gst_message_get_stream_status_object(message: *mut GstMessage) + -> *const gobject::GValue; pub fn gst_message_get_structure(message: *mut GstMessage) -> *const GstStructure; pub fn gst_message_has_name(message: *mut GstMessage, name: *const c_char) -> gboolean; pub fn gst_message_parse_async_done(message: *mut GstMessage, running_time: *mut GstClockTime); pub fn gst_message_parse_buffering(message: *mut GstMessage, percent: *mut c_int); - pub fn gst_message_parse_buffering_stats(message: *mut GstMessage, mode: *mut GstBufferingMode, avg_in: *mut c_int, avg_out: *mut c_int, buffering_left: *mut i64); + pub fn gst_message_parse_buffering_stats( + message: *mut GstMessage, + mode: *mut GstBufferingMode, + avg_in: *mut c_int, + avg_out: *mut c_int, + buffering_left: *mut i64, + ); pub fn gst_message_parse_clock_lost(message: *mut GstMessage, clock: *mut *mut GstClock); - pub fn gst_message_parse_clock_provide(message: *mut GstMessage, clock: *mut *mut GstClock, ready: *mut gboolean); + pub fn gst_message_parse_clock_provide( + message: *mut GstMessage, + clock: *mut *mut GstClock, + ready: *mut gboolean, + ); #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_message_parse_context_type(message: *mut GstMessage, context_type: *mut *const c_char) -> gboolean; + pub fn gst_message_parse_context_type( + message: *mut GstMessage, + context_type: *mut *const c_char, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_message_parse_device_added(message: *mut GstMessage, device: *mut *mut GstDevice); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_message_parse_device_changed(message: *mut GstMessage, device: *mut *mut GstDevice, changed_device: *mut *mut GstDevice); + pub fn gst_message_parse_device_changed( + message: *mut GstMessage, + device: *mut *mut GstDevice, + changed_device: *mut *mut GstDevice, + ); #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_message_parse_device_removed(message: *mut GstMessage, device: *mut *mut GstDevice); - pub fn gst_message_parse_error(message: *mut GstMessage, gerror: *mut *mut glib::GError, debug: *mut *mut c_char); + pub fn gst_message_parse_error( + message: *mut GstMessage, + gerror: *mut *mut glib::GError, + debug: *mut *mut c_char, + ); #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_message_parse_error_details(message: *mut GstMessage, structure: *mut *const GstStructure); + pub fn gst_message_parse_error_details( + message: *mut GstMessage, + structure: *mut *const GstStructure, + ); #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_message_parse_group_id(message: *mut GstMessage, group_id: *mut c_uint) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_message_parse_have_context(message: *mut GstMessage, context: *mut *mut GstContext); - pub fn gst_message_parse_info(message: *mut GstMessage, gerror: *mut *mut glib::GError, debug: *mut *mut c_char); + pub fn gst_message_parse_info( + message: *mut GstMessage, + gerror: *mut *mut glib::GError, + debug: *mut *mut c_char, + ); #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_message_parse_info_details(message: *mut GstMessage, structure: *mut *const GstStructure); + pub fn gst_message_parse_info_details( + message: *mut GstMessage, + structure: *mut *const GstStructure, + ); pub fn gst_message_parse_new_clock(message: *mut GstMessage, clock: *mut *mut GstClock); - pub fn gst_message_parse_progress(message: *mut GstMessage, type_: *mut GstProgressType, code: *mut *mut c_char, text: *mut *mut c_char); + pub fn gst_message_parse_progress( + message: *mut GstMessage, + type_: *mut GstProgressType, + code: *mut *mut c_char, + text: *mut *mut c_char, + ); #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_message_parse_property_notify(message: *mut GstMessage, object: *mut *mut GstObject, property_name: *mut *const c_char, property_value: *mut *const gobject::GValue); - pub fn gst_message_parse_qos(message: *mut GstMessage, live: *mut gboolean, running_time: *mut u64, stream_time: *mut u64, timestamp: *mut u64, duration: *mut u64); - pub fn gst_message_parse_qos_stats(message: *mut GstMessage, format: *mut GstFormat, processed: *mut u64, dropped: *mut u64); - pub fn gst_message_parse_qos_values(message: *mut GstMessage, jitter: *mut i64, proportion: *mut c_double, quality: *mut c_int); + pub fn gst_message_parse_property_notify( + message: *mut GstMessage, + object: *mut *mut GstObject, + property_name: *mut *const c_char, + property_value: *mut *const gobject::GValue, + ); + pub fn gst_message_parse_qos( + message: *mut GstMessage, + live: *mut gboolean, + running_time: *mut u64, + stream_time: *mut u64, + timestamp: *mut u64, + duration: *mut u64, + ); + pub fn gst_message_parse_qos_stats( + message: *mut GstMessage, + format: *mut GstFormat, + processed: *mut u64, + dropped: *mut u64, + ); + pub fn gst_message_parse_qos_values( + message: *mut GstMessage, + jitter: *mut i64, + proportion: *mut c_double, + quality: *mut c_int, + ); #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_message_parse_redirect_entry(message: *mut GstMessage, entry_index: size_t, location: *mut *const c_char, tag_list: *mut *mut GstTagList, entry_struct: *mut *const GstStructure); + pub fn gst_message_parse_redirect_entry( + message: *mut GstMessage, + entry_index: size_t, + location: *mut *const c_char, + tag_list: *mut *mut GstTagList, + entry_struct: *mut *const GstStructure, + ); pub fn gst_message_parse_request_state(message: *mut GstMessage, state: *mut GstState); pub fn gst_message_parse_reset_time(message: *mut GstMessage, running_time: *mut GstClockTime); - pub fn gst_message_parse_segment_done(message: *mut GstMessage, format: *mut GstFormat, position: *mut i64); - pub fn gst_message_parse_segment_start(message: *mut GstMessage, format: *mut GstFormat, position: *mut i64); - pub fn gst_message_parse_state_changed(message: *mut GstMessage, oldstate: *mut GstState, newstate: *mut GstState, pending: *mut GstState); - pub fn gst_message_parse_step_done(message: *mut GstMessage, format: *mut GstFormat, amount: *mut u64, rate: *mut c_double, flush: *mut gboolean, intermediate: *mut gboolean, duration: *mut u64, eos: *mut gboolean); - pub fn gst_message_parse_step_start(message: *mut GstMessage, active: *mut gboolean, format: *mut GstFormat, amount: *mut u64, rate: *mut c_double, flush: *mut gboolean, intermediate: *mut gboolean); + pub fn gst_message_parse_segment_done( + message: *mut GstMessage, + format: *mut GstFormat, + position: *mut i64, + ); + pub fn gst_message_parse_segment_start( + message: *mut GstMessage, + format: *mut GstFormat, + position: *mut i64, + ); + pub fn gst_message_parse_state_changed( + message: *mut GstMessage, + oldstate: *mut GstState, + newstate: *mut GstState, + pending: *mut GstState, + ); + pub fn gst_message_parse_step_done( + message: *mut GstMessage, + format: *mut GstFormat, + amount: *mut u64, + rate: *mut c_double, + flush: *mut gboolean, + intermediate: *mut gboolean, + duration: *mut u64, + eos: *mut gboolean, + ); + pub fn gst_message_parse_step_start( + message: *mut GstMessage, + active: *mut gboolean, + format: *mut GstFormat, + amount: *mut u64, + rate: *mut c_double, + flush: *mut gboolean, + intermediate: *mut gboolean, + ); #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_message_parse_stream_collection(message: *mut GstMessage, collection: *mut *mut GstStreamCollection); - pub fn gst_message_parse_stream_status(message: *mut GstMessage, type_: *mut GstStreamStatusType, owner: *mut *mut GstElement); + pub fn gst_message_parse_stream_collection( + message: *mut GstMessage, + collection: *mut *mut GstStreamCollection, + ); + pub fn gst_message_parse_stream_status( + message: *mut GstMessage, + type_: *mut GstStreamStatusType, + owner: *mut *mut GstElement, + ); #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_message_parse_streams_selected(message: *mut GstMessage, collection: *mut *mut GstStreamCollection); - pub fn gst_message_parse_structure_change(message: *mut GstMessage, type_: *mut GstStructureChangeType, owner: *mut *mut GstElement, busy: *mut gboolean); + pub fn gst_message_parse_streams_selected( + message: *mut GstMessage, + collection: *mut *mut GstStreamCollection, + ); + pub fn gst_message_parse_structure_change( + message: *mut GstMessage, + type_: *mut GstStructureChangeType, + owner: *mut *mut GstElement, + busy: *mut gboolean, + ); pub fn gst_message_parse_tag(message: *mut GstMessage, tag_list: *mut *mut GstTagList); - pub fn gst_message_parse_toc(message: *mut GstMessage, toc: *mut *mut GstToc, updated: *mut gboolean); - pub fn gst_message_parse_warning(message: *mut GstMessage, gerror: *mut *mut glib::GError, debug: *mut *mut c_char); + pub fn gst_message_parse_toc( + message: *mut GstMessage, + toc: *mut *mut GstToc, + updated: *mut gboolean, + ); + pub fn gst_message_parse_warning( + message: *mut GstMessage, + gerror: *mut *mut glib::GError, + debug: *mut *mut c_char, + ); #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_message_parse_warning_details(message: *mut GstMessage, structure: *mut *const GstStructure); - pub fn gst_message_set_buffering_stats(message: *mut GstMessage, mode: GstBufferingMode, avg_in: c_int, avg_out: c_int, buffering_left: i64); + pub fn gst_message_parse_warning_details( + message: *mut GstMessage, + structure: *mut *const GstStructure, + ); + pub fn gst_message_set_buffering_stats( + message: *mut GstMessage, + mode: GstBufferingMode, + avg_in: c_int, + avg_out: c_int, + buffering_left: i64, + ); #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_message_set_group_id(message: *mut GstMessage, group_id: c_uint); - pub fn gst_message_set_qos_stats(message: *mut GstMessage, format: GstFormat, processed: u64, dropped: u64); - pub fn gst_message_set_qos_values(message: *mut GstMessage, jitter: i64, proportion: c_double, quality: c_int); + pub fn gst_message_set_qos_stats( + message: *mut GstMessage, + format: GstFormat, + processed: u64, + dropped: u64, + ); + pub fn gst_message_set_qos_values( + message: *mut GstMessage, + jitter: i64, + proportion: c_double, + quality: c_int, + ); pub fn gst_message_set_seqnum(message: *mut GstMessage, seqnum: u32); - pub fn gst_message_set_stream_status_object(message: *mut GstMessage, object: *const gobject::GValue); + pub fn gst_message_set_stream_status_object( + message: *mut GstMessage, + object: *const gobject::GValue, + ); #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_message_streams_selected_add(message: *mut GstMessage, stream: *mut GstStream); #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_message_streams_selected_get_size(message: *mut GstMessage) -> c_uint; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_message_streams_selected_get_stream(message: *mut GstMessage, idx: c_uint) -> *mut GstStream; + pub fn gst_message_streams_selected_get_stream( + message: *mut GstMessage, + idx: c_uint, + ) -> *mut GstStream; #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_message_writable_structure(message: *mut GstMessage) -> *mut GstStructure; @@ -4484,7 +5432,14 @@ extern "C" { pub fn gst_meta_api_type_has_tag(api: GType, tag: glib::GQuark) -> gboolean; pub fn gst_meta_api_type_register(api: *const c_char, tags: *mut *const c_char) -> GType; pub fn gst_meta_get_info(impl_: *const c_char) -> *const GstMetaInfo; - pub fn gst_meta_register(api: GType, impl_: *const c_char, size: size_t, init_func: GstMetaInitFunction, free_func: GstMetaFreeFunction, transform_func: GstMetaTransformFunction) -> *const GstMetaInfo; + pub fn gst_meta_register( + api: GType, + impl_: *const c_char, + size: size_t, + init_func: GstMetaInitFunction, + free_func: GstMetaFreeFunction, + transform_func: GstMetaTransformFunction, + ) -> *const GstMetaInfo; //========================================================================= // GstMiniObject @@ -4493,22 +5448,49 @@ extern "C" { pub fn gst_mini_object_add_parent(object: *mut GstMiniObject, parent: *mut GstMiniObject); pub fn gst_mini_object_copy(mini_object: *const GstMiniObject) -> *mut GstMiniObject; pub fn gst_mini_object_get_qdata(object: *mut GstMiniObject, quark: glib::GQuark) -> gpointer; - pub fn gst_mini_object_init(mini_object: *mut GstMiniObject, flags: c_uint, type_: GType, copy_func: GstMiniObjectCopyFunction, dispose_func: GstMiniObjectDisposeFunction, free_func: GstMiniObjectFreeFunction); + pub fn gst_mini_object_init( + mini_object: *mut GstMiniObject, + flags: c_uint, + type_: GType, + copy_func: GstMiniObjectCopyFunction, + dispose_func: GstMiniObjectDisposeFunction, + free_func: GstMiniObjectFreeFunction, + ); pub fn gst_mini_object_is_writable(mini_object: *const GstMiniObject) -> gboolean; pub fn gst_mini_object_lock(object: *mut GstMiniObject, flags: GstLockFlags) -> gboolean; pub fn gst_mini_object_make_writable(mini_object: *mut GstMiniObject) -> *mut GstMiniObject; pub fn gst_mini_object_ref(mini_object: *mut GstMiniObject) -> *mut GstMiniObject; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_mini_object_remove_parent(object: *mut GstMiniObject, parent: *mut GstMiniObject); - pub fn gst_mini_object_set_qdata(object: *mut GstMiniObject, quark: glib::GQuark, data: gpointer, destroy: glib::GDestroyNotify); - pub fn gst_mini_object_steal_qdata(object: *mut GstMiniObject, quark: glib::GQuark) -> gpointer; + pub fn gst_mini_object_set_qdata( + object: *mut GstMiniObject, + quark: glib::GQuark, + data: gpointer, + destroy: glib::GDestroyNotify, + ); + pub fn gst_mini_object_steal_qdata(object: *mut GstMiniObject, quark: glib::GQuark) + -> gpointer; pub fn gst_mini_object_unlock(object: *mut GstMiniObject, flags: GstLockFlags); pub fn gst_mini_object_unref(mini_object: *mut GstMiniObject); - pub fn gst_mini_object_weak_ref(object: *mut GstMiniObject, notify: GstMiniObjectNotify, data: gpointer); - pub fn gst_mini_object_weak_unref(object: *mut GstMiniObject, notify: GstMiniObjectNotify, data: gpointer); - pub fn gst_mini_object_replace(olddata: *mut *mut GstMiniObject, newdata: *mut GstMiniObject) -> gboolean; + pub fn gst_mini_object_weak_ref( + object: *mut GstMiniObject, + notify: GstMiniObjectNotify, + data: gpointer, + ); + pub fn gst_mini_object_weak_unref( + object: *mut GstMiniObject, + notify: GstMiniObjectNotify, + data: gpointer, + ); + pub fn gst_mini_object_replace( + olddata: *mut *mut GstMiniObject, + newdata: *mut GstMiniObject, + ) -> gboolean; pub fn gst_mini_object_steal(olddata: *mut *mut GstMiniObject) -> *mut GstMiniObject; - pub fn gst_mini_object_take(olddata: *mut *mut GstMiniObject, newdata: *mut GstMiniObject) -> gboolean; + pub fn gst_mini_object_take( + olddata: *mut *mut GstMiniObject, + newdata: *mut GstMiniObject, + ) -> gboolean; //========================================================================= // GstPadProbeInfo @@ -4531,7 +5513,9 @@ extern "C" { pub fn gst_parse_context_new() -> *mut GstParseContext; pub fn gst_parse_context_copy(context: *const GstParseContext) -> *mut GstParseContext; pub fn gst_parse_context_free(context: *mut GstParseContext); - pub fn gst_parse_context_get_missing_elements(context: *mut GstParseContext) -> *mut *mut c_char; + pub fn gst_parse_context_get_missing_elements( + context: *mut GstParseContext, + ) -> *mut *mut c_char; //========================================================================= // GstPoll @@ -4540,9 +5524,18 @@ extern "C" { pub fn gst_poll_fd_can_read(set: *const GstPoll, fd: *mut GstPollFD) -> gboolean; pub fn gst_poll_fd_can_write(set: *const GstPoll, fd: *mut GstPollFD) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_poll_fd_ctl_pri(set: *mut GstPoll, fd: *mut GstPollFD, active: gboolean) -> gboolean; - pub fn gst_poll_fd_ctl_read(set: *mut GstPoll, fd: *mut GstPollFD, active: gboolean) -> gboolean; - pub fn gst_poll_fd_ctl_write(set: *mut GstPoll, fd: *mut GstPollFD, active: gboolean) -> gboolean; + pub fn gst_poll_fd_ctl_pri(set: *mut GstPoll, fd: *mut GstPollFD, active: gboolean) + -> gboolean; + pub fn gst_poll_fd_ctl_read( + set: *mut GstPoll, + fd: *mut GstPollFD, + active: gboolean, + ) -> gboolean; + pub fn gst_poll_fd_ctl_write( + set: *mut GstPoll, + fd: *mut GstPollFD, + active: gboolean, + ) -> gboolean; pub fn gst_poll_fd_has_closed(set: *const GstPoll, fd: *mut GstPollFD) -> gboolean; pub fn gst_poll_fd_has_error(set: *const GstPoll, fd: *mut GstPollFD) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] @@ -4572,7 +5565,11 @@ extern "C" { #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_promise_new() -> *mut GstPromise; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_promise_new_with_change_func(func: GstPromiseChangeFunc, user_data: gpointer, notify: glib::GDestroyNotify) -> *mut GstPromise; + pub fn gst_promise_new_with_change_func( + func: GstPromiseChangeFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstPromise; #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_promise_expire(promise: *mut GstPromise); #[cfg(any(feature = "v1_14", feature = "dox"))] @@ -4601,8 +5598,13 @@ extern "C" { pub fn gst_query_new_caps(filter: *mut GstCaps) -> *mut GstQuery; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_query_new_context(context_type: *const c_char) -> *mut GstQuery; - pub fn gst_query_new_convert(src_format: GstFormat, value: i64, dest_format: GstFormat) -> *mut GstQuery; - pub fn gst_query_new_custom(type_: GstQueryType, structure: *mut GstStructure) -> *mut GstQuery; + pub fn gst_query_new_convert( + src_format: GstFormat, + value: i64, + dest_format: GstFormat, + ) -> *mut GstQuery; + pub fn gst_query_new_custom(type_: GstQueryType, structure: *mut GstStructure) + -> *mut GstQuery; pub fn gst_query_new_drain() -> *mut GstQuery; pub fn gst_query_new_duration(format: GstFormat) -> *mut GstQuery; pub fn gst_query_new_formats() -> *mut GstQuery; @@ -4612,12 +5614,30 @@ extern "C" { pub fn gst_query_new_seeking(format: GstFormat) -> *mut GstQuery; pub fn gst_query_new_segment(format: GstFormat) -> *mut GstQuery; pub fn gst_query_new_uri() -> *mut GstQuery; - pub fn gst_query_add_allocation_meta(query: *mut GstQuery, api: GType, params: *const GstStructure); - pub fn gst_query_add_allocation_param(query: *mut GstQuery, allocator: *mut GstAllocator, params: *const GstAllocationParams); - pub fn gst_query_add_allocation_pool(query: *mut GstQuery, pool: *mut GstBufferPool, size: c_uint, min_buffers: c_uint, max_buffers: c_uint); + pub fn gst_query_add_allocation_meta( + query: *mut GstQuery, + api: GType, + params: *const GstStructure, + ); + pub fn gst_query_add_allocation_param( + query: *mut GstQuery, + allocator: *mut GstAllocator, + params: *const GstAllocationParams, + ); + pub fn gst_query_add_allocation_pool( + query: *mut GstQuery, + pool: *mut GstBufferPool, + size: c_uint, + min_buffers: c_uint, + max_buffers: c_uint, + ); pub fn gst_query_add_buffering_range(query: *mut GstQuery, start: i64, stop: i64) -> gboolean; pub fn gst_query_add_scheduling_mode(query: *mut GstQuery, mode: GstPadMode); - pub fn gst_query_find_allocation_meta(query: *mut GstQuery, api: GType, index: *mut c_uint) -> gboolean; + pub fn gst_query_find_allocation_meta( + query: *mut GstQuery, + api: GType, + index: *mut c_uint, + ) -> gboolean; pub fn gst_query_get_n_allocation_metas(query: *mut GstQuery) -> c_uint; pub fn gst_query_get_n_allocation_params(query: *mut GstQuery) -> c_uint; pub fn gst_query_get_n_allocation_pools(query: *mut GstQuery) -> c_uint; @@ -4625,40 +5645,124 @@ extern "C" { pub fn gst_query_get_n_scheduling_modes(query: *mut GstQuery) -> c_uint; pub fn gst_query_get_structure(query: *mut GstQuery) -> *const GstStructure; pub fn gst_query_has_scheduling_mode(query: *mut GstQuery, mode: GstPadMode) -> gboolean; - pub fn gst_query_has_scheduling_mode_with_flags(query: *mut GstQuery, mode: GstPadMode, flags: GstSchedulingFlags) -> gboolean; + pub fn gst_query_has_scheduling_mode_with_flags( + query: *mut GstQuery, + mode: GstPadMode, + flags: GstSchedulingFlags, + ) -> gboolean; pub fn gst_query_parse_accept_caps(query: *mut GstQuery, caps: *mut *mut GstCaps); pub fn gst_query_parse_accept_caps_result(query: *mut GstQuery, result: *mut gboolean); - pub fn gst_query_parse_allocation(query: *mut GstQuery, caps: *mut *mut GstCaps, need_pool: *mut gboolean); + pub fn gst_query_parse_allocation( + query: *mut GstQuery, + caps: *mut *mut GstCaps, + need_pool: *mut gboolean, + ); #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_query_parse_bitrate(query: *mut GstQuery, nominal_bitrate: *mut c_uint); - pub fn gst_query_parse_buffering_percent(query: *mut GstQuery, busy: *mut gboolean, percent: *mut c_int); - pub fn gst_query_parse_buffering_range(query: *mut GstQuery, format: *mut GstFormat, start: *mut i64, stop: *mut i64, estimated_total: *mut i64); - pub fn gst_query_parse_buffering_stats(query: *mut GstQuery, mode: *mut GstBufferingMode, avg_in: *mut c_int, avg_out: *mut c_int, buffering_left: *mut i64); + pub fn gst_query_parse_buffering_percent( + query: *mut GstQuery, + busy: *mut gboolean, + percent: *mut c_int, + ); + pub fn gst_query_parse_buffering_range( + query: *mut GstQuery, + format: *mut GstFormat, + start: *mut i64, + stop: *mut i64, + estimated_total: *mut i64, + ); + pub fn gst_query_parse_buffering_stats( + query: *mut GstQuery, + mode: *mut GstBufferingMode, + avg_in: *mut c_int, + avg_out: *mut c_int, + buffering_left: *mut i64, + ); pub fn gst_query_parse_caps(query: *mut GstQuery, filter: *mut *mut GstCaps); pub fn gst_query_parse_caps_result(query: *mut GstQuery, caps: *mut *mut GstCaps); #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_query_parse_context(query: *mut GstQuery, context: *mut *mut GstContext); #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_query_parse_context_type(query: *mut GstQuery, context_type: *mut *const c_char) -> gboolean; - pub fn gst_query_parse_convert(query: *mut GstQuery, src_format: *mut GstFormat, src_value: *mut i64, dest_format: *mut GstFormat, dest_value: *mut i64); - pub fn gst_query_parse_duration(query: *mut GstQuery, format: *mut GstFormat, duration: *mut i64); - pub fn gst_query_parse_latency(query: *mut GstQuery, live: *mut gboolean, min_latency: *mut GstClockTime, max_latency: *mut GstClockTime); + pub fn gst_query_parse_context_type( + query: *mut GstQuery, + context_type: *mut *const c_char, + ) -> gboolean; + pub fn gst_query_parse_convert( + query: *mut GstQuery, + src_format: *mut GstFormat, + src_value: *mut i64, + dest_format: *mut GstFormat, + dest_value: *mut i64, + ); + pub fn gst_query_parse_duration( + query: *mut GstQuery, + format: *mut GstFormat, + duration: *mut i64, + ); + pub fn gst_query_parse_latency( + query: *mut GstQuery, + live: *mut gboolean, + min_latency: *mut GstClockTime, + max_latency: *mut GstClockTime, + ); pub fn gst_query_parse_n_formats(query: *mut GstQuery, n_formats: *mut c_uint); - pub fn gst_query_parse_nth_allocation_meta(query: *mut GstQuery, index: c_uint, params: *mut *const GstStructure) -> GType; - pub fn gst_query_parse_nth_allocation_param(query: *mut GstQuery, index: c_uint, allocator: *mut *mut GstAllocator, params: *mut GstAllocationParams); - pub fn gst_query_parse_nth_allocation_pool(query: *mut GstQuery, index: c_uint, pool: *mut *mut GstBufferPool, size: *mut c_uint, min_buffers: *mut c_uint, max_buffers: *mut c_uint); - pub fn gst_query_parse_nth_buffering_range(query: *mut GstQuery, index: c_uint, start: *mut i64, stop: *mut i64) -> gboolean; + pub fn gst_query_parse_nth_allocation_meta( + query: *mut GstQuery, + index: c_uint, + params: *mut *const GstStructure, + ) -> GType; + pub fn gst_query_parse_nth_allocation_param( + query: *mut GstQuery, + index: c_uint, + allocator: *mut *mut GstAllocator, + params: *mut GstAllocationParams, + ); + pub fn gst_query_parse_nth_allocation_pool( + query: *mut GstQuery, + index: c_uint, + pool: *mut *mut GstBufferPool, + size: *mut c_uint, + min_buffers: *mut c_uint, + max_buffers: *mut c_uint, + ); + pub fn gst_query_parse_nth_buffering_range( + query: *mut GstQuery, + index: c_uint, + start: *mut i64, + stop: *mut i64, + ) -> gboolean; pub fn gst_query_parse_nth_format(query: *mut GstQuery, nth: c_uint, format: *mut GstFormat); pub fn gst_query_parse_nth_scheduling_mode(query: *mut GstQuery, index: c_uint) -> GstPadMode; pub fn gst_query_parse_position(query: *mut GstQuery, format: *mut GstFormat, cur: *mut i64); - pub fn gst_query_parse_scheduling(query: *mut GstQuery, flags: *mut GstSchedulingFlags, minsize: *mut c_int, maxsize: *mut c_int, align: *mut c_int); - pub fn gst_query_parse_seeking(query: *mut GstQuery, format: *mut GstFormat, seekable: *mut gboolean, segment_start: *mut i64, segment_end: *mut i64); - pub fn gst_query_parse_segment(query: *mut GstQuery, rate: *mut c_double, format: *mut GstFormat, start_value: *mut i64, stop_value: *mut i64); + pub fn gst_query_parse_scheduling( + query: *mut GstQuery, + flags: *mut GstSchedulingFlags, + minsize: *mut c_int, + maxsize: *mut c_int, + align: *mut c_int, + ); + pub fn gst_query_parse_seeking( + query: *mut GstQuery, + format: *mut GstFormat, + seekable: *mut gboolean, + segment_start: *mut i64, + segment_end: *mut i64, + ); + pub fn gst_query_parse_segment( + query: *mut GstQuery, + rate: *mut c_double, + format: *mut GstFormat, + start_value: *mut i64, + stop_value: *mut i64, + ); pub fn gst_query_parse_uri(query: *mut GstQuery, uri: *mut *mut c_char); #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_query_parse_uri_redirection(query: *mut GstQuery, uri: *mut *mut c_char); #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_query_parse_uri_redirection_permanent(query: *mut GstQuery, permanent: *mut gboolean); + pub fn gst_query_parse_uri_redirection_permanent( + query: *mut GstQuery, + permanent: *mut gboolean, + ); pub fn gst_query_remove_nth_allocation_meta(query: *mut GstQuery, index: c_uint); #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_query_remove_nth_allocation_param(query: *mut GstQuery, index: c_uint); @@ -4668,22 +5772,79 @@ extern "C" { #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_query_set_bitrate(query: *mut GstQuery, nominal_bitrate: c_uint); pub fn gst_query_set_buffering_percent(query: *mut GstQuery, busy: gboolean, percent: c_int); - pub fn gst_query_set_buffering_range(query: *mut GstQuery, format: GstFormat, start: i64, stop: i64, estimated_total: i64); - pub fn gst_query_set_buffering_stats(query: *mut GstQuery, mode: GstBufferingMode, avg_in: c_int, avg_out: c_int, buffering_left: i64); + pub fn gst_query_set_buffering_range( + query: *mut GstQuery, + format: GstFormat, + start: i64, + stop: i64, + estimated_total: i64, + ); + pub fn gst_query_set_buffering_stats( + query: *mut GstQuery, + mode: GstBufferingMode, + avg_in: c_int, + avg_out: c_int, + buffering_left: i64, + ); pub fn gst_query_set_caps_result(query: *mut GstQuery, caps: *mut GstCaps); #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_query_set_context(query: *mut GstQuery, context: *mut GstContext); - pub fn gst_query_set_convert(query: *mut GstQuery, src_format: GstFormat, src_value: i64, dest_format: GstFormat, dest_value: i64); + pub fn gst_query_set_convert( + query: *mut GstQuery, + src_format: GstFormat, + src_value: i64, + dest_format: GstFormat, + dest_value: i64, + ); pub fn gst_query_set_duration(query: *mut GstQuery, format: GstFormat, duration: i64); pub fn gst_query_set_formats(query: *mut GstQuery, n_formats: c_int, ...); - pub fn gst_query_set_formatsv(query: *mut GstQuery, n_formats: c_int, formats: *const GstFormat); - pub fn gst_query_set_latency(query: *mut GstQuery, live: gboolean, min_latency: GstClockTime, max_latency: GstClockTime); - pub fn gst_query_set_nth_allocation_param(query: *mut GstQuery, index: c_uint, allocator: *mut GstAllocator, params: *const GstAllocationParams); - pub fn gst_query_set_nth_allocation_pool(query: *mut GstQuery, index: c_uint, pool: *mut GstBufferPool, size: c_uint, min_buffers: c_uint, max_buffers: c_uint); + pub fn gst_query_set_formatsv( + query: *mut GstQuery, + n_formats: c_int, + formats: *const GstFormat, + ); + pub fn gst_query_set_latency( + query: *mut GstQuery, + live: gboolean, + min_latency: GstClockTime, + max_latency: GstClockTime, + ); + pub fn gst_query_set_nth_allocation_param( + query: *mut GstQuery, + index: c_uint, + allocator: *mut GstAllocator, + params: *const GstAllocationParams, + ); + pub fn gst_query_set_nth_allocation_pool( + query: *mut GstQuery, + index: c_uint, + pool: *mut GstBufferPool, + size: c_uint, + min_buffers: c_uint, + max_buffers: c_uint, + ); pub fn gst_query_set_position(query: *mut GstQuery, format: GstFormat, cur: i64); - pub fn gst_query_set_scheduling(query: *mut GstQuery, flags: GstSchedulingFlags, minsize: c_int, maxsize: c_int, align: c_int); - pub fn gst_query_set_seeking(query: *mut GstQuery, format: GstFormat, seekable: gboolean, segment_start: i64, segment_end: i64); - pub fn gst_query_set_segment(query: *mut GstQuery, rate: c_double, format: GstFormat, start_value: i64, stop_value: i64); + pub fn gst_query_set_scheduling( + query: *mut GstQuery, + flags: GstSchedulingFlags, + minsize: c_int, + maxsize: c_int, + align: c_int, + ); + pub fn gst_query_set_seeking( + query: *mut GstQuery, + format: GstFormat, + seekable: gboolean, + segment_start: i64, + segment_end: i64, + ); + pub fn gst_query_set_segment( + query: *mut GstQuery, + rate: c_double, + format: GstFormat, + start_value: i64, + stop_value: i64, + ); pub fn gst_query_set_uri(query: *mut GstQuery, uri: *const c_char); #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_query_set_uri_redirection(query: *mut GstQuery, uri: *const c_char); @@ -4701,7 +5862,12 @@ extern "C" { // GstSample //========================================================================= pub fn gst_sample_get_type() -> GType; - pub fn gst_sample_new(buffer: *mut GstBuffer, caps: *mut GstCaps, segment: *const GstSegment, info: *mut GstStructure) -> *mut GstSample; + pub fn gst_sample_new( + buffer: *mut GstBuffer, + caps: *mut GstCaps, + segment: *const GstSegment, + info: *mut GstStructure, + ) -> *mut GstSample; pub fn gst_sample_get_buffer(sample: *mut GstSample) -> *mut GstBuffer; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_sample_get_buffer_list(sample: *mut GstSample) -> *mut GstBufferList; @@ -4724,33 +5890,98 @@ extern "C" { //========================================================================= pub fn gst_segment_get_type() -> GType; pub fn gst_segment_new() -> *mut GstSegment; - pub fn gst_segment_clip(segment: *const GstSegment, format: GstFormat, start: u64, stop: u64, clip_start: *mut u64, clip_stop: *mut u64) -> gboolean; + pub fn gst_segment_clip( + segment: *const GstSegment, + format: GstFormat, + start: u64, + stop: u64, + clip_start: *mut u64, + clip_stop: *mut u64, + ) -> gboolean; pub fn gst_segment_copy(segment: *const GstSegment) -> *mut GstSegment; pub fn gst_segment_copy_into(src: *const GstSegment, dest: *mut GstSegment); - pub fn gst_segment_do_seek(segment: *mut GstSegment, rate: c_double, format: GstFormat, flags: GstSeekFlags, start_type: GstSeekType, start: u64, stop_type: GstSeekType, stop: u64, update: *mut gboolean) -> gboolean; + pub fn gst_segment_do_seek( + segment: *mut GstSegment, + rate: c_double, + format: GstFormat, + flags: GstSeekFlags, + start_type: GstSeekType, + start: u64, + stop_type: GstSeekType, + stop: u64, + update: *mut gboolean, + ) -> gboolean; pub fn gst_segment_free(segment: *mut GstSegment); pub fn gst_segment_init(segment: *mut GstSegment, format: GstFormat); #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_segment_is_equal(s0: *const GstSegment, s1: *const GstSegment) -> gboolean; #[cfg(any(feature = "v1_2_3", feature = "dox"))] - pub fn gst_segment_offset_running_time(segment: *mut GstSegment, format: GstFormat, offset: i64) -> gboolean; + pub fn gst_segment_offset_running_time( + segment: *mut GstSegment, + format: GstFormat, + offset: i64, + ) -> gboolean; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_segment_position_from_running_time(segment: *const GstSegment, format: GstFormat, running_time: u64) -> u64; + pub fn gst_segment_position_from_running_time( + segment: *const GstSegment, + format: GstFormat, + running_time: u64, + ) -> u64; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_segment_position_from_running_time_full(segment: *const GstSegment, format: GstFormat, running_time: u64, position: *mut u64) -> c_int; + pub fn gst_segment_position_from_running_time_full( + segment: *const GstSegment, + format: GstFormat, + running_time: u64, + position: *mut u64, + ) -> c_int; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_segment_position_from_stream_time(segment: *const GstSegment, format: GstFormat, stream_time: u64) -> u64; + pub fn gst_segment_position_from_stream_time( + segment: *const GstSegment, + format: GstFormat, + stream_time: u64, + ) -> u64; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_segment_position_from_stream_time_full(segment: *const GstSegment, format: GstFormat, stream_time: u64, position: *mut u64) -> c_int; - pub fn gst_segment_set_running_time(segment: *mut GstSegment, format: GstFormat, running_time: u64) -> gboolean; - pub fn gst_segment_to_position(segment: *const GstSegment, format: GstFormat, running_time: u64) -> u64; - pub fn gst_segment_to_running_time(segment: *const GstSegment, format: GstFormat, position: u64) -> u64; + pub fn gst_segment_position_from_stream_time_full( + segment: *const GstSegment, + format: GstFormat, + stream_time: u64, + position: *mut u64, + ) -> c_int; + pub fn gst_segment_set_running_time( + segment: *mut GstSegment, + format: GstFormat, + running_time: u64, + ) -> gboolean; + pub fn gst_segment_to_position( + segment: *const GstSegment, + format: GstFormat, + running_time: u64, + ) -> u64; + pub fn gst_segment_to_running_time( + segment: *const GstSegment, + format: GstFormat, + position: u64, + ) -> u64; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_segment_to_running_time_full(segment: *const GstSegment, format: GstFormat, position: u64, running_time: *mut u64) -> c_int; + pub fn gst_segment_to_running_time_full( + segment: *const GstSegment, + format: GstFormat, + position: u64, + running_time: *mut u64, + ) -> c_int; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_segment_to_stream_time(segment: *const GstSegment, format: GstFormat, position: u64) -> u64; + pub fn gst_segment_to_stream_time( + segment: *const GstSegment, + format: GstFormat, + position: u64, + ) -> u64; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_segment_to_stream_time_full(segment: *const GstSegment, format: GstFormat, position: u64, stream_time: *mut u64) -> c_int; + pub fn gst_segment_to_stream_time_full( + segment: *const GstSegment, + format: GstFormat, + position: u64, + stream_time: *mut u64, + ) -> c_int; //========================================================================= // GstStaticCaps @@ -4761,92 +5992,276 @@ extern "C" { //========================================================================= // GstStaticPadTemplate //========================================================================= - pub fn gst_static_pad_template_get(pad_template: *mut GstStaticPadTemplate) -> *mut GstPadTemplate; + pub fn gst_static_pad_template_get( + pad_template: *mut GstStaticPadTemplate, + ) -> *mut GstPadTemplate; pub fn gst_static_pad_template_get_caps(templ: *mut GstStaticPadTemplate) -> *mut GstCaps; //========================================================================= // GstStructure //========================================================================= pub fn gst_structure_get_type() -> GType; - pub fn gst_structure_new(name: *const c_char, firstfield: *const c_char, ...) -> *mut GstStructure; + pub fn gst_structure_new( + name: *const c_char, + firstfield: *const c_char, + ... + ) -> *mut GstStructure; pub fn gst_structure_new_empty(name: *const c_char) -> *mut GstStructure; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_structure_new_from_string(string: *const c_char) -> *mut GstStructure; - pub fn gst_structure_new_id(name_quark: glib::GQuark, field_quark: glib::GQuark, ...) -> *mut GstStructure; + pub fn gst_structure_new_id( + name_quark: glib::GQuark, + field_quark: glib::GQuark, + ... + ) -> *mut GstStructure; pub fn gst_structure_new_id_empty(quark: glib::GQuark) -> *mut GstStructure; //pub fn gst_structure_new_valist(name: *const c_char, firstfield: *const c_char, varargs: /*Unimplemented*/va_list) -> *mut GstStructure; - pub fn gst_structure_can_intersect(struct1: *const GstStructure, struct2: *const GstStructure) -> gboolean; + pub fn gst_structure_can_intersect( + struct1: *const GstStructure, + struct2: *const GstStructure, + ) -> gboolean; pub fn gst_structure_copy(structure: *const GstStructure) -> *mut GstStructure; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_structure_filter_and_map_in_place(structure: *mut GstStructure, func: GstStructureFilterMapFunc, user_data: gpointer); + pub fn gst_structure_filter_and_map_in_place( + structure: *mut GstStructure, + func: GstStructureFilterMapFunc, + user_data: gpointer, + ); pub fn gst_structure_fixate(structure: *mut GstStructure); - pub fn gst_structure_fixate_field(structure: *mut GstStructure, field_name: *const c_char) -> gboolean; - pub fn gst_structure_fixate_field_boolean(structure: *mut GstStructure, field_name: *const c_char, target: gboolean) -> gboolean; - pub fn gst_structure_fixate_field_nearest_double(structure: *mut GstStructure, field_name: *const c_char, target: c_double) -> gboolean; - pub fn gst_structure_fixate_field_nearest_fraction(structure: *mut GstStructure, field_name: *const c_char, target_numerator: c_int, target_denominator: c_int) -> gboolean; - pub fn gst_structure_fixate_field_nearest_int(structure: *mut GstStructure, field_name: *const c_char, target: c_int) -> gboolean; - pub fn gst_structure_fixate_field_string(structure: *mut GstStructure, field_name: *const c_char, target: *const c_char) -> gboolean; - pub fn gst_structure_foreach(structure: *const GstStructure, func: GstStructureForeachFunc, user_data: gpointer) -> gboolean; + pub fn gst_structure_fixate_field( + structure: *mut GstStructure, + field_name: *const c_char, + ) -> gboolean; + pub fn gst_structure_fixate_field_boolean( + structure: *mut GstStructure, + field_name: *const c_char, + target: gboolean, + ) -> gboolean; + pub fn gst_structure_fixate_field_nearest_double( + structure: *mut GstStructure, + field_name: *const c_char, + target: c_double, + ) -> gboolean; + pub fn gst_structure_fixate_field_nearest_fraction( + structure: *mut GstStructure, + field_name: *const c_char, + target_numerator: c_int, + target_denominator: c_int, + ) -> gboolean; + pub fn gst_structure_fixate_field_nearest_int( + structure: *mut GstStructure, + field_name: *const c_char, + target: c_int, + ) -> gboolean; + pub fn gst_structure_fixate_field_string( + structure: *mut GstStructure, + field_name: *const c_char, + target: *const c_char, + ) -> gboolean; + pub fn gst_structure_foreach( + structure: *const GstStructure, + func: GstStructureForeachFunc, + user_data: gpointer, + ) -> gboolean; pub fn gst_structure_free(structure: *mut GstStructure); - pub fn gst_structure_get(structure: *const GstStructure, first_fieldname: *const c_char, ...) -> gboolean; - pub fn gst_structure_get_array(structure: *mut GstStructure, fieldname: *const c_char, array: *mut *mut gobject::GValueArray) -> gboolean; - pub fn gst_structure_get_boolean(structure: *const GstStructure, fieldname: *const c_char, value: *mut gboolean) -> gboolean; - pub fn gst_structure_get_clock_time(structure: *const GstStructure, fieldname: *const c_char, value: *mut GstClockTime) -> gboolean; - pub fn gst_structure_get_date(structure: *const GstStructure, fieldname: *const c_char, value: *mut *mut glib::GDate) -> gboolean; - pub fn gst_structure_get_date_time(structure: *const GstStructure, fieldname: *const c_char, value: *mut *mut GstDateTime) -> gboolean; - pub fn gst_structure_get_double(structure: *const GstStructure, fieldname: *const c_char, value: *mut c_double) -> gboolean; - pub fn gst_structure_get_enum(structure: *const GstStructure, fieldname: *const c_char, enumtype: GType, value: *mut c_int) -> gboolean; - pub fn gst_structure_get_field_type(structure: *const GstStructure, fieldname: *const c_char) -> GType; + pub fn gst_structure_get( + structure: *const GstStructure, + first_fieldname: *const c_char, + ... + ) -> gboolean; + pub fn gst_structure_get_array( + structure: *mut GstStructure, + fieldname: *const c_char, + array: *mut *mut gobject::GValueArray, + ) -> gboolean; + pub fn gst_structure_get_boolean( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut gboolean, + ) -> gboolean; + pub fn gst_structure_get_clock_time( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut GstClockTime, + ) -> gboolean; + pub fn gst_structure_get_date( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut *mut glib::GDate, + ) -> gboolean; + pub fn gst_structure_get_date_time( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut *mut GstDateTime, + ) -> gboolean; + pub fn gst_structure_get_double( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut c_double, + ) -> gboolean; + pub fn gst_structure_get_enum( + structure: *const GstStructure, + fieldname: *const c_char, + enumtype: GType, + value: *mut c_int, + ) -> gboolean; + pub fn gst_structure_get_field_type( + structure: *const GstStructure, + fieldname: *const c_char, + ) -> GType; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_structure_get_flagset(structure: *const GstStructure, fieldname: *const c_char, value_flags: *mut c_uint, value_mask: *mut c_uint) -> gboolean; - pub fn gst_structure_get_fraction(structure: *const GstStructure, fieldname: *const c_char, value_numerator: *mut c_int, value_denominator: *mut c_int) -> gboolean; - pub fn gst_structure_get_int(structure: *const GstStructure, fieldname: *const c_char, value: *mut c_int) -> gboolean; + pub fn gst_structure_get_flagset( + structure: *const GstStructure, + fieldname: *const c_char, + value_flags: *mut c_uint, + value_mask: *mut c_uint, + ) -> gboolean; + pub fn gst_structure_get_fraction( + structure: *const GstStructure, + fieldname: *const c_char, + value_numerator: *mut c_int, + value_denominator: *mut c_int, + ) -> gboolean; + pub fn gst_structure_get_int( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut c_int, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_structure_get_int64(structure: *const GstStructure, fieldname: *const c_char, value: *mut i64) -> gboolean; + pub fn gst_structure_get_int64( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut i64, + ) -> gboolean; #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_structure_get_list(structure: *mut GstStructure, fieldname: *const c_char, array: *mut *mut gobject::GValueArray) -> gboolean; + pub fn gst_structure_get_list( + structure: *mut GstStructure, + fieldname: *const c_char, + array: *mut *mut gobject::GValueArray, + ) -> gboolean; pub fn gst_structure_get_name(structure: *const GstStructure) -> *const c_char; pub fn gst_structure_get_name_id(structure: *const GstStructure) -> glib::GQuark; - pub fn gst_structure_get_string(structure: *const GstStructure, fieldname: *const c_char) -> *const c_char; - pub fn gst_structure_get_uint(structure: *const GstStructure, fieldname: *const c_char, value: *mut c_uint) -> gboolean; + pub fn gst_structure_get_string( + structure: *const GstStructure, + fieldname: *const c_char, + ) -> *const c_char; + pub fn gst_structure_get_uint( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_structure_get_uint64(structure: *const GstStructure, fieldname: *const c_char, value: *mut u64) -> gboolean; + pub fn gst_structure_get_uint64( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut u64, + ) -> gboolean; //pub fn gst_structure_get_valist(structure: *const GstStructure, first_fieldname: *const c_char, args: /*Unimplemented*/va_list) -> gboolean; - pub fn gst_structure_get_value(structure: *const GstStructure, fieldname: *const c_char) -> *const gobject::GValue; - pub fn gst_structure_has_field(structure: *const GstStructure, fieldname: *const c_char) -> gboolean; - pub fn gst_structure_has_field_typed(structure: *const GstStructure, fieldname: *const c_char, type_: GType) -> gboolean; + pub fn gst_structure_get_value( + structure: *const GstStructure, + fieldname: *const c_char, + ) -> *const gobject::GValue; + pub fn gst_structure_has_field( + structure: *const GstStructure, + fieldname: *const c_char, + ) -> gboolean; + pub fn gst_structure_has_field_typed( + structure: *const GstStructure, + fieldname: *const c_char, + type_: GType, + ) -> gboolean; pub fn gst_structure_has_name(structure: *const GstStructure, name: *const c_char) -> gboolean; - pub fn gst_structure_id_get(structure: *const GstStructure, first_field_id: glib::GQuark, ...) -> gboolean; + pub fn gst_structure_id_get( + structure: *const GstStructure, + first_field_id: glib::GQuark, + ... + ) -> gboolean; //pub fn gst_structure_id_get_valist(structure: *const GstStructure, first_field_id: glib::GQuark, args: /*Unimplemented*/va_list) -> gboolean; - pub fn gst_structure_id_get_value(structure: *const GstStructure, field: glib::GQuark) -> *const gobject::GValue; - pub fn gst_structure_id_has_field(structure: *const GstStructure, field: glib::GQuark) -> gboolean; - pub fn gst_structure_id_has_field_typed(structure: *const GstStructure, field: glib::GQuark, type_: GType) -> gboolean; + pub fn gst_structure_id_get_value( + structure: *const GstStructure, + field: glib::GQuark, + ) -> *const gobject::GValue; + pub fn gst_structure_id_has_field( + structure: *const GstStructure, + field: glib::GQuark, + ) -> gboolean; + pub fn gst_structure_id_has_field_typed( + structure: *const GstStructure, + field: glib::GQuark, + type_: GType, + ) -> gboolean; pub fn gst_structure_id_set(structure: *mut GstStructure, fieldname: glib::GQuark, ...); //pub fn gst_structure_id_set_valist(structure: *mut GstStructure, fieldname: glib::GQuark, varargs: /*Unimplemented*/va_list); - pub fn gst_structure_id_set_value(structure: *mut GstStructure, field: glib::GQuark, value: *const gobject::GValue); - pub fn gst_structure_id_take_value(structure: *mut GstStructure, field: glib::GQuark, value: *mut gobject::GValue); - pub fn gst_structure_intersect(struct1: *const GstStructure, struct2: *const GstStructure) -> *mut GstStructure; - pub fn gst_structure_is_equal(structure1: *const GstStructure, structure2: *const GstStructure) -> gboolean; - pub fn gst_structure_is_subset(subset: *const GstStructure, superset: *const GstStructure) -> gboolean; - pub fn gst_structure_map_in_place(structure: *mut GstStructure, func: GstStructureMapFunc, user_data: gpointer) -> gboolean; + pub fn gst_structure_id_set_value( + structure: *mut GstStructure, + field: glib::GQuark, + value: *const gobject::GValue, + ); + pub fn gst_structure_id_take_value( + structure: *mut GstStructure, + field: glib::GQuark, + value: *mut gobject::GValue, + ); + pub fn gst_structure_intersect( + struct1: *const GstStructure, + struct2: *const GstStructure, + ) -> *mut GstStructure; + pub fn gst_structure_is_equal( + structure1: *const GstStructure, + structure2: *const GstStructure, + ) -> gboolean; + pub fn gst_structure_is_subset( + subset: *const GstStructure, + superset: *const GstStructure, + ) -> gboolean; + pub fn gst_structure_map_in_place( + structure: *mut GstStructure, + func: GstStructureMapFunc, + user_data: gpointer, + ) -> gboolean; pub fn gst_structure_n_fields(structure: *const GstStructure) -> c_int; - pub fn gst_structure_nth_field_name(structure: *const GstStructure, index: c_uint) -> *const c_char; + pub fn gst_structure_nth_field_name( + structure: *const GstStructure, + index: c_uint, + ) -> *const c_char; pub fn gst_structure_remove_all_fields(structure: *mut GstStructure); pub fn gst_structure_remove_field(structure: *mut GstStructure, fieldname: *const c_char); pub fn gst_structure_remove_fields(structure: *mut GstStructure, fieldname: *const c_char, ...); //pub fn gst_structure_remove_fields_valist(structure: *mut GstStructure, fieldname: *const c_char, varargs: /*Unimplemented*/va_list); pub fn gst_structure_set(structure: *mut GstStructure, fieldname: *const c_char, ...); #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_structure_set_array(structure: *mut GstStructure, fieldname: *const c_char, array: *const gobject::GValueArray); + pub fn gst_structure_set_array( + structure: *mut GstStructure, + fieldname: *const c_char, + array: *const gobject::GValueArray, + ); #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_structure_set_list(structure: *mut GstStructure, fieldname: *const c_char, array: *const gobject::GValueArray); + pub fn gst_structure_set_list( + structure: *mut GstStructure, + fieldname: *const c_char, + array: *const gobject::GValueArray, + ); pub fn gst_structure_set_name(structure: *mut GstStructure, name: *const c_char); - pub fn gst_structure_set_parent_refcount(structure: *mut GstStructure, refcount: *mut c_int) -> gboolean; + pub fn gst_structure_set_parent_refcount( + structure: *mut GstStructure, + refcount: *mut c_int, + ) -> gboolean; //pub fn gst_structure_set_valist(structure: *mut GstStructure, fieldname: *const c_char, varargs: /*Unimplemented*/va_list); - pub fn gst_structure_set_value(structure: *mut GstStructure, fieldname: *const c_char, value: *const gobject::GValue); - pub fn gst_structure_take_value(structure: *mut GstStructure, fieldname: *const c_char, value: *mut gobject::GValue); + pub fn gst_structure_set_value( + structure: *mut GstStructure, + fieldname: *const c_char, + value: *const gobject::GValue, + ); + pub fn gst_structure_take_value( + structure: *mut GstStructure, + fieldname: *const c_char, + value: *mut gobject::GValue, + ); pub fn gst_structure_to_string(structure: *const GstStructure) -> *mut c_char; - pub fn gst_structure_from_string(string: *const c_char, end: *mut *mut c_char) -> *mut GstStructure; + pub fn gst_structure_from_string( + string: *const c_char, + end: *mut *mut c_char, + ) -> *mut GstStructure; //========================================================================= // GstTagList @@ -4859,47 +6274,190 @@ extern "C" { pub fn gst_tag_list_add(list: *mut GstTagList, mode: GstTagMergeMode, tag: *const c_char, ...); //pub fn gst_tag_list_add_valist(list: *mut GstTagList, mode: GstTagMergeMode, tag: *const c_char, var_args: /*Unimplemented*/va_list); //pub fn gst_tag_list_add_valist_values(list: *mut GstTagList, mode: GstTagMergeMode, tag: *const c_char, var_args: /*Unimplemented*/va_list); - pub fn gst_tag_list_add_value(list: *mut GstTagList, mode: GstTagMergeMode, tag: *const c_char, value: *const gobject::GValue); - pub fn gst_tag_list_add_values(list: *mut GstTagList, mode: GstTagMergeMode, tag: *const c_char, ...); - pub fn gst_tag_list_foreach(list: *const GstTagList, func: GstTagForeachFunc, user_data: gpointer); - pub fn gst_tag_list_get_boolean(list: *const GstTagList, tag: *const c_char, value: *mut gboolean) -> gboolean; - pub fn gst_tag_list_get_boolean_index(list: *const GstTagList, tag: *const c_char, index: c_uint, value: *mut gboolean) -> gboolean; - pub fn gst_tag_list_get_date(list: *const GstTagList, tag: *const c_char, value: *mut *mut glib::GDate) -> gboolean; - pub fn gst_tag_list_get_date_index(list: *const GstTagList, tag: *const c_char, index: c_uint, value: *mut *mut glib::GDate) -> gboolean; - pub fn gst_tag_list_get_date_time(list: *const GstTagList, tag: *const c_char, value: *mut *mut GstDateTime) -> gboolean; - pub fn gst_tag_list_get_date_time_index(list: *const GstTagList, tag: *const c_char, index: c_uint, value: *mut *mut GstDateTime) -> gboolean; - pub fn gst_tag_list_get_double(list: *const GstTagList, tag: *const c_char, value: *mut c_double) -> gboolean; - pub fn gst_tag_list_get_double_index(list: *const GstTagList, tag: *const c_char, index: c_uint, value: *mut c_double) -> gboolean; - pub fn gst_tag_list_get_float(list: *const GstTagList, tag: *const c_char, value: *mut c_float) -> gboolean; - pub fn gst_tag_list_get_float_index(list: *const GstTagList, tag: *const c_char, index: c_uint, value: *mut c_float) -> gboolean; - pub fn gst_tag_list_get_int(list: *const GstTagList, tag: *const c_char, value: *mut c_int) -> gboolean; - pub fn gst_tag_list_get_int64(list: *const GstTagList, tag: *const c_char, value: *mut i64) -> gboolean; - pub fn gst_tag_list_get_int64_index(list: *const GstTagList, tag: *const c_char, index: c_uint, value: *mut i64) -> gboolean; - pub fn gst_tag_list_get_int_index(list: *const GstTagList, tag: *const c_char, index: c_uint, value: *mut c_int) -> gboolean; - pub fn gst_tag_list_get_pointer(list: *const GstTagList, tag: *const c_char, value: *mut gpointer) -> gboolean; - pub fn gst_tag_list_get_pointer_index(list: *const GstTagList, tag: *const c_char, index: c_uint, value: *mut gpointer) -> gboolean; - pub fn gst_tag_list_get_sample(list: *const GstTagList, tag: *const c_char, sample: *mut *mut GstSample) -> gboolean; - pub fn gst_tag_list_get_sample_index(list: *const GstTagList, tag: *const c_char, index: c_uint, sample: *mut *mut GstSample) -> gboolean; + pub fn gst_tag_list_add_value( + list: *mut GstTagList, + mode: GstTagMergeMode, + tag: *const c_char, + value: *const gobject::GValue, + ); + pub fn gst_tag_list_add_values( + list: *mut GstTagList, + mode: GstTagMergeMode, + tag: *const c_char, + ... + ); + pub fn gst_tag_list_foreach( + list: *const GstTagList, + func: GstTagForeachFunc, + user_data: gpointer, + ); + pub fn gst_tag_list_get_boolean( + list: *const GstTagList, + tag: *const c_char, + value: *mut gboolean, + ) -> gboolean; + pub fn gst_tag_list_get_boolean_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut gboolean, + ) -> gboolean; + pub fn gst_tag_list_get_date( + list: *const GstTagList, + tag: *const c_char, + value: *mut *mut glib::GDate, + ) -> gboolean; + pub fn gst_tag_list_get_date_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut *mut glib::GDate, + ) -> gboolean; + pub fn gst_tag_list_get_date_time( + list: *const GstTagList, + tag: *const c_char, + value: *mut *mut GstDateTime, + ) -> gboolean; + pub fn gst_tag_list_get_date_time_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut *mut GstDateTime, + ) -> gboolean; + pub fn gst_tag_list_get_double( + list: *const GstTagList, + tag: *const c_char, + value: *mut c_double, + ) -> gboolean; + pub fn gst_tag_list_get_double_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut c_double, + ) -> gboolean; + pub fn gst_tag_list_get_float( + list: *const GstTagList, + tag: *const c_char, + value: *mut c_float, + ) -> gboolean; + pub fn gst_tag_list_get_float_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut c_float, + ) -> gboolean; + pub fn gst_tag_list_get_int( + list: *const GstTagList, + tag: *const c_char, + value: *mut c_int, + ) -> gboolean; + pub fn gst_tag_list_get_int64( + list: *const GstTagList, + tag: *const c_char, + value: *mut i64, + ) -> gboolean; + pub fn gst_tag_list_get_int64_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut i64, + ) -> gboolean; + pub fn gst_tag_list_get_int_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut c_int, + ) -> gboolean; + pub fn gst_tag_list_get_pointer( + list: *const GstTagList, + tag: *const c_char, + value: *mut gpointer, + ) -> gboolean; + pub fn gst_tag_list_get_pointer_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut gpointer, + ) -> gboolean; + pub fn gst_tag_list_get_sample( + list: *const GstTagList, + tag: *const c_char, + sample: *mut *mut GstSample, + ) -> gboolean; + pub fn gst_tag_list_get_sample_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + sample: *mut *mut GstSample, + ) -> gboolean; pub fn gst_tag_list_get_scope(list: *const GstTagList) -> GstTagScope; - pub fn gst_tag_list_get_string(list: *const GstTagList, tag: *const c_char, value: *mut *mut c_char) -> gboolean; - pub fn gst_tag_list_get_string_index(list: *const GstTagList, tag: *const c_char, index: c_uint, value: *mut *mut c_char) -> gboolean; + pub fn gst_tag_list_get_string( + list: *const GstTagList, + tag: *const c_char, + value: *mut *mut c_char, + ) -> gboolean; + pub fn gst_tag_list_get_string_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut *mut c_char, + ) -> gboolean; pub fn gst_tag_list_get_tag_size(list: *const GstTagList, tag: *const c_char) -> c_uint; - pub fn gst_tag_list_get_uint(list: *const GstTagList, tag: *const c_char, value: *mut c_uint) -> gboolean; - pub fn gst_tag_list_get_uint64(list: *const GstTagList, tag: *const c_char, value: *mut u64) -> gboolean; - pub fn gst_tag_list_get_uint64_index(list: *const GstTagList, tag: *const c_char, index: c_uint, value: *mut u64) -> gboolean; - pub fn gst_tag_list_get_uint_index(list: *const GstTagList, tag: *const c_char, index: c_uint, value: *mut c_uint) -> gboolean; - pub fn gst_tag_list_get_value_index(list: *const GstTagList, tag: *const c_char, index: c_uint) -> *const gobject::GValue; - pub fn gst_tag_list_insert(into: *mut GstTagList, from: *const GstTagList, mode: GstTagMergeMode); + pub fn gst_tag_list_get_uint( + list: *const GstTagList, + tag: *const c_char, + value: *mut c_uint, + ) -> gboolean; + pub fn gst_tag_list_get_uint64( + list: *const GstTagList, + tag: *const c_char, + value: *mut u64, + ) -> gboolean; + pub fn gst_tag_list_get_uint64_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut u64, + ) -> gboolean; + pub fn gst_tag_list_get_uint_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut c_uint, + ) -> gboolean; + pub fn gst_tag_list_get_value_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + ) -> *const gobject::GValue; + pub fn gst_tag_list_insert( + into: *mut GstTagList, + from: *const GstTagList, + mode: GstTagMergeMode, + ); pub fn gst_tag_list_is_empty(list: *const GstTagList) -> gboolean; pub fn gst_tag_list_is_equal(list1: *const GstTagList, list2: *const GstTagList) -> gboolean; - pub fn gst_tag_list_merge(list1: *const GstTagList, list2: *const GstTagList, mode: GstTagMergeMode) -> *mut GstTagList; + pub fn gst_tag_list_merge( + list1: *const GstTagList, + list2: *const GstTagList, + mode: GstTagMergeMode, + ) -> *mut GstTagList; pub fn gst_tag_list_n_tags(list: *const GstTagList) -> c_int; pub fn gst_tag_list_nth_tag_name(list: *const GstTagList, index: c_uint) -> *const c_char; - pub fn gst_tag_list_peek_string_index(list: *const GstTagList, tag: *const c_char, index: c_uint, value: *mut *const c_char) -> gboolean; + pub fn gst_tag_list_peek_string_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut *const c_char, + ) -> gboolean; pub fn gst_tag_list_remove_tag(list: *mut GstTagList, tag: *const c_char); pub fn gst_tag_list_set_scope(list: *mut GstTagList, scope: GstTagScope); pub fn gst_tag_list_to_string(list: *const GstTagList) -> *mut c_char; - pub fn gst_tag_list_copy_value(dest: *mut gobject::GValue, list: *const GstTagList, tag: *const c_char) -> gboolean; + pub fn gst_tag_list_copy_value( + dest: *mut gobject::GValue, + list: *const GstTagList, + tag: *const c_char, + ) -> gboolean; //========================================================================= // GstToc @@ -4923,18 +6481,34 @@ extern "C" { pub fn gst_toc_entry_append_sub_entry(entry: *mut GstTocEntry, subentry: *mut GstTocEntry); pub fn gst_toc_entry_get_entry_type(entry: *const GstTocEntry) -> GstTocEntryType; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_toc_entry_get_loop(entry: *const GstTocEntry, loop_type: *mut GstTocLoopType, repeat_count: *mut c_int) -> gboolean; + pub fn gst_toc_entry_get_loop( + entry: *const GstTocEntry, + loop_type: *mut GstTocLoopType, + repeat_count: *mut c_int, + ) -> gboolean; pub fn gst_toc_entry_get_parent(entry: *mut GstTocEntry) -> *mut GstTocEntry; - pub fn gst_toc_entry_get_start_stop_times(entry: *const GstTocEntry, start: *mut i64, stop: *mut i64) -> gboolean; + pub fn gst_toc_entry_get_start_stop_times( + entry: *const GstTocEntry, + start: *mut i64, + stop: *mut i64, + ) -> gboolean; pub fn gst_toc_entry_get_sub_entries(entry: *const GstTocEntry) -> *mut glib::GList; pub fn gst_toc_entry_get_tags(entry: *const GstTocEntry) -> *mut GstTagList; pub fn gst_toc_entry_get_toc(entry: *mut GstTocEntry) -> *mut GstToc; pub fn gst_toc_entry_get_uid(entry: *const GstTocEntry) -> *const c_char; pub fn gst_toc_entry_is_alternative(entry: *const GstTocEntry) -> gboolean; pub fn gst_toc_entry_is_sequence(entry: *const GstTocEntry) -> gboolean; - pub fn gst_toc_entry_merge_tags(entry: *mut GstTocEntry, tags: *mut GstTagList, mode: GstTagMergeMode); + pub fn gst_toc_entry_merge_tags( + entry: *mut GstTocEntry, + tags: *mut GstTagList, + mode: GstTagMergeMode, + ); #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_toc_entry_set_loop(entry: *mut GstTocEntry, loop_type: GstTocLoopType, repeat_count: c_int); + pub fn gst_toc_entry_set_loop( + entry: *mut GstTocEntry, + loop_type: GstTocLoopType, + repeat_count: c_int, + ); pub fn gst_toc_entry_set_start_stop_times(entry: *mut GstTocEntry, start: i64, stop: i64); pub fn gst_toc_entry_set_tags(entry: *mut GstTocEntry, tags: *mut GstTagList); @@ -4944,15 +6518,38 @@ extern "C" { pub fn gst_type_find_get_length(find: *mut GstTypeFind) -> u64; pub fn gst_type_find_peek(find: *mut GstTypeFind, offset: i64, size: c_uint) -> *const u8; pub fn gst_type_find_suggest(find: *mut GstTypeFind, probability: c_uint, caps: *mut GstCaps); - pub fn gst_type_find_suggest_simple(find: *mut GstTypeFind, probability: c_uint, media_type: *const c_char, fieldname: *const c_char, ...); - pub fn gst_type_find_register(plugin: *mut GstPlugin, name: *const c_char, rank: c_uint, func: GstTypeFindFunction, extensions: *const c_char, possible_caps: *mut GstCaps, data: gpointer, data_notify: glib::GDestroyNotify) -> gboolean; + pub fn gst_type_find_suggest_simple( + find: *mut GstTypeFind, + probability: c_uint, + media_type: *const c_char, + fieldname: *const c_char, + ... + ); + pub fn gst_type_find_register( + plugin: *mut GstPlugin, + name: *const c_char, + rank: c_uint, + func: GstTypeFindFunction, + extensions: *const c_char, + possible_caps: *mut GstCaps, + data: gpointer, + data_notify: glib::GDestroyNotify, + ) -> gboolean; //========================================================================= // GstUri //========================================================================= pub fn gst_uri_get_type() -> GType; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_uri_new(scheme: *const c_char, userinfo: *const c_char, host: *const c_char, port: c_uint, path: *const c_char, query: *const c_char, fragment: *const c_char) -> *mut GstUri; + pub fn gst_uri_new( + scheme: *const c_char, + userinfo: *const c_char, + host: *const c_char, + port: c_uint, + path: *const c_char, + query: *const c_char, + fragment: *const c_char, + ) -> *mut GstUri; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_uri_append_path(uri: *mut GstUri, relative_path: *const c_char) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] @@ -4995,7 +6592,16 @@ extern "C" { #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_uri_make_writable(uri: *mut GstUri) -> *mut GstUri; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_uri_new_with_base(base: *mut GstUri, scheme: *const c_char, userinfo: *const c_char, host: *const c_char, port: c_uint, path: *const c_char, query: *const c_char, fragment: *const c_char) -> *mut GstUri; + pub fn gst_uri_new_with_base( + base: *mut GstUri, + scheme: *const c_char, + userinfo: *const c_char, + host: *const c_char, + port: c_uint, + path: *const c_char, + query: *const c_char, + fragment: *const c_char, + ) -> *mut GstUri; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_uri_normalize(uri: *mut GstUri) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] @@ -5009,7 +6615,8 @@ extern "C" { #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_uri_set_path(uri: *mut GstUri, path: *const c_char) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_uri_set_path_segments(uri: *mut GstUri, path_segments: *mut glib::GList) -> gboolean; + pub fn gst_uri_set_path_segments(uri: *mut GstUri, path_segments: *mut glib::GList) + -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_uri_set_path_string(uri: *mut GstUri, path: *const c_char) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] @@ -5017,9 +6624,16 @@ extern "C" { #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_uri_set_query_string(uri: *mut GstUri, query: *const c_char) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_uri_set_query_table(uri: *mut GstUri, query_table: *mut glib::GHashTable) -> gboolean; + pub fn gst_uri_set_query_table( + uri: *mut GstUri, + query_table: *mut glib::GHashTable, + ) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_uri_set_query_value(uri: *mut GstUri, query_key: *const c_char, query_value: *const c_char) -> gboolean; + pub fn gst_uri_set_query_value( + uri: *mut GstUri, + query_key: *const c_char, + query_value: *const c_char, + ) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_uri_set_scheme(uri: *mut GstUri, scheme: *const c_char) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] @@ -5044,7 +6658,11 @@ extern "C" { pub fn gst_allocator_get_type() -> GType; pub fn gst_allocator_find(name: *const c_char) -> *mut GstAllocator; pub fn gst_allocator_register(name: *const c_char, allocator: *mut GstAllocator); - pub fn gst_allocator_alloc(allocator: *mut GstAllocator, size: size_t, params: *mut GstAllocationParams) -> *mut GstMemory; + pub fn gst_allocator_alloc( + allocator: *mut GstAllocator, + size: size_t, + params: *mut GstAllocationParams, + ) -> *mut GstMemory; pub fn gst_allocator_free(allocator: *mut GstAllocator, memory: *mut GstMemory); pub fn gst_allocator_set_default(allocator: *mut GstAllocator); @@ -5058,7 +6676,8 @@ extern "C" { pub fn gst_bin_find_unlinked_pad(bin: *mut GstBin, direction: GstPadDirection) -> *mut GstPad; pub fn gst_bin_get_by_interface(bin: *mut GstBin, iface: GType) -> *mut GstElement; pub fn gst_bin_get_by_name(bin: *mut GstBin, name: *const c_char) -> *mut GstElement; - pub fn gst_bin_get_by_name_recurse_up(bin: *mut GstBin, name: *const c_char) -> *mut GstElement; + pub fn gst_bin_get_by_name_recurse_up(bin: *mut GstBin, name: *const c_char) + -> *mut GstElement; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_bin_get_suppressed_flags(bin: *mut GstBin) -> GstElementFlags; pub fn gst_bin_iterate_all_by_interface(bin: *mut GstBin, iface: GType) -> *mut GstIterator; @@ -5086,23 +6705,62 @@ extern "C" { pub fn gst_buffer_pool_get_type() -> GType; pub fn gst_buffer_pool_new() -> *mut GstBufferPool; pub fn gst_buffer_pool_config_add_option(config: *mut GstStructure, option: *const c_char); - pub fn gst_buffer_pool_config_get_allocator(config: *mut GstStructure, allocator: *mut *mut GstAllocator, params: *mut GstAllocationParams) -> gboolean; - pub fn gst_buffer_pool_config_get_option(config: *mut GstStructure, index: c_uint) -> *const c_char; - pub fn gst_buffer_pool_config_get_params(config: *mut GstStructure, caps: *mut *mut GstCaps, size: *mut c_uint, min_buffers: *mut c_uint, max_buffers: *mut c_uint) -> gboolean; - pub fn gst_buffer_pool_config_has_option(config: *mut GstStructure, option: *const c_char) -> gboolean; + pub fn gst_buffer_pool_config_get_allocator( + config: *mut GstStructure, + allocator: *mut *mut GstAllocator, + params: *mut GstAllocationParams, + ) -> gboolean; + pub fn gst_buffer_pool_config_get_option( + config: *mut GstStructure, + index: c_uint, + ) -> *const c_char; + pub fn gst_buffer_pool_config_get_params( + config: *mut GstStructure, + caps: *mut *mut GstCaps, + size: *mut c_uint, + min_buffers: *mut c_uint, + max_buffers: *mut c_uint, + ) -> gboolean; + pub fn gst_buffer_pool_config_has_option( + config: *mut GstStructure, + option: *const c_char, + ) -> gboolean; pub fn gst_buffer_pool_config_n_options(config: *mut GstStructure) -> c_uint; - pub fn gst_buffer_pool_config_set_allocator(config: *mut GstStructure, allocator: *mut GstAllocator, params: *const GstAllocationParams); - pub fn gst_buffer_pool_config_set_params(config: *mut GstStructure, caps: *mut GstCaps, size: c_uint, min_buffers: c_uint, max_buffers: c_uint); + pub fn gst_buffer_pool_config_set_allocator( + config: *mut GstStructure, + allocator: *mut GstAllocator, + params: *const GstAllocationParams, + ); + pub fn gst_buffer_pool_config_set_params( + config: *mut GstStructure, + caps: *mut GstCaps, + size: c_uint, + min_buffers: c_uint, + max_buffers: c_uint, + ); #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_buffer_pool_config_validate_params(config: *mut GstStructure, caps: *mut GstCaps, size: c_uint, min_buffers: c_uint, max_buffers: c_uint) -> gboolean; - pub fn gst_buffer_pool_acquire_buffer(pool: *mut GstBufferPool, buffer: *mut *mut GstBuffer, params: *mut GstBufferPoolAcquireParams) -> GstFlowReturn; + pub fn gst_buffer_pool_config_validate_params( + config: *mut GstStructure, + caps: *mut GstCaps, + size: c_uint, + min_buffers: c_uint, + max_buffers: c_uint, + ) -> gboolean; + pub fn gst_buffer_pool_acquire_buffer( + pool: *mut GstBufferPool, + buffer: *mut *mut GstBuffer, + params: *mut GstBufferPoolAcquireParams, + ) -> GstFlowReturn; pub fn gst_buffer_pool_get_config(pool: *mut GstBufferPool) -> *mut GstStructure; pub fn gst_buffer_pool_get_options(pool: *mut GstBufferPool) -> *mut *const c_char; pub fn gst_buffer_pool_has_option(pool: *mut GstBufferPool, option: *const c_char) -> gboolean; pub fn gst_buffer_pool_is_active(pool: *mut GstBufferPool) -> gboolean; pub fn gst_buffer_pool_release_buffer(pool: *mut GstBufferPool, buffer: *mut GstBuffer); pub fn gst_buffer_pool_set_active(pool: *mut GstBufferPool, active: gboolean) -> gboolean; - pub fn gst_buffer_pool_set_config(pool: *mut GstBufferPool, config: *mut GstStructure) -> gboolean; + pub fn gst_buffer_pool_set_config( + pool: *mut GstBufferPool, + config: *mut GstStructure, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_buffer_pool_set_flushing(pool: *mut GstBufferPool, flushing: gboolean); @@ -5114,8 +6772,18 @@ extern "C" { pub fn gst_bus_add_signal_watch(bus: *mut GstBus); pub fn gst_bus_add_signal_watch_full(bus: *mut GstBus, priority: c_int); pub fn gst_bus_add_watch(bus: *mut GstBus, func: GstBusFunc, user_data: gpointer) -> c_uint; - pub fn gst_bus_add_watch_full(bus: *mut GstBus, priority: c_int, func: GstBusFunc, user_data: gpointer, notify: glib::GDestroyNotify) -> c_uint; - pub fn gst_bus_async_signal_func(bus: *mut GstBus, message: *mut GstMessage, data: gpointer) -> gboolean; + pub fn gst_bus_add_watch_full( + bus: *mut GstBus, + priority: c_int, + func: GstBusFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> c_uint; + pub fn gst_bus_async_signal_func( + bus: *mut GstBus, + message: *mut GstMessage, + data: gpointer, + ) -> gboolean; pub fn gst_bus_create_watch(bus: *mut GstBus) -> *mut glib::GSource; pub fn gst_bus_disable_sync_message_emission(bus: *mut GstBus); pub fn gst_bus_enable_sync_message_emission(bus: *mut GstBus); @@ -5123,7 +6791,11 @@ extern "C" { pub fn gst_bus_get_pollfd(bus: *mut GstBus, fd: *mut glib::GPollFD); pub fn gst_bus_have_pending(bus: *mut GstBus) -> gboolean; pub fn gst_bus_peek(bus: *mut GstBus) -> *mut GstMessage; - pub fn gst_bus_poll(bus: *mut GstBus, events: GstMessageType, timeout: GstClockTime) -> *mut GstMessage; + pub fn gst_bus_poll( + bus: *mut GstBus, + events: GstMessageType, + timeout: GstClockTime, + ) -> *mut GstMessage; pub fn gst_bus_pop(bus: *mut GstBus) -> *mut GstMessage; pub fn gst_bus_pop_filtered(bus: *mut GstBus, types: GstMessageType) -> *mut GstMessage; pub fn gst_bus_post(bus: *mut GstBus, message: *mut GstMessage) -> gboolean; @@ -5131,10 +6803,23 @@ extern "C" { #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_bus_remove_watch(bus: *mut GstBus) -> gboolean; pub fn gst_bus_set_flushing(bus: *mut GstBus, flushing: gboolean); - pub fn gst_bus_set_sync_handler(bus: *mut GstBus, func: GstBusSyncHandler, user_data: gpointer, notify: glib::GDestroyNotify); - pub fn gst_bus_sync_signal_handler(bus: *mut GstBus, message: *mut GstMessage, data: gpointer) -> GstBusSyncReply; + pub fn gst_bus_set_sync_handler( + bus: *mut GstBus, + func: GstBusSyncHandler, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_bus_sync_signal_handler( + bus: *mut GstBus, + message: *mut GstMessage, + data: gpointer, + ) -> GstBusSyncReply; pub fn gst_bus_timed_pop(bus: *mut GstBus, timeout: GstClockTime) -> *mut GstMessage; - pub fn gst_bus_timed_pop_filtered(bus: *mut GstBus, timeout: GstClockTime, types: GstMessageType) -> *mut GstMessage; + pub fn gst_bus_timed_pop_filtered( + bus: *mut GstBus, + timeout: GstClockTime, + types: GstMessageType, + ) -> *mut GstMessage; //========================================================================= // GstClock @@ -5150,14 +6835,46 @@ extern "C" { #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_clock_id_uses_clock(id: GstClockID, clock: *mut GstClock) -> gboolean; pub fn gst_clock_id_wait(id: GstClockID, jitter: *mut GstClockTimeDiff) -> GstClockReturn; - pub fn gst_clock_id_wait_async(id: GstClockID, func: GstClockCallback, user_data: gpointer, destroy_data: glib::GDestroyNotify) -> GstClockReturn; - pub fn gst_clock_add_observation(clock: *mut GstClock, slave: GstClockTime, master: GstClockTime, r_squared: *mut c_double) -> gboolean; + pub fn gst_clock_id_wait_async( + id: GstClockID, + func: GstClockCallback, + user_data: gpointer, + destroy_data: glib::GDestroyNotify, + ) -> GstClockReturn; + pub fn gst_clock_add_observation( + clock: *mut GstClock, + slave: GstClockTime, + master: GstClockTime, + r_squared: *mut c_double, + ) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_clock_add_observation_unapplied(clock: *mut GstClock, slave: GstClockTime, master: GstClockTime, r_squared: *mut c_double, internal: *mut GstClockTime, external: *mut GstClockTime, rate_num: *mut GstClockTime, rate_denom: *mut GstClockTime) -> gboolean; + pub fn gst_clock_add_observation_unapplied( + clock: *mut GstClock, + slave: GstClockTime, + master: GstClockTime, + r_squared: *mut c_double, + internal: *mut GstClockTime, + external: *mut GstClockTime, + rate_num: *mut GstClockTime, + rate_denom: *mut GstClockTime, + ) -> gboolean; pub fn gst_clock_adjust_unlocked(clock: *mut GstClock, internal: GstClockTime) -> GstClockTime; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_clock_adjust_with_calibration(clock: *mut GstClock, internal_target: GstClockTime, cinternal: GstClockTime, cexternal: GstClockTime, cnum: GstClockTime, cdenom: GstClockTime) -> GstClockTime; - pub fn gst_clock_get_calibration(clock: *mut GstClock, internal: *mut GstClockTime, external: *mut GstClockTime, rate_num: *mut GstClockTime, rate_denom: *mut GstClockTime); + pub fn gst_clock_adjust_with_calibration( + clock: *mut GstClock, + internal_target: GstClockTime, + cinternal: GstClockTime, + cexternal: GstClockTime, + cnum: GstClockTime, + cdenom: GstClockTime, + ) -> GstClockTime; + pub fn gst_clock_get_calibration( + clock: *mut GstClock, + internal: *mut GstClockTime, + external: *mut GstClockTime, + rate_num: *mut GstClockTime, + rate_denom: *mut GstClockTime, + ); pub fn gst_clock_get_internal_time(clock: *mut GstClock) -> GstClockTime; pub fn gst_clock_get_master(clock: *mut GstClock) -> *mut GstClock; pub fn gst_clock_get_resolution(clock: *mut GstClock) -> GstClockTime; @@ -5165,19 +6882,49 @@ extern "C" { pub fn gst_clock_get_timeout(clock: *mut GstClock) -> GstClockTime; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_clock_is_synced(clock: *mut GstClock) -> gboolean; - pub fn gst_clock_new_periodic_id(clock: *mut GstClock, start_time: GstClockTime, interval: GstClockTime) -> GstClockID; + pub fn gst_clock_new_periodic_id( + clock: *mut GstClock, + start_time: GstClockTime, + interval: GstClockTime, + ) -> GstClockID; pub fn gst_clock_new_single_shot_id(clock: *mut GstClock, time: GstClockTime) -> GstClockID; - pub fn gst_clock_periodic_id_reinit(clock: *mut GstClock, id: GstClockID, start_time: GstClockTime, interval: GstClockTime) -> gboolean; - pub fn gst_clock_set_calibration(clock: *mut GstClock, internal: GstClockTime, external: GstClockTime, rate_num: GstClockTime, rate_denom: GstClockTime); + pub fn gst_clock_periodic_id_reinit( + clock: *mut GstClock, + id: GstClockID, + start_time: GstClockTime, + interval: GstClockTime, + ) -> gboolean; + pub fn gst_clock_set_calibration( + clock: *mut GstClock, + internal: GstClockTime, + external: GstClockTime, + rate_num: GstClockTime, + rate_denom: GstClockTime, + ); pub fn gst_clock_set_master(clock: *mut GstClock, master: *mut GstClock) -> gboolean; - pub fn gst_clock_set_resolution(clock: *mut GstClock, resolution: GstClockTime) -> GstClockTime; + pub fn gst_clock_set_resolution(clock: *mut GstClock, resolution: GstClockTime) + -> GstClockTime; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_clock_set_synced(clock: *mut GstClock, synced: gboolean); pub fn gst_clock_set_timeout(clock: *mut GstClock, timeout: GstClockTime); - pub fn gst_clock_single_shot_id_reinit(clock: *mut GstClock, id: GstClockID, time: GstClockTime) -> gboolean; - pub fn gst_clock_unadjust_unlocked(clock: *mut GstClock, external: GstClockTime) -> GstClockTime; + pub fn gst_clock_single_shot_id_reinit( + clock: *mut GstClock, + id: GstClockID, + time: GstClockTime, + ) -> gboolean; + pub fn gst_clock_unadjust_unlocked( + clock: *mut GstClock, + external: GstClockTime, + ) -> GstClockTime; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_clock_unadjust_with_calibration(clock: *mut GstClock, external_target: GstClockTime, cinternal: GstClockTime, cexternal: GstClockTime, cnum: GstClockTime, cdenom: GstClockTime) -> GstClockTime; + pub fn gst_clock_unadjust_with_calibration( + clock: *mut GstClock, + external_target: GstClockTime, + cinternal: GstClockTime, + cexternal: GstClockTime, + cnum: GstClockTime, + cdenom: GstClockTime, + ) -> GstClockTime; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_clock_wait_for_sync(clock: *mut GstClock, timeout: GstClockTime) -> gboolean; @@ -5185,26 +6932,59 @@ extern "C" { // GstControlBinding //========================================================================= pub fn gst_control_binding_get_type() -> GType; - pub fn gst_control_binding_get_g_value_array(binding: *mut GstControlBinding, timestamp: GstClockTime, interval: GstClockTime, n_values: c_uint, values: *mut gobject::GValue) -> gboolean; - pub fn gst_control_binding_get_value(binding: *mut GstControlBinding, timestamp: GstClockTime) -> *mut gobject::GValue; - pub fn gst_control_binding_get_value_array(binding: *mut GstControlBinding, timestamp: GstClockTime, interval: GstClockTime, n_values: c_uint, values: gpointer) -> gboolean; + pub fn gst_control_binding_get_g_value_array( + binding: *mut GstControlBinding, + timestamp: GstClockTime, + interval: GstClockTime, + n_values: c_uint, + values: *mut gobject::GValue, + ) -> gboolean; + pub fn gst_control_binding_get_value( + binding: *mut GstControlBinding, + timestamp: GstClockTime, + ) -> *mut gobject::GValue; + pub fn gst_control_binding_get_value_array( + binding: *mut GstControlBinding, + timestamp: GstClockTime, + interval: GstClockTime, + n_values: c_uint, + values: gpointer, + ) -> gboolean; pub fn gst_control_binding_is_disabled(binding: *mut GstControlBinding) -> gboolean; pub fn gst_control_binding_set_disabled(binding: *mut GstControlBinding, disabled: gboolean); - pub fn gst_control_binding_sync_values(binding: *mut GstControlBinding, object: *mut GstObject, timestamp: GstClockTime, last_sync: GstClockTime) -> gboolean; + pub fn gst_control_binding_sync_values( + binding: *mut GstControlBinding, + object: *mut GstObject, + timestamp: GstClockTime, + last_sync: GstClockTime, + ) -> gboolean; //========================================================================= // GstControlSource //========================================================================= pub fn gst_control_source_get_type() -> GType; - pub fn gst_control_source_get_value(self_: *mut GstControlSource, timestamp: GstClockTime, value: *mut c_double) -> gboolean; - pub fn gst_control_source_get_value_array(self_: *mut GstControlSource, timestamp: GstClockTime, interval: GstClockTime, n_values: c_uint, values: *mut c_double) -> gboolean; + pub fn gst_control_source_get_value( + self_: *mut GstControlSource, + timestamp: GstClockTime, + value: *mut c_double, + ) -> gboolean; + pub fn gst_control_source_get_value_array( + self_: *mut GstControlSource, + timestamp: GstClockTime, + interval: GstClockTime, + n_values: c_uint, + values: *mut c_double, + ) -> gboolean; //========================================================================= // GstDevice //========================================================================= pub fn gst_device_get_type() -> GType; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_create_element(device: *mut GstDevice, name: *const c_char) -> *mut GstElement; + pub fn gst_device_create_element( + device: *mut GstDevice, + name: *const c_char, + ) -> *mut GstElement; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_device_get_caps(device: *mut GstDevice) -> *mut GstCaps; #[cfg(any(feature = "v1_4", feature = "dox"))] @@ -5218,7 +6998,10 @@ extern "C" { #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_device_has_classesv(device: *mut GstDevice, classes: *mut *mut c_char) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_reconfigure_element(device: *mut GstDevice, element: *mut GstElement) -> gboolean; + pub fn gst_device_reconfigure_element( + device: *mut GstDevice, + element: *mut GstElement, + ) -> gboolean; //========================================================================= // GstDeviceMonitor @@ -5227,7 +7010,11 @@ extern "C" { #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_device_monitor_new() -> *mut GstDeviceMonitor; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_monitor_add_filter(monitor: *mut GstDeviceMonitor, classes: *const c_char, caps: *mut GstCaps) -> c_uint; + pub fn gst_device_monitor_add_filter( + monitor: *mut GstDeviceMonitor, + classes: *const c_char, + caps: *mut GstCaps, + ) -> c_uint; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_device_monitor_get_bus(monitor: *mut GstDeviceMonitor) -> *mut GstBus; #[cfg(any(feature = "v1_4", feature = "dox"))] @@ -5237,9 +7024,15 @@ extern "C" { #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_device_monitor_get_show_all_devices(monitor: *mut GstDeviceMonitor) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_monitor_remove_filter(monitor: *mut GstDeviceMonitor, filter_id: c_uint) -> gboolean; + pub fn gst_device_monitor_remove_filter( + monitor: *mut GstDeviceMonitor, + filter_id: c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_device_monitor_set_show_all_devices(monitor: *mut GstDeviceMonitor, show_all: gboolean); + pub fn gst_device_monitor_set_show_all_devices( + monitor: *mut GstDeviceMonitor, + show_all: gboolean, + ); #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_device_monitor_start(monitor: *mut GstDeviceMonitor) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] @@ -5250,25 +7043,44 @@ extern "C" { //========================================================================= pub fn gst_device_provider_get_type() -> GType; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_provider_register(plugin: *mut GstPlugin, name: *const c_char, rank: c_uint, type_: GType) -> gboolean; + pub fn gst_device_provider_register( + plugin: *mut GstPlugin, + name: *const c_char, + rank: c_uint, + type_: GType, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_device_provider_can_monitor(provider: *mut GstDeviceProvider) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_device_provider_device_add(provider: *mut GstDeviceProvider, device: *mut GstDevice); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_device_provider_device_changed(provider: *mut GstDeviceProvider, device: *mut GstDevice, changed_device: *mut GstDevice); + pub fn gst_device_provider_device_changed( + provider: *mut GstDeviceProvider, + device: *mut GstDevice, + changed_device: *mut GstDevice, + ); #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_provider_device_remove(provider: *mut GstDeviceProvider, device: *mut GstDevice); + pub fn gst_device_provider_device_remove( + provider: *mut GstDeviceProvider, + device: *mut GstDevice, + ); #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_device_provider_get_bus(provider: *mut GstDeviceProvider) -> *mut GstBus; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_device_provider_get_devices(provider: *mut GstDeviceProvider) -> *mut glib::GList; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_provider_get_factory(provider: *mut GstDeviceProvider) -> *mut GstDeviceProviderFactory; + pub fn gst_device_provider_get_factory( + provider: *mut GstDeviceProvider, + ) -> *mut GstDeviceProviderFactory; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_device_provider_get_hidden_providers(provider: *mut GstDeviceProvider) -> *mut *mut c_char; + pub fn gst_device_provider_get_hidden_providers( + provider: *mut GstDeviceProvider, + ) -> *mut *mut c_char; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_device_provider_get_metadata(provider: *mut GstDeviceProvider, key: *const c_char) -> *const c_char; + pub fn gst_device_provider_get_metadata( + provider: *mut GstDeviceProvider, + key: *const c_char, + ) -> *const c_char; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_device_provider_hide_provider(provider: *mut GstDeviceProvider, name: *const c_char); #[cfg(any(feature = "v1_4", feature = "dox"))] @@ -5276,7 +7088,10 @@ extern "C" { #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_device_provider_stop(provider: *mut GstDeviceProvider); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_device_provider_unhide_provider(provider: *mut GstDeviceProvider, name: *const c_char); + pub fn gst_device_provider_unhide_provider( + provider: *mut GstDeviceProvider, + name: *const c_char, + ); //========================================================================= // GstDeviceProviderFactory @@ -5285,21 +7100,40 @@ extern "C" { #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_device_provider_factory_find(name: *const c_char) -> *mut GstDeviceProviderFactory; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_provider_factory_get_by_name(factoryname: *const c_char) -> *mut GstDeviceProvider; + pub fn gst_device_provider_factory_get_by_name( + factoryname: *const c_char, + ) -> *mut GstDeviceProvider; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_provider_factory_list_get_device_providers(minrank: GstRank) -> *mut glib::GList; + pub fn gst_device_provider_factory_list_get_device_providers( + minrank: GstRank, + ) -> *mut glib::GList; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_provider_factory_get(factory: *mut GstDeviceProviderFactory) -> *mut GstDeviceProvider; + pub fn gst_device_provider_factory_get( + factory: *mut GstDeviceProviderFactory, + ) -> *mut GstDeviceProvider; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_provider_factory_get_device_provider_type(factory: *mut GstDeviceProviderFactory) -> GType; + pub fn gst_device_provider_factory_get_device_provider_type( + factory: *mut GstDeviceProviderFactory, + ) -> GType; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_provider_factory_get_metadata(factory: *mut GstDeviceProviderFactory, key: *const c_char) -> *const c_char; + pub fn gst_device_provider_factory_get_metadata( + factory: *mut GstDeviceProviderFactory, + key: *const c_char, + ) -> *const c_char; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_provider_factory_get_metadata_keys(factory: *mut GstDeviceProviderFactory) -> *mut *mut c_char; + pub fn gst_device_provider_factory_get_metadata_keys( + factory: *mut GstDeviceProviderFactory, + ) -> *mut *mut c_char; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_provider_factory_has_classes(factory: *mut GstDeviceProviderFactory, classes: *const c_char) -> gboolean; + pub fn gst_device_provider_factory_has_classes( + factory: *mut GstDeviceProviderFactory, + classes: *const c_char, + ) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_device_provider_factory_has_classesv(factory: *mut GstDeviceProviderFactory, classes: *mut *mut c_char) -> gboolean; + pub fn gst_device_provider_factory_has_classesv( + factory: *mut GstDeviceProviderFactory, + classes: *mut *mut c_char, + ) -> gboolean; //========================================================================= // GstDoubleRange @@ -5316,112 +7150,310 @@ extern "C" { // GstElement //========================================================================= pub fn gst_element_get_type() -> GType; - pub fn gst_element_make_from_uri(type_: GstURIType, uri: *const c_char, elementname: *const c_char, error: *mut *mut glib::GError) -> *mut GstElement; - pub fn gst_element_register(plugin: *mut GstPlugin, name: *const c_char, rank: c_uint, type_: GType) -> gboolean; - pub fn gst_element_state_change_return_get_name(state_ret: GstStateChangeReturn) -> *const c_char; + pub fn gst_element_make_from_uri( + type_: GstURIType, + uri: *const c_char, + elementname: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GstElement; + pub fn gst_element_register( + plugin: *mut GstPlugin, + name: *const c_char, + rank: c_uint, + type_: GType, + ) -> gboolean; + pub fn gst_element_state_change_return_get_name( + state_ret: GstStateChangeReturn, + ) -> *const c_char; pub fn gst_element_state_get_name(state: GstState) -> *const c_char; pub fn gst_element_abort_state(element: *mut GstElement); pub fn gst_element_add_pad(element: *mut GstElement, pad: *mut GstPad) -> gboolean; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_element_add_property_deep_notify_watch(element: *mut GstElement, property_name: *const c_char, include_value: gboolean) -> c_ulong; + pub fn gst_element_add_property_deep_notify_watch( + element: *mut GstElement, + property_name: *const c_char, + include_value: gboolean, + ) -> c_ulong; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_element_add_property_notify_watch(element: *mut GstElement, property_name: *const c_char, include_value: gboolean) -> c_ulong; + pub fn gst_element_add_property_notify_watch( + element: *mut GstElement, + property_name: *const c_char, + include_value: gboolean, + ) -> c_ulong; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_element_call_async(element: *mut GstElement, func: GstElementCallAsyncFunc, user_data: gpointer, destroy_notify: glib::GDestroyNotify); - pub fn gst_element_change_state(element: *mut GstElement, transition: GstStateChange) -> GstStateChangeReturn; - pub fn gst_element_continue_state(element: *mut GstElement, ret: GstStateChangeReturn) -> GstStateChangeReturn; + pub fn gst_element_call_async( + element: *mut GstElement, + func: GstElementCallAsyncFunc, + user_data: gpointer, + destroy_notify: glib::GDestroyNotify, + ); + pub fn gst_element_change_state( + element: *mut GstElement, + transition: GstStateChange, + ) -> GstStateChangeReturn; + pub fn gst_element_continue_state( + element: *mut GstElement, + ret: GstStateChangeReturn, + ) -> GstStateChangeReturn; pub fn gst_element_create_all_pads(element: *mut GstElement); #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_element_foreach_pad(element: *mut GstElement, func: GstElementForeachPadFunc, user_data: gpointer) -> gboolean; + pub fn gst_element_foreach_pad( + element: *mut GstElement, + func: GstElementForeachPadFunc, + user_data: gpointer, + ) -> gboolean; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_element_foreach_sink_pad(element: *mut GstElement, func: GstElementForeachPadFunc, user_data: gpointer) -> gboolean; + pub fn gst_element_foreach_sink_pad( + element: *mut GstElement, + func: GstElementForeachPadFunc, + user_data: gpointer, + ) -> gboolean; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_element_foreach_src_pad(element: *mut GstElement, func: GstElementForeachPadFunc, user_data: gpointer) -> gboolean; + pub fn gst_element_foreach_src_pad( + element: *mut GstElement, + func: GstElementForeachPadFunc, + user_data: gpointer, + ) -> gboolean; pub fn gst_element_get_base_time(element: *mut GstElement) -> GstClockTime; pub fn gst_element_get_bus(element: *mut GstElement) -> *mut GstBus; pub fn gst_element_get_clock(element: *mut GstElement) -> *mut GstClock; - pub fn gst_element_get_compatible_pad(element: *mut GstElement, pad: *mut GstPad, caps: *mut GstCaps) -> *mut GstPad; - pub fn gst_element_get_compatible_pad_template(element: *mut GstElement, compattempl: *mut GstPadTemplate) -> *mut GstPadTemplate; + pub fn gst_element_get_compatible_pad( + element: *mut GstElement, + pad: *mut GstPad, + caps: *mut GstCaps, + ) -> *mut GstPad; + pub fn gst_element_get_compatible_pad_template( + element: *mut GstElement, + compattempl: *mut GstPadTemplate, + ) -> *mut GstPadTemplate; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_element_get_context(element: *mut GstElement, context_type: *const c_char) -> *mut GstContext; + pub fn gst_element_get_context( + element: *mut GstElement, + context_type: *const c_char, + ) -> *mut GstContext; #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_element_get_context_unlocked(element: *mut GstElement, context_type: *const c_char) -> *mut GstContext; + pub fn gst_element_get_context_unlocked( + element: *mut GstElement, + context_type: *const c_char, + ) -> *mut GstContext; #[cfg(any(feature = "v1_8", feature = "dox"))] pub fn gst_element_get_contexts(element: *mut GstElement) -> *mut glib::GList; pub fn gst_element_get_factory(element: *mut GstElement) -> *mut GstElementFactory; #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_element_get_metadata(element: *mut GstElement, key: *const c_char) -> *const c_char; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_element_get_pad_template(element: *mut GstElement, name: *const c_char) -> *mut GstPadTemplate; + pub fn gst_element_get_pad_template( + element: *mut GstElement, + name: *const c_char, + ) -> *mut GstPadTemplate; #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_element_get_pad_template_list(element: *mut GstElement) -> *mut glib::GList; - pub fn gst_element_get_request_pad(element: *mut GstElement, name: *const c_char) -> *mut GstPad; + pub fn gst_element_get_request_pad( + element: *mut GstElement, + name: *const c_char, + ) -> *mut GstPad; pub fn gst_element_get_start_time(element: *mut GstElement) -> GstClockTime; - pub fn gst_element_get_state(element: *mut GstElement, state: *mut GstState, pending: *mut GstState, timeout: GstClockTime) -> GstStateChangeReturn; - pub fn gst_element_get_static_pad(element: *mut GstElement, name: *const c_char) -> *mut GstPad; + pub fn gst_element_get_state( + element: *mut GstElement, + state: *mut GstState, + pending: *mut GstState, + timeout: GstClockTime, + ) -> GstStateChangeReturn; + pub fn gst_element_get_static_pad(element: *mut GstElement, name: *const c_char) + -> *mut GstPad; pub fn gst_element_is_locked_state(element: *mut GstElement) -> gboolean; pub fn gst_element_iterate_pads(element: *mut GstElement) -> *mut GstIterator; pub fn gst_element_iterate_sink_pads(element: *mut GstElement) -> *mut GstIterator; pub fn gst_element_iterate_src_pads(element: *mut GstElement) -> *mut GstIterator; pub fn gst_element_link(src: *mut GstElement, dest: *mut GstElement) -> gboolean; - pub fn gst_element_link_filtered(src: *mut GstElement, dest: *mut GstElement, filter: *mut GstCaps) -> gboolean; - pub fn gst_element_link_many(element_1: *mut GstElement, element_2: *mut GstElement, ...) -> gboolean; - pub fn gst_element_link_pads(src: *mut GstElement, srcpadname: *const c_char, dest: *mut GstElement, destpadname: *const c_char) -> gboolean; - pub fn gst_element_link_pads_filtered(src: *mut GstElement, srcpadname: *const c_char, dest: *mut GstElement, destpadname: *const c_char, filter: *mut GstCaps) -> gboolean; - pub fn gst_element_link_pads_full(src: *mut GstElement, srcpadname: *const c_char, dest: *mut GstElement, destpadname: *const c_char, flags: GstPadLinkCheck) -> gboolean; + pub fn gst_element_link_filtered( + src: *mut GstElement, + dest: *mut GstElement, + filter: *mut GstCaps, + ) -> gboolean; + pub fn gst_element_link_many( + element_1: *mut GstElement, + element_2: *mut GstElement, + ... + ) -> gboolean; + pub fn gst_element_link_pads( + src: *mut GstElement, + srcpadname: *const c_char, + dest: *mut GstElement, + destpadname: *const c_char, + ) -> gboolean; + pub fn gst_element_link_pads_filtered( + src: *mut GstElement, + srcpadname: *const c_char, + dest: *mut GstElement, + destpadname: *const c_char, + filter: *mut GstCaps, + ) -> gboolean; + pub fn gst_element_link_pads_full( + src: *mut GstElement, + srcpadname: *const c_char, + dest: *mut GstElement, + destpadname: *const c_char, + flags: GstPadLinkCheck, + ) -> gboolean; pub fn gst_element_lost_state(element: *mut GstElement); - pub fn gst_element_message_full(element: *mut GstElement, type_: GstMessageType, domain: glib::GQuark, code: c_int, text: *mut c_char, debug: *mut c_char, file: *const c_char, function: *const c_char, line: c_int); + pub fn gst_element_message_full( + element: *mut GstElement, + type_: GstMessageType, + domain: glib::GQuark, + code: c_int, + text: *mut c_char, + debug: *mut c_char, + file: *const c_char, + function: *const c_char, + line: c_int, + ); #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_element_message_full_with_details(element: *mut GstElement, type_: GstMessageType, domain: glib::GQuark, code: c_int, text: *mut c_char, debug: *mut c_char, file: *const c_char, function: *const c_char, line: c_int, structure: *mut GstStructure); + pub fn gst_element_message_full_with_details( + element: *mut GstElement, + type_: GstMessageType, + domain: glib::GQuark, + code: c_int, + text: *mut c_char, + debug: *mut c_char, + file: *const c_char, + function: *const c_char, + line: c_int, + structure: *mut GstStructure, + ); pub fn gst_element_no_more_pads(element: *mut GstElement); - pub fn gst_element_post_message(element: *mut GstElement, message: *mut GstMessage) -> gboolean; + pub fn gst_element_post_message(element: *mut GstElement, message: *mut GstMessage) + -> gboolean; pub fn gst_element_provide_clock(element: *mut GstElement) -> *mut GstClock; pub fn gst_element_query(element: *mut GstElement, query: *mut GstQuery) -> gboolean; - pub fn gst_element_query_convert(element: *mut GstElement, src_format: GstFormat, src_val: i64, dest_format: GstFormat, dest_val: *mut i64) -> gboolean; - pub fn gst_element_query_duration(element: *mut GstElement, format: GstFormat, duration: *mut i64) -> gboolean; - pub fn gst_element_query_position(element: *mut GstElement, format: GstFormat, cur: *mut i64) -> gboolean; + pub fn gst_element_query_convert( + element: *mut GstElement, + src_format: GstFormat, + src_val: i64, + dest_format: GstFormat, + dest_val: *mut i64, + ) -> gboolean; + pub fn gst_element_query_duration( + element: *mut GstElement, + format: GstFormat, + duration: *mut i64, + ) -> gboolean; + pub fn gst_element_query_position( + element: *mut GstElement, + format: GstFormat, + cur: *mut i64, + ) -> gboolean; pub fn gst_element_release_request_pad(element: *mut GstElement, pad: *mut GstPad); pub fn gst_element_remove_pad(element: *mut GstElement, pad: *mut GstPad) -> gboolean; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_element_remove_property_notify_watch(element: *mut GstElement, watch_id: c_ulong); - pub fn gst_element_request_pad(element: *mut GstElement, templ: *mut GstPadTemplate, name: *const c_char, caps: *const GstCaps) -> *mut GstPad; - pub fn gst_element_seek(element: *mut GstElement, rate: c_double, format: GstFormat, flags: GstSeekFlags, start_type: GstSeekType, start: i64, stop_type: GstSeekType, stop: i64) -> gboolean; - pub fn gst_element_seek_simple(element: *mut GstElement, format: GstFormat, seek_flags: GstSeekFlags, seek_pos: i64) -> gboolean; + pub fn gst_element_request_pad( + element: *mut GstElement, + templ: *mut GstPadTemplate, + name: *const c_char, + caps: *const GstCaps, + ) -> *mut GstPad; + pub fn gst_element_seek( + element: *mut GstElement, + rate: c_double, + format: GstFormat, + flags: GstSeekFlags, + start_type: GstSeekType, + start: i64, + stop_type: GstSeekType, + stop: i64, + ) -> gboolean; + pub fn gst_element_seek_simple( + element: *mut GstElement, + format: GstFormat, + seek_flags: GstSeekFlags, + seek_pos: i64, + ) -> gboolean; pub fn gst_element_send_event(element: *mut GstElement, event: *mut GstEvent) -> gboolean; pub fn gst_element_set_base_time(element: *mut GstElement, time: GstClockTime); pub fn gst_element_set_bus(element: *mut GstElement, bus: *mut GstBus); pub fn gst_element_set_clock(element: *mut GstElement, clock: *mut GstClock) -> gboolean; pub fn gst_element_set_context(element: *mut GstElement, context: *mut GstContext); - pub fn gst_element_set_locked_state(element: *mut GstElement, locked_state: gboolean) -> gboolean; + pub fn gst_element_set_locked_state( + element: *mut GstElement, + locked_state: gboolean, + ) -> gboolean; pub fn gst_element_set_start_time(element: *mut GstElement, time: GstClockTime); - pub fn gst_element_set_state(element: *mut GstElement, state: GstState) -> GstStateChangeReturn; + pub fn gst_element_set_state(element: *mut GstElement, state: GstState) + -> GstStateChangeReturn; pub fn gst_element_sync_state_with_parent(element: *mut GstElement) -> gboolean; pub fn gst_element_unlink(src: *mut GstElement, dest: *mut GstElement); pub fn gst_element_unlink_many(element_1: *mut GstElement, element_2: *mut GstElement, ...); - pub fn gst_element_unlink_pads(src: *mut GstElement, srcpadname: *const c_char, dest: *mut GstElement, destpadname: *const c_char); + pub fn gst_element_unlink_pads( + src: *mut GstElement, + srcpadname: *const c_char, + dest: *mut GstElement, + destpadname: *const c_char, + ); //========================================================================= // GstElementFactory //========================================================================= pub fn gst_element_factory_get_type() -> GType; pub fn gst_element_factory_find(name: *const c_char) -> *mut GstElementFactory; - pub fn gst_element_factory_list_filter(list: *mut glib::GList, caps: *const GstCaps, direction: GstPadDirection, subsetonly: gboolean) -> *mut glib::GList; - pub fn gst_element_factory_list_get_elements(type_: GstElementFactoryListType, minrank: GstRank) -> *mut glib::GList; - pub fn gst_element_factory_make(factoryname: *const c_char, name: *const c_char) -> *mut GstElement; - pub fn gst_element_factory_can_sink_all_caps(factory: *mut GstElementFactory, caps: *const GstCaps) -> gboolean; - pub fn gst_element_factory_can_sink_any_caps(factory: *mut GstElementFactory, caps: *const GstCaps) -> gboolean; - pub fn gst_element_factory_can_src_all_caps(factory: *mut GstElementFactory, caps: *const GstCaps) -> gboolean; - pub fn gst_element_factory_can_src_any_caps(factory: *mut GstElementFactory, caps: *const GstCaps) -> gboolean; - pub fn gst_element_factory_create(factory: *mut GstElementFactory, name: *const c_char) -> *mut GstElement; + pub fn gst_element_factory_list_filter( + list: *mut glib::GList, + caps: *const GstCaps, + direction: GstPadDirection, + subsetonly: gboolean, + ) -> *mut glib::GList; + pub fn gst_element_factory_list_get_elements( + type_: GstElementFactoryListType, + minrank: GstRank, + ) -> *mut glib::GList; + pub fn gst_element_factory_make( + factoryname: *const c_char, + name: *const c_char, + ) -> *mut GstElement; + pub fn gst_element_factory_can_sink_all_caps( + factory: *mut GstElementFactory, + caps: *const GstCaps, + ) -> gboolean; + pub fn gst_element_factory_can_sink_any_caps( + factory: *mut GstElementFactory, + caps: *const GstCaps, + ) -> gboolean; + pub fn gst_element_factory_can_src_all_caps( + factory: *mut GstElementFactory, + caps: *const GstCaps, + ) -> gboolean; + pub fn gst_element_factory_can_src_any_caps( + factory: *mut GstElementFactory, + caps: *const GstCaps, + ) -> gboolean; + pub fn gst_element_factory_create( + factory: *mut GstElementFactory, + name: *const c_char, + ) -> *mut GstElement; pub fn gst_element_factory_get_element_type(factory: *mut GstElementFactory) -> GType; - pub fn gst_element_factory_get_metadata(factory: *mut GstElementFactory, key: *const c_char) -> *const c_char; - pub fn gst_element_factory_get_metadata_keys(factory: *mut GstElementFactory) -> *mut *mut c_char; + pub fn gst_element_factory_get_metadata( + factory: *mut GstElementFactory, + key: *const c_char, + ) -> *const c_char; + pub fn gst_element_factory_get_metadata_keys( + factory: *mut GstElementFactory, + ) -> *mut *mut c_char; pub fn gst_element_factory_get_num_pad_templates(factory: *mut GstElementFactory) -> c_uint; - pub fn gst_element_factory_get_static_pad_templates(factory: *mut GstElementFactory) -> *const glib::GList; - pub fn gst_element_factory_get_uri_protocols(factory: *mut GstElementFactory) -> *const *const c_char; + pub fn gst_element_factory_get_static_pad_templates( + factory: *mut GstElementFactory, + ) -> *const glib::GList; + pub fn gst_element_factory_get_uri_protocols( + factory: *mut GstElementFactory, + ) -> *const *const c_char; pub fn gst_element_factory_get_uri_type(factory: *mut GstElementFactory) -> GstURIType; - pub fn gst_element_factory_has_interface(factory: *mut GstElementFactory, interfacename: *const c_char) -> gboolean; - pub fn gst_element_factory_list_is_type(factory: *mut GstElementFactory, type_: GstElementFactoryListType) -> gboolean; + pub fn gst_element_factory_has_interface( + factory: *mut GstElementFactory, + interfacename: *const c_char, + ) -> gboolean; + pub fn gst_element_factory_list_is_type( + factory: *mut GstElementFactory, + type_: GstElementFactoryListType, + ) -> gboolean; //========================================================================= // GstFlagSet @@ -5445,11 +7477,28 @@ extern "C" { //========================================================================= pub fn gst_ghost_pad_get_type() -> GType; pub fn gst_ghost_pad_new(name: *const c_char, target: *mut GstPad) -> *mut GstPad; - pub fn gst_ghost_pad_new_from_template(name: *const c_char, target: *mut GstPad, templ: *mut GstPadTemplate) -> *mut GstPad; + pub fn gst_ghost_pad_new_from_template( + name: *const c_char, + target: *mut GstPad, + templ: *mut GstPadTemplate, + ) -> *mut GstPad; pub fn gst_ghost_pad_new_no_target(name: *const c_char, dir: GstPadDirection) -> *mut GstPad; - pub fn gst_ghost_pad_new_no_target_from_template(name: *const c_char, templ: *mut GstPadTemplate) -> *mut GstPad; - pub fn gst_ghost_pad_activate_mode_default(pad: *mut GstPad, parent: *mut GstObject, mode: GstPadMode, active: gboolean) -> gboolean; - pub fn gst_ghost_pad_internal_activate_mode_default(pad: *mut GstPad, parent: *mut GstObject, mode: GstPadMode, active: gboolean) -> gboolean; + pub fn gst_ghost_pad_new_no_target_from_template( + name: *const c_char, + templ: *mut GstPadTemplate, + ) -> *mut GstPad; + pub fn gst_ghost_pad_activate_mode_default( + pad: *mut GstPad, + parent: *mut GstObject, + mode: GstPadMode, + active: gboolean, + ) -> gboolean; + pub fn gst_ghost_pad_internal_activate_mode_default( + pad: *mut GstPad, + parent: *mut GstObject, + mode: GstPadMode, + active: gboolean, + ) -> gboolean; pub fn gst_ghost_pad_construct(gpad: *mut GstGhostPad) -> gboolean; pub fn gst_ghost_pad_get_target(gpad: *mut GstGhostPad) -> *mut GstPad; pub fn gst_ghost_pad_set_target(gpad: *mut GstGhostPad, newtarget: *mut GstPad) -> gboolean; @@ -5469,27 +7518,68 @@ extern "C" { //========================================================================= pub fn gst_object_get_type() -> GType; pub fn gst_object_check_uniqueness(list: *mut glib::GList, name: *const c_char) -> gboolean; - pub fn gst_object_default_deep_notify(object: *mut gobject::GObject, orig: *mut GstObject, pspec: *mut gobject::GParamSpec, excluded_props: *mut *mut c_char); + pub fn gst_object_default_deep_notify( + object: *mut gobject::GObject, + orig: *mut GstObject, + pspec: *mut gobject::GParamSpec, + excluded_props: *mut *mut c_char, + ); pub fn gst_object_ref_sink(object: gpointer) -> gpointer; pub fn gst_object_replace(oldobj: *mut *mut GstObject, newobj: *mut GstObject) -> gboolean; - pub fn gst_object_add_control_binding(object: *mut GstObject, binding: *mut GstControlBinding) -> gboolean; - pub fn gst_object_default_error(source: *mut GstObject, error: *const glib::GError, debug: *const c_char); - pub fn gst_object_get_control_binding(object: *mut GstObject, property_name: *const c_char) -> *mut GstControlBinding; + pub fn gst_object_add_control_binding( + object: *mut GstObject, + binding: *mut GstControlBinding, + ) -> gboolean; + pub fn gst_object_default_error( + source: *mut GstObject, + error: *const glib::GError, + debug: *const c_char, + ); + pub fn gst_object_get_control_binding( + object: *mut GstObject, + property_name: *const c_char, + ) -> *mut GstControlBinding; pub fn gst_object_get_control_rate(object: *mut GstObject) -> GstClockTime; - pub fn gst_object_get_g_value_array(object: *mut GstObject, property_name: *const c_char, timestamp: GstClockTime, interval: GstClockTime, n_values: c_uint, values: *mut gobject::GValue) -> gboolean; + pub fn gst_object_get_g_value_array( + object: *mut GstObject, + property_name: *const c_char, + timestamp: GstClockTime, + interval: GstClockTime, + n_values: c_uint, + values: *mut gobject::GValue, + ) -> gboolean; pub fn gst_object_get_name(object: *mut GstObject) -> *mut c_char; pub fn gst_object_get_parent(object: *mut GstObject) -> *mut GstObject; pub fn gst_object_get_path_string(object: *mut GstObject) -> *mut c_char; - pub fn gst_object_get_value(object: *mut GstObject, property_name: *const c_char, timestamp: GstClockTime) -> *mut gobject::GValue; - pub fn gst_object_get_value_array(object: *mut GstObject, property_name: *const c_char, timestamp: GstClockTime, interval: GstClockTime, n_values: c_uint, values: gpointer) -> gboolean; + pub fn gst_object_get_value( + object: *mut GstObject, + property_name: *const c_char, + timestamp: GstClockTime, + ) -> *mut gobject::GValue; + pub fn gst_object_get_value_array( + object: *mut GstObject, + property_name: *const c_char, + timestamp: GstClockTime, + interval: GstClockTime, + n_values: c_uint, + values: gpointer, + ) -> gboolean; pub fn gst_object_has_active_control_bindings(object: *mut GstObject) -> gboolean; pub fn gst_object_has_ancestor(object: *mut GstObject, ancestor: *mut GstObject) -> gboolean; - pub fn gst_object_has_as_ancestor(object: *mut GstObject, ancestor: *mut GstObject) -> gboolean; + pub fn gst_object_has_as_ancestor(object: *mut GstObject, ancestor: *mut GstObject) + -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_object_has_as_parent(object: *mut GstObject, parent: *mut GstObject) -> gboolean; pub fn gst_object_ref(object: *mut GstObject) -> *mut GstObject; - pub fn gst_object_remove_control_binding(object: *mut GstObject, binding: *mut GstControlBinding) -> gboolean; - pub fn gst_object_set_control_binding_disabled(object: *mut GstObject, property_name: *const c_char, disabled: gboolean); + pub fn gst_object_remove_control_binding( + object: *mut GstObject, + binding: *mut GstControlBinding, + ) -> gboolean; + pub fn gst_object_set_control_binding_disabled( + object: *mut GstObject, + property_name: *const c_char, + disabled: gboolean, + ); pub fn gst_object_set_control_bindings_disabled(object: *mut GstObject, disabled: gboolean); pub fn gst_object_set_control_rate(object: *mut GstObject, control_rate: GstClockTime); pub fn gst_object_set_name(object: *mut GstObject, name: *const c_char) -> gboolean; @@ -5504,21 +7594,50 @@ extern "C" { //========================================================================= pub fn gst_pad_get_type() -> GType; pub fn gst_pad_new(name: *const c_char, direction: GstPadDirection) -> *mut GstPad; - pub fn gst_pad_new_from_static_template(templ: *mut GstStaticPadTemplate, name: *const c_char) -> *mut GstPad; - pub fn gst_pad_new_from_template(templ: *mut GstPadTemplate, name: *const c_char) -> *mut GstPad; + pub fn gst_pad_new_from_static_template( + templ: *mut GstStaticPadTemplate, + name: *const c_char, + ) -> *mut GstPad; + pub fn gst_pad_new_from_template( + templ: *mut GstPadTemplate, + name: *const c_char, + ) -> *mut GstPad; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_pad_link_get_name(ret: GstPadLinkReturn) -> *const c_char; pub fn gst_pad_activate_mode(pad: *mut GstPad, mode: GstPadMode, active: gboolean) -> gboolean; - pub fn gst_pad_add_probe(pad: *mut GstPad, mask: GstPadProbeType, callback: GstPadProbeCallback, user_data: gpointer, destroy_data: glib::GDestroyNotify) -> c_ulong; + pub fn gst_pad_add_probe( + pad: *mut GstPad, + mask: GstPadProbeType, + callback: GstPadProbeCallback, + user_data: gpointer, + destroy_data: glib::GDestroyNotify, + ) -> c_ulong; pub fn gst_pad_can_link(srcpad: *mut GstPad, sinkpad: *mut GstPad) -> gboolean; pub fn gst_pad_chain(pad: *mut GstPad, buffer: *mut GstBuffer) -> GstFlowReturn; pub fn gst_pad_chain_list(pad: *mut GstPad, list: *mut GstBufferList) -> GstFlowReturn; pub fn gst_pad_check_reconfigure(pad: *mut GstPad) -> gboolean; - pub fn gst_pad_create_stream_id(pad: *mut GstPad, parent: *mut GstElement, stream_id: *const c_char) -> *mut c_char; - pub fn gst_pad_create_stream_id_printf(pad: *mut GstPad, parent: *mut GstElement, stream_id: *const c_char, ...) -> *mut c_char; + pub fn gst_pad_create_stream_id( + pad: *mut GstPad, + parent: *mut GstElement, + stream_id: *const c_char, + ) -> *mut c_char; + pub fn gst_pad_create_stream_id_printf( + pad: *mut GstPad, + parent: *mut GstElement, + stream_id: *const c_char, + ... + ) -> *mut c_char; //pub fn gst_pad_create_stream_id_printf_valist(pad: *mut GstPad, parent: *mut GstElement, stream_id: *const c_char, var_args: /*Unimplemented*/va_list) -> *mut c_char; - pub fn gst_pad_event_default(pad: *mut GstPad, parent: *mut GstObject, event: *mut GstEvent) -> gboolean; - pub fn gst_pad_forward(pad: *mut GstPad, forward: GstPadForwardFunction, user_data: gpointer) -> gboolean; + pub fn gst_pad_event_default( + pad: *mut GstPad, + parent: *mut GstObject, + event: *mut GstEvent, + ) -> gboolean; + pub fn gst_pad_forward( + pad: *mut GstPad, + forward: GstPadForwardFunction, + user_data: gpointer, + ) -> gboolean; pub fn gst_pad_get_allowed_caps(pad: *mut GstPad) -> *mut GstCaps; pub fn gst_pad_get_current_caps(pad: *mut GstPad) -> *mut GstCaps; pub fn gst_pad_get_direction(pad: *mut GstPad) -> GstPadDirection; @@ -5530,8 +7649,17 @@ extern "C" { pub fn gst_pad_get_pad_template_caps(pad: *mut GstPad) -> *mut GstCaps; pub fn gst_pad_get_parent_element(pad: *mut GstPad) -> *mut GstElement; pub fn gst_pad_get_peer(pad: *mut GstPad) -> *mut GstPad; - pub fn gst_pad_get_range(pad: *mut GstPad, offset: u64, size: c_uint, buffer: *mut *mut GstBuffer) -> GstFlowReturn; - pub fn gst_pad_get_sticky_event(pad: *mut GstPad, event_type: GstEventType, idx: c_uint) -> *mut GstEvent; + pub fn gst_pad_get_range( + pad: *mut GstPad, + offset: u64, + size: c_uint, + buffer: *mut *mut GstBuffer, + ) -> GstFlowReturn; + pub fn gst_pad_get_sticky_event( + pad: *mut GstPad, + event_type: GstEventType, + idx: c_uint, + ) -> *mut GstEvent; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_pad_get_stream(pad: *mut GstPad) -> *mut GstStream; #[cfg(any(feature = "v1_2", feature = "dox"))] @@ -5544,54 +7672,162 @@ extern "C" { pub fn gst_pad_is_blocking(pad: *mut GstPad) -> gboolean; pub fn gst_pad_is_linked(pad: *mut GstPad) -> gboolean; pub fn gst_pad_iterate_internal_links(pad: *mut GstPad) -> *mut GstIterator; - pub fn gst_pad_iterate_internal_links_default(pad: *mut GstPad, parent: *mut GstObject) -> *mut GstIterator; + pub fn gst_pad_iterate_internal_links_default( + pad: *mut GstPad, + parent: *mut GstObject, + ) -> *mut GstIterator; pub fn gst_pad_link(srcpad: *mut GstPad, sinkpad: *mut GstPad) -> GstPadLinkReturn; - pub fn gst_pad_link_full(srcpad: *mut GstPad, sinkpad: *mut GstPad, flags: GstPadLinkCheck) -> GstPadLinkReturn; + pub fn gst_pad_link_full( + srcpad: *mut GstPad, + sinkpad: *mut GstPad, + flags: GstPadLinkCheck, + ) -> GstPadLinkReturn; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_pad_link_maybe_ghosting(src: *mut GstPad, sink: *mut GstPad) -> gboolean; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_pad_link_maybe_ghosting_full(src: *mut GstPad, sink: *mut GstPad, flags: GstPadLinkCheck) -> gboolean; + pub fn gst_pad_link_maybe_ghosting_full( + src: *mut GstPad, + sink: *mut GstPad, + flags: GstPadLinkCheck, + ) -> gboolean; pub fn gst_pad_mark_reconfigure(pad: *mut GstPad); pub fn gst_pad_needs_reconfigure(pad: *mut GstPad) -> gboolean; pub fn gst_pad_pause_task(pad: *mut GstPad) -> gboolean; pub fn gst_pad_peer_query(pad: *mut GstPad, query: *mut GstQuery) -> gboolean; pub fn gst_pad_peer_query_accept_caps(pad: *mut GstPad, caps: *mut GstCaps) -> gboolean; pub fn gst_pad_peer_query_caps(pad: *mut GstPad, filter: *mut GstCaps) -> *mut GstCaps; - pub fn gst_pad_peer_query_convert(pad: *mut GstPad, src_format: GstFormat, src_val: i64, dest_format: GstFormat, dest_val: *mut i64) -> gboolean; - pub fn gst_pad_peer_query_duration(pad: *mut GstPad, format: GstFormat, duration: *mut i64) -> gboolean; - pub fn gst_pad_peer_query_position(pad: *mut GstPad, format: GstFormat, cur: *mut i64) -> gboolean; + pub fn gst_pad_peer_query_convert( + pad: *mut GstPad, + src_format: GstFormat, + src_val: i64, + dest_format: GstFormat, + dest_val: *mut i64, + ) -> gboolean; + pub fn gst_pad_peer_query_duration( + pad: *mut GstPad, + format: GstFormat, + duration: *mut i64, + ) -> gboolean; + pub fn gst_pad_peer_query_position( + pad: *mut GstPad, + format: GstFormat, + cur: *mut i64, + ) -> gboolean; pub fn gst_pad_proxy_query_accept_caps(pad: *mut GstPad, query: *mut GstQuery) -> gboolean; pub fn gst_pad_proxy_query_caps(pad: *mut GstPad, query: *mut GstQuery) -> gboolean; - pub fn gst_pad_pull_range(pad: *mut GstPad, offset: u64, size: c_uint, buffer: *mut *mut GstBuffer) -> GstFlowReturn; + pub fn gst_pad_pull_range( + pad: *mut GstPad, + offset: u64, + size: c_uint, + buffer: *mut *mut GstBuffer, + ) -> GstFlowReturn; pub fn gst_pad_push(pad: *mut GstPad, buffer: *mut GstBuffer) -> GstFlowReturn; pub fn gst_pad_push_event(pad: *mut GstPad, event: *mut GstEvent) -> gboolean; pub fn gst_pad_push_list(pad: *mut GstPad, list: *mut GstBufferList) -> GstFlowReturn; pub fn gst_pad_query(pad: *mut GstPad, query: *mut GstQuery) -> gboolean; pub fn gst_pad_query_accept_caps(pad: *mut GstPad, caps: *mut GstCaps) -> gboolean; pub fn gst_pad_query_caps(pad: *mut GstPad, filter: *mut GstCaps) -> *mut GstCaps; - pub fn gst_pad_query_convert(pad: *mut GstPad, src_format: GstFormat, src_val: i64, dest_format: GstFormat, dest_val: *mut i64) -> gboolean; - pub fn gst_pad_query_default(pad: *mut GstPad, parent: *mut GstObject, query: *mut GstQuery) -> gboolean; - pub fn gst_pad_query_duration(pad: *mut GstPad, format: GstFormat, duration: *mut i64) -> gboolean; + pub fn gst_pad_query_convert( + pad: *mut GstPad, + src_format: GstFormat, + src_val: i64, + dest_format: GstFormat, + dest_val: *mut i64, + ) -> gboolean; + pub fn gst_pad_query_default( + pad: *mut GstPad, + parent: *mut GstObject, + query: *mut GstQuery, + ) -> gboolean; + pub fn gst_pad_query_duration( + pad: *mut GstPad, + format: GstFormat, + duration: *mut i64, + ) -> gboolean; pub fn gst_pad_query_position(pad: *mut GstPad, format: GstFormat, cur: *mut i64) -> gboolean; pub fn gst_pad_remove_probe(pad: *mut GstPad, id: c_ulong); pub fn gst_pad_send_event(pad: *mut GstPad, event: *mut GstEvent) -> gboolean; - pub fn gst_pad_set_activate_function_full(pad: *mut GstPad, activate: GstPadActivateFunction, user_data: gpointer, notify: glib::GDestroyNotify); - pub fn gst_pad_set_activatemode_function_full(pad: *mut GstPad, activatemode: GstPadActivateModeFunction, user_data: gpointer, notify: glib::GDestroyNotify); + pub fn gst_pad_set_activate_function_full( + pad: *mut GstPad, + activate: GstPadActivateFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_set_activatemode_function_full( + pad: *mut GstPad, + activatemode: GstPadActivateModeFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); pub fn gst_pad_set_active(pad: *mut GstPad, active: gboolean) -> gboolean; - pub fn gst_pad_set_chain_function_full(pad: *mut GstPad, chain: GstPadChainFunction, user_data: gpointer, notify: glib::GDestroyNotify); - pub fn gst_pad_set_chain_list_function_full(pad: *mut GstPad, chainlist: GstPadChainListFunction, user_data: gpointer, notify: glib::GDestroyNotify); + pub fn gst_pad_set_chain_function_full( + pad: *mut GstPad, + chain: GstPadChainFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_set_chain_list_function_full( + pad: *mut GstPad, + chainlist: GstPadChainListFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); pub fn gst_pad_set_element_private(pad: *mut GstPad, priv_: gpointer); #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_pad_set_event_full_function_full(pad: *mut GstPad, event: GstPadEventFullFunction, user_data: gpointer, notify: glib::GDestroyNotify); - pub fn gst_pad_set_event_function_full(pad: *mut GstPad, event: GstPadEventFunction, user_data: gpointer, notify: glib::GDestroyNotify); - pub fn gst_pad_set_getrange_function_full(pad: *mut GstPad, get: GstPadGetRangeFunction, user_data: gpointer, notify: glib::GDestroyNotify); - pub fn gst_pad_set_iterate_internal_links_function_full(pad: *mut GstPad, iterintlink: GstPadIterIntLinkFunction, user_data: gpointer, notify: glib::GDestroyNotify); - pub fn gst_pad_set_link_function_full(pad: *mut GstPad, link: GstPadLinkFunction, user_data: gpointer, notify: glib::GDestroyNotify); + pub fn gst_pad_set_event_full_function_full( + pad: *mut GstPad, + event: GstPadEventFullFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_set_event_function_full( + pad: *mut GstPad, + event: GstPadEventFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_set_getrange_function_full( + pad: *mut GstPad, + get: GstPadGetRangeFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_set_iterate_internal_links_function_full( + pad: *mut GstPad, + iterintlink: GstPadIterIntLinkFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_set_link_function_full( + pad: *mut GstPad, + link: GstPadLinkFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); pub fn gst_pad_set_offset(pad: *mut GstPad, offset: i64); - pub fn gst_pad_set_query_function_full(pad: *mut GstPad, query: GstPadQueryFunction, user_data: gpointer, notify: glib::GDestroyNotify); - pub fn gst_pad_set_unlink_function_full(pad: *mut GstPad, unlink: GstPadUnlinkFunction, user_data: gpointer, notify: glib::GDestroyNotify); - pub fn gst_pad_start_task(pad: *mut GstPad, func: GstTaskFunction, user_data: gpointer, notify: glib::GDestroyNotify) -> gboolean; - pub fn gst_pad_sticky_events_foreach(pad: *mut GstPad, foreach_func: GstPadStickyEventsForeachFunction, user_data: gpointer); + pub fn gst_pad_set_query_function_full( + pad: *mut GstPad, + query: GstPadQueryFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_set_unlink_function_full( + pad: *mut GstPad, + unlink: GstPadUnlinkFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_start_task( + pad: *mut GstPad, + func: GstTaskFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> gboolean; + pub fn gst_pad_sticky_events_foreach( + pad: *mut GstPad, + foreach_func: GstPadStickyEventsForeachFunction, + user_data: gpointer, + ); pub fn gst_pad_stop_task(pad: *mut GstPad) -> gboolean; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_pad_store_sticky_event(pad: *mut GstPad, event: *mut GstEvent) -> GstFlowReturn; @@ -5602,11 +7838,25 @@ extern "C" { // GstPadTemplate //========================================================================= pub fn gst_pad_template_get_type() -> GType; - pub fn gst_pad_template_new(name_template: *const c_char, direction: GstPadDirection, presence: GstPadPresence, caps: *mut GstCaps) -> *mut GstPadTemplate; + pub fn gst_pad_template_new( + name_template: *const c_char, + direction: GstPadDirection, + presence: GstPadPresence, + caps: *mut GstCaps, + ) -> *mut GstPadTemplate; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_pad_template_new_from_static_pad_template_with_gtype(pad_template: *mut GstStaticPadTemplate, pad_type: GType) -> *mut GstPadTemplate; + pub fn gst_pad_template_new_from_static_pad_template_with_gtype( + pad_template: *mut GstStaticPadTemplate, + pad_type: GType, + ) -> *mut GstPadTemplate; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_pad_template_new_with_gtype(name_template: *const c_char, direction: GstPadDirection, presence: GstPadPresence, caps: *mut GstCaps, pad_type: GType) -> *mut GstPadTemplate; + pub fn gst_pad_template_new_with_gtype( + name_template: *const c_char, + direction: GstPadDirection, + presence: GstPadPresence, + caps: *mut GstCaps, + pad_type: GType, + ) -> *mut GstPadTemplate; pub fn gst_pad_template_get_caps(templ: *mut GstPadTemplate) -> *mut GstCaps; pub fn gst_pad_template_pad_created(templ: *mut GstPadTemplate, pad: *mut GstPad); @@ -5647,11 +7897,49 @@ extern "C" { pub fn gst_plugin_get_type() -> GType; pub fn gst_plugin_list_free(list: *mut glib::GList); pub fn gst_plugin_load_by_name(name: *const c_char) -> *mut GstPlugin; - pub fn gst_plugin_load_file(filename: *const c_char, error: *mut *mut glib::GError) -> *mut GstPlugin; - pub fn gst_plugin_register_static(major_version: c_int, minor_version: c_int, name: *const c_char, description: *const c_char, init_func: GstPluginInitFunc, version: *const c_char, license: *const c_char, source: *const c_char, package: *const c_char, origin: *const c_char) -> gboolean; - pub fn gst_plugin_register_static_full(major_version: c_int, minor_version: c_int, name: *const c_char, description: *const c_char, init_full_func: GstPluginInitFullFunc, version: *const c_char, license: *const c_char, source: *const c_char, package: *const c_char, origin: *const c_char, user_data: gpointer) -> gboolean; - pub fn gst_plugin_add_dependency(plugin: *mut GstPlugin, env_vars: *mut *const c_char, paths: *mut *const c_char, names: *mut *const c_char, flags: GstPluginDependencyFlags); - pub fn gst_plugin_add_dependency_simple(plugin: *mut GstPlugin, env_vars: *const c_char, paths: *const c_char, names: *const c_char, flags: GstPluginDependencyFlags); + pub fn gst_plugin_load_file( + filename: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GstPlugin; + pub fn gst_plugin_register_static( + major_version: c_int, + minor_version: c_int, + name: *const c_char, + description: *const c_char, + init_func: GstPluginInitFunc, + version: *const c_char, + license: *const c_char, + source: *const c_char, + package: *const c_char, + origin: *const c_char, + ) -> gboolean; + pub fn gst_plugin_register_static_full( + major_version: c_int, + minor_version: c_int, + name: *const c_char, + description: *const c_char, + init_full_func: GstPluginInitFullFunc, + version: *const c_char, + license: *const c_char, + source: *const c_char, + package: *const c_char, + origin: *const c_char, + user_data: gpointer, + ) -> gboolean; + pub fn gst_plugin_add_dependency( + plugin: *mut GstPlugin, + env_vars: *mut *const c_char, + paths: *mut *const c_char, + names: *mut *const c_char, + flags: GstPluginDependencyFlags, + ); + pub fn gst_plugin_add_dependency_simple( + plugin: *mut GstPlugin, + env_vars: *const c_char, + paths: *const c_char, + names: *const c_char, + flags: GstPluginDependencyFlags, + ); pub fn gst_plugin_get_cache_data(plugin: *mut GstPlugin) -> *const GstStructure; pub fn gst_plugin_get_description(plugin: *mut GstPlugin) -> *const c_char; pub fn gst_plugin_get_filename(plugin: *mut GstPlugin) -> *const c_char; @@ -5674,7 +7962,12 @@ extern "C" { pub fn gst_plugin_feature_list_debug(list: *mut glib::GList); pub fn gst_plugin_feature_list_free(list: *mut glib::GList); pub fn gst_plugin_feature_rank_compare_func(p1: gconstpointer, p2: gconstpointer) -> c_int; - pub fn gst_plugin_feature_check_version(feature: *mut GstPluginFeature, min_major: c_uint, min_minor: c_uint, min_micro: c_uint) -> gboolean; + pub fn gst_plugin_feature_check_version( + feature: *mut GstPluginFeature, + min_major: c_uint, + min_minor: c_uint, + min_micro: c_uint, + ) -> gboolean; pub fn gst_plugin_feature_get_plugin(feature: *mut GstPluginFeature) -> *mut GstPlugin; #[cfg(any(feature = "v1_2", feature = "dox"))] pub fn gst_plugin_feature_get_plugin_name(feature: *mut GstPluginFeature) -> *const c_char; @@ -5686,10 +7979,27 @@ extern "C" { // GstProxyPad //========================================================================= pub fn gst_proxy_pad_get_type() -> GType; - pub fn gst_proxy_pad_chain_default(pad: *mut GstPad, parent: *mut GstObject, buffer: *mut GstBuffer) -> GstFlowReturn; - pub fn gst_proxy_pad_chain_list_default(pad: *mut GstPad, parent: *mut GstObject, list: *mut GstBufferList) -> GstFlowReturn; - pub fn gst_proxy_pad_getrange_default(pad: *mut GstPad, parent: *mut GstObject, offset: u64, size: c_uint, buffer: *mut *mut GstBuffer) -> GstFlowReturn; - pub fn gst_proxy_pad_iterate_internal_links_default(pad: *mut GstPad, parent: *mut GstObject) -> *mut GstIterator; + pub fn gst_proxy_pad_chain_default( + pad: *mut GstPad, + parent: *mut GstObject, + buffer: *mut GstBuffer, + ) -> GstFlowReturn; + pub fn gst_proxy_pad_chain_list_default( + pad: *mut GstPad, + parent: *mut GstObject, + list: *mut GstBufferList, + ) -> GstFlowReturn; + pub fn gst_proxy_pad_getrange_default( + pad: *mut GstPad, + parent: *mut GstObject, + offset: u64, + size: c_uint, + buffer: *mut *mut GstBuffer, + ) -> GstFlowReturn; + pub fn gst_proxy_pad_iterate_internal_links_default( + pad: *mut GstPad, + parent: *mut GstObject, + ) -> *mut GstIterator; pub fn gst_proxy_pad_get_internal(pad: *mut GstProxyPad) -> *mut GstProxyPad; //========================================================================= @@ -5699,19 +8009,57 @@ extern "C" { pub fn gst_registry_fork_is_enabled() -> gboolean; pub fn gst_registry_fork_set_enabled(enabled: gboolean); pub fn gst_registry_get() -> *mut GstRegistry; - pub fn gst_registry_add_feature(registry: *mut GstRegistry, feature: *mut GstPluginFeature) -> gboolean; + pub fn gst_registry_add_feature( + registry: *mut GstRegistry, + feature: *mut GstPluginFeature, + ) -> gboolean; pub fn gst_registry_add_plugin(registry: *mut GstRegistry, plugin: *mut GstPlugin) -> gboolean; - pub fn gst_registry_check_feature_version(registry: *mut GstRegistry, feature_name: *const c_char, min_major: c_uint, min_minor: c_uint, min_micro: c_uint) -> gboolean; - pub fn gst_registry_feature_filter(registry: *mut GstRegistry, filter: GstPluginFeatureFilter, first: gboolean, user_data: gpointer) -> *mut glib::GList; - pub fn gst_registry_find_feature(registry: *mut GstRegistry, name: *const c_char, type_: GType) -> *mut GstPluginFeature; - pub fn gst_registry_find_plugin(registry: *mut GstRegistry, name: *const c_char) -> *mut GstPlugin; - pub fn gst_registry_get_feature_list(registry: *mut GstRegistry, type_: GType) -> *mut glib::GList; - pub fn gst_registry_get_feature_list_by_plugin(registry: *mut GstRegistry, name: *const c_char) -> *mut glib::GList; + pub fn gst_registry_check_feature_version( + registry: *mut GstRegistry, + feature_name: *const c_char, + min_major: c_uint, + min_minor: c_uint, + min_micro: c_uint, + ) -> gboolean; + pub fn gst_registry_feature_filter( + registry: *mut GstRegistry, + filter: GstPluginFeatureFilter, + first: gboolean, + user_data: gpointer, + ) -> *mut glib::GList; + pub fn gst_registry_find_feature( + registry: *mut GstRegistry, + name: *const c_char, + type_: GType, + ) -> *mut GstPluginFeature; + pub fn gst_registry_find_plugin( + registry: *mut GstRegistry, + name: *const c_char, + ) -> *mut GstPlugin; + pub fn gst_registry_get_feature_list( + registry: *mut GstRegistry, + type_: GType, + ) -> *mut glib::GList; + pub fn gst_registry_get_feature_list_by_plugin( + registry: *mut GstRegistry, + name: *const c_char, + ) -> *mut glib::GList; pub fn gst_registry_get_feature_list_cookie(registry: *mut GstRegistry) -> u32; pub fn gst_registry_get_plugin_list(registry: *mut GstRegistry) -> *mut glib::GList; - pub fn gst_registry_lookup(registry: *mut GstRegistry, filename: *const c_char) -> *mut GstPlugin; - pub fn gst_registry_lookup_feature(registry: *mut GstRegistry, name: *const c_char) -> *mut GstPluginFeature; - pub fn gst_registry_plugin_filter(registry: *mut GstRegistry, filter: GstPluginFilter, first: gboolean, user_data: gpointer) -> *mut glib::GList; + pub fn gst_registry_lookup( + registry: *mut GstRegistry, + filename: *const c_char, + ) -> *mut GstPlugin; + pub fn gst_registry_lookup_feature( + registry: *mut GstRegistry, + name: *const c_char, + ) -> *mut GstPluginFeature; + pub fn gst_registry_plugin_filter( + registry: *mut GstRegistry, + filter: GstPluginFilter, + first: gboolean, + user_data: gpointer, + ) -> *mut glib::GList; pub fn gst_registry_remove_feature(registry: *mut GstRegistry, feature: *mut GstPluginFeature); pub fn gst_registry_remove_plugin(registry: *mut GstRegistry, plugin: *mut GstPlugin); pub fn gst_registry_scan_path(registry: *mut GstRegistry, path: *const c_char) -> gboolean; @@ -5721,7 +8069,12 @@ extern "C" { //========================================================================= pub fn gst_stream_get_type() -> GType; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_stream_new(stream_id: *const c_char, caps: *mut GstCaps, type_: GstStreamType, flags: GstStreamFlags) -> *mut GstStream; + pub fn gst_stream_new( + stream_id: *const c_char, + caps: *mut GstCaps, + type_: GstStreamType, + flags: GstStreamFlags, + ) -> *mut GstStream; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_stream_get_caps(stream: *mut GstStream) -> *mut GstCaps; #[cfg(any(feature = "v1_10", feature = "dox"))] @@ -5748,13 +8101,21 @@ extern "C" { #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_stream_collection_new(upstream_id: *const c_char) -> *mut GstStreamCollection; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_stream_collection_add_stream(collection: *mut GstStreamCollection, stream: *mut GstStream) -> gboolean; + pub fn gst_stream_collection_add_stream( + collection: *mut GstStreamCollection, + stream: *mut GstStream, + ) -> gboolean; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_stream_collection_get_size(collection: *mut GstStreamCollection) -> c_uint; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_stream_collection_get_stream(collection: *mut GstStreamCollection, index: c_uint) -> *mut GstStream; + pub fn gst_stream_collection_get_stream( + collection: *mut GstStreamCollection, + index: c_uint, + ) -> *mut GstStream; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_stream_collection_get_upstream_id(collection: *mut GstStreamCollection) -> *const c_char; + pub fn gst_stream_collection_get_upstream_id( + collection: *mut GstStreamCollection, + ) -> *const c_char; //========================================================================= // GstSystemClock @@ -5768,14 +8129,28 @@ extern "C" { // GstTask //========================================================================= pub fn gst_task_get_type() -> GType; - pub fn gst_task_new(func: GstTaskFunction, user_data: gpointer, notify: glib::GDestroyNotify) -> *mut GstTask; + pub fn gst_task_new( + func: GstTaskFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstTask; pub fn gst_task_cleanup_all(); pub fn gst_task_get_pool(task: *mut GstTask) -> *mut GstTaskPool; pub fn gst_task_get_state(task: *mut GstTask) -> GstTaskState; pub fn gst_task_join(task: *mut GstTask) -> gboolean; pub fn gst_task_pause(task: *mut GstTask) -> gboolean; - pub fn gst_task_set_enter_callback(task: *mut GstTask, enter_func: GstTaskThreadFunc, user_data: gpointer, notify: glib::GDestroyNotify); - pub fn gst_task_set_leave_callback(task: *mut GstTask, leave_func: GstTaskThreadFunc, user_data: gpointer, notify: glib::GDestroyNotify); + pub fn gst_task_set_enter_callback( + task: *mut GstTask, + enter_func: GstTaskThreadFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_task_set_leave_callback( + task: *mut GstTask, + leave_func: GstTaskThreadFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); pub fn gst_task_set_lock(task: *mut GstTask, mutex: *mut glib::GRecMutex); pub fn gst_task_set_pool(task: *mut GstTask, pool: *mut GstTaskPool); pub fn gst_task_set_state(task: *mut GstTask, state: GstTaskState) -> gboolean; @@ -5790,7 +8165,12 @@ extern "C" { pub fn gst_task_pool_cleanup(pool: *mut GstTaskPool); pub fn gst_task_pool_join(pool: *mut GstTaskPool, id: gpointer); pub fn gst_task_pool_prepare(pool: *mut GstTaskPool, error: *mut *mut glib::GError); - pub fn gst_task_pool_push(pool: *mut GstTaskPool, func: GstTaskPoolFunction, user_data: gpointer, error: *mut *mut glib::GError) -> gpointer; + pub fn gst_task_pool_push( + pool: *mut GstTaskPool, + func: GstTaskPoolFunction, + user_data: gpointer, + error: *mut *mut glib::GError, + ) -> gpointer; //========================================================================= // GstTracer @@ -5816,9 +8196,14 @@ extern "C" { //========================================================================= pub fn gst_type_find_factory_get_type() -> GType; pub fn gst_type_find_factory_get_list() -> *mut glib::GList; - pub fn gst_type_find_factory_call_function(factory: *mut GstTypeFindFactory, find: *mut GstTypeFind); + pub fn gst_type_find_factory_call_function( + factory: *mut GstTypeFindFactory, + find: *mut GstTypeFind, + ); pub fn gst_type_find_factory_get_caps(factory: *mut GstTypeFindFactory) -> *mut GstCaps; - pub fn gst_type_find_factory_get_extensions(factory: *mut GstTypeFindFactory) -> *const *const c_char; + pub fn gst_type_find_factory_get_extensions( + factory: *mut GstTypeFindFactory, + ) -> *const *const c_char; pub fn gst_type_find_factory_has_function(factory: *mut GstTypeFindFactory) -> gboolean; //========================================================================= @@ -5826,40 +8211,99 @@ extern "C" { //========================================================================= pub fn gst_value_array_get_type() -> GType; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_value_array_append_and_take_value(value: *mut gobject::GValue, append_value: *mut gobject::GValue); - pub fn gst_value_array_append_value(value: *mut gobject::GValue, append_value: *const gobject::GValue); + pub fn gst_value_array_append_and_take_value( + value: *mut gobject::GValue, + append_value: *mut gobject::GValue, + ); + pub fn gst_value_array_append_value( + value: *mut gobject::GValue, + append_value: *const gobject::GValue, + ); pub fn gst_value_array_get_size(value: *const gobject::GValue) -> c_uint; - pub fn gst_value_array_get_value(value: *const gobject::GValue, index: c_uint) -> *const gobject::GValue; - pub fn gst_value_array_prepend_value(value: *mut gobject::GValue, prepend_value: *const gobject::GValue); + pub fn gst_value_array_get_value( + value: *const gobject::GValue, + index: c_uint, + ) -> *const gobject::GValue; + pub fn gst_value_array_prepend_value( + value: *mut gobject::GValue, + prepend_value: *const gobject::GValue, + ); //========================================================================= // GstValueList //========================================================================= pub fn gst_value_list_get_type() -> GType; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_value_list_append_and_take_value(value: *mut gobject::GValue, append_value: *mut gobject::GValue); - pub fn gst_value_list_append_value(value: *mut gobject::GValue, append_value: *const gobject::GValue); - pub fn gst_value_list_concat(dest: *mut gobject::GValue, value1: *const gobject::GValue, value2: *const gobject::GValue); + pub fn gst_value_list_append_and_take_value( + value: *mut gobject::GValue, + append_value: *mut gobject::GValue, + ); + pub fn gst_value_list_append_value( + value: *mut gobject::GValue, + append_value: *const gobject::GValue, + ); + pub fn gst_value_list_concat( + dest: *mut gobject::GValue, + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ); pub fn gst_value_list_get_size(value: *const gobject::GValue) -> c_uint; - pub fn gst_value_list_get_value(value: *const gobject::GValue, index: c_uint) -> *const gobject::GValue; - pub fn gst_value_list_merge(dest: *mut gobject::GValue, value1: *const gobject::GValue, value2: *const gobject::GValue); - pub fn gst_value_list_prepend_value(value: *mut gobject::GValue, prepend_value: *const gobject::GValue); + pub fn gst_value_list_get_value( + value: *const gobject::GValue, + index: c_uint, + ) -> *const gobject::GValue; + pub fn gst_value_list_merge( + dest: *mut gobject::GValue, + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ); + pub fn gst_value_list_prepend_value( + value: *mut gobject::GValue, + prepend_value: *const gobject::GValue, + ); //========================================================================= // GstChildProxy //========================================================================= pub fn gst_child_proxy_get_type() -> GType; - pub fn gst_child_proxy_child_added(parent: *mut GstChildProxy, child: *mut gobject::GObject, name: *const c_char); - pub fn gst_child_proxy_child_removed(parent: *mut GstChildProxy, child: *mut gobject::GObject, name: *const c_char); + pub fn gst_child_proxy_child_added( + parent: *mut GstChildProxy, + child: *mut gobject::GObject, + name: *const c_char, + ); + pub fn gst_child_proxy_child_removed( + parent: *mut GstChildProxy, + child: *mut gobject::GObject, + name: *const c_char, + ); pub fn gst_child_proxy_get(object: *mut GstChildProxy, first_property_name: *const c_char, ...); - pub fn gst_child_proxy_get_child_by_index(parent: *mut GstChildProxy, index: c_uint) -> *mut gobject::GObject; - pub fn gst_child_proxy_get_child_by_name(parent: *mut GstChildProxy, name: *const c_char) -> *mut gobject::GObject; + pub fn gst_child_proxy_get_child_by_index( + parent: *mut GstChildProxy, + index: c_uint, + ) -> *mut gobject::GObject; + pub fn gst_child_proxy_get_child_by_name( + parent: *mut GstChildProxy, + name: *const c_char, + ) -> *mut gobject::GObject; pub fn gst_child_proxy_get_children_count(parent: *mut GstChildProxy) -> c_uint; - pub fn gst_child_proxy_get_property(object: *mut GstChildProxy, name: *const c_char, value: *mut gobject::GValue); + pub fn gst_child_proxy_get_property( + object: *mut GstChildProxy, + name: *const c_char, + value: *mut gobject::GValue, + ); //pub fn gst_child_proxy_get_valist(object: *mut GstChildProxy, first_property_name: *const c_char, var_args: /*Unimplemented*/va_list); - pub fn gst_child_proxy_lookup(object: *mut GstChildProxy, name: *const c_char, target: *mut *mut gobject::GObject, pspec: *mut *mut gobject::GParamSpec) -> gboolean; + pub fn gst_child_proxy_lookup( + object: *mut GstChildProxy, + name: *const c_char, + target: *mut *mut gobject::GObject, + pspec: *mut *mut gobject::GParamSpec, + ) -> gboolean; pub fn gst_child_proxy_set(object: *mut GstChildProxy, first_property_name: *const c_char, ...); - pub fn gst_child_proxy_set_property(object: *mut GstChildProxy, name: *const c_char, value: *const gobject::GValue); + pub fn gst_child_proxy_set_property( + object: *mut GstChildProxy, + name: *const c_char, + value: *const gobject::GValue, + ); //pub fn gst_child_proxy_set_valist(object: *mut GstChildProxy, first_property_name: *const c_char, var_args: /*Unimplemented*/va_list); //========================================================================= @@ -5869,15 +8313,29 @@ extern "C" { pub fn gst_preset_get_app_dir() -> *const c_char; pub fn gst_preset_set_app_dir(app_dir: *const c_char) -> gboolean; pub fn gst_preset_delete_preset(preset: *mut GstPreset, name: *const c_char) -> gboolean; - pub fn gst_preset_get_meta(preset: *mut GstPreset, name: *const c_char, tag: *const c_char, value: *mut *mut c_char) -> gboolean; + pub fn gst_preset_get_meta( + preset: *mut GstPreset, + name: *const c_char, + tag: *const c_char, + value: *mut *mut c_char, + ) -> gboolean; pub fn gst_preset_get_preset_names(preset: *mut GstPreset) -> *mut *mut c_char; pub fn gst_preset_get_property_names(preset: *mut GstPreset) -> *mut *mut c_char; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_preset_is_editable(preset: *mut GstPreset) -> gboolean; pub fn gst_preset_load_preset(preset: *mut GstPreset, name: *const c_char) -> gboolean; - pub fn gst_preset_rename_preset(preset: *mut GstPreset, old_name: *const c_char, new_name: *const c_char) -> gboolean; + pub fn gst_preset_rename_preset( + preset: *mut GstPreset, + old_name: *const c_char, + new_name: *const c_char, + ) -> gboolean; pub fn gst_preset_save_preset(preset: *mut GstPreset, name: *const c_char) -> gboolean; - pub fn gst_preset_set_meta(preset: *mut GstPreset, name: *const c_char, tag: *const c_char, value: *const c_char) -> gboolean; + pub fn gst_preset_set_meta( + preset: *mut GstPreset, + name: *const c_char, + tag: *const c_char, + value: *const c_char, + ) -> gboolean; //========================================================================= // GstTagSetter @@ -5885,12 +8343,31 @@ extern "C" { pub fn gst_tag_setter_get_type() -> GType; //pub fn gst_tag_setter_add_tag_valist(setter: *mut GstTagSetter, mode: GstTagMergeMode, tag: *const c_char, var_args: /*Unimplemented*/va_list); //pub fn gst_tag_setter_add_tag_valist_values(setter: *mut GstTagSetter, mode: GstTagMergeMode, tag: *const c_char, var_args: /*Unimplemented*/va_list); - pub fn gst_tag_setter_add_tag_value(setter: *mut GstTagSetter, mode: GstTagMergeMode, tag: *const c_char, value: *const gobject::GValue); - pub fn gst_tag_setter_add_tag_values(setter: *mut GstTagSetter, mode: GstTagMergeMode, tag: *const c_char, ...); - pub fn gst_tag_setter_add_tags(setter: *mut GstTagSetter, mode: GstTagMergeMode, tag: *const c_char, ...); + pub fn gst_tag_setter_add_tag_value( + setter: *mut GstTagSetter, + mode: GstTagMergeMode, + tag: *const c_char, + value: *const gobject::GValue, + ); + pub fn gst_tag_setter_add_tag_values( + setter: *mut GstTagSetter, + mode: GstTagMergeMode, + tag: *const c_char, + ... + ); + pub fn gst_tag_setter_add_tags( + setter: *mut GstTagSetter, + mode: GstTagMergeMode, + tag: *const c_char, + ... + ); pub fn gst_tag_setter_get_tag_list(setter: *mut GstTagSetter) -> *const GstTagList; pub fn gst_tag_setter_get_tag_merge_mode(setter: *mut GstTagSetter) -> GstTagMergeMode; - pub fn gst_tag_setter_merge_tags(setter: *mut GstTagSetter, list: *const GstTagList, mode: GstTagMergeMode); + pub fn gst_tag_setter_merge_tags( + setter: *mut GstTagSetter, + list: *const GstTagList, + mode: GstTagMergeMode, + ); pub fn gst_tag_setter_reset_tags(setter: *mut GstTagSetter); pub fn gst_tag_setter_set_tag_merge_mode(setter: *mut GstTagSetter, mode: GstTagMergeMode); @@ -5909,25 +8386,53 @@ extern "C" { pub fn gst_uri_handler_get_protocols(handler: *mut GstURIHandler) -> *const *const c_char; pub fn gst_uri_handler_get_uri(handler: *mut GstURIHandler) -> *mut c_char; pub fn gst_uri_handler_get_uri_type(handler: *mut GstURIHandler) -> GstURIType; - pub fn gst_uri_handler_set_uri(handler: *mut GstURIHandler, uri: *const c_char, error: *mut *mut glib::GError) -> gboolean; + pub fn gst_uri_handler_set_uri( + handler: *mut GstURIHandler, + uri: *const c_char, + error: *mut *mut glib::GError, + ) -> gboolean; //========================================================================= // Other functions //========================================================================= #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_calculate_linear_regression(xy: *const GstClockTime, temp: *mut GstClockTime, n: c_uint, m_num: *mut GstClockTime, m_denom: *mut GstClockTime, b: *mut GstClockTime, xbase: *mut GstClockTime, r_squared: *mut c_double) -> gboolean; + pub fn gst_calculate_linear_regression( + xy: *const GstClockTime, + temp: *mut GstClockTime, + n: c_uint, + m_num: *mut GstClockTime, + m_denom: *mut GstClockTime, + b: *mut GstClockTime, + xbase: *mut GstClockTime, + r_squared: *mut c_double, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_clear_mini_object(object_ptr: *mut *mut GstMiniObject); #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_clear_object(object_ptr: *mut *mut GstObject); #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_clear_structure(structure_ptr: *mut *mut GstStructure); - pub fn gst_debug_add_log_function(func: GstLogFunction, user_data: gpointer, notify: glib::GDestroyNotify); + pub fn gst_debug_add_log_function( + func: GstLogFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_debug_add_ring_buffer_logger(max_size_per_thread: c_uint, thread_timeout: c_uint); - pub fn gst_debug_bin_to_dot_data(bin: *mut GstBin, details: GstDebugGraphDetails) -> *mut c_char; - pub fn gst_debug_bin_to_dot_file(bin: *mut GstBin, details: GstDebugGraphDetails, file_name: *const c_char); - pub fn gst_debug_bin_to_dot_file_with_ts(bin: *mut GstBin, details: GstDebugGraphDetails, file_name: *const c_char); + pub fn gst_debug_bin_to_dot_data( + bin: *mut GstBin, + details: GstDebugGraphDetails, + ) -> *mut c_char; + pub fn gst_debug_bin_to_dot_file( + bin: *mut GstBin, + details: GstDebugGraphDetails, + file_name: *const c_char, + ); + pub fn gst_debug_bin_to_dot_file_with_ts( + bin: *mut GstBin, + details: GstDebugGraphDetails, + file_name: *const c_char, + ); pub fn gst_debug_construct_term_color(colorinfo: c_uint) -> *mut c_char; pub fn gst_debug_construct_win_color(colorinfo: c_uint) -> c_int; pub fn gst_debug_get_all_categories() -> *mut glib::GSList; @@ -5938,8 +8443,26 @@ extern "C" { pub fn gst_debug_get_stack_trace(flags: GstStackTraceFlags) -> *mut c_char; pub fn gst_debug_is_active() -> gboolean; pub fn gst_debug_is_colored() -> gboolean; - pub fn gst_debug_log(category: *mut GstDebugCategory, level: GstDebugLevel, file: *const c_char, function: *const c_char, line: c_int, object: *mut gobject::GObject, format: *const c_char, ...); - pub fn gst_debug_log_default(category: *mut GstDebugCategory, level: GstDebugLevel, file: *const c_char, function: *const c_char, line: c_int, object: *mut gobject::GObject, message: *mut GstDebugMessage, user_data: gpointer); + pub fn gst_debug_log( + category: *mut GstDebugCategory, + level: GstDebugLevel, + file: *const c_char, + function: *const c_char, + line: c_int, + object: *mut gobject::GObject, + format: *const c_char, + ... + ); + pub fn gst_debug_log_default( + category: *mut GstDebugCategory, + level: GstDebugLevel, + file: *const c_char, + function: *const c_char, + line: c_int, + object: *mut gobject::GObject, + message: *mut GstDebugMessage, + user_data: gpointer, + ); //pub fn gst_debug_log_valist(category: *mut GstDebugCategory, level: GstDebugLevel, file: *const c_char, function: *const c_char, line: c_int, object: *mut gobject::GObject, format: *const c_char, args: /*Unimplemented*/va_list); pub fn gst_debug_print_stack_trace(); pub fn gst_debug_remove_log_function(func: GstLogFunction) -> c_uint; @@ -5962,7 +8485,10 @@ extern "C" { pub fn gst_deinit(); pub fn gst_dynamic_type_register(plugin: *mut GstPlugin, type_: GType) -> gboolean; pub fn gst_error_get_message(domain: glib::GQuark, code: c_int) -> *mut c_char; - pub fn gst_filename_to_uri(filename: *const c_char, error: *mut *mut glib::GError) -> *mut c_char; + pub fn gst_filename_to_uri( + filename: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut c_char; pub fn gst_flow_get_name(ret: GstFlowReturn) -> *const c_char; pub fn gst_flow_to_quark(ret: GstFlowReturn) -> glib::GQuark; pub fn gst_formats_contains(formats: *const GstFormat, format: GstFormat) -> gboolean; @@ -5975,21 +8501,68 @@ extern "C" { //#[cfg(any(feature = "v1_8", feature = "dox"))] //pub fn gst_info_vasprintf(result: *mut *mut c_char, format: *const c_char, args: /*Unimplemented*/va_list) -> c_int; pub fn gst_init(argc: *mut c_int, argv: *mut *mut *mut c_char); - pub fn gst_init_check(argc: *mut c_int, argv: *mut *mut *mut c_char, error: *mut *mut glib::GError) -> gboolean; + pub fn gst_init_check( + argc: *mut c_int, + argv: *mut *mut *mut c_char, + error: *mut *mut glib::GError, + ) -> gboolean; pub fn gst_init_get_option_group() -> *mut glib::GOptionGroup; pub fn gst_is_caps_features(obj: gconstpointer) -> gboolean; pub fn gst_is_initialized() -> gboolean; pub fn gst_make_element_message_details(name: *const c_char, ...) -> *mut GstStructure; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_param_spec_array(name: *const c_char, nick: *const c_char, blurb: *const c_char, element_spec: *mut gobject::GParamSpec, flags: gobject::GParamFlags) -> *mut gobject::GParamSpec; - pub fn gst_param_spec_fraction(name: *const c_char, nick: *const c_char, blurb: *const c_char, min_num: c_int, min_denom: c_int, max_num: c_int, max_denom: c_int, default_num: c_int, default_denom: c_int, flags: gobject::GParamFlags) -> *mut gobject::GParamSpec; + pub fn gst_param_spec_array( + name: *const c_char, + nick: *const c_char, + blurb: *const c_char, + element_spec: *mut gobject::GParamSpec, + flags: gobject::GParamFlags, + ) -> *mut gobject::GParamSpec; + pub fn gst_param_spec_fraction( + name: *const c_char, + nick: *const c_char, + blurb: *const c_char, + min_num: c_int, + min_denom: c_int, + max_num: c_int, + max_denom: c_int, + default_num: c_int, + default_denom: c_int, + flags: gobject::GParamFlags, + ) -> *mut gobject::GParamSpec; pub fn gst_parent_buffer_meta_api_get_type() -> GType; - pub fn gst_parse_bin_from_description(bin_description: *const c_char, ghost_unlinked_pads: gboolean, error: *mut *mut glib::GError) -> *mut GstBin; - pub fn gst_parse_bin_from_description_full(bin_description: *const c_char, ghost_unlinked_pads: gboolean, context: *mut GstParseContext, flags: GstParseFlags, error: *mut *mut glib::GError) -> *mut GstElement; - pub fn gst_parse_launch(pipeline_description: *const c_char, error: *mut *mut glib::GError) -> *mut GstElement; - pub fn gst_parse_launch_full(pipeline_description: *const c_char, context: *mut GstParseContext, flags: GstParseFlags, error: *mut *mut glib::GError) -> *mut GstElement; - pub fn gst_parse_launchv(argv: *mut *const c_char, error: *mut *mut glib::GError) -> *mut GstElement; - pub fn gst_parse_launchv_full(argv: *mut *const c_char, context: *mut GstParseContext, flags: GstParseFlags, error: *mut *mut glib::GError) -> *mut GstElement; + pub fn gst_parse_bin_from_description( + bin_description: *const c_char, + ghost_unlinked_pads: gboolean, + error: *mut *mut glib::GError, + ) -> *mut GstBin; + pub fn gst_parse_bin_from_description_full( + bin_description: *const c_char, + ghost_unlinked_pads: gboolean, + context: *mut GstParseContext, + flags: GstParseFlags, + error: *mut *mut glib::GError, + ) -> *mut GstElement; + pub fn gst_parse_launch( + pipeline_description: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GstElement; + pub fn gst_parse_launch_full( + pipeline_description: *const c_char, + context: *mut GstParseContext, + flags: GstParseFlags, + error: *mut *mut glib::GError, + ) -> *mut GstElement; + pub fn gst_parse_launchv( + argv: *mut *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GstElement; + pub fn gst_parse_launchv_full( + argv: *mut *const c_char, + context: *mut GstParseContext, + flags: GstParseFlags, + error: *mut *mut glib::GError, + ) -> *mut GstElement; #[cfg(any(feature = "v1_12", feature = "dox"))] pub fn gst_print(format: *const c_char, ...); #[cfg(any(feature = "v1_12", feature = "dox"))] @@ -5999,7 +8572,9 @@ extern "C" { #[cfg(any(feature = "v1_12", feature = "dox"))] pub fn gst_println(format: *const c_char, ...); #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_protection_filter_systems_by_available_decryptors(system_identifiers: *mut *const c_char) -> *mut *mut c_char; + pub fn gst_protection_filter_systems_by_available_decryptors( + system_identifiers: *mut *const c_char, + ) -> *mut *mut c_char; pub fn gst_protection_meta_api_get_type() -> GType; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_protection_select_system(system_identifiers: *mut *const c_char) -> *const c_char; @@ -6014,24 +8589,67 @@ extern "C" { pub fn gst_tag_get_nick(tag: *const c_char) -> *const c_char; pub fn gst_tag_get_type(tag: *const c_char) -> GType; pub fn gst_tag_is_fixed(tag: *const c_char) -> gboolean; - pub fn gst_tag_merge_strings_with_comma(dest: *mut gobject::GValue, src: *const gobject::GValue); + pub fn gst_tag_merge_strings_with_comma( + dest: *mut gobject::GValue, + src: *const gobject::GValue, + ); pub fn gst_tag_merge_use_first(dest: *mut gobject::GValue, src: *const gobject::GValue); - pub fn gst_tag_register(name: *const c_char, flag: GstTagFlag, type_: GType, nick: *const c_char, blurb: *const c_char, func: GstTagMergeFunc); - pub fn gst_tag_register_static(name: *const c_char, flag: GstTagFlag, type_: GType, nick: *const c_char, blurb: *const c_char, func: GstTagMergeFunc); + pub fn gst_tag_register( + name: *const c_char, + flag: GstTagFlag, + type_: GType, + nick: *const c_char, + blurb: *const c_char, + func: GstTagMergeFunc, + ); + pub fn gst_tag_register_static( + name: *const c_char, + flag: GstTagFlag, + type_: GType, + nick: *const c_char, + blurb: *const c_char, + func: GstTagMergeFunc, + ); pub fn gst_type_find_get_type() -> GType; pub fn gst_update_registry() -> gboolean; - pub fn gst_util_array_binary_search(array: gpointer, num_elements: c_uint, element_size: size_t, search_func: glib::GCompareDataFunc, mode: GstSearchMode, search_data: gconstpointer, user_data: gpointer) -> gpointer; + pub fn gst_util_array_binary_search( + array: gpointer, + num_elements: c_uint, + element_size: size_t, + search_func: glib::GCompareDataFunc, + mode: GstSearchMode, + search_data: gconstpointer, + user_data: gpointer, + ) -> gpointer; pub fn gst_util_double_to_fraction(src: c_double, dest_n: *mut c_int, dest_d: *mut c_int); #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_util_dump_buffer(buf: *mut GstBuffer); pub fn gst_util_dump_mem(mem: *const u8, size: c_uint); - pub fn gst_util_fraction_add(a_n: c_int, a_d: c_int, b_n: c_int, b_d: c_int, res_n: *mut c_int, res_d: *mut c_int) -> gboolean; + pub fn gst_util_fraction_add( + a_n: c_int, + a_d: c_int, + b_n: c_int, + b_d: c_int, + res_n: *mut c_int, + res_d: *mut c_int, + ) -> gboolean; pub fn gst_util_fraction_compare(a_n: c_int, a_d: c_int, b_n: c_int, b_d: c_int) -> c_int; - pub fn gst_util_fraction_multiply(a_n: c_int, a_d: c_int, b_n: c_int, b_d: c_int, res_n: *mut c_int, res_d: *mut c_int) -> gboolean; + pub fn gst_util_fraction_multiply( + a_n: c_int, + a_d: c_int, + b_n: c_int, + b_d: c_int, + res_n: *mut c_int, + res_d: *mut c_int, + ) -> gboolean; pub fn gst_util_fraction_to_double(src_n: c_int, src_d: c_int, dest: *mut c_double); pub fn gst_util_gdouble_to_guint64(value: c_double) -> u64; #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_util_get_object_array(object: *mut gobject::GObject, name: *const c_char, array: *mut *mut gobject::GValueArray) -> gboolean; + pub fn gst_util_get_object_array( + object: *mut gobject::GObject, + name: *const c_char, + array: *mut *mut gobject::GValueArray, + ) -> gboolean; pub fn gst_util_get_timestamp() -> GstClockTime; pub fn gst_util_greatest_common_divisor(a: c_int, b: c_int) -> c_int; pub fn gst_util_greatest_common_divisor_int64(a: i64, b: i64) -> i64; @@ -6039,9 +8657,17 @@ extern "C" { pub fn gst_util_guint64_to_gdouble(value: u64) -> c_double; pub fn gst_util_seqnum_compare(s1: u32, s2: u32) -> i32; pub fn gst_util_seqnum_next() -> u32; - pub fn gst_util_set_object_arg(object: *mut gobject::GObject, name: *const c_char, value: *const c_char); + pub fn gst_util_set_object_arg( + object: *mut gobject::GObject, + name: *const c_char, + value: *const c_char, + ); #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_util_set_object_array(object: *mut gobject::GObject, name: *const c_char, array: *const gobject::GValueArray) -> gboolean; + pub fn gst_util_set_object_array( + object: *mut gobject::GObject, + name: *const c_char, + array: *const gobject::GValueArray, + ) -> gboolean; pub fn gst_util_set_value_from_string(value: *mut gobject::GValue, value_str: *const c_char); pub fn gst_util_uint64_scale(val: u64, num: u64, denom: u64) -> u64; pub fn gst_util_uint64_scale_ceil(val: u64, num: u64, denom: u64) -> u64; @@ -6049,15 +8675,38 @@ extern "C" { pub fn gst_util_uint64_scale_int_ceil(val: u64, num: c_int, denom: c_int) -> u64; pub fn gst_util_uint64_scale_int_round(val: u64, num: c_int, denom: c_int) -> u64; pub fn gst_util_uint64_scale_round(val: u64, num: u64, denom: u64) -> u64; - pub fn gst_value_can_compare(value1: *const gobject::GValue, value2: *const gobject::GValue) -> gboolean; - pub fn gst_value_can_intersect(value1: *const gobject::GValue, value2: *const gobject::GValue) -> gboolean; - pub fn gst_value_can_subtract(minuend: *const gobject::GValue, subtrahend: *const gobject::GValue) -> gboolean; - pub fn gst_value_can_union(value1: *const gobject::GValue, value2: *const gobject::GValue) -> gboolean; - pub fn gst_value_compare(value1: *const gobject::GValue, value2: *const gobject::GValue) -> c_int; + pub fn gst_value_can_compare( + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ) -> gboolean; + pub fn gst_value_can_intersect( + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ) -> gboolean; + pub fn gst_value_can_subtract( + minuend: *const gobject::GValue, + subtrahend: *const gobject::GValue, + ) -> gboolean; + pub fn gst_value_can_union( + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ) -> gboolean; + pub fn gst_value_compare( + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ) -> c_int; pub fn gst_value_deserialize(dest: *mut gobject::GValue, src: *const c_char) -> gboolean; pub fn gst_value_fixate(dest: *mut gobject::GValue, src: *const gobject::GValue) -> gboolean; - pub fn gst_value_fraction_multiply(product: *mut gobject::GValue, factor1: *const gobject::GValue, factor2: *const gobject::GValue) -> gboolean; - pub fn gst_value_fraction_subtract(dest: *mut gobject::GValue, minuend: *const gobject::GValue, subtrahend: *const gobject::GValue) -> gboolean; + pub fn gst_value_fraction_multiply( + product: *mut gobject::GValue, + factor1: *const gobject::GValue, + factor2: *const gobject::GValue, + ) -> gboolean; + pub fn gst_value_fraction_subtract( + dest: *mut gobject::GValue, + minuend: *const gobject::GValue, + subtrahend: *const gobject::GValue, + ) -> gboolean; pub fn gst_value_get_bitmask(value: *const gobject::GValue) -> u64; pub fn gst_value_get_caps(value: *const gobject::GValue) -> *const GstCaps; pub fn gst_value_get_caps_features(value: *const gobject::GValue) -> *const GstCapsFeatures; @@ -6069,8 +8718,12 @@ extern "C" { pub fn gst_value_get_flagset_mask(value: *const gobject::GValue) -> c_uint; pub fn gst_value_get_fraction_denominator(value: *const gobject::GValue) -> c_int; pub fn gst_value_get_fraction_numerator(value: *const gobject::GValue) -> c_int; - pub fn gst_value_get_fraction_range_max(value: *const gobject::GValue) -> *const gobject::GValue; - pub fn gst_value_get_fraction_range_min(value: *const gobject::GValue) -> *const gobject::GValue; + pub fn gst_value_get_fraction_range_max( + value: *const gobject::GValue, + ) -> *const gobject::GValue; + pub fn gst_value_get_fraction_range_min( + value: *const gobject::GValue, + ) -> *const gobject::GValue; pub fn gst_value_get_int64_range_max(value: *const gobject::GValue) -> i64; pub fn gst_value_get_int64_range_min(value: *const gobject::GValue) -> i64; pub fn gst_value_get_int64_range_step(value: *const gobject::GValue) -> i64; @@ -6079,28 +8732,75 @@ extern "C" { pub fn gst_value_get_int_range_step(value: *const gobject::GValue) -> c_int; pub fn gst_value_get_structure(value: *const gobject::GValue) -> *const GstStructure; pub fn gst_value_init_and_copy(dest: *mut gobject::GValue, src: *const gobject::GValue); - pub fn gst_value_intersect(dest: *mut gobject::GValue, value1: *const gobject::GValue, value2: *const gobject::GValue) -> gboolean; + pub fn gst_value_intersect( + dest: *mut gobject::GValue, + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ) -> gboolean; pub fn gst_value_is_fixed(value: *const gobject::GValue) -> gboolean; - pub fn gst_value_is_subset(value1: *const gobject::GValue, value2: *const gobject::GValue) -> gboolean; + pub fn gst_value_is_subset( + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ) -> gboolean; pub fn gst_value_register(table: *const GstValueTable); pub fn gst_value_serialize(value: *const gobject::GValue) -> *mut c_char; pub fn gst_value_set_bitmask(value: *mut gobject::GValue, bitmask: u64); pub fn gst_value_set_caps(value: *mut gobject::GValue, caps: *const GstCaps); - pub fn gst_value_set_caps_features(value: *mut gobject::GValue, features: *const GstCapsFeatures); + pub fn gst_value_set_caps_features( + value: *mut gobject::GValue, + features: *const GstCapsFeatures, + ); pub fn gst_value_set_double_range(value: *mut gobject::GValue, start: c_double, end: c_double); #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_value_set_flagset(value: *mut gobject::GValue, flags: c_uint, mask: c_uint); - pub fn gst_value_set_fraction(value: *mut gobject::GValue, numerator: c_int, denominator: c_int); - pub fn gst_value_set_fraction_range(value: *mut gobject::GValue, start: *const gobject::GValue, end: *const gobject::GValue); - pub fn gst_value_set_fraction_range_full(value: *mut gobject::GValue, numerator_start: c_int, denominator_start: c_int, numerator_end: c_int, denominator_end: c_int); + pub fn gst_value_set_fraction( + value: *mut gobject::GValue, + numerator: c_int, + denominator: c_int, + ); + pub fn gst_value_set_fraction_range( + value: *mut gobject::GValue, + start: *const gobject::GValue, + end: *const gobject::GValue, + ); + pub fn gst_value_set_fraction_range_full( + value: *mut gobject::GValue, + numerator_start: c_int, + denominator_start: c_int, + numerator_end: c_int, + denominator_end: c_int, + ); pub fn gst_value_set_int64_range(value: *mut gobject::GValue, start: i64, end: i64); - pub fn gst_value_set_int64_range_step(value: *mut gobject::GValue, start: i64, end: i64, step: i64); + pub fn gst_value_set_int64_range_step( + value: *mut gobject::GValue, + start: i64, + end: i64, + step: i64, + ); pub fn gst_value_set_int_range(value: *mut gobject::GValue, start: c_int, end: c_int); - pub fn gst_value_set_int_range_step(value: *mut gobject::GValue, start: c_int, end: c_int, step: c_int); + pub fn gst_value_set_int_range_step( + value: *mut gobject::GValue, + start: c_int, + end: c_int, + step: c_int, + ); pub fn gst_value_set_structure(value: *mut gobject::GValue, structure: *const GstStructure); - pub fn gst_value_subtract(dest: *mut gobject::GValue, minuend: *const gobject::GValue, subtrahend: *const gobject::GValue) -> gboolean; - pub fn gst_value_union(dest: *mut gobject::GValue, value1: *const gobject::GValue, value2: *const gobject::GValue) -> gboolean; - pub fn gst_version(major: *mut c_uint, minor: *mut c_uint, micro: *mut c_uint, nano: *mut c_uint); + pub fn gst_value_subtract( + dest: *mut gobject::GValue, + minuend: *const gobject::GValue, + subtrahend: *const gobject::GValue, + ) -> gboolean; + pub fn gst_value_union( + dest: *mut gobject::GValue, + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ) -> gboolean; + pub fn gst_version( + major: *mut c_uint, + minor: *mut c_uint, + micro: *mut c_uint, + nano: *mut c_uint, + ); pub fn gst_version_string() -> *mut c_char; } diff --git a/gstreamer-sys/tests/abi.rs b/gstreamer-sys/tests/abi.rs index f0c09c204..15f9b81e1 100644 --- a/gstreamer-sys/tests/abi.rs +++ b/gstreamer-sys/tests/abi.rs @@ -5,13 +5,13 @@ extern crate gstreamer_sys; extern crate shell_words; extern crate tempdir; +use gstreamer_sys::*; use std::env; use std::error::Error; -use std::path::Path; use std::mem::{align_of, size_of}; +use std::path::Path; use std::process::Command; use std::str; -use gstreamer_sys::*; static PACKAGES: &[&str] = &["gstreamer-1.0"]; @@ -47,8 +47,7 @@ impl Compiler { cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { - return Err(format!("compilation command {:?} failed, {}", - &cmd, status).into()); + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } @@ -77,14 +76,12 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { cmd.args(packages); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {:?} returned {}", - &cmd, out.status).into()); + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } - #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, @@ -115,9 +112,8 @@ impl Results { fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", - self.passed, - self.failed, - self.failed_to_compile) + self.passed, self.failed, self.failed_to_compile + ) } fn expect_total_success(&self) { if self.failed == 0 { @@ -133,24 +129,28 @@ fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!("1", - get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), - "failed to obtain correct constant value for 1"); + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); - eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_value, c_value); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); } } }; @@ -166,24 +166,31 @@ fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!(Layout {size: 1, alignment: 1}, - get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), - "failed to obtain correct layout for char type"); + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); - eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_layout, &c_layout); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); } } }; @@ -203,15 +210,14 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result Result> { @@ -223,194 +229,1233 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result(), alignment: align_of::()}), - ("GstAllocator", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAllocatorClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstAllocatorFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBin", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBinClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBinFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBuffer", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBufferCopyFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBufferFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBufferPool", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBufferPoolAcquireFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBufferPoolAcquireParams", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBufferPoolClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBufferingMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBus", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBusClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBusFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstBusSyncReply", Layout {size: size_of::(), alignment: align_of::()}), - ("GstCaps", Layout {size: size_of::(), alignment: align_of::()}), - ("GstCapsFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstCapsIntersectMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstChildProxyInterface", Layout {size: size_of::(), alignment: align_of::()}), - ("GstClock", Layout {size: size_of::(), alignment: align_of::()}), - ("GstClockClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstClockEntry", Layout {size: size_of::(), alignment: align_of::()}), - ("GstClockEntryType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstClockFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstClockID", Layout {size: size_of::(), alignment: align_of::()}), - ("GstClockReturn", Layout {size: size_of::(), alignment: align_of::()}), - ("GstClockTime", Layout {size: size_of::(), alignment: align_of::()}), - ("GstClockTimeDiff", Layout {size: size_of::(), alignment: align_of::()}), - ("GstClockType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstControlBinding", Layout {size: size_of::(), alignment: align_of::()}), - ("GstControlBindingClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstControlSource", Layout {size: size_of::(), alignment: align_of::()}), - ("GstControlSourceClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstCoreError", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDebugCategory", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDebugColorFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDebugColorMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDebugGraphDetails", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDebugLevel", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDevice", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDeviceClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDeviceMonitor", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDeviceMonitorClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDeviceProvider", Layout {size: size_of::(), alignment: align_of::()}), - ("GstDeviceProviderClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstElement", Layout {size: size_of::(), alignment: align_of::()}), - ("GstElementClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstElementFactoryListType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstElementFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstEvent", Layout {size: size_of::(), alignment: align_of::()}), - ("GstEventType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstEventTypeFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstFlowReturn", Layout {size: size_of::(), alignment: align_of::()}), - ("GstFormat", Layout {size: size_of::(), alignment: align_of::()}), - ("GstFormatDefinition", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGhostPad", Layout {size: size_of::(), alignment: align_of::()}), - ("GstGhostPadClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstIterator", Layout {size: size_of::(), alignment: align_of::()}), - ("GstIteratorItem", Layout {size: size_of::(), alignment: align_of::()}), - ("GstIteratorResult", Layout {size: size_of::(), alignment: align_of::()}), - ("GstLibraryError", Layout {size: size_of::(), alignment: align_of::()}), - ("GstLockFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMapFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMapInfo", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMemory", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMemoryFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMessage", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMessageType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMeta", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMetaFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMetaInfo", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMetaTransformCopy", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMiniObject", Layout {size: size_of::(), alignment: align_of::()}), - ("GstMiniObjectFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstObject", Layout {size: size_of::(), alignment: align_of::()}), - ("GstObjectClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstObjectFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPad", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPadClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPadDirection", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPadFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPadLinkCheck", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPadLinkReturn", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPadMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPadPresence", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPadProbeInfo", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPadProbeReturn", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPadProbeType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPadTemplate", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPadTemplateClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPadTemplateFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstParamSpecArray", Layout {size: size_of::(), alignment: align_of::()}), - ("GstParamSpecFraction", Layout {size: size_of::(), alignment: align_of::()}), - ("GstParentBufferMeta", Layout {size: size_of::(), alignment: align_of::()}), - ("GstParseError", Layout {size: size_of::(), alignment: align_of::()}), - ("GstParseFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPipeline", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPipelineClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPipelineFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPluginDependencyFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPluginDesc", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPluginError", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPluginFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPollFD", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPresetInterface", Layout {size: size_of::(), alignment: align_of::()}), - ("GstProgressType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPromise", Layout {size: size_of::(), alignment: align_of::()}), - ("GstPromiseResult", Layout {size: size_of::(), alignment: align_of::()}), - ("GstProtectionMeta", Layout {size: size_of::(), alignment: align_of::()}), - ("GstProxyPad", Layout {size: size_of::(), alignment: align_of::()}), - ("GstProxyPadClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstQOSType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstQuery", Layout {size: size_of::(), alignment: align_of::()}), - ("GstQueryType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstQueryTypeFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRank", Layout {size: size_of::(), alignment: align_of::()}), - ("GstReferenceTimestampMeta", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRegistry", Layout {size: size_of::(), alignment: align_of::()}), - ("GstRegistryClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstResourceError", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSchedulingFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSearchMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSeekFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSeekType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSegment", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSegmentFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstStackTraceFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstState", Layout {size: size_of::(), alignment: align_of::()}), - ("GstStateChange", Layout {size: size_of::(), alignment: align_of::()}), - ("GstStateChangeReturn", Layout {size: size_of::(), alignment: align_of::()}), - ("GstStaticCaps", Layout {size: size_of::(), alignment: align_of::()}), - ("GstStaticPadTemplate", Layout {size: size_of::(), alignment: align_of::()}), - ("GstStream", Layout {size: size_of::(), alignment: align_of::()}), - ("GstStreamClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstStreamCollection", Layout {size: size_of::(), alignment: align_of::()}), - ("GstStreamCollectionClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstStreamError", Layout {size: size_of::(), alignment: align_of::()}), - ("GstStreamFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstStreamStatusType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstStreamType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstStructure", Layout {size: size_of::(), alignment: align_of::()}), - ("GstStructureChangeType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSystemClock", Layout {size: size_of::(), alignment: align_of::()}), - ("GstSystemClockClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTagFlag", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTagList", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTagMergeMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTagScope", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTagSetterInterface", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTask", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTaskClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTaskPool", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTaskPoolClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTaskState", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTimedValue", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTocEntryType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTocLoopType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTocScope", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTocSetterInterface", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTracer", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTracerClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTracerValueFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTracerValueScope", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTypeFind", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTypeFindProbability", Layout {size: size_of::(), alignment: align_of::()}), - ("GstURIError", Layout {size: size_of::(), alignment: align_of::()}), - ("GstURIHandlerInterface", Layout {size: size_of::(), alignment: align_of::()}), - ("GstURIType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstValueTable", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstAllocationParams", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAllocator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAllocatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAllocatorFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBin", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBinClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBinFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBuffer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBufferCopyFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBufferFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBufferPool", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBufferPoolAcquireFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBufferPoolAcquireParams", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBufferPoolClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBufferingMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBus", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBusClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBusFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBusSyncReply", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstCaps", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstCapsFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstCapsIntersectMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstChildProxyInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClock", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockEntry", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockEntryType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockID", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockReturn", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockTime", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockTimeDiff", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstControlBinding", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstControlBindingClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstControlSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstControlSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstCoreError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDebugCategory", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDebugColorFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDebugColorMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDebugGraphDetails", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDebugLevel", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDevice", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDeviceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDeviceMonitor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDeviceMonitorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDeviceProvider", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDeviceProviderClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstElement", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstElementClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstElementFactoryListType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstElementFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstEvent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstEventType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstEventTypeFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstFlowReturn", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstFormat", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstFormatDefinition", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGhostPad", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGhostPadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstIterator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstIteratorItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstIteratorResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstLibraryError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstLockFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMapFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMapInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMemory", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMemoryFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMessage", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMessageType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMetaFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMetaInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMetaTransformCopy", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMiniObject", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMiniObjectFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstObject", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstObjectClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstObjectFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPad", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadDirection", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadLinkCheck", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadLinkReturn", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadPresence", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadProbeInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadProbeReturn", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadProbeType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadTemplate", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadTemplateClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadTemplateFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstParamSpecArray", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstParamSpecFraction", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstParentBufferMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstParseError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstParseFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPipeline", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPipelineClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPipelineFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPluginDependencyFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPluginDesc", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPluginError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPluginFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPollFD", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPresetInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstProgressType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPromise", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPromiseResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstProtectionMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstProxyPad", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstProxyPadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstQOSType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstQuery", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstQueryType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstQueryTypeFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRank", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstReferenceTimestampMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRegistry", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRegistryClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstResourceError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSchedulingFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSearchMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSeekFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSeekType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSegment", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSegmentFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStackTraceFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStateChange", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStateChangeReturn", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStaticCaps", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStaticPadTemplate", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStream", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamCollection", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamCollectionClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamStatusType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStructure", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStructureChangeType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSystemClock", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSystemClockClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagFlag", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagList", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagMergeMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagScope", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagSetterInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTask", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTaskClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTaskPool", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTaskPoolClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTaskState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTimedValue", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTocEntryType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTocLoopType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTocScope", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTocSetterInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTracer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTracerClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTracerValueFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTracerValueScope", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTypeFind", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTypeFindProbability", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstURIError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstURIHandlerInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstURIType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstValueTable", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ @@ -459,7 +1504,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(guint) GST_BUS_FLUSHING", "16"), ("(gint) GST_BUS_PASS", "1"), ("GST_CAN_INLINE", "1"), - ("GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY", "memory:SystemMemory"), + ( + "GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY", + "memory:SystemMemory", + ), ("(guint) GST_CAPS_FLAG_ANY", "16"), ("(gint) GST_CAPS_INTERSECT_FIRST", "1"), ("(gint) GST_CAPS_INTERSECT_ZIG_ZAG", "0"), @@ -550,7 +1598,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("GST_ELEMENT_FACTORY_KLASS_SINK", "Sink"), ("GST_ELEMENT_FACTORY_KLASS_SRC", "Source"), ("GST_ELEMENT_FACTORY_TYPE_ANY", "562949953421311"), - ("GST_ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS", "3940649673949188"), + ( + "GST_ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS", + "3940649673949188", + ), ("GST_ELEMENT_FACTORY_TYPE_AUDIO_ENCODER", "1125899906842626"), ("GST_ELEMENT_FACTORY_TYPE_DECODABLE", "1377"), ("GST_ELEMENT_FACTORY_TYPE_DECODER", "1"), @@ -564,8 +1615,14 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY", "18446462598732840960"), ("GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO", "1125899906842624"), ("GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE", "2251799813685248"), - ("GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA", "9007199254740992"), - ("GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE", "4503599627370496"), + ( + "GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA", + "9007199254740992", + ), + ( + "GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE", + "4503599627370496", + ), ("GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO", "562949953421312"), ("GST_ELEMENT_FACTORY_TYPE_MUXER", "16"), ("GST_ELEMENT_FACTORY_TYPE_PARSER", "64"), @@ -825,11 +1882,23 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(guint) GST_PARSE_FLAG_PLACE_IN_BIN", "4"), ("(guint) GST_PIPELINE_FLAG_FIXED_CLOCK", "524288"), ("(guint) GST_PIPELINE_FLAG_LAST", "8388608"), - ("(guint) GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_PREFIX", "8"), - ("(guint) GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX", "4"), + ( + "(guint) GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_PREFIX", + "8", + ), + ( + "(guint) GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX", + "4", + ), ("(guint) GST_PLUGIN_DEPENDENCY_FLAG_NONE", "0"), - ("(guint) GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY", "2"), - ("(guint) GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE", "16"), + ( + "(guint) GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY", + "2", + ), + ( + "(guint) GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE", + "16", + ), ("(guint) GST_PLUGIN_DEPENDENCY_FLAG_RECURSE", "1"), ("(gint) GST_PLUGIN_ERROR_DEPENDENCIES", "1"), ("(gint) GST_PLUGIN_ERROR_MODULE", "0"), @@ -846,7 +1915,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_PROMISE_RESULT_PENDING", "0"), ("(gint) GST_PROMISE_RESULT_REPLIED", "2"), ("GST_PROTECTION_SYSTEM_ID_CAPS_FIELD", "protection-system"), - ("GST_PROTECTION_UNSPECIFIED_SYSTEM_ID", "unspecified-system-id"), + ( + "GST_PROTECTION_UNSPECIFIED_SYSTEM_ID", + "unspecified-system-id", + ), ("(gint) GST_QOS_TYPE_OVERFLOW", "0"), ("(gint) GST_QOS_TYPE_THROTTLE", "2"), ("(gint) GST_QOS_TYPE_UNDERFLOW", "1"), @@ -1018,17 +2090,32 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_TAG_FLAG_META", "1"), ("(gint) GST_TAG_FLAG_UNDEFINED", "0"), ("GST_TAG_GENRE", "genre"), - ("GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION", "geo-location-capture-direction"), + ( + "GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION", + "geo-location-capture-direction", + ), ("GST_TAG_GEO_LOCATION_CITY", "geo-location-city"), ("GST_TAG_GEO_LOCATION_COUNTRY", "geo-location-country"), ("GST_TAG_GEO_LOCATION_ELEVATION", "geo-location-elevation"), - ("GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR", "geo-location-horizontal-error"), + ( + "GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR", + "geo-location-horizontal-error", + ), ("GST_TAG_GEO_LOCATION_LATITUDE", "geo-location-latitude"), ("GST_TAG_GEO_LOCATION_LONGITUDE", "geo-location-longitude"), - ("GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION", "geo-location-movement-direction"), - ("GST_TAG_GEO_LOCATION_MOVEMENT_SPEED", "geo-location-movement-speed"), + ( + "GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION", + "geo-location-movement-direction", + ), + ( + "GST_TAG_GEO_LOCATION_MOVEMENT_SPEED", + "geo-location-movement-speed", + ), ("GST_TAG_GEO_LOCATION_NAME", "geo-location-name"), - ("GST_TAG_GEO_LOCATION_SUBLOCATION", "geo-location-sublocation"), + ( + "GST_TAG_GEO_LOCATION_SUBLOCATION", + "geo-location-sublocation", + ), ("GST_TAG_GROUPING", "grouping"), ("GST_TAG_HOMEPAGE", "homepage"), ("GST_TAG_IMAGE", "image"), @@ -1121,5 +2208,3 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("GST_VALUE_LESS_THAN", "-1"), ("GST_VALUE_UNORDERED", "2"), ]; - - diff --git a/gstreamer-tag-sys/build.rs b/gstreamer-tag-sys/build.rs index c715ff8b4..af35714b1 100644 --- a/gstreamer-tag-sys/build.rs +++ b/gstreamer-tag-sys/build.rs @@ -6,8 +6,8 @@ extern crate pkg_config; use pkg_config::{Config, Error}; use std::env; -use std::io::prelude::*; use std::io; +use std::io::prelude::*; use std::process; fn main() { @@ -48,7 +48,7 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()) + return Ok(()); } let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); @@ -70,8 +70,10 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } for path in library.link_paths.iter() { - println!("cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist")); + println!( + "cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist") + ); } } Ok(()) @@ -85,4 +87,3 @@ fn find() -> Result<(), Error> { Err(err) => Err(err), } } - diff --git a/gstreamer-tag-sys/src/lib.rs b/gstreamer-tag-sys/src/lib.rs index 65a10b077..4c612a981 100644 --- a/gstreamer-tag-sys/src/lib.rs +++ b/gstreamer-tag-sys/src/lib.rs @@ -3,18 +3,23 @@ // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] -extern crate libc; extern crate glib_sys as glib; extern crate gobject_sys as gobject; -extern crate gstreamer_sys as gst; extern crate gstreamer_base_sys as gst_base; +extern crate gstreamer_sys as gst; +extern crate libc; #[allow(unused_imports)] -use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, - c_short, c_ushort, c_long, c_ulong, - c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; +use libc::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, + intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -48,41 +53,70 @@ pub const GST_TAG_IMAGE_TYPE_BAND_ARTIST_LOGO: GstTagImageType = 17; pub const GST_TAG_IMAGE_TYPE_PUBLISHER_STUDIO_LOGO: GstTagImageType = 18; // Constants -pub const GST_TAG_CAPTURING_CONTRAST: *const c_char = b"capturing-contrast\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO: *const c_char = b"capturing-digital-zoom-ratio\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_EXPOSURE_COMPENSATION: *const c_char = b"capturing-exposure-compensation\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_EXPOSURE_MODE: *const c_char = b"capturing-exposure-mode\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_EXPOSURE_PROGRAM: *const c_char = b"capturing-exposure-program\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_FLASH_FIRED: *const c_char = b"capturing-flash-fired\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_FLASH_MODE: *const c_char = b"capturing-flash-mode\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_FOCAL_LENGTH: *const c_char = b"capturing-focal-length\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_FOCAL_LENGTH_35_MM: *const c_char = b"capturing-focal-length-35mm\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_FOCAL_RATIO: *const c_char = b"capturing-focal-ratio\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_GAIN_ADJUSTMENT: *const c_char = b"capturing-gain-adjustment\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_ISO_SPEED: *const c_char = b"capturing-iso-speed\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_METERING_MODE: *const c_char = b"capturing-metering-mode\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_SATURATION: *const c_char = b"capturing-saturation\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_SCENE_CAPTURE_TYPE: *const c_char = b"capturing-scene-capture-type\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_SHARPNESS: *const c_char = b"capturing-sharpness\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_SHUTTER_SPEED: *const c_char = b"capturing-shutter-speed\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_SOURCE: *const c_char = b"capturing-source\0" as *const u8 as *const c_char; -pub const GST_TAG_CAPTURING_WHITE_BALANCE: *const c_char = b"capturing-white-balance\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_CONTRAST: *const c_char = + b"capturing-contrast\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO: *const c_char = + b"capturing-digital-zoom-ratio\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_EXPOSURE_COMPENSATION: *const c_char = + b"capturing-exposure-compensation\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_EXPOSURE_MODE: *const c_char = + b"capturing-exposure-mode\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_EXPOSURE_PROGRAM: *const c_char = + b"capturing-exposure-program\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_FLASH_FIRED: *const c_char = + b"capturing-flash-fired\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_FLASH_MODE: *const c_char = + b"capturing-flash-mode\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_FOCAL_LENGTH: *const c_char = + b"capturing-focal-length\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_FOCAL_LENGTH_35_MM: *const c_char = + b"capturing-focal-length-35mm\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_FOCAL_RATIO: *const c_char = + b"capturing-focal-ratio\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_GAIN_ADJUSTMENT: *const c_char = + b"capturing-gain-adjustment\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_ISO_SPEED: *const c_char = + b"capturing-iso-speed\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_METERING_MODE: *const c_char = + b"capturing-metering-mode\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_SATURATION: *const c_char = + b"capturing-saturation\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_SCENE_CAPTURE_TYPE: *const c_char = + b"capturing-scene-capture-type\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_SHARPNESS: *const c_char = + b"capturing-sharpness\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_SHUTTER_SPEED: *const c_char = + b"capturing-shutter-speed\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_SOURCE: *const c_char = + b"capturing-source\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_WHITE_BALANCE: *const c_char = + b"capturing-white-balance\0" as *const u8 as *const c_char; pub const GST_TAG_CDDA_CDDB_DISCID: *const c_char = b"discid\0" as *const u8 as *const c_char; -pub const GST_TAG_CDDA_CDDB_DISCID_FULL: *const c_char = b"discid-full\0" as *const u8 as *const c_char; -pub const GST_TAG_CDDA_MUSICBRAINZ_DISCID: *const c_char = b"musicbrainz-discid\0" as *const u8 as *const c_char; -pub const GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL: *const c_char = b"musicbrainz-discid-full\0" as *const u8 as *const c_char; +pub const GST_TAG_CDDA_CDDB_DISCID_FULL: *const c_char = + b"discid-full\0" as *const u8 as *const c_char; +pub const GST_TAG_CDDA_MUSICBRAINZ_DISCID: *const c_char = + b"musicbrainz-discid\0" as *const u8 as *const c_char; +pub const GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL: *const c_char = + b"musicbrainz-discid-full\0" as *const u8 as *const c_char; pub const GST_TAG_CMML_CLIP: *const c_char = b"cmml-clip\0" as *const u8 as *const c_char; pub const GST_TAG_CMML_HEAD: *const c_char = b"cmml-head\0" as *const u8 as *const c_char; pub const GST_TAG_CMML_STREAM: *const c_char = b"cmml-stream\0" as *const u8 as *const c_char; pub const GST_TAG_ID3V2_HEADER_SIZE: c_int = 10; -pub const GST_TAG_IMAGE_HORIZONTAL_PPI: *const c_char = b"image-horizontal-ppi\0" as *const u8 as *const c_char; -pub const GST_TAG_IMAGE_VERTICAL_PPI: *const c_char = b"image-vertical-ppi\0" as *const u8 as *const c_char; +pub const GST_TAG_IMAGE_HORIZONTAL_PPI: *const c_char = + b"image-horizontal-ppi\0" as *const u8 as *const c_char; +pub const GST_TAG_IMAGE_VERTICAL_PPI: *const c_char = + b"image-vertical-ppi\0" as *const u8 as *const c_char; pub const GST_TAG_MUSICAL_KEY: *const c_char = b"musical-key\0" as *const u8 as *const c_char; -pub const GST_TAG_MUSICBRAINZ_ALBUMARTISTID: *const c_char = b"musicbrainz-albumartistid\0" as *const u8 as *const c_char; -pub const GST_TAG_MUSICBRAINZ_ALBUMID: *const c_char = b"musicbrainz-albumid\0" as *const u8 as *const c_char; -pub const GST_TAG_MUSICBRAINZ_ARTISTID: *const c_char = b"musicbrainz-artistid\0" as *const u8 as *const c_char; -pub const GST_TAG_MUSICBRAINZ_TRACKID: *const c_char = b"musicbrainz-trackid\0" as *const u8 as *const c_char; -pub const GST_TAG_MUSICBRAINZ_TRMID: *const c_char = b"musicbrainz-trmid\0" as *const u8 as *const c_char; +pub const GST_TAG_MUSICBRAINZ_ALBUMARTISTID: *const c_char = + b"musicbrainz-albumartistid\0" as *const u8 as *const c_char; +pub const GST_TAG_MUSICBRAINZ_ALBUMID: *const c_char = + b"musicbrainz-albumid\0" as *const u8 as *const c_char; +pub const GST_TAG_MUSICBRAINZ_ARTISTID: *const c_char = + b"musicbrainz-artistid\0" as *const u8 as *const c_char; +pub const GST_TAG_MUSICBRAINZ_TRACKID: *const c_char = + b"musicbrainz-trackid\0" as *const u8 as *const c_char; +pub const GST_TAG_MUSICBRAINZ_TRMID: *const c_char = + b"musicbrainz-trmid\0" as *const u8 as *const c_char; // Flags pub type GstTagLicenseFlags = c_uint; @@ -108,22 +142,43 @@ pub struct GstTagDemuxClass { pub parent_class: gst::GstElementClass, pub min_start_size: c_uint, pub min_end_size: c_uint, - pub identify_tag: Option gboolean>, - pub parse_tag: Option GstTagDemuxResult>, - pub merge_tags: Option *mut gst::GstTagList>, + pub identify_tag: Option< + unsafe extern "C" fn( + *mut GstTagDemux, + *mut gst::GstBuffer, + gboolean, + *mut c_uint, + ) -> gboolean, + >, + pub parse_tag: Option< + unsafe extern "C" fn( + *mut GstTagDemux, + *mut gst::GstBuffer, + gboolean, + *mut c_uint, + *mut *mut gst::GstTagList, + ) -> GstTagDemuxResult, + >, + pub merge_tags: Option< + unsafe extern "C" fn( + *mut GstTagDemux, + *const gst::GstTagList, + *const gst::GstTagList, + ) -> *mut gst::GstTagList, + >, pub reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstTagDemuxClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTagDemuxClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("min_start_size", &self.min_start_size) - .field("min_end_size", &self.min_end_size) - .field("identify_tag", &self.identify_tag) - .field("parse_tag", &self.parse_tag) - .field("merge_tags", &self.merge_tags) - .finish() + .field("parent_class", &self.parent_class) + .field("min_start_size", &self.min_start_size) + .field("min_end_size", &self.min_end_size) + .field("identify_tag", &self.identify_tag) + .field("parse_tag", &self.parse_tag) + .field("merge_tags", &self.merge_tags) + .finish() } } @@ -136,18 +191,20 @@ pub type GstTagDemuxPrivate = *mut _GstTagDemuxPrivate; #[derive(Copy, Clone)] pub struct GstTagMuxClass { pub parent_class: gst::GstElementClass, - pub render_start_tag: Option *mut gst::GstBuffer>, - pub render_end_tag: Option *mut gst::GstBuffer>, + pub render_start_tag: + Option *mut gst::GstBuffer>, + pub render_end_tag: + Option *mut gst::GstBuffer>, pub _gst_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstTagMuxClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTagMuxClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("render_start_tag", &self.render_start_tag) - .field("render_end_tag", &self.render_end_tag) - .finish() + .field("parent_class", &self.parent_class) + .field("render_start_tag", &self.render_start_tag) + .field("render_end_tag", &self.render_end_tag) + .finish() } } @@ -164,9 +221,12 @@ pub struct GstTagXmpWriterInterface { impl ::std::fmt::Debug for GstTagXmpWriterInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstTagXmpWriterInterface @ {:?}", self as *const _)) - .field("parent", &self.parent) - .finish() + f.debug_struct(&format!( + "GstTagXmpWriterInterface @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .finish() } } @@ -182,8 +242,8 @@ pub struct GstTagDemux { impl ::std::fmt::Debug for GstTagDemux { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTagDemux @ {:?}", self as *const _)) - .field("element", &self.element) - .finish() + .field("element", &self.element) + .finish() } } @@ -198,8 +258,8 @@ pub struct GstTagMux { impl ::std::fmt::Debug for GstTagMux { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstTagMux @ {:?}", self as *const _)) - .field("element", &self.element) - .finish() + .field("element", &self.element) + .finish() } } @@ -213,7 +273,6 @@ impl ::std::fmt::Debug for GstTagXmpWriter { } } - extern "C" { //========================================================================= @@ -247,18 +306,32 @@ extern "C" { pub fn gst_tag_xmp_writer_get_type() -> GType; pub fn gst_tag_xmp_writer_add_all_schemas(config: *mut GstTagXmpWriter); pub fn gst_tag_xmp_writer_add_schema(config: *mut GstTagXmpWriter, schema: *const c_char); - pub fn gst_tag_xmp_writer_has_schema(config: *mut GstTagXmpWriter, schema: *const c_char) -> gboolean; + pub fn gst_tag_xmp_writer_has_schema( + config: *mut GstTagXmpWriter, + schema: *const c_char, + ) -> gboolean; pub fn gst_tag_xmp_writer_remove_all_schemas(config: *mut GstTagXmpWriter); pub fn gst_tag_xmp_writer_remove_schema(config: *mut GstTagXmpWriter, schema: *const c_char); - pub fn gst_tag_xmp_writer_tag_list_to_xmp_buffer(config: *mut GstTagXmpWriter, taglist: *const gst::GstTagList, read_only: gboolean) -> *mut gst::GstBuffer; + pub fn gst_tag_xmp_writer_tag_list_to_xmp_buffer( + config: *mut GstTagXmpWriter, + taglist: *const gst::GstTagList, + read_only: gboolean, + ) -> *mut gst::GstBuffer; //========================================================================= // Other functions //========================================================================= pub fn gst_tag_check_language_code(lang_code: *const c_char) -> gboolean; - pub fn gst_tag_freeform_string_to_utf8(data: *const c_char, size: c_int, env_vars: *mut *const c_char) -> *mut c_char; + pub fn gst_tag_freeform_string_to_utf8( + data: *const c_char, + size: c_int, + env_vars: *mut *const c_char, + ) -> *mut c_char; pub fn gst_tag_from_id3_tag(id3_tag: *const c_char) -> *const c_char; - pub fn gst_tag_from_id3_user_tag(type_: *const c_char, id3_user_tag: *const c_char) -> *const c_char; + pub fn gst_tag_from_id3_user_tag( + type_: *const c_char, + id3_user_tag: *const c_char, + ) -> *const c_char; pub fn gst_tag_from_vorbis_tag(vorbis_tag: *const c_char) -> *const c_char; pub fn gst_tag_get_id3v2_tag_size(buffer: *mut gst::GstBuffer) -> c_uint; pub fn gst_tag_get_language_code_iso_639_1(lang_code: *const c_char) -> *const c_char; @@ -275,23 +348,73 @@ extern "C" { pub fn gst_tag_get_licenses() -> *mut *mut c_char; pub fn gst_tag_id3_genre_count() -> c_uint; pub fn gst_tag_id3_genre_get(id: c_uint) -> *const c_char; - pub fn gst_tag_image_data_to_image_sample(image_data: *const u8, image_data_len: c_uint, image_type: GstTagImageType) -> *mut gst::GstSample; - pub fn gst_tag_list_add_id3_image(tag_list: *mut gst::GstTagList, image_data: *const u8, image_data_len: c_uint, id3_picture_type: c_uint) -> gboolean; - pub fn gst_tag_list_from_exif_buffer(buffer: *mut gst::GstBuffer, byte_order: c_int, base_offset: u32) -> *mut gst::GstTagList; - pub fn gst_tag_list_from_exif_buffer_with_tiff_header(buffer: *mut gst::GstBuffer) -> *mut gst::GstTagList; + pub fn gst_tag_image_data_to_image_sample( + image_data: *const u8, + image_data_len: c_uint, + image_type: GstTagImageType, + ) -> *mut gst::GstSample; + pub fn gst_tag_list_add_id3_image( + tag_list: *mut gst::GstTagList, + image_data: *const u8, + image_data_len: c_uint, + id3_picture_type: c_uint, + ) -> gboolean; + pub fn gst_tag_list_from_exif_buffer( + buffer: *mut gst::GstBuffer, + byte_order: c_int, + base_offset: u32, + ) -> *mut gst::GstTagList; + pub fn gst_tag_list_from_exif_buffer_with_tiff_header( + buffer: *mut gst::GstBuffer, + ) -> *mut gst::GstTagList; pub fn gst_tag_list_from_id3v2_tag(buffer: *mut gst::GstBuffer) -> *mut gst::GstTagList; - pub fn gst_tag_list_from_vorbiscomment(data: *const u8, size: size_t, id_data: *const u8, id_data_length: c_uint, vendor_string: *mut *mut c_char) -> *mut gst::GstTagList; - pub fn gst_tag_list_from_vorbiscomment_buffer(buffer: *mut gst::GstBuffer, id_data: *const u8, id_data_length: c_uint, vendor_string: *mut *mut c_char) -> *mut gst::GstTagList; + pub fn gst_tag_list_from_vorbiscomment( + data: *const u8, + size: size_t, + id_data: *const u8, + id_data_length: c_uint, + vendor_string: *mut *mut c_char, + ) -> *mut gst::GstTagList; + pub fn gst_tag_list_from_vorbiscomment_buffer( + buffer: *mut gst::GstBuffer, + id_data: *const u8, + id_data_length: c_uint, + vendor_string: *mut *mut c_char, + ) -> *mut gst::GstTagList; pub fn gst_tag_list_from_xmp_buffer(buffer: *mut gst::GstBuffer) -> *mut gst::GstTagList; pub fn gst_tag_list_new_from_id3v1(data: *const [u8; 128]) -> *mut gst::GstTagList; - pub fn gst_tag_list_to_exif_buffer(taglist: *const gst::GstTagList, byte_order: c_int, base_offset: u32) -> *mut gst::GstBuffer; - pub fn gst_tag_list_to_exif_buffer_with_tiff_header(taglist: *const gst::GstTagList) -> *mut gst::GstBuffer; - pub fn gst_tag_list_to_vorbiscomment_buffer(list: *const gst::GstTagList, id_data: *const u8, id_data_length: c_uint, vendor_string: *const c_char) -> *mut gst::GstBuffer; - pub fn gst_tag_list_to_xmp_buffer(list: *const gst::GstTagList, read_only: gboolean, schemas: *mut *const c_char) -> *mut gst::GstBuffer; - pub fn gst_tag_parse_extended_comment(ext_comment: *const c_char, key: *mut *mut c_char, lang: *mut *mut c_char, value: *mut *mut c_char, fail_if_no_key: gboolean) -> gboolean; + pub fn gst_tag_list_to_exif_buffer( + taglist: *const gst::GstTagList, + byte_order: c_int, + base_offset: u32, + ) -> *mut gst::GstBuffer; + pub fn gst_tag_list_to_exif_buffer_with_tiff_header( + taglist: *const gst::GstTagList, + ) -> *mut gst::GstBuffer; + pub fn gst_tag_list_to_vorbiscomment_buffer( + list: *const gst::GstTagList, + id_data: *const u8, + id_data_length: c_uint, + vendor_string: *const c_char, + ) -> *mut gst::GstBuffer; + pub fn gst_tag_list_to_xmp_buffer( + list: *const gst::GstTagList, + read_only: gboolean, + schemas: *mut *const c_char, + ) -> *mut gst::GstBuffer; + pub fn gst_tag_parse_extended_comment( + ext_comment: *const c_char, + key: *mut *mut c_char, + lang: *mut *mut c_char, + value: *mut *mut c_char, + fail_if_no_key: gboolean, + ) -> gboolean; pub fn gst_tag_register_musicbrainz_tags(); pub fn gst_tag_to_id3_tag(gst_tag: *const c_char) -> *const c_char; - pub fn gst_tag_to_vorbis_comments(list: *const gst::GstTagList, tag: *const c_char) -> *mut glib::GList; + pub fn gst_tag_to_vorbis_comments( + list: *const gst::GstTagList, + tag: *const c_char, + ) -> *mut glib::GList; pub fn gst_tag_to_vorbis_tag(gst_tag: *const c_char) -> *const c_char; pub fn gst_tag_xmp_list_schemas() -> *mut *const c_char; pub fn gst_vorbis_tag_add(list: *mut gst::GstTagList, tag: *const c_char, value: *const c_char); diff --git a/gstreamer-tag-sys/tests/abi.rs b/gstreamer-tag-sys/tests/abi.rs index 38ba80a27..c57e9490c 100644 --- a/gstreamer-tag-sys/tests/abi.rs +++ b/gstreamer-tag-sys/tests/abi.rs @@ -5,13 +5,13 @@ extern crate gstreamer_tag_sys; extern crate shell_words; extern crate tempdir; +use gstreamer_tag_sys::*; use std::env; use std::error::Error; -use std::path::Path; use std::mem::{align_of, size_of}; +use std::path::Path; use std::process::Command; use std::str; -use gstreamer_tag_sys::*; static PACKAGES: &[&str] = &["gstreamer-tag-1.0"]; @@ -47,8 +47,7 @@ impl Compiler { cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { - return Err(format!("compilation command {:?} failed, {}", - &cmd, status).into()); + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } @@ -77,14 +76,12 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { cmd.args(packages); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {:?} returned {}", - &cmd, out.status).into()); + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } - #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, @@ -115,9 +112,8 @@ impl Results { fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", - self.passed, - self.failed, - self.failed_to_compile) + self.passed, self.failed, self.failed_to_compile + ) } fn expect_total_success(&self) { if self.failed == 0 { @@ -133,24 +129,28 @@ fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!("1", - get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), - "failed to obtain correct constant value for 1"); + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); - eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_value, c_value); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); } } }; @@ -166,24 +166,31 @@ fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!(Layout {size: 1, alignment: 1}, - get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), - "failed to obtain correct layout for char type"); + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); - eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_layout, &c_layout); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); } } }; @@ -203,15 +210,14 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result Result> { @@ -223,47 +229,114 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result(), alignment: align_of::()}), - ("GstTagDemuxClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTagDemuxResult", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTagImageType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTagLicenseFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTagMux", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTagMuxClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstTagXmpWriterInterface", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstTagDemux", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagDemuxClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagDemuxResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagImageType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagLicenseFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagMux", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagMuxClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagXmpWriterInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ ("GST_TAG_CAPTURING_CONTRAST", "capturing-contrast"), - ("GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO", "capturing-digital-zoom-ratio"), - ("GST_TAG_CAPTURING_EXPOSURE_COMPENSATION", "capturing-exposure-compensation"), + ( + "GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO", + "capturing-digital-zoom-ratio", + ), + ( + "GST_TAG_CAPTURING_EXPOSURE_COMPENSATION", + "capturing-exposure-compensation", + ), ("GST_TAG_CAPTURING_EXPOSURE_MODE", "capturing-exposure-mode"), - ("GST_TAG_CAPTURING_EXPOSURE_PROGRAM", "capturing-exposure-program"), + ( + "GST_TAG_CAPTURING_EXPOSURE_PROGRAM", + "capturing-exposure-program", + ), ("GST_TAG_CAPTURING_FLASH_FIRED", "capturing-flash-fired"), ("GST_TAG_CAPTURING_FLASH_MODE", "capturing-flash-mode"), ("GST_TAG_CAPTURING_FOCAL_LENGTH", "capturing-focal-length"), - ("GST_TAG_CAPTURING_FOCAL_LENGTH_35_MM", "capturing-focal-length-35mm"), + ( + "GST_TAG_CAPTURING_FOCAL_LENGTH_35_MM", + "capturing-focal-length-35mm", + ), ("GST_TAG_CAPTURING_FOCAL_RATIO", "capturing-focal-ratio"), - ("GST_TAG_CAPTURING_GAIN_ADJUSTMENT", "capturing-gain-adjustment"), + ( + "GST_TAG_CAPTURING_GAIN_ADJUSTMENT", + "capturing-gain-adjustment", + ), ("GST_TAG_CAPTURING_ISO_SPEED", "capturing-iso-speed"), ("GST_TAG_CAPTURING_METERING_MODE", "capturing-metering-mode"), ("GST_TAG_CAPTURING_SATURATION", "capturing-saturation"), - ("GST_TAG_CAPTURING_SCENE_CAPTURE_TYPE", "capturing-scene-capture-type"), + ( + "GST_TAG_CAPTURING_SCENE_CAPTURE_TYPE", + "capturing-scene-capture-type", + ), ("GST_TAG_CAPTURING_SHARPNESS", "capturing-sharpness"), ("GST_TAG_CAPTURING_SHUTTER_SPEED", "capturing-shutter-speed"), ("GST_TAG_CAPTURING_SOURCE", "capturing-source"), @@ -271,7 +344,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("GST_TAG_CDDA_CDDB_DISCID", "discid"), ("GST_TAG_CDDA_CDDB_DISCID_FULL", "discid-full"), ("GST_TAG_CDDA_MUSICBRAINZ_DISCID", "musicbrainz-discid"), - ("GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL", "musicbrainz-discid-full"), + ( + "GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL", + "musicbrainz-discid-full", + ), ("GST_TAG_CMML_CLIP", "cmml-clip"), ("GST_TAG_CMML_HEAD", "cmml-head"), ("GST_TAG_CMML_STREAM", "cmml-stream"), @@ -301,14 +377,23 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_TAG_IMAGE_TYPE_UNDEFINED", "0"), ("(gint) GST_TAG_IMAGE_TYPE_VIDEO_CAPTURE", "14"), ("GST_TAG_IMAGE_VERTICAL_PPI", "image-vertical-ppi"), - ("(guint) GST_TAG_LICENSE_CREATIVE_COMMONS_LICENSE", "16777216"), - ("(guint) GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE", "33554432"), + ( + "(guint) GST_TAG_LICENSE_CREATIVE_COMMONS_LICENSE", + "16777216", + ), + ( + "(guint) GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE", + "33554432", + ), ("(guint) GST_TAG_LICENSE_PERMITS_DERIVATIVE_WORKS", "4"), ("(guint) GST_TAG_LICENSE_PERMITS_DISTRIBUTION", "2"), ("(guint) GST_TAG_LICENSE_PERMITS_REPRODUCTION", "1"), ("(guint) GST_TAG_LICENSE_PERMITS_SHARING", "8"), ("(guint) GST_TAG_LICENSE_PROHIBITS_COMMERCIAL_USE", "65536"), - ("(guint) GST_TAG_LICENSE_PROHIBITS_HIGH_INCOME_NATION_USE", "131072"), + ( + "(guint) GST_TAG_LICENSE_PROHIBITS_HIGH_INCOME_NATION_USE", + "131072", + ), ("(guint) GST_TAG_LICENSE_REQUIRES_ATTRIBUTION", "512"), ("(guint) GST_TAG_LICENSE_REQUIRES_COPYLEFT", "4096"), ("(guint) GST_TAG_LICENSE_REQUIRES_LESSER_COPYLEFT", "8192"), @@ -316,11 +401,12 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(guint) GST_TAG_LICENSE_REQUIRES_SHARE_ALIKE", "1024"), ("(guint) GST_TAG_LICENSE_REQUIRES_SOURCE_CODE", "2048"), ("GST_TAG_MUSICAL_KEY", "musical-key"), - ("GST_TAG_MUSICBRAINZ_ALBUMARTISTID", "musicbrainz-albumartistid"), + ( + "GST_TAG_MUSICBRAINZ_ALBUMARTISTID", + "musicbrainz-albumartistid", + ), ("GST_TAG_MUSICBRAINZ_ALBUMID", "musicbrainz-albumid"), ("GST_TAG_MUSICBRAINZ_ARTISTID", "musicbrainz-artistid"), ("GST_TAG_MUSICBRAINZ_TRACKID", "musicbrainz-trackid"), ("GST_TAG_MUSICBRAINZ_TRMID", "musicbrainz-trmid"), ]; - - diff --git a/gstreamer-video-sys/build.rs b/gstreamer-video-sys/build.rs index 29b330fad..db0544d16 100644 --- a/gstreamer-video-sys/build.rs +++ b/gstreamer-video-sys/build.rs @@ -6,8 +6,8 @@ extern crate pkg_config; use pkg_config::{Config, Error}; use std::env; -use std::io::prelude::*; use std::io; +use std::io::prelude::*; use std::process; fn main() { @@ -52,7 +52,7 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()) + return Ok(()); } let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); @@ -74,8 +74,10 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } for path in library.link_paths.iter() { - println!("cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist")); + println!( + "cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist") + ); } } Ok(()) @@ -89,4 +91,3 @@ fn find() -> Result<(), Error> { Err(err) => Err(err), } } - diff --git a/gstreamer-video-sys/src/lib.rs b/gstreamer-video-sys/src/lib.rs index 6edce18fb..691bbf214 100644 --- a/gstreamer-video-sys/src/lib.rs +++ b/gstreamer-video-sys/src/lib.rs @@ -3,18 +3,23 @@ // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] -extern crate libc; extern crate glib_sys as glib; extern crate gobject_sys as gobject; -extern crate gstreamer_sys as gst; extern crate gstreamer_base_sys as gst_base; +extern crate gstreamer_sys as gst; +extern crate libc; #[allow(unused_imports)] -use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, - c_short, c_ushort, c_long, c_ulong, - c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; +use libc::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, + intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -269,7 +274,8 @@ pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_MONO: GstVideoMultiviewFramePacking pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_LEFT: GstVideoMultiviewFramePacking = 1; pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_RIGHT: GstVideoMultiviewFramePacking = 2; pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE: GstVideoMultiviewFramePacking = 3; -pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE_QUINCUNX: GstVideoMultiviewFramePacking = 4; +pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE_QUINCUNX: GstVideoMultiviewFramePacking = + 4; pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED: GstVideoMultiviewFramePacking = 5; pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_ROW_INTERLEAVED: GstVideoMultiviewFramePacking = 6; pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_TOP_BOTTOM: GstVideoMultiviewFramePacking = 7; @@ -342,23 +348,35 @@ pub const GST_VIDEO_VBI_PARSER_RESULT_OK: GstVideoVBIParserResult = 1; pub const GST_VIDEO_VBI_PARSER_RESULT_ERROR: GstVideoVBIParserResult = 2; // Constants -pub const GST_BUFFER_POOL_OPTION_VIDEO_AFFINE_TRANSFORMATION_META: *const c_char = b"GstBufferPoolOptionVideoAffineTransformation\0" as *const u8 as *const c_char; -pub const GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT: *const c_char = b"GstBufferPoolOptionVideoAlignment\0" as *const u8 as *const c_char; -pub const GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META: *const c_char = b"GstBufferPoolOptionVideoGLTextureUploadMeta\0" as *const u8 as *const c_char; -pub const GST_BUFFER_POOL_OPTION_VIDEO_META: *const c_char = b"GstBufferPoolOptionVideoMeta\0" as *const u8 as *const c_char; -pub const GST_CAPS_FEATURE_FORMAT_INTERLACED: *const c_char = b"format:Interlaced\0" as *const u8 as *const c_char; -pub const GST_CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META: *const c_char = b"meta:GstVideoAffineTransformation\0" as *const u8 as *const c_char; -pub const GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META: *const c_char = b"meta:GstVideoGLTextureUploadMeta\0" as *const u8 as *const c_char; -pub const GST_CAPS_FEATURE_META_GST_VIDEO_META: *const c_char = b"meta:GstVideoMeta\0" as *const u8 as *const c_char; -pub const GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION: *const c_char = b"meta:GstVideoOverlayComposition\0" as *const u8 as *const c_char; -pub const GST_META_TAG_VIDEO_COLORSPACE_STR: *const c_char = b"colorspace\0" as *const u8 as *const c_char; -pub const GST_META_TAG_VIDEO_ORIENTATION_STR: *const c_char = b"orientation\0" as *const u8 as *const c_char; +pub const GST_BUFFER_POOL_OPTION_VIDEO_AFFINE_TRANSFORMATION_META: *const c_char = + b"GstBufferPoolOptionVideoAffineTransformation\0" as *const u8 as *const c_char; +pub const GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT: *const c_char = + b"GstBufferPoolOptionVideoAlignment\0" as *const u8 as *const c_char; +pub const GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META: *const c_char = + b"GstBufferPoolOptionVideoGLTextureUploadMeta\0" as *const u8 as *const c_char; +pub const GST_BUFFER_POOL_OPTION_VIDEO_META: *const c_char = + b"GstBufferPoolOptionVideoMeta\0" as *const u8 as *const c_char; +pub const GST_CAPS_FEATURE_FORMAT_INTERLACED: *const c_char = + b"format:Interlaced\0" as *const u8 as *const c_char; +pub const GST_CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META: *const c_char = + b"meta:GstVideoAffineTransformation\0" as *const u8 as *const c_char; +pub const GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META: *const c_char = + b"meta:GstVideoGLTextureUploadMeta\0" as *const u8 as *const c_char; +pub const GST_CAPS_FEATURE_META_GST_VIDEO_META: *const c_char = + b"meta:GstVideoMeta\0" as *const u8 as *const c_char; +pub const GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION: *const c_char = + b"meta:GstVideoOverlayComposition\0" as *const u8 as *const c_char; +pub const GST_META_TAG_VIDEO_COLORSPACE_STR: *const c_char = + b"colorspace\0" as *const u8 as *const c_char; +pub const GST_META_TAG_VIDEO_ORIENTATION_STR: *const c_char = + b"orientation\0" as *const u8 as *const c_char; pub const GST_META_TAG_VIDEO_SIZE_STR: *const c_char = b"size\0" as *const u8 as *const c_char; pub const GST_META_TAG_VIDEO_STR: *const c_char = b"video\0" as *const u8 as *const c_char; pub const GST_VIDEO_COLORIMETRY_BT2020: *const c_char = b"bt2020\0" as *const u8 as *const c_char; pub const GST_VIDEO_COLORIMETRY_BT601: *const c_char = b"bt601\0" as *const u8 as *const c_char; pub const GST_VIDEO_COLORIMETRY_BT709: *const c_char = b"bt709\0" as *const u8 as *const c_char; -pub const GST_VIDEO_COLORIMETRY_SMPTE240M: *const c_char = b"smpte240m\0" as *const u8 as *const c_char; +pub const GST_VIDEO_COLORIMETRY_SMPTE240M: *const c_char = + b"smpte240m\0" as *const u8 as *const c_char; pub const GST_VIDEO_COLORIMETRY_SRGB: *const c_char = b"sRGB\0" as *const u8 as *const c_char; pub const GST_VIDEO_COMP_A: c_int = 3; pub const GST_VIDEO_COMP_B: c_int = 2; @@ -369,45 +387,75 @@ pub const GST_VIDEO_COMP_R: c_int = 0; pub const GST_VIDEO_COMP_U: c_int = 1; pub const GST_VIDEO_COMP_V: c_int = 2; pub const GST_VIDEO_COMP_Y: c_int = 0; -pub const GST_VIDEO_CONVERTER_OPT_ALPHA_MODE: *const c_char = b"GstVideoConverter.alpha-mode\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE: *const c_char = b"GstVideoConverter.alpha-value\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_BORDER_ARGB: *const c_char = b"GstVideoConverter.border-argb\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_CHROMA_MODE: *const c_char = b"GstVideoConverter.chroma-mode\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_CHROMA_RESAMPLER_METHOD: *const c_char = b"GstVideoConverter.chroma-resampler-method\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_DEST_HEIGHT: *const c_char = b"GstVideoConverter.dest-height\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_DEST_WIDTH: *const c_char = b"GstVideoConverter.dest-width\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_DEST_X: *const c_char = b"GstVideoConverter.dest-x\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_DEST_Y: *const c_char = b"GstVideoConverter.dest-y\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_DITHER_METHOD: *const c_char = b"GstVideoConverter.dither-method\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_DITHER_QUANTIZATION: *const c_char = b"GstVideoConverter.dither-quantization\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_FILL_BORDER: *const c_char = b"GstVideoConverter.fill-border\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_GAMMA_MODE: *const c_char = b"GstVideoConverter.gamma-mode\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_MATRIX_MODE: *const c_char = b"GstVideoConverter.matrix-mode\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_PRIMARIES_MODE: *const c_char = b"GstVideoConverter.primaries-mode\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_RESAMPLER_METHOD: *const c_char = b"GstVideoConverter.resampler-method\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_RESAMPLER_TAPS: *const c_char = b"GstVideoConverter.resampler-taps\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_SRC_HEIGHT: *const c_char = b"GstVideoConverter.src-height\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_SRC_WIDTH: *const c_char = b"GstVideoConverter.src-width\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_SRC_X: *const c_char = b"GstVideoConverter.src-x\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_SRC_Y: *const c_char = b"GstVideoConverter.src-y\0" as *const u8 as *const c_char; -pub const GST_VIDEO_CONVERTER_OPT_THREADS: *const c_char = b"GstVideoConverter.threads\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_ALPHA_MODE: *const c_char = + b"GstVideoConverter.alpha-mode\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE: *const c_char = + b"GstVideoConverter.alpha-value\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_BORDER_ARGB: *const c_char = + b"GstVideoConverter.border-argb\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_CHROMA_MODE: *const c_char = + b"GstVideoConverter.chroma-mode\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_CHROMA_RESAMPLER_METHOD: *const c_char = + b"GstVideoConverter.chroma-resampler-method\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_DEST_HEIGHT: *const c_char = + b"GstVideoConverter.dest-height\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_DEST_WIDTH: *const c_char = + b"GstVideoConverter.dest-width\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_DEST_X: *const c_char = + b"GstVideoConverter.dest-x\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_DEST_Y: *const c_char = + b"GstVideoConverter.dest-y\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_DITHER_METHOD: *const c_char = + b"GstVideoConverter.dither-method\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_DITHER_QUANTIZATION: *const c_char = + b"GstVideoConverter.dither-quantization\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_FILL_BORDER: *const c_char = + b"GstVideoConverter.fill-border\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_GAMMA_MODE: *const c_char = + b"GstVideoConverter.gamma-mode\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_MATRIX_MODE: *const c_char = + b"GstVideoConverter.matrix-mode\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_PRIMARIES_MODE: *const c_char = + b"GstVideoConverter.primaries-mode\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_RESAMPLER_METHOD: *const c_char = + b"GstVideoConverter.resampler-method\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_RESAMPLER_TAPS: *const c_char = + b"GstVideoConverter.resampler-taps\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_SRC_HEIGHT: *const c_char = + b"GstVideoConverter.src-height\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_SRC_WIDTH: *const c_char = + b"GstVideoConverter.src-width\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_SRC_X: *const c_char = + b"GstVideoConverter.src-x\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_SRC_Y: *const c_char = + b"GstVideoConverter.src-y\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_THREADS: *const c_char = + b"GstVideoConverter.threads\0" as *const u8 as *const c_char; pub const GST_VIDEO_DECODER_MAX_ERRORS: c_int = 10; pub const GST_VIDEO_DECODER_SINK_NAME: *const c_char = b"sink\0" as *const u8 as *const c_char; pub const GST_VIDEO_DECODER_SRC_NAME: *const c_char = b"src\0" as *const u8 as *const c_char; pub const GST_VIDEO_ENCODER_SINK_NAME: *const c_char = b"sink\0" as *const u8 as *const c_char; pub const GST_VIDEO_ENCODER_SRC_NAME: *const c_char = b"src\0" as *const u8 as *const c_char; pub const GST_VIDEO_FORMATS_ALL: *const c_char = b"{ I420, YV12, YUY2, UYVY, AYUV, VUYA, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, Y210, Y410, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, BGR10A2_LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32, NV12_10LE40 }\0" as *const u8 as *const c_char; -pub const GST_VIDEO_FPS_RANGE: *const c_char = b"(fraction) [ 0, max ]\0" as *const u8 as *const c_char; +pub const GST_VIDEO_FPS_RANGE: *const c_char = + b"(fraction) [ 0, max ]\0" as *const u8 as *const c_char; pub const GST_VIDEO_MAX_COMPONENTS: c_int = 4; pub const GST_VIDEO_MAX_PLANES: c_int = 4; pub const GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS: *const c_char = b"{ BGRx, RGBx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, I420, YV12, AYUV, YUY2, UYVY, v308, Y41B, Y42B, Y444, NV12, NV21, A420, YUV9, YVU9, IYU1, GRAY8 }\0" as *const u8 as *const c_char; -pub const GST_VIDEO_RESAMPLER_OPT_CUBIC_B: *const c_char = b"GstVideoResampler.cubic-b\0" as *const u8 as *const c_char; -pub const GST_VIDEO_RESAMPLER_OPT_CUBIC_C: *const c_char = b"GstVideoResampler.cubic-c\0" as *const u8 as *const c_char; -pub const GST_VIDEO_RESAMPLER_OPT_ENVELOPE: *const c_char = b"GstVideoResampler.envelope\0" as *const u8 as *const c_char; -pub const GST_VIDEO_RESAMPLER_OPT_MAX_TAPS: *const c_char = b"GstVideoResampler.max-taps\0" as *const u8 as *const c_char; -pub const GST_VIDEO_RESAMPLER_OPT_SHARPEN: *const c_char = b"GstVideoResampler.sharpen\0" as *const u8 as *const c_char; -pub const GST_VIDEO_RESAMPLER_OPT_SHARPNESS: *const c_char = b"GstVideoResampler.sharpness\0" as *const u8 as *const c_char; -pub const GST_VIDEO_SCALER_OPT_DITHER_METHOD: *const c_char = b"GstVideoScaler.dither-method\0" as *const u8 as *const c_char; +pub const GST_VIDEO_RESAMPLER_OPT_CUBIC_B: *const c_char = + b"GstVideoResampler.cubic-b\0" as *const u8 as *const c_char; +pub const GST_VIDEO_RESAMPLER_OPT_CUBIC_C: *const c_char = + b"GstVideoResampler.cubic-c\0" as *const u8 as *const c_char; +pub const GST_VIDEO_RESAMPLER_OPT_ENVELOPE: *const c_char = + b"GstVideoResampler.envelope\0" as *const u8 as *const c_char; +pub const GST_VIDEO_RESAMPLER_OPT_MAX_TAPS: *const c_char = + b"GstVideoResampler.max-taps\0" as *const u8 as *const c_char; +pub const GST_VIDEO_RESAMPLER_OPT_SHARPEN: *const c_char = + b"GstVideoResampler.sharpen\0" as *const u8 as *const c_char; +pub const GST_VIDEO_RESAMPLER_OPT_SHARPNESS: *const c_char = + b"GstVideoResampler.sharpness\0" as *const u8 as *const c_char; +pub const GST_VIDEO_SCALER_OPT_DITHER_METHOD: *const c_char = + b"GstVideoScaler.dither-method\0" as *const u8 as *const c_char; pub const GST_VIDEO_SIZE_RANGE: *const c_char = b"(int) [ 1, max ]\0" as *const u8 as *const c_char; pub const GST_VIDEO_TILE_TYPE_MASK: c_int = 65535; pub const GST_VIDEO_TILE_TYPE_SHIFT: c_int = 16; @@ -526,10 +574,13 @@ pub union GstVideoCodecFrame_abidata { impl ::std::fmt::Debug for GstVideoCodecFrame_abidata { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstVideoCodecFrame_abidata @ {:?}", self as *const _)) - .field("ABI", unsafe { &self.ABI }) - .field("padding", unsafe { &self.padding }) - .finish() + f.debug_struct(&format!( + "GstVideoCodecFrame_abidata @ {:?}", + self as *const _ + )) + .field("ABI", unsafe { &self.ABI }) + .field("padding", unsafe { &self.padding }) + .finish() } } @@ -543,17 +594,43 @@ pub union GstVideoInfo_ABI { impl ::std::fmt::Debug for GstVideoInfo_ABI { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoInfo_ABI @ {:?}", self as *const _)) - .field("abi", unsafe { &self.abi }) - .finish() + .field("abi", unsafe { &self.abi }) + .finish() } } // Callbacks -pub type GstVideoAffineTransformationGetMatrix = Option gboolean>; -pub type GstVideoConvertSampleCallback = Option; -pub type GstVideoFormatPack = Option; -pub type GstVideoFormatUnpack = Option; -pub type GstVideoGLTextureUpload = Option gboolean>; +pub type GstVideoAffineTransformationGetMatrix = + Option gboolean>; +pub type GstVideoConvertSampleCallback = + Option; +pub type GstVideoFormatPack = Option< + unsafe extern "C" fn( + *const GstVideoFormatInfo, + GstVideoPackFlags, + gpointer, + c_int, + *mut gpointer, + *const c_int, + GstVideoChromaSite, + c_int, + c_int, + ), +>; +pub type GstVideoFormatUnpack = Option< + unsafe extern "C" fn( + *const GstVideoFormatInfo, + GstVideoPackFlags, + gpointer, + *const gpointer, + *const c_int, + c_int, + c_int, + c_int, + ), +>; +pub type GstVideoGLTextureUpload = + Option gboolean>; // Records #[repr(C)] @@ -566,10 +643,13 @@ pub struct GstColorBalanceChannelClass { impl ::std::fmt::Debug for GstColorBalanceChannelClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstColorBalanceChannelClass @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("value_changed", &self.value_changed) - .finish() + f.debug_struct(&format!( + "GstColorBalanceChannelClass @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .field("value_changed", &self.value_changed) + .finish() } } @@ -578,23 +658,29 @@ impl ::std::fmt::Debug for GstColorBalanceChannelClass { pub struct GstColorBalanceInterface { pub iface: gobject::GTypeInterface, pub list_channels: Option *const glib::GList>, - pub set_value: Option, - pub get_value: Option c_int>, + pub set_value: + Option, + pub get_value: + Option c_int>, pub get_balance_type: Option GstColorBalanceType>, - pub value_changed: Option, + pub value_changed: + Option, pub _gst_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstColorBalanceInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstColorBalanceInterface @ {:?}", self as *const _)) - .field("iface", &self.iface) - .field("list_channels", &self.list_channels) - .field("set_value", &self.set_value) - .field("get_value", &self.get_value) - .field("get_balance_type", &self.get_balance_type) - .field("value_changed", &self.value_changed) - .finish() + f.debug_struct(&format!( + "GstColorBalanceInterface @ {:?}", + self as *const _ + )) + .field("iface", &self.iface) + .field("list_channels", &self.list_channels) + .field("set_value", &self.set_value) + .field("get_value", &self.get_value) + .field("get_balance_type", &self.get_balance_type) + .field("value_changed", &self.value_changed) + .finish() } } @@ -608,9 +694,9 @@ pub struct GstNavigationInterface { impl ::std::fmt::Debug for GstNavigationInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstNavigationInterface @ {:?}", self as *const _)) - .field("iface", &self.iface) - .field("send_event", &self.send_event) - .finish() + .field("iface", &self.iface) + .field("send_event", &self.send_event) + .finish() } } @@ -623,10 +709,13 @@ pub struct GstVideoAffineTransformationMeta { impl ::std::fmt::Debug for GstVideoAffineTransformationMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstVideoAffineTransformationMeta @ {:?}", self as *const _)) - .field("meta", &self.meta) - .field("matrix", &self.matrix) - .finish() + f.debug_struct(&format!( + "GstVideoAffineTransformationMeta @ {:?}", + self as *const _ + )) + .field("meta", &self.meta) + .field("matrix", &self.matrix) + .finish() } } @@ -634,21 +723,40 @@ impl ::std::fmt::Debug for GstVideoAffineTransformationMeta { #[derive(Copy, Clone)] pub struct GstVideoAggregatorClass { pub parent_class: gst_base::GstAggregatorClass, - pub update_caps: Option *mut gst::GstCaps>, - pub aggregate_frames: Option gst::GstFlowReturn>, - pub create_output_buffer: Option gst::GstFlowReturn>, - pub find_best_format: Option, + pub update_caps: Option< + unsafe extern "C" fn(*mut GstVideoAggregator, *mut gst::GstCaps) -> *mut gst::GstCaps, + >, + pub aggregate_frames: Option< + unsafe extern "C" fn( + *mut GstVideoAggregator, + *mut *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, + >, + pub create_output_buffer: Option< + unsafe extern "C" fn( + *mut GstVideoAggregator, + *mut *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, + >, + pub find_best_format: Option< + unsafe extern "C" fn( + *mut GstVideoAggregator, + *mut gst::GstCaps, + *mut GstVideoInfo, + *mut gboolean, + ), + >, pub _gst_reserved: [gpointer; 20], } impl ::std::fmt::Debug for GstVideoAggregatorClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoAggregatorClass @ {:?}", self as *const _)) - .field("update_caps", &self.update_caps) - .field("aggregate_frames", &self.aggregate_frames) - .field("create_output_buffer", &self.create_output_buffer) - .field("find_best_format", &self.find_best_format) - .finish() + .field("update_caps", &self.update_caps) + .field("aggregate_frames", &self.aggregate_frames) + .field("create_output_buffer", &self.create_output_buffer) + .field("find_best_format", &self.find_best_format) + .finish() } } @@ -656,16 +764,25 @@ impl ::std::fmt::Debug for GstVideoAggregatorClass { #[derive(Copy, Clone)] pub struct GstVideoAggregatorConvertPadClass { pub parent_class: GstVideoAggregatorPadClass, - pub create_conversion_info: Option, + pub create_conversion_info: Option< + unsafe extern "C" fn( + *mut GstVideoAggregatorConvertPad, + *mut GstVideoAggregator, + *mut GstVideoInfo, + ), + >, pub _gst_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstVideoAggregatorConvertPadClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstVideoAggregatorConvertPadClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("create_conversion_info", &self.create_conversion_info) - .finish() + f.debug_struct(&format!( + "GstVideoAggregatorConvertPadClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("create_conversion_info", &self.create_conversion_info) + .finish() } } @@ -679,20 +796,36 @@ pub type GstVideoAggregatorConvertPadPrivate = *mut _GstVideoAggregatorConvertPa pub struct GstVideoAggregatorPadClass { pub parent_class: gst_base::GstAggregatorPadClass, pub update_conversion_info: Option, - pub prepare_frame: Option gboolean>, - pub clean_frame: Option, + pub prepare_frame: Option< + unsafe extern "C" fn( + *mut GstVideoAggregatorPad, + *mut GstVideoAggregator, + *mut gst::GstBuffer, + *mut GstVideoFrame, + ) -> gboolean, + >, + pub clean_frame: Option< + unsafe extern "C" fn( + *mut GstVideoAggregatorPad, + *mut GstVideoAggregator, + *mut GstVideoFrame, + ), + >, pub _gst_reserved: [gpointer; 20], } impl ::std::fmt::Debug for GstVideoAggregatorPadClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstVideoAggregatorPadClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("update_conversion_info", &self.update_conversion_info) - .field("prepare_frame", &self.prepare_frame) - .field("clean_frame", &self.clean_frame) - .field("_gst_reserved", &self._gst_reserved) - .finish() + f.debug_struct(&format!( + "GstVideoAggregatorPadClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("update_conversion_info", &self.update_conversion_info) + .field("prepare_frame", &self.prepare_frame) + .field("clean_frame", &self.clean_frame) + .field("_gst_reserved", &self._gst_reserved) + .finish() } } @@ -719,12 +852,12 @@ pub struct GstVideoAlignment { impl ::std::fmt::Debug for GstVideoAlignment { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoAlignment @ {:?}", self as *const _)) - .field("padding_top", &self.padding_top) - .field("padding_bottom", &self.padding_bottom) - .field("padding_left", &self.padding_left) - .field("padding_right", &self.padding_right) - .field("stride_align", &self.stride_align) - .finish() + .field("padding_top", &self.padding_top) + .field("padding_bottom", &self.padding_bottom) + .field("padding_left", &self.padding_left) + .field("padding_right", &self.padding_right) + .field("stride_align", &self.stride_align) + .finish() } } @@ -741,10 +874,10 @@ pub struct GstVideoAncillary { impl ::std::fmt::Debug for GstVideoAncillary { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoAncillary @ {:?}", self as *const _)) - .field("DID", &self.DID) - .field("SDID_block_number", &self.SDID_block_number) - .field("data_count", &self.data_count) - .finish() + .field("DID", &self.DID) + .field("SDID_block_number", &self.SDID_block_number) + .field("data_count", &self.data_count) + .finish() } } @@ -757,8 +890,8 @@ pub struct GstVideoBufferPoolClass { impl ::std::fmt::Debug for GstVideoBufferPoolClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoBufferPoolClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .finish() + .field("parent_class", &self.parent_class) + .finish() } } @@ -779,11 +912,11 @@ pub struct GstVideoCaptionMeta { impl ::std::fmt::Debug for GstVideoCaptionMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoCaptionMeta @ {:?}", self as *const _)) - .field("meta", &self.meta) - .field("caption_type", &self.caption_type) - .field("data", &self.data) - .field("size", &self.size) - .finish() + .field("meta", &self.meta) + .field("caption_type", &self.caption_type) + .field("data", &self.data) + .field("size", &self.size) + .finish() } } @@ -816,16 +949,16 @@ pub struct GstVideoCodecFrame { impl ::std::fmt::Debug for GstVideoCodecFrame { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoCodecFrame @ {:?}", self as *const _)) - .field("system_frame_number", &self.system_frame_number) - .field("dts", &self.dts) - .field("pts", &self.pts) - .field("duration", &self.duration) - .field("distance_from_sync", &self.distance_from_sync) - .field("input_buffer", &self.input_buffer) - .field("output_buffer", &self.output_buffer) - .field("deadline", &self.deadline) - .field("abidata", &self.abidata) - .finish() + .field("system_frame_number", &self.system_frame_number) + .field("dts", &self.dts) + .field("pts", &self.pts) + .field("duration", &self.duration) + .field("distance_from_sync", &self.distance_from_sync) + .field("input_buffer", &self.input_buffer) + .field("output_buffer", &self.output_buffer) + .field("deadline", &self.deadline) + .field("abidata", &self.abidata) + .finish() } } @@ -838,10 +971,13 @@ pub struct GstVideoCodecFrame_abidata_ABI { impl ::std::fmt::Debug for GstVideoCodecFrame_abidata_ABI { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstVideoCodecFrame_abidata_ABI @ {:?}", self as *const _)) - .field("ts", &self.ts) - .field("ts2", &self.ts2) - .finish() + f.debug_struct(&format!( + "GstVideoCodecFrame_abidata_ABI @ {:?}", + self as *const _ + )) + .field("ts", &self.ts) + .field("ts2", &self.ts2) + .finish() } } @@ -859,11 +995,11 @@ pub struct GstVideoCodecState { impl ::std::fmt::Debug for GstVideoCodecState { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoCodecState @ {:?}", self as *const _)) - .field("info", &self.info) - .field("caps", &self.caps) - .field("codec_data", &self.codec_data) - .field("allocation_caps", &self.allocation_caps) - .finish() + .field("info", &self.info) + .field("caps", &self.caps) + .field("codec_data", &self.codec_data) + .field("allocation_caps", &self.allocation_caps) + .finish() } } @@ -883,17 +1019,20 @@ pub struct GstVideoColorPrimariesInfo { impl ::std::fmt::Debug for GstVideoColorPrimariesInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstVideoColorPrimariesInfo @ {:?}", self as *const _)) - .field("primaries", &self.primaries) - .field("Wx", &self.Wx) - .field("Wy", &self.Wy) - .field("Rx", &self.Rx) - .field("Ry", &self.Ry) - .field("Gx", &self.Gx) - .field("Gy", &self.Gy) - .field("Bx", &self.Bx) - .field("By", &self.By) - .finish() + f.debug_struct(&format!( + "GstVideoColorPrimariesInfo @ {:?}", + self as *const _ + )) + .field("primaries", &self.primaries) + .field("Wx", &self.Wx) + .field("Wy", &self.Wy) + .field("Rx", &self.Rx) + .field("Ry", &self.Ry) + .field("Gx", &self.Gx) + .field("Gy", &self.Gy) + .field("Bx", &self.Bx) + .field("By", &self.By) + .finish() } } @@ -909,11 +1048,11 @@ pub struct GstVideoColorimetry { impl ::std::fmt::Debug for GstVideoColorimetry { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoColorimetry @ {:?}", self as *const _)) - .field("range", &self.range) - .field("matrix", &self.matrix) - .field("transfer", &self.transfer) - .field("primaries", &self.primaries) - .finish() + .field("range", &self.range) + .field("matrix", &self.matrix) + .field("transfer", &self.transfer) + .field("primaries", &self.primaries) + .finish() } } @@ -935,12 +1074,12 @@ pub struct GstVideoCropMeta { impl ::std::fmt::Debug for GstVideoCropMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoCropMeta @ {:?}", self as *const _)) - .field("meta", &self.meta) - .field("x", &self.x) - .field("y", &self.y) - .field("width", &self.width) - .field("height", &self.height) - .finish() + .field("meta", &self.meta) + .field("x", &self.x) + .field("y", &self.y) + .field("width", &self.width) + .field("height", &self.height) + .finish() } } @@ -952,49 +1091,72 @@ pub struct GstVideoDecoderClass { pub close: Option gboolean>, pub start: Option gboolean>, pub stop: Option gboolean>, - pub parse: Option gst::GstFlowReturn>, - pub set_format: Option gboolean>, + pub parse: Option< + unsafe extern "C" fn( + *mut GstVideoDecoder, + *mut GstVideoCodecFrame, + *mut gst_base::GstAdapter, + gboolean, + ) -> gst::GstFlowReturn, + >, + pub set_format: + Option gboolean>, pub reset: Option gboolean>, pub finish: Option gst::GstFlowReturn>, - pub handle_frame: Option gst::GstFlowReturn>, - pub sink_event: Option gboolean>, - pub src_event: Option gboolean>, + pub handle_frame: Option< + unsafe extern "C" fn(*mut GstVideoDecoder, *mut GstVideoCodecFrame) -> gst::GstFlowReturn, + >, + pub sink_event: + Option gboolean>, + pub src_event: + Option gboolean>, pub negotiate: Option gboolean>, - pub decide_allocation: Option gboolean>, - pub propose_allocation: Option gboolean>, + pub decide_allocation: + Option gboolean>, + pub propose_allocation: + Option gboolean>, pub flush: Option gboolean>, - pub sink_query: Option gboolean>, - pub src_query: Option gboolean>, - pub getcaps: Option *mut gst::GstCaps>, + pub sink_query: + Option gboolean>, + pub src_query: + Option gboolean>, + pub getcaps: + Option *mut gst::GstCaps>, pub drain: Option gst::GstFlowReturn>, - pub transform_meta: Option gboolean>, + pub transform_meta: Option< + unsafe extern "C" fn( + *mut GstVideoDecoder, + *mut GstVideoCodecFrame, + *mut gst::GstMeta, + ) -> gboolean, + >, pub padding: [gpointer; 14], } impl ::std::fmt::Debug for GstVideoDecoderClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoDecoderClass @ {:?}", self as *const _)) - .field("open", &self.open) - .field("close", &self.close) - .field("start", &self.start) - .field("stop", &self.stop) - .field("parse", &self.parse) - .field("set_format", &self.set_format) - .field("reset", &self.reset) - .field("finish", &self.finish) - .field("handle_frame", &self.handle_frame) - .field("sink_event", &self.sink_event) - .field("src_event", &self.src_event) - .field("negotiate", &self.negotiate) - .field("decide_allocation", &self.decide_allocation) - .field("propose_allocation", &self.propose_allocation) - .field("flush", &self.flush) - .field("sink_query", &self.sink_query) - .field("src_query", &self.src_query) - .field("getcaps", &self.getcaps) - .field("drain", &self.drain) - .field("transform_meta", &self.transform_meta) - .finish() + .field("open", &self.open) + .field("close", &self.close) + .field("start", &self.start) + .field("stop", &self.stop) + .field("parse", &self.parse) + .field("set_format", &self.set_format) + .field("reset", &self.reset) + .field("finish", &self.finish) + .field("handle_frame", &self.handle_frame) + .field("sink_event", &self.sink_event) + .field("src_event", &self.src_event) + .field("negotiate", &self.negotiate) + .field("decide_allocation", &self.decide_allocation) + .field("propose_allocation", &self.propose_allocation) + .field("flush", &self.flush) + .field("sink_query", &self.sink_query) + .field("src_query", &self.src_query) + .field("getcaps", &self.getcaps) + .field("drain", &self.drain) + .field("transform_meta", &self.transform_meta) + .finish() } } @@ -1011,9 +1173,12 @@ pub struct GstVideoDirectionInterface { impl ::std::fmt::Debug for GstVideoDirectionInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstVideoDirectionInterface @ {:?}", self as *const _)) - .field("iface", &self.iface) - .finish() + f.debug_struct(&format!( + "GstVideoDirectionInterface @ {:?}", + self as *const _ + )) + .field("iface", &self.iface) + .finish() } } @@ -1030,47 +1195,65 @@ pub struct GstVideoEncoderClass { pub close: Option gboolean>, pub start: Option gboolean>, pub stop: Option gboolean>, - pub set_format: Option gboolean>, - pub handle_frame: Option gst::GstFlowReturn>, + pub set_format: + Option gboolean>, + pub handle_frame: Option< + unsafe extern "C" fn(*mut GstVideoEncoder, *mut GstVideoCodecFrame) -> gst::GstFlowReturn, + >, pub reset: Option gboolean>, pub finish: Option gst::GstFlowReturn>, - pub pre_push: Option gst::GstFlowReturn>, - pub getcaps: Option *mut gst::GstCaps>, - pub sink_event: Option gboolean>, - pub src_event: Option gboolean>, + pub pre_push: Option< + unsafe extern "C" fn(*mut GstVideoEncoder, *mut GstVideoCodecFrame) -> gst::GstFlowReturn, + >, + pub getcaps: + Option *mut gst::GstCaps>, + pub sink_event: + Option gboolean>, + pub src_event: + Option gboolean>, pub negotiate: Option gboolean>, - pub decide_allocation: Option gboolean>, - pub propose_allocation: Option gboolean>, + pub decide_allocation: + Option gboolean>, + pub propose_allocation: + Option gboolean>, pub flush: Option gboolean>, - pub sink_query: Option gboolean>, - pub src_query: Option gboolean>, - pub transform_meta: Option gboolean>, + pub sink_query: + Option gboolean>, + pub src_query: + Option gboolean>, + pub transform_meta: Option< + unsafe extern "C" fn( + *mut GstVideoEncoder, + *mut GstVideoCodecFrame, + *mut gst::GstMeta, + ) -> gboolean, + >, pub _gst_reserved: [gpointer; 16], } impl ::std::fmt::Debug for GstVideoEncoderClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoEncoderClass @ {:?}", self as *const _)) - .field("open", &self.open) - .field("close", &self.close) - .field("start", &self.start) - .field("stop", &self.stop) - .field("set_format", &self.set_format) - .field("handle_frame", &self.handle_frame) - .field("reset", &self.reset) - .field("finish", &self.finish) - .field("pre_push", &self.pre_push) - .field("getcaps", &self.getcaps) - .field("sink_event", &self.sink_event) - .field("src_event", &self.src_event) - .field("negotiate", &self.negotiate) - .field("decide_allocation", &self.decide_allocation) - .field("propose_allocation", &self.propose_allocation) - .field("flush", &self.flush) - .field("sink_query", &self.sink_query) - .field("src_query", &self.src_query) - .field("transform_meta", &self.transform_meta) - .finish() + .field("open", &self.open) + .field("close", &self.close) + .field("start", &self.start) + .field("stop", &self.stop) + .field("set_format", &self.set_format) + .field("handle_frame", &self.handle_frame) + .field("reset", &self.reset) + .field("finish", &self.finish) + .field("pre_push", &self.pre_push) + .field("getcaps", &self.getcaps) + .field("sink_event", &self.sink_event) + .field("src_event", &self.src_event) + .field("negotiate", &self.negotiate) + .field("decide_allocation", &self.decide_allocation) + .field("propose_allocation", &self.propose_allocation) + .field("flush", &self.flush) + .field("sink_query", &self.sink_query) + .field("src_query", &self.src_query) + .field("transform_meta", &self.transform_meta) + .finish() } } @@ -1083,20 +1266,35 @@ pub type GstVideoEncoderPrivate = *mut _GstVideoEncoderPrivate; #[derive(Copy, Clone)] pub struct GstVideoFilterClass { pub parent_class: gst_base::GstBaseTransformClass, - pub set_info: Option gboolean>, - pub transform_frame: Option gst::GstFlowReturn>, - pub transform_frame_ip: Option gst::GstFlowReturn>, + pub set_info: Option< + unsafe extern "C" fn( + *mut GstVideoFilter, + *mut gst::GstCaps, + *mut GstVideoInfo, + *mut gst::GstCaps, + *mut GstVideoInfo, + ) -> gboolean, + >, + pub transform_frame: Option< + unsafe extern "C" fn( + *mut GstVideoFilter, + *mut GstVideoFrame, + *mut GstVideoFrame, + ) -> gst::GstFlowReturn, + >, + pub transform_frame_ip: + Option gst::GstFlowReturn>, pub _gst_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstVideoFilterClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoFilterClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("set_info", &self.set_info) - .field("transform_frame", &self.transform_frame) - .field("transform_frame_ip", &self.transform_frame_ip) - .finish() + .field("parent_class", &self.parent_class) + .field("set_info", &self.set_info) + .field("transform_frame", &self.transform_frame) + .field("transform_frame_ip", &self.transform_frame_ip) + .finish() } } @@ -1130,28 +1328,28 @@ pub struct GstVideoFormatInfo { impl ::std::fmt::Debug for GstVideoFormatInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoFormatInfo @ {:?}", self as *const _)) - .field("format", &self.format) - .field("name", &self.name) - .field("description", &self.description) - .field("flags", &self.flags) - .field("bits", &self.bits) - .field("n_components", &self.n_components) - .field("shift", &self.shift) - .field("depth", &self.depth) - .field("pixel_stride", &self.pixel_stride) - .field("n_planes", &self.n_planes) - .field("plane", &self.plane) - .field("poffset", &self.poffset) - .field("w_sub", &self.w_sub) - .field("h_sub", &self.h_sub) - .field("unpack_format", &self.unpack_format) - .field("unpack_func", &self.unpack_func) - .field("pack_lines", &self.pack_lines) - .field("pack_func", &self.pack_func) - .field("tile_mode", &self.tile_mode) - .field("tile_ws", &self.tile_ws) - .field("tile_hs", &self.tile_hs) - .finish() + .field("format", &self.format) + .field("name", &self.name) + .field("description", &self.description) + .field("flags", &self.flags) + .field("bits", &self.bits) + .field("n_components", &self.n_components) + .field("shift", &self.shift) + .field("depth", &self.depth) + .field("pixel_stride", &self.pixel_stride) + .field("n_planes", &self.n_planes) + .field("plane", &self.plane) + .field("poffset", &self.poffset) + .field("w_sub", &self.w_sub) + .field("h_sub", &self.h_sub) + .field("unpack_format", &self.unpack_format) + .field("unpack_func", &self.unpack_func) + .field("pack_lines", &self.pack_lines) + .field("pack_func", &self.pack_func) + .field("tile_mode", &self.tile_mode) + .field("tile_ws", &self.tile_ws) + .field("tile_hs", &self.tile_hs) + .finish() } } @@ -1171,14 +1369,14 @@ pub struct GstVideoFrame { impl ::std::fmt::Debug for GstVideoFrame { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoFrame @ {:?}", self as *const _)) - .field("info", &self.info) - .field("flags", &self.flags) - .field("buffer", &self.buffer) - .field("meta", &self.meta) - .field("id", &self.id) - .field("data", &self.data) - .field("map", &self.map) - .finish() + .field("info", &self.info) + .field("flags", &self.flags) + .field("buffer", &self.buffer) + .field("meta", &self.meta) + .field("id", &self.id) + .field("data", &self.data) + .field("map", &self.map) + .finish() } } @@ -1198,12 +1396,15 @@ pub struct GstVideoGLTextureUploadMeta { impl ::std::fmt::Debug for GstVideoGLTextureUploadMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstVideoGLTextureUploadMeta @ {:?}", self as *const _)) - .field("meta", &self.meta) - .field("texture_orientation", &self.texture_orientation) - .field("n_textures", &self.n_textures) - .field("texture_type", &self.texture_type) - .finish() + f.debug_struct(&format!( + "GstVideoGLTextureUploadMeta @ {:?}", + self as *const _ + )) + .field("meta", &self.meta) + .field("texture_orientation", &self.texture_orientation) + .field("n_textures", &self.n_textures) + .field("texture_type", &self.texture_type) + .finish() } } @@ -1231,23 +1432,23 @@ pub struct GstVideoInfo { impl ::std::fmt::Debug for GstVideoInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoInfo @ {:?}", self as *const _)) - .field("finfo", &self.finfo) - .field("interlace_mode", &self.interlace_mode) - .field("flags", &self.flags) - .field("width", &self.width) - .field("height", &self.height) - .field("size", &self.size) - .field("views", &self.views) - .field("chroma_site", &self.chroma_site) - .field("colorimetry", &self.colorimetry) - .field("par_n", &self.par_n) - .field("par_d", &self.par_d) - .field("fps_n", &self.fps_n) - .field("fps_d", &self.fps_d) - .field("offset", &self.offset) - .field("stride", &self.stride) - .field("ABI", &self.ABI) - .finish() + .field("finfo", &self.finfo) + .field("interlace_mode", &self.interlace_mode) + .field("flags", &self.flags) + .field("width", &self.width) + .field("height", &self.height) + .field("size", &self.size) + .field("views", &self.views) + .field("chroma_site", &self.chroma_site) + .field("colorimetry", &self.colorimetry) + .field("par_n", &self.par_n) + .field("par_d", &self.par_d) + .field("fps_n", &self.fps_n) + .field("fps_d", &self.fps_d) + .field("offset", &self.offset) + .field("stride", &self.stride) + .field("ABI", &self.ABI) + .finish() } } @@ -1262,10 +1463,10 @@ pub struct GstVideoInfo_ABI_abi { impl ::std::fmt::Debug for GstVideoInfo_ABI_abi { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoInfo_ABI_abi @ {:?}", self as *const _)) - .field("multiview_mode", &self.multiview_mode) - .field("multiview_flags", &self.multiview_flags) - .field("field_order", &self.field_order) - .finish() + .field("multiview_mode", &self.multiview_mode) + .field("multiview_flags", &self.multiview_flags) + .field("field_order", &self.field_order) + .finish() } } @@ -1282,26 +1483,36 @@ pub struct GstVideoMeta { pub n_planes: c_uint, pub offset: [size_t; 4], pub stride: [c_int; 4], - pub map: Option gboolean>, - pub unmap: Option gboolean>, + pub map: Option< + unsafe extern "C" fn( + *mut GstVideoMeta, + c_uint, + *mut gst::GstMapInfo, + *mut gpointer, + *mut c_int, + gst::GstMapFlags, + ) -> gboolean, + >, + pub unmap: + Option gboolean>, } impl ::std::fmt::Debug for GstVideoMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoMeta @ {:?}", self as *const _)) - .field("meta", &self.meta) - .field("buffer", &self.buffer) - .field("flags", &self.flags) - .field("format", &self.format) - .field("id", &self.id) - .field("width", &self.width) - .field("height", &self.height) - .field("n_planes", &self.n_planes) - .field("offset", &self.offset) - .field("stride", &self.stride) - .field("map", &self.map) - .field("unmap", &self.unmap) - .finish() + .field("meta", &self.meta) + .field("buffer", &self.buffer) + .field("flags", &self.flags) + .field("format", &self.format) + .field("id", &self.id) + .field("width", &self.width) + .field("height", &self.height) + .field("n_planes", &self.n_planes) + .field("offset", &self.offset) + .field("stride", &self.stride) + .field("map", &self.map) + .field("unmap", &self.unmap) + .finish() } } @@ -1315,9 +1526,9 @@ pub struct GstVideoMetaTransform { impl ::std::fmt::Debug for GstVideoMetaTransform { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoMetaTransform @ {:?}", self as *const _)) - .field("in_info", &self.in_info) - .field("out_info", &self.out_info) - .finish() + .field("in_info", &self.in_info) + .field("out_info", &self.out_info) + .finish() } } @@ -1337,17 +1548,20 @@ pub struct GstVideoOrientationInterface { impl ::std::fmt::Debug for GstVideoOrientationInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstVideoOrientationInterface @ {:?}", self as *const _)) - .field("iface", &self.iface) - .field("get_hflip", &self.get_hflip) - .field("get_vflip", &self.get_vflip) - .field("get_hcenter", &self.get_hcenter) - .field("get_vcenter", &self.get_vcenter) - .field("set_hflip", &self.set_hflip) - .field("set_vflip", &self.set_vflip) - .field("set_hcenter", &self.set_hcenter) - .field("set_vcenter", &self.set_vcenter) - .finish() + f.debug_struct(&format!( + "GstVideoOrientationInterface @ {:?}", + self as *const _ + )) + .field("iface", &self.iface) + .field("get_hflip", &self.get_hflip) + .field("get_vflip", &self.get_vflip) + .field("get_hcenter", &self.get_hcenter) + .field("get_vcenter", &self.get_vcenter) + .field("set_hflip", &self.set_hflip) + .field("set_vflip", &self.set_vflip) + .field("set_hcenter", &self.set_hcenter) + .field("set_vcenter", &self.set_vcenter) + .finish() } } @@ -1356,8 +1570,11 @@ pub struct GstVideoOverlayComposition(c_void); impl ::std::fmt::Debug for GstVideoOverlayComposition { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstVideoOverlayComposition @ {:?}", self as *const _)) - .finish() + f.debug_struct(&format!( + "GstVideoOverlayComposition @ {:?}", + self as *const _ + )) + .finish() } } @@ -1370,10 +1587,13 @@ pub struct GstVideoOverlayCompositionMeta { impl ::std::fmt::Debug for GstVideoOverlayCompositionMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstVideoOverlayCompositionMeta @ {:?}", self as *const _)) - .field("meta", &self.meta) - .field("overlay", &self.overlay) - .finish() + f.debug_struct(&format!( + "GstVideoOverlayCompositionMeta @ {:?}", + self as *const _ + )) + .field("meta", &self.meta) + .field("overlay", &self.overlay) + .finish() } } @@ -1383,19 +1603,23 @@ pub struct GstVideoOverlayInterface { pub iface: gobject::GTypeInterface, pub expose: Option, pub handle_events: Option, - pub set_render_rectangle: Option, + pub set_render_rectangle: + Option, pub set_window_handle: Option, } impl ::std::fmt::Debug for GstVideoOverlayInterface { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstVideoOverlayInterface @ {:?}", self as *const _)) - .field("iface", &self.iface) - .field("expose", &self.expose) - .field("handle_events", &self.handle_events) - .field("set_render_rectangle", &self.set_render_rectangle) - .field("set_window_handle", &self.set_window_handle) - .finish() + f.debug_struct(&format!( + "GstVideoOverlayInterface @ {:?}", + self as *const _ + )) + .field("iface", &self.iface) + .field("expose", &self.expose) + .field("handle_events", &self.handle_events) + .field("set_render_rectangle", &self.set_render_rectangle) + .field("set_window_handle", &self.set_window_handle) + .finish() } } @@ -1404,8 +1628,11 @@ pub struct GstVideoOverlayRectangle(c_void); impl ::std::fmt::Debug for GstVideoOverlayRectangle { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstVideoOverlayRectangle @ {:?}", self as *const _)) - .finish() + f.debug_struct(&format!( + "GstVideoOverlayRectangle @ {:?}", + self as *const _ + )) + .finish() } } @@ -1421,11 +1648,11 @@ pub struct GstVideoRectangle { impl ::std::fmt::Debug for GstVideoRectangle { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoRectangle @ {:?}", self as *const _)) - .field("x", &self.x) - .field("y", &self.y) - .field("w", &self.w) - .field("h", &self.h) - .finish() + .field("x", &self.x) + .field("y", &self.y) + .field("w", &self.w) + .field("h", &self.h) + .finish() } } @@ -1445,17 +1672,20 @@ pub struct GstVideoRegionOfInterestMeta { impl ::std::fmt::Debug for GstVideoRegionOfInterestMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstVideoRegionOfInterestMeta @ {:?}", self as *const _)) - .field("meta", &self.meta) - .field("roi_type", &self.roi_type) - .field("id", &self.id) - .field("parent_id", &self.parent_id) - .field("x", &self.x) - .field("y", &self.y) - .field("w", &self.w) - .field("h", &self.h) - .field("params", &self.params) - .finish() + f.debug_struct(&format!( + "GstVideoRegionOfInterestMeta @ {:?}", + self as *const _ + )) + .field("meta", &self.meta) + .field("roi_type", &self.roi_type) + .field("id", &self.id) + .field("parent_id", &self.parent_id) + .field("x", &self.x) + .field("y", &self.y) + .field("w", &self.w) + .field("h", &self.h) + .field("params", &self.params) + .finish() } } @@ -1476,15 +1706,15 @@ pub struct GstVideoResampler { impl ::std::fmt::Debug for GstVideoResampler { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoResampler @ {:?}", self as *const _)) - .field("in_size", &self.in_size) - .field("out_size", &self.out_size) - .field("max_taps", &self.max_taps) - .field("n_phases", &self.n_phases) - .field("offset", &self.offset) - .field("phase", &self.phase) - .field("n_taps", &self.n_taps) - .field("taps", &self.taps) - .finish() + .field("in_size", &self.in_size) + .field("out_size", &self.out_size) + .field("max_taps", &self.max_taps) + .field("n_phases", &self.n_phases) + .field("offset", &self.offset) + .field("phase", &self.phase) + .field("n_taps", &self.n_taps) + .field("taps", &self.taps) + .finish() } } @@ -1497,16 +1727,17 @@ pub type GstVideoScaler = *mut _GstVideoScaler; #[derive(Copy, Clone)] pub struct GstVideoSinkClass { pub parent_class: gst_base::GstBaseSinkClass, - pub show_frame: Option gst::GstFlowReturn>, + pub show_frame: + Option gst::GstFlowReturn>, pub _gst_reserved: [gpointer; 4], } impl ::std::fmt::Debug for GstVideoSinkClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoSinkClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("show_frame", &self.show_frame) - .finish() + .field("parent_class", &self.parent_class) + .field("show_frame", &self.show_frame) + .finish() } } @@ -1529,13 +1760,13 @@ pub struct GstVideoTimeCode { impl ::std::fmt::Debug for GstVideoTimeCode { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoTimeCode @ {:?}", self as *const _)) - .field("config", &self.config) - .field("hours", &self.hours) - .field("minutes", &self.minutes) - .field("seconds", &self.seconds) - .field("frames", &self.frames) - .field("field_count", &self.field_count) - .finish() + .field("config", &self.config) + .field("hours", &self.hours) + .field("minutes", &self.minutes) + .field("seconds", &self.seconds) + .field("frames", &self.frames) + .field("field_count", &self.field_count) + .finish() } } @@ -1551,11 +1782,11 @@ pub struct GstVideoTimeCodeConfig { impl ::std::fmt::Debug for GstVideoTimeCodeConfig { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoTimeCodeConfig @ {:?}", self as *const _)) - .field("fps_n", &self.fps_n) - .field("fps_d", &self.fps_d) - .field("flags", &self.flags) - .field("latest_daily_jam", &self.latest_daily_jam) - .finish() + .field("fps_n", &self.fps_n) + .field("fps_d", &self.fps_d) + .field("flags", &self.flags) + .field("latest_daily_jam", &self.latest_daily_jam) + .finish() } } @@ -1570,12 +1801,15 @@ pub struct GstVideoTimeCodeInterval { impl ::std::fmt::Debug for GstVideoTimeCodeInterval { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstVideoTimeCodeInterval @ {:?}", self as *const _)) - .field("hours", &self.hours) - .field("minutes", &self.minutes) - .field("seconds", &self.seconds) - .field("frames", &self.frames) - .finish() + f.debug_struct(&format!( + "GstVideoTimeCodeInterval @ {:?}", + self as *const _ + )) + .field("hours", &self.hours) + .field("minutes", &self.minutes) + .field("seconds", &self.seconds) + .field("frames", &self.frames) + .finish() } } @@ -1589,9 +1823,9 @@ pub struct GstVideoTimeCodeMeta { impl ::std::fmt::Debug for GstVideoTimeCodeMeta { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoTimeCodeMeta @ {:?}", self as *const _)) - .field("meta", &self.meta) - .field("tc", &self.tc) - .finish() + .field("meta", &self.meta) + .field("tc", &self.tc) + .finish() } } @@ -1601,7 +1835,7 @@ pub struct GstVideoVBIEncoder(c_void); impl ::std::fmt::Debug for GstVideoVBIEncoder { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoVBIEncoder @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1611,7 +1845,7 @@ pub struct GstVideoVBIParser(c_void); impl ::std::fmt::Debug for GstVideoVBIParser { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoVBIParser @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1629,11 +1863,11 @@ pub struct GstColorBalanceChannel { impl ::std::fmt::Debug for GstColorBalanceChannel { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstColorBalanceChannel @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("label", &self.label) - .field("min_value", &self.min_value) - .field("max_value", &self.max_value) - .finish() + .field("parent", &self.parent) + .field("label", &self.label) + .field("min_value", &self.min_value) + .field("max_value", &self.max_value) + .finish() } } @@ -1649,9 +1883,9 @@ pub struct GstVideoAggregator { impl ::std::fmt::Debug for GstVideoAggregator { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoAggregator @ {:?}", self as *const _)) - .field("aggregator", &self.aggregator) - .field("info", &self.info) - .finish() + .field("aggregator", &self.aggregator) + .field("info", &self.info) + .finish() } } @@ -1665,8 +1899,11 @@ pub struct GstVideoAggregatorConvertPad { impl ::std::fmt::Debug for GstVideoAggregatorConvertPad { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstVideoAggregatorConvertPad @ {:?}", self as *const _)) - .finish() + f.debug_struct(&format!( + "GstVideoAggregatorConvertPad @ {:?}", + self as *const _ + )) + .finish() } } @@ -1682,9 +1919,9 @@ pub struct GstVideoAggregatorPad { impl ::std::fmt::Debug for GstVideoAggregatorPad { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoAggregatorPad @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("info", &self.info) - .finish() + .field("parent", &self.parent) + .field("info", &self.info) + .finish() } } @@ -1698,9 +1935,9 @@ pub struct GstVideoBufferPool { impl ::std::fmt::Debug for GstVideoBufferPool { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoBufferPool @ {:?}", self as *const _)) - .field("bufferpool", &self.bufferpool) - .field("priv_", &self.priv_) - .finish() + .field("bufferpool", &self.bufferpool) + .field("priv_", &self.priv_) + .finish() } } @@ -1720,7 +1957,7 @@ pub struct GstVideoDecoder { impl ::std::fmt::Debug for GstVideoDecoder { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoDecoder @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1740,7 +1977,7 @@ pub struct GstVideoEncoder { impl ::std::fmt::Debug for GstVideoEncoder { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoEncoder @ {:?}", self as *const _)) - .finish() + .finish() } } @@ -1757,11 +1994,11 @@ pub struct GstVideoFilter { impl ::std::fmt::Debug for GstVideoFilter { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoFilter @ {:?}", self as *const _)) - .field("element", &self.element) - .field("negotiated", &self.negotiated) - .field("in_info", &self.in_info) - .field("out_info", &self.out_info) - .finish() + .field("element", &self.element) + .field("negotiated", &self.negotiated) + .field("in_info", &self.in_info) + .field("out_info", &self.out_info) + .finish() } } @@ -1770,8 +2007,11 @@ pub struct GstVideoMultiviewFlagsSet(c_void); impl ::std::fmt::Debug for GstVideoMultiviewFlagsSet { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstVideoMultiviewFlagsSet @ {:?}", self as *const _)) - .finish() + f.debug_struct(&format!( + "GstVideoMultiviewFlagsSet @ {:?}", + self as *const _ + )) + .finish() } } @@ -1788,10 +2028,10 @@ pub struct GstVideoSink { impl ::std::fmt::Debug for GstVideoSink { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstVideoSink @ {:?}", self as *const _)) - .field("element", &self.element) - .field("width", &self.width) - .field("height", &self.height) - .finish() + .field("element", &self.element) + .field("width", &self.width) + .field("height", &self.height) + .finish() } } @@ -1841,7 +2081,6 @@ impl ::std::fmt::Debug for GstVideoOverlay { } } - extern "C" { //========================================================================= @@ -1908,20 +2147,31 @@ extern "C" { //========================================================================= pub fn gst_video_color_matrix_get_type() -> GType; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_color_matrix_get_Kr_Kb(matrix: GstVideoColorMatrix, Kr: *mut c_double, Kb: *mut c_double) -> gboolean; + pub fn gst_video_color_matrix_get_Kr_Kb( + matrix: GstVideoColorMatrix, + Kr: *mut c_double, + Kb: *mut c_double, + ) -> gboolean; //========================================================================= // GstVideoColorPrimaries //========================================================================= pub fn gst_video_color_primaries_get_type() -> GType; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_color_primaries_get_info(primaries: GstVideoColorPrimaries) -> *const GstVideoColorPrimariesInfo; + pub fn gst_video_color_primaries_get_info( + primaries: GstVideoColorPrimaries, + ) -> *const GstVideoColorPrimariesInfo; //========================================================================= // GstVideoColorRange //========================================================================= pub fn gst_video_color_range_get_type() -> GType; - pub fn gst_video_color_range_offsets(range: GstVideoColorRange, info: *const GstVideoFormatInfo, offset: *mut [c_int; 4], scale: *mut [c_int; 4]); + pub fn gst_video_color_range_offsets( + range: GstVideoColorRange, + info: *const GstVideoFormatInfo, + offset: *mut [c_int; 4], + scale: *mut [c_int; 4], + ); //========================================================================= // GstVideoDitherMethod @@ -1942,11 +2192,20 @@ extern "C" { //========================================================================= pub fn gst_video_format_get_type() -> GType; pub fn gst_video_format_from_fourcc(fourcc: u32) -> GstVideoFormat; - pub fn gst_video_format_from_masks(depth: c_int, bpp: c_int, endianness: c_int, red_mask: c_uint, green_mask: c_uint, blue_mask: c_uint, alpha_mask: c_uint) -> GstVideoFormat; + pub fn gst_video_format_from_masks( + depth: c_int, + bpp: c_int, + endianness: c_int, + red_mask: c_uint, + green_mask: c_uint, + blue_mask: c_uint, + alpha_mask: c_uint, + ) -> GstVideoFormat; pub fn gst_video_format_from_string(format: *const c_char) -> GstVideoFormat; pub fn gst_video_format_get_info(format: GstVideoFormat) -> *const GstVideoFormatInfo; #[cfg(any(feature = "v1_2", feature = "dox"))] - pub fn gst_video_format_get_palette(format: GstVideoFormat, size: *mut size_t) -> gconstpointer; + pub fn gst_video_format_get_palette(format: GstVideoFormat, size: *mut size_t) + -> gconstpointer; pub fn gst_video_format_to_fourcc(format: GstVideoFormat) -> u32; pub fn gst_video_format_to_string(format: GstVideoFormat) -> *const c_char; @@ -1979,9 +2238,13 @@ extern "C" { //========================================================================= pub fn gst_video_multiview_mode_get_type() -> GType; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_multiview_mode_from_caps_string(caps_mview_mode: *const c_char) -> GstVideoMultiviewMode; + pub fn gst_video_multiview_mode_from_caps_string( + caps_mview_mode: *const c_char, + ) -> GstVideoMultiviewMode; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_multiview_mode_to_caps_string(mview_mode: GstVideoMultiviewMode) -> *const c_char; + pub fn gst_video_multiview_mode_to_caps_string( + mview_mode: GstVideoMultiviewMode, + ) -> *const c_char; //========================================================================= // GstVideoOrientationMethod @@ -2087,7 +2350,10 @@ extern "C" { // GstVideoAffineTransformationMeta //========================================================================= #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_video_affine_transformation_meta_apply_matrix(meta: *mut GstVideoAffineTransformationMeta, matrix: *const c_float); + pub fn gst_video_affine_transformation_meta_apply_matrix( + meta: *mut GstVideoAffineTransformationMeta, + matrix: *const c_float, + ); pub fn gst_video_affine_transformation_meta_get_info() -> *const gst::GstMetaInfo; //========================================================================= @@ -2104,8 +2370,19 @@ extern "C" { // GstVideoChromaResample //========================================================================= pub fn gst_video_chroma_resample_free(resample: *mut GstVideoChromaResample); - pub fn gst_video_chroma_resample_get_info(resample: *mut GstVideoChromaResample, n_lines: *mut c_uint, offset: *mut c_int); - pub fn gst_video_chroma_resample_new(method: GstVideoChromaMethod, site: GstVideoChromaSite, flags: GstVideoChromaFlags, format: GstVideoFormat, h_factor: c_int, v_factor: c_int) -> *mut GstVideoChromaResample; + pub fn gst_video_chroma_resample_get_info( + resample: *mut GstVideoChromaResample, + n_lines: *mut c_uint, + offset: *mut c_int, + ); + pub fn gst_video_chroma_resample_new( + method: GstVideoChromaMethod, + site: GstVideoChromaSite, + flags: GstVideoChromaFlags, + format: GstVideoFormat, + h_factor: c_int, + v_factor: c_int, + ) -> *mut GstVideoChromaResample; //========================================================================= // GstVideoCodecFrame @@ -2113,7 +2390,11 @@ extern "C" { pub fn gst_video_codec_frame_get_type() -> GType; pub fn gst_video_codec_frame_get_user_data(frame: *mut GstVideoCodecFrame) -> gpointer; pub fn gst_video_codec_frame_ref(frame: *mut GstVideoCodecFrame) -> *mut GstVideoCodecFrame; - pub fn gst_video_codec_frame_set_user_data(frame: *mut GstVideoCodecFrame, user_data: gpointer, notify: glib::GDestroyNotify); + pub fn gst_video_codec_frame_set_user_data( + frame: *mut GstVideoCodecFrame, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); pub fn gst_video_codec_frame_unref(frame: *mut GstVideoCodecFrame); //========================================================================= @@ -2126,24 +2407,46 @@ extern "C" { //========================================================================= // GstVideoColorimetry //========================================================================= - pub fn gst_video_colorimetry_from_string(cinfo: *mut GstVideoColorimetry, color: *const c_char) -> gboolean; + pub fn gst_video_colorimetry_from_string( + cinfo: *mut GstVideoColorimetry, + color: *const c_char, + ) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_colorimetry_is_equal(cinfo: *const GstVideoColorimetry, other: *const GstVideoColorimetry) -> gboolean; - pub fn gst_video_colorimetry_matches(cinfo: *const GstVideoColorimetry, color: *const c_char) -> gboolean; + pub fn gst_video_colorimetry_is_equal( + cinfo: *const GstVideoColorimetry, + other: *const GstVideoColorimetry, + ) -> gboolean; + pub fn gst_video_colorimetry_matches( + cinfo: *const GstVideoColorimetry, + color: *const c_char, + ) -> gboolean; pub fn gst_video_colorimetry_to_string(cinfo: *const GstVideoColorimetry) -> *mut c_char; //========================================================================= // GstVideoConverter //========================================================================= #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_converter_frame(convert: *mut GstVideoConverter, src: *const GstVideoFrame, dest: *mut GstVideoFrame); + pub fn gst_video_converter_frame( + convert: *mut GstVideoConverter, + src: *const GstVideoFrame, + dest: *mut GstVideoFrame, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_video_converter_free(convert: *mut GstVideoConverter); - pub fn gst_video_converter_get_config(convert: *mut GstVideoConverter) -> *const gst::GstStructure; + pub fn gst_video_converter_get_config( + convert: *mut GstVideoConverter, + ) -> *const gst::GstStructure; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_converter_set_config(convert: *mut GstVideoConverter, config: *mut gst::GstStructure) -> gboolean; + pub fn gst_video_converter_set_config( + convert: *mut GstVideoConverter, + config: *mut gst::GstStructure, + ) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_converter_new(in_info: *mut GstVideoInfo, out_info: *mut GstVideoInfo, config: *mut gst::GstStructure) -> *mut GstVideoConverter; + pub fn gst_video_converter_new( + in_info: *mut GstVideoInfo, + out_info: *mut GstVideoInfo, + config: *mut gst::GstStructure, + ) -> *mut GstVideoConverter; //========================================================================= // GstVideoCropMeta @@ -2154,22 +2457,52 @@ extern "C" { // GstVideoDither //========================================================================= pub fn gst_video_dither_free(dither: *mut GstVideoDither); - pub fn gst_video_dither_line(dither: *mut GstVideoDither, line: gpointer, x: c_uint, y: c_uint, width: c_uint); - pub fn gst_video_dither_new(method: GstVideoDitherMethod, flags: GstVideoDitherFlags, format: GstVideoFormat, quantizer: *mut c_uint, width: c_uint) -> *mut GstVideoDither; + pub fn gst_video_dither_line( + dither: *mut GstVideoDither, + line: gpointer, + x: c_uint, + y: c_uint, + width: c_uint, + ); + pub fn gst_video_dither_new( + method: GstVideoDitherMethod, + flags: GstVideoDitherFlags, + format: GstVideoFormat, + quantizer: *mut c_uint, + width: c_uint, + ) -> *mut GstVideoDither; //========================================================================= // GstVideoFrame //========================================================================= pub fn gst_video_frame_copy(dest: *mut GstVideoFrame, src: *const GstVideoFrame) -> gboolean; - pub fn gst_video_frame_copy_plane(dest: *mut GstVideoFrame, src: *const GstVideoFrame, plane: c_uint) -> gboolean; - pub fn gst_video_frame_map(frame: *mut GstVideoFrame, info: *mut GstVideoInfo, buffer: *mut gst::GstBuffer, flags: gst::GstMapFlags) -> gboolean; - pub fn gst_video_frame_map_id(frame: *mut GstVideoFrame, info: *mut GstVideoInfo, buffer: *mut gst::GstBuffer, id: c_int, flags: gst::GstMapFlags) -> gboolean; + pub fn gst_video_frame_copy_plane( + dest: *mut GstVideoFrame, + src: *const GstVideoFrame, + plane: c_uint, + ) -> gboolean; + pub fn gst_video_frame_map( + frame: *mut GstVideoFrame, + info: *mut GstVideoInfo, + buffer: *mut gst::GstBuffer, + flags: gst::GstMapFlags, + ) -> gboolean; + pub fn gst_video_frame_map_id( + frame: *mut GstVideoFrame, + info: *mut GstVideoInfo, + buffer: *mut gst::GstBuffer, + id: c_int, + flags: gst::GstMapFlags, + ) -> gboolean; pub fn gst_video_frame_unmap(frame: *mut GstVideoFrame); //========================================================================= // GstVideoGLTextureUploadMeta //========================================================================= - pub fn gst_video_gl_texture_upload_meta_upload(meta: *mut GstVideoGLTextureUploadMeta, texture_id: *mut c_uint) -> gboolean; + pub fn gst_video_gl_texture_upload_meta_upload( + meta: *mut GstVideoGLTextureUploadMeta, + texture_id: *mut c_uint, + ) -> gboolean; pub fn gst_video_gl_texture_upload_meta_get_info() -> *const gst::GstMetaInfo; //========================================================================= @@ -2178,25 +2511,58 @@ extern "C" { pub fn gst_video_info_get_type() -> GType; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_video_info_new() -> *mut GstVideoInfo; - pub fn gst_video_info_align(info: *mut GstVideoInfo, align: *mut GstVideoAlignment) -> gboolean; - pub fn gst_video_info_convert(info: *mut GstVideoInfo, src_format: gst::GstFormat, src_value: i64, dest_format: gst::GstFormat, dest_value: *mut i64) -> gboolean; + pub fn gst_video_info_align(info: *mut GstVideoInfo, align: *mut GstVideoAlignment) + -> gboolean; + pub fn gst_video_info_convert( + info: *mut GstVideoInfo, + src_format: gst::GstFormat, + src_value: i64, + dest_format: gst::GstFormat, + dest_value: *mut i64, + ) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_video_info_copy(info: *const GstVideoInfo) -> *mut GstVideoInfo; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_video_info_free(info: *mut GstVideoInfo); - pub fn gst_video_info_from_caps(info: *mut GstVideoInfo, caps: *const gst::GstCaps) -> gboolean; + pub fn gst_video_info_from_caps(info: *mut GstVideoInfo, caps: *const gst::GstCaps) + -> gboolean; pub fn gst_video_info_init(info: *mut GstVideoInfo); - pub fn gst_video_info_is_equal(info: *const GstVideoInfo, other: *const GstVideoInfo) -> gboolean; - pub fn gst_video_info_set_format(info: *mut GstVideoInfo, format: GstVideoFormat, width: c_uint, height: c_uint) -> gboolean; + pub fn gst_video_info_is_equal( + info: *const GstVideoInfo, + other: *const GstVideoInfo, + ) -> gboolean; + pub fn gst_video_info_set_format( + info: *mut GstVideoInfo, + format: GstVideoFormat, + width: c_uint, + height: c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_video_info_set_interlaced_format(info: *mut GstVideoInfo, format: GstVideoFormat, mode: GstVideoInterlaceMode, width: c_uint, height: c_uint) -> gboolean; + pub fn gst_video_info_set_interlaced_format( + info: *mut GstVideoInfo, + format: GstVideoFormat, + mode: GstVideoInterlaceMode, + width: c_uint, + height: c_uint, + ) -> gboolean; pub fn gst_video_info_to_caps(info: *mut GstVideoInfo) -> *mut gst::GstCaps; //========================================================================= // GstVideoMeta //========================================================================= - pub fn gst_video_meta_map(meta: *mut GstVideoMeta, plane: c_uint, info: *mut gst::GstMapInfo, data: *mut gpointer, stride: *mut c_int, flags: gst::GstMapFlags) -> gboolean; - pub fn gst_video_meta_unmap(meta: *mut GstVideoMeta, plane: c_uint, info: *mut gst::GstMapInfo) -> gboolean; + pub fn gst_video_meta_map( + meta: *mut GstVideoMeta, + plane: c_uint, + info: *mut gst::GstMapInfo, + data: *mut gpointer, + stride: *mut c_int, + flags: gst::GstMapFlags, + ) -> gboolean; + pub fn gst_video_meta_unmap( + meta: *mut GstVideoMeta, + plane: c_uint, + info: *mut gst::GstMapInfo, + ) -> gboolean; pub fn gst_video_meta_get_info() -> *const gst::GstMetaInfo; //========================================================================= @@ -2208,14 +2574,33 @@ extern "C" { // GstVideoOverlayComposition //========================================================================= pub fn gst_video_overlay_composition_get_type() -> GType; - pub fn gst_video_overlay_composition_new(rectangle: *mut GstVideoOverlayRectangle) -> *mut GstVideoOverlayComposition; - pub fn gst_video_overlay_composition_add_rectangle(comp: *mut GstVideoOverlayComposition, rectangle: *mut GstVideoOverlayRectangle); - pub fn gst_video_overlay_composition_blend(comp: *mut GstVideoOverlayComposition, video_buf: *mut GstVideoFrame) -> gboolean; - pub fn gst_video_overlay_composition_copy(comp: *mut GstVideoOverlayComposition) -> *mut GstVideoOverlayComposition; - pub fn gst_video_overlay_composition_get_rectangle(comp: *mut GstVideoOverlayComposition, n: c_uint) -> *mut GstVideoOverlayRectangle; - pub fn gst_video_overlay_composition_get_seqnum(comp: *mut GstVideoOverlayComposition) -> c_uint; - pub fn gst_video_overlay_composition_make_writable(comp: *mut GstVideoOverlayComposition) -> *mut GstVideoOverlayComposition; - pub fn gst_video_overlay_composition_n_rectangles(comp: *mut GstVideoOverlayComposition) -> c_uint; + pub fn gst_video_overlay_composition_new( + rectangle: *mut GstVideoOverlayRectangle, + ) -> *mut GstVideoOverlayComposition; + pub fn gst_video_overlay_composition_add_rectangle( + comp: *mut GstVideoOverlayComposition, + rectangle: *mut GstVideoOverlayRectangle, + ); + pub fn gst_video_overlay_composition_blend( + comp: *mut GstVideoOverlayComposition, + video_buf: *mut GstVideoFrame, + ) -> gboolean; + pub fn gst_video_overlay_composition_copy( + comp: *mut GstVideoOverlayComposition, + ) -> *mut GstVideoOverlayComposition; + pub fn gst_video_overlay_composition_get_rectangle( + comp: *mut GstVideoOverlayComposition, + n: c_uint, + ) -> *mut GstVideoOverlayRectangle; + pub fn gst_video_overlay_composition_get_seqnum( + comp: *mut GstVideoOverlayComposition, + ) -> c_uint; + pub fn gst_video_overlay_composition_make_writable( + comp: *mut GstVideoOverlayComposition, + ) -> *mut GstVideoOverlayComposition; + pub fn gst_video_overlay_composition_n_rectangles( + comp: *mut GstVideoOverlayComposition, + ) -> c_uint; //========================================================================= // GstVideoOverlayCompositionMeta @@ -2226,28 +2611,82 @@ extern "C" { // GstVideoOverlayRectangle //========================================================================= pub fn gst_video_overlay_rectangle_get_type() -> GType; - pub fn gst_video_overlay_rectangle_new_raw(pixels: *mut gst::GstBuffer, render_x: c_int, render_y: c_int, render_width: c_uint, render_height: c_uint, flags: GstVideoOverlayFormatFlags) -> *mut GstVideoOverlayRectangle; - pub fn gst_video_overlay_rectangle_copy(rectangle: *mut GstVideoOverlayRectangle) -> *mut GstVideoOverlayRectangle; - pub fn gst_video_overlay_rectangle_get_flags(rectangle: *mut GstVideoOverlayRectangle) -> GstVideoOverlayFormatFlags; - pub fn gst_video_overlay_rectangle_get_global_alpha(rectangle: *mut GstVideoOverlayRectangle) -> c_float; - pub fn gst_video_overlay_rectangle_get_pixels_argb(rectangle: *mut GstVideoOverlayRectangle, flags: GstVideoOverlayFormatFlags) -> *mut gst::GstBuffer; - pub fn gst_video_overlay_rectangle_get_pixels_ayuv(rectangle: *mut GstVideoOverlayRectangle, flags: GstVideoOverlayFormatFlags) -> *mut gst::GstBuffer; - pub fn gst_video_overlay_rectangle_get_pixels_raw(rectangle: *mut GstVideoOverlayRectangle, flags: GstVideoOverlayFormatFlags) -> *mut gst::GstBuffer; - pub fn gst_video_overlay_rectangle_get_pixels_unscaled_argb(rectangle: *mut GstVideoOverlayRectangle, flags: GstVideoOverlayFormatFlags) -> *mut gst::GstBuffer; - pub fn gst_video_overlay_rectangle_get_pixels_unscaled_ayuv(rectangle: *mut GstVideoOverlayRectangle, flags: GstVideoOverlayFormatFlags) -> *mut gst::GstBuffer; - pub fn gst_video_overlay_rectangle_get_pixels_unscaled_raw(rectangle: *mut GstVideoOverlayRectangle, flags: GstVideoOverlayFormatFlags) -> *mut gst::GstBuffer; - pub fn gst_video_overlay_rectangle_get_render_rectangle(rectangle: *mut GstVideoOverlayRectangle, render_x: *mut c_int, render_y: *mut c_int, render_width: *mut c_uint, render_height: *mut c_uint) -> gboolean; - pub fn gst_video_overlay_rectangle_get_seqnum(rectangle: *mut GstVideoOverlayRectangle) -> c_uint; - pub fn gst_video_overlay_rectangle_set_global_alpha(rectangle: *mut GstVideoOverlayRectangle, global_alpha: c_float); - pub fn gst_video_overlay_rectangle_set_render_rectangle(rectangle: *mut GstVideoOverlayRectangle, render_x: c_int, render_y: c_int, render_width: c_uint, render_height: c_uint); + pub fn gst_video_overlay_rectangle_new_raw( + pixels: *mut gst::GstBuffer, + render_x: c_int, + render_y: c_int, + render_width: c_uint, + render_height: c_uint, + flags: GstVideoOverlayFormatFlags, + ) -> *mut GstVideoOverlayRectangle; + pub fn gst_video_overlay_rectangle_copy( + rectangle: *mut GstVideoOverlayRectangle, + ) -> *mut GstVideoOverlayRectangle; + pub fn gst_video_overlay_rectangle_get_flags( + rectangle: *mut GstVideoOverlayRectangle, + ) -> GstVideoOverlayFormatFlags; + pub fn gst_video_overlay_rectangle_get_global_alpha( + rectangle: *mut GstVideoOverlayRectangle, + ) -> c_float; + pub fn gst_video_overlay_rectangle_get_pixels_argb( + rectangle: *mut GstVideoOverlayRectangle, + flags: GstVideoOverlayFormatFlags, + ) -> *mut gst::GstBuffer; + pub fn gst_video_overlay_rectangle_get_pixels_ayuv( + rectangle: *mut GstVideoOverlayRectangle, + flags: GstVideoOverlayFormatFlags, + ) -> *mut gst::GstBuffer; + pub fn gst_video_overlay_rectangle_get_pixels_raw( + rectangle: *mut GstVideoOverlayRectangle, + flags: GstVideoOverlayFormatFlags, + ) -> *mut gst::GstBuffer; + pub fn gst_video_overlay_rectangle_get_pixels_unscaled_argb( + rectangle: *mut GstVideoOverlayRectangle, + flags: GstVideoOverlayFormatFlags, + ) -> *mut gst::GstBuffer; + pub fn gst_video_overlay_rectangle_get_pixels_unscaled_ayuv( + rectangle: *mut GstVideoOverlayRectangle, + flags: GstVideoOverlayFormatFlags, + ) -> *mut gst::GstBuffer; + pub fn gst_video_overlay_rectangle_get_pixels_unscaled_raw( + rectangle: *mut GstVideoOverlayRectangle, + flags: GstVideoOverlayFormatFlags, + ) -> *mut gst::GstBuffer; + pub fn gst_video_overlay_rectangle_get_render_rectangle( + rectangle: *mut GstVideoOverlayRectangle, + render_x: *mut c_int, + render_y: *mut c_int, + render_width: *mut c_uint, + render_height: *mut c_uint, + ) -> gboolean; + pub fn gst_video_overlay_rectangle_get_seqnum( + rectangle: *mut GstVideoOverlayRectangle, + ) -> c_uint; + pub fn gst_video_overlay_rectangle_set_global_alpha( + rectangle: *mut GstVideoOverlayRectangle, + global_alpha: c_float, + ); + pub fn gst_video_overlay_rectangle_set_render_rectangle( + rectangle: *mut GstVideoOverlayRectangle, + render_x: c_int, + render_y: c_int, + render_width: c_uint, + render_height: c_uint, + ); //========================================================================= // GstVideoRegionOfInterestMeta //========================================================================= #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_video_region_of_interest_meta_add_param(meta: *mut GstVideoRegionOfInterestMeta, s: *mut gst::GstStructure); + pub fn gst_video_region_of_interest_meta_add_param( + meta: *mut GstVideoRegionOfInterestMeta, + s: *mut gst::GstStructure, + ); #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_video_region_of_interest_meta_get_param(meta: *mut GstVideoRegionOfInterestMeta, name: *const c_char) -> *mut gst::GstStructure; + pub fn gst_video_region_of_interest_meta_get_param( + meta: *mut GstVideoRegionOfInterestMeta, + name: *const c_char, + ) -> *mut gst::GstStructure; pub fn gst_video_region_of_interest_meta_get_info() -> *const gst::GstMetaInfo; //========================================================================= @@ -2256,44 +2695,125 @@ extern "C" { #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_video_resampler_clear(resampler: *mut GstVideoResampler); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_resampler_init(resampler: *mut GstVideoResampler, method: GstVideoResamplerMethod, flags: GstVideoResamplerFlags, n_phases: c_uint, n_taps: c_uint, shift: c_double, in_size: c_uint, out_size: c_uint, options: *mut gst::GstStructure) -> gboolean; + pub fn gst_video_resampler_init( + resampler: *mut GstVideoResampler, + method: GstVideoResamplerMethod, + flags: GstVideoResamplerFlags, + n_phases: c_uint, + n_taps: c_uint, + shift: c_double, + in_size: c_uint, + out_size: c_uint, + options: *mut gst::GstStructure, + ) -> gboolean; //========================================================================= // GstVideoScaler //========================================================================= - pub fn gst_video_scaler_2d(hscale: *mut GstVideoScaler, vscale: *mut GstVideoScaler, format: GstVideoFormat, src: gpointer, src_stride: c_int, dest: gpointer, dest_stride: c_int, x: c_uint, y: c_uint, width: c_uint, height: c_uint); + pub fn gst_video_scaler_2d( + hscale: *mut GstVideoScaler, + vscale: *mut GstVideoScaler, + format: GstVideoFormat, + src: gpointer, + src_stride: c_int, + dest: gpointer, + dest_stride: c_int, + x: c_uint, + y: c_uint, + width: c_uint, + height: c_uint, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_scaler_combine_packed_YUV(y_scale: *mut GstVideoScaler, uv_scale: *mut GstVideoScaler, in_format: GstVideoFormat, out_format: GstVideoFormat) -> *mut GstVideoScaler; + pub fn gst_video_scaler_combine_packed_YUV( + y_scale: *mut GstVideoScaler, + uv_scale: *mut GstVideoScaler, + in_format: GstVideoFormat, + out_format: GstVideoFormat, + ) -> *mut GstVideoScaler; pub fn gst_video_scaler_free(scale: *mut GstVideoScaler); - pub fn gst_video_scaler_get_coeff(scale: *mut GstVideoScaler, out_offset: c_uint, in_offset: *mut c_uint, n_taps: *mut c_uint) -> *const c_double; + pub fn gst_video_scaler_get_coeff( + scale: *mut GstVideoScaler, + out_offset: c_uint, + in_offset: *mut c_uint, + n_taps: *mut c_uint, + ) -> *const c_double; pub fn gst_video_scaler_get_max_taps(scale: *mut GstVideoScaler) -> c_uint; - pub fn gst_video_scaler_horizontal(scale: *mut GstVideoScaler, format: GstVideoFormat, src: gpointer, dest: gpointer, dest_offset: c_uint, width: c_uint); - pub fn gst_video_scaler_vertical(scale: *mut GstVideoScaler, format: GstVideoFormat, src_lines: *mut gpointer, dest: gpointer, dest_offset: c_uint, width: c_uint); + pub fn gst_video_scaler_horizontal( + scale: *mut GstVideoScaler, + format: GstVideoFormat, + src: gpointer, + dest: gpointer, + dest_offset: c_uint, + width: c_uint, + ); + pub fn gst_video_scaler_vertical( + scale: *mut GstVideoScaler, + format: GstVideoFormat, + src_lines: *mut gpointer, + dest: gpointer, + dest_offset: c_uint, + width: c_uint, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_scaler_new(method: GstVideoResamplerMethod, flags: GstVideoScalerFlags, n_taps: c_uint, in_size: c_uint, out_size: c_uint, options: *mut gst::GstStructure) -> *mut GstVideoScaler; + pub fn gst_video_scaler_new( + method: GstVideoResamplerMethod, + flags: GstVideoScalerFlags, + n_taps: c_uint, + in_size: c_uint, + out_size: c_uint, + options: *mut gst::GstStructure, + ) -> *mut GstVideoScaler; //========================================================================= // GstVideoTimeCode //========================================================================= pub fn gst_video_time_code_get_type() -> GType; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_video_time_code_new(fps_n: c_uint, fps_d: c_uint, latest_daily_jam: *mut glib::GDateTime, flags: GstVideoTimeCodeFlags, hours: c_uint, minutes: c_uint, seconds: c_uint, frames: c_uint, field_count: c_uint) -> *mut GstVideoTimeCode; + pub fn gst_video_time_code_new( + fps_n: c_uint, + fps_d: c_uint, + latest_daily_jam: *mut glib::GDateTime, + flags: GstVideoTimeCodeFlags, + hours: c_uint, + minutes: c_uint, + seconds: c_uint, + frames: c_uint, + field_count: c_uint, + ) -> *mut GstVideoTimeCode; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_video_time_code_new_empty() -> *mut GstVideoTimeCode; #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_video_time_code_new_from_date_time(fps_n: c_uint, fps_d: c_uint, dt: *mut glib::GDateTime, flags: GstVideoTimeCodeFlags, field_count: c_uint) -> *mut GstVideoTimeCode; + pub fn gst_video_time_code_new_from_date_time( + fps_n: c_uint, + fps_d: c_uint, + dt: *mut glib::GDateTime, + flags: GstVideoTimeCodeFlags, + field_count: c_uint, + ) -> *mut GstVideoTimeCode; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_video_time_code_new_from_date_time_full(fps_n: c_uint, fps_d: c_uint, dt: *mut glib::GDateTime, flags: GstVideoTimeCodeFlags, field_count: c_uint) -> *mut GstVideoTimeCode; + pub fn gst_video_time_code_new_from_date_time_full( + fps_n: c_uint, + fps_d: c_uint, + dt: *mut glib::GDateTime, + flags: GstVideoTimeCodeFlags, + field_count: c_uint, + ) -> *mut GstVideoTimeCode; #[cfg(any(feature = "v1_12", feature = "dox"))] pub fn gst_video_time_code_new_from_string(tc_str: *const c_char) -> *mut GstVideoTimeCode; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_video_time_code_add_frames(tc: *mut GstVideoTimeCode, frames: i64); #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_video_time_code_add_interval(tc: *const GstVideoTimeCode, tc_inter: *const GstVideoTimeCodeInterval) -> *mut GstVideoTimeCode; + pub fn gst_video_time_code_add_interval( + tc: *const GstVideoTimeCode, + tc_inter: *const GstVideoTimeCodeInterval, + ) -> *mut GstVideoTimeCode; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_video_time_code_clear(tc: *mut GstVideoTimeCode); #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_video_time_code_compare(tc1: *const GstVideoTimeCode, tc2: *const GstVideoTimeCode) -> c_int; + pub fn gst_video_time_code_compare( + tc1: *const GstVideoTimeCode, + tc2: *const GstVideoTimeCode, + ) -> c_int; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_video_time_code_copy(tc: *const GstVideoTimeCode) -> *mut GstVideoTimeCode; #[cfg(any(feature = "v1_10", feature = "dox"))] @@ -2303,11 +2823,36 @@ extern "C" { #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_video_time_code_increment_frame(tc: *mut GstVideoTimeCode); #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_video_time_code_init(tc: *mut GstVideoTimeCode, fps_n: c_uint, fps_d: c_uint, latest_daily_jam: *mut glib::GDateTime, flags: GstVideoTimeCodeFlags, hours: c_uint, minutes: c_uint, seconds: c_uint, frames: c_uint, field_count: c_uint); + pub fn gst_video_time_code_init( + tc: *mut GstVideoTimeCode, + fps_n: c_uint, + fps_d: c_uint, + latest_daily_jam: *mut glib::GDateTime, + flags: GstVideoTimeCodeFlags, + hours: c_uint, + minutes: c_uint, + seconds: c_uint, + frames: c_uint, + field_count: c_uint, + ); #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_video_time_code_init_from_date_time(tc: *mut GstVideoTimeCode, fps_n: c_uint, fps_d: c_uint, dt: *mut glib::GDateTime, flags: GstVideoTimeCodeFlags, field_count: c_uint); + pub fn gst_video_time_code_init_from_date_time( + tc: *mut GstVideoTimeCode, + fps_n: c_uint, + fps_d: c_uint, + dt: *mut glib::GDateTime, + flags: GstVideoTimeCodeFlags, + field_count: c_uint, + ); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_video_time_code_init_from_date_time_full(tc: *mut GstVideoTimeCode, fps_n: c_uint, fps_d: c_uint, dt: *mut glib::GDateTime, flags: GstVideoTimeCodeFlags, field_count: c_uint) -> gboolean; + pub fn gst_video_time_code_init_from_date_time_full( + tc: *mut GstVideoTimeCode, + fps_n: c_uint, + fps_d: c_uint, + dt: *mut glib::GDateTime, + flags: GstVideoTimeCodeFlags, + field_count: c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_10", feature = "dox"))] pub fn gst_video_time_code_is_valid(tc: *const GstVideoTimeCode) -> gboolean; #[cfg(any(feature = "v1_10", feature = "dox"))] @@ -2322,17 +2867,32 @@ extern "C" { //========================================================================= pub fn gst_video_time_code_interval_get_type() -> GType; #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_video_time_code_interval_new(hours: c_uint, minutes: c_uint, seconds: c_uint, frames: c_uint) -> *mut GstVideoTimeCodeInterval; + pub fn gst_video_time_code_interval_new( + hours: c_uint, + minutes: c_uint, + seconds: c_uint, + frames: c_uint, + ) -> *mut GstVideoTimeCodeInterval; #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_video_time_code_interval_new_from_string(tc_inter_str: *const c_char) -> *mut GstVideoTimeCodeInterval; + pub fn gst_video_time_code_interval_new_from_string( + tc_inter_str: *const c_char, + ) -> *mut GstVideoTimeCodeInterval; #[cfg(any(feature = "v1_12", feature = "dox"))] pub fn gst_video_time_code_interval_clear(tc: *mut GstVideoTimeCodeInterval); #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_video_time_code_interval_copy(tc: *const GstVideoTimeCodeInterval) -> *mut GstVideoTimeCodeInterval; + pub fn gst_video_time_code_interval_copy( + tc: *const GstVideoTimeCodeInterval, + ) -> *mut GstVideoTimeCodeInterval; #[cfg(any(feature = "v1_12", feature = "dox"))] pub fn gst_video_time_code_interval_free(tc: *mut GstVideoTimeCodeInterval); #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_video_time_code_interval_init(tc: *mut GstVideoTimeCodeInterval, hours: c_uint, minutes: c_uint, seconds: c_uint, frames: c_uint); + pub fn gst_video_time_code_interval_init( + tc: *mut GstVideoTimeCodeInterval, + hours: c_uint, + minutes: c_uint, + seconds: c_uint, + frames: c_uint, + ); //========================================================================= // GstVideoTimeCodeMeta @@ -2344,11 +2904,23 @@ extern "C" { //========================================================================= pub fn gst_video_vbi_encoder_get_type() -> GType; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_video_vbi_encoder_new(format: GstVideoFormat, pixel_width: u32) -> *mut GstVideoVBIEncoder; + pub fn gst_video_vbi_encoder_new( + format: GstVideoFormat, + pixel_width: u32, + ) -> *mut GstVideoVBIEncoder; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_video_vbi_encoder_add_ancillary(encoder: *mut GstVideoVBIEncoder, composite: gboolean, DID: u8, SDID_block_number: u8, data: *const u8, data_count: c_uint) -> gboolean; + pub fn gst_video_vbi_encoder_add_ancillary( + encoder: *mut GstVideoVBIEncoder, + composite: gboolean, + DID: u8, + SDID_block_number: u8, + data: *const u8, + data_count: c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_video_vbi_encoder_copy(encoder: *const GstVideoVBIEncoder) -> *mut GstVideoVBIEncoder; + pub fn gst_video_vbi_encoder_copy( + encoder: *const GstVideoVBIEncoder, + ) -> *mut GstVideoVBIEncoder; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_video_vbi_encoder_free(encoder: *mut GstVideoVBIEncoder); #[cfg(any(feature = "v1_16", feature = "dox"))] @@ -2359,7 +2931,10 @@ extern "C" { //========================================================================= pub fn gst_video_vbi_parser_get_type() -> GType; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_video_vbi_parser_new(format: GstVideoFormat, pixel_width: u32) -> *mut GstVideoVBIParser; + pub fn gst_video_vbi_parser_new( + format: GstVideoFormat, + pixel_width: u32, + ) -> *mut GstVideoVBIParser; #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_video_vbi_parser_add_line(parser: *mut GstVideoVBIParser, data: *const u8); #[cfg(any(feature = "v1_16", feature = "dox"))] @@ -2367,7 +2942,10 @@ extern "C" { #[cfg(any(feature = "v1_16", feature = "dox"))] pub fn gst_video_vbi_parser_free(parser: *mut GstVideoVBIParser); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_video_vbi_parser_get_ancillary(parser: *mut GstVideoVBIParser, anc: *mut GstVideoAncillary) -> GstVideoVBIParserResult; + pub fn gst_video_vbi_parser_get_ancillary( + parser: *mut GstVideoVBIParser, + anc: *mut GstVideoAncillary, + ) -> GstVideoVBIParserResult; //========================================================================= // GstColorBalanceChannel @@ -2384,20 +2962,30 @@ extern "C" { //========================================================================= pub fn gst_video_aggregator_convert_pad_get_type() -> GType; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_video_aggregator_convert_pad_update_conversion_info(pad: *mut GstVideoAggregatorConvertPad); + pub fn gst_video_aggregator_convert_pad_update_conversion_info( + pad: *mut GstVideoAggregatorConvertPad, + ); //========================================================================= // GstVideoAggregatorPad //========================================================================= pub fn gst_video_aggregator_pad_get_type() -> GType; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_video_aggregator_pad_get_current_buffer(pad: *mut GstVideoAggregatorPad) -> *mut gst::GstBuffer; + pub fn gst_video_aggregator_pad_get_current_buffer( + pad: *mut GstVideoAggregatorPad, + ) -> *mut gst::GstBuffer; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_video_aggregator_pad_get_prepared_frame(pad: *mut GstVideoAggregatorPad) -> *mut GstVideoFrame; + pub fn gst_video_aggregator_pad_get_prepared_frame( + pad: *mut GstVideoAggregatorPad, + ) -> *mut GstVideoFrame; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_video_aggregator_pad_has_current_buffer(pad: *mut GstVideoAggregatorPad) -> gboolean; + pub fn gst_video_aggregator_pad_has_current_buffer(pad: *mut GstVideoAggregatorPad) + -> gboolean; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_video_aggregator_pad_set_needs_alpha(pad: *mut GstVideoAggregatorPad, needs_alpha: gboolean); + pub fn gst_video_aggregator_pad_set_needs_alpha( + pad: *mut GstVideoAggregatorPad, + needs_alpha: gboolean, + ); //========================================================================= // GstVideoBufferPool @@ -2410,73 +2998,183 @@ extern "C" { //========================================================================= pub fn gst_video_decoder_get_type() -> GType; pub fn gst_video_decoder_add_to_frame(decoder: *mut GstVideoDecoder, n_bytes: c_int); - pub fn gst_video_decoder_allocate_output_buffer(decoder: *mut GstVideoDecoder) -> *mut gst::GstBuffer; - pub fn gst_video_decoder_allocate_output_frame(decoder: *mut GstVideoDecoder, frame: *mut GstVideoCodecFrame) -> gst::GstFlowReturn; + pub fn gst_video_decoder_allocate_output_buffer( + decoder: *mut GstVideoDecoder, + ) -> *mut gst::GstBuffer; + pub fn gst_video_decoder_allocate_output_frame( + decoder: *mut GstVideoDecoder, + frame: *mut GstVideoCodecFrame, + ) -> gst::GstFlowReturn; #[cfg(any(feature = "v1_12", feature = "dox"))] - pub fn gst_video_decoder_allocate_output_frame_with_params(decoder: *mut GstVideoDecoder, frame: *mut GstVideoCodecFrame, params: *mut gst::GstBufferPoolAcquireParams) -> gst::GstFlowReturn; - pub fn gst_video_decoder_drop_frame(dec: *mut GstVideoDecoder, frame: *mut GstVideoCodecFrame) -> gst::GstFlowReturn; - pub fn gst_video_decoder_finish_frame(decoder: *mut GstVideoDecoder, frame: *mut GstVideoCodecFrame) -> gst::GstFlowReturn; - pub fn gst_video_decoder_get_allocator(decoder: *mut GstVideoDecoder, allocator: *mut *mut gst::GstAllocator, params: *mut gst::GstAllocationParams); - pub fn gst_video_decoder_get_buffer_pool(decoder: *mut GstVideoDecoder) -> *mut gst::GstBufferPool; + pub fn gst_video_decoder_allocate_output_frame_with_params( + decoder: *mut GstVideoDecoder, + frame: *mut GstVideoCodecFrame, + params: *mut gst::GstBufferPoolAcquireParams, + ) -> gst::GstFlowReturn; + pub fn gst_video_decoder_drop_frame( + dec: *mut GstVideoDecoder, + frame: *mut GstVideoCodecFrame, + ) -> gst::GstFlowReturn; + pub fn gst_video_decoder_finish_frame( + decoder: *mut GstVideoDecoder, + frame: *mut GstVideoCodecFrame, + ) -> gst::GstFlowReturn; + pub fn gst_video_decoder_get_allocator( + decoder: *mut GstVideoDecoder, + allocator: *mut *mut gst::GstAllocator, + params: *mut gst::GstAllocationParams, + ); + pub fn gst_video_decoder_get_buffer_pool( + decoder: *mut GstVideoDecoder, + ) -> *mut gst::GstBufferPool; pub fn gst_video_decoder_get_estimate_rate(dec: *mut GstVideoDecoder) -> c_int; - pub fn gst_video_decoder_get_frame(decoder: *mut GstVideoDecoder, frame_number: c_int) -> *mut GstVideoCodecFrame; + pub fn gst_video_decoder_get_frame( + decoder: *mut GstVideoDecoder, + frame_number: c_int, + ) -> *mut GstVideoCodecFrame; pub fn gst_video_decoder_get_frames(decoder: *mut GstVideoDecoder) -> *mut glib::GList; - pub fn gst_video_decoder_get_latency(decoder: *mut GstVideoDecoder, min_latency: *mut gst::GstClockTime, max_latency: *mut gst::GstClockTime); - pub fn gst_video_decoder_get_max_decode_time(decoder: *mut GstVideoDecoder, frame: *mut GstVideoCodecFrame) -> gst::GstClockTimeDiff; + pub fn gst_video_decoder_get_latency( + decoder: *mut GstVideoDecoder, + min_latency: *mut gst::GstClockTime, + max_latency: *mut gst::GstClockTime, + ); + pub fn gst_video_decoder_get_max_decode_time( + decoder: *mut GstVideoDecoder, + frame: *mut GstVideoCodecFrame, + ) -> gst::GstClockTimeDiff; pub fn gst_video_decoder_get_max_errors(dec: *mut GstVideoDecoder) -> c_int; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_video_decoder_get_needs_format(dec: *mut GstVideoDecoder) -> gboolean; - pub fn gst_video_decoder_get_oldest_frame(decoder: *mut GstVideoDecoder) -> *mut GstVideoCodecFrame; - pub fn gst_video_decoder_get_output_state(decoder: *mut GstVideoDecoder) -> *mut GstVideoCodecState; + pub fn gst_video_decoder_get_oldest_frame( + decoder: *mut GstVideoDecoder, + ) -> *mut GstVideoCodecFrame; + pub fn gst_video_decoder_get_output_state( + decoder: *mut GstVideoDecoder, + ) -> *mut GstVideoCodecState; pub fn gst_video_decoder_get_packetized(decoder: *mut GstVideoDecoder) -> gboolean; #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_video_decoder_get_pending_frame_size(decoder: *mut GstVideoDecoder) -> size_t; #[cfg(any(feature = "v1_0_3", feature = "dox"))] pub fn gst_video_decoder_get_qos_proportion(decoder: *mut GstVideoDecoder) -> c_double; pub fn gst_video_decoder_have_frame(decoder: *mut GstVideoDecoder) -> gst::GstFlowReturn; - pub fn gst_video_decoder_merge_tags(decoder: *mut GstVideoDecoder, tags: *const gst::GstTagList, mode: gst::GstTagMergeMode); + pub fn gst_video_decoder_merge_tags( + decoder: *mut GstVideoDecoder, + tags: *const gst::GstTagList, + mode: gst::GstTagMergeMode, + ); pub fn gst_video_decoder_negotiate(decoder: *mut GstVideoDecoder) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_decoder_proxy_getcaps(decoder: *mut GstVideoDecoder, caps: *mut gst::GstCaps, filter: *mut gst::GstCaps) -> *mut gst::GstCaps; + pub fn gst_video_decoder_proxy_getcaps( + decoder: *mut GstVideoDecoder, + caps: *mut gst::GstCaps, + filter: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; #[cfg(any(feature = "v1_2_2", feature = "dox"))] - pub fn gst_video_decoder_release_frame(dec: *mut GstVideoDecoder, frame: *mut GstVideoCodecFrame); + pub fn gst_video_decoder_release_frame( + dec: *mut GstVideoDecoder, + frame: *mut GstVideoCodecFrame, + ); pub fn gst_video_decoder_set_estimate_rate(dec: *mut GstVideoDecoder, enabled: gboolean); #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_video_decoder_set_interlaced_output_state(decoder: *mut GstVideoDecoder, fmt: GstVideoFormat, mode: GstVideoInterlaceMode, width: c_uint, height: c_uint, reference: *mut GstVideoCodecState) -> *mut GstVideoCodecState; - pub fn gst_video_decoder_set_latency(decoder: *mut GstVideoDecoder, min_latency: gst::GstClockTime, max_latency: gst::GstClockTime); + pub fn gst_video_decoder_set_interlaced_output_state( + decoder: *mut GstVideoDecoder, + fmt: GstVideoFormat, + mode: GstVideoInterlaceMode, + width: c_uint, + height: c_uint, + reference: *mut GstVideoCodecState, + ) -> *mut GstVideoCodecState; + pub fn gst_video_decoder_set_latency( + decoder: *mut GstVideoDecoder, + min_latency: gst::GstClockTime, + max_latency: gst::GstClockTime, + ); pub fn gst_video_decoder_set_max_errors(dec: *mut GstVideoDecoder, num: c_int); #[cfg(any(feature = "v1_4", feature = "dox"))] pub fn gst_video_decoder_set_needs_format(dec: *mut GstVideoDecoder, enabled: gboolean); - pub fn gst_video_decoder_set_output_state(decoder: *mut GstVideoDecoder, fmt: GstVideoFormat, width: c_uint, height: c_uint, reference: *mut GstVideoCodecState) -> *mut GstVideoCodecState; + pub fn gst_video_decoder_set_output_state( + decoder: *mut GstVideoDecoder, + fmt: GstVideoFormat, + width: c_uint, + height: c_uint, + reference: *mut GstVideoCodecState, + ) -> *mut GstVideoCodecState; pub fn gst_video_decoder_set_packetized(decoder: *mut GstVideoDecoder, packetized: gboolean); #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_decoder_set_use_default_pad_acceptcaps(decoder: *mut GstVideoDecoder, use_: gboolean); + pub fn gst_video_decoder_set_use_default_pad_acceptcaps( + decoder: *mut GstVideoDecoder, + use_: gboolean, + ); //========================================================================= // GstVideoEncoder //========================================================================= pub fn gst_video_encoder_get_type() -> GType; - pub fn gst_video_encoder_allocate_output_buffer(encoder: *mut GstVideoEncoder, size: size_t) -> *mut gst::GstBuffer; - pub fn gst_video_encoder_allocate_output_frame(encoder: *mut GstVideoEncoder, frame: *mut GstVideoCodecFrame, size: size_t) -> gst::GstFlowReturn; - pub fn gst_video_encoder_finish_frame(encoder: *mut GstVideoEncoder, frame: *mut GstVideoCodecFrame) -> gst::GstFlowReturn; - pub fn gst_video_encoder_get_allocator(encoder: *mut GstVideoEncoder, allocator: *mut *mut gst::GstAllocator, params: *mut gst::GstAllocationParams); - pub fn gst_video_encoder_get_frame(encoder: *mut GstVideoEncoder, frame_number: c_int) -> *mut GstVideoCodecFrame; + pub fn gst_video_encoder_allocate_output_buffer( + encoder: *mut GstVideoEncoder, + size: size_t, + ) -> *mut gst::GstBuffer; + pub fn gst_video_encoder_allocate_output_frame( + encoder: *mut GstVideoEncoder, + frame: *mut GstVideoCodecFrame, + size: size_t, + ) -> gst::GstFlowReturn; + pub fn gst_video_encoder_finish_frame( + encoder: *mut GstVideoEncoder, + frame: *mut GstVideoCodecFrame, + ) -> gst::GstFlowReturn; + pub fn gst_video_encoder_get_allocator( + encoder: *mut GstVideoEncoder, + allocator: *mut *mut gst::GstAllocator, + params: *mut gst::GstAllocationParams, + ); + pub fn gst_video_encoder_get_frame( + encoder: *mut GstVideoEncoder, + frame_number: c_int, + ) -> *mut GstVideoCodecFrame; pub fn gst_video_encoder_get_frames(encoder: *mut GstVideoEncoder) -> *mut glib::GList; - pub fn gst_video_encoder_get_latency(encoder: *mut GstVideoEncoder, min_latency: *mut gst::GstClockTime, max_latency: *mut gst::GstClockTime); + pub fn gst_video_encoder_get_latency( + encoder: *mut GstVideoEncoder, + min_latency: *mut gst::GstClockTime, + max_latency: *mut gst::GstClockTime, + ); #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_video_encoder_get_max_encode_time(encoder: *mut GstVideoEncoder, frame: *mut GstVideoCodecFrame) -> gst::GstClockTimeDiff; - pub fn gst_video_encoder_get_oldest_frame(encoder: *mut GstVideoEncoder) -> *mut GstVideoCodecFrame; - pub fn gst_video_encoder_get_output_state(encoder: *mut GstVideoEncoder) -> *mut GstVideoCodecState; + pub fn gst_video_encoder_get_max_encode_time( + encoder: *mut GstVideoEncoder, + frame: *mut GstVideoCodecFrame, + ) -> gst::GstClockTimeDiff; + pub fn gst_video_encoder_get_oldest_frame( + encoder: *mut GstVideoEncoder, + ) -> *mut GstVideoCodecFrame; + pub fn gst_video_encoder_get_output_state( + encoder: *mut GstVideoEncoder, + ) -> *mut GstVideoCodecState; #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_video_encoder_is_qos_enabled(encoder: *mut GstVideoEncoder) -> gboolean; - pub fn gst_video_encoder_merge_tags(encoder: *mut GstVideoEncoder, tags: *const gst::GstTagList, mode: gst::GstTagMergeMode); + pub fn gst_video_encoder_merge_tags( + encoder: *mut GstVideoEncoder, + tags: *const gst::GstTagList, + mode: gst::GstTagMergeMode, + ); pub fn gst_video_encoder_negotiate(encoder: *mut GstVideoEncoder) -> gboolean; - pub fn gst_video_encoder_proxy_getcaps(enc: *mut GstVideoEncoder, caps: *mut gst::GstCaps, filter: *mut gst::GstCaps) -> *mut gst::GstCaps; + pub fn gst_video_encoder_proxy_getcaps( + enc: *mut GstVideoEncoder, + caps: *mut gst::GstCaps, + filter: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; pub fn gst_video_encoder_set_headers(encoder: *mut GstVideoEncoder, headers: *mut glib::GList); - pub fn gst_video_encoder_set_latency(encoder: *mut GstVideoEncoder, min_latency: gst::GstClockTime, max_latency: gst::GstClockTime); + pub fn gst_video_encoder_set_latency( + encoder: *mut GstVideoEncoder, + min_latency: gst::GstClockTime, + max_latency: gst::GstClockTime, + ); #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_video_encoder_set_min_pts(encoder: *mut GstVideoEncoder, min_pts: gst::GstClockTime); - pub fn gst_video_encoder_set_output_state(encoder: *mut GstVideoEncoder, caps: *mut gst::GstCaps, reference: *mut GstVideoCodecState) -> *mut GstVideoCodecState; + pub fn gst_video_encoder_set_output_state( + encoder: *mut GstVideoEncoder, + caps: *mut gst::GstCaps, + reference: *mut GstVideoCodecState, + ) -> *mut GstVideoCodecState; #[cfg(any(feature = "v1_14", feature = "dox"))] pub fn gst_video_encoder_set_qos_enabled(encoder: *mut GstVideoEncoder, enabled: gboolean); @@ -2494,50 +3192,141 @@ extern "C" { // GstVideoSink //========================================================================= pub fn gst_video_sink_get_type() -> GType; - pub fn gst_video_sink_center_rect(src: GstVideoRectangle, dst: GstVideoRectangle, result: *mut GstVideoRectangle, scaling: gboolean); + pub fn gst_video_sink_center_rect( + src: GstVideoRectangle, + dst: GstVideoRectangle, + result: *mut GstVideoRectangle, + scaling: gboolean, + ); //========================================================================= // GstColorBalance //========================================================================= pub fn gst_color_balance_get_type() -> GType; - pub fn gst_color_balance_get_balance_type(balance: *mut GstColorBalance) -> GstColorBalanceType; - pub fn gst_color_balance_get_value(balance: *mut GstColorBalance, channel: *mut GstColorBalanceChannel) -> c_int; + pub fn gst_color_balance_get_balance_type(balance: *mut GstColorBalance) + -> GstColorBalanceType; + pub fn gst_color_balance_get_value( + balance: *mut GstColorBalance, + channel: *mut GstColorBalanceChannel, + ) -> c_int; pub fn gst_color_balance_list_channels(balance: *mut GstColorBalance) -> *const glib::GList; - pub fn gst_color_balance_set_value(balance: *mut GstColorBalance, channel: *mut GstColorBalanceChannel, value: c_int); - pub fn gst_color_balance_value_changed(balance: *mut GstColorBalance, channel: *mut GstColorBalanceChannel, value: c_int); + pub fn gst_color_balance_set_value( + balance: *mut GstColorBalance, + channel: *mut GstColorBalanceChannel, + value: c_int, + ); + pub fn gst_color_balance_value_changed( + balance: *mut GstColorBalance, + channel: *mut GstColorBalanceChannel, + value: c_int, + ); //========================================================================= // GstNavigation //========================================================================= pub fn gst_navigation_get_type() -> GType; pub fn gst_navigation_event_get_type(event: *mut gst::GstEvent) -> GstNavigationEventType; - pub fn gst_navigation_event_parse_command(event: *mut gst::GstEvent, command: *mut GstNavigationCommand) -> gboolean; - pub fn gst_navigation_event_parse_key_event(event: *mut gst::GstEvent, key: *mut *const c_char) -> gboolean; - pub fn gst_navigation_event_parse_mouse_button_event(event: *mut gst::GstEvent, button: *mut c_int, x: *mut c_double, y: *mut c_double) -> gboolean; - pub fn gst_navigation_event_parse_mouse_move_event(event: *mut gst::GstEvent, x: *mut c_double, y: *mut c_double) -> gboolean; - pub fn gst_navigation_message_get_type(message: *mut gst::GstMessage) -> GstNavigationMessageType; - pub fn gst_navigation_message_new_angles_changed(src: *mut gst::GstObject, cur_angle: c_uint, n_angles: c_uint) -> *mut gst::GstMessage; - pub fn gst_navigation_message_new_commands_changed(src: *mut gst::GstObject) -> *mut gst::GstMessage; + pub fn gst_navigation_event_parse_command( + event: *mut gst::GstEvent, + command: *mut GstNavigationCommand, + ) -> gboolean; + pub fn gst_navigation_event_parse_key_event( + event: *mut gst::GstEvent, + key: *mut *const c_char, + ) -> gboolean; + pub fn gst_navigation_event_parse_mouse_button_event( + event: *mut gst::GstEvent, + button: *mut c_int, + x: *mut c_double, + y: *mut c_double, + ) -> gboolean; + pub fn gst_navigation_event_parse_mouse_move_event( + event: *mut gst::GstEvent, + x: *mut c_double, + y: *mut c_double, + ) -> gboolean; + pub fn gst_navigation_message_get_type( + message: *mut gst::GstMessage, + ) -> GstNavigationMessageType; + pub fn gst_navigation_message_new_angles_changed( + src: *mut gst::GstObject, + cur_angle: c_uint, + n_angles: c_uint, + ) -> *mut gst::GstMessage; + pub fn gst_navigation_message_new_commands_changed( + src: *mut gst::GstObject, + ) -> *mut gst::GstMessage; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_navigation_message_new_event(src: *mut gst::GstObject, event: *mut gst::GstEvent) -> *mut gst::GstMessage; - pub fn gst_navigation_message_new_mouse_over(src: *mut gst::GstObject, active: gboolean) -> *mut gst::GstMessage; - pub fn gst_navigation_message_parse_angles_changed(message: *mut gst::GstMessage, cur_angle: *mut c_uint, n_angles: *mut c_uint) -> gboolean; + pub fn gst_navigation_message_new_event( + src: *mut gst::GstObject, + event: *mut gst::GstEvent, + ) -> *mut gst::GstMessage; + pub fn gst_navigation_message_new_mouse_over( + src: *mut gst::GstObject, + active: gboolean, + ) -> *mut gst::GstMessage; + pub fn gst_navigation_message_parse_angles_changed( + message: *mut gst::GstMessage, + cur_angle: *mut c_uint, + n_angles: *mut c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_navigation_message_parse_event(message: *mut gst::GstMessage, event: *mut *mut gst::GstEvent) -> gboolean; - pub fn gst_navigation_message_parse_mouse_over(message: *mut gst::GstMessage, active: *mut gboolean) -> gboolean; + pub fn gst_navigation_message_parse_event( + message: *mut gst::GstMessage, + event: *mut *mut gst::GstEvent, + ) -> gboolean; + pub fn gst_navigation_message_parse_mouse_over( + message: *mut gst::GstMessage, + active: *mut gboolean, + ) -> gboolean; pub fn gst_navigation_query_get_type(query: *mut gst::GstQuery) -> GstNavigationQueryType; pub fn gst_navigation_query_new_angles() -> *mut gst::GstQuery; pub fn gst_navigation_query_new_commands() -> *mut gst::GstQuery; - pub fn gst_navigation_query_parse_angles(query: *mut gst::GstQuery, cur_angle: *mut c_uint, n_angles: *mut c_uint) -> gboolean; - pub fn gst_navigation_query_parse_commands_length(query: *mut gst::GstQuery, n_cmds: *mut c_uint) -> gboolean; - pub fn gst_navigation_query_parse_commands_nth(query: *mut gst::GstQuery, nth: c_uint, cmd: *mut GstNavigationCommand) -> gboolean; - pub fn gst_navigation_query_set_angles(query: *mut gst::GstQuery, cur_angle: c_uint, n_angles: c_uint); + pub fn gst_navigation_query_parse_angles( + query: *mut gst::GstQuery, + cur_angle: *mut c_uint, + n_angles: *mut c_uint, + ) -> gboolean; + pub fn gst_navigation_query_parse_commands_length( + query: *mut gst::GstQuery, + n_cmds: *mut c_uint, + ) -> gboolean; + pub fn gst_navigation_query_parse_commands_nth( + query: *mut gst::GstQuery, + nth: c_uint, + cmd: *mut GstNavigationCommand, + ) -> gboolean; + pub fn gst_navigation_query_set_angles( + query: *mut gst::GstQuery, + cur_angle: c_uint, + n_angles: c_uint, + ); pub fn gst_navigation_query_set_commands(query: *mut gst::GstQuery, n_cmds: c_int, ...); - pub fn gst_navigation_query_set_commandsv(query: *mut gst::GstQuery, n_cmds: c_int, cmds: *mut GstNavigationCommand); - pub fn gst_navigation_send_command(navigation: *mut GstNavigation, command: GstNavigationCommand); - pub fn gst_navigation_send_event(navigation: *mut GstNavigation, structure: *mut gst::GstStructure); - pub fn gst_navigation_send_key_event(navigation: *mut GstNavigation, event: *const c_char, key: *const c_char); - pub fn gst_navigation_send_mouse_event(navigation: *mut GstNavigation, event: *const c_char, button: c_int, x: c_double, y: c_double); + pub fn gst_navigation_query_set_commandsv( + query: *mut gst::GstQuery, + n_cmds: c_int, + cmds: *mut GstNavigationCommand, + ); + pub fn gst_navigation_send_command( + navigation: *mut GstNavigation, + command: GstNavigationCommand, + ); + pub fn gst_navigation_send_event( + navigation: *mut GstNavigation, + structure: *mut gst::GstStructure, + ); + pub fn gst_navigation_send_key_event( + navigation: *mut GstNavigation, + event: *const c_char, + key: *const c_char, + ); + pub fn gst_navigation_send_mouse_event( + navigation: *mut GstNavigation, + event: *const c_char, + button: c_int, + x: c_double, + y: c_double, + ); //========================================================================= // GstVideoDirection @@ -2548,78 +3337,265 @@ extern "C" { // GstVideoOrientation //========================================================================= pub fn gst_video_orientation_get_type() -> GType; - pub fn gst_video_orientation_get_hcenter(video_orientation: *mut GstVideoOrientation, center: *mut c_int) -> gboolean; - pub fn gst_video_orientation_get_hflip(video_orientation: *mut GstVideoOrientation, flip: *mut gboolean) -> gboolean; - pub fn gst_video_orientation_get_vcenter(video_orientation: *mut GstVideoOrientation, center: *mut c_int) -> gboolean; - pub fn gst_video_orientation_get_vflip(video_orientation: *mut GstVideoOrientation, flip: *mut gboolean) -> gboolean; - pub fn gst_video_orientation_set_hcenter(video_orientation: *mut GstVideoOrientation, center: c_int) -> gboolean; - pub fn gst_video_orientation_set_hflip(video_orientation: *mut GstVideoOrientation, flip: gboolean) -> gboolean; - pub fn gst_video_orientation_set_vcenter(video_orientation: *mut GstVideoOrientation, center: c_int) -> gboolean; - pub fn gst_video_orientation_set_vflip(video_orientation: *mut GstVideoOrientation, flip: gboolean) -> gboolean; + pub fn gst_video_orientation_get_hcenter( + video_orientation: *mut GstVideoOrientation, + center: *mut c_int, + ) -> gboolean; + pub fn gst_video_orientation_get_hflip( + video_orientation: *mut GstVideoOrientation, + flip: *mut gboolean, + ) -> gboolean; + pub fn gst_video_orientation_get_vcenter( + video_orientation: *mut GstVideoOrientation, + center: *mut c_int, + ) -> gboolean; + pub fn gst_video_orientation_get_vflip( + video_orientation: *mut GstVideoOrientation, + flip: *mut gboolean, + ) -> gboolean; + pub fn gst_video_orientation_set_hcenter( + video_orientation: *mut GstVideoOrientation, + center: c_int, + ) -> gboolean; + pub fn gst_video_orientation_set_hflip( + video_orientation: *mut GstVideoOrientation, + flip: gboolean, + ) -> gboolean; + pub fn gst_video_orientation_set_vcenter( + video_orientation: *mut GstVideoOrientation, + center: c_int, + ) -> gboolean; + pub fn gst_video_orientation_set_vflip( + video_orientation: *mut GstVideoOrientation, + flip: gboolean, + ) -> gboolean; //========================================================================= // GstVideoOverlay //========================================================================= pub fn gst_video_overlay_get_type() -> GType; #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_video_overlay_install_properties(oclass: *mut gobject::GObjectClass, last_prop_id: c_int); + pub fn gst_video_overlay_install_properties( + oclass: *mut gobject::GObjectClass, + last_prop_id: c_int, + ); #[cfg(any(feature = "v1_14", feature = "dox"))] - pub fn gst_video_overlay_set_property(object: *mut gobject::GObject, last_prop_id: c_int, property_id: c_uint, value: *const gobject::GValue) -> gboolean; + pub fn gst_video_overlay_set_property( + object: *mut gobject::GObject, + last_prop_id: c_int, + property_id: c_uint, + value: *const gobject::GValue, + ) -> gboolean; pub fn gst_video_overlay_expose(overlay: *mut GstVideoOverlay); pub fn gst_video_overlay_got_window_handle(overlay: *mut GstVideoOverlay, handle: uintptr_t); pub fn gst_video_overlay_handle_events(overlay: *mut GstVideoOverlay, handle_events: gboolean); pub fn gst_video_overlay_prepare_window_handle(overlay: *mut GstVideoOverlay); - pub fn gst_video_overlay_set_render_rectangle(overlay: *mut GstVideoOverlay, x: c_int, y: c_int, width: c_int, height: c_int) -> gboolean; + pub fn gst_video_overlay_set_render_rectangle( + overlay: *mut GstVideoOverlay, + x: c_int, + y: c_int, + width: c_int, + height: c_int, + ) -> gboolean; pub fn gst_video_overlay_set_window_handle(overlay: *mut GstVideoOverlay, handle: uintptr_t); //========================================================================= // Other functions //========================================================================= #[cfg(any(feature = "v1_8", feature = "dox"))] - pub fn gst_buffer_add_video_affine_transformation_meta(buffer: *mut gst::GstBuffer) -> *mut GstVideoAffineTransformationMeta; + pub fn gst_buffer_add_video_affine_transformation_meta( + buffer: *mut gst::GstBuffer, + ) -> *mut GstVideoAffineTransformationMeta; #[cfg(any(feature = "v1_16", feature = "dox"))] - pub fn gst_buffer_add_video_caption_meta(buffer: *mut gst::GstBuffer, caption_type: GstVideoCaptionType, data: *const u8, size: size_t) -> *mut GstVideoCaptionMeta; - pub fn gst_buffer_add_video_gl_texture_upload_meta(buffer: *mut gst::GstBuffer, texture_orientation: GstVideoGLTextureOrientation, n_textures: c_uint, texture_type: *mut GstVideoGLTextureType, upload: GstVideoGLTextureUpload, user_data: gpointer, user_data_copy: gobject::GBoxedCopyFunc, user_data_free: gobject::GBoxedFreeFunc) -> *mut GstVideoGLTextureUploadMeta; - pub fn gst_buffer_add_video_meta(buffer: *mut gst::GstBuffer, flags: GstVideoFrameFlags, format: GstVideoFormat, width: c_uint, height: c_uint) -> *mut GstVideoMeta; - pub fn gst_buffer_add_video_meta_full(buffer: *mut gst::GstBuffer, flags: GstVideoFrameFlags, format: GstVideoFormat, width: c_uint, height: c_uint, n_planes: c_uint, offset: *mut [size_t; 4], stride: *mut [c_int; 4]) -> *mut GstVideoMeta; - pub fn gst_buffer_add_video_overlay_composition_meta(buf: *mut gst::GstBuffer, comp: *mut GstVideoOverlayComposition) -> *mut GstVideoOverlayCompositionMeta; - pub fn gst_buffer_add_video_region_of_interest_meta(buffer: *mut gst::GstBuffer, roi_type: *const c_char, x: c_uint, y: c_uint, w: c_uint, h: c_uint) -> *mut GstVideoRegionOfInterestMeta; - pub fn gst_buffer_add_video_region_of_interest_meta_id(buffer: *mut gst::GstBuffer, roi_type: glib::GQuark, x: c_uint, y: c_uint, w: c_uint, h: c_uint) -> *mut GstVideoRegionOfInterestMeta; + pub fn gst_buffer_add_video_caption_meta( + buffer: *mut gst::GstBuffer, + caption_type: GstVideoCaptionType, + data: *const u8, + size: size_t, + ) -> *mut GstVideoCaptionMeta; + pub fn gst_buffer_add_video_gl_texture_upload_meta( + buffer: *mut gst::GstBuffer, + texture_orientation: GstVideoGLTextureOrientation, + n_textures: c_uint, + texture_type: *mut GstVideoGLTextureType, + upload: GstVideoGLTextureUpload, + user_data: gpointer, + user_data_copy: gobject::GBoxedCopyFunc, + user_data_free: gobject::GBoxedFreeFunc, + ) -> *mut GstVideoGLTextureUploadMeta; + pub fn gst_buffer_add_video_meta( + buffer: *mut gst::GstBuffer, + flags: GstVideoFrameFlags, + format: GstVideoFormat, + width: c_uint, + height: c_uint, + ) -> *mut GstVideoMeta; + pub fn gst_buffer_add_video_meta_full( + buffer: *mut gst::GstBuffer, + flags: GstVideoFrameFlags, + format: GstVideoFormat, + width: c_uint, + height: c_uint, + n_planes: c_uint, + offset: *mut [size_t; 4], + stride: *mut [c_int; 4], + ) -> *mut GstVideoMeta; + pub fn gst_buffer_add_video_overlay_composition_meta( + buf: *mut gst::GstBuffer, + comp: *mut GstVideoOverlayComposition, + ) -> *mut GstVideoOverlayCompositionMeta; + pub fn gst_buffer_add_video_region_of_interest_meta( + buffer: *mut gst::GstBuffer, + roi_type: *const c_char, + x: c_uint, + y: c_uint, + w: c_uint, + h: c_uint, + ) -> *mut GstVideoRegionOfInterestMeta; + pub fn gst_buffer_add_video_region_of_interest_meta_id( + buffer: *mut gst::GstBuffer, + roi_type: glib::GQuark, + x: c_uint, + y: c_uint, + w: c_uint, + h: c_uint, + ) -> *mut GstVideoRegionOfInterestMeta; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_buffer_add_video_time_code_meta(buffer: *mut gst::GstBuffer, tc: *mut GstVideoTimeCode) -> *mut GstVideoTimeCodeMeta; + pub fn gst_buffer_add_video_time_code_meta( + buffer: *mut gst::GstBuffer, + tc: *mut GstVideoTimeCode, + ) -> *mut GstVideoTimeCodeMeta; #[cfg(any(feature = "v1_10", feature = "dox"))] - pub fn gst_buffer_add_video_time_code_meta_full(buffer: *mut gst::GstBuffer, fps_n: c_uint, fps_d: c_uint, latest_daily_jam: *mut glib::GDateTime, flags: GstVideoTimeCodeFlags, hours: c_uint, minutes: c_uint, seconds: c_uint, frames: c_uint, field_count: c_uint) -> *mut GstVideoTimeCodeMeta; + pub fn gst_buffer_add_video_time_code_meta_full( + buffer: *mut gst::GstBuffer, + fps_n: c_uint, + fps_d: c_uint, + latest_daily_jam: *mut glib::GDateTime, + flags: GstVideoTimeCodeFlags, + hours: c_uint, + minutes: c_uint, + seconds: c_uint, + frames: c_uint, + field_count: c_uint, + ) -> *mut GstVideoTimeCodeMeta; pub fn gst_buffer_get_video_meta(buffer: *mut gst::GstBuffer) -> *mut GstVideoMeta; - pub fn gst_buffer_get_video_meta_id(buffer: *mut gst::GstBuffer, id: c_int) -> *mut GstVideoMeta; - pub fn gst_buffer_get_video_region_of_interest_meta_id(buffer: *mut gst::GstBuffer, id: c_int) -> *mut GstVideoRegionOfInterestMeta; - pub fn gst_buffer_pool_config_get_video_alignment(config: *mut gst::GstStructure, align: *mut GstVideoAlignment) -> gboolean; - pub fn gst_buffer_pool_config_set_video_alignment(config: *mut gst::GstStructure, align: *mut GstVideoAlignment); - pub fn gst_is_video_overlay_prepare_window_handle_message(msg: *mut gst::GstMessage) -> gboolean; + pub fn gst_buffer_get_video_meta_id( + buffer: *mut gst::GstBuffer, + id: c_int, + ) -> *mut GstVideoMeta; + pub fn gst_buffer_get_video_region_of_interest_meta_id( + buffer: *mut gst::GstBuffer, + id: c_int, + ) -> *mut GstVideoRegionOfInterestMeta; + pub fn gst_buffer_pool_config_get_video_alignment( + config: *mut gst::GstStructure, + align: *mut GstVideoAlignment, + ) -> gboolean; + pub fn gst_buffer_pool_config_set_video_alignment( + config: *mut gst::GstStructure, + align: *mut GstVideoAlignment, + ); + pub fn gst_is_video_overlay_prepare_window_handle_message( + msg: *mut gst::GstMessage, + ) -> gboolean; pub fn gst_video_affine_transformation_meta_api_get_type() -> GType; - pub fn gst_video_blend(dest: *mut GstVideoFrame, src: *mut GstVideoFrame, x: c_int, y: c_int, global_alpha: c_float) -> gboolean; - pub fn gst_video_blend_scale_linear_RGBA(src: *mut GstVideoInfo, src_buffer: *mut gst::GstBuffer, dest_height: c_int, dest_width: c_int, dest: *mut GstVideoInfo, dest_buffer: *mut *mut gst::GstBuffer); - pub fn gst_video_calculate_display_ratio(dar_n: *mut c_uint, dar_d: *mut c_uint, video_width: c_uint, video_height: c_uint, video_par_n: c_uint, video_par_d: c_uint, display_par_n: c_uint, display_par_d: c_uint) -> gboolean; + pub fn gst_video_blend( + dest: *mut GstVideoFrame, + src: *mut GstVideoFrame, + x: c_int, + y: c_int, + global_alpha: c_float, + ) -> gboolean; + pub fn gst_video_blend_scale_linear_RGBA( + src: *mut GstVideoInfo, + src_buffer: *mut gst::GstBuffer, + dest_height: c_int, + dest_width: c_int, + dest: *mut GstVideoInfo, + dest_buffer: *mut *mut gst::GstBuffer, + ); + pub fn gst_video_calculate_display_ratio( + dar_n: *mut c_uint, + dar_d: *mut c_uint, + video_width: c_uint, + video_height: c_uint, + video_par_n: c_uint, + video_par_d: c_uint, + display_par_n: c_uint, + display_par_d: c_uint, + ) -> gboolean; pub fn gst_video_caption_meta_api_get_type() -> GType; pub fn gst_video_chroma_from_string(s: *const c_char) -> GstVideoChromaSite; - pub fn gst_video_chroma_resample(resample: *mut GstVideoChromaResample, lines: *mut gpointer, width: c_int); + pub fn gst_video_chroma_resample( + resample: *mut GstVideoChromaResample, + lines: *mut gpointer, + width: c_int, + ); pub fn gst_video_chroma_to_string(site: GstVideoChromaSite) -> *const c_char; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_color_transfer_decode(func: GstVideoTransferFunction, val: c_double) -> c_double; + pub fn gst_video_color_transfer_decode( + func: GstVideoTransferFunction, + val: c_double, + ) -> c_double; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_color_transfer_encode(func: GstVideoTransferFunction, val: c_double) -> c_double; - pub fn gst_video_convert_sample(sample: *mut gst::GstSample, to_caps: *const gst::GstCaps, timeout: gst::GstClockTime, error: *mut *mut glib::GError) -> *mut gst::GstSample; - pub fn gst_video_convert_sample_async(sample: *mut gst::GstSample, to_caps: *const gst::GstCaps, timeout: gst::GstClockTime, callback: GstVideoConvertSampleCallback, user_data: gpointer, destroy_notify: glib::GDestroyNotify); + pub fn gst_video_color_transfer_encode( + func: GstVideoTransferFunction, + val: c_double, + ) -> c_double; + pub fn gst_video_convert_sample( + sample: *mut gst::GstSample, + to_caps: *const gst::GstCaps, + timeout: gst::GstClockTime, + error: *mut *mut glib::GError, + ) -> *mut gst::GstSample; + pub fn gst_video_convert_sample_async( + sample: *mut gst::GstSample, + to_caps: *const gst::GstCaps, + timeout: gst::GstClockTime, + callback: GstVideoConvertSampleCallback, + user_data: gpointer, + destroy_notify: glib::GDestroyNotify, + ); pub fn gst_video_crop_meta_api_get_type() -> GType; pub fn gst_video_event_is_force_key_unit(event: *mut gst::GstEvent) -> gboolean; - pub fn gst_video_event_new_downstream_force_key_unit(timestamp: gst::GstClockTime, stream_time: gst::GstClockTime, running_time: gst::GstClockTime, all_headers: gboolean, count: c_uint) -> *mut gst::GstEvent; + pub fn gst_video_event_new_downstream_force_key_unit( + timestamp: gst::GstClockTime, + stream_time: gst::GstClockTime, + running_time: gst::GstClockTime, + all_headers: gboolean, + count: c_uint, + ) -> *mut gst::GstEvent; pub fn gst_video_event_new_still_frame(in_still: gboolean) -> *mut gst::GstEvent; - pub fn gst_video_event_new_upstream_force_key_unit(running_time: gst::GstClockTime, all_headers: gboolean, count: c_uint) -> *mut gst::GstEvent; - pub fn gst_video_event_parse_downstream_force_key_unit(event: *mut gst::GstEvent, timestamp: *mut gst::GstClockTime, stream_time: *mut gst::GstClockTime, running_time: *mut gst::GstClockTime, all_headers: *mut gboolean, count: *mut c_uint) -> gboolean; - pub fn gst_video_event_parse_still_frame(event: *mut gst::GstEvent, in_still: *mut gboolean) -> gboolean; - pub fn gst_video_event_parse_upstream_force_key_unit(event: *mut gst::GstEvent, running_time: *mut gst::GstClockTime, all_headers: *mut gboolean, count: *mut c_uint) -> gboolean; + pub fn gst_video_event_new_upstream_force_key_unit( + running_time: gst::GstClockTime, + all_headers: gboolean, + count: c_uint, + ) -> *mut gst::GstEvent; + pub fn gst_video_event_parse_downstream_force_key_unit( + event: *mut gst::GstEvent, + timestamp: *mut gst::GstClockTime, + stream_time: *mut gst::GstClockTime, + running_time: *mut gst::GstClockTime, + all_headers: *mut gboolean, + count: *mut c_uint, + ) -> gboolean; + pub fn gst_video_event_parse_still_frame( + event: *mut gst::GstEvent, + in_still: *mut gboolean, + ) -> gboolean; + pub fn gst_video_event_parse_upstream_force_key_unit( + event: *mut gst::GstEvent, + running_time: *mut gst::GstClockTime, + all_headers: *mut gboolean, + count: *mut c_uint, + ) -> gboolean; pub fn gst_video_gl_texture_upload_meta_api_get_type() -> GType; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_guess_framerate(duration: gst::GstClockTime, dest_n: *mut c_int, dest_d: *mut c_int) -> gboolean; + pub fn gst_video_guess_framerate( + duration: gst::GstClockTime, + dest_n: *mut c_int, + dest_d: *mut c_int, + ) -> gboolean; pub fn gst_video_meta_api_get_type() -> GType; #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_video_multiview_get_doubled_height_modes() -> *const gobject::GValue; @@ -2632,13 +3608,29 @@ extern "C" { #[cfg(any(feature = "v1_6", feature = "dox"))] pub fn gst_video_multiview_get_unpacked_modes() -> *const gobject::GValue; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_multiview_guess_half_aspect(mv_mode: GstVideoMultiviewMode, width: c_uint, height: c_uint, par_n: c_uint, par_d: c_uint) -> gboolean; + pub fn gst_video_multiview_guess_half_aspect( + mv_mode: GstVideoMultiviewMode, + width: c_uint, + height: c_uint, + par_n: c_uint, + par_d: c_uint, + ) -> gboolean; #[cfg(any(feature = "v1_6", feature = "dox"))] - pub fn gst_video_multiview_video_info_change_mode(info: *mut GstVideoInfo, out_mview_mode: GstVideoMultiviewMode, out_mview_flags: GstVideoMultiviewFlags); + pub fn gst_video_multiview_video_info_change_mode( + info: *mut GstVideoInfo, + out_mview_mode: GstVideoMultiviewMode, + out_mview_flags: GstVideoMultiviewFlags, + ); pub fn gst_video_overlay_composition_meta_api_get_type() -> GType; pub fn gst_video_region_of_interest_meta_api_get_type() -> GType; #[cfg(any(feature = "v1_4", feature = "dox"))] - pub fn gst_video_tile_get_index(mode: GstVideoTileMode, x: c_int, y: c_int, x_tiles: c_int, y_tiles: c_int) -> c_uint; + pub fn gst_video_tile_get_index( + mode: GstVideoTileMode, + x: c_int, + y: c_int, + x_tiles: c_int, + y_tiles: c_int, + ) -> c_uint; pub fn gst_video_time_code_meta_api_get_type() -> GType; } diff --git a/gstreamer-video-sys/tests/abi.rs b/gstreamer-video-sys/tests/abi.rs index b54709e98..398026e82 100644 --- a/gstreamer-video-sys/tests/abi.rs +++ b/gstreamer-video-sys/tests/abi.rs @@ -5,13 +5,13 @@ extern crate gstreamer_video_sys; extern crate shell_words; extern crate tempdir; +use gstreamer_video_sys::*; use std::env; use std::error::Error; -use std::path::Path; use std::mem::{align_of, size_of}; +use std::path::Path; use std::process::Command; use std::str; -use gstreamer_video_sys::*; static PACKAGES: &[&str] = &["gstreamer-video-1.0"]; @@ -47,8 +47,7 @@ impl Compiler { cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { - return Err(format!("compilation command {:?} failed, {}", - &cmd, status).into()); + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } @@ -77,14 +76,12 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { cmd.args(packages); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {:?} returned {}", - &cmd, out.status).into()); + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } - #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, @@ -115,9 +112,8 @@ impl Results { fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", - self.passed, - self.failed, - self.failed_to_compile) + self.passed, self.failed, self.failed_to_compile + ) } fn expect_total_success(&self) { if self.failed == 0 { @@ -133,24 +129,28 @@ fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!("1", - get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), - "failed to obtain correct constant value for 1"); + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); - eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_value, c_value); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); } } }; @@ -166,24 +166,31 @@ fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!(Layout {size: 1, alignment: 1}, - get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), - "failed to obtain correct layout for char type"); + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); - eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_layout, &c_layout); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); } } }; @@ -203,15 +210,14 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result Result> { @@ -223,113 +229,666 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result(), alignment: align_of::()}), - ("GstColorBalanceChannelClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstColorBalanceInterface", Layout {size: size_of::(), alignment: align_of::()}), - ("GstColorBalanceType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstNavigationCommand", Layout {size: size_of::(), alignment: align_of::()}), - ("GstNavigationEventType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstNavigationInterface", Layout {size: size_of::(), alignment: align_of::()}), - ("GstNavigationMessageType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstNavigationQueryType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoAffineTransformationMeta", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoAggregator", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoAggregatorClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoAggregatorConvertPad", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoAggregatorConvertPadClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoAggregatorPad", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoAggregatorPadClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoAlignment", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoAlphaMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoAncillary", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoAncillaryDID", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoAncillaryDID16", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoBufferFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoBufferPool", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoBufferPoolClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoCaptionMeta", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoCaptionType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoChromaFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoChromaMethod", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoChromaMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoChromaSite", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoCodecFrame", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoCodecFrameFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoCodecState", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoColorMatrix", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoColorPrimaries", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoColorPrimariesInfo", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoColorRange", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoColorimetry", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoCropMeta", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoDecoder", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoDecoderClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoDirectionInterface", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoDitherFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoDitherMethod", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoEncoder", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoEncoderClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoFieldOrder", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoFilter", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoFilterClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoFormat", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoFormatFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoFormatInfo", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoFrame", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoFrameFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoFrameMapFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoGLTextureOrientation", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoGLTextureType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoGLTextureUploadMeta", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoGammaMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoInfo", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoInterlaceMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoMatrixMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoMeta", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoMetaTransform", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoMultiviewFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoMultiviewFramePacking", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoMultiviewMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoOrientationInterface", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoOrientationMethod", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoOverlayCompositionMeta", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoOverlayFormatFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoOverlayInterface", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoPackFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoPrimariesMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoRectangle", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoRegionOfInterestMeta", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoResampler", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoResamplerFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoResamplerMethod", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoScalerFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoSink", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoSinkClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoTileMode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoTileType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoTimeCode", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoTimeCodeConfig", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoTimeCodeFlags", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoTimeCodeInterval", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoTimeCodeMeta", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoTransferFunction", Layout {size: size_of::(), alignment: align_of::()}), - ("GstVideoVBIParserResult", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstColorBalanceChannel", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstColorBalanceChannelClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstColorBalanceInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstColorBalanceType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNavigationCommand", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNavigationEventType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNavigationInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNavigationMessageType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNavigationQueryType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAffineTransformationMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAggregator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAggregatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAggregatorConvertPad", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAggregatorConvertPadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAggregatorPad", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAggregatorPadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAlignment", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAlphaMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAncillary", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAncillaryDID", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAncillaryDID16", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoBufferFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoBufferPool", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoBufferPoolClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoCaptionMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoCaptionType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoChromaFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoChromaMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoChromaMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoChromaSite", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoCodecFrame", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoCodecFrameFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoCodecState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoColorMatrix", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoColorPrimaries", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoColorPrimariesInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoColorRange", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoColorimetry", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoCropMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoDecoder", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoDecoderClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoDirectionInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoDitherFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoDitherMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoEncoder", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoEncoderClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFieldOrder", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFilter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFilterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFormat", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFormatFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFormatInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFrame", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFrameFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFrameMapFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoGLTextureOrientation", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoGLTextureType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoGLTextureUploadMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoGammaMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoInterlaceMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoMatrixMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoMetaTransform", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoMultiviewFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoMultiviewFramePacking", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoMultiviewMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoOrientationInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoOrientationMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoOverlayCompositionMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoOverlayFormatFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoOverlayInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoPackFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoPrimariesMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoRectangle", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoRegionOfInterestMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoResampler", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoResamplerFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoResamplerMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoScalerFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoSink", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoSinkClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoTileMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoTileType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoTimeCode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoTimeCodeConfig", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoTimeCodeFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoTimeCodeInterval", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoTimeCodeMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoTransferFunction", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoVBIParserResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ @@ -735,5 +1294,3 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_VIDEO_VBI_PARSER_RESULT_ERROR", "2"), ("(gint) GST_VIDEO_VBI_PARSER_RESULT_OK", "1"), ]; - - diff --git a/gstreamer-webrtc-sys/build.rs b/gstreamer-webrtc-sys/build.rs index 8a37a847f..665e2f9b7 100644 --- a/gstreamer-webrtc-sys/build.rs +++ b/gstreamer-webrtc-sys/build.rs @@ -6,8 +6,8 @@ extern crate pkg_config; use pkg_config::{Config, Error}; use std::env; -use std::io::prelude::*; use std::io; +use std::io::prelude::*; use std::process; fn main() { @@ -34,7 +34,7 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()) + return Ok(()); } let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); @@ -56,8 +56,10 @@ fn find() -> Result<(), Error> { println!("cargo:rustc-link-lib=dylib={}", lib_); } for path in library.link_paths.iter() { - println!("cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist")); + println!( + "cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist") + ); } } Ok(()) @@ -71,4 +73,3 @@ fn find() -> Result<(), Error> { Err(err) => Err(err), } } - diff --git a/gstreamer-webrtc-sys/src/lib.rs b/gstreamer-webrtc-sys/src/lib.rs index b0ba8d3f0..f1c72eeee 100644 --- a/gstreamer-webrtc-sys/src/lib.rs +++ b/gstreamer-webrtc-sys/src/lib.rs @@ -3,18 +3,23 @@ // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] -#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] -extern crate libc; extern crate glib_sys as glib; extern crate gobject_sys as gobject; -extern crate gstreamer_sys as gst; extern crate gstreamer_sdp_sys as gst_sdp; +extern crate gstreamer_sys as gst; +extern crate libc; #[allow(unused_imports)] -use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, - c_short, c_ushort, c_long, c_ulong, - c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; +use libc::{ + c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, + intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE, +}; #[allow(unused_imports)] use glib::{gboolean, gconstpointer, gpointer, GType}; @@ -143,10 +148,13 @@ pub struct GstWebRTCDTLSTransportClass { impl ::std::fmt::Debug for GstWebRTCDTLSTransportClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstWebRTCDTLSTransportClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("_padding", &self._padding) - .finish() + f.debug_struct(&format!( + "GstWebRTCDTLSTransportClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("_padding", &self._padding) + .finish() } } @@ -160,11 +168,14 @@ pub struct GstWebRTCICETransportClass { impl ::std::fmt::Debug for GstWebRTCICETransportClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstWebRTCICETransportClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("gather_candidates", &self.gather_candidates) - .field("_padding", &self._padding) - .finish() + f.debug_struct(&format!( + "GstWebRTCICETransportClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("gather_candidates", &self.gather_candidates) + .field("_padding", &self._padding) + .finish() } } @@ -177,10 +188,13 @@ pub struct GstWebRTCRTPReceiverClass { impl ::std::fmt::Debug for GstWebRTCRTPReceiverClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstWebRTCRTPReceiverClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("_padding", &self._padding) - .finish() + f.debug_struct(&format!( + "GstWebRTCRTPReceiverClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("_padding", &self._padding) + .finish() } } @@ -194,9 +208,9 @@ pub struct GstWebRTCRTPSenderClass { impl ::std::fmt::Debug for GstWebRTCRTPSenderClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstWebRTCRTPSenderClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("_padding", &self._padding) - .finish() + .field("parent_class", &self.parent_class) + .field("_padding", &self._padding) + .finish() } } @@ -209,10 +223,13 @@ pub struct GstWebRTCRTPTransceiverClass { impl ::std::fmt::Debug for GstWebRTCRTPTransceiverClass { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstWebRTCRTPTransceiverClass @ {:?}", self as *const _)) - .field("parent_class", &self.parent_class) - .field("_padding", &self._padding) - .finish() + f.debug_struct(&format!( + "GstWebRTCRTPTransceiverClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("_padding", &self._padding) + .finish() } } @@ -225,10 +242,13 @@ pub struct GstWebRTCSessionDescription { impl ::std::fmt::Debug for GstWebRTCSessionDescription { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - f.debug_struct(&format!("GstWebRTCSessionDescription @ {:?}", self as *const _)) - .field("type_", &self.type_) - .field("sdp", &self.sdp) - .finish() + f.debug_struct(&format!( + "GstWebRTCSessionDescription @ {:?}", + self as *const _ + )) + .field("type_", &self.type_) + .field("sdp", &self.sdp) + .finish() } } @@ -250,16 +270,16 @@ pub struct GstWebRTCDTLSTransport { impl ::std::fmt::Debug for GstWebRTCDTLSTransport { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstWebRTCDTLSTransport @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("transport", &self.transport) - .field("state", &self.state) - .field("is_rtcp", &self.is_rtcp) - .field("client", &self.client) - .field("session_id", &self.session_id) - .field("dtlssrtpenc", &self.dtlssrtpenc) - .field("dtlssrtpdec", &self.dtlssrtpdec) - .field("_padding", &self._padding) - .finish() + .field("parent", &self.parent) + .field("transport", &self.transport) + .field("state", &self.state) + .field("is_rtcp", &self.is_rtcp) + .field("client", &self.client) + .field("session_id", &self.session_id) + .field("dtlssrtpenc", &self.dtlssrtpenc) + .field("dtlssrtpdec", &self.dtlssrtpdec) + .field("_padding", &self._padding) + .finish() } } @@ -279,15 +299,15 @@ pub struct GstWebRTCICETransport { impl ::std::fmt::Debug for GstWebRTCICETransport { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstWebRTCICETransport @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("role", &self.role) - .field("component", &self.component) - .field("state", &self.state) - .field("gathering_state", &self.gathering_state) - .field("src", &self.src) - .field("sink", &self.sink) - .field("_padding", &self._padding) - .finish() + .field("parent", &self.parent) + .field("role", &self.role) + .field("component", &self.component) + .field("state", &self.state) + .field("gathering_state", &self.gathering_state) + .field("src", &self.src) + .field("sink", &self.sink) + .field("_padding", &self._padding) + .finish() } } @@ -303,11 +323,11 @@ pub struct GstWebRTCRTPReceiver { impl ::std::fmt::Debug for GstWebRTCRTPReceiver { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstWebRTCRTPReceiver @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("transport", &self.transport) - .field("rtcp_transport", &self.rtcp_transport) - .field("_padding", &self._padding) - .finish() + .field("parent", &self.parent) + .field("transport", &self.transport) + .field("rtcp_transport", &self.rtcp_transport) + .field("_padding", &self._padding) + .finish() } } @@ -324,12 +344,12 @@ pub struct GstWebRTCRTPSender { impl ::std::fmt::Debug for GstWebRTCRTPSender { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstWebRTCRTPSender @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("transport", &self.transport) - .field("rtcp_transport", &self.rtcp_transport) - .field("send_encodings", &self.send_encodings) - .field("_padding", &self._padding) - .finish() + .field("parent", &self.parent) + .field("transport", &self.transport) + .field("rtcp_transport", &self.rtcp_transport) + .field("send_encodings", &self.send_encodings) + .field("_padding", &self._padding) + .finish() } } @@ -351,17 +371,17 @@ pub struct GstWebRTCRTPTransceiver { impl ::std::fmt::Debug for GstWebRTCRTPTransceiver { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { f.debug_struct(&format!("GstWebRTCRTPTransceiver @ {:?}", self as *const _)) - .field("parent", &self.parent) - .field("mline", &self.mline) - .field("mid", &self.mid) - .field("stopped", &self.stopped) - .field("sender", &self.sender) - .field("receiver", &self.receiver) - .field("direction", &self.direction) - .field("current_direction", &self.current_direction) - .field("codec_preferences", &self.codec_preferences) - .field("_padding", &self._padding) - .finish() + .field("parent", &self.parent) + .field("mline", &self.mline) + .field("mid", &self.mid) + .field("stopped", &self.stopped) + .field("sender", &self.sender) + .field("receiver", &self.receiver) + .field("direction", &self.direction) + .field("current_direction", &self.current_direction) + .field("codec_preferences", &self.codec_preferences) + .field("_padding", &self._padding) + .finish() } } @@ -457,24 +477,46 @@ extern "C" { // GstWebRTCSessionDescription //========================================================================= pub fn gst_webrtc_session_description_get_type() -> GType; - pub fn gst_webrtc_session_description_new(type_: GstWebRTCSDPType, sdp: *mut gst_sdp::GstSDPMessage) -> *mut GstWebRTCSessionDescription; - pub fn gst_webrtc_session_description_copy(src: *const GstWebRTCSessionDescription) -> *mut GstWebRTCSessionDescription; + pub fn gst_webrtc_session_description_new( + type_: GstWebRTCSDPType, + sdp: *mut gst_sdp::GstSDPMessage, + ) -> *mut GstWebRTCSessionDescription; + pub fn gst_webrtc_session_description_copy( + src: *const GstWebRTCSessionDescription, + ) -> *mut GstWebRTCSessionDescription; pub fn gst_webrtc_session_description_free(desc: *mut GstWebRTCSessionDescription); //========================================================================= // GstWebRTCDTLSTransport //========================================================================= pub fn gst_webrtc_dtls_transport_get_type() -> GType; - pub fn gst_webrtc_dtls_transport_new(session_id: c_uint, rtcp: gboolean) -> *mut GstWebRTCDTLSTransport; - pub fn gst_webrtc_dtls_transport_set_transport(transport: *mut GstWebRTCDTLSTransport, ice: *mut GstWebRTCICETransport); + pub fn gst_webrtc_dtls_transport_new( + session_id: c_uint, + rtcp: gboolean, + ) -> *mut GstWebRTCDTLSTransport; + pub fn gst_webrtc_dtls_transport_set_transport( + transport: *mut GstWebRTCDTLSTransport, + ice: *mut GstWebRTCICETransport, + ); //========================================================================= // GstWebRTCICETransport //========================================================================= pub fn gst_webrtc_ice_transport_get_type() -> GType; - pub fn gst_webrtc_ice_transport_connection_state_change(ice: *mut GstWebRTCICETransport, new_state: GstWebRTCICEConnectionState); - pub fn gst_webrtc_ice_transport_gathering_state_change(ice: *mut GstWebRTCICETransport, new_state: GstWebRTCICEGatheringState); - pub fn gst_webrtc_ice_transport_new_candidate(ice: *mut GstWebRTCICETransport, stream_id: c_uint, component: GstWebRTCICEComponent, attr: *mut c_char); + pub fn gst_webrtc_ice_transport_connection_state_change( + ice: *mut GstWebRTCICETransport, + new_state: GstWebRTCICEConnectionState, + ); + pub fn gst_webrtc_ice_transport_gathering_state_change( + ice: *mut GstWebRTCICETransport, + new_state: GstWebRTCICEGatheringState, + ); + pub fn gst_webrtc_ice_transport_new_candidate( + ice: *mut GstWebRTCICETransport, + stream_id: c_uint, + component: GstWebRTCICEComponent, + attr: *mut c_char, + ); pub fn gst_webrtc_ice_transport_selected_pair_change(ice: *mut GstWebRTCICETransport); //========================================================================= @@ -482,16 +524,28 @@ extern "C" { //========================================================================= pub fn gst_webrtc_rtp_receiver_get_type() -> GType; pub fn gst_webrtc_rtp_receiver_new() -> *mut GstWebRTCRTPReceiver; - pub fn gst_webrtc_rtp_receiver_set_rtcp_transport(receiver: *mut GstWebRTCRTPReceiver, transport: *mut GstWebRTCDTLSTransport); - pub fn gst_webrtc_rtp_receiver_set_transport(receiver: *mut GstWebRTCRTPReceiver, transport: *mut GstWebRTCDTLSTransport); + pub fn gst_webrtc_rtp_receiver_set_rtcp_transport( + receiver: *mut GstWebRTCRTPReceiver, + transport: *mut GstWebRTCDTLSTransport, + ); + pub fn gst_webrtc_rtp_receiver_set_transport( + receiver: *mut GstWebRTCRTPReceiver, + transport: *mut GstWebRTCDTLSTransport, + ); //========================================================================= // GstWebRTCRTPSender //========================================================================= pub fn gst_webrtc_rtp_sender_get_type() -> GType; pub fn gst_webrtc_rtp_sender_new() -> *mut GstWebRTCRTPSender; - pub fn gst_webrtc_rtp_sender_set_rtcp_transport(sender: *mut GstWebRTCRTPSender, transport: *mut GstWebRTCDTLSTransport); - pub fn gst_webrtc_rtp_sender_set_transport(sender: *mut GstWebRTCRTPSender, transport: *mut GstWebRTCDTLSTransport); + pub fn gst_webrtc_rtp_sender_set_rtcp_transport( + sender: *mut GstWebRTCRTPSender, + transport: *mut GstWebRTCDTLSTransport, + ); + pub fn gst_webrtc_rtp_sender_set_transport( + sender: *mut GstWebRTCRTPSender, + transport: *mut GstWebRTCDTLSTransport, + ); //========================================================================= // GstWebRTCRTPTransceiver diff --git a/gstreamer-webrtc-sys/tests/abi.rs b/gstreamer-webrtc-sys/tests/abi.rs index 842f3934f..8baa6140d 100644 --- a/gstreamer-webrtc-sys/tests/abi.rs +++ b/gstreamer-webrtc-sys/tests/abi.rs @@ -5,13 +5,13 @@ extern crate gstreamer_webrtc_sys; extern crate shell_words; extern crate tempdir; +use gstreamer_webrtc_sys::*; use std::env; use std::error::Error; -use std::path::Path; use std::mem::{align_of, size_of}; +use std::path::Path; use std::process::Command; use std::str; -use gstreamer_webrtc_sys::*; static PACKAGES: &[&str] = &["gstreamer-webrtc-1.0"]; @@ -47,8 +47,7 @@ impl Compiler { cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { - return Err(format!("compilation command {:?} failed, {}", - &cmd, status).into()); + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } @@ -77,14 +76,12 @@ fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { cmd.args(packages); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {:?} returned {}", - &cmd, out.status).into()); + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } - #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, @@ -115,9 +112,8 @@ impl Results { fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", - self.passed, - self.failed, - self.failed_to_compile) + self.passed, self.failed, self.failed_to_compile + ) } fn expect_total_success(&self) { if self.failed == 0 { @@ -133,24 +129,28 @@ fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!("1", - get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), - "failed to obtain correct constant value for 1"); + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); - eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_value, c_value); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); } } }; @@ -166,24 +166,31 @@ fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); - assert_eq!(Layout {size: 1, alignment: 1}, - get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), - "failed to obtain correct layout for char type"); + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); - let mut results : Results = Default::default(); + let mut results: Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); - }, + } Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); - eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", - name, rust_layout, &c_layout); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); } } }; @@ -203,15 +210,14 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result Result> { @@ -223,49 +229,218 @@ fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result(), alignment: align_of::()}), - ("GstWebRTCDTLSSetup", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCDTLSTransport", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCDTLSTransportClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCDTLSTransportState", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCDataChannelState", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCFECType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCICEComponent", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCICEConnectionState", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCICEGatheringState", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCICERole", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCICETransport", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCICETransportClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCICETransportPolicy", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCPeerConnectionState", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCPriorityType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCRTPReceiver", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCRTPReceiverClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCRTPSender", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCRTPSenderClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCRTPTransceiver", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCRTPTransceiverClass", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCRTPTransceiverDirection", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCSCTPTransportState", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCSDPType", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCSessionDescription", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCSignalingState", Layout {size: size_of::(), alignment: align_of::()}), - ("GstWebRTCStatsType", Layout {size: size_of::(), alignment: align_of::()}), + ( + "GstWebRTCBundlePolicy", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCDTLSSetup", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCDTLSTransport", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCDTLSTransportClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCDTLSTransportState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCDataChannelState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCFECType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCICEComponent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCICEConnectionState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCICEGatheringState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCICERole", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCICETransport", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCICETransportClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCICETransportPolicy", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCPeerConnectionState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCPriorityType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCRTPReceiver", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCRTPReceiverClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCRTPSender", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCRTPSenderClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCRTPTransceiver", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCRTPTransceiverClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCRTPTransceiverDirection", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCSCTPTransportState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCSDPType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCSessionDescription", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCSignalingState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCStatsType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ @@ -332,7 +507,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER", "2"), ("(gint) GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER", "4"), ("(gint) GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER", "3"), - ("(gint) GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER", "5"), + ( + "(gint) GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER", + "5", + ), ("(gint) GST_WEBRTC_SIGNALING_STATE_STABLE", "0"), ("(gint) GST_WEBRTC_STATS_CANDIDATE_PAIR", "11"), ("(gint) GST_WEBRTC_STATS_CERTIFICATE", "14"), @@ -349,5 +527,3 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) GST_WEBRTC_STATS_STREAM", "9"), ("(gint) GST_WEBRTC_STATS_TRANSPORT", "10"), ]; - -