mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-04-15 04:14:07 +00:00
video: Implement Default for VideoAlignment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1684>
This commit is contained in:
parent
0450ce589a
commit
5657104996
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