video/video_rectangle: Add ToGlibPtrMut implementation

Vulkan passes a mutable pointer to an uninitialized `VideoRectangle`
into the C API for retrieval.
This commit is contained in:
Marijn Suijten 2021-01-03 22:42:01 +01:00
parent 430abb1e9d
commit 212d4ef008

View file

@ -54,3 +54,14 @@ impl glib::translate::Uninitialized for VideoRectangle {
mem::zeroed()
}
}
#[doc(hidden)]
impl<'a> glib::translate::ToGlibPtrMut<'a, *mut ffi::GstVideoRectangle> for VideoRectangle {
type Storage = &'a mut Self;
fn to_glib_none_mut(
&'a mut self,
) -> glib::translate::StashMut<*mut ffi::GstVideoRectangle, Self> {
glib::translate::StashMut(self as *mut _ as *mut _, self)
}
}