diff --git a/gstreamer/src/caps.rs b/gstreamer/src/caps.rs index e4b204e1e..f0c07cec4 100644 --- a/gstreamer/src/caps.rs +++ b/gstreamer/src/caps.rs @@ -88,11 +88,6 @@ impl GstRc { 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 {