From 1f16a39ca46a249b19e86ba93a40237ff564ded4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 12 Oct 2017 17:58:46 +0300 Subject: [PATCH] Move gst_mini_object_copy() from GstRc to MiniObject directly It can also be called on the shallow references. --- gstreamer/src/miniobject.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gstreamer/src/miniobject.rs b/gstreamer/src/miniobject.rs index 931fd7469..b9ed9d6f6 100644 --- a/gstreamer/src/miniobject.rs +++ b/gstreamer/src/miniobject.rs @@ -84,15 +84,6 @@ impl GstRc { } } - pub fn copy(&self) -> Self { - unsafe { - GstRc::from_glib_full( - ffi::gst_mini_object_copy(self.as_ptr() as *const ffi::GstMiniObject) as - *const T::GstType, - ) - } - } - pub fn is_writable(&self) -> bool { unsafe { from_glib(ffi::gst_mini_object_is_writable( @@ -199,6 +190,15 @@ where assert!(!ptr.is_null()); &mut *(ptr as *mut Self) } + + fn copy(&self) -> GstRc { + unsafe { + GstRc::from_glib_full( + ffi::gst_mini_object_copy(self.as_ptr() as *const ffi::GstMiniObject) as + *const Self::GstType, + ) + } + } } impl<'a, T: MiniObject + 'static> ToGlibPtr<'a, *const T::GstType> for GstRc {