forked from mirrors/gstreamer-rs
Also implement copy() returning the wrapper miniobject on the reference type
This way CapsRef::copy() will return a Caps, and not a GstRc<CapsRef>.
This commit is contained in:
parent
9265cc8232
commit
c56e9ddfea
1 changed files with 7 additions and 1 deletions
|
@ -517,7 +517,13 @@ macro_rules! gst_define_mini_object_wrapper(
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn copy(&self) -> Self {
|
pub fn copy(&self) -> Self {
|
||||||
$name(self.0.copy())
|
self.0.copy()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl $ref_name {
|
||||||
|
fn copy(&self) -> $name {
|
||||||
|
$name(<$ref_name as $crate::MiniObject>::copy(self))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue