Regenerate and fix manual bindings for GString support

This commit is contained in:
Philippe Normand 2018-12-09 16:06:12 +00:00 committed by Sebastian Dröge
parent 9665a89940
commit 9534416760
74 changed files with 255 additions and 198 deletions

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 811e711) Generated by gir (https://github.com/gtk-rs/gir @ c5498ac)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 811e711) Generated by gir (https://github.com/gtk-rs/gir @ c5498ac)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 811e711) Generated by gir (https://github.com/gtk-rs/gir @ c5498ac)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 811e711) Generated by gir (https://github.com/gtk-rs/gir @ c5498ac)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -10,6 +10,7 @@ use futures_core;
use gio; use gio;
use gio_ffi; use gio_ffi;
use glib; use glib;
use glib::GString;
use glib::Value; use glib::Value;
use glib::object::Downcast; use glib::object::Downcast;
use glib::object::IsA; use glib::object::IsA;
@ -98,7 +99,7 @@ pub trait AssetExt: 'static {
fn get_extractable_type(&self) -> glib::types::Type; fn get_extractable_type(&self) -> glib::types::Type;
fn get_id(&self) -> Option<String>; fn get_id(&self) -> Option<GString>;
fn get_proxy(&self) -> Option<Asset>; fn get_proxy(&self) -> Option<Asset>;
@ -138,7 +139,7 @@ impl<O: IsA<Asset>> AssetExt for O {
} }
} }
fn get_id(&self) -> Option<String> { fn get_id(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::ges_asset_get_id(self.to_glib_none().0)) from_glib_none(ffi::ges_asset_get_id(self.to_glib_none().0))
} }

View file

@ -7,6 +7,7 @@ use Extractable;
use TimelineElement; use TimelineElement;
use TrackElement; use TrackElement;
use ffi; use ffi;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::object::IsA; use glib::object::IsA;
@ -31,13 +32,13 @@ impl Effect {
} }
pub trait EffectExt: 'static { pub trait EffectExt: 'static {
fn get_property_bin_description(&self) -> Option<String>; fn get_property_bin_description(&self) -> Option<GString>;
} }
impl<O: IsA<Effect>> EffectExt for O { impl<O: IsA<Effect>> EffectExt for O {
fn get_property_bin_description(&self) -> Option<String> { fn get_property_bin_description(&self) -> Option<GString> {
unsafe { unsafe {
let mut value = Value::from_type(<String as StaticType>::static_type()); let mut value = Value::from_type(<GString as StaticType>::static_type());
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"bin-description\0".as_ptr() as *const _, value.to_glib_none_mut().0); gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"bin-description\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get() value.get()
} }

View file

@ -4,6 +4,7 @@
use Asset; use Asset;
use ffi; use ffi;
use glib::GString;
use glib::object::IsA; use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
@ -18,7 +19,7 @@ glib_wrapper! {
pub trait ExtractableExt: 'static { pub trait ExtractableExt: 'static {
fn get_asset(&self) -> Option<Asset>; fn get_asset(&self) -> Option<Asset>;
fn get_id(&self) -> Option<String>; fn get_id(&self) -> Option<GString>;
fn set_asset<P: IsA<Asset>>(&self, asset: &P) -> bool; fn set_asset<P: IsA<Asset>>(&self, asset: &P) -> bool;
} }
@ -30,7 +31,7 @@ impl<O: IsA<Extractable>> ExtractableExt for O {
} }
} }
fn get_id(&self) -> Option<String> { fn get_id(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::ges_extractable_get_id(self.to_glib_none().0)) from_glib_full(ffi::ges_extractable_get_id(self.to_glib_none().0))
} }

View file

@ -7,6 +7,7 @@ use Error;
use Timeline; use Timeline;
use ffi; use ffi;
use glib; use glib;
use glib::GString;
use glib::object::Downcast; use glib::object::Downcast;
use glib::object::IsA; use glib::object::IsA;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
@ -51,7 +52,7 @@ pub trait ProjectExt: 'static {
fn get_loading_assets(&self) -> Vec<Asset>; fn get_loading_assets(&self) -> Vec<Asset>;
fn get_uri(&self) -> Option<String>; fn get_uri(&self) -> Option<GString>;
fn list_assets(&self, filter: glib::types::Type) -> Vec<Asset>; fn list_assets(&self, filter: glib::types::Type) -> Vec<Asset>;
@ -73,7 +74,7 @@ pub trait ProjectExt: 'static {
fn connect_loaded<F: Fn(&Self, &Timeline) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_loaded<F: Fn(&Self, &Timeline) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_missing_uri<F: Fn(&Self, &Error, &Asset) -> Option<String> + 'static>(&self, f: F) -> SignalHandlerId; fn connect_missing_uri<F: Fn(&Self, &Error, &Asset) -> Option<GString> + 'static>(&self, f: F) -> SignalHandlerId;
} }
impl<O: IsA<Project>> ProjectExt for O { impl<O: IsA<Project>> ProjectExt for O {
@ -119,7 +120,7 @@ impl<O: IsA<Project>> ProjectExt for O {
} }
} }
fn get_uri(&self) -> Option<String> { fn get_uri(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::ges_project_get_uri(self.to_glib_none().0)) from_glib_full(ffi::ges_project_get_uri(self.to_glib_none().0))
} }
@ -201,9 +202,9 @@ impl<O: IsA<Project>> ProjectExt for O {
} }
} }
fn connect_missing_uri<F: Fn(&Self, &Error, &Asset) -> Option<String> + 'static>(&self, f: F) -> SignalHandlerId { fn connect_missing_uri<F: Fn(&Self, &Error, &Asset) -> Option<GString> + 'static>(&self, f: F) -> SignalHandlerId {
unsafe { unsafe {
let f: Box_<Box_<Fn(&Self, &Error, &Asset) -> Option<String> + 'static>> = Box_::new(Box_::new(f)); let f: Box_<Box_<Fn(&Self, &Error, &Asset) -> Option<GString> + 'static>> = Box_::new(Box_::new(f));
connect_raw(self.to_glib_none().0 as *mut _, b"missing-uri\0".as_ptr() as *const _, connect_raw(self.to_glib_none().0 as *mut _, b"missing-uri\0".as_ptr() as *const _,
transmute(missing_uri_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _) transmute(missing_uri_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
} }
@ -231,7 +232,7 @@ where P: IsA<Project> {
unsafe extern "C" fn error_loading_asset_trampoline<P>(this: *mut ffi::GESProject, error: *mut glib_ffi::GError, id: *mut libc::c_char, extractable_type: glib_ffi::GType, f: glib_ffi::gpointer) unsafe extern "C" fn error_loading_asset_trampoline<P>(this: *mut ffi::GESProject, error: *mut glib_ffi::GError, id: *mut libc::c_char, extractable_type: glib_ffi::GType, f: glib_ffi::gpointer)
where P: IsA<Project> { where P: IsA<Project> {
let f: &&(Fn(&P, &Error, &str, glib::types::Type) + 'static) = transmute(f); let f: &&(Fn(&P, &Error, &str, glib::types::Type) + 'static) = transmute(f);
f(&Project::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(error), &String::from_glib_none(id), from_glib(extractable_type)) f(&Project::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(error), &GString::from_glib_borrow(id), from_glib(extractable_type))
} }
unsafe extern "C" fn loaded_trampoline<P>(this: *mut ffi::GESProject, timeline: *mut ffi::GESTimeline, f: glib_ffi::gpointer) unsafe extern "C" fn loaded_trampoline<P>(this: *mut ffi::GESProject, timeline: *mut ffi::GESTimeline, f: glib_ffi::gpointer)
@ -242,6 +243,6 @@ where P: IsA<Project> {
unsafe extern "C" fn missing_uri_trampoline<P>(this: *mut ffi::GESProject, error: *mut glib_ffi::GError, wrong_asset: *mut ffi::GESAsset, f: glib_ffi::gpointer) -> *mut libc::c_char unsafe extern "C" fn missing_uri_trampoline<P>(this: *mut ffi::GESProject, error: *mut glib_ffi::GError, wrong_asset: *mut ffi::GESAsset, f: glib_ffi::gpointer) -> *mut libc::c_char
where P: IsA<Project> { where P: IsA<Project> {
let f: &&(Fn(&P, &Error, &Asset) -> Option<String> + 'static) = transmute(f); let f: &&(Fn(&P, &Error, &Asset) -> Option<GString> + 'static) = transmute(f);
f(&Project::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(error), &from_glib_borrow(wrong_asset)).to_glib_full() f(&Project::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(error), &from_glib_borrow(wrong_asset)).to_glib_full()
} }

View file

@ -6,6 +6,7 @@ use Extractable;
use Timeline; use Timeline;
use TrackType; use TrackType;
use ffi; use ffi;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::object::Downcast; use glib::object::Downcast;
@ -46,7 +47,7 @@ pub trait TimelineElementExt: 'static {
fn get_max_duration(&self) -> gst::ClockTime; fn get_max_duration(&self) -> gst::ClockTime;
fn get_name(&self) -> Option<String>; fn get_name(&self) -> Option<GString>;
fn get_parent(&self) -> Option<TimelineElement>; fn get_parent(&self) -> Option<TimelineElement>;
@ -176,7 +177,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
} }
} }
fn get_name(&self) -> Option<String> { fn get_name(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::ges_timeline_element_get_name(self.to_glib_none().0)) from_glib_full(ffi::ges_timeline_element_get_name(self.to_glib_none().0))
} }

View file

@ -10,6 +10,7 @@ use TimelineElement;
use Track; use Track;
use TrackType; use TrackType;
use ffi; use ffi;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::object::Downcast; use glib::object::Downcast;

View file

@ -7,6 +7,7 @@ use Container;
use Extractable; use Extractable;
use TimelineElement; use TimelineElement;
use ffi; use ffi;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::object::Downcast; use glib::object::Downcast;
@ -37,7 +38,7 @@ impl UriClip {
} }
pub trait UriClipExt: 'static { pub trait UriClipExt: 'static {
fn get_uri(&self) -> Option<String>; fn get_uri(&self) -> Option<GString>;
fn is_image(&self) -> bool; fn is_image(&self) -> bool;
@ -59,7 +60,7 @@ pub trait UriClipExt: 'static {
} }
impl<O: IsA<UriClip>> UriClipExt for O { impl<O: IsA<UriClip>> UriClipExt for O {
fn get_uri(&self) -> Option<String> { fn get_uri(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::ges_uri_clip_get_uri(self.to_glib_none().0)) from_glib_none(ffi::ges_uri_clip_get_uri(self.to_glib_none().0))
} }

View file

@ -5,6 +5,7 @@
use Asset; use Asset;
use UriClipAsset; use UriClipAsset;
use ffi; use ffi;
use glib::GString;
use glib::object::IsA; use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
use gst_pbutils; use gst_pbutils;
@ -22,7 +23,7 @@ pub trait UriSourceAssetExt: 'static {
fn get_stream_info(&self) -> Option<gst_pbutils::DiscovererStreamInfo>; fn get_stream_info(&self) -> Option<gst_pbutils::DiscovererStreamInfo>;
fn get_stream_uri(&self) -> Option<String>; fn get_stream_uri(&self) -> Option<GString>;
} }
impl<O: IsA<UriSourceAsset>> UriSourceAssetExt for O { impl<O: IsA<UriSourceAsset>> UriSourceAssetExt for O {
@ -38,7 +39,7 @@ impl<O: IsA<UriSourceAsset>> UriSourceAssetExt for O {
} }
} }
fn get_stream_uri(&self) -> Option<String> { fn get_stream_uri(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::ges_uri_source_asset_get_stream_uri(self.to_glib_none().0)) from_glib_none(ffi::ges_uri_source_asset_get_stream_uri(self.to_glib_none().0))
} }

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 811e711) Generated by gir (https://github.com/gtk-rs/gir @ c5498ac)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -5,6 +5,7 @@
use GLContext; use GLContext;
use GLDisplay; use GLDisplay;
use ffi; use ffi;
use glib::GString;
use glib::object::Downcast; use glib::object::Downcast;
use glib::object::IsA; use glib::object::IsA;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
@ -174,11 +175,11 @@ impl<O: IsA<GLWindow>> GLWindowExt for O {
unsafe extern "C" fn key_event_trampoline<P>(this: *mut ffi::GstGLWindow, id: *mut libc::c_char, key: *mut libc::c_char, f: glib_ffi::gpointer) unsafe extern "C" fn key_event_trampoline<P>(this: *mut ffi::GstGLWindow, id: *mut libc::c_char, key: *mut libc::c_char, f: glib_ffi::gpointer)
where P: IsA<GLWindow> { where P: IsA<GLWindow> {
let f: &&(Fn(&P, &str, &str) + Send + Sync + 'static) = transmute(f); let f: &&(Fn(&P, &str, &str) + Send + Sync + 'static) = transmute(f);
f(&GLWindow::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(id), &String::from_glib_none(key)) f(&GLWindow::from_glib_borrow(this).downcast_unchecked(), &GString::from_glib_borrow(id), &GString::from_glib_borrow(key))
} }
unsafe extern "C" fn mouse_event_trampoline<P>(this: *mut ffi::GstGLWindow, id: *mut libc::c_char, button: libc::c_int, x: libc::c_double, y: libc::c_double, f: glib_ffi::gpointer) unsafe extern "C" fn mouse_event_trampoline<P>(this: *mut ffi::GstGLWindow, id: *mut libc::c_char, button: libc::c_int, x: libc::c_double, y: libc::c_double, f: glib_ffi::gpointer)
where P: IsA<GLWindow> { where P: IsA<GLWindow> {
let f: &&(Fn(&P, &str, i32, f64, f64) + Send + Sync + 'static) = transmute(f); let f: &&(Fn(&P, &str, i32, f64, f64) + Send + Sync + 'static) = transmute(f);
f(&GLWindow::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(id), button, x, y) f(&GLWindow::from_glib_borrow(this).downcast_unchecked(), &GString::from_glib_borrow(id), button, x, y)
} }

View file

@ -7,6 +7,7 @@ use GLContext;
use GLSLProfile; use GLSLProfile;
use GLSLVersion; use GLSLVersion;
use ffi; use ffi;
use glib::GString;
use glib::translate::*; use glib::translate::*;
use gst; use gst;
use gst_ffi; use gst_ffi;

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 811e711) Generated by gir (https://github.com/gtk-rs/gir @ c5498ac)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -3,6 +3,7 @@
// DO NOT EDIT // DO NOT EDIT
use ffi; use ffi;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
@ -27,9 +28,9 @@ glib_wrapper! {
} }
impl NetClientClock { impl NetClientClock {
pub fn get_property_address(&self) -> Option<String> { pub fn get_property_address(&self) -> Option<GString> {
unsafe { unsafe {
let mut value = Value::from_type(<String as StaticType>::static_type()); let mut value = Value::from_type(<GString as StaticType>::static_type());
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0); gobject_ffi::g_object_get_property(self.to_glib_none().0, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get() value.get()
} }

View file

@ -3,6 +3,7 @@
// DO NOT EDIT // DO NOT EDIT
use ffi; use ffi;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
@ -40,9 +41,9 @@ impl NetTimeProvider {
} }
} }
pub fn get_property_address(&self) -> Option<String> { pub fn get_property_address(&self) -> Option<GString> {
unsafe { unsafe {
let mut value = Value::from_type(<String as StaticType>::static_type()); let mut value = Value::from_type(<GString as StaticType>::static_type());
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0); gobject_ffi::g_object_get_property(self.to_glib_none().0, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get() value.get()
} }

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 811e711) Generated by gir (https://github.com/gtk-rs/gir @ c5498ac)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -4,6 +4,7 @@
use DiscovererStreamInfo; use DiscovererStreamInfo;
use ffi; use ffi;
use glib::GString;
use glib::translate::*; use glib::translate::*;
glib_wrapper! { glib_wrapper! {
@ -40,7 +41,7 @@ impl DiscovererAudioInfo {
} }
} }
pub fn get_language(&self) -> Option<String> { pub fn get_language(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_discoverer_audio_info_get_language(self.to_glib_none().0)) from_glib_none(ffi::gst_discoverer_audio_info_get_language(self.to_glib_none().0))
} }

View file

@ -7,6 +7,7 @@ use DiscovererSerializeFlags;
use DiscovererStreamInfo; use DiscovererStreamInfo;
use ffi; use ffi;
use glib; use glib;
use glib::GString;
use glib::object::IsA; use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
use gst; use gst;
@ -45,7 +46,7 @@ pub trait DiscovererInfoExt: 'static {
fn get_misc(&self) -> Option<gst::Structure>; fn get_misc(&self) -> Option<gst::Structure>;
fn get_missing_elements_installer_details(&self) -> Vec<String>; fn get_missing_elements_installer_details(&self) -> Vec<GString>;
fn get_result(&self) -> DiscovererResult; fn get_result(&self) -> DiscovererResult;
@ -63,7 +64,7 @@ pub trait DiscovererInfoExt: 'static {
fn get_toc(&self) -> Option<gst::Toc>; fn get_toc(&self) -> Option<gst::Toc>;
fn get_uri(&self) -> Option<String>; fn get_uri(&self) -> Option<GString>;
fn get_video_streams(&self) -> Vec<DiscovererStreamInfo>; fn get_video_streams(&self) -> Vec<DiscovererStreamInfo>;
@ -108,7 +109,7 @@ impl<O: IsA<DiscovererInfo>> DiscovererInfoExt for O {
} }
} }
fn get_missing_elements_installer_details(&self) -> Vec<String> { fn get_missing_elements_installer_details(&self) -> Vec<GString> {
unsafe { unsafe {
FromGlibPtrContainer::from_glib_none(ffi::gst_discoverer_info_get_missing_elements_installer_details(const_override(self.to_glib_none().0))) FromGlibPtrContainer::from_glib_none(ffi::gst_discoverer_info_get_missing_elements_installer_details(const_override(self.to_glib_none().0)))
} }
@ -162,7 +163,7 @@ impl<O: IsA<DiscovererInfo>> DiscovererInfoExt for O {
} }
} }
fn get_uri(&self) -> Option<String> { fn get_uri(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_discoverer_info_get_uri(const_override(self.to_glib_none().0))) from_glib_none(ffi::gst_discoverer_info_get_uri(const_override(self.to_glib_none().0)))
} }

View file

@ -3,6 +3,7 @@
// DO NOT EDIT // DO NOT EDIT
use ffi; use ffi;
use glib::GString;
use glib::object::IsA; use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
use gst; use gst;
@ -27,9 +28,9 @@ pub trait DiscovererStreamInfoExt: 'static {
fn get_previous(&self) -> Option<DiscovererStreamInfo>; fn get_previous(&self) -> Option<DiscovererStreamInfo>;
fn get_stream_id(&self) -> Option<String>; fn get_stream_id(&self) -> Option<GString>;
fn get_stream_type_nick(&self) -> String; fn get_stream_type_nick(&self) -> GString;
fn get_tags(&self) -> Option<gst::TagList>; fn get_tags(&self) -> Option<gst::TagList>;
@ -61,13 +62,13 @@ impl<O: IsA<DiscovererStreamInfo>> DiscovererStreamInfoExt for O {
} }
} }
fn get_stream_id(&self) -> Option<String> { fn get_stream_id(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_discoverer_stream_info_get_stream_id(self.to_glib_none().0)) from_glib_none(ffi::gst_discoverer_stream_info_get_stream_id(self.to_glib_none().0))
} }
} }
fn get_stream_type_nick(&self) -> String { fn get_stream_type_nick(&self) -> GString {
unsafe { unsafe {
from_glib_none(ffi::gst_discoverer_stream_info_get_stream_type_nick(self.to_glib_none().0)) from_glib_none(ffi::gst_discoverer_stream_info_get_stream_type_nick(self.to_glib_none().0))
} }

View file

@ -4,6 +4,7 @@
use DiscovererStreamInfo; use DiscovererStreamInfo;
use ffi; use ffi;
use glib::GString;
use glib::translate::*; use glib::translate::*;
glib_wrapper! { glib_wrapper! {
@ -15,7 +16,7 @@ glib_wrapper! {
} }
impl DiscovererSubtitleInfo { impl DiscovererSubtitleInfo {
pub fn get_language(&self) -> Option<String> { pub fn get_language(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_discoverer_subtitle_info_get_language(self.to_glib_none().0)) from_glib_none(ffi::gst_discoverer_subtitle_info_get_language(self.to_glib_none().0))
} }

View file

@ -4,6 +4,7 @@
use DiscovererInfo; use DiscovererInfo;
use ffi; use ffi;
use glib::GString;
use glib::object::IsA; use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
use gst; use gst;
@ -44,25 +45,25 @@ pub trait EncodingProfileExt: 'static {
fn get_allow_dynamic_output(&self) -> bool; fn get_allow_dynamic_output(&self) -> bool;
fn get_description(&self) -> Option<String>; fn get_description(&self) -> Option<GString>;
fn get_file_extension(&self) -> Option<String>; fn get_file_extension(&self) -> Option<GString>;
fn get_format(&self) -> gst::Caps; fn get_format(&self) -> gst::Caps;
fn get_input_caps(&self) -> gst::Caps; fn get_input_caps(&self) -> gst::Caps;
fn get_name(&self) -> Option<String>; fn get_name(&self) -> Option<GString>;
fn get_presence(&self) -> u32; fn get_presence(&self) -> u32;
fn get_preset(&self) -> Option<String>; fn get_preset(&self) -> Option<GString>;
fn get_preset_name(&self) -> Option<String>; fn get_preset_name(&self) -> Option<GString>;
fn get_restriction(&self) -> Option<gst::Caps>; fn get_restriction(&self) -> Option<gst::Caps>;
fn get_type_nick(&self) -> Option<String>; fn get_type_nick(&self) -> Option<GString>;
fn is_enabled(&self) -> bool; fn is_enabled(&self) -> bool;
@ -82,13 +83,13 @@ impl<O: IsA<EncodingProfile>> EncodingProfileExt for O {
} }
} }
fn get_description(&self) -> Option<String> { fn get_description(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_encoding_profile_get_description(self.to_glib_none().0)) from_glib_none(ffi::gst_encoding_profile_get_description(self.to_glib_none().0))
} }
} }
fn get_file_extension(&self) -> Option<String> { fn get_file_extension(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_encoding_profile_get_file_extension(self.to_glib_none().0)) from_glib_none(ffi::gst_encoding_profile_get_file_extension(self.to_glib_none().0))
} }
@ -106,7 +107,7 @@ impl<O: IsA<EncodingProfile>> EncodingProfileExt for O {
} }
} }
fn get_name(&self) -> Option<String> { fn get_name(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_encoding_profile_get_name(self.to_glib_none().0)) from_glib_none(ffi::gst_encoding_profile_get_name(self.to_glib_none().0))
} }
@ -118,13 +119,13 @@ impl<O: IsA<EncodingProfile>> EncodingProfileExt for O {
} }
} }
fn get_preset(&self) -> Option<String> { fn get_preset(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_encoding_profile_get_preset(self.to_glib_none().0)) from_glib_none(ffi::gst_encoding_profile_get_preset(self.to_glib_none().0))
} }
} }
fn get_preset_name(&self) -> Option<String> { fn get_preset_name(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_encoding_profile_get_preset_name(self.to_glib_none().0)) from_glib_none(ffi::gst_encoding_profile_get_preset_name(self.to_glib_none().0))
} }
@ -136,7 +137,7 @@ impl<O: IsA<EncodingProfile>> EncodingProfileExt for O {
} }
} }
fn get_type_nick(&self) -> Option<String> { fn get_type_nick(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_encoding_profile_get_type_nick(self.to_glib_none().0)) from_glib_none(ffi::gst_encoding_profile_get_type_nick(self.to_glib_none().0))
} }

View file

@ -5,6 +5,7 @@
use EncodingProfile; use EncodingProfile;
use Error; use Error;
use ffi; use ffi;
use glib::GString;
use glib::object::IsA; use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
use std; use std;
@ -51,11 +52,11 @@ unsafe impl Send for EncodingTarget {}
unsafe impl Sync for EncodingTarget {} unsafe impl Sync for EncodingTarget {}
pub trait EncodingTargetExt: 'static { pub trait EncodingTargetExt: 'static {
fn get_category(&self) -> String; fn get_category(&self) -> GString;
fn get_description(&self) -> String; fn get_description(&self) -> GString;
fn get_name(&self) -> String; fn get_name(&self) -> GString;
fn get_profile(&self, name: &str) -> Option<EncodingProfile>; fn get_profile(&self, name: &str) -> Option<EncodingProfile>;
@ -67,19 +68,19 @@ pub trait EncodingTargetExt: 'static {
} }
impl<O: IsA<EncodingTarget>> EncodingTargetExt for O { impl<O: IsA<EncodingTarget>> EncodingTargetExt for O {
fn get_category(&self) -> String { fn get_category(&self) -> GString {
unsafe { unsafe {
from_glib_none(ffi::gst_encoding_target_get_category(self.to_glib_none().0)) from_glib_none(ffi::gst_encoding_target_get_category(self.to_glib_none().0))
} }
} }
fn get_description(&self) -> String { fn get_description(&self) -> GString {
unsafe { unsafe {
from_glib_none(ffi::gst_encoding_target_get_description(self.to_glib_none().0)) from_glib_none(ffi::gst_encoding_target_get_description(self.to_glib_none().0))
} }
} }
fn get_name(&self) -> String { fn get_name(&self) -> GString {
unsafe { unsafe {
from_glib_none(ffi::gst_encoding_target_get_name(self.to_glib_none().0)) from_glib_none(ffi::gst_encoding_target_get_name(self.to_glib_none().0))
} }

View file

@ -4,6 +4,7 @@
use EncodingTarget; use EncodingTarget;
use ffi; use ffi;
use glib::GString;
use glib::translate::*; use glib::translate::*;
use std::mem; use std::mem;
@ -17,28 +18,28 @@ pub fn encoding_list_all_targets<'a, P: Into<Option<&'a str>>>(categoryname: P)
} }
} }
pub fn encoding_list_available_categories() -> Vec<String> { pub fn encoding_list_available_categories() -> Vec<GString> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
FromGlibPtrContainer::from_glib_full(ffi::gst_encoding_list_available_categories()) FromGlibPtrContainer::from_glib_full(ffi::gst_encoding_list_available_categories())
} }
} }
pub fn pb_utils_get_element_description(factory_name: &str) -> Option<String> { pub fn pb_utils_get_element_description(factory_name: &str) -> Option<GString> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
from_glib_full(ffi::gst_pb_utils_get_element_description(factory_name.to_glib_none().0)) from_glib_full(ffi::gst_pb_utils_get_element_description(factory_name.to_glib_none().0))
} }
} }
pub fn pb_utils_get_sink_description(protocol: &str) -> Option<String> { pub fn pb_utils_get_sink_description(protocol: &str) -> Option<GString> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
from_glib_full(ffi::gst_pb_utils_get_sink_description(protocol.to_glib_none().0)) from_glib_full(ffi::gst_pb_utils_get_sink_description(protocol.to_glib_none().0))
} }
} }
pub fn pb_utils_get_source_description(protocol: &str) -> Option<String> { pub fn pb_utils_get_source_description(protocol: &str) -> Option<GString> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
from_glib_full(ffi::gst_pb_utils_get_source_description(protocol.to_glib_none().0)) from_glib_full(ffi::gst_pb_utils_get_source_description(protocol.to_glib_none().0))
@ -57,7 +58,7 @@ pub fn plugins_base_version() -> (u32, u32, u32, u32) {
} }
} }
pub fn plugins_base_version_string() -> Option<String> { pub fn plugins_base_version_string() -> Option<GString> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
from_glib_full(ffi::gst_plugins_base_version_string()) from_glib_full(ffi::gst_plugins_base_version_string())

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 811e711) Generated by gir (https://github.com/gtk-rs/gir @ c5498ac)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -13,6 +13,7 @@ use PlayerVideoInfo;
use PlayerVisualization; use PlayerVisualization;
use ffi; use ffi;
use glib; use glib;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
@ -68,7 +69,7 @@ impl Player {
} }
} }
pub fn get_current_visualization(&self) -> Option<String> { pub fn get_current_visualization(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_player_get_current_visualization(self.to_glib_none().0)) from_glib_full(ffi::gst_player_get_current_visualization(self.to_glib_none().0))
} }
@ -122,13 +123,13 @@ impl Player {
} }
} }
pub fn get_subtitle_uri(&self) -> Option<String> { pub fn get_subtitle_uri(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_player_get_subtitle_uri(self.to_glib_none().0)) from_glib_full(ffi::gst_player_get_subtitle_uri(self.to_glib_none().0))
} }
} }
pub fn get_uri(&self) -> Option<String> { pub fn get_uri(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_player_get_uri(self.to_glib_none().0)) from_glib_full(ffi::gst_player_get_uri(self.to_glib_none().0))
} }
@ -282,9 +283,9 @@ impl Player {
} }
} }
pub fn get_property_suburi(&self) -> Option<String> { pub fn get_property_suburi(&self) -> Option<GString> {
unsafe { unsafe {
let mut value = Value::from_type(<String as StaticType>::static_type()); let mut value = Value::from_type(<GString as StaticType>::static_type());
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"suburi\0".as_ptr() as *const _, value.to_glib_none_mut().0); gobject_ffi::g_object_get_property(self.to_glib_none().0, b"suburi\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get() value.get()
} }
@ -589,7 +590,7 @@ unsafe extern "C" fn state_changed_trampoline(this: *mut ffi::GstPlayer, object:
unsafe extern "C" fn uri_loaded_trampoline(this: *mut ffi::GstPlayer, object: *mut libc::c_char, f: glib_ffi::gpointer) { unsafe extern "C" fn uri_loaded_trampoline(this: *mut ffi::GstPlayer, object: *mut libc::c_char, f: glib_ffi::gpointer) {
let f: &&(Fn(&Player, &str) + Send + 'static) = transmute(f); let f: &&(Fn(&Player, &str) + Send + 'static) = transmute(f);
f(&from_glib_borrow(this), &String::from_glib_none(object)) f(&from_glib_borrow(this), &GString::from_glib_borrow(object))
} }
unsafe extern "C" fn video_dimensions_changed_trampoline(this: *mut ffi::GstPlayer, object: libc::c_int, p0: libc::c_int, f: glib_ffi::gpointer) { unsafe extern "C" fn video_dimensions_changed_trampoline(this: *mut ffi::GstPlayer, object: libc::c_int, p0: libc::c_int, f: glib_ffi::gpointer) {

View file

@ -4,6 +4,7 @@
use PlayerStreamInfo; use PlayerStreamInfo;
use ffi; use ffi;
use glib::GString;
use glib::translate::*; use glib::translate::*;
glib_wrapper! { glib_wrapper! {
@ -27,7 +28,7 @@ impl PlayerAudioInfo {
} }
} }
pub fn get_language(&self) -> Option<String> { pub fn get_language(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_player_audio_info_get_language(self.to_glib_none().0)) from_glib_none(ffi::gst_player_audio_info_get_language(self.to_glib_none().0))
} }

View file

@ -7,6 +7,7 @@ use PlayerStreamInfo;
use PlayerSubtitleInfo; use PlayerSubtitleInfo;
use PlayerVideoInfo; use PlayerVideoInfo;
use ffi; use ffi;
use glib::GString;
use glib::translate::*; use glib::translate::*;
use gst; use gst;
@ -25,7 +26,7 @@ impl PlayerMediaInfo {
} }
} }
pub fn get_container_format(&self) -> Option<String> { pub fn get_container_format(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_player_media_info_get_container_format(self.to_glib_none().0)) from_glib_none(ffi::gst_player_media_info_get_container_format(self.to_glib_none().0))
} }
@ -85,13 +86,13 @@ impl PlayerMediaInfo {
} }
} }
pub fn get_title(&self) -> Option<String> { pub fn get_title(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_player_media_info_get_title(self.to_glib_none().0)) from_glib_none(ffi::gst_player_media_info_get_title(self.to_glib_none().0))
} }
} }
pub fn get_uri(&self) -> String { pub fn get_uri(&self) -> GString {
unsafe { unsafe {
from_glib_none(ffi::gst_player_media_info_get_uri(self.to_glib_none().0)) from_glib_none(ffi::gst_player_media_info_get_uri(self.to_glib_none().0))
} }

View file

@ -3,6 +3,7 @@
// DO NOT EDIT // DO NOT EDIT
use ffi; use ffi;
use glib::GString;
use glib::object::IsA; use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
use gst; use gst;
@ -21,11 +22,11 @@ unsafe impl Sync for PlayerStreamInfo {}
pub trait PlayerStreamInfoExt: 'static { pub trait PlayerStreamInfoExt: 'static {
fn get_caps(&self) -> Option<gst::Caps>; fn get_caps(&self) -> Option<gst::Caps>;
fn get_codec(&self) -> Option<String>; fn get_codec(&self) -> Option<GString>;
fn get_index(&self) -> i32; fn get_index(&self) -> i32;
fn get_stream_type(&self) -> String; fn get_stream_type(&self) -> GString;
fn get_tags(&self) -> Option<gst::TagList>; fn get_tags(&self) -> Option<gst::TagList>;
} }
@ -37,7 +38,7 @@ impl<O: IsA<PlayerStreamInfo>> PlayerStreamInfoExt for O {
} }
} }
fn get_codec(&self) -> Option<String> { fn get_codec(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_player_stream_info_get_codec(const_override(self.to_glib_none().0))) from_glib_none(ffi::gst_player_stream_info_get_codec(const_override(self.to_glib_none().0)))
} }
@ -49,7 +50,7 @@ impl<O: IsA<PlayerStreamInfo>> PlayerStreamInfoExt for O {
} }
} }
fn get_stream_type(&self) -> String { fn get_stream_type(&self) -> GString {
unsafe { unsafe {
from_glib_none(ffi::gst_player_stream_info_get_stream_type(const_override(self.to_glib_none().0))) from_glib_none(ffi::gst_player_stream_info_get_stream_type(const_override(self.to_glib_none().0)))
} }

View file

@ -4,6 +4,7 @@
use PlayerStreamInfo; use PlayerStreamInfo;
use ffi; use ffi;
use glib::GString;
use glib::translate::*; use glib::translate::*;
glib_wrapper! { glib_wrapper! {
@ -15,7 +16,7 @@ glib_wrapper! {
} }
impl PlayerSubtitleInfo { impl PlayerSubtitleInfo {
pub fn get_language(&self) -> Option<String> { pub fn get_language(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_player_subtitle_info_get_language(self.to_glib_none().0)) from_glib_none(ffi::gst_player_subtitle_info_get_language(self.to_glib_none().0))
} }

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 811e711) Generated by gir (https://github.com/gtk-rs/gir @ c5498ac)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -6,6 +6,7 @@ use RTSPToken;
use ffi; use ffi;
use gio; use gio;
use gio_ffi; use gio_ffi;
use glib::GString;
use glib::object::Downcast; use glib::object::Downcast;
use glib::object::IsA; use glib::object::IsA;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
@ -40,7 +41,7 @@ impl RTSPAuth {
} }
} }
pub fn make_basic(user: &str, pass: &str) -> String { pub fn make_basic(user: &str, pass: &str) -> GString {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
from_glib_full(ffi::gst_rtsp_auth_make_basic(user.to_glib_none().0, pass.to_glib_none().0)) from_glib_full(ffi::gst_rtsp_auth_make_basic(user.to_glib_none().0, pass.to_glib_none().0))

View file

@ -10,6 +10,7 @@ use RTSPSuspendMode;
use RTSPTransportMode; use RTSPTransportMode;
use ffi; use ffi;
use glib; use glib;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::object::Downcast; use glib::object::Downcast;
@ -66,7 +67,7 @@ pub trait RTSPMediaExt: 'static {
fn get_latency(&self) -> u32; fn get_latency(&self) -> u32;
fn get_multicast_iface(&self) -> Option<String>; fn get_multicast_iface(&self) -> Option<GString>;
//fn get_permissions(&self) -> /*Ignored*/Option<RTSPPermissions>; //fn get_permissions(&self) -> /*Ignored*/Option<RTSPPermissions>;
@ -76,7 +77,7 @@ pub trait RTSPMediaExt: 'static {
fn get_publish_clock_mode(&self) -> RTSPPublishClockMode; fn get_publish_clock_mode(&self) -> RTSPPublishClockMode;
fn get_range_string(&self, play: bool, unit: gst_rtsp::RTSPRangeUnit) -> Option<String>; fn get_range_string(&self, play: bool, unit: gst_rtsp::RTSPRangeUnit) -> Option<GString>;
fn get_retransmission_time(&self) -> gst::ClockTime; fn get_retransmission_time(&self) -> gst::ClockTime;
@ -266,7 +267,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
} }
} }
fn get_multicast_iface(&self) -> Option<String> { fn get_multicast_iface(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_rtsp_media_get_multicast_iface(self.to_glib_none().0)) from_glib_full(ffi::gst_rtsp_media_get_multicast_iface(self.to_glib_none().0))
} }
@ -294,7 +295,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
} }
} }
fn get_range_string(&self, play: bool, unit: gst_rtsp::RTSPRangeUnit) -> Option<String> { fn get_range_string(&self, play: bool, unit: gst_rtsp::RTSPRangeUnit) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_rtsp_media_get_range_string(self.to_glib_none().0, play.to_glib(), unit.to_glib())) from_glib_full(ffi::gst_rtsp_media_get_range_string(self.to_glib_none().0, play.to_glib(), unit.to_glib()))
} }

View file

@ -9,6 +9,7 @@ use RTSPSuspendMode;
use RTSPTransportMode; use RTSPTransportMode;
use ffi; use ffi;
use glib; use glib;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::object::Downcast; use glib::object::Downcast;
@ -64,11 +65,11 @@ pub trait RTSPMediaFactoryExt: 'static {
fn get_latency(&self) -> u32; fn get_latency(&self) -> u32;
fn get_launch(&self) -> Option<String>; fn get_launch(&self) -> Option<GString>;
fn get_media_gtype(&self) -> glib::types::Type; fn get_media_gtype(&self) -> glib::types::Type;
fn get_multicast_iface(&self) -> Option<String>; fn get_multicast_iface(&self) -> Option<GString>;
//fn get_permissions(&self) -> /*Ignored*/Option<RTSPPermissions>; //fn get_permissions(&self) -> /*Ignored*/Option<RTSPPermissions>;
@ -198,7 +199,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
} }
} }
fn get_launch(&self) -> Option<String> { fn get_launch(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_rtsp_media_factory_get_launch(self.to_glib_none().0)) from_glib_full(ffi::gst_rtsp_media_factory_get_launch(self.to_glib_none().0))
} }
@ -210,7 +211,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
} }
} }
fn get_multicast_iface(&self) -> Option<String> { fn get_multicast_iface(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_rtsp_media_factory_get_multicast_iface(self.to_glib_none().0)) from_glib_full(ffi::gst_rtsp_media_factory_get_multicast_iface(self.to_glib_none().0))
} }

View file

@ -4,6 +4,7 @@
use RTSPMediaFactory; use RTSPMediaFactory;
use ffi; use ffi;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::object::Downcast; use glib::object::Downcast;
@ -43,7 +44,7 @@ unsafe impl Send for RTSPMediaFactoryURI {}
unsafe impl Sync for RTSPMediaFactoryURI {} unsafe impl Sync for RTSPMediaFactoryURI {}
pub trait RTSPMediaFactoryURIExt: 'static { pub trait RTSPMediaFactoryURIExt: 'static {
fn get_uri(&self) -> Option<String>; fn get_uri(&self) -> Option<GString>;
fn set_uri(&self, uri: &str); fn set_uri(&self, uri: &str);
@ -57,7 +58,7 @@ pub trait RTSPMediaFactoryURIExt: 'static {
} }
impl<O: IsA<RTSPMediaFactoryURI>> RTSPMediaFactoryURIExt for O { impl<O: IsA<RTSPMediaFactoryURI>> RTSPMediaFactoryURIExt for O {
fn get_uri(&self) -> Option<String> { fn get_uri(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_rtsp_media_factory_uri_get_uri(self.to_glib_none().0)) from_glib_full(ffi::gst_rtsp_media_factory_uri_get_uri(self.to_glib_none().0))
} }

View file

@ -4,6 +4,7 @@
use RTSPMediaFactory; use RTSPMediaFactory;
use ffi; use ffi;
use glib::GString;
use glib::object::IsA; use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
use gst_rtsp; use gst_rtsp;
@ -38,7 +39,7 @@ unsafe impl Sync for RTSPMountPoints {}
pub trait RTSPMountPointsExt: 'static { pub trait RTSPMountPointsExt: 'static {
fn add_factory<P: IsA<RTSPMediaFactory>>(&self, path: &str, factory: &P); fn add_factory<P: IsA<RTSPMediaFactory>>(&self, path: &str, factory: &P);
fn make_path(&self, url: &gst_rtsp::RTSPUrl) -> Option<String>; fn make_path(&self, url: &gst_rtsp::RTSPUrl) -> Option<GString>;
fn match_(&self, path: &str) -> (RTSPMediaFactory, i32); fn match_(&self, path: &str) -> (RTSPMediaFactory, i32);
@ -52,7 +53,7 @@ impl<O: IsA<RTSPMountPoints>> RTSPMountPointsExt for O {
} }
} }
fn make_path(&self, url: &gst_rtsp::RTSPUrl) -> Option<String> { fn make_path(&self, url: &gst_rtsp::RTSPUrl) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_rtsp_mount_points_make_path(self.to_glib_none().0, url.to_glib_none().0)) from_glib_full(ffi::gst_rtsp_mount_points_make_path(self.to_glib_none().0, url.to_glib_none().0))
} }

View file

@ -11,6 +11,7 @@ use RTSPThreadPool;
use ffi; use ffi;
use gio; use gio;
use glib; use glib;
use glib::GString;
use glib::object::Downcast; use glib::object::Downcast;
use glib::object::IsA; use glib::object::IsA;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
@ -61,7 +62,7 @@ pub trait RTSPServerExt: 'static {
fn create_source<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, cancellable: P) -> Result<glib::Source, Error>; fn create_source<'a, P: Into<Option<&'a gio::Cancellable>>>(&self, cancellable: P) -> Result<glib::Source, Error>;
fn get_address(&self) -> Option<String>; fn get_address(&self) -> Option<GString>;
fn get_auth(&self) -> Option<RTSPAuth>; fn get_auth(&self) -> Option<RTSPAuth>;
@ -71,7 +72,7 @@ pub trait RTSPServerExt: 'static {
fn get_mount_points(&self) -> Option<RTSPMountPoints>; fn get_mount_points(&self) -> Option<RTSPMountPoints>;
fn get_service(&self) -> Option<String>; fn get_service(&self) -> Option<GString>;
fn get_session_pool(&self) -> Option<RTSPSessionPool>; fn get_session_pool(&self) -> Option<RTSPSessionPool>;
@ -133,7 +134,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
} }
} }
fn get_address(&self) -> Option<String> { fn get_address(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_rtsp_server_get_address(self.to_glib_none().0)) from_glib_full(ffi::gst_rtsp_server_get_address(self.to_glib_none().0))
} }
@ -163,7 +164,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
} }
} }
fn get_service(&self) -> Option<String> { fn get_service(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_rtsp_server_get_service(self.to_glib_none().0)) from_glib_full(ffi::gst_rtsp_server_get_service(self.to_glib_none().0))
} }

View file

@ -5,6 +5,7 @@
use RTSPMedia; use RTSPMedia;
use RTSPSessionMedia; use RTSPSessionMedia;
use ffi; use ffi;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::object::Downcast; use glib::object::Downcast;
@ -43,11 +44,11 @@ pub trait RTSPSessionExt: 'static {
//fn filter<'a, P: Into<Option<&'a /*Unimplemented*/RTSPSessionFilterFunc>>, Q: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, func: P, user_data: Q) -> Vec<RTSPSessionMedia>; //fn filter<'a, P: Into<Option<&'a /*Unimplemented*/RTSPSessionFilterFunc>>, Q: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, func: P, user_data: Q) -> Vec<RTSPSessionMedia>;
fn get_header(&self) -> Option<String>; fn get_header(&self) -> Option<GString>;
fn get_media(&self, path: &str) -> (Option<RTSPSessionMedia>, i32); fn get_media(&self, path: &str) -> (Option<RTSPSessionMedia>, i32);
fn get_sessionid(&self) -> Option<String>; fn get_sessionid(&self) -> Option<GString>;
fn get_timeout(&self) -> u32; fn get_timeout(&self) -> u32;
@ -89,7 +90,7 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
// unsafe { TODO: call ffi::gst_rtsp_session_filter() } // unsafe { TODO: call ffi::gst_rtsp_session_filter() }
//} //}
fn get_header(&self) -> Option<String> { fn get_header(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_rtsp_session_get_header(self.to_glib_none().0)) from_glib_full(ffi::gst_rtsp_session_get_header(self.to_glib_none().0))
} }
@ -103,7 +104,7 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
} }
} }
fn get_sessionid(&self) -> Option<String> { fn get_sessionid(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_rtsp_session_get_sessionid(self.to_glib_none().0)) from_glib_none(ffi::gst_rtsp_session_get_sessionid(self.to_glib_none().0))
} }

View file

@ -6,6 +6,7 @@ use RTSPMedia;
use RTSPStreamTransport; use RTSPStreamTransport;
use ffi; use ffi;
use glib; use glib;
use glib::GString;
use glib::object::IsA; use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
use gst; use gst;
@ -38,7 +39,7 @@ pub trait RTSPSessionMediaExt: 'static {
fn get_media(&self) -> Option<RTSPMedia>; fn get_media(&self) -> Option<RTSPMedia>;
fn get_rtpinfo(&self) -> Option<String>; fn get_rtpinfo(&self) -> Option<GString>;
//fn get_rtsp_state(&self) -> /*Ignored*/gst_rtsp::RTSPState; //fn get_rtsp_state(&self) -> /*Ignored*/gst_rtsp::RTSPState;
@ -72,7 +73,7 @@ impl<O: IsA<RTSPSessionMedia>> RTSPSessionMediaExt for O {
} }
} }
fn get_rtpinfo(&self) -> Option<String> { fn get_rtpinfo(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_rtsp_session_media_get_rtpinfo(self.to_glib_none().0)) from_glib_full(ffi::gst_rtsp_session_media_get_rtpinfo(self.to_glib_none().0))
} }

View file

@ -9,6 +9,7 @@ use RTSPStreamTransport;
use ffi; use ffi;
use gio; use gio;
use glib; use glib;
use glib::GString;
use glib::object::Downcast; use glib::object::Downcast;
use glib::object::IsA; use glib::object::IsA;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
@ -55,7 +56,7 @@ pub trait RTSPStreamExt: 'static {
fn get_caps(&self) -> Option<gst::Caps>; fn get_caps(&self) -> Option<gst::Caps>;
fn get_control(&self) -> Option<String>; fn get_control(&self) -> Option<GString>;
fn get_current_seqnum(&self) -> u16; fn get_current_seqnum(&self) -> u16;
@ -69,7 +70,7 @@ pub trait RTSPStreamExt: 'static {
fn get_multicast_address(&self, family: gio::SocketFamily) -> Option<RTSPAddress>; fn get_multicast_address(&self, family: gio::SocketFamily) -> Option<RTSPAddress>;
fn get_multicast_iface(&self) -> Option<String>; fn get_multicast_iface(&self) -> Option<GString>;
fn get_profiles(&self) -> gst_rtsp::RTSPProfile; fn get_profiles(&self) -> gst_rtsp::RTSPProfile;
@ -215,7 +216,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
} }
} }
fn get_control(&self) -> Option<String> { fn get_control(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_rtsp_stream_get_control(self.to_glib_none().0)) from_glib_full(ffi::gst_rtsp_stream_get_control(self.to_glib_none().0))
} }
@ -257,7 +258,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
} }
} }
fn get_multicast_iface(&self) -> Option<String> { fn get_multicast_iface(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_rtsp_stream_get_multicast_iface(self.to_glib_none().0)) from_glib_full(ffi::gst_rtsp_stream_get_multicast_iface(self.to_glib_none().0))
} }

View file

@ -5,6 +5,7 @@
use RTSPStream; use RTSPStream;
use ffi; use ffi;
use glib; use glib;
use glib::GString;
use glib::object::IsA; use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
use gst; use gst;
@ -25,7 +26,7 @@ impl RTSPStreamTransport {
} }
pub trait RTSPStreamTransportExt: 'static { pub trait RTSPStreamTransportExt: 'static {
fn get_rtpinfo(&self, start_time: gst::ClockTime) -> Option<String>; fn get_rtpinfo(&self, start_time: gst::ClockTime) -> Option<GString>;
fn get_stream(&self) -> Option<RTSPStream>; fn get_stream(&self) -> Option<RTSPStream>;
@ -57,7 +58,7 @@ pub trait RTSPStreamTransportExt: 'static {
} }
impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O { impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
fn get_rtpinfo(&self, start_time: gst::ClockTime) -> Option<String> { fn get_rtpinfo(&self, start_time: gst::ClockTime) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_rtsp_stream_transport_get_rtpinfo(self.to_glib_none().0, start_time.to_glib())) from_glib_full(ffi::gst_rtsp_stream_transport_get_rtpinfo(self.to_glib_none().0, start_time.to_glib()))
} }

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 811e711) Generated by gir (https://github.com/gtk-rs/gir @ c5498ac)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -4,6 +4,7 @@
use RTSPResult; use RTSPResult;
use ffi; use ffi;
use glib::GString;
use glib::translate::*; use glib::translate::*;
use std::ptr; use std::ptr;
@ -19,13 +20,13 @@ glib_wrapper! {
} }
impl RTSPUrl { impl RTSPUrl {
pub fn decode_path_components(&self) -> Vec<String> { pub fn decode_path_components(&self) -> Vec<GString> {
unsafe { unsafe {
FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_url_decode_path_components(self.to_glib_none().0)) FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_url_decode_path_components(self.to_glib_none().0))
} }
} }
pub fn get_request_uri(&self) -> Option<String> { pub fn get_request_uri(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_rtsp_url_get_request_uri(self.to_glib_none().0)) from_glib_full(ffi::gst_rtsp_url_get_request_uri(self.to_glib_none().0))
} }

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 811e711) Generated by gir (https://github.com/gtk-rs/gir @ c5498ac)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 811e711) Generated by gir (https://github.com/gtk-rs/gir @ c5498ac)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 811e711) Generated by gir (https://github.com/gtk-rs/gir @ c5498ac)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 811e711) Generated by gir (https://github.com/gtk-rs/gir @ c5498ac)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -5,6 +5,7 @@
use WebRTCDTLSTransportState; use WebRTCDTLSTransportState;
use WebRTCICETransport; use WebRTCICETransport;
use ffi; use ffi;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
@ -37,9 +38,9 @@ impl WebRTCDTLSTransport {
} }
} }
pub fn get_property_certificate(&self) -> Option<String> { pub fn get_property_certificate(&self) -> Option<GString> {
unsafe { unsafe {
let mut value = Value::from_type(<String as StaticType>::static_type()); let mut value = Value::from_type(<GString as StaticType>::static_type());
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"certificate\0".as_ptr() as *const _, value.to_glib_none_mut().0); gobject_ffi::g_object_get_property(self.to_glib_none().0, b"certificate\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get() value.get()
} }
@ -66,9 +67,9 @@ impl WebRTCDTLSTransport {
} }
} }
pub fn get_property_remote_certificate(&self) -> Option<String> { pub fn get_property_remote_certificate(&self) -> Option<GString> {
unsafe { unsafe {
let mut value = Value::from_type(<String as StaticType>::static_type()); let mut value = Value::from_type(<GString as StaticType>::static_type());
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"remote-certificate\0".as_ptr() as *const _, value.to_glib_none_mut().0); gobject_ffi::g_object_get_property(self.to_glib_none().0, b"remote-certificate\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get() value.get()
} }

View file

@ -6,6 +6,7 @@ use WebRTCICEComponent;
use WebRTCICEConnectionState; use WebRTCICEConnectionState;
use WebRTCICEGatheringState; use WebRTCICEGatheringState;
use ffi; use ffi;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
@ -112,7 +113,7 @@ unsafe impl Sync for WebRTCICETransport {}
unsafe extern "C" fn on_new_candidate_trampoline(this: *mut ffi::GstWebRTCICETransport, object: *mut libc::c_char, f: glib_ffi::gpointer) { unsafe extern "C" fn on_new_candidate_trampoline(this: *mut ffi::GstWebRTCICETransport, object: *mut libc::c_char, f: glib_ffi::gpointer) {
let f: &&(Fn(&WebRTCICETransport, &str) + Send + Sync + 'static) = transmute(f); let f: &&(Fn(&WebRTCICETransport, &str) + Send + Sync + 'static) = transmute(f);
f(&from_glib_borrow(this), &String::from_glib_none(object)) f(&from_glib_borrow(this), &GString::from_glib_borrow(object))
} }
unsafe extern "C" fn on_selected_candidate_pair_change_trampoline(this: *mut ffi::GstWebRTCICETransport, f: glib_ffi::gpointer) { unsafe extern "C" fn on_selected_candidate_pair_change_trampoline(this: *mut ffi::GstWebRTCICETransport, f: glib_ffi::gpointer) {

View file

@ -5,6 +5,7 @@
use Object; use Object;
use ffi; use ffi;
use glib; use glib;
use glib::GString;
use glib::object::IsA; use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
@ -20,7 +21,7 @@ unsafe impl Send for BufferPool {}
unsafe impl Sync for BufferPool {} unsafe impl Sync for BufferPool {}
pub trait BufferPoolExt: 'static { pub trait BufferPoolExt: 'static {
fn get_options(&self) -> Vec<String>; fn get_options(&self) -> Vec<GString>;
fn has_option(&self, option: &str) -> bool; fn has_option(&self, option: &str) -> bool;
@ -32,7 +33,7 @@ pub trait BufferPoolExt: 'static {
} }
impl<O: IsA<BufferPool>> BufferPoolExt for O { impl<O: IsA<BufferPool>> BufferPoolExt for O {
fn get_options(&self) -> Vec<String> { fn get_options(&self) -> Vec<GString> {
unsafe { unsafe {
FromGlibPtrContainer::from_glib_none(ffi::gst_buffer_pool_get_options(self.to_glib_none().0)) FromGlibPtrContainer::from_glib_none(ffi::gst_buffer_pool_get_options(self.to_glib_none().0))
} }

View file

@ -4,6 +4,7 @@
use ffi; use ffi;
use glib; use glib;
use glib::GString;
use glib::object::Downcast; use glib::object::Downcast;
use glib::object::IsA; use glib::object::IsA;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
@ -135,11 +136,11 @@ impl<O: IsA<ChildProxy>> ChildProxyExt for O {
unsafe extern "C" fn child_added_trampoline<P>(this: *mut ffi::GstChildProxy, object: *mut gobject_ffi::GObject, name: *mut libc::c_char, f: glib_ffi::gpointer) unsafe extern "C" fn child_added_trampoline<P>(this: *mut ffi::GstChildProxy, object: *mut gobject_ffi::GObject, name: *mut libc::c_char, f: glib_ffi::gpointer)
where P: IsA<ChildProxy> { where P: IsA<ChildProxy> {
let f: &&(Fn(&P, &glib::Object, &str) + Send + Sync + 'static) = transmute(f); let f: &&(Fn(&P, &glib::Object, &str) + Send + Sync + 'static) = transmute(f);
f(&ChildProxy::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(object), &String::from_glib_none(name)) f(&ChildProxy::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(object), &GString::from_glib_borrow(name))
} }
unsafe extern "C" fn child_removed_trampoline<P>(this: *mut ffi::GstChildProxy, object: *mut gobject_ffi::GObject, name: *mut libc::c_char, f: glib_ffi::gpointer) unsafe extern "C" fn child_removed_trampoline<P>(this: *mut ffi::GstChildProxy, object: *mut gobject_ffi::GObject, name: *mut libc::c_char, f: glib_ffi::gpointer)
where P: IsA<ChildProxy> { where P: IsA<ChildProxy> {
let f: &&(Fn(&P, &glib::Object, &str) + Send + Sync + 'static) = transmute(f); let f: &&(Fn(&P, &glib::Object, &str) + Send + Sync + 'static) = transmute(f);
f(&ChildProxy::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(object), &String::from_glib_none(name)) f(&ChildProxy::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(object), &GString::from_glib_borrow(name))
} }

View file

@ -4,6 +4,7 @@
use ffi; use ffi;
use glib; use glib;
use glib::GString;
use glib::translate::*; use glib::translate::*;
glib_wrapper! { glib_wrapper! {
@ -179,7 +180,7 @@ impl DateTime {
} }
} }
pub fn to_iso8601_string(&self) -> Option<String> { pub fn to_iso8601_string(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_date_time_to_iso8601_string(self.to_glib_none().0)) from_glib_full(ffi::gst_date_time_to_iso8601_string(self.to_glib_none().0))
} }

View file

@ -7,6 +7,7 @@ use Element;
use Object; use Object;
use Structure; use Structure;
use ffi; use ffi;
use glib::GString;
use glib::object::Downcast; use glib::object::Downcast;
use glib::object::IsA; use glib::object::IsA;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
@ -32,9 +33,9 @@ pub trait DeviceExt: 'static {
fn get_caps(&self) -> Option<Caps>; fn get_caps(&self) -> Option<Caps>;
fn get_device_class(&self) -> String; fn get_device_class(&self) -> GString;
fn get_display_name(&self) -> String; fn get_display_name(&self) -> GString;
fn get_properties(&self) -> Option<Structure>; fn get_properties(&self) -> Option<Structure>;
@ -62,13 +63,13 @@ impl<O: IsA<Device>> DeviceExt for O {
} }
} }
fn get_device_class(&self) -> String { fn get_device_class(&self) -> GString {
unsafe { unsafe {
from_glib_full(ffi::gst_device_get_device_class(self.to_glib_none().0)) from_glib_full(ffi::gst_device_get_device_class(self.to_glib_none().0))
} }
} }
fn get_display_name(&self) -> String { fn get_display_name(&self) -> GString {
unsafe { unsafe {
from_glib_full(ffi::gst_device_get_display_name(self.to_glib_none().0)) from_glib_full(ffi::gst_device_get_display_name(self.to_glib_none().0))
} }

View file

@ -8,6 +8,7 @@ use Device;
use Object; use Object;
use ffi; use ffi;
use glib; use glib;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::object::Downcast; use glib::object::Downcast;
@ -38,7 +39,7 @@ pub trait DeviceMonitorExt: 'static {
fn get_devices(&self) -> Vec<Device>; fn get_devices(&self) -> Vec<Device>;
fn get_providers(&self) -> Vec<String>; fn get_providers(&self) -> Vec<GString>;
fn get_show_all_devices(&self) -> bool; fn get_show_all_devices(&self) -> bool;
@ -80,7 +81,7 @@ impl<O: IsA<DeviceMonitor>> DeviceMonitorExt for O {
} }
} }
fn get_providers(&self) -> Vec<String> { fn get_providers(&self) -> Vec<GString> {
unsafe { unsafe {
FromGlibPtrContainer::from_glib_full(ffi::gst_device_monitor_get_providers(self.to_glib_none().0)) FromGlibPtrContainer::from_glib_full(ffi::gst_device_monitor_get_providers(self.to_glib_none().0))
} }

View file

@ -9,6 +9,7 @@ use Object;
use Plugin; use Plugin;
use ffi; use ffi;
use glib; use glib;
use glib::GString;
use glib::object::Downcast; use glib::object::Downcast;
use glib::object::IsA; use glib::object::IsA;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
@ -54,7 +55,7 @@ pub trait DeviceProviderExt: 'static {
fn get_factory(&self) -> Option<DeviceProviderFactory>; fn get_factory(&self) -> Option<DeviceProviderFactory>;
fn get_hidden_providers(&self) -> Vec<String>; fn get_hidden_providers(&self) -> Vec<GString>;
fn hide_provider(&self, name: &str); fn hide_provider(&self, name: &str);
@ -106,7 +107,7 @@ impl<O: IsA<DeviceProvider>> DeviceProviderExt for O {
} }
} }
fn get_hidden_providers(&self) -> Vec<String> { fn get_hidden_providers(&self) -> Vec<GString> {
unsafe { unsafe {
FromGlibPtrContainer::from_glib_full(ffi::gst_device_provider_get_hidden_providers(self.to_glib_none().0)) FromGlibPtrContainer::from_glib_full(ffi::gst_device_provider_get_hidden_providers(self.to_glib_none().0))
} }
@ -156,11 +157,11 @@ impl<O: IsA<DeviceProvider>> DeviceProviderExt for O {
unsafe extern "C" fn provider_hidden_trampoline<P>(this: *mut ffi::GstDeviceProvider, object: *mut libc::c_char, f: glib_ffi::gpointer) unsafe extern "C" fn provider_hidden_trampoline<P>(this: *mut ffi::GstDeviceProvider, object: *mut libc::c_char, f: glib_ffi::gpointer)
where P: IsA<DeviceProvider> { where P: IsA<DeviceProvider> {
let f: &&(Fn(&P, &str) + Send + Sync + 'static) = transmute(f); let f: &&(Fn(&P, &str) + Send + Sync + 'static) = transmute(f);
f(&DeviceProvider::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(object)) f(&DeviceProvider::from_glib_borrow(this).downcast_unchecked(), &GString::from_glib_borrow(object))
} }
unsafe extern "C" fn provider_unhidden_trampoline<P>(this: *mut ffi::GstDeviceProvider, object: *mut libc::c_char, f: glib_ffi::gpointer) unsafe extern "C" fn provider_unhidden_trampoline<P>(this: *mut ffi::GstDeviceProvider, object: *mut libc::c_char, f: glib_ffi::gpointer)
where P: IsA<DeviceProvider> { where P: IsA<DeviceProvider> {
let f: &&(Fn(&P, &str) + Send + Sync + 'static) = transmute(f); let f: &&(Fn(&P, &str) + Send + Sync + 'static) = transmute(f);
f(&DeviceProvider::from_glib_borrow(this).downcast_unchecked(), &String::from_glib_none(object)) f(&DeviceProvider::from_glib_borrow(this).downcast_unchecked(), &GString::from_glib_borrow(object))
} }

View file

@ -8,6 +8,7 @@ use PluginFeature;
use Rank; use Rank;
use ffi; use ffi;
use glib; use glib;
use glib::GString;
use glib::translate::*; use glib::translate::*;
glib_wrapper! { glib_wrapper! {
@ -31,13 +32,13 @@ impl DeviceProviderFactory {
} }
} }
pub fn get_metadata(&self, key: &str) -> Option<String> { pub fn get_metadata(&self, key: &str) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_device_provider_factory_get_metadata(self.to_glib_none().0, key.to_glib_none().0)) from_glib_none(ffi::gst_device_provider_factory_get_metadata(self.to_glib_none().0, key.to_glib_none().0))
} }
} }
pub fn get_metadata_keys(&self) -> Vec<String> { pub fn get_metadata_keys(&self) -> Vec<GString> {
unsafe { unsafe {
FromGlibPtrContainer::from_glib_full(ffi::gst_device_provider_factory_get_metadata_keys(self.to_glib_none().0)) FromGlibPtrContainer::from_glib_full(ffi::gst_device_provider_factory_get_metadata_keys(self.to_glib_none().0))
} }

View file

@ -13,6 +13,7 @@ use StaticPadTemplate;
use URIType; use URIType;
use ffi; use ffi;
use glib; use glib;
use glib::GString;
use glib::translate::*; use glib::translate::*;
glib_wrapper! { glib_wrapper! {
@ -62,13 +63,13 @@ impl ElementFactory {
} }
} }
pub fn get_metadata(&self, key: &str) -> Option<String> { pub fn get_metadata(&self, key: &str) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_element_factory_get_metadata(self.to_glib_none().0, key.to_glib_none().0)) from_glib_none(ffi::gst_element_factory_get_metadata(self.to_glib_none().0, key.to_glib_none().0))
} }
} }
pub fn get_metadata_keys(&self) -> Vec<String> { pub fn get_metadata_keys(&self) -> Vec<GString> {
unsafe { unsafe {
FromGlibPtrContainer::from_glib_full(ffi::gst_element_factory_get_metadata_keys(self.to_glib_none().0)) FromGlibPtrContainer::from_glib_full(ffi::gst_element_factory_get_metadata_keys(self.to_glib_none().0))
} }
@ -86,7 +87,7 @@ impl ElementFactory {
} }
} }
pub fn get_uri_protocols(&self) -> Vec<String> { pub fn get_uri_protocols(&self) -> Vec<GString> {
unsafe { unsafe {
FromGlibPtrContainer::from_glib_none(ffi::gst_element_factory_get_uri_protocols(self.to_glib_none().0)) FromGlibPtrContainer::from_glib_none(ffi::gst_element_factory_get_uri_protocols(self.to_glib_none().0))
} }

View file

@ -11,6 +11,7 @@ use Error;
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
use StackTraceFlags; use StackTraceFlags;
use ffi; use ffi;
use glib::GString;
use glib::object::IsA; use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
use std; use std;
@ -26,7 +27,7 @@ pub fn debug_add_ring_buffer_logger(max_size_per_thread: u32, thread_timeout: u3
} }
} }
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) -> GString {
skip_assert_initialized!(); skip_assert_initialized!();
unsafe { unsafe {
from_glib_full(ffi::gst_debug_bin_to_dot_data(bin.to_glib_none().0, details.to_glib())) from_glib_full(ffi::gst_debug_bin_to_dot_data(bin.to_glib_none().0, details.to_glib()))
@ -55,7 +56,7 @@ pub fn debug_get_default_threshold() -> DebugLevel {
} }
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
pub fn debug_get_stack_trace(flags: StackTraceFlags) -> Option<String> { pub fn debug_get_stack_trace(flags: StackTraceFlags) -> Option<GString> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
from_glib_full(ffi::gst_debug_get_stack_trace(flags.to_glib())) from_glib_full(ffi::gst_debug_get_stack_trace(flags.to_glib()))
@ -92,7 +93,7 @@ pub fn debug_remove_ring_buffer_logger() {
} }
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
pub fn debug_ring_buffer_logger_get_logs() -> Vec<String> { pub fn debug_ring_buffer_logger_get_logs() -> Vec<GString> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
FromGlibPtrContainer::from_glib_full(ffi::gst_debug_ring_buffer_logger_get_logs()) FromGlibPtrContainer::from_glib_full(ffi::gst_debug_ring_buffer_logger_get_logs())
@ -142,7 +143,7 @@ pub fn debug_unset_threshold_for_name(name: &str) {
} }
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
pub fn get_main_executable_path() -> Option<String> { pub fn get_main_executable_path() -> Option<GString> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
from_glib_none(ffi::gst_get_main_executable_path()) from_glib_none(ffi::gst_get_main_executable_path())
@ -202,7 +203,7 @@ pub fn version() -> (u32, u32, u32, u32) {
} }
} }
pub fn version_string() -> String { pub fn version_string() -> GString {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
from_glib_full(ffi::gst_version_string()) from_glib_full(ffi::gst_version_string())

View file

@ -6,6 +6,7 @@ use ClockTime;
use Error; use Error;
use ffi; use ffi;
use glib; use glib;
use glib::GString;
use glib::object::Downcast; use glib::object::Downcast;
use glib::object::IsA; use glib::object::IsA;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
@ -58,11 +59,11 @@ pub trait GstObjectExt: 'static {
//fn get_g_value_array(&self, property_name: &str, timestamp: ClockTime, interval: ClockTime, values: /*Ignored*/&[&glib::Value]) -> bool; //fn get_g_value_array(&self, property_name: &str, timestamp: ClockTime, interval: ClockTime, values: /*Ignored*/&[&glib::Value]) -> bool;
fn get_name(&self) -> String; fn get_name(&self) -> GString;
fn get_parent(&self) -> Option<Object>; fn get_parent(&self) -> Option<Object>;
fn get_path_string(&self) -> String; fn get_path_string(&self) -> GString;
//fn get_value(&self, property_name: &str, timestamp: ClockTime) -> /*Ignored*/Option<glib::Value>; //fn get_value(&self, property_name: &str, timestamp: ClockTime) -> /*Ignored*/Option<glib::Value>;
@ -128,7 +129,7 @@ impl<O: IsA<Object>> GstObjectExt for O {
// unsafe { TODO: call ffi::gst_object_get_g_value_array() } // unsafe { TODO: call ffi::gst_object_get_g_value_array() }
//} //}
fn get_name(&self) -> String { fn get_name(&self) -> GString {
unsafe { unsafe {
from_glib_full(ffi::gst_object_get_name(self.to_glib_none().0)) from_glib_full(ffi::gst_object_get_name(self.to_glib_none().0))
} }
@ -140,7 +141,7 @@ impl<O: IsA<Object>> GstObjectExt for O {
} }
} }
fn get_path_string(&self) -> String { fn get_path_string(&self) -> GString {
unsafe { unsafe {
from_glib_full(ffi::gst_object_get_path_string(self.to_glib_none().0)) from_glib_full(ffi::gst_object_get_path_string(self.to_glib_none().0))
} }

View file

@ -20,6 +20,7 @@ use Stream;
use TaskState; use TaskState;
use ffi; use ffi;
use glib; use glib;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::object::Downcast; use glib::object::Downcast;
@ -72,11 +73,11 @@ pub trait PadExt: 'static {
fn check_reconfigure(&self) -> bool; fn check_reconfigure(&self) -> bool;
fn create_stream_id<'a, P: IsA<Element>, Q: Into<Option<&'a str>>>(&self, parent: &P, stream_id: Q) -> Option<String>; fn create_stream_id<'a, P: IsA<Element>, Q: Into<Option<&'a str>>>(&self, parent: &P, stream_id: Q) -> Option<GString>;
//fn create_stream_id_printf<'a, P: IsA<Element>, Q: Into<Option<&'a str>>>(&self, parent: &P, stream_id: Q, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> Option<String>; //fn create_stream_id_printf<'a, P: IsA<Element>, Q: Into<Option<&'a str>>>(&self, parent: &P, stream_id: Q, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> Option<GString>;
//fn create_stream_id_printf_valist<'a, P: IsA<Element>, Q: Into<Option<&'a str>>>(&self, parent: &P, stream_id: Q, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> Option<String>; //fn create_stream_id_printf_valist<'a, P: IsA<Element>, Q: Into<Option<&'a str>>>(&self, parent: &P, stream_id: Q, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> Option<GString>;
//fn forward<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, forward: /*Unknown conversion*//*Unimplemented*/PadForwardFunction, user_data: P) -> bool; //fn forward<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, forward: /*Unknown conversion*//*Unimplemented*/PadForwardFunction, user_data: P) -> bool;
@ -105,7 +106,7 @@ pub trait PadExt: 'static {
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
fn get_stream(&self) -> Option<Stream>; fn get_stream(&self) -> Option<Stream>;
fn get_stream_id(&self) -> Option<String>; fn get_stream_id(&self) -> Option<GString>;
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
fn get_task_state(&self) -> TaskState; fn get_task_state(&self) -> TaskState;
@ -228,7 +229,7 @@ impl<O: IsA<Pad>> PadExt for O {
} }
} }
fn create_stream_id<'a, P: IsA<Element>, Q: Into<Option<&'a str>>>(&self, parent: &P, stream_id: Q) -> Option<String> { fn create_stream_id<'a, P: IsA<Element>, Q: Into<Option<&'a str>>>(&self, parent: &P, stream_id: Q) -> Option<GString> {
let stream_id = stream_id.into(); let stream_id = stream_id.into();
let stream_id = stream_id.to_glib_none(); let stream_id = stream_id.to_glib_none();
unsafe { unsafe {
@ -236,11 +237,11 @@ impl<O: IsA<Pad>> PadExt for O {
} }
} }
//fn create_stream_id_printf<'a, P: IsA<Element>, Q: Into<Option<&'a str>>>(&self, parent: &P, stream_id: Q, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> Option<String> { //fn create_stream_id_printf<'a, P: IsA<Element>, Q: Into<Option<&'a str>>>(&self, parent: &P, stream_id: Q, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> Option<GString> {
// unsafe { TODO: call ffi::gst_pad_create_stream_id_printf() } // unsafe { TODO: call ffi::gst_pad_create_stream_id_printf() }
//} //}
//fn create_stream_id_printf_valist<'a, P: IsA<Element>, Q: Into<Option<&'a str>>>(&self, parent: &P, stream_id: Q, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> Option<String> { //fn create_stream_id_printf_valist<'a, P: IsA<Element>, Q: Into<Option<&'a str>>>(&self, parent: &P, stream_id: Q, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> Option<GString> {
// unsafe { TODO: call ffi::gst_pad_create_stream_id_printf_valist() } // unsafe { TODO: call ffi::gst_pad_create_stream_id_printf_valist() }
//} //}
@ -319,7 +320,7 @@ impl<O: IsA<Pad>> PadExt for O {
} }
} }
fn get_stream_id(&self) -> Option<String> { fn get_stream_id(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_pad_get_stream_id(self.to_glib_none().0)) from_glib_full(ffi::gst_pad_get_stream_id(self.to_glib_none().0))
} }

View file

@ -10,6 +10,7 @@ use PadPresence;
use ffi; use ffi;
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
use glib; use glib;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::object::IsA; use glib::object::IsA;
@ -74,9 +75,9 @@ impl PadTemplate {
} }
} }
pub fn get_property_name_template(&self) -> Option<String> { pub fn get_property_name_template(&self) -> Option<GString> {
unsafe { unsafe {
let mut value = Value::from_type(<String as StaticType>::static_type()); let mut value = Value::from_type(<GString as StaticType>::static_type());
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"name-template\0".as_ptr() as *const _, value.to_glib_none_mut().0); gobject_ffi::g_object_get_property(self.to_glib_none().0, b"name-template\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get() value.get()
} }

View file

@ -6,6 +6,7 @@ use Error;
use Object; use Object;
use PluginDependencyFlags; use PluginDependencyFlags;
use ffi; use ffi;
use glib::GString;
use glib::translate::*; use glib::translate::*;
use std; use std;
use std::ptr; use std::ptr;
@ -37,7 +38,7 @@ impl Plugin {
} }
} }
pub fn get_description(&self) -> String { pub fn get_description(&self) -> GString {
unsafe { unsafe {
from_glib_none(ffi::gst_plugin_get_description(self.to_glib_none().0)) from_glib_none(ffi::gst_plugin_get_description(self.to_glib_none().0))
} }
@ -49,37 +50,37 @@ impl Plugin {
} }
} }
pub fn get_license(&self) -> String { pub fn get_license(&self) -> GString {
unsafe { unsafe {
from_glib_none(ffi::gst_plugin_get_license(self.to_glib_none().0)) from_glib_none(ffi::gst_plugin_get_license(self.to_glib_none().0))
} }
} }
pub fn get_origin(&self) -> String { pub fn get_origin(&self) -> GString {
unsafe { unsafe {
from_glib_none(ffi::gst_plugin_get_origin(self.to_glib_none().0)) from_glib_none(ffi::gst_plugin_get_origin(self.to_glib_none().0))
} }
} }
pub fn get_package(&self) -> String { pub fn get_package(&self) -> GString {
unsafe { unsafe {
from_glib_none(ffi::gst_plugin_get_package(self.to_glib_none().0)) from_glib_none(ffi::gst_plugin_get_package(self.to_glib_none().0))
} }
} }
pub fn get_release_date_string(&self) -> Option<String> { pub fn get_release_date_string(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_plugin_get_release_date_string(self.to_glib_none().0)) from_glib_none(ffi::gst_plugin_get_release_date_string(self.to_glib_none().0))
} }
} }
pub fn get_source(&self) -> String { pub fn get_source(&self) -> GString {
unsafe { unsafe {
from_glib_none(ffi::gst_plugin_get_source(self.to_glib_none().0)) from_glib_none(ffi::gst_plugin_get_source(self.to_glib_none().0))
} }
} }
pub fn get_version(&self) -> String { pub fn get_version(&self) -> GString {
unsafe { unsafe {
from_glib_none(ffi::gst_plugin_get_version(self.to_glib_none().0)) from_glib_none(ffi::gst_plugin_get_version(self.to_glib_none().0))
} }

View file

@ -5,6 +5,7 @@
use Object; use Object;
use Plugin; use Plugin;
use ffi; use ffi;
use glib::GString;
use glib::object::IsA; use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
@ -24,7 +25,7 @@ pub trait PluginFeatureExt: 'static {
fn get_plugin(&self) -> Option<Plugin>; fn get_plugin(&self) -> Option<Plugin>;
fn get_plugin_name(&self) -> Option<String>; fn get_plugin_name(&self) -> Option<GString>;
fn get_rank(&self) -> u32; fn get_rank(&self) -> u32;
@ -46,7 +47,7 @@ impl<O: IsA<PluginFeature>> PluginFeatureExt for O {
} }
} }
fn get_plugin_name(&self) -> Option<String> { fn get_plugin_name(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_plugin_feature_get_plugin_name(self.to_glib_none().0)) from_glib_none(ffi::gst_plugin_feature_get_plugin_name(self.to_glib_none().0))
} }

View file

@ -4,6 +4,7 @@
use ffi; use ffi;
use glib; use glib;
use glib::GString;
use glib::object::IsA; use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
use std; use std;
@ -39,11 +40,11 @@ unsafe impl Sync for Preset {}
pub trait PresetExt: 'static { pub trait PresetExt: 'static {
fn delete_preset(&self, name: &str) -> Result<(), glib::error::BoolError>; fn delete_preset(&self, name: &str) -> Result<(), glib::error::BoolError>;
fn get_meta(&self, name: &str, tag: &str) -> Option<String>; fn get_meta(&self, name: &str, tag: &str) -> Option<GString>;
fn get_preset_names(&self) -> Vec<String>; fn get_preset_names(&self) -> Vec<GString>;
fn get_property_names(&self) -> Vec<String>; fn get_property_names(&self) -> Vec<GString>;
fn is_editable(&self) -> bool; fn is_editable(&self) -> bool;
@ -63,7 +64,7 @@ impl<O: IsA<Preset>> PresetExt for O {
} }
} }
fn get_meta(&self, name: &str, tag: &str) -> Option<String> { fn get_meta(&self, name: &str, tag: &str) -> Option<GString> {
unsafe { unsafe {
let mut value = ptr::null_mut(); let mut value = ptr::null_mut();
let ret = from_glib(ffi::gst_preset_get_meta(self.to_glib_none().0, name.to_glib_none().0, tag.to_glib_none().0, &mut value)); let ret = from_glib(ffi::gst_preset_get_meta(self.to_glib_none().0, name.to_glib_none().0, tag.to_glib_none().0, &mut value));
@ -71,13 +72,13 @@ impl<O: IsA<Preset>> PresetExt for O {
} }
} }
fn get_preset_names(&self) -> Vec<String> { fn get_preset_names(&self) -> Vec<GString> {
unsafe { unsafe {
FromGlibPtrContainer::from_glib_full(ffi::gst_preset_get_preset_names(self.to_glib_none().0)) FromGlibPtrContainer::from_glib_full(ffi::gst_preset_get_preset_names(self.to_glib_none().0))
} }
} }
fn get_property_names(&self) -> Vec<String> { fn get_property_names(&self) -> Vec<GString> {
unsafe { unsafe {
FromGlibPtrContainer::from_glib_full(ffi::gst_preset_get_property_names(self.to_glib_none().0)) FromGlibPtrContainer::from_glib_full(ffi::gst_preset_get_property_names(self.to_glib_none().0))
} }

View file

@ -8,6 +8,7 @@ use StreamFlags;
use StreamType; use StreamType;
use TagList; use TagList;
use ffi; use ffi;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
@ -42,7 +43,7 @@ impl Stream {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
pub fn get_stream_id(&self) -> Option<String> { pub fn get_stream_id(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_stream_get_stream_id(self.to_glib_none().0)) from_glib_none(ffi::gst_stream_get_stream_id(self.to_glib_none().0))
} }
@ -122,9 +123,9 @@ impl Stream {
} }
} }
pub fn get_property_stream_id(&self) -> Option<String> { pub fn get_property_stream_id(&self) -> Option<GString> {
unsafe { unsafe {
let mut value = Value::from_type(<String as StaticType>::static_type()); let mut value = Value::from_type(<GString as StaticType>::static_type());
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"stream-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); gobject_ffi::g_object_get_property(self.to_glib_none().0, b"stream-id\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get() value.get()
} }

View file

@ -6,6 +6,7 @@ use Object;
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
use Stream; use Stream;
use ffi; use ffi;
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
@ -47,15 +48,15 @@ impl StreamCollection {
} }
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
pub fn get_upstream_id(&self) -> Option<String> { pub fn get_upstream_id(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_none(ffi::gst_stream_collection_get_upstream_id(self.to_glib_none().0)) from_glib_none(ffi::gst_stream_collection_get_upstream_id(self.to_glib_none().0))
} }
} }
pub fn get_property_upstream_id(&self) -> Option<String> { pub fn get_property_upstream_id(&self) -> Option<GString> {
unsafe { unsafe {
let mut value = Value::from_type(<String as StaticType>::static_type()); let mut value = Value::from_type(<GString as StaticType>::static_type());
gobject_ffi::g_object_get_property(self.to_glib_none().0, b"upstream-id\0".as_ptr() as *const _, value.to_glib_none_mut().0); gobject_ffi::g_object_get_property(self.to_glib_none().0, b"upstream-id\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get() value.get()
} }

View file

@ -6,6 +6,7 @@ use Caps;
use Object; use Object;
use PluginFeature; use PluginFeature;
use ffi; use ffi;
use glib::GString;
use glib::translate::*; use glib::translate::*;
glib_wrapper! { glib_wrapper! {
@ -27,7 +28,7 @@ impl TypeFindFactory {
} }
} }
pub fn get_extensions(&self) -> Vec<String> { pub fn get_extensions(&self) -> Vec<GString> {
unsafe { unsafe {
FromGlibPtrContainer::from_glib_none(ffi::gst_type_find_factory_get_extensions(self.to_glib_none().0)) FromGlibPtrContainer::from_glib_none(ffi::gst_type_find_factory_get_extensions(self.to_glib_none().0))
} }

View file

@ -5,6 +5,7 @@
use Error; use Error;
use URIType; use URIType;
use ffi; use ffi;
use glib::GString;
use glib::object::IsA; use glib::object::IsA;
use glib::translate::*; use glib::translate::*;
use std::ptr; use std::ptr;
@ -21,9 +22,9 @@ unsafe impl Send for URIHandler {}
unsafe impl Sync for URIHandler {} unsafe impl Sync for URIHandler {}
pub trait URIHandlerExt: 'static { pub trait URIHandlerExt: 'static {
fn get_protocols(&self) -> Vec<String>; fn get_protocols(&self) -> Vec<GString>;
fn get_uri(&self) -> Option<String>; fn get_uri(&self) -> Option<GString>;
fn get_uri_type(&self) -> URIType; fn get_uri_type(&self) -> URIType;
@ -31,13 +32,13 @@ pub trait URIHandlerExt: 'static {
} }
impl<O: IsA<URIHandler>> URIHandlerExt for O { impl<O: IsA<URIHandler>> URIHandlerExt for O {
fn get_protocols(&self) -> Vec<String> { fn get_protocols(&self) -> Vec<GString> {
unsafe { unsafe {
FromGlibPtrContainer::from_glib_none(ffi::gst_uri_handler_get_protocols(self.to_glib_none().0)) FromGlibPtrContainer::from_glib_none(ffi::gst_uri_handler_get_protocols(self.to_glib_none().0))
} }
} }
fn get_uri(&self) -> Option<String> { fn get_uri(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(ffi::gst_uri_handler_get_uri(self.to_glib_none().0)) from_glib_full(ffi::gst_uri_handler_get_uri(self.to_glib_none().0))
} }

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 811e711) Generated by gir (https://github.com/gtk-rs/gir @ c5498ac)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)

View file

@ -11,7 +11,7 @@ use Element;
use glib; use glib;
use glib::translate::{from_glib, from_glib_full, FromGlibPtrContainer, ToGlib, ToGlibPtr}; use glib::translate::{from_glib, from_glib_full, FromGlibPtrContainer, ToGlib, ToGlibPtr};
use glib::{IsA, IsClassFor}; use glib::{GString, IsA, IsClassFor};
use ffi; use ffi;
@ -30,7 +30,7 @@ pub trait GstBinExtManual: 'static {
fn iterate_sources(&self) -> ::Iterator<Element>; fn iterate_sources(&self) -> ::Iterator<Element>;
fn get_children(&self) -> Vec<Element>; fn get_children(&self) -> Vec<Element>;
fn debug_to_dot_data(&self, details: ::DebugGraphDetails) -> String; fn debug_to_dot_data(&self, details: ::DebugGraphDetails) -> GString;
fn debug_to_dot_file<Q: AsRef<path::Path>>(&self, details: ::DebugGraphDetails, file_name: Q); fn debug_to_dot_file<Q: AsRef<path::Path>>(&self, details: ::DebugGraphDetails, file_name: Q);
fn debug_to_dot_file_with_ts<Q: AsRef<path::Path>>( fn debug_to_dot_file_with_ts<Q: AsRef<path::Path>>(
&self, &self,
@ -108,7 +108,7 @@ impl<O: IsA<Bin>> GstBinExtManual for O {
} }
} }
fn debug_to_dot_data(&self, details: ::DebugGraphDetails) -> String { fn debug_to_dot_data(&self, details: ::DebugGraphDetails) -> GString {
::debug_bin_to_dot_data(self, details) ::debug_bin_to_dot_data(self, details)
} }
@ -168,7 +168,7 @@ mod tests {
.get_children() .get_children()
.iter() .iter()
.map(|c| c.get_name()) .map(|c| c.get_name())
.collect::<Vec<String>>(); .collect::<Vec<GString>>();
child_names.sort(); child_names.sort();
assert_eq!( assert_eq!(
child_names, child_names,

View file

@ -13,7 +13,7 @@ impl fmt::Display for DateTime {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str( f.write_str(
self.to_iso8601_string() self.to_iso8601_string()
.unwrap_or_else(|| String::from("None")) .unwrap_or_else(|| "None".into())
.as_str(), .as_str(),
) )
} }

View file

@ -1161,6 +1161,7 @@ macro_rules! gst_element_info(
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use glib::GString;
use prelude::*; use prelude::*;
#[cfg(feature = "v1_10")] #[cfg(feature = "v1_10")]
use std::sync::mpsc::channel; use std::sync::mpsc::channel;
@ -1175,7 +1176,7 @@ mod tests {
.get_pads() .get_pads()
.iter() .iter()
.map(|p| p.get_name()) .map(|p| p.get_name())
.collect::<Vec<String>>(); .collect::<Vec<GString>>();
pad_names.sort(); pad_names.sort();
assert_eq!(pad_names, vec![String::from("sink"), String::from("src")]); assert_eq!(pad_names, vec![String::from("sink"), String::from("src")]);
@ -1183,7 +1184,7 @@ mod tests {
.get_sink_pads() .get_sink_pads()
.iter() .iter()
.map(|p| p.get_name()) .map(|p| p.get_name())
.collect::<Vec<String>>(); .collect::<Vec<GString>>();
pad_names.sort(); pad_names.sort();
assert_eq!(pad_names, vec![String::from("sink")]); assert_eq!(pad_names, vec![String::from("sink")]);
@ -1191,7 +1192,7 @@ mod tests {
.get_src_pads() .get_src_pads()
.iter() .iter()
.map(|p| p.get_name()) .map(|p| p.get_name())
.collect::<Vec<String>>(); .collect::<Vec<GString>>();
pad_names.sort(); pad_names.sort();
assert_eq!(pad_names, vec![String::from("src")]); assert_eq!(pad_names, vec![String::from("src")]);
} }