mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 09:31:06 +00:00
Add gst_audio_buffer_clip() bindings
This commit is contained in:
parent
e1538b6ca5
commit
885267ebee
1 changed files with 17 additions and 0 deletions
|
@ -49,3 +49,20 @@ mod audio_info;
|
||||||
pub use audio_info::*;
|
pub use audio_info::*;
|
||||||
mod audio_channel_position;
|
mod audio_channel_position;
|
||||||
pub use audio_channel_position::*;
|
pub use audio_channel_position::*;
|
||||||
|
|
||||||
|
use glib::translate::{from_glib_full, ToGlibPtr};
|
||||||
|
pub fn audio_buffer_clip(
|
||||||
|
buffer: gst::Buffer,
|
||||||
|
segment: &gst::Segment,
|
||||||
|
rate: u32,
|
||||||
|
channels: u32,
|
||||||
|
) -> gst::Buffer {
|
||||||
|
unsafe {
|
||||||
|
from_glib_full(ffi::gst_audio_buffer_clip(
|
||||||
|
buffer.into_ptr(),
|
||||||
|
segment.to_glib_none().0,
|
||||||
|
rate as i32,
|
||||||
|
channels as i32,
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue