forked from mirrors/gstreamer-rs
Implement ::copy() directly on miniobject wrapper types
This provides the additional wrapping as the one via get via deref will only give back a GstRc<T> without the additional wrapping.
This commit is contained in:
parent
8f71a81cb5
commit
30b9527112
1 changed files with 4 additions and 0 deletions
|
@ -515,6 +515,10 @@ macro_rules! gst_define_mini_object_wrapper(
|
|||
pub unsafe fn into_ptr(self) -> *mut $ffi_name {
|
||||
self.0.into_ptr()
|
||||
}
|
||||
|
||||
pub fn copy(&self) -> Self {
|
||||
$name(self.0.copy())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<$crate::GstRc<$ref_name>> for $name {
|
||||
|
|
Loading…
Reference in a new issue