forked from mirrors/gstreamer-rs
element: Make caps in link_filtered() / link_pads_filtered() mandatory
Instead of passing `None`, the non-filtered variants of the functions can be used. Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/328
This commit is contained in:
parent
e453701b50
commit
849a524b09
2 changed files with 12 additions and 4 deletions
|
@ -556,6 +556,10 @@ manual_traits = ["ElementExtManual"]
|
|||
|
||||
[[object.function]]
|
||||
name = "link_filtered"
|
||||
[[object.function.parameter]]
|
||||
name = "filter"
|
||||
# Can use `link` instead
|
||||
nullable = false
|
||||
[object.function.return]
|
||||
bool_return_is_error = "Failed to link elements"
|
||||
|
||||
|
@ -566,6 +570,10 @@ manual_traits = ["ElementExtManual"]
|
|||
|
||||
[[object.function]]
|
||||
name = "link_pads_filtered"
|
||||
[[object.function.parameter]]
|
||||
name = "filter"
|
||||
# Can use `link` instead
|
||||
nullable = false
|
||||
[object.function.return]
|
||||
bool_return_is_error = "Failed to link pads"
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ pub trait ElementExt: 'static {
|
|||
fn link_filtered<P: IsA<Element>>(
|
||||
&self,
|
||||
dest: &P,
|
||||
filter: Option<&Caps>,
|
||||
filter: &Caps,
|
||||
) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
//#[doc(alias = "gst_element_link_many")]
|
||||
|
@ -192,7 +192,7 @@ pub trait ElementExt: 'static {
|
|||
srcpadname: Option<&str>,
|
||||
dest: &P,
|
||||
destpadname: Option<&str>,
|
||||
filter: Option<&Caps>,
|
||||
filter: &Caps,
|
||||
) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
#[doc(alias = "gst_element_link_pads_full")]
|
||||
|
@ -547,7 +547,7 @@ impl<O: IsA<Element>> ElementExt for O {
|
|||
fn link_filtered<P: IsA<Element>>(
|
||||
&self,
|
||||
dest: &P,
|
||||
filter: Option<&Caps>,
|
||||
filter: &Caps,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib::result_from_gboolean!(
|
||||
|
@ -589,7 +589,7 @@ impl<O: IsA<Element>> ElementExt for O {
|
|||
srcpadname: Option<&str>,
|
||||
dest: &P,
|
||||
destpadname: Option<&str>,
|
||||
filter: Option<&Caps>,
|
||||
filter: &Caps,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib::result_from_gboolean!(
|
||||
|
|
Loading…
Reference in a new issue