From d9769aeb6ab256c57108d40324597300c271d892 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Sun, 15 Nov 2020 16:56:20 +0100 Subject: [PATCH] audio/video: Add missing FromGlibPtrNone<*const> for FormatInfo --- gstreamer-audio/src/audio_format_info.rs | 8 ++++++++ gstreamer-video/src/video_format_info.rs | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/gstreamer-audio/src/audio_format_info.rs b/gstreamer-audio/src/audio_format_info.rs index fa958263d..9c845447d 100644 --- a/gstreamer-audio/src/audio_format_info.rs +++ b/gstreamer-audio/src/audio_format_info.rs @@ -369,6 +369,14 @@ impl glib::translate::FromGlibPtrNone<*mut ffi::GstAudioFormatInfo> for AudioFor } } +#[doc(hidden)] +impl glib::translate::FromGlibPtrNone<*const ffi::GstAudioFormatInfo> for AudioFormatInfo { + #[inline] + unsafe fn from_glib_none(ptr: *const ffi::GstAudioFormatInfo) -> Self { + AudioFormatInfo(&*ptr) + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/gstreamer-video/src/video_format_info.rs b/gstreamer-video/src/video_format_info.rs index 29d94f826..5ec00f9cb 100644 --- a/gstreamer-video/src/video_format_info.rs +++ b/gstreamer-video/src/video_format_info.rs @@ -471,6 +471,14 @@ impl glib::translate::FromGlibPtrNone<*mut ffi::GstVideoFormatInfo> for VideoFor } } +#[doc(hidden)] +impl glib::translate::FromGlibPtrNone<*const ffi::GstVideoFormatInfo> for VideoFormatInfo { + #[inline] + unsafe fn from_glib_none(ptr: *const ffi::GstVideoFormatInfo) -> Self { + VideoFormatInfo(&*ptr) + } +} + #[cfg(test)] mod tests { use super::*;