From ed90fcbd108dbdf238d7b48830b8d71d8285e169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 3 Aug 2017 10:15:20 +0300 Subject: [PATCH] Add bufferlist support to Sample --- gstreamer/src/sample.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gstreamer/src/sample.rs b/gstreamer/src/sample.rs index f806567b1..cfe27fc32 100644 --- a/gstreamer/src/sample.rs +++ b/gstreamer/src/sample.rs @@ -16,6 +16,7 @@ use glib::translate::{from_glib, from_glib_full, from_glib_none, mut_override, T use miniobject::*; use Buffer; +use BufferList; use Caps; use Segment; use StructureRef; @@ -53,7 +54,9 @@ impl SampleRef { unsafe { from_glib_none(ffi::gst_sample_get_buffer(self.as_mut_ptr())) } } - // TODO: bufferlist + pub fn get_buffer_list(&self) -> Option { + unsafe { from_glib_none(ffi::gst_sample_get_buffer_list(self.as_mut_ptr())) } + } pub fn get_caps(&self) -> Option { unsafe { from_glib_none(ffi::gst_sample_get_caps(self.as_mut_ptr())) }