mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-23 08:36:31 +00:00
video: Automatically derive Copy/Clone for more structs
This commit is contained in:
parent
c05d2e24af
commit
c2a2549b66
2 changed files with 3 additions and 12 deletions
|
@ -8,6 +8,7 @@ use std::str;
|
|||
use glib::translate::{from_glib, IntoGlib, ToGlibPtr};
|
||||
|
||||
#[doc(alias = "GstVideoFormatInfo")]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct VideoFormatInfo(&'static ffi::GstVideoFormatInfo);
|
||||
|
||||
impl VideoFormatInfo {
|
||||
|
|
|
@ -83,6 +83,7 @@ impl ToValue for VideoColorRange {
|
|||
}
|
||||
|
||||
#[doc(alias = "GstVideoColorimetry")]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct VideoColorimetry(ffi::GstVideoColorimetry);
|
||||
|
||||
impl VideoColorimetry {
|
||||
|
@ -121,12 +122,6 @@ impl VideoColorimetry {
|
|||
}
|
||||
}
|
||||
|
||||
impl Clone for VideoColorimetry {
|
||||
fn clone(&self) -> Self {
|
||||
unsafe { Self(ptr::read(&self.0)) }
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq for VideoColorimetry {
|
||||
#[doc(alias = "gst_video_colorimetry_is_equal")]
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
|
@ -244,6 +239,7 @@ impl std::convert::TryFrom<crate::VideoMultiviewMode> for crate::VideoMultiviewF
|
|||
}
|
||||
|
||||
#[doc(alias = "GstVideoInfo")]
|
||||
#[derive(Clone)]
|
||||
pub struct VideoInfo(pub(crate) ffi::GstVideoInfo);
|
||||
|
||||
impl fmt::Debug for VideoInfo {
|
||||
|
@ -853,12 +849,6 @@ impl VideoInfo {
|
|||
}
|
||||
}
|
||||
|
||||
impl Clone for VideoInfo {
|
||||
fn clone(&self) -> Self {
|
||||
unsafe { Self(ptr::read(&self.0)) }
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq for VideoInfo {
|
||||
#[doc(alias = "gst_video_info_is_equal")]
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
|
|
Loading…
Reference in a new issue