mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-01-22 15:08:12 +00:00
Add Sample::with_buffer_list() constructor
This commit is contained in:
parent
f47b30b8d1
commit
4a9cb50670
1 changed files with 14 additions and 0 deletions
|
@ -50,6 +50,20 @@ impl GstRc<SampleRef> {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn with_buffer_list<F: FormattedValue>(
|
||||||
|
buffer_list: Option<&BufferList>,
|
||||||
|
caps: Option<&Caps>,
|
||||||
|
segment: Option<&FormattedSegment<F>>,
|
||||||
|
info: Option<&StructureRef>,
|
||||||
|
) -> Self {
|
||||||
|
assert_initialized_main_thread!();
|
||||||
|
let sample = Self::new(None, caps, segment, info);
|
||||||
|
unsafe {
|
||||||
|
ffi::gst_sample_set_buffer_list(sample.to_glib_none().0, buffer_list.to_glib_none().0);
|
||||||
|
}
|
||||||
|
sample
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SampleRef {
|
impl SampleRef {
|
||||||
|
|
Loading…
Reference in a new issue