mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-26 03:21:03 +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};
|
use glib::translate::{from_glib, IntoGlib, ToGlibPtr};
|
||||||
|
|
||||||
#[doc(alias = "GstVideoFormatInfo")]
|
#[doc(alias = "GstVideoFormatInfo")]
|
||||||
|
#[derive(Copy, Clone)]
|
||||||
pub struct VideoFormatInfo(&'static ffi::GstVideoFormatInfo);
|
pub struct VideoFormatInfo(&'static ffi::GstVideoFormatInfo);
|
||||||
|
|
||||||
impl VideoFormatInfo {
|
impl VideoFormatInfo {
|
||||||
|
|
|
@ -83,6 +83,7 @@ impl ToValue for VideoColorRange {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(alias = "GstVideoColorimetry")]
|
#[doc(alias = "GstVideoColorimetry")]
|
||||||
|
#[derive(Copy, Clone)]
|
||||||
pub struct VideoColorimetry(ffi::GstVideoColorimetry);
|
pub struct VideoColorimetry(ffi::GstVideoColorimetry);
|
||||||
|
|
||||||
impl VideoColorimetry {
|
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 {
|
impl PartialEq for VideoColorimetry {
|
||||||
#[doc(alias = "gst_video_colorimetry_is_equal")]
|
#[doc(alias = "gst_video_colorimetry_is_equal")]
|
||||||
fn eq(&self, other: &Self) -> bool {
|
fn eq(&self, other: &Self) -> bool {
|
||||||
|
@ -244,6 +239,7 @@ impl std::convert::TryFrom<crate::VideoMultiviewMode> for crate::VideoMultiviewF
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(alias = "GstVideoInfo")]
|
#[doc(alias = "GstVideoInfo")]
|
||||||
|
#[derive(Clone)]
|
||||||
pub struct VideoInfo(pub(crate) ffi::GstVideoInfo);
|
pub struct VideoInfo(pub(crate) ffi::GstVideoInfo);
|
||||||
|
|
||||||
impl fmt::Debug for VideoInfo {
|
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 {
|
impl PartialEq for VideoInfo {
|
||||||
#[doc(alias = "gst_video_info_is_equal")]
|
#[doc(alias = "gst_video_info_is_equal")]
|
||||||
fn eq(&self, other: &Self) -> bool {
|
fn eq(&self, other: &Self) -> bool {
|
||||||
|
|
Loading…
Reference in a new issue