Commit 1abe9cbe authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Update gstreamer

parent 6bd63ec8
...@@ -251,6 +251,12 @@ status = "generate" ...@@ -251,6 +251,12 @@ status = "generate"
[[object]] [[object]]
name = "Gst.Element" name = "Gst.Element"
status = "generate" status = "generate"
[[object.function]]
name = "make_from_uri"
[object.function.return]
# It is already a Result
nullable = false
[[object.function]] [[object.function]]
name = "add_pad" name = "add_pad"
[object.function.return] [object.function.return]
...@@ -376,6 +382,21 @@ status = "generate" ...@@ -376,6 +382,21 @@ status = "generate"
# Wrong place # Wrong place
ignore = true 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]] [[object]]
name = "Gst.ElementFactory" name = "Gst.ElementFactory"
status = "generate" status = "generate"
...@@ -404,6 +425,11 @@ status = "generate" ...@@ -404,6 +425,11 @@ status = "generate"
[object.function.return] [object.function.return]
bool_return_is_error = "Failed to start" bool_return_is_error = "Failed to start"
[[object.function]]
name = "get_metadata"
# better manual function
ignore = true
[[object]] [[object]]
name = "Gst.DeviceMonitor" name = "Gst.DeviceMonitor"
status = "generate" status = "generate"
...@@ -847,6 +873,11 @@ status = "generate" ...@@ -847,6 +873,11 @@ status = "generate"
name = "util_dump_mem" name = "util_dump_mem"
ignore = true ignore = true
[[object.function]]
name = "util_dump_buffer"
# We have our Debug impl on buffers
ignore = true
[[object.function]] [[object.function]]
name = "protection_select_system" name = "protection_select_system"
# unsupported array type # unsupported array type
...@@ -1038,6 +1069,18 @@ status = "generate" ...@@ -1038,6 +1069,18 @@ status = "generate"
[object.function.return] [object.function.return]
nullable = false 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]] [[object]]
name = "Gst.StateChangeReturn" name = "Gst.StateChangeReturn"
status = "generate" status = "generate"
......
...@@ -31,6 +31,7 @@ optional = true ...@@ -31,6 +31,7 @@ optional = true
[features] [features]
v1_10 = ["gstreamer-sys/v1_10"] v1_10 = ["gstreamer-sys/v1_10"]
v1_12 = ["gstreamer-sys/v1_12", "v1_10"] v1_12 = ["gstreamer-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer-sys/v1_14", "v1_12"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"]
dox = ["gstreamer-sys/dox", "glib/dox", "futures"] dox = ["gstreamer-sys/dox", "glib/dox", "futures"]
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
...@@ -63,6 +63,11 @@ impl Bus { ...@@ -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 { pub fn have_pending(&self) -> bool {
unsafe { unsafe {
from_glib(ffi::gst_bus_have_pending(self.to_glib_none().0)) from_glib(ffi::gst_bus_have_pending(self.to_glib_none().0))
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
...@@ -80,6 +80,15 @@ pub trait ElementExt { ...@@ -80,6 +80,15 @@ pub trait ElementExt {
fn create_all_pads(&self); fn create_all_pads(&self);
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn foreach_pad<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, func: /*Unknown conversion*//*Unimplemented*/ElementForeachPadFunc, user_data: P) -> bool;
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn foreach_sink_pad<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, func: /*Unknown conversion*//*Unimplemented*/ElementForeachPadFunc, user_data: P) -> bool;
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn foreach_src_pad<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, func: /*Unknown conversion*//*Unimplemented*/ElementForeachPadFunc, user_data: P) -> bool;
fn get_base_time(&self) -> ClockTime; fn get_base_time(&self) -> ClockTime;
fn get_bus(&self) -> Option<Bus>; fn get_bus(&self) -> Option<Bus>;
...@@ -208,6 +217,21 @@ impl<O: IsA<Element> + IsA<glib::object::Object>> ElementExt for O { ...@@ -208,6 +217,21 @@ impl<O: IsA<Element> + IsA<glib::object::Object>> ElementExt for O {
} }
} }
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn foreach_pad<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&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<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&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<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&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 { fn get_base_time(&self) -> ClockTime {
unsafe { unsafe {
from_glib(ffi::gst_element_get_base_time(self.to_glib_none().0)) from_glib(ffi::gst_element_get_base_time(self.to_glib_none().0))
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
...@@ -1895,6 +1895,10 @@ pub enum StateChange { ...@@ -1895,6 +1895,10 @@ pub enum StateChange {
PlayingToPaused, PlayingToPaused,
PausedToReady, PausedToReady,
ReadyToNull, ReadyToNull,
NullToNull,
ReadyToReady,
PausedToPaused,
PlayingToPlaying,
#[doc(hidden)] #[doc(hidden)]
__Unknown(i32), __Unknown(i32),
} }
...@@ -1911,6 +1915,10 @@ impl ToGlib for StateChange { ...@@ -1911,6 +1915,10 @@ impl ToGlib for StateChange {
StateChange::PlayingToPaused => ffi::GST_STATE_CHANGE_PLAYING_TO_PAUSED, StateChange::PlayingToPaused => ffi::GST_STATE_CHANGE_PLAYING_TO_PAUSED,
StateChange::PausedToReady => ffi::GST_STATE_CHANGE_PAUSED_TO_READY, StateChange::PausedToReady => ffi::GST_STATE_CHANGE_PAUSED_TO_READY,
StateChange::ReadyToNull => ffi::GST_STATE_CHANGE_READY_TO_NULL, 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 StateChange::__Unknown(value) => value
} }
} }
...@@ -1927,6 +1935,10 @@ impl FromGlib<ffi::GstStateChange> for StateChange { ...@@ -1927,6 +1935,10 @@ impl FromGlib<ffi::GstStateChange> for StateChange {
35 => StateChange::PlayingToPaused, 35 => StateChange::PlayingToPaused,
26 => StateChange::PausedToReady, 26 => StateChange::PausedToReady,
17 => StateChange::ReadyToNull, 17 => StateChange::ReadyToNull,
9 => StateChange::NullToNull,
18 => StateChange::ReadyToReady,
27 => StateChange::PausedToPaused,
36 => StateChange::PlayingToPlaying,
value => StateChange::__Unknown(value), value => StateChange::__Unknown(value),
} }
} }
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
...@@ -79,6 +79,7 @@ bitflags! { ...@@ -79,6 +79,7 @@ bitflags! {
const DELTA_UNIT = 8192; const DELTA_UNIT = 8192;
const TAG_MEMORY = 16384; const TAG_MEMORY = 16384;
const SYNC_AFTER = 32768; const SYNC_AFTER = 32768;
const NON_DROPPABLE = 65536;
const LAST = 1048576; const LAST = 1048576;
} }
} }
...@@ -522,6 +523,7 @@ bitflags! { ...@@ -522,6 +523,7 @@ bitflags! {
const PATHS_ARE_DEFAULT_ONLY = 2; const PATHS_ARE_DEFAULT_ONLY = 2;
const FILE_NAME_IS_SUFFIX = 4; const FILE_NAME_IS_SUFFIX = 4;
const FILE_NAME_IS_PREFIX = 8; const FILE_NAME_IS_PREFIX = 8;
const PATHS_ARE_RELATIVE_TO_EXE = 16;
} }
} }
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
...@@ -18,6 +18,14 @@ use std::mem; ...@@ -18,6 +18,14 @@ use std::mem;
use std::ptr; 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<P: IsA<Bin>>(bin: &P, details: DebugGraphDetails) -> String { pub fn debug_bin_to_dot_data<P: IsA<Bin>>(bin: &P, details: DebugGraphDetails) -> String {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {
...@@ -75,6 +83,22 @@ pub fn debug_print_stack_trace() { ...@@ -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<String> {
assert_initialized_main_thread!();
unsafe {
FromGlibPtrContainer::from_glib_full(ffi::gst_debug_ring_buffer_logger_get_logs())
}
}
pub fn debug_set_active(active: bool) { pub fn debug_set_active(active: bool) {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
...@@ -117,6 +141,14 @@ pub fn debug_unset_threshold_for_name(name: &str) { ...@@ -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<String> {
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<Bin, Error> { pub fn parse_bin_from_description(bin_description: &str, ghost_unlinked_pads: bool) -> Result<Bin, Error> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
...@@ -144,6 +176,14 @@ pub fn parse_launchv(argv: &[&str]) -> Result<Element, Error> { ...@@ -144,6 +176,14 @@ pub fn parse_launchv(argv: &[&str]) -> Result<Element, Error> {
} }
} }
#[cfg(any(feature = "v1_14", feature = "dox"))]
pub fn protection_filter_systems_by_available_decryptors(system_identifiers: &str) -> Vec<String> {
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 { pub fn update_registry() -> bool {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
...@@ -7,7 +7,11 @@ use Object; ...@@ -7,7 +7,11 @@ use Object;
use Pad; use Pad;
use PadDirection; use PadDirection;
use PadPresence; use PadPresence;
#[cfg(any(feature = "v1_14", feature = "dox"))]
use StaticPadTemplate;
use ffi; use ffi;
#[cfg(any(feature = "v1_14", feature = "dox"))]
use glib;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::object::IsA; use glib::object::IsA;
...@@ -37,6 +41,22 @@ impl PadTemplate { ...@@ -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<Caps> { pub fn get_caps(&self) -> Option<Caps> {
unsafe { unsafe {
from_glib_full(ffi::gst_pad_template_get_caps(self.to_glib_none().0)) from_glib_full(ffi::gst_pad_template_get_caps(self.to_glib_none().0))
...@@ -57,6 +77,15 @@ impl PadTemplate { ...@@ -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(<glib::types::Type as StaticType>::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<String> { pub fn get_property_name_template(&self) -> Option<String> {
unsafe { unsafe {
let mut value = Value::from_type(<String as StaticType>::static_type()); let mut value = Value::from_type(<String as StaticType>::static_type());
...@@ -97,6 +126,15 @@ impl PadTemplate { ...@@ -97,6 +126,15 @@ impl PadTemplate {
} }
} }
#[cfg(any(feature = "v1_14", feature = "dox"))]
pub fn connect_property_gtype_notify<F: Fn(&PadTemplate) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<Box_<Fn(&PadTemplate) + Send + Sync + 'static>> = 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<F: Fn(&PadTemplate) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { pub fn connect_property_name_template_notify<F: Fn(&PadTemplate) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe { unsafe {
let f: Box_<Box_<Fn(&PadTemplate) + Send + Sync + 'static>> = Box_::new(Box_::new(f)); let f: Box_<Box_<Fn(&PadTemplate) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
...@@ -135,6 +173,13 @@ unsafe extern "C" fn notify_direction_trampoline(this: *mut ffi::GstPadTemplate, ...@@ -135,6 +173,13 @@ unsafe extern "C" fn notify_direction_trampoline(this: *mut ffi::GstPadTemplate,
f(&from_glib_borrow(this)) 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) { unsafe extern "C" fn notify_name_template_trampoline(this: *mut ffi::GstPadTemplate, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
callback_guard!(); callback_guard!();
let f: &&(Fn(&PadTemplate) + Send + Sync + 'static) = transmute(f); let f: &&(Fn(&PadTemplate) + Send + Sync + 'static) = transmute(f);
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
...@@ -8,6 +8,7 @@ use glib::object::IsA; ...@@ -8,6 +8,7 @@ use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
use glib_ffi; use glib_ffi;
use gobject_ffi; use gobject_ffi;
use std;
use std::mem; use std::mem;
use std::ptr; use std::ptr;
...@@ -20,17 +21,17 @@ glib_wrapper! { ...@@ -20,17 +21,17 @@ glib_wrapper! {
} }
impl Preset { impl Preset {
pub fn get_app_dir() -> Option<String> { pub fn get_app_dir() -> Option<std::path::PathBuf> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
from_glib_none(ffi::gst_preset_get_app_dir()) 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<P: AsRef<std::path::Path>>(app_dir: P) -> Result<(), glib::error::BoolError> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { 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")
} }
} }
} }
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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 @ ???) // from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT // DO NOT EDIT
......
// 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)