mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-09-03 02:13:49 +00:00
video: Implement Default for VideoAlignment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1680>
This commit is contained in:
parent
74bb92f484
commit
09a85251e9
1 changed files with 10 additions and 0 deletions
|
@ -115,6 +115,16 @@ impl PartialEq for VideoAlignment {
|
|||
|
||||
impl Eq for VideoAlignment {}
|
||||
|
||||
impl Default for VideoAlignment {
|
||||
fn default() -> Self {
|
||||
unsafe {
|
||||
let mut align = mem::MaybeUninit::uninit();
|
||||
ffi::gst_video_alignment_reset(align.as_mut_ptr());
|
||||
VideoAlignment(align.assume_init())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl<'a> ToGlibPtr<'a, *const ffi::GstVideoAlignment> for VideoAlignment {
|
||||
type Storage = PhantomData<&'a Self>;
|
||||
|
|
Loading…
Reference in a new issue