From b8756a3bd85e3aea335adafbd3cb227c22870704 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Mon, 4 Jan 2021 23:45:29 +0100 Subject: [PATCH] video/video_buffer_pool: Implement ToGlibPtr for VideoAlignment This will be used by the GL bindings. --- gstreamer-video/src/video_buffer_pool.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gstreamer-video/src/video_buffer_pool.rs b/gstreamer-video/src/video_buffer_pool.rs index b1ff3c8fe..6655b82ac 100644 --- a/gstreamer-video/src/video_buffer_pool.rs +++ b/gstreamer-video/src/video_buffer_pool.rs @@ -83,6 +83,15 @@ impl PartialEq for VideoAlignment { impl Eq for VideoAlignment {} +#[doc(hidden)] +impl<'a> ToGlibPtr<'a, *const ffi::GstVideoAlignment> for VideoAlignment { + type Storage = &'a Self; + + fn to_glib_none(&'a self) -> Stash<*const ffi::GstVideoAlignment, Self> { + Stash(&self.0, self) + } +} + pub trait VideoBufferPoolConfig { fn video_alignment(&self) -> Option;