Commit 95344167 authored by Philippe Normand's avatar Philippe Normand 🥑 Committed by Sebastian Dröge

Regenerate and fix manual bindings for GString support

parent 9665a899
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 @ ???)
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 @ ???)
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 @ ???)
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 @ ???)
......@@ -10,6 +10,7 @@ use futures_core;
use gio;
use gio_ffi;
use glib;
use glib::GString;
use glib::Value;
use glib::object::Downcast;
use glib::object::IsA;
......@@ -98,7 +99,7 @@ pub trait AssetExt: 'static {
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>;
......@@ -138,7 +139,7 @@ impl<O: IsA<Asset>> AssetExt for O {
}
}
fn get_id(&self) -> Option<String> {
fn get_id(&self) -> Option<GString> {
unsafe {
from_glib_none(ffi::ges_asset_get_id(self.to_glib_none().0))
}
......
......@@ -7,6 +7,7 @@ use Extractable;
use TimelineElement;
use TrackElement;
use ffi;
use glib::GString;
use glib::StaticType;
use glib::Value;
use glib::object::IsA;
......@@ -31,13 +32,13 @@ impl Effect {
}
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 {
fn get_property_bin_description(&self) -> Option<String> {
fn get_property_bin_description(&self) -> Option<GString> {
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);
value.get()
}
......
......@@ -4,6 +4,7 @@
use Asset;
use ffi;
use glib::GString;
use glib::object::IsA;
use glib::translate::*;
......@@ -18,7 +19,7 @@ glib_wrapper! {
pub trait ExtractableExt: 'static {
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;
}
......@@ -30,7 +31,7 @@ impl<O: IsA<Extractable>> ExtractableExt for O {
}
}
fn get_id(&self) -> Option<String> {
fn get_id(&self) -> Option<GString> {
unsafe {
from_glib_full(ffi::ges_extractable_get_id(self.to_glib_none().0))
}
......
......@@ -7,6 +7,7 @@ use Error;
use Timeline;
use ffi;
use glib;
use glib::GString;
use glib::object::Downcast;
use glib::object::IsA;
use glib::signal::SignalHandlerId;
......@@ -51,7 +52,7 @@ pub trait ProjectExt: 'static {
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>;
......@@ -73,7 +74,7 @@ pub trait ProjectExt: 'static {
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 {
......@@ -119,7 +120,7 @@ impl<O: IsA<Project>> ProjectExt for O {
}
}
fn get_uri(&self) -> Option<String> {
fn get_uri(&self) -> Option<GString> {
unsafe {
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 {
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 _,
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)
where P: IsA<Project> {
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)
......@@ -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
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()
}
......@@ -6,6 +6,7 @@ use Extractable;
use Timeline;
use TrackType;
use ffi;
use glib::GString;
use glib::StaticType;
use glib::Value;
use glib::object::Downcast;
......@@ -46,7 +47,7 @@ pub trait TimelineElementExt: 'static {
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>;
......@@ -176,7 +177,7 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
}
}
fn get_name(&self) -> Option<String> {
fn get_name(&self) -> Option<GString> {
unsafe {
from_glib_full(ffi::ges_timeline_element_get_name(self.to_glib_none().0))
}
......
......@@ -10,6 +10,7 @@ use TimelineElement;
use Track;
use TrackType;
use ffi;
use glib::GString;
use glib::StaticType;
use glib::Value;
use glib::object::Downcast;
......
......@@ -7,6 +7,7 @@ use Container;
use Extractable;
use TimelineElement;
use ffi;
use glib::GString;
use glib::StaticType;
use glib::Value;
use glib::object::Downcast;
......@@ -37,7 +38,7 @@ impl UriClip {
}
pub trait UriClipExt: 'static {
fn get_uri(&self) -> Option<String>;
fn get_uri(&self) -> Option<GString>;
fn is_image(&self) -> bool;
......@@ -59,7 +60,7 @@ pub trait UriClipExt: 'static {
}
impl<O: IsA<UriClip>> UriClipExt for O {
fn get_uri(&self) -> Option<String> {
fn get_uri(&self) -> Option<GString> {
unsafe {
from_glib_none(ffi::ges_uri_clip_get_uri(self.to_glib_none().0))
}
......
......@@ -5,6 +5,7 @@
use Asset;
use UriClipAsset;
use ffi;
use glib::GString;
use glib::object::IsA;
use glib::translate::*;
use gst_pbutils;
......@@ -22,7 +23,7 @@ pub trait UriSourceAssetExt: 'static {
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 {
......@@ -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 {
from_glib_none(ffi::ges_uri_source_asset_get_stream_uri(self.to_glib_none().0))
}
......
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 @ ???)
......@@ -5,6 +5,7 @@
use GLContext;
use GLDisplay;
use ffi;
use glib::GString;
use glib::object::Downcast;
use glib::object::IsA;
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)
where P: IsA<GLWindow> {
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)
where P: IsA<GLWindow> {
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)
}
......@@ -7,6 +7,7 @@ use GLContext;
use GLSLProfile;
use GLSLVersion;
use ffi;
use glib::GString;
use glib::translate::*;
use gst;
use gst_ffi;
......
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 @ ???)
......@@ -3,6 +3,7 @@
// DO NOT EDIT
use ffi;
use glib::GString;
use glib::StaticType;
use glib::Value;
use glib::signal::SignalHandlerId;
......@@ -27,9 +28,9 @@ glib_wrapper! {
}
impl NetClientClock {
pub fn get_property_address(&self) -> Option<String> {
pub fn get_property_address(&self) -> Option<GString> {
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);
value.get()
}
......
......@@ -3,6 +3,7 @@
// DO NOT EDIT
use ffi;
use glib::GString;
use glib::StaticType;
use glib::Value;
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 {
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);
value.get()
}
......
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 @ ???)
......@@ -4,6 +4,7 @@
use DiscovererStreamInfo;
use ffi;
use glib::GString;
use glib::translate::*;
glib_wrapper! {
......@@ -40,7 +41,7 @@ impl DiscovererAudioInfo {
}
}
pub fn get_language(&self) -> Option<String> {
pub fn get_language(&self) -> Option<GString> {
unsafe {
from_glib_none(ffi::gst_discoverer_audio_info_get_language(self.to_glib_none().0))
}
......
......@@ -7,6 +7,7 @@ use DiscovererSerializeFlags;
use DiscovererStreamInfo;
use ffi;
use glib;
use glib::GString;
use glib::object::IsA;
use glib::translate::*;
use gst;
......@@ -45,7 +46,7 @@ pub trait DiscovererInfoExt: 'static {
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;
......@@ -63,7 +64,7 @@ pub trait DiscovererInfoExt: 'static {
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>;
......@@ -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 {
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 {
from_glib_none(ffi::gst_discoverer_info_get_uri(const_override(self.to_glib_none().0)))
}
......
......@@ -3,6 +3,7 @@
// DO NOT EDIT
use ffi;
use glib::GString;
use glib::object::IsA;
use glib::translate::*;
use gst;
......@@ -27,9 +28,9 @@ pub trait DiscovererStreamInfoExt: 'static {
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>;
......@@ -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 {
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 {
from_glib_none(ffi::gst_discoverer_stream_info_get_stream_type_nick(self.to_glib_none().0))
}
......
......@@ -4,6 +4,7 @@
use DiscovererStreamInfo;
use ffi;
use glib::GString;
use glib::translate::*;
glib_wrapper! {
......@@ -15,7 +16,7 @@ glib_wrapper! {
}
impl DiscovererSubtitleInfo {
pub fn get_language(&self) -> Option<String> {
pub fn get_language(&self) -> Option<GString> {
unsafe {
from_glib_none(ffi::gst_discoverer_subtitle_info_get_language(self.to_glib_none().0))
}
......
......@@ -4,6 +4,7 @@
use DiscovererInfo;
use ffi;
use glib::GString;
use glib::object::IsA;
use glib::translate::*;
use gst;
......@@ -44,25 +45,25 @@ pub trait EncodingProfileExt: 'static {
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_input_caps(&self) -> gst::Caps;
fn get_name(&self) -> Option<String>;
fn get_name(&self) -> Option<GString>;
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_type_nick(&self) -> Option<String>;
fn get_type_nick(&self) -> Option<GString>;
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 {
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 {
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 {
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 {
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 {
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 {
from_glib_none(ffi::gst_encoding_profile_get_type_nick(self.to_glib_none().0))
}
......
......@@ -5,6 +5,7 @@
use EncodingProfile;
use Error;
use ffi;
use glib::GString;
use glib::object::IsA;
use glib::translate::*;
use std;
......@@ -51,11 +52,11 @@ unsafe impl Send for EncodingTarget {}
unsafe impl Sync for EncodingTarget {}
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>;
......@@ -67,19 +68,19 @@ pub trait EncodingTargetExt: 'static {
}
impl<O: IsA<EncodingTarget>> EncodingTargetExt for O {
fn get_category(&self) -> String {
fn get_category(&self) -> GString {
unsafe {
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 {
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 {
from_glib_none(ffi::gst_encoding_target_get_name(self.to_glib_none().0))
}
......
......@@ -4,6 +4,7 @@
use EncodingTarget;
use ffi;
use glib::GString;
use glib::translate::*;
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!();
unsafe {
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!();
unsafe {
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!();
unsafe {
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!();
unsafe {
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!();
unsafe {
from_glib_full(ffi::gst_plugins_base_version_string())
......
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 @ ???)
......@@ -13,6 +13,7 @@ use PlayerVideoInfo;
use PlayerVisualization;
use ffi;
use glib;
use glib::GString;
use glib::StaticType;
use glib::Value;
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 {
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 {
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 {
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 {
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);
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) {
let f: &&(Fn(&Player, &str) + Send + 'static) = transmute(f);
f(&from_glib_borrow(this), &String::from_glib_none(object))