From 52e09fd83dad18c72872c7dd8f5b8a6319183a19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 26 Jan 2022 12:53:24 +0200 Subject: [PATCH] video: Implement `Default` for `VideoOverlayComposition` in 1.20 --- gstreamer-video/src/video_overlay_composition.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gstreamer-video/src/video_overlay_composition.rs b/gstreamer-video/src/video_overlay_composition.rs index 41b36db7e..c10dc396f 100644 --- a/gstreamer-video/src/video_overlay_composition.rs +++ b/gstreamer-video/src/video_overlay_composition.rs @@ -268,6 +268,17 @@ impl VideoOverlayComposition { } } +#[cfg(any(feature = "v1_20", feature = "dox"))] +impl Default for VideoOverlayComposition { + fn default() -> Self { + assert_initialized_main_thread!(); + + use std::ptr; + + unsafe { from_glib_full(ffi::gst_video_overlay_composition_new(ptr::null_mut())) } + } +} + impl VideoOverlayCompositionRef { #[doc(alias = "gst_video_overlay_composition_n_rectangles")] pub fn n_rectangles(&self) -> u32 {