forked from mirrors/gstreamer-rs
Regenerate with trusted nullability
This commit is contained in:
parent
ceeaf97793
commit
92df13eeb1
7 changed files with 31 additions and 32 deletions
|
@ -34,14 +34,13 @@ impl Adapter {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn copy_bytes(&self, offset: usize, size: usize) -> Result<glib::Bytes, glib::BoolError> {
|
||||
pub fn copy_bytes(&self, offset: usize, size: usize) -> glib::Bytes {
|
||||
unsafe {
|
||||
Option::<_>::from_glib_full(ffi::gst_adapter_copy_bytes(
|
||||
from_glib_full(ffi::gst_adapter_copy_bytes(
|
||||
self.to_glib_none().0,
|
||||
offset,
|
||||
size,
|
||||
))
|
||||
.ok_or_else(|| glib::glib_bool_error!("Failed to copy bytes"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ pub trait BaseSinkExt: 'static {
|
|||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn get_stats(&self) -> Option<gst::Structure>;
|
||||
fn get_stats(&self) -> gst::Structure;
|
||||
|
||||
fn get_sync(&self) -> bool;
|
||||
|
||||
|
@ -236,7 +236,7 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
|
|||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn get_stats(&self) -> Option<gst::Structure> {
|
||||
fn get_stats(&self) -> gst::Structure {
|
||||
unsafe { from_glib_full(ffi::gst_base_sink_get_stats(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ impl Clock {
|
|||
// unsafe { TODO: call ffi:gst_clock_id_get_time() }
|
||||
//}
|
||||
|
||||
//pub fn id_ref(id: /*Unimplemented*/ClockID) -> /*Unimplemented*/Option<ClockID> {
|
||||
//pub fn id_ref(id: /*Unimplemented*/ClockID) -> /*Unimplemented*/ClockID {
|
||||
// unsafe { TODO: call ffi:gst_clock_id_ref() }
|
||||
//}
|
||||
|
||||
|
@ -94,9 +94,9 @@ pub trait ClockExt: 'static {
|
|||
|
||||
fn is_synced(&self) -> bool;
|
||||
|
||||
//fn new_periodic_id(&self, start_time: ClockTime, interval: ClockTime) -> /*Unimplemented*/Option<ClockID>;
|
||||
//fn new_periodic_id(&self, start_time: ClockTime, interval: ClockTime) -> /*Unimplemented*/ClockID;
|
||||
|
||||
//fn new_single_shot_id(&self, time: ClockTime) -> /*Unimplemented*/Option<ClockID>;
|
||||
//fn new_single_shot_id(&self, time: ClockTime) -> /*Unimplemented*/ClockID;
|
||||
|
||||
//fn periodic_id_reinit(&self, id: /*Unimplemented*/ClockID, start_time: ClockTime, interval: ClockTime) -> bool;
|
||||
|
||||
|
@ -274,11 +274,11 @@ impl<O: IsA<Clock>> ClockExt for O {
|
|||
unsafe { from_glib(ffi::gst_clock_is_synced(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
//fn new_periodic_id(&self, start_time: ClockTime, interval: ClockTime) -> /*Unimplemented*/Option<ClockID> {
|
||||
//fn new_periodic_id(&self, start_time: ClockTime, interval: ClockTime) -> /*Unimplemented*/ClockID {
|
||||
// unsafe { TODO: call ffi:gst_clock_new_periodic_id() }
|
||||
//}
|
||||
|
||||
//fn new_single_shot_id(&self, time: ClockTime) -> /*Unimplemented*/Option<ClockID> {
|
||||
//fn new_single_shot_id(&self, time: ClockTime) -> /*Unimplemented*/ClockID {
|
||||
// unsafe { TODO: call ffi:gst_clock_new_single_shot_id() }
|
||||
//}
|
||||
|
||||
|
|
|
@ -102,11 +102,11 @@ pub trait ElementExt: 'static {
|
|||
|
||||
fn is_locked_state(&self) -> bool;
|
||||
|
||||
//fn iterate_pads(&self) -> /*Ignored*/Option<Iterator>;
|
||||
//fn iterate_pads(&self) -> /*Ignored*/Iterator;
|
||||
|
||||
//fn iterate_sink_pads(&self) -> /*Ignored*/Option<Iterator>;
|
||||
//fn iterate_sink_pads(&self) -> /*Ignored*/Iterator;
|
||||
|
||||
//fn iterate_src_pads(&self) -> /*Ignored*/Option<Iterator>;
|
||||
//fn iterate_src_pads(&self) -> /*Ignored*/Iterator;
|
||||
|
||||
fn link<P: IsA<Element>>(&self, dest: &P) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
|
@ -390,15 +390,15 @@ impl<O: IsA<Element>> ElementExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
//fn iterate_pads(&self) -> /*Ignored*/Option<Iterator> {
|
||||
//fn iterate_pads(&self) -> /*Ignored*/Iterator {
|
||||
// unsafe { TODO: call ffi:gst_element_iterate_pads() }
|
||||
//}
|
||||
|
||||
//fn iterate_sink_pads(&self) -> /*Ignored*/Option<Iterator> {
|
||||
//fn iterate_sink_pads(&self) -> /*Ignored*/Iterator {
|
||||
// unsafe { TODO: call ffi:gst_element_iterate_sink_pads() }
|
||||
//}
|
||||
|
||||
//fn iterate_src_pads(&self) -> /*Ignored*/Option<Iterator> {
|
||||
//fn iterate_src_pads(&self) -> /*Ignored*/Iterator {
|
||||
// unsafe { TODO: call ffi:gst_element_iterate_src_pads() }
|
||||
//}
|
||||
|
||||
|
|
|
@ -52,11 +52,11 @@ pub trait PadExt: 'static {
|
|||
&self,
|
||||
parent: &P,
|
||||
stream_id: Option<&str>,
|
||||
) -> Option<glib::GString>;
|
||||
) -> glib::GString;
|
||||
|
||||
//fn create_stream_id_printf<P: IsA<Element>>(&self, parent: &P, stream_id: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> Option<glib::GString>;
|
||||
//fn create_stream_id_printf<P: IsA<Element>>(&self, parent: &P, stream_id: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> glib::GString;
|
||||
|
||||
//fn create_stream_id_printf_valist<P: IsA<Element>>(&self, parent: &P, stream_id: Option<&str>, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> Option<glib::GString>;
|
||||
//fn create_stream_id_printf_valist<P: IsA<Element>>(&self, parent: &P, stream_id: Option<&str>, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> glib::GString;
|
||||
|
||||
fn forward<P: FnMut(&Pad) -> bool>(&self, forward: P) -> bool;
|
||||
|
||||
|
@ -72,7 +72,7 @@ pub trait PadExt: 'static {
|
|||
|
||||
fn get_pad_template(&self) -> Option<PadTemplate>;
|
||||
|
||||
fn get_pad_template_caps(&self) -> Option<Caps>;
|
||||
fn get_pad_template_caps(&self) -> Caps;
|
||||
|
||||
fn get_parent_element(&self) -> Option<Element>;
|
||||
|
||||
|
@ -128,11 +128,11 @@ pub trait PadExt: 'static {
|
|||
|
||||
fn peer_query_accept_caps(&self, caps: &Caps) -> bool;
|
||||
|
||||
fn peer_query_caps(&self, filter: Option<&Caps>) -> Option<Caps>;
|
||||
fn peer_query_caps(&self, filter: Option<&Caps>) -> Caps;
|
||||
|
||||
fn query_accept_caps(&self, caps: &Caps) -> bool;
|
||||
|
||||
fn query_caps(&self, filter: Option<&Caps>) -> Option<Caps>;
|
||||
fn query_caps(&self, filter: Option<&Caps>) -> Caps;
|
||||
|
||||
fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
|
@ -199,7 +199,7 @@ impl<O: IsA<Pad>> PadExt for O {
|
|||
&self,
|
||||
parent: &P,
|
||||
stream_id: Option<&str>,
|
||||
) -> Option<glib::GString> {
|
||||
) -> glib::GString {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_pad_create_stream_id(
|
||||
self.as_ref().to_glib_none().0,
|
||||
|
@ -209,11 +209,11 @@ impl<O: IsA<Pad>> PadExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
//fn create_stream_id_printf<P: IsA<Element>>(&self, parent: &P, stream_id: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> Option<glib::GString> {
|
||||
//fn create_stream_id_printf<P: IsA<Element>>(&self, parent: &P, stream_id: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> glib::GString {
|
||||
// unsafe { TODO: call ffi:gst_pad_create_stream_id_printf() }
|
||||
//}
|
||||
|
||||
//fn create_stream_id_printf_valist<P: IsA<Element>>(&self, parent: &P, stream_id: Option<&str>, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> Option<glib::GString> {
|
||||
//fn create_stream_id_printf_valist<P: IsA<Element>>(&self, parent: &P, stream_id: Option<&str>, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> glib::GString {
|
||||
// unsafe { TODO: call ffi:gst_pad_create_stream_id_printf_valist() }
|
||||
//}
|
||||
|
||||
|
@ -275,7 +275,7 @@ impl<O: IsA<Pad>> PadExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_pad_template_caps(&self) -> Option<Caps> {
|
||||
fn get_pad_template_caps(&self) -> Caps {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_pad_get_pad_template_caps(
|
||||
self.as_ref().to_glib_none().0,
|
||||
|
@ -428,7 +428,7 @@ impl<O: IsA<Pad>> PadExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn peer_query_caps(&self, filter: Option<&Caps>) -> Option<Caps> {
|
||||
fn peer_query_caps(&self, filter: Option<&Caps>) -> Caps {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_pad_peer_query_caps(
|
||||
self.as_ref().to_glib_none().0,
|
||||
|
@ -446,7 +446,7 @@ impl<O: IsA<Pad>> PadExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn query_caps(&self, filter: Option<&Caps>) -> Option<Caps> {
|
||||
fn query_caps(&self, filter: Option<&Caps>) -> Caps {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_pad_query_caps(
|
||||
self.as_ref().to_glib_none().0,
|
||||
|
|
|
@ -65,13 +65,13 @@ impl PadTemplate {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_caps(&self) -> Option<Caps> {
|
||||
pub fn get_caps(&self) -> Caps {
|
||||
unsafe { from_glib_full(ffi::gst_pad_template_get_caps(self.to_glib_none().0)) }
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
pub fn get_documentation_caps(&self) -> Option<Caps> {
|
||||
pub fn get_documentation_caps(&self) -> Caps {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_pad_template_get_documentation_caps(
|
||||
self.to_glib_none().0,
|
||||
|
|
|
@ -47,7 +47,7 @@ pub trait PipelineExt: 'static {
|
|||
|
||||
fn get_latency(&self) -> ClockTime;
|
||||
|
||||
fn get_pipeline_clock(&self) -> Option<Clock>;
|
||||
fn get_pipeline_clock(&self) -> Clock;
|
||||
|
||||
fn set_auto_flush_bus(&self, auto_flush: bool);
|
||||
|
||||
|
@ -100,7 +100,7 @@ impl<O: IsA<Pipeline>> PipelineExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_pipeline_clock(&self) -> Option<Clock> {
|
||||
fn get_pipeline_clock(&self) -> Clock {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_pipeline_get_pipeline_clock(
|
||||
self.as_ref().to_glib_none().0,
|
||||
|
|
Loading…
Reference in a new issue