mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 17:41:05 +00:00
gstreamer-base: update signatures to Result<(), glib::BoolError>
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/175
This commit is contained in:
parent
c65214b207
commit
7cb1dc9cb4
3 changed files with 19 additions and 6 deletions
|
@ -92,6 +92,11 @@ name = "GstBase.BaseSrc"
|
||||||
subclassing = true
|
subclassing = true
|
||||||
status = "generate"
|
status = "generate"
|
||||||
|
|
||||||
|
[[object.function]]
|
||||||
|
name = "set_caps"
|
||||||
|
[object.function.return]
|
||||||
|
bool_return_is_error = "Failed to set caps"
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "start_complete"
|
name = "start_complete"
|
||||||
# Use Result<FlowSuccess, FlowError>
|
# Use Result<FlowSuccess, FlowError>
|
||||||
|
@ -117,6 +122,12 @@ name = "GstBase.BaseTransform"
|
||||||
subclassing = true
|
subclassing = true
|
||||||
status = "generate"
|
status = "generate"
|
||||||
|
|
||||||
|
[[object.function]]
|
||||||
|
name = "update_src_caps"
|
||||||
|
[object.function.return]
|
||||||
|
bool_return_is_error = "Failed to update src caps"
|
||||||
|
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "GstBase.Aggregator"
|
name = "GstBase.Aggregator"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use ffi;
|
use ffi;
|
||||||
|
use glib;
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::object::Cast;
|
use glib::object::Cast;
|
||||||
|
@ -53,7 +54,7 @@ pub trait BaseSrcExt: 'static {
|
||||||
|
|
||||||
fn set_blocksize(&self, blocksize: u32);
|
fn set_blocksize(&self, blocksize: u32);
|
||||||
|
|
||||||
fn set_caps(&self, caps: &gst::Caps) -> bool;
|
fn set_caps(&self, caps: &gst::Caps) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
fn set_do_timestamp(&self, timestamp: bool);
|
fn set_do_timestamp(&self, timestamp: bool);
|
||||||
|
|
||||||
|
@ -149,9 +150,9 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_caps(&self, caps: &gst::Caps) -> bool {
|
fn set_caps(&self, caps: &gst::Caps) -> Result<(), glib::error::BoolError> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib(ffi::gst_base_src_set_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0))
|
glib_result_from_gboolean!(ffi::gst_base_src_set_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0), "Failed to set caps")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use ffi;
|
use ffi;
|
||||||
|
use glib;
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib::object::Cast;
|
use glib::object::Cast;
|
||||||
|
@ -56,7 +57,7 @@ pub trait BaseTransformExt: 'static {
|
||||||
|
|
||||||
fn update_qos(&self, proportion: f64, diff: gst::ClockTimeDiff, timestamp: gst::ClockTime);
|
fn update_qos(&self, proportion: f64, diff: gst::ClockTimeDiff, timestamp: gst::ClockTime);
|
||||||
|
|
||||||
fn update_src_caps(&self, updated_caps: &gst::Caps) -> bool;
|
fn update_src_caps(&self, updated_caps: &gst::Caps) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
fn get_property_qos(&self) -> bool;
|
fn get_property_qos(&self) -> bool;
|
||||||
|
|
||||||
|
@ -142,9 +143,9 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update_src_caps(&self, updated_caps: &gst::Caps) -> bool {
|
fn update_src_caps(&self, updated_caps: &gst::Caps) -> Result<(), glib::error::BoolError> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib(ffi::gst_base_transform_update_src_caps(self.as_ref().to_glib_none().0, updated_caps.to_glib_none().0))
|
glib_result_from_gboolean!(ffi::gst_base_transform_update_src_caps(self.as_ref().to_glib_none().0, updated_caps.to_glib_none().0), "Failed to update src caps")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue