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)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||
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)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||
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)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||
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)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||
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)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(any(feature = "futures", feature = "dox"))]
|
||||
use futures::future;
|
||||
use ges_sys;
|
||||
use gio;
|
||||
use gio_sys;
|
||||
|
@ -20,8 +18,8 @@ use glib_sys;
|
|||
use gobject_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use std::pin::Pin;
|
||||
use std::ptr;
|
||||
use Error;
|
||||
use Extractable;
|
||||
|
||||
glib_wrapper! {
|
||||
|
@ -46,7 +44,7 @@ impl Asset {
|
|||
pub fn request(
|
||||
extractable_type: glib::types::Type,
|
||||
id: Option<&str>,
|
||||
) -> Result<Option<Asset>, Error> {
|
||||
) -> Result<Option<Asset>, glib::Error> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
|
@ -65,7 +63,7 @@ impl Asset {
|
|||
|
||||
pub fn request_async<
|
||||
P: IsA<gio::Cancellable>,
|
||||
Q: FnOnce(Result<Asset, Error>) + Send + 'static,
|
||||
Q: FnOnce(Result<Asset, glib::Error>) + Send + 'static,
|
||||
>(
|
||||
extractable_type: glib::types::Type,
|
||||
id: &str,
|
||||
|
@ -75,7 +73,7 @@ impl Asset {
|
|||
assert_initialized_main_thread!();
|
||||
let user_data: Box_<Q> = Box_::new(callback);
|
||||
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,
|
||||
res: *mut gio_sys::GAsyncResult,
|
||||
|
@ -103,11 +101,10 @@ impl Asset {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "futures", feature = "dox"))]
|
||||
pub fn request_async_future(
|
||||
extractable_type: glib::types::Type,
|
||||
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 gio::GioFuture;
|
||||
|
||||
|
@ -127,9 +124,9 @@ impl Asset {
|
|||
pub const NONE_ASSET: Option<&Asset> = None;
|
||||
|
||||
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;
|
||||
|
||||
|
@ -154,7 +151,7 @@ pub trait AssetExt: 'static {
|
|||
}
|
||||
|
||||
impl<O: IsA<Asset>> AssetExt for O {
|
||||
fn extract(&self) -> Result<Option<Extractable>, Error> {
|
||||
fn extract(&self) -> Result<Option<Extractable>, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
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)) }
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ use gst_pbutils;
|
|||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
use Error;
|
||||
use PipelineFlags;
|
||||
use Timeline;
|
||||
|
||||
|
@ -67,7 +66,7 @@ pub trait GESPipelineExt: 'static {
|
|||
height: i32,
|
||||
format: &str,
|
||||
location: &str,
|
||||
) -> Result<(), Error>;
|
||||
) -> Result<(), glib::Error>;
|
||||
|
||||
fn set_mode(&self, mode: PipelineFlags) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
|
@ -192,7 +191,7 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
height: i32,
|
||||
format: &str,
|
||||
location: &str,
|
||||
) -> Result<(), Error> {
|
||||
) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ges_sys::ges_pipeline_save_thumbnail(
|
||||
|
|
|
@ -17,7 +17,6 @@ use std::boxed::Box as Box_;
|
|||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
use Asset;
|
||||
use Error;
|
||||
use Timeline;
|
||||
|
||||
glib_wrapper! {
|
||||
|
@ -51,7 +50,7 @@ pub trait ProjectExt: 'static {
|
|||
&self,
|
||||
id: Option<&str>,
|
||||
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>;
|
||||
|
||||
|
@ -63,7 +62,7 @@ pub trait ProjectExt: 'static {
|
|||
|
||||
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>;
|
||||
|
||||
|
@ -73,7 +72,7 @@ pub trait ProjectExt: 'static {
|
|||
uri: &str,
|
||||
formatter_asset: Option<&Q>,
|
||||
overwrite: bool,
|
||||
) -> Result<(), Error>;
|
||||
) -> Result<(), glib::Error>;
|
||||
|
||||
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_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,
|
||||
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,
|
||||
f: F,
|
||||
) -> SignalHandlerId;
|
||||
|
@ -133,7 +132,7 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
&self,
|
||||
id: Option<&str>,
|
||||
extractable_type: glib::types::Type,
|
||||
) -> Result<Option<Asset>, Error> {
|
||||
) -> Result<Option<Asset>, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
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 {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ges_sys::ges_project_load(
|
||||
|
@ -223,7 +222,7 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
uri: &str,
|
||||
formatter_asset: Option<&Q>,
|
||||
overwrite: bool,
|
||||
) -> Result<(), Error> {
|
||||
) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
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,
|
||||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn error_loading_asset_trampoline<
|
||||
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,
|
||||
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,
|
||||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn missing_uri_trampoline<
|
||||
P,
|
||||
F: Fn(&P, &Error, &Asset) -> Option<GString> + 'static,
|
||||
F: Fn(&P, &glib::Error, &Asset) -> Option<GString> + 'static,
|
||||
>(
|
||||
this: *mut ges_sys::GESProject,
|
||||
error: *mut glib_sys::GError,
|
||||
|
|
|
@ -15,7 +15,6 @@ use std::boxed::Box as Box_;
|
|||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
use Asset;
|
||||
use Error;
|
||||
use Extractable;
|
||||
use Group;
|
||||
use Layer;
|
||||
|
@ -42,7 +41,7 @@ impl Timeline {
|
|||
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!();
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
|
@ -97,7 +96,7 @@ pub trait TimelineExt: 'static {
|
|||
|
||||
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"))]
|
||||
fn move_layer<P: IsA<Layer>>(
|
||||
|
@ -122,7 +121,7 @@ pub trait TimelineExt: 'static {
|
|||
uri: &str,
|
||||
formatter_asset: Option<&P>,
|
||||
overwrite: bool,
|
||||
) -> Result<(), Error>;
|
||||
) -> Result<(), glib::Error>;
|
||||
|
||||
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 {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ges_sys::ges_timeline_load_from_uri(
|
||||
|
@ -383,7 +382,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
uri: &str,
|
||||
formatter_asset: Option<&P>,
|
||||
overwrite: bool,
|
||||
) -> Result<(), Error> {
|
||||
) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ges_sys::ges_timeline_save_to_uri(
|
||||
|
|
|
@ -9,7 +9,6 @@ use glib::object::IsA;
|
|||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
|
@ -17,7 +18,6 @@ use std::boxed::Box as Box_;
|
|||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
use Asset;
|
||||
use Error;
|
||||
use UriSourceAsset;
|
||||
|
||||
glib_wrapper! {
|
||||
|
@ -30,15 +30,15 @@ glib_wrapper! {
|
|||
|
||||
impl UriClipAsset {
|
||||
//#[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() }
|
||||
//}
|
||||
|
||||
//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() }
|
||||
//}
|
||||
|
||||
pub fn request_sync(uri: &str) -> Result<UriClipAsset, Error> {
|
||||
pub fn request_sync(uri: &str) -> Result<UriClipAsset, glib::Error> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||
|
|
|
@ -9,7 +9,6 @@ use gst;
|
|||
use gst_gl_sys;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
use Error;
|
||||
use GLDisplay;
|
||||
use GLPlatform;
|
||||
use GLSLProfile;
|
||||
|
@ -77,11 +76,11 @@ pub trait GLContextExt: 'static {
|
|||
|
||||
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 fill_info(&self) -> Result<(), Error>;
|
||||
fn fill_info(&self) -> Result<(), glib::Error>;
|
||||
|
||||
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 {
|
||||
let mut error = ptr::null_mut();
|
||||
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 {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ =
|
||||
|
|
|
@ -14,7 +14,6 @@ use gst_gl_sys;
|
|||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
use Error;
|
||||
use GLContext;
|
||||
use GLDisplayType;
|
||||
use GLWindow;
|
||||
|
@ -49,7 +48,10 @@ pub const NONE_GL_DISPLAY: Option<&GLDisplay> = None;
|
|||
pub trait GLDisplayExt: 'static {
|
||||
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>;
|
||||
|
||||
|
@ -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 {
|
||||
let mut p_context = 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::mem::transmute;
|
||||
use std::ptr;
|
||||
use Error;
|
||||
use GLContext;
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
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!();
|
||||
unsafe {
|
||||
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() }
|
||||
//}
|
||||
|
||||
//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() }
|
||||
//}
|
||||
|
||||
|
@ -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 {
|
||||
let mut error = ptr::null_mut();
|
||||
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)) }
|
||||
}
|
||||
|
||||
pub fn link(&self) -> Result<(), Error> {
|
||||
pub fn link(&self) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = gst_gl_sys::gst_gl_shader_link(self.to_glib_none().0, &mut error);
|
||||
|
|
|
@ -5,11 +5,9 @@
|
|||
use glib;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use gst;
|
||||
use gst_gl_sys;
|
||||
use std::ptr;
|
||||
use Error;
|
||||
use GLContext;
|
||||
use GLSLProfile;
|
||||
use GLSLVersion;
|
||||
|
@ -91,7 +89,7 @@ impl GLSLStage {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn compile(&self) -> Result<(), Error> {
|
||||
pub fn compile(&self) -> Result<(), glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
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)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||
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)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||
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::ptr;
|
||||
use DiscovererInfo;
|
||||
use Error;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Discoverer(Object<gst_pbutils_sys::GstDiscoverer, gst_pbutils_sys::GstDiscovererClass, DiscovererClass>);
|
||||
|
@ -32,7 +31,7 @@ glib_wrapper! {
|
|||
}
|
||||
|
||||
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!();
|
||||
unsafe {
|
||||
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 {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = gst_pbutils_sys::gst_discoverer_discover_uri(
|
||||
|
@ -113,13 +112,13 @@ impl Discoverer {
|
|||
}
|
||||
|
||||
pub fn connect_discovered<
|
||||
F: Fn(&Discoverer, &DiscovererInfo, Option<&Error>) + Send + Sync + 'static,
|
||||
F: Fn(&Discoverer, &DiscovererInfo, Option<&glib::Error>) + Send + Sync + 'static,
|
||||
>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
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,
|
||||
info: *mut gst_pbutils_sys::GstDiscovererInfo,
|
||||
|
@ -130,7 +129,7 @@ impl Discoverer {
|
|||
f(
|
||||
&from_glib_borrow(this),
|
||||
&from_glib_borrow(info),
|
||||
Option::<Error>::from_glib_borrow(error).as_ref(),
|
||||
Option::<glib::Error>::from_glib_borrow(error).as_ref(),
|
||||
)
|
||||
}
|
||||
unsafe {
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use glib;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use gst_pbutils_sys;
|
||||
use std;
|
||||
use std::ptr;
|
||||
use EncodingProfile;
|
||||
use Error;
|
||||
|
||||
glib_wrapper! {
|
||||
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 {
|
||||
let mut error = ptr::null_mut();
|
||||
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 {
|
||||
let mut error = ptr::null_mut();
|
||||
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!();
|
||||
unsafe {
|
||||
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!();
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||
|
|
|
@ -18,7 +18,6 @@ use gst_video;
|
|||
use libc;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use Error;
|
||||
use PlayerAudioInfo;
|
||||
use PlayerColorBalanceType;
|
||||
use PlayerMediaInfo;
|
||||
|
@ -501,8 +500,11 @@ impl Player {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn connect_error<F: Fn(&Player, &Error) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn error_trampoline<F: Fn(&Player, &Error) + Send + 'static>(
|
||||
pub fn connect_error<F: Fn(&Player, &glib::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,
|
||||
object: *mut glib_sys::GError,
|
||||
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,
|
||||
f: F,
|
||||
) -> 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,
|
||||
object: *mut glib_sys::GError,
|
||||
f: glib_sys::gpointer,
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||
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)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||
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::mem::transmute;
|
||||
use std::ptr;
|
||||
use Error;
|
||||
use RTSPAuth;
|
||||
use RTSPClient;
|
||||
use RTSPFilterResult;
|
||||
|
@ -76,12 +75,12 @@ pub trait RTSPServerExt: 'static {
|
|||
fn create_socket<P: IsA<gio::Cancellable>>(
|
||||
&self,
|
||||
cancellable: Option<&P>,
|
||||
) -> Result<gio::Socket, Error>;
|
||||
) -> Result<gio::Socket, glib::Error>;
|
||||
|
||||
fn create_source<P: IsA<gio::Cancellable>>(
|
||||
&self,
|
||||
cancellable: Option<&P>,
|
||||
) -> Result<glib::Source, Error>;
|
||||
) -> Result<glib::Source, glib::Error>;
|
||||
|
||||
fn get_address(&self) -> Option<GString>;
|
||||
|
||||
|
@ -204,7 +203,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
fn create_socket<P: IsA<gio::Cancellable>>(
|
||||
&self,
|
||||
cancellable: Option<&P>,
|
||||
) -> Result<gio::Socket, Error> {
|
||||
) -> Result<gio::Socket, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
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>>(
|
||||
&self,
|
||||
cancellable: Option<&P>,
|
||||
) -> Result<glib::Source, Error> {
|
||||
) -> Result<glib::Source, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
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)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||
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)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||
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)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||
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)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||
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)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 6bdf324)
|
||||
|
|
|
@ -19,7 +19,6 @@ use Clock;
|
|||
use ClockTime;
|
||||
use Context;
|
||||
use ElementFactory;
|
||||
use Error;
|
||||
use Message;
|
||||
use Object;
|
||||
use Pad;
|
||||
|
@ -40,7 +39,7 @@ impl Element {
|
|||
type_: URIType,
|
||||
uri: &str,
|
||||
elementname: Option<&str>,
|
||||
) -> Result<Element, Error> {
|
||||
) -> Result<Element, glib::Error> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
|
|
|
@ -15,7 +15,6 @@ use ClockTime;
|
|||
use DebugGraphDetails;
|
||||
use DebugLevel;
|
||||
use Element;
|
||||
use Error;
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
use StackTraceFlags;
|
||||
|
||||
|
@ -162,7 +161,7 @@ pub fn get_main_executable_path() -> Option<GString> {
|
|||
pub fn parse_bin_from_description(
|
||||
bin_description: &str,
|
||||
ghost_unlinked_pads: bool,
|
||||
) -> Result<Bin, Error> {
|
||||
) -> Result<Bin, glib::Error> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
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!();
|
||||
unsafe {
|
||||
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!();
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
|
|
|
@ -14,7 +14,6 @@ use gst_sys;
|
|||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use ClockTime;
|
||||
use Error;
|
||||
|
||||
glib_wrapper! {
|
||||
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 {
|
||||
//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>;
|
||||
|
||||
|
@ -118,7 +117,7 @@ impl<O: IsA<Object>> GstObjectExt for O {
|
|||
// 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 {
|
||||
gst_sys::gst_object_default_error(
|
||||
self.as_ref().to_glib_none().0,
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use glib;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use gst_sys;
|
||||
use std;
|
||||
use std::ptr;
|
||||
use Error;
|
||||
use Object;
|
||||
use PluginDependencyFlags;
|
||||
|
||||
|
@ -105,7 +105,7 @@ impl Plugin {
|
|||
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!();
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use glib;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use gst_sys;
|
||||
use std::ptr;
|
||||
use Error;
|
||||
use URIType;
|
||||
|
||||
glib_wrapper! {
|
||||
|
@ -30,7 +30,7 @@ pub trait URIHandlerExt: 'static {
|
|||
|
||||
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 {
|
||||
|
@ -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 {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = gst_sys::gst_uri_handler_set_uri(
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 6c8c7c4)
|
||||
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());
|
||||
|
||||
let array_json =
|
||||
r#"[["Fraction",[1,3]],["Fraction",[1,2]],["String","test str"],["String",null],["Date",{"YMD":[2019,8,19]}],["Date",null]]"#;
|
||||
let array_json = 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 slice = array.as_slice();
|
||||
assert_eq!(6, slice.len());
|
||||
|
|
Loading…
Reference in a new issue