diff --git a/Gir_Gst.toml b/Gir_Gst.toml index b4c270a22ca875b59cc3ef75154cec2a83b9491c..c52497787b49ffc43f7d310dcd1f25c946365580 100644 --- a/Gir_Gst.toml +++ b/Gir_Gst.toml @@ -251,6 +251,12 @@ status = "generate" [[object]] name = "Gst.Element" status = "generate" + [[object.function]] + name = "make_from_uri" + [object.function.return] + # It is already a Result + nullable = false + [[object.function]] name = "add_pad" [object.function.return] @@ -376,6 +382,21 @@ status = "generate" # Wrong place ignore = true + [[object.function]] + name = "get_metadata" + # better manual function + ignore = true + + [[object.function]] + name = "get_pad_template" + # better manual function + ignore = true + + [[object.function]] + name = "get_pad_template_list" + # better manual function + ignore = true + [[object]] name = "Gst.ElementFactory" status = "generate" @@ -404,6 +425,11 @@ status = "generate" [object.function.return] bool_return_is_error = "Failed to start" + [[object.function]] + name = "get_metadata" + # better manual function + ignore = true + [[object]] name = "Gst.DeviceMonitor" status = "generate" @@ -847,6 +873,11 @@ status = "generate" name = "util_dump_mem" ignore = true + [[object.function]] + name = "util_dump_buffer" + # We have our Debug impl on buffers + ignore = true + [[object.function]] name = "protection_select_system" # unsupported array type @@ -1038,6 +1069,18 @@ status = "generate" [object.function.return] nullable = false + [[object.function]] + name = "parse_launch" + [object.function.return] + # Already a Result + nullable = false + + [[object.function]] + name = "parse_launchv" + [object.function.return] + # Already a Result + nullable = false + [[object]] name = "Gst.StateChangeReturn" status = "generate" diff --git a/gstreamer/Cargo.toml b/gstreamer/Cargo.toml index ac764b6288f2d91161b2b1216ba0fce20a5605f6..0b8075f4f72a4edfa03dd39f129b3ccdf7d74125 100644 --- a/gstreamer/Cargo.toml +++ b/gstreamer/Cargo.toml @@ -31,6 +31,7 @@ optional = true [features] v1_10 = ["gstreamer-sys/v1_10"] v1_12 = ["gstreamer-sys/v1_12", "v1_10"] +v1_14 = ["gstreamer-sys/v1_14", "v1_12"] embed-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"] dox = ["gstreamer-sys/dox", "glib/dox", "futures"] diff --git a/gstreamer/src/auto/alias.rs b/gstreamer/src/auto/alias.rs index 45ea7f154b4f839084645d01dd972889b59ebb31..f9030b5c8f52a4631cf27e166fda92ccb2037f8f 100644 --- a/gstreamer/src/auto/alias.rs +++ b/gstreamer/src/auto/alias.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/bin.rs b/gstreamer/src/auto/bin.rs index 1a764c6175977635db05e763172e0ca7f2810021..c827a6b2b86e79fcd33535db20cd4711f6d35711 100644 --- a/gstreamer/src/auto/bin.rs +++ b/gstreamer/src/auto/bin.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/buffer_pool.rs b/gstreamer/src/auto/buffer_pool.rs index 056b948b4b6688925205874732168f41f7c1e6a7..667e49ae10c44789eed4af9c61ce604a545a4532 100644 --- a/gstreamer/src/auto/buffer_pool.rs +++ b/gstreamer/src/auto/buffer_pool.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/bus.rs b/gstreamer/src/auto/bus.rs index b0f8073b557f518d62dec4f352bf4c7bbc2c8f8e..95194dd8147fcd42621a76651f5040b060114e83 100644 --- a/gstreamer/src/auto/bus.rs +++ b/gstreamer/src/auto/bus.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT @@ -63,6 +63,11 @@ impl Bus { } } + //#[cfg(any(feature = "v1_14", feature = "dox"))] + //pub fn get_pollfd(&self, fd: /*Ignored*/&mut glib::PollFD) { + // unsafe { TODO: call ffi::gst_bus_get_pollfd() } + //} + pub fn have_pending(&self) -> bool { unsafe { from_glib(ffi::gst_bus_have_pending(self.to_glib_none().0)) diff --git a/gstreamer/src/auto/child_proxy.rs b/gstreamer/src/auto/child_proxy.rs index 135a232e2498b014249d33681b49f198e29745f2..67fda37baf3bf67bf97406c69cc95cb8213d3a4d 100644 --- a/gstreamer/src/auto/child_proxy.rs +++ b/gstreamer/src/auto/child_proxy.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/clock.rs b/gstreamer/src/auto/clock.rs index 2ed192070b8d6facf43e35b7f9d529138289c204..4d6ad6588f00b26028b7afecff9a6e331aab156a 100644 --- a/gstreamer/src/auto/clock.rs +++ b/gstreamer/src/auto/clock.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/date_time.rs b/gstreamer/src/auto/date_time.rs index 2edb34075800b6f8700465e4aa549190bf255dc4..dddd3a371f4f84583aa84bdbc8b31706b19889b1 100644 --- a/gstreamer/src/auto/date_time.rs +++ b/gstreamer/src/auto/date_time.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/device.rs b/gstreamer/src/auto/device.rs index 0732bb118f815dc2da69603d3622edb462fee93c..68deebafedaa480363def295c42bde6dafb43ff4 100644 --- a/gstreamer/src/auto/device.rs +++ b/gstreamer/src/auto/device.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/device_monitor.rs b/gstreamer/src/auto/device_monitor.rs index e8c9d60193faca193a3deb5d147cdd3075ed3715..bc8bfefabb2784dd679c38662a78e607f0890069 100644 --- a/gstreamer/src/auto/device_monitor.rs +++ b/gstreamer/src/auto/device_monitor.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/device_provider.rs b/gstreamer/src/auto/device_provider.rs index 7ac4e17e3728d17d3250b6507233e03690db09fd..a0e79fbc3fee4b2f6347bfd1bdff5afc302000c5 100644 --- a/gstreamer/src/auto/device_provider.rs +++ b/gstreamer/src/auto/device_provider.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/device_provider_factory.rs b/gstreamer/src/auto/device_provider_factory.rs index fbe438c13ccb8c811f0cb225c0fc20cb514d7a4f..daf57fb60f5be39e99ab55d2115ad49e289c8513 100644 --- a/gstreamer/src/auto/device_provider_factory.rs +++ b/gstreamer/src/auto/device_provider_factory.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/element.rs b/gstreamer/src/auto/element.rs index e8f1efdc53d6b70148c3f4afd60161098678c63b..c17a42631beada8055833751f6e71db0ac9023d9 100644 --- a/gstreamer/src/auto/element.rs +++ b/gstreamer/src/auto/element.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT @@ -80,6 +80,15 @@ pub trait ElementExt { fn create_all_pads(&self); + //#[cfg(any(feature = "v1_14", feature = "dox"))] + //fn foreach_pad>>(&self, func: /*Unknown conversion*//*Unimplemented*/ElementForeachPadFunc, user_data: P) -> bool; + + //#[cfg(any(feature = "v1_14", feature = "dox"))] + //fn foreach_sink_pad>>(&self, func: /*Unknown conversion*//*Unimplemented*/ElementForeachPadFunc, user_data: P) -> bool; + + //#[cfg(any(feature = "v1_14", feature = "dox"))] + //fn foreach_src_pad>>(&self, func: /*Unknown conversion*//*Unimplemented*/ElementForeachPadFunc, user_data: P) -> bool; + fn get_base_time(&self) -> ClockTime; fn get_bus(&self) -> Option; @@ -208,6 +217,21 @@ impl + IsA> ElementExt for O { } } + //#[cfg(any(feature = "v1_14", feature = "dox"))] + //fn foreach_pad>>(&self, func: /*Unknown conversion*//*Unimplemented*/ElementForeachPadFunc, user_data: P) -> bool { + // unsafe { TODO: call ffi::gst_element_foreach_pad() } + //} + + //#[cfg(any(feature = "v1_14", feature = "dox"))] + //fn foreach_sink_pad>>(&self, func: /*Unknown conversion*//*Unimplemented*/ElementForeachPadFunc, user_data: P) -> bool { + // unsafe { TODO: call ffi::gst_element_foreach_sink_pad() } + //} + + //#[cfg(any(feature = "v1_14", feature = "dox"))] + //fn foreach_src_pad>>(&self, func: /*Unknown conversion*//*Unimplemented*/ElementForeachPadFunc, user_data: P) -> bool { + // unsafe { TODO: call ffi::gst_element_foreach_src_pad() } + //} + fn get_base_time(&self) -> ClockTime { unsafe { from_glib(ffi::gst_element_get_base_time(self.to_glib_none().0)) diff --git a/gstreamer/src/auto/element_factory.rs b/gstreamer/src/auto/element_factory.rs index fe631736a1d52e98eda3b8e862efabb9a00f1d82..c7fa0cd95af580a693c6c3102f2a743b454c950d 100644 --- a/gstreamer/src/auto/element_factory.rs +++ b/gstreamer/src/auto/element_factory.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/enums.rs b/gstreamer/src/auto/enums.rs index be6173036049b8b70a73123a96b0f9b86d009cc6..47eb0a92df4907595872bc0389f2170fdb52a251 100644 --- a/gstreamer/src/auto/enums.rs +++ b/gstreamer/src/auto/enums.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT @@ -1895,6 +1895,10 @@ pub enum StateChange { PlayingToPaused, PausedToReady, ReadyToNull, + NullToNull, + ReadyToReady, + PausedToPaused, + PlayingToPlaying, #[doc(hidden)] __Unknown(i32), } @@ -1911,6 +1915,10 @@ impl ToGlib for StateChange { StateChange::PlayingToPaused => ffi::GST_STATE_CHANGE_PLAYING_TO_PAUSED, StateChange::PausedToReady => ffi::GST_STATE_CHANGE_PAUSED_TO_READY, StateChange::ReadyToNull => ffi::GST_STATE_CHANGE_READY_TO_NULL, + StateChange::NullToNull => ffi::GST_STATE_CHANGE_NULL_TO_NULL, + StateChange::ReadyToReady => ffi::GST_STATE_CHANGE_READY_TO_READY, + StateChange::PausedToPaused => ffi::GST_STATE_CHANGE_PAUSED_TO_PAUSED, + StateChange::PlayingToPlaying => ffi::GST_STATE_CHANGE_PLAYING_TO_PLAYING, StateChange::__Unknown(value) => value } } @@ -1927,6 +1935,10 @@ impl FromGlib for StateChange { 35 => StateChange::PlayingToPaused, 26 => StateChange::PausedToReady, 17 => StateChange::ReadyToNull, + 9 => StateChange::NullToNull, + 18 => StateChange::ReadyToReady, + 27 => StateChange::PausedToPaused, + 36 => StateChange::PlayingToPlaying, value => StateChange::__Unknown(value), } } diff --git a/gstreamer/src/auto/flags.rs b/gstreamer/src/auto/flags.rs index 40f40ee8f4dd430369f3b8dd3b566cc469b16b49..b9a0d474546da7b057561c9fc9aa2738e3172985 100644 --- a/gstreamer/src/auto/flags.rs +++ b/gstreamer/src/auto/flags.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT @@ -79,6 +79,7 @@ bitflags! { const DELTA_UNIT = 8192; const TAG_MEMORY = 16384; const SYNC_AFTER = 32768; + const NON_DROPPABLE = 65536; const LAST = 1048576; } } @@ -522,6 +523,7 @@ bitflags! { const PATHS_ARE_DEFAULT_ONLY = 2; const FILE_NAME_IS_SUFFIX = 4; const FILE_NAME_IS_PREFIX = 8; + const PATHS_ARE_RELATIVE_TO_EXE = 16; } } diff --git a/gstreamer/src/auto/functions.rs b/gstreamer/src/auto/functions.rs index 93bd79af5df3a61298401110313eb8c943146420..efc8baa7c8fa4c4ecb9558332a3a5afab866df5b 100644 --- a/gstreamer/src/auto/functions.rs +++ b/gstreamer/src/auto/functions.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT @@ -18,6 +18,14 @@ use std::mem; use std::ptr; +#[cfg(any(feature = "v1_14", feature = "dox"))] +pub fn debug_add_ring_buffer_logger(max_size_per_thread: u32, thread_timeout: u32) { + assert_initialized_main_thread!(); + unsafe { + ffi::gst_debug_add_ring_buffer_logger(max_size_per_thread, thread_timeout); + } +} + pub fn debug_bin_to_dot_data>(bin: &P, details: DebugGraphDetails) -> String { skip_assert_initialized!(); unsafe { @@ -75,6 +83,22 @@ pub fn debug_print_stack_trace() { } } +#[cfg(any(feature = "v1_14", feature = "dox"))] +pub fn debug_remove_ring_buffer_logger() { + assert_initialized_main_thread!(); + unsafe { + ffi::gst_debug_remove_ring_buffer_logger(); + } +} + +#[cfg(any(feature = "v1_14", feature = "dox"))] +pub fn debug_ring_buffer_logger_get_logs() -> Vec { + assert_initialized_main_thread!(); + unsafe { + FromGlibPtrContainer::from_glib_full(ffi::gst_debug_ring_buffer_logger_get_logs()) + } +} + pub fn debug_set_active(active: bool) { assert_initialized_main_thread!(); unsafe { @@ -117,6 +141,14 @@ pub fn debug_unset_threshold_for_name(name: &str) { } } +#[cfg(any(feature = "v1_14", feature = "dox"))] +pub fn get_main_executable_path() -> Option { + assert_initialized_main_thread!(); + unsafe { + from_glib_none(ffi::gst_get_main_executable_path()) + } +} + pub fn parse_bin_from_description(bin_description: &str, ghost_unlinked_pads: bool) -> Result { assert_initialized_main_thread!(); unsafe { @@ -144,6 +176,14 @@ pub fn parse_launchv(argv: &[&str]) -> Result { } } +#[cfg(any(feature = "v1_14", feature = "dox"))] +pub fn protection_filter_systems_by_available_decryptors(system_identifiers: &str) -> Vec { + assert_initialized_main_thread!(); + unsafe { + FromGlibPtrContainer::from_glib_full(ffi::gst_protection_filter_systems_by_available_decryptors(system_identifiers.to_glib_none().0)) + } +} + pub fn update_registry() -> bool { assert_initialized_main_thread!(); unsafe { diff --git a/gstreamer/src/auto/ghost_pad.rs b/gstreamer/src/auto/ghost_pad.rs index 7dd8d106ede0a96c3b31fe4e538e96b2f016a983..1f5665d6eb624574c172ab22bec4521003b92640 100644 --- a/gstreamer/src/auto/ghost_pad.rs +++ b/gstreamer/src/auto/ghost_pad.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/mod.rs b/gstreamer/src/auto/mod.rs index 7aeb6ad260a9815143a02e1eb46cd27451a2753e..61288c883a064f72c5aeb82f3841a88b71f7bf6c 100644 --- a/gstreamer/src/auto/mod.rs +++ b/gstreamer/src/auto/mod.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/object.rs b/gstreamer/src/auto/object.rs index 239e2bb2fabcb4e8effb1baf80cead87c4258b85..6c56bb7761769285d608e7c8f33a07325beeccb5 100644 --- a/gstreamer/src/auto/object.rs +++ b/gstreamer/src/auto/object.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/pad.rs b/gstreamer/src/auto/pad.rs index d8ecde3e82362592adb6a5862be173b1607832fe..84591a84708d4d6a477e83f88a07a9a219a8e7d8 100644 --- a/gstreamer/src/auto/pad.rs +++ b/gstreamer/src/auto/pad.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/pad_template.rs b/gstreamer/src/auto/pad_template.rs index c490157a00fec9725a65d8feae0b2efc616c80f2..e23bacf3aa598413a6809abc9b8de8a4f42837a3 100644 --- a/gstreamer/src/auto/pad_template.rs +++ b/gstreamer/src/auto/pad_template.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT @@ -7,7 +7,11 @@ use Object; use Pad; use PadDirection; use PadPresence; +#[cfg(any(feature = "v1_14", feature = "dox"))] +use StaticPadTemplate; use ffi; +#[cfg(any(feature = "v1_14", feature = "dox"))] +use glib; use glib::StaticType; use glib::Value; use glib::object::IsA; @@ -37,6 +41,22 @@ impl PadTemplate { } } + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn new_from_static_pad_template_with_gtype(pad_template: &mut StaticPadTemplate, pad_type: glib::types::Type) -> PadTemplate { + assert_initialized_main_thread!(); + unsafe { + from_glib_none(ffi::gst_pad_template_new_from_static_pad_template_with_gtype(pad_template.to_glib_none_mut().0, pad_type.to_glib())) + } + } + + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn new_with_gtype(name_template: &str, direction: PadDirection, presence: PadPresence, caps: &Caps, pad_type: glib::types::Type) -> PadTemplate { + assert_initialized_main_thread!(); + unsafe { + from_glib_none(ffi::gst_pad_template_new_with_gtype(name_template.to_glib_none().0, direction.to_glib(), presence.to_glib(), caps.to_glib_none().0, pad_type.to_glib())) + } + } + pub fn get_caps(&self) -> Option { unsafe { from_glib_full(ffi::gst_pad_template_get_caps(self.to_glib_none().0)) @@ -57,6 +77,15 @@ impl PadTemplate { } } + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn get_property_gtype(&self) -> glib::types::Type { + unsafe { + let mut value = Value::from_type(::static_type()); + gobject_ffi::g_object_get_property(self.to_glib_none().0, "gtype".to_glib_none().0, value.to_glib_none_mut().0); + value.get().unwrap() + } + } + pub fn get_property_name_template(&self) -> Option { unsafe { let mut value = Value::from_type(::static_type()); @@ -97,6 +126,15 @@ impl PadTemplate { } } + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn connect_property_gtype_notify(&self, f: F) -> SignalHandlerId { + unsafe { + let f: Box_> = Box_::new(Box_::new(f)); + connect(self.to_glib_none().0, "notify::gtype", + transmute(notify_gtype_trampoline as usize), Box_::into_raw(f) as *mut _) + } + } + pub fn connect_property_name_template_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); @@ -135,6 +173,13 @@ unsafe extern "C" fn notify_direction_trampoline(this: *mut ffi::GstPadTemplate, f(&from_glib_borrow(this)) } +#[cfg(any(feature = "v1_14", feature = "dox"))] +unsafe extern "C" fn notify_gtype_trampoline(this: *mut ffi::GstPadTemplate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { + callback_guard!(); + let f: &&(Fn(&PadTemplate) + Send + Sync + 'static) = transmute(f); + f(&from_glib_borrow(this)) +} + unsafe extern "C" fn notify_name_template_trampoline(this: *mut ffi::GstPadTemplate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) { callback_guard!(); let f: &&(Fn(&PadTemplate) + Send + Sync + 'static) = transmute(f); diff --git a/gstreamer/src/auto/pipeline.rs b/gstreamer/src/auto/pipeline.rs index fe0eb5abdf183fe64b2271f98eb29e0d7fba459e..c5adae420bcafcdf7d77f0c763728e9ccc4e1385 100644 --- a/gstreamer/src/auto/pipeline.rs +++ b/gstreamer/src/auto/pipeline.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/plugin.rs b/gstreamer/src/auto/plugin.rs index b5320cdf6fab2291cd01a240d4ea4767767704f0..5b2fea0dee48dc640a54c7292ffaca288d16e12c 100644 --- a/gstreamer/src/auto/plugin.rs +++ b/gstreamer/src/auto/plugin.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/plugin_feature.rs b/gstreamer/src/auto/plugin_feature.rs index fd88884b709fc8a3f01b26907df66b8e531cc2e2..40c36ab57174f60f8fdd8f61302ece985d9efc31 100644 --- a/gstreamer/src/auto/plugin_feature.rs +++ b/gstreamer/src/auto/plugin_feature.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/preset.rs b/gstreamer/src/auto/preset.rs index 8a2d652fbc3b5f3a5f652dd4d492806af27cc3f7..adfb610e6cb65a9cfa2fa64ce1eaf9ac09e3e987 100644 --- a/gstreamer/src/auto/preset.rs +++ b/gstreamer/src/auto/preset.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT @@ -8,6 +8,7 @@ use glib::object::IsA; use glib::translate::*; use glib_ffi; use gobject_ffi; +use std; use std::mem; use std::ptr; @@ -20,17 +21,17 @@ glib_wrapper! { } impl Preset { - pub fn get_app_dir() -> Option { + pub fn get_app_dir() -> Option { assert_initialized_main_thread!(); unsafe { from_glib_none(ffi::gst_preset_get_app_dir()) } } - pub fn set_app_dir(app_dir: &str) -> Result<(), glib::error::BoolError> { + pub fn set_app_dir>(app_dir: P) -> Result<(), glib::error::BoolError> { assert_initialized_main_thread!(); unsafe { - glib::error::BoolError::from_glib(ffi::gst_preset_set_app_dir(app_dir.to_glib_none().0), "Failed to set app preset directory") + glib::error::BoolError::from_glib(ffi::gst_preset_set_app_dir(app_dir.as_ref().to_glib_none().0), "Failed to set app preset directory") } } } diff --git a/gstreamer/src/auto/proxy_pad.rs b/gstreamer/src/auto/proxy_pad.rs index fe709461fec6c14042e08243963f392a9c675f81..31ec059e385f90f07012d1b6221114232db047bd 100644 --- a/gstreamer/src/auto/proxy_pad.rs +++ b/gstreamer/src/auto/proxy_pad.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/registry.rs b/gstreamer/src/auto/registry.rs index 12aa61eba535adcd86b8fe9c531036abdd6d8258..250039e186a246eacf28e65d4d9f2f29e56bc9f4 100644 --- a/gstreamer/src/auto/registry.rs +++ b/gstreamer/src/auto/registry.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/stream.rs b/gstreamer/src/auto/stream.rs index a2fc2101a2aadf76179865f5444fbe749c5bdbd5..86f8c6e473a3a6aa3a65a956d99dc1f6b630e22b 100644 --- a/gstreamer/src/auto/stream.rs +++ b/gstreamer/src/auto/stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/stream_collection.rs b/gstreamer/src/auto/stream_collection.rs index 6c6395b1270c5d94aa3ffa6be3b88308ec3f4fda..27529ba3d21f068e97f644601f19feb4b93cb4bd 100644 --- a/gstreamer/src/auto/stream_collection.rs +++ b/gstreamer/src/auto/stream_collection.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/system_clock.rs b/gstreamer/src/auto/system_clock.rs index 0ec6edbd0171c8dad1c0286c18dbc49ae5fb7bef..7034c93919c7bb345bb758f8e808d40b83d99644 100644 --- a/gstreamer/src/auto/system_clock.rs +++ b/gstreamer/src/auto/system_clock.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/tag_setter.rs b/gstreamer/src/auto/tag_setter.rs index 142ea75138e08143c79aef5f83bb7cc73c047774..47b00096027859446610f5c09bad16df34206e5c 100644 --- a/gstreamer/src/auto/tag_setter.rs +++ b/gstreamer/src/auto/tag_setter.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/toc_setter.rs b/gstreamer/src/auto/toc_setter.rs index 988be96c0fe22d186082c49e910768259c582356..ec7369512890f689db64b641e8b2c72a3c48d5bd 100644 --- a/gstreamer/src/auto/toc_setter.rs +++ b/gstreamer/src/auto/toc_setter.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/type_find_factory.rs b/gstreamer/src/auto/type_find_factory.rs index e2853989563c621e2f31f98a9d1c137a24f3ddb2..e8fd38c99980cc8b048a00ca235540b78df387d3 100644 --- a/gstreamer/src/auto/type_find_factory.rs +++ b/gstreamer/src/auto/type_find_factory.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/auto/u_r_i_handler.rs b/gstreamer/src/auto/u_r_i_handler.rs index 8d5ede135c6671885f678a3afad8e57eda886bcf..a6cb5fbe287130f5431d796f694ffc2968357f6e 100644 --- a/gstreamer/src/auto/u_r_i_handler.rs +++ b/gstreamer/src/auto/u_r_i_handler.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4) +// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127) // from gir-files (https://github.com/gtk-rs/gir-files @ ???) // DO NOT EDIT diff --git a/gstreamer/src/bus.rs b/gstreamer/src/bus.rs index 1a3848fb4948be46c079a666acea760ce6bdc37a..0ed6b74145a33b4e34b18c109fb1fb422ba97b08 100644 --- a/gstreamer/src/bus.rs +++ b/gstreamer/src/bus.rs @@ -16,6 +16,12 @@ use glib_ffi; use glib_ffi::{gboolean, gpointer}; use std::ptr; +#[cfg(any(all(unix, feature = "v1_14"), feature = "dox"))] +use std::os::unix; + +#[cfg(any(all(not(unix), feature = "v1_14"), feature = "dox"))] +use std::os::windows; + use Bus; use BusSyncReply; use Message; @@ -138,6 +144,26 @@ impl Bus { pub fn unset_sync_handler(&self) { unsafe { ffi::gst_bus_set_sync_handler(self.to_glib_none().0, None, ptr::null_mut(), None) } } + + #[cfg(any(all(unix, feature = "v1_14"), feature = "dox"))] + pub fn get_pollfd(&self) -> unix::io::RawFd { + unsafe { + let mut pollfd: glib_ffi::GPollFD = mem::zeroed(); + ffi::gst_bus_get_pollfd(self.to_glib_none().0, &mut pollfd); + + pollfd.fd + } + } + + #[cfg(any(all(not(unix), feature = "v1_14"), feature = "dox"))] + pub fn get_pollfd(&self) -> windows::io::RawHandle { + unsafe { + let mut pollfd: glib_ffi::GPollFD = mem::zeroed(); + ffi::gst_bus_get_pollfd(self.to_glib_none().0, &mut pollfd); + + pollfd.fd as *mut _ + } + } } #[cfg(any(feature = "futures", feature = "dox"))]