mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-23 08:36:31 +00:00
Move gst_mini_object_copy() from GstRc<T> to MiniObject directly
It can also be called on the shallow references.
This commit is contained in:
parent
b773c0b46a
commit
1f16a39ca4
1 changed files with 9 additions and 9 deletions
|
@ -84,15 +84,6 @@ impl<T: MiniObject> GstRc<T> {
|
|||
}
|
||||
}
|
||||
|
||||
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<Self> {
|
||||
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<T> {
|
||||
|
|
Loading…
Reference in a new issue