Commit 3200574d authored by François Laignel's avatar François Laignel

Update to latest gir

See https://github.com/gtk-rs/gir/pull/687
parent 98d0bc01
Generated by gir (https://github.com/gtk-rs/gir @ c5498ac) Generated by gir (https://github.com/gtk-rs/gir @ d41632a)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)
Generated by gir (https://github.com/gtk-rs/gir @ c5498ac) Generated by gir (https://github.com/gtk-rs/gir @ d41632a)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)
Generated by gir (https://github.com/gtk-rs/gir @ c5498ac) Generated by gir (https://github.com/gtk-rs/gir @ d41632a)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)
Generated by gir (https://github.com/gtk-rs/gir @ c5498ac) Generated by gir (https://github.com/gtk-rs/gir @ d41632a)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)
...@@ -61,13 +61,13 @@ pub trait GESContainerExt: 'static { ...@@ -61,13 +61,13 @@ pub trait GESContainerExt: 'static {
impl<O: IsA<Container>> GESContainerExt for O { impl<O: IsA<Container>> GESContainerExt for O {
fn add<P: IsA<TimelineElement>>(&self, child: &P) -> Result<(), glib::error::BoolError> { fn add<P: IsA<TimelineElement>>(&self, child: &P) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::ges_container_add(self.to_glib_none().0, child.to_glib_none().0), "Failed to add element") glib_result_from_gboolean!(ffi::ges_container_add(self.to_glib_none().0, child.to_glib_none().0), "Failed to add element")
} }
} }
fn edit(&self, layers: &[Layer], new_layer_priority: i32, mode: EditMode, edge: Edge, position: u64) -> Result<(), glib::error::BoolError> { fn edit(&self, layers: &[Layer], new_layer_priority: i32, mode: EditMode, edge: Edge, position: u64) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::ges_container_edit(self.to_glib_none().0, layers.to_glib_none().0, new_layer_priority, mode.to_glib(), edge.to_glib(), position), "Failed to edit container") glib_result_from_gboolean!(ffi::ges_container_edit(self.to_glib_none().0, layers.to_glib_none().0, new_layer_priority, mode.to_glib(), edge.to_glib(), position), "Failed to edit container")
} }
} }
...@@ -79,7 +79,7 @@ impl<O: IsA<Container>> GESContainerExt for O { ...@@ -79,7 +79,7 @@ impl<O: IsA<Container>> GESContainerExt for O {
fn remove<P: IsA<TimelineElement>>(&self, child: &P) -> Result<(), glib::error::BoolError> { fn remove<P: IsA<TimelineElement>>(&self, child: &P) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::ges_container_remove(self.to_glib_none().0, child.to_glib_none().0), "Failed to remove element") glib_result_from_gboolean!(ffi::ges_container_remove(self.to_glib_none().0, child.to_glib_none().0), "Failed to remove element")
} }
} }
......
...@@ -157,13 +157,13 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O { ...@@ -157,13 +157,13 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
fn set_mode(&self, mode: PipelineFlags) -> Result<(), glib::error::BoolError> { fn set_mode(&self, mode: PipelineFlags) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::ges_pipeline_set_mode(self.to_glib_none().0, mode.to_glib()), "Failed to set mode") glib_result_from_gboolean!(ffi::ges_pipeline_set_mode(self.to_glib_none().0, mode.to_glib()), "Failed to set mode")
} }
} }
fn set_render_settings<P: IsA<gst_pbutils::EncodingProfile>>(&self, output_uri: &str, profile: &P) -> Result<(), glib::error::BoolError> { fn set_render_settings<P: IsA<gst_pbutils::EncodingProfile>>(&self, output_uri: &str, profile: &P) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::ges_pipeline_set_render_settings(self.to_glib_none().0, output_uri.to_glib_none().0, profile.to_glib_none().0), "Failed to set render settings") glib_result_from_gboolean!(ffi::ges_pipeline_set_render_settings(self.to_glib_none().0, output_uri.to_glib_none().0, profile.to_glib_none().0), "Failed to set render settings")
} }
} }
......
...@@ -146,13 +146,13 @@ pub trait TimelineExt: 'static { ...@@ -146,13 +146,13 @@ pub trait TimelineExt: 'static {
impl<O: IsA<Timeline>> TimelineExt for O { impl<O: IsA<Timeline>> TimelineExt for O {
fn add_layer(&self, layer: &Layer) -> Result<(), glib::error::BoolError> { fn add_layer(&self, layer: &Layer) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::ges_timeline_add_layer(self.to_glib_none().0, layer.to_glib_none().0), "Failed to add layer") glib_result_from_gboolean!(ffi::ges_timeline_add_layer(self.to_glib_none().0, layer.to_glib_none().0), "Failed to add layer")
} }
} }
fn add_track<P: IsA<Track>>(&self, track: &P) -> Result<(), glib::error::BoolError> { fn add_track<P: IsA<Track>>(&self, track: &P) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::ges_timeline_add_track(self.to_glib_none().0, track.to_glib_full()), "Failed to add track") glib_result_from_gboolean!(ffi::ges_timeline_add_track(self.to_glib_none().0, track.to_glib_full()), "Failed to add track")
} }
} }
...@@ -250,7 +250,7 @@ impl<O: IsA<Timeline>> TimelineExt for O { ...@@ -250,7 +250,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
fn move_layer(&self, layer: &Layer, new_layer_priority: u32) -> Result<(), glib::error::BoolError> { fn move_layer(&self, layer: &Layer, new_layer_priority: u32) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::ges_timeline_move_layer(self.to_glib_none().0, layer.to_glib_none().0, new_layer_priority), "Failed to move layer") glib_result_from_gboolean!(ffi::ges_timeline_move_layer(self.to_glib_none().0, layer.to_glib_none().0, new_layer_priority), "Failed to move layer")
} }
} }
...@@ -262,7 +262,7 @@ impl<O: IsA<Timeline>> TimelineExt for O { ...@@ -262,7 +262,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
fn remove_layer(&self, layer: &Layer) -> Result<(), glib::error::BoolError> { fn remove_layer(&self, layer: &Layer) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::ges_timeline_remove_layer(self.to_glib_none().0, layer.to_glib_none().0), "Failed to remove layer") glib_result_from_gboolean!(ffi::ges_timeline_remove_layer(self.to_glib_none().0, layer.to_glib_none().0), "Failed to remove layer")
} }
} }
......
...@@ -88,7 +88,7 @@ pub trait GESTrackExt: 'static { ...@@ -88,7 +88,7 @@ pub trait GESTrackExt: 'static {
impl<O: IsA<Track>> GESTrackExt for O { impl<O: IsA<Track>> GESTrackExt for O {
fn add_element<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), glib::error::BoolError> { fn add_element<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::ges_track_add_element(self.to_glib_none().0, object.to_glib_none().0), "Failed to add element") glib_result_from_gboolean!(ffi::ges_track_add_element(self.to_glib_none().0, object.to_glib_none().0), "Failed to add element")
} }
} }
...@@ -124,7 +124,7 @@ impl<O: IsA<Track>> GESTrackExt for O { ...@@ -124,7 +124,7 @@ impl<O: IsA<Track>> GESTrackExt for O {
fn remove_element<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), glib::error::BoolError> { fn remove_element<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::ges_track_remove_element(self.to_glib_none().0, object.to_glib_none().0), "Failed to remove element") glib_result_from_gboolean!(ffi::ges_track_remove_element(self.to_glib_none().0, object.to_glib_none().0), "Failed to remove element")
} }
} }
......
Generated by gir (https://github.com/gtk-rs/gir @ c5498ac) Generated by gir (https://github.com/gtk-rs/gir @ d41632a)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)
...@@ -104,7 +104,7 @@ pub trait GLContextExt: 'static { ...@@ -104,7 +104,7 @@ pub trait GLContextExt: 'static {
impl<O: IsA<GLContext>> GLContextExt for O { impl<O: IsA<GLContext>> GLContextExt for O {
fn activate(&self, activate: bool) -> Result<(), glib::error::BoolError> { fn activate(&self, activate: bool) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_gl_context_activate(self.to_glib_none().0, activate.to_glib()), "Failed to activate OpenGL context") glib_result_from_gboolean!(ffi::gst_gl_context_activate(self.to_glib_none().0, activate.to_glib()), "Failed to activate OpenGL context")
} }
} }
......
...@@ -72,7 +72,7 @@ pub trait GLDisplayExt: 'static { ...@@ -72,7 +72,7 @@ pub trait GLDisplayExt: 'static {
impl<O: IsA<GLDisplay>> GLDisplayExt for O { impl<O: IsA<GLDisplay>> GLDisplayExt for O {
fn add_context(&self, context: &GLContext) -> Result<(), glib::error::BoolError> { fn add_context(&self, context: &GLContext) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_gl_display_add_context(self.to_glib_none().0, context.to_glib_none().0), "Failed to add OpenGL context") glib_result_from_gboolean!(ffi::gst_gl_display_add_context(self.to_glib_none().0, context.to_glib_none().0), "Failed to add OpenGL context")
} }
} }
...@@ -117,7 +117,7 @@ impl<O: IsA<GLDisplay>> GLDisplayExt for O { ...@@ -117,7 +117,7 @@ impl<O: IsA<GLDisplay>> GLDisplayExt for O {
fn remove_window(&self, window: &GLWindow) -> Result<(), glib::error::BoolError> { fn remove_window(&self, window: &GLWindow) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_gl_display_remove_window(self.to_glib_none().0, window.to_glib_none().0), "Failed to remove window") glib_result_from_gboolean!(ffi::gst_gl_display_remove_window(self.to_glib_none().0, window.to_glib_none().0), "Failed to remove window")
} }
} }
......
Generated by gir (https://github.com/gtk-rs/gir @ c5498ac) Generated by gir (https://github.com/gtk-rs/gir @ d41632a)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)
Generated by gir (https://github.com/gtk-rs/gir @ c5498ac) Generated by gir (https://github.com/gtk-rs/gir @ d41632a)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)
...@@ -44,7 +44,7 @@ impl Discoverer { ...@@ -44,7 +44,7 @@ impl Discoverer {
pub fn discover_uri_async(&self, uri: &str) -> Result<(), glib::error::BoolError> { pub fn discover_uri_async(&self, uri: &str) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_discoverer_discover_uri_async(self.to_glib_none().0, uri.to_glib_none().0), "Failed to add URI to list of discovers") glib_result_from_gboolean!(ffi::gst_discoverer_discover_uri_async(self.to_glib_none().0, uri.to_glib_none().0), "Failed to add URI to list of discovers")
} }
} }
......
Generated by gir (https://github.com/gtk-rs/gir @ c5498ac) Generated by gir (https://github.com/gtk-rs/gir @ d41632a)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)
...@@ -175,7 +175,7 @@ impl Player { ...@@ -175,7 +175,7 @@ impl Player {
pub fn set_audio_track(&self, stream_index: i32) -> Result<(), glib::error::BoolError> { pub fn set_audio_track(&self, stream_index: i32) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_player_set_audio_track(self.to_glib_none().0, stream_index), "Failed to set audio track") glib_result_from_gboolean!(ffi::gst_player_set_audio_track(self.to_glib_none().0, stream_index), "Failed to set audio track")
} }
} }
...@@ -223,7 +223,7 @@ impl Player { ...@@ -223,7 +223,7 @@ impl Player {
pub fn set_subtitle_track(&self, stream_index: i32) -> Result<(), glib::error::BoolError> { pub fn set_subtitle_track(&self, stream_index: i32) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_player_set_subtitle_track(self.to_glib_none().0, stream_index), "Failed to set subtitle track") glib_result_from_gboolean!(ffi::gst_player_set_subtitle_track(self.to_glib_none().0, stream_index), "Failed to set subtitle track")
} }
} }
...@@ -247,7 +247,7 @@ impl Player { ...@@ -247,7 +247,7 @@ impl Player {
pub fn set_video_track(&self, stream_index: i32) -> Result<(), glib::error::BoolError> { pub fn set_video_track(&self, stream_index: i32) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_player_set_video_track(self.to_glib_none().0, stream_index), "Failed to set video track") glib_result_from_gboolean!(ffi::gst_player_set_video_track(self.to_glib_none().0, stream_index), "Failed to set video track")
} }
} }
...@@ -261,7 +261,7 @@ impl Player { ...@@ -261,7 +261,7 @@ impl Player {
let name = name.into(); let name = name.into();
let name = name.to_glib_none(); let name = name.to_glib_none();
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_player_set_visualization(self.to_glib_none().0, name.0), "Failed to set visualization") glib_result_from_gboolean!(ffi::gst_player_set_visualization(self.to_glib_none().0, name.0), "Failed to set visualization")
} }
} }
......
Generated by gir (https://github.com/gtk-rs/gir @ c5498ac) Generated by gir (https://github.com/gtk-rs/gir @ d41632a)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)
...@@ -56,7 +56,7 @@ impl<O: IsA<RTSPAddressPool>> RTSPAddressPoolExt for O { ...@@ -56,7 +56,7 @@ impl<O: IsA<RTSPAddressPool>> RTSPAddressPoolExt for O {
fn add_range(&self, min_address: &str, max_address: &str, min_port: u16, max_port: u16, ttl: u8) -> Result<(), glib::error::BoolError> { fn add_range(&self, min_address: &str, max_address: &str, min_port: u16, max_port: u16, ttl: u8) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_rtsp_address_pool_add_range(self.to_glib_none().0, min_address.to_glib_none().0, max_address.to_glib_none().0, min_port, max_port, ttl), "Failed to add address range") glib_result_from_gboolean!(ffi::gst_rtsp_address_pool_add_range(self.to_glib_none().0, min_address.to_glib_none().0, max_address.to_glib_none().0, min_port, max_port, ttl), "Failed to add address range")
} }
} }
......
...@@ -507,7 +507,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O { ...@@ -507,7 +507,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
fn suspend(&self) -> Result<(), glib::error::BoolError> { fn suspend(&self) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_rtsp_media_suspend(self.to_glib_none().0), "Failed to suspend media") glib_result_from_gboolean!(ffi::gst_rtsp_media_suspend(self.to_glib_none().0), "Failed to suspend media")
} }
} }
...@@ -519,13 +519,13 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O { ...@@ -519,13 +519,13 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
fn unprepare(&self) -> Result<(), glib::error::BoolError> { fn unprepare(&self) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_rtsp_media_unprepare(self.to_glib_none().0), "Failed to unprepare media") glib_result_from_gboolean!(ffi::gst_rtsp_media_unprepare(self.to_glib_none().0), "Failed to unprepare media")
} }
} }
fn unsuspend(&self) -> Result<(), glib::error::BoolError> { fn unsuspend(&self) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_rtsp_media_unsuspend(self.to_glib_none().0), "Failed to unsuspend media") glib_result_from_gboolean!(ffi::gst_rtsp_media_unsuspend(self.to_glib_none().0), "Failed to unsuspend media")
} }
} }
......
...@@ -107,7 +107,7 @@ impl<O: IsA<RTSPSessionMedia>> RTSPSessionMediaExt for O { ...@@ -107,7 +107,7 @@ impl<O: IsA<RTSPSessionMedia>> RTSPSessionMediaExt for O {
fn set_state(&self, state: gst::State) -> Result<(), glib::error::BoolError> { fn set_state(&self, state: gst::State) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_rtsp_session_media_set_state(self.to_glib_none().0, state.to_glib()), "Failed to set state of session media") glib_result_from_gboolean!(ffi::gst_rtsp_session_media_set_state(self.to_glib_none().0, state.to_glib()), "Failed to set state of session media")
} }
} }
......
...@@ -99,7 +99,7 @@ impl<O: IsA<RTSPSessionPool>> RTSPSessionPoolExt for O { ...@@ -99,7 +99,7 @@ impl<O: IsA<RTSPSessionPool>> RTSPSessionPoolExt for O {
fn remove(&self, sess: &RTSPSession) -> Result<(), glib::error::BoolError> { fn remove(&self, sess: &RTSPSession) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_rtsp_session_pool_remove(self.to_glib_none().0, sess.to_glib_none().0), "Failed to remove session from pool") glib_result_from_gboolean!(ffi::gst_rtsp_session_pool_remove(self.to_glib_none().0, sess.to_glib_none().0), "Failed to remove session from pool")
} }
} }
......
...@@ -186,7 +186,7 @@ pub trait RTSPStreamExt: 'static { ...@@ -186,7 +186,7 @@ pub trait RTSPStreamExt: 'static {
impl<O: IsA<RTSPStream>> RTSPStreamExt for O { impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
fn add_transport(&self, trans: &RTSPStreamTransport) -> Result<(), glib::error::BoolError> { fn add_transport(&self, trans: &RTSPStreamTransport) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_rtsp_stream_add_transport(self.to_glib_none().0, trans.to_glib_none().0), "Failed to add transport") glib_result_from_gboolean!(ffi::gst_rtsp_stream_add_transport(self.to_glib_none().0, trans.to_glib_none().0), "Failed to add transport")
} }
} }
...@@ -415,13 +415,13 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O { ...@@ -415,13 +415,13 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
fn join_bin<P: IsA<gst::Bin>, Q: IsA<gst::Element>>(&self, bin: &P, rtpbin: &Q, state: gst::State) -> Result<(), glib::error::BoolError> { fn join_bin<P: IsA<gst::Bin>, Q: IsA<gst::Element>>(&self, bin: &P, rtpbin: &Q, state: gst::State) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_rtsp_stream_join_bin(self.to_glib_none().0, bin.to_glib_none().0, rtpbin.to_glib_none().0, state.to_glib()), "Failed to join bin") glib_result_from_gboolean!(ffi::gst_rtsp_stream_join_bin(self.to_glib_none().0, bin.to_glib_none().0, rtpbin.to_glib_none().0, state.to_glib()), "Failed to join bin")
} }
} }
fn leave_bin<P: IsA<gst::Bin>, Q: IsA<gst::Element>>(&self, bin: &P, rtpbin: &Q) -> Result<(), glib::error::BoolError> { fn leave_bin<P: IsA<gst::Bin>, Q: IsA<gst::Element>>(&self, bin: &P, rtpbin: &Q) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_rtsp_stream_leave_bin(self.to_glib_none().0, bin.to_glib_none().0, rtpbin.to_glib_none().0), "Failed to leave bin") glib_result_from_gboolean!(ffi::gst_rtsp_stream_leave_bin(self.to_glib_none().0, bin.to_glib_none().0, rtpbin.to_glib_none().0), "Failed to leave bin")
} }
} }
...@@ -439,7 +439,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O { ...@@ -439,7 +439,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
fn remove_transport(&self, trans: &RTSPStreamTransport) -> Result<(), glib::error::BoolError> { fn remove_transport(&self, trans: &RTSPStreamTransport) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_rtsp_stream_remove_transport(self.to_glib_none().0, trans.to_glib_none().0), "Failed to remove transport") glib_result_from_gboolean!(ffi::gst_rtsp_stream_remove_transport(self.to_glib_none().0, trans.to_glib_none().0), "Failed to remove transport")
} }
} }
......
...@@ -100,19 +100,19 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O { ...@@ -100,19 +100,19 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
fn send_rtcp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError> { fn send_rtcp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_rtsp_stream_transport_send_rtcp(self.to_glib_none().0, buffer.to_glib_none().0), "Failed to send rtcp") glib_result_from_gboolean!(ffi::gst_rtsp_stream_transport_send_rtcp(self.to_glib_none().0, buffer.to_glib_none().0), "Failed to send rtcp")
} }
} }
fn send_rtp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError> { fn send_rtp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_rtsp_stream_transport_send_rtp(self.to_glib_none().0, buffer.to_glib_none().0), "Failed to send rtp") glib_result_from_gboolean!(ffi::gst_rtsp_stream_transport_send_rtp(self.to_glib_none().0, buffer.to_glib_none().0), "Failed to send rtp")
} }
} }
fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError> { fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_rtsp_stream_transport_set_active(self.to_glib_none().0, active.to_glib()), "Failed to set active") glib_result_from_gboolean!(ffi::gst_rtsp_stream_transport_set_active(self.to_glib_none().0, active.to_glib()), "Failed to set active")
} }
} }
......
Generated by gir (https://github.com/gtk-rs/gir @ c5498ac) Generated by gir (https://github.com/gtk-rs/gir @ d41632a)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)
Generated by gir (https://github.com/gtk-rs/gir @ c5498ac) Generated by gir (https://github.com/gtk-rs/gir @ d41632a)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)
Generated by gir (https://github.com/gtk-rs/gir @ c5498ac) Generated by gir (https://github.com/gtk-rs/gir @ d41632a)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)
Generated by gir (https://github.com/gtk-rs/gir @ c5498ac) Generated by gir (https://github.com/gtk-rs/gir @ d41632a)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)
...@@ -67,7 +67,7 @@ impl<O: IsA<VideoOverlay>> VideoOverlayExt for O { ...@@ -67,7 +67,7 @@ impl<O: IsA<VideoOverlay>> VideoOverlayExt for O {
fn set_render_rectangle(&self, x: i32, y: i32, width: i32, height: i32) -> Result<(), glib::error::BoolError> { fn set_render_rectangle(&self, x: i32, y: i32, width: i32, height: i32) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_video_overlay_set_render_rectangle(self.to_glib_none().0, x, y, width, height), "Failed to set render rectangle") glib_result_from_gboolean!(ffi::gst_video_overlay_set_render_rectangle(self.to_glib_none().0, x, y, width, height), "Failed to set render rectangle")
} }
} }
......
Generated by gir (https://github.com/gtk-rs/gir @ c5498ac) Generated by gir (https://github.com/gtk-rs/gir @ d41632a)
from gir-files (https://github.com/gtk-rs/gir-files @ ???) from gir-files (https://github.com/gtk-rs/gir-files @ ???)
...@@ -113,7 +113,7 @@ pub trait GstBinExt: 'static { ...@@ -113,7 +113,7 @@ pub trait GstBinExt: 'static {
impl<O: IsA<Bin>> GstBinExt for O { impl<O: IsA<Bin>> GstBinExt for O {
fn add<P: IsA<Element>>(&self, element: &P) -> Result<(), glib::error::BoolError> { fn add<P: IsA<Element>>(&self, element: &P) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_bin_add(self.to_glib_none().0, element.to_glib_none().0), "Failed to add element") glib_result_from_gboolean!(ffi::gst_bin_add(self.to_glib_none().0, element.to_glib_none().0), "Failed to add element")
} }
} }
...@@ -178,13 +178,13 @@ impl<O: IsA<Bin>> GstBinExt for O { ...@@ -178,13 +178,13 @@ impl<O: IsA<Bin>> GstBinExt for O {
fn recalculate_latency(&self) -> Result<(), glib::error::BoolError> { fn recalculate_latency(&self) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_bin_recalculate_latency(self.to_glib_none().0), "Failed to recalculate latency") glib_result_from_gboolean!(ffi::gst_bin_recalculate_latency(self.to_glib_none().0), "Failed to recalculate latency")
} }
} }
fn remove<P: IsA<Element>>(&self, element: &P) -> Result<(), glib::error::BoolError> { fn remove<P: IsA<Element>>(&self, element: &P) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_bin_remove(self.to_glib_none().0, element.to_glib_none().0), "Failed to remove element") glib_result_from_gboolean!(ffi::gst_bin_remove(self.to_glib_none().0, element.to_glib_none().0), "Failed to remove element")
} }
} }
...@@ -201,7 +201,7 @@ impl<O: IsA<Bin>> GstBinExt for O { ...@@ -201,7 +201,7 @@ impl<O: IsA<Bin>> GstBinExt for O {
fn sync_children_states(&self) -> Result<(), glib::error::BoolError> { fn sync_children_states(&self) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_bin_sync_children_states(self.to_glib_none().0), "Failed to sync children states") glib_result_from_gboolean!(ffi::gst_bin_sync_children_states(self.to_glib_none().0), "Failed to sync children states")
} }
} }
......
...@@ -53,7 +53,7 @@ impl<O: IsA<BufferPool>> BufferPoolExt for O { ...@@ -53,7 +53,7 @@ impl<O: IsA<BufferPool>> BufferPoolExt for O {
fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError> { fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_buffer_pool_set_active(self.to_glib_none().0, active.to_glib()), "Failed to activate buffer pool") glib_result_from_gboolean!(ffi::gst_buffer_pool_set_active(self.to_glib_none().0, active.to_glib()), "Failed to activate buffer pool")
} }
} }
......
...@@ -85,7 +85,7 @@ impl Bus { ...@@ -85,7 +85,7 @@ impl Bus {
pub fn post(&self, message: &Message) -> Result<(), glib::error::BoolError> { pub fn post(&self, message: &Message) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_bus_post(self.to_glib_none().0, message.to_glib_full()), "Failed to post message") glib_result_from_gboolean!(ffi::gst_bus_post(self.to_glib_none().0, message.to_glib_full()), "Failed to post message")
} }
} }
......
...@@ -216,7 +216,7 @@ impl<O: IsA<Clock>> ClockExt for O { ...@@ -216,7 +216,7 @@ impl<O: IsA<Clock>> ClockExt for O {
let master = master.into(); let master = master.into();
let master = master.to_glib_none(); let master = master.to_glib_none();
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_clock_set_master(self.to_glib_none().0, master.0), "Failed to set master clock") glib_result_from_gboolean!(ffi::gst_clock_set_master(self.to_glib_none().0, master.0), "Failed to set master clock")
} }
} }
...@@ -250,7 +250,7 @@ impl<O: IsA<Clock>> ClockExt for O { ...@@ -250,7 +250,7 @@ impl<O: IsA<Clock>> ClockExt for O {
fn wait_for_sync(&self, timeout: ClockTime) -> Result<(), glib::error::BoolError> { fn wait_for_sync(&self, timeout: ClockTime) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_clock_wait_for_sync(self.to_glib_none().0, timeout.to_glib()), "Timed out waiting for sync") glib_result_from_gboolean!(ffi::gst_clock_wait_for_sync(self.to_glib_none().0, timeout.to_glib()), "Timed out waiting for sync")
} }
} }
......
...@@ -107,7 +107,7 @@ impl<O: IsA<DeviceMonitor>> DeviceMonitorExt for O { ...@@ -107,7 +107,7 @@ impl<O: IsA<DeviceMonitor>> DeviceMonitorExt for O {
fn start(&self) -> Result<(), glib::error::BoolError> { fn start(&self) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_device_monitor_start(self.to_glib_none().0), "Failed to start") glib_result_from_gboolean!(ffi::gst_device_monitor_start(self.to_glib_none().0), "Failed to start")
} }
} }
......
...@@ -34,7 +34,7 @@ impl DeviceProvider { ...@@ -34,7 +34,7 @@ impl DeviceProvider {
let plugin = plugin.into(); let plugin = plugin.into();
let plugin = plugin.to_glib_none(); let plugin = plugin.to_glib_none();
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_device_provider_register(plugin.0, name.to_glib_none().0, rank, type_.to_glib()), "Failed to register device provider factory") glib_result_from_gboolean!(ffi::gst_device_provider_register(plugin.0, name.to_glib_none().0, rank, type_.to_glib()), "Failed to register device provider factory")
} }
} }
} }
...@@ -121,7 +121,7 @@ impl<O: IsA<DeviceProvider>> DeviceProviderExt for O { ...@@ -121,7 +121,7 @@ impl<O: IsA<DeviceProvider>> DeviceProviderExt for O {
fn start(&self) -> Result<(), glib::error::BoolError> { fn start(&self) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_device_provider_start(self.to_glib_none().0), "Failed to start") glib_result_from_gboolean!(ffi::gst_device_provider_start(self.to_glib_none().0), "Failed to start")
} }
} }
......
...@@ -58,7 +58,7 @@ impl Element { ...@@ -58,7 +58,7 @@ impl Element {
let plugin = plugin.into(); let plugin = plugin.into();