diff --git a/gir b/gir index e941700f7..1c1a8d701 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit e941700f720b09ceb98d37369275ca292c34d650 +Subproject commit 1c1a8d701cf372ed673ca609bd176a75848e75aa diff --git a/gstreamer-app/src/auto/versions.txt b/gstreamer-app/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-app/src/auto/versions.txt +++ b/gstreamer-app/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-app/sys/build.rs b/gstreamer-app/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-app/sys/build.rs +++ b/gstreamer-app/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-app/sys/src/lib.rs b/gstreamer-app/sys/src/lib.rs index ea47999b2..1ee6c81c4 100644 --- a/gstreamer-app/sys/src/lib.rs +++ b/gstreamer-app/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-app/sys/tests/abi.rs b/gstreamer-app/sys/tests/abi.rs index cdc261b39..8913c132c 100644 --- a/gstreamer-app/sys/tests/abi.rs +++ b/gstreamer-app/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_app_sys::*; diff --git a/gstreamer-app/sys/tests/constant.c b/gstreamer-app/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-app/sys/tests/constant.c +++ b/gstreamer-app/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-app/sys/tests/layout.c b/gstreamer-app/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-app/sys/tests/layout.c +++ b/gstreamer-app/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-audio/src/auto/enums.rs b/gstreamer-audio/src/auto/enums.rs index b66ee88cc..bcdfa6a41 100644 --- a/gstreamer-audio/src/auto/enums.rs +++ b/gstreamer-audio/src/auto/enums.rs @@ -8,6 +8,7 @@ use glib::value::FromValueOptional; use glib::value::SetValue; use glib::StaticType; use glib::Type; +use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -205,6 +206,20 @@ pub enum AudioFormat { __Unknown(i32), } +impl AudioFormat { + pub fn from_string(format: &str) -> AudioFormat { + assert_initialized_main_thread!(); + unsafe { from_glib(ffi::gst_audio_format_from_string(format.to_glib_none().0)) } + } +} + +impl fmt::Display for AudioFormat { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&self.to_str()) + } +} + #[doc(hidden)] impl ToGlib for AudioFormat { type GlibType = ffi::GstAudioFormat; diff --git a/gstreamer-audio/src/auto/versions.txt b/gstreamer-audio/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-audio/src/auto/versions.txt +++ b/gstreamer-audio/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-audio/sys/build.rs b/gstreamer-audio/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-audio/sys/build.rs +++ b/gstreamer-audio/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-audio/sys/src/lib.rs b/gstreamer-audio/sys/src/lib.rs index 778526e44..fde0b5ad2 100644 --- a/gstreamer-audio/sys/src/lib.rs +++ b/gstreamer-audio/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-audio/sys/tests/abi.rs b/gstreamer-audio/sys/tests/abi.rs index f6c347109..d2eeda743 100644 --- a/gstreamer-audio/sys/tests/abi.rs +++ b/gstreamer-audio/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_audio_sys::*; diff --git a/gstreamer-audio/sys/tests/constant.c b/gstreamer-audio/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-audio/sys/tests/constant.c +++ b/gstreamer-audio/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-audio/sys/tests/layout.c b/gstreamer-audio/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-audio/sys/tests/layout.c +++ b/gstreamer-audio/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-base/src/auto/versions.txt b/gstreamer-base/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-base/src/auto/versions.txt +++ b/gstreamer-base/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-base/sys/build.rs b/gstreamer-base/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-base/sys/build.rs +++ b/gstreamer-base/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-base/sys/src/lib.rs b/gstreamer-base/sys/src/lib.rs index 55384cf2e..bb8b115b8 100644 --- a/gstreamer-base/sys/src/lib.rs +++ b/gstreamer-base/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-base/sys/tests/abi.rs b/gstreamer-base/sys/tests/abi.rs index d27a872bb..1e4e060ce 100644 --- a/gstreamer-base/sys/tests/abi.rs +++ b/gstreamer-base/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_base_sys::*; diff --git a/gstreamer-base/sys/tests/constant.c b/gstreamer-base/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-base/sys/tests/constant.c +++ b/gstreamer-base/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-base/sys/tests/layout.c b/gstreamer-base/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-base/sys/tests/layout.c +++ b/gstreamer-base/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-check/src/auto/versions.txt b/gstreamer-check/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-check/src/auto/versions.txt +++ b/gstreamer-check/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-check/sys/build.rs b/gstreamer-check/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-check/sys/build.rs +++ b/gstreamer-check/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-check/sys/src/lib.rs b/gstreamer-check/sys/src/lib.rs index 5e3a1fcf5..b44a53928 100644 --- a/gstreamer-check/sys/src/lib.rs +++ b/gstreamer-check/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-check/sys/tests/abi.rs b/gstreamer-check/sys/tests/abi.rs index afebdeed3..e8101ab17 100644 --- a/gstreamer-check/sys/tests/abi.rs +++ b/gstreamer-check/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_check_sys::*; diff --git a/gstreamer-check/sys/tests/constant.c b/gstreamer-check/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-check/sys/tests/constant.c +++ b/gstreamer-check/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-check/sys/tests/layout.c b/gstreamer-check/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-check/sys/tests/layout.c +++ b/gstreamer-check/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-controller/src/auto/versions.txt b/gstreamer-controller/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-controller/src/auto/versions.txt +++ b/gstreamer-controller/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-controller/sys/build.rs b/gstreamer-controller/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-controller/sys/build.rs +++ b/gstreamer-controller/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-controller/sys/src/lib.rs b/gstreamer-controller/sys/src/lib.rs index a85060864..125cc3a24 100644 --- a/gstreamer-controller/sys/src/lib.rs +++ b/gstreamer-controller/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-controller/sys/tests/abi.rs b/gstreamer-controller/sys/tests/abi.rs index 5bace8a94..a87206821 100644 --- a/gstreamer-controller/sys/tests/abi.rs +++ b/gstreamer-controller/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_controller_sys::*; diff --git a/gstreamer-controller/sys/tests/constant.c b/gstreamer-controller/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-controller/sys/tests/constant.c +++ b/gstreamer-controller/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-controller/sys/tests/layout.c b/gstreamer-controller/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-controller/sys/tests/layout.c +++ b/gstreamer-controller/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-editing-services/src/auto/enums.rs b/gstreamer-editing-services/src/auto/enums.rs index ba8566ee4..a3841e16a 100644 --- a/gstreamer-editing-services/src/auto/enums.rs +++ b/gstreamer-editing-services/src/auto/enums.rs @@ -8,6 +8,12 @@ use glib::value::FromValueOptional; use glib::value::SetValue; use glib::StaticType; use glib::Type; +#[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +use std::ffi::CStr; +#[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -19,6 +25,31 @@ pub enum Edge { __Unknown(i32), } +impl Edge { + #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + pub fn name<'a>(self) -> &'a str { + unsafe { + CStr::from_ptr( + ffi::ges_edge_name(self.to_glib()) + .as_ref() + .expect("ges_edge_name returned NULL"), + ) + .to_str() + .expect("ges_edge_name returned an invalid string") + } + } +} + +#[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +impl fmt::Display for Edge { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&self.name()) + } +} + #[doc(hidden)] impl ToGlib for Edge { type GlibType = ffi::GESEdge; @@ -82,6 +113,31 @@ pub enum EditMode { __Unknown(i32), } +impl EditMode { + #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + pub fn name<'a>(self) -> &'a str { + unsafe { + CStr::from_ptr( + ffi::ges_edit_mode_name(self.to_glib()) + .as_ref() + .expect("ges_edit_mode_name returned NULL"), + ) + .to_str() + .expect("ges_edit_mode_name returned an invalid string") + } + } +} + +#[cfg(any(feature = "v1_18", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] +impl fmt::Display for EditMode { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&self.name()) + } +} + #[doc(hidden)] impl ToGlib for EditMode { type GlibType = ffi::GESEditMode; diff --git a/gstreamer-editing-services/src/auto/flags.rs b/gstreamer-editing-services/src/auto/flags.rs index d4e8ff4d3..98471bd6f 100644 --- a/gstreamer-editing-services/src/auto/flags.rs +++ b/gstreamer-editing-services/src/auto/flags.rs @@ -9,6 +9,8 @@ use glib::value::FromValueOptional; use glib::value::SetValue; use glib::StaticType; use glib::Type; +use std::ffi::CStr; +use std::fmt; bitflags! { pub struct PipelineFlags: u32 { @@ -71,6 +73,27 @@ bitflags! { } } +impl TrackType { + pub fn name<'a>(self) -> &'a str { + unsafe { + CStr::from_ptr( + ffi::ges_track_type_name(self.to_glib()) + .as_ref() + .expect("ges_track_type_name returned NULL"), + ) + .to_str() + .expect("ges_track_type_name returned an invalid string") + } + } +} + +impl fmt::Display for TrackType { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&self.name()) + } +} + #[doc(hidden)] impl ToGlib for TrackType { type GlibType = ffi::GESTrackType; diff --git a/gstreamer-editing-services/src/auto/versions.txt b/gstreamer-editing-services/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-editing-services/src/auto/versions.txt +++ b/gstreamer-editing-services/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-editing-services/sys/build.rs b/gstreamer-editing-services/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-editing-services/sys/build.rs +++ b/gstreamer-editing-services/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-editing-services/sys/src/lib.rs b/gstreamer-editing-services/sys/src/lib.rs index 64d710b53..9a734cbb7 100644 --- a/gstreamer-editing-services/sys/src/lib.rs +++ b/gstreamer-editing-services/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-editing-services/sys/tests/abi.rs b/gstreamer-editing-services/sys/tests/abi.rs index 12ab61d3e..34f63a8be 100644 --- a/gstreamer-editing-services/sys/tests/abi.rs +++ b/gstreamer-editing-services/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_editing_services_sys::*; diff --git a/gstreamer-editing-services/sys/tests/constant.c b/gstreamer-editing-services/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-editing-services/sys/tests/constant.c +++ b/gstreamer-editing-services/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-editing-services/sys/tests/layout.c b/gstreamer-editing-services/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-editing-services/sys/tests/layout.c +++ b/gstreamer-editing-services/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-gl/egl/src/auto/versions.txt b/gstreamer-gl/egl/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-gl/egl/src/auto/versions.txt +++ b/gstreamer-gl/egl/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-gl/egl/sys/build.rs b/gstreamer-gl/egl/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-gl/egl/sys/build.rs +++ b/gstreamer-gl/egl/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-gl/egl/sys/src/lib.rs b/gstreamer-gl/egl/sys/src/lib.rs index cccfc8f3d..b5ed8384a 100644 --- a/gstreamer-gl/egl/sys/src/lib.rs +++ b/gstreamer-gl/egl/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-gl/egl/sys/tests/abi.rs b/gstreamer-gl/egl/sys/tests/abi.rs index 640a2ae22..5c1ef206f 100644 --- a/gstreamer-gl/egl/sys/tests/abi.rs +++ b/gstreamer-gl/egl/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_gl_egl_sys::*; diff --git a/gstreamer-gl/egl/sys/tests/constant.c b/gstreamer-gl/egl/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-gl/egl/sys/tests/constant.c +++ b/gstreamer-gl/egl/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-gl/egl/sys/tests/layout.c b/gstreamer-gl/egl/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-gl/egl/sys/tests/layout.c +++ b/gstreamer-gl/egl/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-gl/src/auto/enums.rs b/gstreamer-gl/src/auto/enums.rs index 4692ff932..4fcd38ef8 100644 --- a/gstreamer-gl/src/auto/enums.rs +++ b/gstreamer-gl/src/auto/enums.rs @@ -2,7 +2,14 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +#[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +use crate::GLContext; +use crate::GLSLProfile; use glib::error::ErrorDomain; +#[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +use glib::object::IsA; use glib::translate::*; use glib::value::FromValue; use glib::value::FromValueOptional; @@ -10,6 +17,7 @@ use glib::value::SetValue; use glib::Quark; use glib::StaticType; use glib::Type; +use std::mem; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -132,6 +140,47 @@ pub enum GLFormat { __Unknown(i32), } +impl GLFormat { + //pub fn from_video_info>(context: &P, vinfo: /*Ignored*/&mut gst_video::VideoInfo, plane: u32) -> GLFormat { + // unsafe { TODO: call ffi:gst_gl_format_from_video_info() } + //} + + #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + pub fn is_supported>(context: &P, format: GLFormat) -> bool { + skip_assert_initialized!(); + unsafe { + from_glib(ffi::gst_gl_format_is_supported( + context.as_ref().to_glib_none().0, + format.to_glib(), + )) + } + } + + #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + pub fn type_from_sized_gl_format(self) -> (GLFormat, u32) { + assert_initialized_main_thread!(); + unsafe { + let mut unsized_format = mem::MaybeUninit::uninit(); + let mut gl_type = mem::MaybeUninit::uninit(); + ffi::gst_gl_format_type_from_sized_gl_format( + self.to_glib(), + unsized_format.as_mut_ptr(), + gl_type.as_mut_ptr(), + ); + let unsized_format = unsized_format.assume_init(); + let gl_type = gl_type.assume_init(); + (from_glib(unsized_format), gl_type) + } + } + + pub fn type_n_bytes(format: u32, type_: u32) -> u32 { + assert_initialized_main_thread!(); + unsafe { ffi::gst_gl_format_type_n_bytes(format, type_) } + } +} + #[doc(hidden)] impl ToGlib for GLFormat { type GlibType = ffi::GstGLFormat; @@ -383,6 +432,48 @@ pub enum GLSLVersion { __Unknown(i32), } +impl GLSLVersion { + pub fn from_string(string: &str) -> GLSLVersion { + assert_initialized_main_thread!(); + unsafe { from_glib(ffi::gst_glsl_version_from_string(string.to_glib_none().0)) } + } + + pub fn profile_from_string(string: &str) -> Option<(GLSLVersion, GLSLProfile)> { + assert_initialized_main_thread!(); + unsafe { + let mut version_ret = mem::MaybeUninit::uninit(); + let mut profile_ret = mem::MaybeUninit::uninit(); + let ret = from_glib(ffi::gst_glsl_version_profile_from_string( + string.to_glib_none().0, + version_ret.as_mut_ptr(), + profile_ret.as_mut_ptr(), + )); + let version_ret = version_ret.assume_init(); + let profile_ret = profile_ret.assume_init(); + if ret { + Some((from_glib(version_ret), from_glib(profile_ret))) + } else { + None + } + } + } + + pub fn profile_to_string(self, profile: GLSLProfile) -> Option { + assert_initialized_main_thread!(); + unsafe { + from_glib_full(ffi::gst_glsl_version_profile_to_string( + self.to_glib(), + profile.to_glib(), + )) + } + } + + pub fn to_str(self) -> Option { + assert_initialized_main_thread!(); + unsafe { from_glib_none(ffi::gst_glsl_version_to_string(self.to_glib())) } + } +} + #[doc(hidden)] impl ToGlib for GLSLVersion { type GlibType = ffi::GstGLSLVersion; @@ -538,6 +629,37 @@ pub enum GLTextureTarget { __Unknown(i32), } +impl GLTextureTarget { + pub fn from_gl(target: u32) -> GLTextureTarget { + assert_initialized_main_thread!(); + unsafe { from_glib(ffi::gst_gl_texture_target_from_gl(target)) } + } + + pub fn from_string(str: &str) -> GLTextureTarget { + assert_initialized_main_thread!(); + unsafe { from_glib(ffi::gst_gl_texture_target_from_string(str.to_glib_none().0)) } + } + + pub fn to_buffer_pool_option(self) -> Option { + assert_initialized_main_thread!(); + unsafe { + from_glib_none(ffi::gst_gl_texture_target_to_buffer_pool_option( + self.to_glib(), + )) + } + } + + pub fn to_gl(self) -> u32 { + assert_initialized_main_thread!(); + unsafe { ffi::gst_gl_texture_target_to_gl(self.to_glib()) } + } + + pub fn to_str(self) -> Option { + assert_initialized_main_thread!(); + unsafe { from_glib_none(ffi::gst_gl_texture_target_to_string(self.to_glib())) } + } +} + #[doc(hidden)] impl ToGlib for GLTextureTarget { type GlibType = ffi::GstGLTextureTarget; diff --git a/gstreamer-gl/src/auto/flags.rs b/gstreamer-gl/src/auto/flags.rs index ebc13f10b..f07e5954e 100644 --- a/gstreamer-gl/src/auto/flags.rs +++ b/gstreamer-gl/src/auto/flags.rs @@ -9,6 +9,7 @@ use glib::value::FromValueOptional; use glib::value::SetValue; use glib::StaticType; use glib::Type; +use std::fmt; bitflags! { pub struct GLAPI: u32 { @@ -19,6 +20,25 @@ bitflags! { } } +impl GLAPI { + pub fn from_string(api_s: &str) -> GLAPI { + assert_initialized_main_thread!(); + unsafe { from_glib(ffi::gst_gl_api_from_string(api_s.to_glib_none().0)) } + } + + pub fn to_str(self) -> glib::GString { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gst_gl_api_to_string(self.to_glib())) } + } +} + +impl fmt::Display for GLAPI { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&self.to_str()) + } +} + #[doc(hidden)] impl ToGlib for GLAPI { type GlibType = ffi::GstGLAPI; @@ -127,6 +147,29 @@ bitflags! { } } +impl GLPlatform { + pub fn from_string(platform_s: &str) -> GLPlatform { + assert_initialized_main_thread!(); + unsafe { + from_glib(ffi::gst_gl_platform_from_string( + platform_s.to_glib_none().0, + )) + } + } + + pub fn to_str(self) -> glib::GString { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gst_gl_platform_to_string(self.to_glib())) } + } +} + +impl fmt::Display for GLPlatform { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&self.to_str()) + } +} + #[doc(hidden)] impl ToGlib for GLPlatform { type GlibType = ffi::GstGLPlatform; @@ -176,6 +219,18 @@ bitflags! { } } +impl GLSLProfile { + pub fn from_string(string: &str) -> GLSLProfile { + assert_initialized_main_thread!(); + unsafe { from_glib(ffi::gst_glsl_profile_from_string(string.to_glib_none().0)) } + } + + pub fn to_str(self) -> Option { + assert_initialized_main_thread!(); + unsafe { from_glib_none(ffi::gst_glsl_profile_to_string(self.to_glib())) } + } +} + #[doc(hidden)] impl ToGlib for GLSLProfile { type GlibType = ffi::GstGLSLProfile; diff --git a/gstreamer-gl/src/auto/versions.txt b/gstreamer-gl/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-gl/src/auto/versions.txt +++ b/gstreamer-gl/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-gl/sys/build.rs b/gstreamer-gl/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-gl/sys/build.rs +++ b/gstreamer-gl/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-gl/sys/src/lib.rs b/gstreamer-gl/sys/src/lib.rs index 0df83d27e..5c127a1e0 100644 --- a/gstreamer-gl/sys/src/lib.rs +++ b/gstreamer-gl/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-gl/sys/tests/abi.rs b/gstreamer-gl/sys/tests/abi.rs index 066dd3cd8..cfbc6850b 100644 --- a/gstreamer-gl/sys/tests/abi.rs +++ b/gstreamer-gl/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_gl_sys::*; diff --git a/gstreamer-gl/sys/tests/constant.c b/gstreamer-gl/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-gl/sys/tests/constant.c +++ b/gstreamer-gl/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-gl/sys/tests/layout.c b/gstreamer-gl/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-gl/sys/tests/layout.c +++ b/gstreamer-gl/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-gl/wayland/src/auto/versions.txt b/gstreamer-gl/wayland/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-gl/wayland/src/auto/versions.txt +++ b/gstreamer-gl/wayland/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-gl/wayland/sys/build.rs b/gstreamer-gl/wayland/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-gl/wayland/sys/build.rs +++ b/gstreamer-gl/wayland/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-gl/wayland/sys/src/lib.rs b/gstreamer-gl/wayland/sys/src/lib.rs index 29ef16bc5..5f22ef254 100644 --- a/gstreamer-gl/wayland/sys/src/lib.rs +++ b/gstreamer-gl/wayland/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-gl/wayland/sys/tests/abi.rs b/gstreamer-gl/wayland/sys/tests/abi.rs index 8bce720cc..083eec67d 100644 --- a/gstreamer-gl/wayland/sys/tests/abi.rs +++ b/gstreamer-gl/wayland/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_gl_wayland_sys::*; diff --git a/gstreamer-gl/wayland/sys/tests/constant.c b/gstreamer-gl/wayland/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-gl/wayland/sys/tests/constant.c +++ b/gstreamer-gl/wayland/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-gl/wayland/sys/tests/layout.c b/gstreamer-gl/wayland/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-gl/wayland/sys/tests/layout.c +++ b/gstreamer-gl/wayland/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-gl/x11/src/auto/versions.txt b/gstreamer-gl/x11/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-gl/x11/src/auto/versions.txt +++ b/gstreamer-gl/x11/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-gl/x11/sys/build.rs b/gstreamer-gl/x11/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-gl/x11/sys/build.rs +++ b/gstreamer-gl/x11/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-gl/x11/sys/src/lib.rs b/gstreamer-gl/x11/sys/src/lib.rs index 78a5cda56..de8da31aa 100644 --- a/gstreamer-gl/x11/sys/src/lib.rs +++ b/gstreamer-gl/x11/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-gl/x11/sys/tests/abi.rs b/gstreamer-gl/x11/sys/tests/abi.rs index b3f3c6fbd..73c1b9a80 100644 --- a/gstreamer-gl/x11/sys/tests/abi.rs +++ b/gstreamer-gl/x11/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_gl_x11_sys::*; diff --git a/gstreamer-gl/x11/sys/tests/constant.c b/gstreamer-gl/x11/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-gl/x11/sys/tests/constant.c +++ b/gstreamer-gl/x11/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-gl/x11/sys/tests/layout.c b/gstreamer-gl/x11/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-gl/x11/sys/tests/layout.c +++ b/gstreamer-gl/x11/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-mpegts/sys/build.rs b/gstreamer-mpegts/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-mpegts/sys/build.rs +++ b/gstreamer-mpegts/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-mpegts/sys/src/lib.rs b/gstreamer-mpegts/sys/src/lib.rs index d3cad6d89..0b813632f 100644 --- a/gstreamer-mpegts/sys/src/lib.rs +++ b/gstreamer-mpegts/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-mpegts/sys/tests/abi.rs b/gstreamer-mpegts/sys/tests/abi.rs index 07427360f..71ab2e63a 100644 --- a/gstreamer-mpegts/sys/tests/abi.rs +++ b/gstreamer-mpegts/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_mpegts_sys::*; diff --git a/gstreamer-mpegts/sys/tests/constant.c b/gstreamer-mpegts/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-mpegts/sys/tests/constant.c +++ b/gstreamer-mpegts/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-mpegts/sys/tests/layout.c b/gstreamer-mpegts/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-mpegts/sys/tests/layout.c +++ b/gstreamer-mpegts/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-net/src/auto/versions.txt b/gstreamer-net/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-net/src/auto/versions.txt +++ b/gstreamer-net/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-net/sys/build.rs b/gstreamer-net/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-net/sys/build.rs +++ b/gstreamer-net/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-net/sys/src/lib.rs b/gstreamer-net/sys/src/lib.rs index b491cb50d..d1269e7b9 100644 --- a/gstreamer-net/sys/src/lib.rs +++ b/gstreamer-net/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-net/sys/tests/abi.rs b/gstreamer-net/sys/tests/abi.rs index 8f5b06aff..2be818856 100644 --- a/gstreamer-net/sys/tests/abi.rs +++ b/gstreamer-net/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_net_sys::*; diff --git a/gstreamer-net/sys/tests/constant.c b/gstreamer-net/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-net/sys/tests/constant.c +++ b/gstreamer-net/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-net/sys/tests/layout.c b/gstreamer-net/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-net/sys/tests/layout.c +++ b/gstreamer-net/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-pbutils/src/auto/encoding_target.rs b/gstreamer-pbutils/src/auto/encoding_target.rs index 1e198c9ad..16cddc388 100644 --- a/gstreamer-pbutils/src/auto/encoding_target.rs +++ b/gstreamer-pbutils/src/auto/encoding_target.rs @@ -4,6 +4,7 @@ use crate::EncodingProfile; use glib::translate::*; +use std::fmt; use std::ptr; glib::glib_wrapper! { @@ -135,5 +136,12 @@ impl EncodingTarget { } } +impl fmt::Display for EncodingTarget { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&self.get_name()) + } +} + unsafe impl Send for EncodingTarget {} unsafe impl Sync for EncodingTarget {} diff --git a/gstreamer-pbutils/src/auto/versions.txt b/gstreamer-pbutils/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-pbutils/src/auto/versions.txt +++ b/gstreamer-pbutils/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-pbutils/sys/build.rs b/gstreamer-pbutils/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-pbutils/sys/build.rs +++ b/gstreamer-pbutils/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-pbutils/sys/src/lib.rs b/gstreamer-pbutils/sys/src/lib.rs index 7853c0397..10fbf89e7 100644 --- a/gstreamer-pbutils/sys/src/lib.rs +++ b/gstreamer-pbutils/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-pbutils/sys/tests/abi.rs b/gstreamer-pbutils/sys/tests/abi.rs index 19d736dc6..46e833846 100644 --- a/gstreamer-pbutils/sys/tests/abi.rs +++ b/gstreamer-pbutils/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_pbutils_sys::*; diff --git a/gstreamer-pbutils/sys/tests/constant.c b/gstreamer-pbutils/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-pbutils/sys/tests/constant.c +++ b/gstreamer-pbutils/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-pbutils/sys/tests/layout.c b/gstreamer-pbutils/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-pbutils/sys/tests/layout.c +++ b/gstreamer-pbutils/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-player/src/auto/enums.rs b/gstreamer-player/src/auto/enums.rs index e4a6a2d0c..f433a0274 100644 --- a/gstreamer-player/src/auto/enums.rs +++ b/gstreamer-player/src/auto/enums.rs @@ -22,6 +22,13 @@ pub enum PlayerColorBalanceType { __Unknown(i32), } +impl PlayerColorBalanceType { + pub fn get_name(self) -> Option { + assert_initialized_main_thread!(); + unsafe { from_glib_none(ffi::gst_player_color_balance_type_get_name(self.to_glib())) } + } +} + #[doc(hidden)] impl ToGlib for PlayerColorBalanceType { type GlibType = ffi::GstPlayerColorBalanceType; @@ -83,6 +90,13 @@ pub enum PlayerError { __Unknown(i32), } +impl PlayerError { + pub fn get_name(self) -> Option { + assert_initialized_main_thread!(); + unsafe { from_glib_none(ffi::gst_player_error_get_name(self.to_glib())) } + } +} + #[doc(hidden)] impl ToGlib for PlayerError { type GlibType = ffi::GstPlayerError; @@ -204,6 +218,13 @@ pub enum PlayerState { __Unknown(i32), } +impl PlayerState { + pub fn get_name(self) -> Option { + assert_initialized_main_thread!(); + unsafe { from_glib_none(ffi::gst_player_state_get_name(self.to_glib())) } + } +} + #[doc(hidden)] impl ToGlib for PlayerState { type GlibType = ffi::GstPlayerState; diff --git a/gstreamer-player/src/auto/versions.txt b/gstreamer-player/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-player/src/auto/versions.txt +++ b/gstreamer-player/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-player/sys/build.rs b/gstreamer-player/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-player/sys/build.rs +++ b/gstreamer-player/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-player/sys/src/lib.rs b/gstreamer-player/sys/src/lib.rs index 7ce48c1b0..1a61c9414 100644 --- a/gstreamer-player/sys/src/lib.rs +++ b/gstreamer-player/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-player/sys/tests/abi.rs b/gstreamer-player/sys/tests/abi.rs index ee22addae..d1393c398 100644 --- a/gstreamer-player/sys/tests/abi.rs +++ b/gstreamer-player/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_player_sys::*; diff --git a/gstreamer-player/sys/tests/constant.c b/gstreamer-player/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-player/sys/tests/constant.c +++ b/gstreamer-player/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-player/sys/tests/layout.c b/gstreamer-player/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-player/sys/tests/layout.c +++ b/gstreamer-player/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-rtp/src/auto/versions.txt b/gstreamer-rtp/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-rtp/src/auto/versions.txt +++ b/gstreamer-rtp/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-rtp/sys/build.rs b/gstreamer-rtp/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-rtp/sys/build.rs +++ b/gstreamer-rtp/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-rtp/sys/src/lib.rs b/gstreamer-rtp/sys/src/lib.rs index 54370a17b..9f87b62d3 100644 --- a/gstreamer-rtp/sys/src/lib.rs +++ b/gstreamer-rtp/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-rtp/sys/tests/abi.rs b/gstreamer-rtp/sys/tests/abi.rs index 31dc18155..17e6eb4d0 100644 --- a/gstreamer-rtp/sys/tests/abi.rs +++ b/gstreamer-rtp/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_rtp_sys::*; diff --git a/gstreamer-rtp/sys/tests/constant.c b/gstreamer-rtp/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-rtp/sys/tests/constant.c +++ b/gstreamer-rtp/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-rtp/sys/tests/layout.c b/gstreamer-rtp/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-rtp/sys/tests/layout.c +++ b/gstreamer-rtp/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-rtsp-server/src/auto/versions.txt b/gstreamer-rtsp-server/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-rtsp-server/src/auto/versions.txt +++ b/gstreamer-rtsp-server/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-rtsp-server/sys/build.rs b/gstreamer-rtsp-server/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-rtsp-server/sys/build.rs +++ b/gstreamer-rtsp-server/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-rtsp-server/sys/src/lib.rs b/gstreamer-rtsp-server/sys/src/lib.rs index 384c64a5e..fec3132d7 100644 --- a/gstreamer-rtsp-server/sys/src/lib.rs +++ b/gstreamer-rtsp-server/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-rtsp-server/sys/tests/abi.rs b/gstreamer-rtsp-server/sys/tests/abi.rs index debd0b411..a83563163 100644 --- a/gstreamer-rtsp-server/sys/tests/abi.rs +++ b/gstreamer-rtsp-server/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_rtsp_server_sys::*; diff --git a/gstreamer-rtsp-server/sys/tests/constant.c b/gstreamer-rtsp-server/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-rtsp-server/sys/tests/constant.c +++ b/gstreamer-rtsp-server/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-rtsp-server/sys/tests/layout.c b/gstreamer-rtsp-server/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-rtsp-server/sys/tests/layout.c +++ b/gstreamer-rtsp-server/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-rtsp/src/auto/flags.rs b/gstreamer-rtsp/src/auto/flags.rs index 8630f84a3..755031269 100644 --- a/gstreamer-rtsp/src/auto/flags.rs +++ b/gstreamer-rtsp/src/auto/flags.rs @@ -127,6 +127,13 @@ bitflags! { } } +impl RTSPMethod { + pub fn as_text(self) -> Option { + assert_initialized_main_thread!(); + unsafe { from_glib_none(ffi::gst_rtsp_method_as_text(self.to_glib())) } + } +} + #[doc(hidden)] impl ToGlib for RTSPMethod { type GlibType = ffi::GstRTSPMethod; diff --git a/gstreamer-rtsp/src/auto/versions.txt b/gstreamer-rtsp/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-rtsp/src/auto/versions.txt +++ b/gstreamer-rtsp/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-rtsp/sys/build.rs b/gstreamer-rtsp/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-rtsp/sys/build.rs +++ b/gstreamer-rtsp/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-rtsp/sys/src/lib.rs b/gstreamer-rtsp/sys/src/lib.rs index 8e7f1593e..8401100be 100644 --- a/gstreamer-rtsp/sys/src/lib.rs +++ b/gstreamer-rtsp/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-rtsp/sys/tests/abi.rs b/gstreamer-rtsp/sys/tests/abi.rs index c4b27a504..f72ebfa95 100644 --- a/gstreamer-rtsp/sys/tests/abi.rs +++ b/gstreamer-rtsp/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_rtsp_sys::*; diff --git a/gstreamer-rtsp/sys/tests/constant.c b/gstreamer-rtsp/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-rtsp/sys/tests/constant.c +++ b/gstreamer-rtsp/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-rtsp/sys/tests/layout.c b/gstreamer-rtsp/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-rtsp/sys/tests/layout.c +++ b/gstreamer-rtsp/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-sdp/src/auto/versions.txt b/gstreamer-sdp/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-sdp/src/auto/versions.txt +++ b/gstreamer-sdp/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-sdp/sys/build.rs b/gstreamer-sdp/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-sdp/sys/build.rs +++ b/gstreamer-sdp/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-sdp/sys/src/lib.rs b/gstreamer-sdp/sys/src/lib.rs index 916901362..f3fde0f38 100644 --- a/gstreamer-sdp/sys/src/lib.rs +++ b/gstreamer-sdp/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-sdp/sys/tests/abi.rs b/gstreamer-sdp/sys/tests/abi.rs index be753deb2..bcf7b1c36 100644 --- a/gstreamer-sdp/sys/tests/abi.rs +++ b/gstreamer-sdp/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_sdp_sys::*; diff --git a/gstreamer-sdp/sys/tests/constant.c b/gstreamer-sdp/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-sdp/sys/tests/constant.c +++ b/gstreamer-sdp/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-sdp/sys/tests/layout.c b/gstreamer-sdp/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-sdp/sys/tests/layout.c +++ b/gstreamer-sdp/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-tag/sys/build.rs b/gstreamer-tag/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-tag/sys/build.rs +++ b/gstreamer-tag/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-tag/sys/src/lib.rs b/gstreamer-tag/sys/src/lib.rs index b889997dd..0a1bba21c 100644 --- a/gstreamer-tag/sys/src/lib.rs +++ b/gstreamer-tag/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-tag/sys/tests/abi.rs b/gstreamer-tag/sys/tests/abi.rs index 9f6be562d..67682c64c 100644 --- a/gstreamer-tag/sys/tests/abi.rs +++ b/gstreamer-tag/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_tag_sys::*; diff --git a/gstreamer-tag/sys/tests/constant.c b/gstreamer-tag/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-tag/sys/tests/constant.c +++ b/gstreamer-tag/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-tag/sys/tests/layout.c b/gstreamer-tag/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-tag/sys/tests/layout.c +++ b/gstreamer-tag/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-video/src/auto/enums.rs b/gstreamer-video/src/auto/enums.rs index 5b194fcc2..f57f8cf1f 100644 --- a/gstreamer-video/src/auto/enums.rs +++ b/gstreamer-video/src/auto/enums.rs @@ -8,6 +8,8 @@ use glib::value::FromValueOptional; use glib::value::SetValue; use glib::StaticType; use glib::Type; +use std::ffi::CStr; +use std::fmt; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] @@ -258,6 +260,24 @@ pub enum VideoCaptionType { __Unknown(i32), } +#[cfg(any(feature = "v1_16", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] +impl VideoCaptionType { + #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + pub fn from_caps(caps: &gst::Caps) -> VideoCaptionType { + assert_initialized_main_thread!(); + unsafe { from_glib(ffi::gst_video_caption_type_from_caps(caps.to_glib_none().0)) } + } + + #[cfg(any(feature = "v1_16", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] + pub fn to_caps(self) -> Option { + assert_initialized_main_thread!(); + unsafe { from_glib_full(ffi::gst_video_caption_type_to_caps(self.to_glib())) } + } +} + #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[doc(hidden)] @@ -403,6 +423,22 @@ pub enum VideoColorMatrix { __Unknown(i32), } +impl VideoColorMatrix { + #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + pub fn from_iso(value: u32) -> VideoColorMatrix { + assert_initialized_main_thread!(); + unsafe { from_glib(ffi::gst_video_color_matrix_from_iso(value)) } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + pub fn to_iso(self) -> u32 { + assert_initialized_main_thread!(); + unsafe { ffi::gst_video_color_matrix_to_iso(self.to_glib()) } + } +} + #[doc(hidden)] impl ToGlib for VideoColorMatrix { type GlibType = ffi::GstVideoColorMatrix; @@ -490,6 +526,26 @@ pub enum VideoColorPrimaries { __Unknown(i32), } +impl VideoColorPrimaries { + #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + pub fn from_iso(value: u32) -> VideoColorPrimaries { + assert_initialized_main_thread!(); + unsafe { from_glib(ffi::gst_video_color_primaries_from_iso(value)) } + } + + //pub fn get_info(self) -> /*Ignored*/Option { + // unsafe { TODO: call ffi:gst_video_color_primaries_get_info() } + //} + + #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + pub fn to_iso(self) -> u32 { + assert_initialized_main_thread!(); + unsafe { ffi::gst_video_color_primaries_to_iso(self.to_glib()) } + } +} + #[doc(hidden)] impl ToGlib for VideoColorPrimaries { type GlibType = ffi::GstVideoColorPrimaries; @@ -648,6 +704,30 @@ pub enum VideoFieldOrder { __Unknown(i32), } +#[cfg(any(feature = "v1_12", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] +impl VideoFieldOrder { + #[cfg(any(feature = "v1_12", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] + pub fn from_string(order: &str) -> VideoFieldOrder { + assert_initialized_main_thread!(); + unsafe { + from_glib(ffi::gst_video_field_order_from_string( + order.to_glib_none().0, + )) + } + } +} + +#[cfg(any(feature = "v1_12", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] +impl fmt::Display for VideoFieldOrder { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&self.to_str()) + } +} + #[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))] #[doc(hidden)] @@ -893,6 +973,34 @@ pub enum VideoFormat { __Unknown(i32), } +impl VideoFormat { + pub fn from_fourcc(fourcc: u32) -> VideoFormat { + assert_initialized_main_thread!(); + unsafe { from_glib(ffi::gst_video_format_from_fourcc(fourcc)) } + } + + pub fn from_string(format: &str) -> VideoFormat { + assert_initialized_main_thread!(); + unsafe { from_glib(ffi::gst_video_format_from_string(format.to_glib_none().0)) } + } + + //pub fn get_palette(self) -> (/*Unimplemented*/Option, usize) { + // unsafe { TODO: call ffi:gst_video_format_get_palette() } + //} + + pub fn to_fourcc(self) -> u32 { + assert_initialized_main_thread!(); + unsafe { ffi::gst_video_format_to_fourcc(self.to_glib()) } + } +} + +impl fmt::Display for VideoFormat { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&self.to_str()) + } +} + #[doc(hidden)] impl ToGlib for VideoFormat { type GlibType = ffi::GstVideoFormat; @@ -1284,6 +1392,36 @@ pub enum VideoInterlaceMode { __Unknown(i32), } +impl VideoInterlaceMode { + pub fn from_string(mode: &str) -> VideoInterlaceMode { + assert_initialized_main_thread!(); + unsafe { + from_glib(ffi::gst_video_interlace_mode_from_string( + mode.to_glib_none().0, + )) + } + } + + pub fn to_str<'a>(self) -> &'a str { + unsafe { + CStr::from_ptr( + ffi::gst_video_interlace_mode_to_string(self.to_glib()) + .as_ref() + .expect("gst_video_interlace_mode_to_string returned NULL"), + ) + .to_str() + .expect("gst_video_interlace_mode_to_string returned an invalid string") + } + } +} + +impl fmt::Display for VideoInterlaceMode { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&self.to_str()) + } +} + #[doc(hidden)] impl ToGlib for VideoInterlaceMode { type GlibType = ffi::GstVideoInterlaceMode; @@ -1519,6 +1657,22 @@ pub enum VideoMultiviewMode { __Unknown(i32), } +impl VideoMultiviewMode { + pub fn from_caps_string(caps_mview_mode: &str) -> VideoMultiviewMode { + assert_initialized_main_thread!(); + unsafe { + from_glib(ffi::gst_video_multiview_mode_from_caps_string( + caps_mview_mode.to_glib_none().0, + )) + } + } + + pub fn to_caps_string(self) -> Option { + assert_initialized_main_thread!(); + unsafe { from_glib_none(ffi::gst_video_multiview_mode_to_caps_string(self.to_glib())) } + } +} + #[doc(hidden)] impl ToGlib for VideoMultiviewMode { type GlibType = ffi::GstVideoMultiviewMode; @@ -1821,6 +1975,36 @@ pub enum VideoTransferFunction { __Unknown(i32), } +impl VideoTransferFunction { + #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + pub fn from_iso(value: u32) -> VideoTransferFunction { + assert_initialized_main_thread!(); + unsafe { from_glib(ffi::gst_video_transfer_function_from_iso(value)) } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + pub fn is_equivalent(self, from_bpp: u32, to_func: VideoTransferFunction, to_bpp: u32) -> bool { + assert_initialized_main_thread!(); + unsafe { + from_glib(ffi::gst_video_transfer_function_is_equivalent( + self.to_glib(), + from_bpp, + to_func.to_glib(), + to_bpp, + )) + } + } + + #[cfg(any(feature = "v1_18", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + pub fn to_iso(self) -> u32 { + assert_initialized_main_thread!(); + unsafe { ffi::gst_video_transfer_function_to_iso(self.to_glib()) } + } +} + #[doc(hidden)] impl ToGlib for VideoTransferFunction { type GlibType = ffi::GstVideoTransferFunction; diff --git a/gstreamer-video/src/auto/versions.txt b/gstreamer-video/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-video/src/auto/versions.txt +++ b/gstreamer-video/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-video/sys/build.rs b/gstreamer-video/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-video/sys/build.rs +++ b/gstreamer-video/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-video/sys/src/lib.rs b/gstreamer-video/sys/src/lib.rs index 2e5278a90..facc9bea9 100644 --- a/gstreamer-video/sys/src/lib.rs +++ b/gstreamer-video/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-video/sys/tests/abi.rs b/gstreamer-video/sys/tests/abi.rs index ed124665f..3a3af272c 100644 --- a/gstreamer-video/sys/tests/abi.rs +++ b/gstreamer-video/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_video_sys::*; diff --git a/gstreamer-video/sys/tests/constant.c b/gstreamer-video/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-video/sys/tests/constant.c +++ b/gstreamer-video/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-video/sys/tests/layout.c b/gstreamer-video/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-video/sys/tests/layout.c +++ b/gstreamer-video/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-webrtc/src/auto/enums.rs b/gstreamer-webrtc/src/auto/enums.rs index b8c1607d6..5aa8ae2b6 100644 --- a/gstreamer-webrtc/src/auto/enums.rs +++ b/gstreamer-webrtc/src/auto/enums.rs @@ -8,6 +8,8 @@ use glib::value::FromValueOptional; use glib::value::SetValue; use glib::StaticType; use glib::Type; +use std::ffi::CStr; +use std::fmt; #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] @@ -1011,6 +1013,27 @@ pub enum WebRTCSDPType { __Unknown(i32), } +impl WebRTCSDPType { + pub fn to_str<'a>(self) -> &'a str { + unsafe { + CStr::from_ptr( + ffi::gst_webrtc_sdp_type_to_string(self.to_glib()) + .as_ref() + .expect("gst_webrtc_sdp_type_to_string returned NULL"), + ) + .to_str() + .expect("gst_webrtc_sdp_type_to_string returned an invalid string") + } + } +} + +impl fmt::Display for WebRTCSDPType { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&self.to_str()) + } +} + #[doc(hidden)] impl ToGlib for WebRTCSDPType { type GlibType = ffi::GstWebRTCSDPType; diff --git a/gstreamer-webrtc/src/auto/versions.txt b/gstreamer-webrtc/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer-webrtc/src/auto/versions.txt +++ b/gstreamer-webrtc/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer-webrtc/sys/build.rs b/gstreamer-webrtc/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer-webrtc/sys/build.rs +++ b/gstreamer-webrtc/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer-webrtc/sys/src/lib.rs b/gstreamer-webrtc/sys/src/lib.rs index d9824fd68..3a3116563 100644 --- a/gstreamer-webrtc/sys/src/lib.rs +++ b/gstreamer-webrtc/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-webrtc/sys/tests/abi.rs b/gstreamer-webrtc/sys/tests/abi.rs index c02ef7c0e..ec5846de9 100644 --- a/gstreamer-webrtc/sys/tests/abi.rs +++ b/gstreamer-webrtc/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_webrtc_sys::*; diff --git a/gstreamer-webrtc/sys/tests/constant.c b/gstreamer-webrtc/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer-webrtc/sys/tests/constant.c +++ b/gstreamer-webrtc/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-webrtc/sys/tests/layout.c b/gstreamer-webrtc/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer-webrtc/sys/tests/layout.c +++ b/gstreamer-webrtc/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer/src/auto/element.rs b/gstreamer/src/auto/element.rs index aa76d7249..8543d0ec4 100644 --- a/gstreamer/src/auto/element.rs +++ b/gstreamer/src/auto/element.rs @@ -143,11 +143,11 @@ pub trait ElementExt: 'static { fn lost_state(&self); - //fn message_full(&self, type_: /*Ignored*/MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: Option<&str>, debug: Option<&str>, file: &str, function: &str, line: i32); + //fn message_full(&self, type_: /*Ignored*/MessageType, domain: glib::Quark, code: i32, text: Option<&str>, debug: Option<&str>, file: &str, function: &str, line: i32); //#[cfg(any(feature = "v1_10", feature = "dox"))] //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] - //fn message_full_with_details(&self, type_: /*Ignored*/MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: Option<&str>, debug: Option<&str>, file: &str, function: &str, line: i32, structure: &mut Structure); + //fn message_full_with_details(&self, type_: /*Ignored*/MessageType, domain: glib::Quark, code: i32, text: Option<&str>, debug: Option<&str>, file: &str, function: &str, line: i32, structure: &mut Structure); fn no_more_pads(&self); @@ -502,13 +502,13 @@ impl> ElementExt for O { } } - //fn message_full(&self, type_: /*Ignored*/MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: Option<&str>, debug: Option<&str>, file: &str, function: &str, line: i32) { + //fn message_full(&self, type_: /*Ignored*/MessageType, domain: glib::Quark, code: i32, text: Option<&str>, debug: Option<&str>, file: &str, function: &str, line: i32) { // unsafe { TODO: call ffi:gst_element_message_full() } //} //#[cfg(any(feature = "v1_10", feature = "dox"))] //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] - //fn message_full_with_details(&self, type_: /*Ignored*/MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: Option<&str>, debug: Option<&str>, file: &str, function: &str, line: i32, structure: &mut Structure) { + //fn message_full_with_details(&self, type_: /*Ignored*/MessageType, domain: glib::Quark, code: i32, text: Option<&str>, debug: Option<&str>, file: &str, function: &str, line: i32, structure: &mut Structure) { // unsafe { TODO: call ffi:gst_element_message_full_with_details() } //} diff --git a/gstreamer/src/auto/enums.rs b/gstreamer/src/auto/enums.rs index a9639090b..936be639e 100644 --- a/gstreamer/src/auto/enums.rs +++ b/gstreamer/src/auto/enums.rs @@ -2,6 +2,7 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +use crate::EventTypeFlags; use glib::error::ErrorDomain; use glib::translate::*; use glib::value::FromValue; @@ -10,6 +11,8 @@ use glib::value::SetValue; use glib::Quark; use glib::StaticType; use glib::Type; +use std::ffi::CStr; +use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -545,6 +548,27 @@ pub enum DebugLevel { __Unknown(i32), } +impl DebugLevel { + pub fn get_name<'a>(self) -> &'a str { + unsafe { + CStr::from_ptr( + ffi::gst_debug_level_get_name(self.to_glib()) + .as_ref() + .expect("gst_debug_level_get_name returned NULL"), + ) + .to_str() + .expect("gst_debug_level_get_name returned an invalid string") + } + } +} + +impl fmt::Display for DebugLevel { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&self.get_name()) + } +} + #[doc(hidden)] impl ToGlib for DebugLevel { type GlibType = ffi::GstDebugLevel; @@ -657,6 +681,37 @@ pub enum EventType { __Unknown(i32), } +impl EventType { + pub fn get_flags(self) -> EventTypeFlags { + assert_initialized_main_thread!(); + unsafe { from_glib(ffi::gst_event_type_get_flags(self.to_glib())) } + } + + pub fn get_name<'a>(self) -> &'a str { + unsafe { + CStr::from_ptr( + ffi::gst_event_type_get_name(self.to_glib()) + .as_ref() + .expect("gst_event_type_get_name returned NULL"), + ) + .to_str() + .expect("gst_event_type_get_name returned an invalid string") + } + } + + pub fn to_quark(self) -> glib::Quark { + assert_initialized_main_thread!(); + unsafe { from_glib(ffi::gst_event_type_to_quark(self.to_glib())) } + } +} + +impl fmt::Display for EventType { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&self.get_name()) + } +} + #[doc(hidden)] impl ToGlib for EventType { type GlibType = ffi::GstEventType; @@ -880,6 +935,31 @@ pub enum Format { __Unknown(i32), } +impl Format { + pub fn get_by_nick(nick: &str) -> Format { + assert_initialized_main_thread!(); + unsafe { from_glib(ffi::gst_format_get_by_nick(nick.to_glib_none().0)) } + } + + //pub fn get_details(self) -> /*Ignored*/Option { + // unsafe { TODO: call ffi:gst_format_get_details() } + //} + + pub fn get_name(self) -> Option { + assert_initialized_main_thread!(); + unsafe { from_glib_none(ffi::gst_format_get_name(self.to_glib())) } + } + + //pub fn iterate_definitions() -> /*Ignored*/Iterator { + // unsafe { TODO: call ffi:gst_format_iterate_definitions() } + //} + + pub fn to_quark(self) -> glib::Quark { + assert_initialized_main_thread!(); + unsafe { from_glib(ffi::gst_format_to_quark(self.to_glib())) } + } +} + #[doc(hidden)] impl ToGlib for Format { type GlibType = ffi::GstFormat; @@ -1181,6 +1261,27 @@ pub enum PadMode { __Unknown(i32), } +impl PadMode { + pub fn get_name<'a>(self) -> &'a str { + unsafe { + CStr::from_ptr( + ffi::gst_pad_mode_get_name(self.to_glib()) + .as_ref() + .expect("gst_pad_mode_get_name returned NULL"), + ) + .to_str() + .expect("gst_pad_mode_get_name returned an invalid string") + } + } +} + +impl fmt::Display for PadMode { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&self.get_name()) + } +} + #[doc(hidden)] impl ToGlib for PadMode { type GlibType = ffi::GstPadMode; @@ -2096,6 +2197,13 @@ pub enum StateChange { __Unknown(i32), } +impl fmt::Display for StateChange { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&self.get_name()) + } +} + #[doc(hidden)] impl ToGlib for StateChange { type GlibType = ffi::GstStateChange; @@ -2762,6 +2870,20 @@ pub enum TocEntryType { __Unknown(i32), } +impl TocEntryType { + pub fn get_nick<'a>(self) -> &'a str { + unsafe { + CStr::from_ptr( + ffi::gst_toc_entry_type_get_nick(self.to_glib()) + .as_ref() + .expect("gst_toc_entry_type_get_nick returned NULL"), + ) + .to_str() + .expect("gst_toc_entry_type_get_nick returned an invalid string") + } + } +} + #[doc(hidden)] impl ToGlib for TocEntryType { type GlibType = ffi::GstTocEntryType; diff --git a/gstreamer/src/auto/flags.rs b/gstreamer/src/auto/flags.rs index 3f659855b..f32a08e26 100644 --- a/gstreamer/src/auto/flags.rs +++ b/gstreamer/src/auto/flags.rs @@ -9,6 +9,12 @@ use glib::value::FromValueOptional; use glib::value::SetValue; use glib::StaticType; use glib::Type; +#[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] +use std::ffi::CStr; +#[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] +use std::fmt; bitflags! { pub struct BinFlags: u32 { @@ -445,6 +451,57 @@ impl SetValue for ElementFlags { } } +bitflags! { + pub struct EventTypeFlags: u32 { + const UPSTREAM = 1; + const DOWNSTREAM = 2; + const SERIALIZED = 4; + const STICKY = 8; + const STICKY_MULTI = 16; + } +} + +#[doc(hidden)] +impl ToGlib for EventTypeFlags { + type GlibType = ffi::GstEventTypeFlags; + + fn to_glib(&self) -> ffi::GstEventTypeFlags { + self.bits() + } +} + +#[doc(hidden)] +impl FromGlib for EventTypeFlags { + fn from_glib(value: ffi::GstEventTypeFlags) -> EventTypeFlags { + skip_assert_initialized!(); + EventTypeFlags::from_bits_truncate(value) + } +} + +impl StaticType for EventTypeFlags { + fn static_type() -> Type { + unsafe { from_glib(ffi::gst_event_type_flags_get_type()) } + } +} + +impl<'a> FromValueOptional<'a> for EventTypeFlags { + unsafe fn from_value_optional(value: &glib::Value) -> Option { + Some(FromValue::from_value(value)) + } +} + +impl<'a> FromValue<'a> for EventTypeFlags { + unsafe fn from_value(value: &glib::Value) -> Self { + from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) + } +} + +impl SetValue for EventTypeFlags { + unsafe fn set_value(value: &mut glib::Value, this: &Self) { + glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) + } +} + bitflags! { pub struct MemoryFlags: u32 { const READONLY = 2; @@ -1271,6 +1328,33 @@ bitflags! { } } +#[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] +impl StreamType { + #[cfg(any(feature = "v1_10", feature = "dox"))] + #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] + pub fn get_name<'a>(self) -> &'a str { + unsafe { + CStr::from_ptr( + ffi::gst_stream_type_get_name(self.to_glib()) + .as_ref() + .expect("gst_stream_type_get_name returned NULL"), + ) + .to_str() + .expect("gst_stream_type_get_name returned an invalid string") + } + } +} + +#[cfg(any(feature = "v1_10", feature = "dox"))] +#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] +impl fmt::Display for StreamType { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&self.get_name()) + } +} + #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(hidden)] diff --git a/gstreamer/src/auto/mod.rs b/gstreamer/src/auto/mod.rs index 902b0d8dc..3a2e45654 100644 --- a/gstreamer/src/auto/mod.rs +++ b/gstreamer/src/auto/mod.rs @@ -182,6 +182,7 @@ pub use self::flags::ClockFlags; pub use self::flags::DebugColorFlags; pub use self::flags::DebugGraphDetails; pub use self::flags::ElementFlags; +pub use self::flags::EventTypeFlags; pub use self::flags::MemoryFlags; pub use self::flags::ObjectFlags; pub use self::flags::PadFlags; diff --git a/gstreamer/src/auto/object.rs b/gstreamer/src/auto/object.rs index b0c1f4fdd..e9b24f3c4 100644 --- a/gstreamer/src/auto/object.rs +++ b/gstreamer/src/auto/object.rs @@ -10,6 +10,7 @@ use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use std::boxed::Box as Box_; +use std::fmt; use std::mem::transmute; glib::glib_wrapper! { @@ -39,11 +40,18 @@ impl Object { // unsafe { TODO: call ffi:gst_object_ref_sink() } //} - //pub fn replace, Q: IsA>(oldobj: Option<&P>, newobj: Option<&Q>) -> bool { + //pub fn replace, Q: IsA>(oldobj: Option

, newobj: Option<&Q>) -> bool { // unsafe { TODO: call ffi:gst_object_replace() } //} } +impl fmt::Display for Object { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&GstObjectExt::get_name(self)) + } +} + unsafe impl Send for Object {} unsafe impl Sync for Object {} diff --git a/gstreamer/src/auto/versions.txt b/gstreamer/src/auto/versions.txt index 325fe7cef..ea795c56c 100644 --- a/gstreamer/src/auto/versions.txt +++ b/gstreamer/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ e941700) -from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +Generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) diff --git a/gstreamer/sys/build.rs b/gstreamer/sys/build.rs index 13a010cb8..beb26524a 100644 --- a/gstreamer/sys/build.rs +++ b/gstreamer/sys/build.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #[cfg(not(feature = "dox"))] @@ -11,7 +11,7 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { if let Err(s) = system_deps::Config::new().probe() { - let _ = eprintln!("{}", s); + println!("cargo:warning={}", s); process::exit(1); } } diff --git a/gstreamer/sys/src/lib.rs b/gstreamer/sys/src/lib.rs index d070e92a8..34e765bfa 100644 --- a/gstreamer/sys/src/lib.rs +++ b/gstreamer/sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer/sys/tests/abi.rs b/gstreamer/sys/tests/abi.rs index 52d5fe6c3..8669476ec 100644 --- a/gstreamer/sys/tests/abi.rs +++ b/gstreamer/sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT use gstreamer_sys::*; diff --git a/gstreamer/sys/tests/constant.c b/gstreamer/sys/tests/constant.c index 6cd272ba1..c2ff6ab15 100644 --- a/gstreamer/sys/tests/constant.c +++ b/gstreamer/sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer/sys/tests/layout.c b/gstreamer/sys/tests/layout.c index 166185041..64f4cfb9c 100644 --- a/gstreamer/sys/tests/layout.c +++ b/gstreamer/sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ e941700) -// from gir-files (https://github.com/gtk-rs/gir-files @ d2591d00) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 1c1a8d7) +// from gir-files (https://github.com/gtk-rs/gir-files @ 01ae47c9) // DO NOT EDIT #include "manual.h"