From 1abe9cbeb9eb7d689144b918b34b7595a9c67228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 15 Mar 2018 10:39:12 +0200 Subject: [PATCH] Update gstreamer --- Gir_Gst.toml | 43 +++++++++++++++++ gstreamer/Cargo.toml | 1 + gstreamer/src/auto/alias.rs | 2 +- gstreamer/src/auto/bin.rs | 2 +- gstreamer/src/auto/buffer_pool.rs | 2 +- gstreamer/src/auto/bus.rs | 7 ++- gstreamer/src/auto/child_proxy.rs | 2 +- gstreamer/src/auto/clock.rs | 2 +- gstreamer/src/auto/date_time.rs | 2 +- gstreamer/src/auto/device.rs | 2 +- gstreamer/src/auto/device_monitor.rs | 2 +- gstreamer/src/auto/device_provider.rs | 2 +- gstreamer/src/auto/device_provider_factory.rs | 2 +- gstreamer/src/auto/element.rs | 26 +++++++++- gstreamer/src/auto/element_factory.rs | 2 +- gstreamer/src/auto/enums.rs | 14 +++++- gstreamer/src/auto/flags.rs | 4 +- gstreamer/src/auto/functions.rs | 42 ++++++++++++++++- gstreamer/src/auto/ghost_pad.rs | 2 +- gstreamer/src/auto/mod.rs | 2 +- gstreamer/src/auto/object.rs | 2 +- gstreamer/src/auto/pad.rs | 2 +- gstreamer/src/auto/pad_template.rs | 47 ++++++++++++++++++- gstreamer/src/auto/pipeline.rs | 2 +- gstreamer/src/auto/plugin.rs | 2 +- gstreamer/src/auto/plugin_feature.rs | 2 +- gstreamer/src/auto/preset.rs | 9 ++-- gstreamer/src/auto/proxy_pad.rs | 2 +- gstreamer/src/auto/registry.rs | 2 +- gstreamer/src/auto/stream.rs | 2 +- gstreamer/src/auto/stream_collection.rs | 2 +- gstreamer/src/auto/system_clock.rs | 2 +- gstreamer/src/auto/tag_setter.rs | 2 +- gstreamer/src/auto/toc_setter.rs | 2 +- gstreamer/src/auto/type_find_factory.rs | 2 +- gstreamer/src/auto/u_r_i_handler.rs | 2 +- gstreamer/src/bus.rs | 26 ++++++++++ 37 files changed, 236 insertions(+), 37 deletions(-) diff --git a/Gir_Gst.toml b/Gir_Gst.toml index b4c270a22..c52497787 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 ac764b628..0b8075f4f 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 45ea7f154..f9030b5c8 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 1a764c617..c827a6b2b 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 056b948b4..667e49ae1 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 b0f8073b5..95194dd81 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 135a232e2..67fda37ba 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 2ed192070..4d6ad6588 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 2edb34075..dddd3a371 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 0732bb118..68deebafe 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 e8c9d6019..bc8bfefab 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 7ac4e17e3..a0e79fbc3 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 fbe438c13..daf57fb60 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 e8f1efdc5..c17a42631 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 fe631736a..c7fa0cd95 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 be6173036..47eb0a92d 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 40f40ee8f..b9a0d4745 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 93bd79af5..efc8baa7c 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 7dd8d106e..1f5665d6e 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 7aeb6ad26..61288c883 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 239e2bb2f..6c56bb776 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 d8ecde3e8..84591a847 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 c490157a0..e23bacf3a 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 fe0eb5abd..c5adae420 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 b5320cdf6..5b2fea0de 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 fd88884b7..40c36ab57 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 8a2d652fb..adfb610e6 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 fe709461f..31ec059e3 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 12aa61eba..250039e18 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 a2fc2101a..86f8c6e47 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 6c6395b12..27529ba3d 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 0ec6edbd0..7034c9391 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 142ea7513..47b000960 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 988be96c0..ec7369512 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 e28539895..e8fd38c99 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 8d5ede135..a6cb5fbe2 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 1a3848fb4..0ed6b7414 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"))]