forked from mirrors/gstreamer-rs
Regenerate with latest gir
This commit is contained in:
parent
da002aa98c
commit
457ac9118b
36 changed files with 119 additions and 125 deletions
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
#[cfg(any(feature = "futures", feature = "dox"))]
|
|
||||||
use futures::future;
|
|
||||||
use ges_sys;
|
use ges_sys;
|
||||||
use gio;
|
use gio;
|
||||||
use gio_sys;
|
use gio_sys;
|
||||||
|
@ -20,8 +18,8 @@ use glib_sys;
|
||||||
use gobject_sys;
|
use gobject_sys;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
|
use std::pin::Pin;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use Error;
|
|
||||||
use Extractable;
|
use Extractable;
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
|
@ -46,7 +44,7 @@ impl Asset {
|
||||||
pub fn request(
|
pub fn request(
|
||||||
extractable_type: glib::types::Type,
|
extractable_type: glib::types::Type,
|
||||||
id: Option<&str>,
|
id: Option<&str>,
|
||||||
) -> Result<Option<Asset>, Error> {
|
) -> Result<Option<Asset>, glib::Error> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
|
@ -65,7 +63,7 @@ impl Asset {
|
||||||
|
|
||||||
pub fn request_async<
|
pub fn request_async<
|
||||||
P: IsA<gio::Cancellable>,
|
P: IsA<gio::Cancellable>,
|
||||||
Q: FnOnce(Result<Asset, Error>) + Send + 'static,
|
Q: FnOnce(Result<Asset, glib::Error>) + Send + 'static,
|
||||||
>(
|
>(
|
||||||
extractable_type: glib::types::Type,
|
extractable_type: glib::types::Type,
|
||||||
id: &str,
|
id: &str,
|
||||||
|
@ -75,7 +73,7 @@ impl Asset {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
let user_data: Box_<Q> = Box_::new(callback);
|
let user_data: Box_<Q> = Box_::new(callback);
|
||||||
unsafe extern "C" fn request_async_trampoline<
|
unsafe extern "C" fn request_async_trampoline<
|
||||||
Q: FnOnce(Result<Asset, Error>) + Send + 'static,
|
Q: FnOnce(Result<Asset, glib::Error>) + Send + 'static,
|
||||||
>(
|
>(
|
||||||
_source_object: *mut gobject_sys::GObject,
|
_source_object: *mut gobject_sys::GObject,
|
||||||
res: *mut gio_sys::GAsyncResult,
|
res: *mut gio_sys::GAsyncResult,
|
||||||
|
@ -103,11 +101,10 @@ impl Asset {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "futures", feature = "dox"))]
|
|
||||||
pub fn request_async_future(
|
pub fn request_async_future(
|
||||||
extractable_type: glib::types::Type,
|
extractable_type: glib::types::Type,
|
||||||
id: &str,
|
id: &str,
|
||||||
) -> Box_<dyn future::Future<Output = Result<Asset, Error>> + std::marker::Unpin> {
|
) -> Pin<Box_<dyn std::future::Future<Output = Result<Asset, glib::Error>> + 'static>> {
|
||||||
use fragile::Fragile;
|
use fragile::Fragile;
|
||||||
use gio::GioFuture;
|
use gio::GioFuture;
|
||||||
|
|
||||||
|
@ -127,9 +124,9 @@ impl Asset {
|
||||||
pub const NONE_ASSET: Option<&Asset> = None;
|
pub const NONE_ASSET: Option<&Asset> = None;
|
||||||
|
|
||||||
pub trait AssetExt: 'static {
|
pub trait AssetExt: 'static {
|
||||||
fn extract(&self) -> Result<Option<Extractable>, Error>;
|
fn extract(&self) -> Result<Option<Extractable>, glib::Error>;
|
||||||
|
|
||||||
fn get_error(&self) -> Option<Error>;
|
fn get_error(&self) -> Option<glib::Error>;
|
||||||
|
|
||||||
fn get_extractable_type(&self) -> glib::types::Type;
|
fn get_extractable_type(&self) -> glib::types::Type;
|
||||||
|
|
||||||
|
@ -154,7 +151,7 @@ pub trait AssetExt: 'static {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Asset>> AssetExt for O {
|
impl<O: IsA<Asset>> AssetExt for O {
|
||||||
fn extract(&self) -> Result<Option<Extractable>, Error> {
|
fn extract(&self) -> Result<Option<Extractable>, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let ret = ges_sys::ges_asset_extract(self.as_ref().to_glib_none().0, &mut error);
|
let ret = ges_sys::ges_asset_extract(self.as_ref().to_glib_none().0, &mut error);
|
||||||
|
@ -166,7 +163,7 @@ impl<O: IsA<Asset>> AssetExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_error(&self) -> Option<Error> {
|
fn get_error(&self) -> Option<glib::Error> {
|
||||||
unsafe { from_glib_none(ges_sys::ges_asset_get_error(self.as_ref().to_glib_none().0)) }
|
unsafe { from_glib_none(ges_sys::ges_asset_get_error(self.as_ref().to_glib_none().0)) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ use gst_pbutils;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use Error;
|
|
||||||
use PipelineFlags;
|
use PipelineFlags;
|
||||||
use Timeline;
|
use Timeline;
|
||||||
|
|
||||||
|
@ -67,7 +66,7 @@ pub trait GESPipelineExt: 'static {
|
||||||
height: i32,
|
height: i32,
|
||||||
format: &str,
|
format: &str,
|
||||||
location: &str,
|
location: &str,
|
||||||
) -> Result<(), Error>;
|
) -> Result<(), glib::Error>;
|
||||||
|
|
||||||
fn set_mode(&self, mode: PipelineFlags) -> Result<(), glib::error::BoolError>;
|
fn set_mode(&self, mode: PipelineFlags) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
|
@ -192,7 +191,7 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
||||||
height: i32,
|
height: i32,
|
||||||
format: &str,
|
format: &str,
|
||||||
location: &str,
|
location: &str,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let _ = ges_sys::ges_pipeline_save_thumbnail(
|
let _ = ges_sys::ges_pipeline_save_thumbnail(
|
||||||
|
|
|
@ -17,7 +17,6 @@ use std::boxed::Box as Box_;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use Asset;
|
use Asset;
|
||||||
use Error;
|
|
||||||
use Timeline;
|
use Timeline;
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
|
@ -51,7 +50,7 @@ pub trait ProjectExt: 'static {
|
||||||
&self,
|
&self,
|
||||||
id: Option<&str>,
|
id: Option<&str>,
|
||||||
extractable_type: glib::types::Type,
|
extractable_type: glib::types::Type,
|
||||||
) -> Result<Option<Asset>, Error>;
|
) -> Result<Option<Asset>, glib::Error>;
|
||||||
|
|
||||||
fn get_asset(&self, id: &str, extractable_type: glib::types::Type) -> Option<Asset>;
|
fn get_asset(&self, id: &str, extractable_type: glib::types::Type) -> Option<Asset>;
|
||||||
|
|
||||||
|
@ -63,7 +62,7 @@ pub trait ProjectExt: 'static {
|
||||||
|
|
||||||
fn list_encoding_profiles(&self) -> Vec<gst_pbutils::EncodingProfile>;
|
fn list_encoding_profiles(&self) -> Vec<gst_pbutils::EncodingProfile>;
|
||||||
|
|
||||||
fn load<P: IsA<Timeline>>(&self, timeline: &P) -> Result<(), Error>;
|
fn load<P: IsA<Timeline>>(&self, timeline: &P) -> Result<(), glib::Error>;
|
||||||
|
|
||||||
fn remove_asset<P: IsA<Asset>>(&self, asset: &P) -> Result<(), glib::error::BoolError>;
|
fn remove_asset<P: IsA<Asset>>(&self, asset: &P) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
|
@ -73,7 +72,7 @@ pub trait ProjectExt: 'static {
|
||||||
uri: &str,
|
uri: &str,
|
||||||
formatter_asset: Option<&Q>,
|
formatter_asset: Option<&Q>,
|
||||||
overwrite: bool,
|
overwrite: bool,
|
||||||
) -> Result<(), Error>;
|
) -> Result<(), glib::Error>;
|
||||||
|
|
||||||
fn connect_asset_added<F: Fn(&Self, &Asset) + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_asset_added<F: Fn(&Self, &Asset) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
|
|
||||||
|
@ -81,14 +80,14 @@ pub trait ProjectExt: 'static {
|
||||||
|
|
||||||
fn connect_asset_removed<F: Fn(&Self, &Asset) + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_asset_removed<F: Fn(&Self, &Asset) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
|
|
||||||
fn connect_error_loading_asset<F: Fn(&Self, &Error, &str, glib::types::Type) + 'static>(
|
fn connect_error_loading_asset<F: Fn(&Self, &glib::Error, &str, glib::types::Type) + 'static>(
|
||||||
&self,
|
&self,
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId;
|
) -> SignalHandlerId;
|
||||||
|
|
||||||
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<GString> + 'static>(
|
fn connect_missing_uri<F: Fn(&Self, &glib::Error, &Asset) -> Option<GString> + 'static>(
|
||||||
&self,
|
&self,
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId;
|
) -> SignalHandlerId;
|
||||||
|
@ -133,7 +132,7 @@ impl<O: IsA<Project>> ProjectExt for O {
|
||||||
&self,
|
&self,
|
||||||
id: Option<&str>,
|
id: Option<&str>,
|
||||||
extractable_type: glib::types::Type,
|
extractable_type: glib::types::Type,
|
||||||
) -> Result<Option<Asset>, Error> {
|
) -> Result<Option<Asset>, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let ret = ges_sys::ges_project_create_asset_sync(
|
let ret = ges_sys::ges_project_create_asset_sync(
|
||||||
|
@ -189,7 +188,7 @@ impl<O: IsA<Project>> ProjectExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn load<P: IsA<Timeline>>(&self, timeline: &P) -> Result<(), Error> {
|
fn load<P: IsA<Timeline>>(&self, timeline: &P) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let _ = ges_sys::ges_project_load(
|
let _ = ges_sys::ges_project_load(
|
||||||
|
@ -223,7 +222,7 @@ impl<O: IsA<Project>> ProjectExt for O {
|
||||||
uri: &str,
|
uri: &str,
|
||||||
formatter_asset: Option<&Q>,
|
formatter_asset: Option<&Q>,
|
||||||
overwrite: bool,
|
overwrite: bool,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let _ = ges_sys::ges_project_save(
|
let _ = ges_sys::ges_project_save(
|
||||||
|
@ -317,13 +316,15 @@ impl<O: IsA<Project>> ProjectExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_error_loading_asset<F: Fn(&Self, &Error, &str, glib::types::Type) + 'static>(
|
fn connect_error_loading_asset<
|
||||||
|
F: Fn(&Self, &glib::Error, &str, glib::types::Type) + 'static,
|
||||||
|
>(
|
||||||
&self,
|
&self,
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId {
|
) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn error_loading_asset_trampoline<
|
unsafe extern "C" fn error_loading_asset_trampoline<
|
||||||
P,
|
P,
|
||||||
F: Fn(&P, &Error, &str, glib::types::Type) + 'static,
|
F: Fn(&P, &glib::Error, &str, glib::types::Type) + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut ges_sys::GESProject,
|
this: *mut ges_sys::GESProject,
|
||||||
error: *mut glib_sys::GError,
|
error: *mut glib_sys::GError,
|
||||||
|
@ -379,13 +380,13 @@ impl<O: IsA<Project>> ProjectExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connect_missing_uri<F: Fn(&Self, &Error, &Asset) -> Option<GString> + 'static>(
|
fn connect_missing_uri<F: Fn(&Self, &glib::Error, &Asset) -> Option<GString> + 'static>(
|
||||||
&self,
|
&self,
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId {
|
) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn missing_uri_trampoline<
|
unsafe extern "C" fn missing_uri_trampoline<
|
||||||
P,
|
P,
|
||||||
F: Fn(&P, &Error, &Asset) -> Option<GString> + 'static,
|
F: Fn(&P, &glib::Error, &Asset) -> Option<GString> + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut ges_sys::GESProject,
|
this: *mut ges_sys::GESProject,
|
||||||
error: *mut glib_sys::GError,
|
error: *mut glib_sys::GError,
|
||||||
|
|
|
@ -15,7 +15,6 @@ use std::boxed::Box as Box_;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use Asset;
|
use Asset;
|
||||||
use Error;
|
|
||||||
use Extractable;
|
use Extractable;
|
||||||
use Group;
|
use Group;
|
||||||
use Layer;
|
use Layer;
|
||||||
|
@ -42,7 +41,7 @@ impl Timeline {
|
||||||
unsafe { from_glib_none(ges_sys::ges_timeline_new_audio_video()) }
|
unsafe { from_glib_none(ges_sys::ges_timeline_new_audio_video()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new_from_uri(uri: &str) -> Result<Option<Timeline>, Error> {
|
pub fn new_from_uri(uri: &str) -> Result<Option<Timeline>, glib::Error> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
|
@ -97,7 +96,7 @@ pub trait TimelineExt: 'static {
|
||||||
|
|
||||||
fn is_empty(&self) -> bool;
|
fn is_empty(&self) -> bool;
|
||||||
|
|
||||||
fn load_from_uri(&self, uri: &str) -> Result<(), Error>;
|
fn load_from_uri(&self, uri: &str) -> Result<(), glib::Error>;
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||||
fn move_layer<P: IsA<Layer>>(
|
fn move_layer<P: IsA<Layer>>(
|
||||||
|
@ -122,7 +121,7 @@ pub trait TimelineExt: 'static {
|
||||||
uri: &str,
|
uri: &str,
|
||||||
formatter_asset: Option<&P>,
|
formatter_asset: Option<&P>,
|
||||||
overwrite: bool,
|
overwrite: bool,
|
||||||
) -> Result<(), Error>;
|
) -> Result<(), glib::Error>;
|
||||||
|
|
||||||
fn set_auto_transition(&self, auto_transition: bool);
|
fn set_auto_transition(&self, auto_transition: bool);
|
||||||
|
|
||||||
|
@ -304,7 +303,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn load_from_uri(&self, uri: &str) -> Result<(), Error> {
|
fn load_from_uri(&self, uri: &str) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let _ = ges_sys::ges_timeline_load_from_uri(
|
let _ = ges_sys::ges_timeline_load_from_uri(
|
||||||
|
@ -383,7 +382,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
||||||
uri: &str,
|
uri: &str,
|
||||||
formatter_asset: Option<&P>,
|
formatter_asset: Option<&P>,
|
||||||
overwrite: bool,
|
overwrite: bool,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let _ = ges_sys::ges_timeline_save_to_uri(
|
let _ = ges_sys::ges_timeline_save_to_uri(
|
||||||
|
|
|
@ -9,7 +9,6 @@ use glib::object::IsA;
|
||||||
use glib::signal::connect_raw;
|
use glib::signal::connect_raw;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib::GString;
|
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib_sys;
|
use glib_sys;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use ges_sys;
|
use ges_sys;
|
||||||
|
use glib;
|
||||||
use glib::object::Cast;
|
use glib::object::Cast;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::signal::connect_raw;
|
use glib::signal::connect_raw;
|
||||||
|
@ -17,7 +18,6 @@ use std::boxed::Box as Box_;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use Asset;
|
use Asset;
|
||||||
use Error;
|
|
||||||
use UriSourceAsset;
|
use UriSourceAsset;
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
|
@ -30,15 +30,15 @@ glib_wrapper! {
|
||||||
|
|
||||||
impl UriClipAsset {
|
impl UriClipAsset {
|
||||||
//#[cfg(any(feature = "v1_16", feature = "dox"))]
|
//#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||||
//pub fn finish(res: /*Ignored*/&gio::AsyncResult) -> Result<UriClipAsset, Error> {
|
//pub fn finish(res: /*Ignored*/&gio::AsyncResult) -> Result<UriClipAsset, glib::Error> {
|
||||||
// unsafe { TODO: call ges_sys:ges_uri_clip_asset_finish() }
|
// unsafe { TODO: call ges_sys:ges_uri_clip_asset_finish() }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//pub fn new<P: IsA<gio::Cancellable>, Q: FnOnce(Result<(), Error>) + 'static>(uri: &str, cancellable: Option<&P>, callback: Q) {
|
//pub fn new<P: IsA<gio::Cancellable>, Q: FnOnce(Result<(), glib::Error>) + 'static>(uri: &str, cancellable: Option<&P>, callback: Q) {
|
||||||
// unsafe { TODO: call ges_sys:ges_uri_clip_asset_new() }
|
// unsafe { TODO: call ges_sys:ges_uri_clip_asset_new() }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
pub fn request_sync(uri: &str) -> Result<UriClipAsset, Error> {
|
pub fn request_sync(uri: &str) -> Result<UriClipAsset, glib::Error> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||||
|
|
|
@ -9,7 +9,6 @@ use gst;
|
||||||
use gst_gl_sys;
|
use gst_gl_sys;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use Error;
|
|
||||||
use GLDisplay;
|
use GLDisplay;
|
||||||
use GLPlatform;
|
use GLPlatform;
|
||||||
use GLSLProfile;
|
use GLSLProfile;
|
||||||
|
@ -77,11 +76,11 @@ pub trait GLContextExt: 'static {
|
||||||
|
|
||||||
fn clear_shader(&self);
|
fn clear_shader(&self);
|
||||||
|
|
||||||
fn create<P: IsA<GLContext>>(&self, other_context: Option<&P>) -> Result<(), Error>;
|
fn create<P: IsA<GLContext>>(&self, other_context: Option<&P>) -> Result<(), glib::Error>;
|
||||||
|
|
||||||
fn destroy(&self);
|
fn destroy(&self);
|
||||||
|
|
||||||
fn fill_info(&self) -> Result<(), Error>;
|
fn fill_info(&self) -> Result<(), glib::Error>;
|
||||||
|
|
||||||
fn get_display(&self) -> GLDisplay;
|
fn get_display(&self) -> GLDisplay;
|
||||||
|
|
||||||
|
@ -175,7 +174,7 @@ impl<O: IsA<GLContext>> GLContextExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn create<P: IsA<GLContext>>(&self, other_context: Option<&P>) -> Result<(), Error> {
|
fn create<P: IsA<GLContext>>(&self, other_context: Option<&P>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let _ = gst_gl_sys::gst_gl_context_create(
|
let _ = gst_gl_sys::gst_gl_context_create(
|
||||||
|
@ -197,7 +196,7 @@ impl<O: IsA<GLContext>> GLContextExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn fill_info(&self) -> Result<(), Error> {
|
fn fill_info(&self) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let _ =
|
let _ =
|
||||||
|
|
|
@ -14,7 +14,6 @@ use gst_gl_sys;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use Error;
|
|
||||||
use GLContext;
|
use GLContext;
|
||||||
use GLDisplayType;
|
use GLDisplayType;
|
||||||
use GLWindow;
|
use GLWindow;
|
||||||
|
@ -49,7 +48,10 @@ pub const NONE_GL_DISPLAY: Option<&GLDisplay> = None;
|
||||||
pub trait GLDisplayExt: 'static {
|
pub trait GLDisplayExt: 'static {
|
||||||
fn add_context<P: IsA<GLContext>>(&self, context: &P) -> Result<(), glib::error::BoolError>;
|
fn add_context<P: IsA<GLContext>>(&self, context: &P) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
fn create_context<P: IsA<GLContext>>(&self, other_context: &P) -> Result<GLContext, Error>;
|
fn create_context<P: IsA<GLContext>>(
|
||||||
|
&self,
|
||||||
|
other_context: &P,
|
||||||
|
) -> Result<GLContext, glib::Error>;
|
||||||
|
|
||||||
fn create_window(&self) -> Option<GLWindow>;
|
fn create_window(&self) -> Option<GLWindow>;
|
||||||
|
|
||||||
|
@ -82,7 +84,10 @@ impl<O: IsA<GLDisplay>> GLDisplayExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn create_context<P: IsA<GLContext>>(&self, other_context: &P) -> Result<GLContext, Error> {
|
fn create_context<P: IsA<GLContext>>(
|
||||||
|
&self,
|
||||||
|
other_context: &P,
|
||||||
|
) -> Result<GLContext, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut p_context = ptr::null_mut();
|
let mut p_context = ptr::null_mut();
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
|
|
|
@ -19,7 +19,6 @@ use gst_gl_sys;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use Error;
|
|
||||||
use GLContext;
|
use GLContext;
|
||||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||||
use GLSLProfile;
|
use GLSLProfile;
|
||||||
|
@ -45,7 +44,7 @@ impl GLShader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new_default<P: IsA<GLContext>>(context: &P) -> Result<GLShader, Error> {
|
pub fn new_default<P: IsA<GLContext>>(context: &P) -> Result<GLShader, glib::Error> {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
|
@ -61,11 +60,11 @@ impl GLShader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//pub fn new_link_with_stages<P: IsA<GLContext>>(context: &P, error: &mut Error, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> GLShader {
|
//pub fn new_link_with_stages<P: IsA<GLContext>>(context: &P, error: &mut glib::Error, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> GLShader {
|
||||||
// unsafe { TODO: call gst_gl_sys:gst_gl_shader_new_link_with_stages() }
|
// unsafe { TODO: call gst_gl_sys:gst_gl_shader_new_link_with_stages() }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//pub fn new_with_stages<P: IsA<GLContext>>(context: &P, error: &mut Error, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> GLShader {
|
//pub fn new_with_stages<P: IsA<GLContext>>(context: &P, error: &mut glib::Error, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> GLShader {
|
||||||
// unsafe { TODO: call gst_gl_sys:gst_gl_shader_new_with_stages() }
|
// unsafe { TODO: call gst_gl_sys:gst_gl_shader_new_with_stages() }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
@ -110,7 +109,7 @@ impl GLShader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn compile_attach_stage(&self, stage: &GLSLStage) -> Result<(), Error> {
|
pub fn compile_attach_stage(&self, stage: &GLSLStage) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let _ = gst_gl_sys::gst_gl_shader_compile_attach_stage(
|
let _ = gst_gl_sys::gst_gl_shader_compile_attach_stage(
|
||||||
|
@ -158,7 +157,7 @@ impl GLShader {
|
||||||
unsafe { from_glib(gst_gl_sys::gst_gl_shader_is_linked(self.to_glib_none().0)) }
|
unsafe { from_glib(gst_gl_sys::gst_gl_shader_is_linked(self.to_glib_none().0)) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn link(&self) -> Result<(), Error> {
|
pub fn link(&self) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let _ = gst_gl_sys::gst_gl_shader_link(self.to_glib_none().0, &mut error);
|
let _ = gst_gl_sys::gst_gl_shader_link(self.to_glib_none().0, &mut error);
|
||||||
|
|
|
@ -5,11 +5,9 @@
|
||||||
use glib;
|
use glib;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib::GString;
|
|
||||||
use gst;
|
use gst;
|
||||||
use gst_gl_sys;
|
use gst_gl_sys;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use Error;
|
|
||||||
use GLContext;
|
use GLContext;
|
||||||
use GLSLProfile;
|
use GLSLProfile;
|
||||||
use GLSLVersion;
|
use GLSLVersion;
|
||||||
|
@ -91,7 +89,7 @@ impl GLSLStage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn compile(&self) -> Result<(), Error> {
|
pub fn compile(&self) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let _ = gst_gl_sys::gst_glsl_stage_compile(self.to_glib_none().0, &mut error);
|
let _ = gst_gl_sys::gst_glsl_stage_compile(self.to_glib_none().0, &mut error);
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||||
|
|
|
@ -21,7 +21,6 @@ use std::boxed::Box as Box_;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use DiscovererInfo;
|
use DiscovererInfo;
|
||||||
use Error;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct Discoverer(Object<gst_pbutils_sys::GstDiscoverer, gst_pbutils_sys::GstDiscovererClass, DiscovererClass>);
|
pub struct Discoverer(Object<gst_pbutils_sys::GstDiscoverer, gst_pbutils_sys::GstDiscovererClass, DiscovererClass>);
|
||||||
|
@ -32,7 +31,7 @@ glib_wrapper! {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Discoverer {
|
impl Discoverer {
|
||||||
pub fn new(timeout: gst::ClockTime) -> Result<Discoverer, Error> {
|
pub fn new(timeout: gst::ClockTime) -> Result<Discoverer, glib::Error> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
|
@ -45,7 +44,7 @@ impl Discoverer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn discover_uri(&self, uri: &str) -> Result<DiscovererInfo, Error> {
|
pub fn discover_uri(&self, uri: &str) -> Result<DiscovererInfo, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let ret = gst_pbutils_sys::gst_discoverer_discover_uri(
|
let ret = gst_pbutils_sys::gst_discoverer_discover_uri(
|
||||||
|
@ -113,13 +112,13 @@ impl Discoverer {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn connect_discovered<
|
pub fn connect_discovered<
|
||||||
F: Fn(&Discoverer, &DiscovererInfo, Option<&Error>) + Send + Sync + 'static,
|
F: Fn(&Discoverer, &DiscovererInfo, Option<&glib::Error>) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
&self,
|
&self,
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId {
|
) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn discovered_trampoline<
|
unsafe extern "C" fn discovered_trampoline<
|
||||||
F: Fn(&Discoverer, &DiscovererInfo, Option<&Error>) + Send + Sync + 'static,
|
F: Fn(&Discoverer, &DiscovererInfo, Option<&glib::Error>) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_pbutils_sys::GstDiscoverer,
|
this: *mut gst_pbutils_sys::GstDiscoverer,
|
||||||
info: *mut gst_pbutils_sys::GstDiscovererInfo,
|
info: *mut gst_pbutils_sys::GstDiscovererInfo,
|
||||||
|
@ -130,7 +129,7 @@ impl Discoverer {
|
||||||
f(
|
f(
|
||||||
&from_glib_borrow(this),
|
&from_glib_borrow(this),
|
||||||
&from_glib_borrow(info),
|
&from_glib_borrow(info),
|
||||||
Option::<Error>::from_glib_borrow(error).as_ref(),
|
Option::<glib::Error>::from_glib_borrow(error).as_ref(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
use glib;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib::GString;
|
use glib::GString;
|
||||||
use gst_pbutils_sys;
|
use gst_pbutils_sys;
|
||||||
use std;
|
use std;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use EncodingProfile;
|
use EncodingProfile;
|
||||||
use Error;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct EncodingTarget(Object<gst_pbutils_sys::GstEncodingTarget, EncodingTargetClass>);
|
pub struct EncodingTarget(Object<gst_pbutils_sys::GstEncodingTarget, EncodingTargetClass>);
|
||||||
|
@ -77,7 +77,7 @@ impl EncodingTarget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn save(&self) -> Result<(), Error> {
|
pub fn save(&self) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let _ = gst_pbutils_sys::gst_encoding_target_save(self.to_glib_none().0, &mut error);
|
let _ = gst_pbutils_sys::gst_encoding_target_save(self.to_glib_none().0, &mut error);
|
||||||
|
@ -89,7 +89,7 @@ impl EncodingTarget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn save_to_file<P: AsRef<std::path::Path>>(&self, filepath: P) -> Result<(), Error> {
|
pub fn save_to_file<P: AsRef<std::path::Path>>(&self, filepath: P) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let _ = gst_pbutils_sys::gst_encoding_target_save_to_file(
|
let _ = gst_pbutils_sys::gst_encoding_target_save_to_file(
|
||||||
|
@ -105,7 +105,7 @@ impl EncodingTarget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn load(name: &str, category: Option<&str>) -> Result<EncodingTarget, Error> {
|
pub fn load(name: &str, category: Option<&str>) -> Result<EncodingTarget, glib::Error> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
|
@ -122,7 +122,9 @@ impl EncodingTarget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn load_from_file<P: AsRef<std::path::Path>>(filepath: P) -> Result<EncodingTarget, Error> {
|
pub fn load_from_file<P: AsRef<std::path::Path>>(
|
||||||
|
filepath: P,
|
||||||
|
) -> Result<EncodingTarget, glib::Error> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||||
|
|
|
@ -18,7 +18,6 @@ use gst_video;
|
||||||
use libc;
|
use libc;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use Error;
|
|
||||||
use PlayerAudioInfo;
|
use PlayerAudioInfo;
|
||||||
use PlayerColorBalanceType;
|
use PlayerColorBalanceType;
|
||||||
use PlayerMediaInfo;
|
use PlayerMediaInfo;
|
||||||
|
@ -501,8 +500,11 @@ impl Player {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn connect_error<F: Fn(&Player, &Error) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_error<F: Fn(&Player, &glib::Error) + Send + 'static>(
|
||||||
unsafe extern "C" fn error_trampoline<F: Fn(&Player, &Error) + Send + 'static>(
|
&self,
|
||||||
|
f: F,
|
||||||
|
) -> SignalHandlerId {
|
||||||
|
unsafe extern "C" fn error_trampoline<F: Fn(&Player, &glib::Error) + Send + 'static>(
|
||||||
this: *mut gst_player_sys::GstPlayer,
|
this: *mut gst_player_sys::GstPlayer,
|
||||||
object: *mut glib_sys::GError,
|
object: *mut glib_sys::GError,
|
||||||
f: glib_sys::gpointer,
|
f: glib_sys::gpointer,
|
||||||
|
@ -658,11 +660,11 @@ impl Player {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn connect_warning<F: Fn(&Player, &Error) + Send + 'static>(
|
pub fn connect_warning<F: Fn(&Player, &glib::Error) + Send + 'static>(
|
||||||
&self,
|
&self,
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId {
|
) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn warning_trampoline<F: Fn(&Player, &Error) + Send + 'static>(
|
unsafe extern "C" fn warning_trampoline<F: Fn(&Player, &glib::Error) + Send + 'static>(
|
||||||
this: *mut gst_player_sys::GstPlayer,
|
this: *mut gst_player_sys::GstPlayer,
|
||||||
object: *mut glib_sys::GError,
|
object: *mut glib_sys::GError,
|
||||||
f: glib_sys::gpointer,
|
f: glib_sys::gpointer,
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||||
|
|
|
@ -15,7 +15,6 @@ use gst_rtsp_server_sys;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use Error;
|
|
||||||
use RTSPAuth;
|
use RTSPAuth;
|
||||||
use RTSPClient;
|
use RTSPClient;
|
||||||
use RTSPFilterResult;
|
use RTSPFilterResult;
|
||||||
|
@ -76,12 +75,12 @@ pub trait RTSPServerExt: 'static {
|
||||||
fn create_socket<P: IsA<gio::Cancellable>>(
|
fn create_socket<P: IsA<gio::Cancellable>>(
|
||||||
&self,
|
&self,
|
||||||
cancellable: Option<&P>,
|
cancellable: Option<&P>,
|
||||||
) -> Result<gio::Socket, Error>;
|
) -> Result<gio::Socket, glib::Error>;
|
||||||
|
|
||||||
fn create_source<P: IsA<gio::Cancellable>>(
|
fn create_source<P: IsA<gio::Cancellable>>(
|
||||||
&self,
|
&self,
|
||||||
cancellable: Option<&P>,
|
cancellable: Option<&P>,
|
||||||
) -> Result<glib::Source, Error>;
|
) -> Result<glib::Source, glib::Error>;
|
||||||
|
|
||||||
fn get_address(&self) -> Option<GString>;
|
fn get_address(&self) -> Option<GString>;
|
||||||
|
|
||||||
|
@ -204,7 +203,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
||||||
fn create_socket<P: IsA<gio::Cancellable>>(
|
fn create_socket<P: IsA<gio::Cancellable>>(
|
||||||
&self,
|
&self,
|
||||||
cancellable: Option<&P>,
|
cancellable: Option<&P>,
|
||||||
) -> Result<gio::Socket, Error> {
|
) -> Result<gio::Socket, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let ret = gst_rtsp_server_sys::gst_rtsp_server_create_socket(
|
let ret = gst_rtsp_server_sys::gst_rtsp_server_create_socket(
|
||||||
|
@ -223,7 +222,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
||||||
fn create_source<P: IsA<gio::Cancellable>>(
|
fn create_source<P: IsA<gio::Cancellable>>(
|
||||||
&self,
|
&self,
|
||||||
cancellable: Option<&P>,
|
cancellable: Option<&P>,
|
||||||
) -> Result<glib::Source, Error> {
|
) -> Result<glib::Source, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let ret = gst_rtsp_server_sys::gst_rtsp_server_create_source(
|
let ret = gst_rtsp_server_sys::gst_rtsp_server_create_source(
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||||
|
|
|
@ -19,7 +19,6 @@ use Clock;
|
||||||
use ClockTime;
|
use ClockTime;
|
||||||
use Context;
|
use Context;
|
||||||
use ElementFactory;
|
use ElementFactory;
|
||||||
use Error;
|
|
||||||
use Message;
|
use Message;
|
||||||
use Object;
|
use Object;
|
||||||
use Pad;
|
use Pad;
|
||||||
|
@ -40,7 +39,7 @@ impl Element {
|
||||||
type_: URIType,
|
type_: URIType,
|
||||||
uri: &str,
|
uri: &str,
|
||||||
elementname: Option<&str>,
|
elementname: Option<&str>,
|
||||||
) -> Result<Element, Error> {
|
) -> Result<Element, glib::Error> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
|
|
|
@ -15,7 +15,6 @@ use ClockTime;
|
||||||
use DebugGraphDetails;
|
use DebugGraphDetails;
|
||||||
use DebugLevel;
|
use DebugLevel;
|
||||||
use Element;
|
use Element;
|
||||||
use Error;
|
|
||||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||||
use StackTraceFlags;
|
use StackTraceFlags;
|
||||||
|
|
||||||
|
@ -162,7 +161,7 @@ pub fn get_main_executable_path() -> Option<GString> {
|
||||||
pub fn parse_bin_from_description(
|
pub fn parse_bin_from_description(
|
||||||
bin_description: &str,
|
bin_description: &str,
|
||||||
ghost_unlinked_pads: bool,
|
ghost_unlinked_pads: bool,
|
||||||
) -> Result<Bin, Error> {
|
) -> Result<Bin, glib::Error> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
|
@ -179,7 +178,7 @@ pub fn parse_bin_from_description(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_launch(pipeline_description: &str) -> Result<Element, Error> {
|
pub fn parse_launch(pipeline_description: &str) -> Result<Element, glib::Error> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
|
@ -192,7 +191,7 @@ pub fn parse_launch(pipeline_description: &str) -> Result<Element, Error> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_launchv(argv: &[&str]) -> Result<Element, Error> {
|
pub fn parse_launchv(argv: &[&str]) -> Result<Element, glib::Error> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
|
|
|
@ -14,7 +14,6 @@ use gst_sys;
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use ClockTime;
|
use ClockTime;
|
||||||
use Error;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
pub struct Object(Object<gst_sys::GstObject, gst_sys::GstObjectClass, ObjectClass>);
|
pub struct Object(Object<gst_sys::GstObject, gst_sys::GstObjectClass, ObjectClass>);
|
||||||
|
@ -56,7 +55,7 @@ pub const NONE_OBJECT: Option<&Object> = None;
|
||||||
pub trait GstObjectExt: 'static {
|
pub trait GstObjectExt: 'static {
|
||||||
//fn add_control_binding(&self, binding: /*Ignored*/&ControlBinding) -> bool;
|
//fn add_control_binding(&self, binding: /*Ignored*/&ControlBinding) -> bool;
|
||||||
|
|
||||||
fn default_error(&self, error: &Error, debug: Option<&str>);
|
fn default_error(&self, error: &glib::Error, debug: Option<&str>);
|
||||||
|
|
||||||
//fn get_control_binding(&self, property_name: &str) -> /*Ignored*/Option<ControlBinding>;
|
//fn get_control_binding(&self, property_name: &str) -> /*Ignored*/Option<ControlBinding>;
|
||||||
|
|
||||||
|
@ -118,7 +117,7 @@ impl<O: IsA<Object>> GstObjectExt for O {
|
||||||
// unsafe { TODO: call gst_sys:gst_object_add_control_binding() }
|
// unsafe { TODO: call gst_sys:gst_object_add_control_binding() }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
fn default_error(&self, error: &Error, debug: Option<&str>) {
|
fn default_error(&self, error: &glib::Error, debug: Option<&str>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gst_sys::gst_object_default_error(
|
gst_sys::gst_object_default_error(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
use glib;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib::GString;
|
use glib::GString;
|
||||||
use gst_sys;
|
use gst_sys;
|
||||||
use std;
|
use std;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use Error;
|
|
||||||
use Object;
|
use Object;
|
||||||
use PluginDependencyFlags;
|
use PluginDependencyFlags;
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ impl Plugin {
|
||||||
unsafe { from_glib_full(gst_sys::gst_plugin_load_by_name(name.to_glib_none().0)) }
|
unsafe { from_glib_full(gst_sys::gst_plugin_load_by_name(name.to_glib_none().0)) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn load_file<P: AsRef<std::path::Path>>(filename: P) -> Result<Plugin, Error> {
|
pub fn load_file<P: AsRef<std::path::Path>>(filename: P) -> Result<Plugin, glib::Error> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
use glib;
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib::GString;
|
use glib::GString;
|
||||||
use gst_sys;
|
use gst_sys;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use Error;
|
|
||||||
use URIType;
|
use URIType;
|
||||||
|
|
||||||
glib_wrapper! {
|
glib_wrapper! {
|
||||||
|
@ -30,7 +30,7 @@ pub trait URIHandlerExt: 'static {
|
||||||
|
|
||||||
fn get_uri_type(&self) -> URIType;
|
fn get_uri_type(&self) -> URIType;
|
||||||
|
|
||||||
fn set_uri(&self, uri: &str) -> Result<(), Error>;
|
fn set_uri(&self, uri: &str) -> Result<(), glib::Error>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<URIHandler>> URIHandlerExt for O {
|
impl<O: IsA<URIHandler>> URIHandlerExt for O {
|
||||||
|
@ -58,7 +58,7 @@ impl<O: IsA<URIHandler>> URIHandlerExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_uri(&self, uri: &str) -> Result<(), Error> {
|
fn set_uri(&self, uri: &str) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = ptr::null_mut();
|
||||||
let _ = gst_sys::gst_uri_handler_set_uri(
|
let _ = gst_sys::gst_uri_handler_set_uri(
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||||
|
|
|
@ -594,8 +594,7 @@ mod tests {
|
||||||
|
|
||||||
assert!(slice[5].get::<Date>().expect("slice[5]").is_none());
|
assert!(slice[5].get::<Date>().expect("slice[5]").is_none());
|
||||||
|
|
||||||
let array_json =
|
let array_json = r#"[["Fraction",[1,3]],["Fraction",[1,2]],["String","test str"],["String",null],["Date",{"YMD":[2019,8,19]}],["Date",null]]"#;
|
||||||
r#"[["Fraction",[1,3]],["Fraction",[1,2]],["String","test str"],["String",null],["Date",{"YMD":[2019,8,19]}],["Date",null]]"#;
|
|
||||||
let array: Array = serde_json::from_str(array_json).unwrap();
|
let array: Array = serde_json::from_str(array_json).unwrap();
|
||||||
let slice = array.as_slice();
|
let slice = array.as_slice();
|
||||||
assert_eq!(6, slice.len());
|
assert_eq!(6, slice.len());
|
||||||
|
|
Loading…
Reference in a new issue