Commit fca4441a authored by Guillaume Desmottes's avatar Guillaume Desmottes 🐐

buffer_pool: implement ToGlibPtr and ToGlibPtrMut for BufferPoolAcquireParams

I'll use them to bind
gst_video_decoder_allocate_output_frame_with_params()
parent 3bf853e4
......@@ -209,6 +209,28 @@ impl PartialEq for BufferPoolAcquireParams {
impl Eq for BufferPoolAcquireParams {}
#[doc(hidden)]
impl<'a> ToGlibPtr<'a, *const gst_sys::GstBufferPoolAcquireParams> for BufferPoolAcquireParams {
type Storage = &'a Self;
fn to_glib_none(
&'a self,
) -> glib::translate::Stash<'a, *const gst_sys::GstBufferPoolAcquireParams, Self> {
glib::translate::Stash(&self.0, self)
}
}
#[doc(hidden)]
impl<'a> ToGlibPtrMut<'a, *mut gst_sys::GstBufferPoolAcquireParams> for BufferPoolAcquireParams {
type Storage = &'a mut Self;
fn to_glib_none_mut(
&'a mut self,
) -> glib::translate::StashMut<'a, *mut gst_sys::GstBufferPoolAcquireParams, Self> {
glib::translate::StashMut(&mut self.0, self)
}
}
impl BufferPool {
pub fn new() -> BufferPool {
assert_initialized_main_thread!();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment