Commit 480d373f authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Caps::subtract() does not take ownership of the arguments and can be implemented for CapsRef

parent 8c268ecd
......@@ -88,11 +88,6 @@ impl GstRc<CapsRef> {
unsafe { from_glib_full(ffi::gst_caps_simplify(caps.into_ptr())) }
}
pub fn subtract(caps: Self, other: Self) -> Self {
skip_assert_initialized!();
unsafe { from_glib_full(ffi::gst_caps_subtract(caps.into_ptr(), other.into_ptr())) }
}
pub fn truncate(caps: Self) -> Self {
skip_assert_initialized!();
unsafe { from_glib_full(ffi::gst_caps_truncate(caps.into_ptr())) }
......@@ -254,6 +249,11 @@ impl CapsRef {
))
}
}
pub fn subtract(&self, other: &Self) -> Caps {
skip_assert_initialized!();
unsafe { from_glib_full(ffi::gst_caps_subtract(self.as_mut_ptr(), other.as_mut_ptr())) }
}
}
impl glib::types::StaticType for CapsRef {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment