audio/video: Add missing FromGlibPtrNone<*const> for FormatInfo

This commit is contained in:
Marijn Suijten 2020-11-15 16:56:20 +01:00
parent 0763d2645d
commit d9769aeb6a
2 changed files with 16 additions and 0 deletions

View file

@ -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::*;

View file

@ -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::*;