forked from mirrors/gstreamer-rs
98 lines
3.2 KiB
Rust
98 lines
3.2 KiB
Rust
// This file was generated by gir (https://github.com/gtk-rs/gir @ 6855214)
|
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
|
// DO NOT EDIT
|
|
|
|
use ffi;
|
|
use glib::translate::*;
|
|
use glib_ffi;
|
|
use gobject_ffi;
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
use gst;
|
|
use std::mem;
|
|
use std::ptr;
|
|
|
|
glib_wrapper! {
|
|
pub struct AudioStreamAlign(Boxed<ffi::GstAudioStreamAlign>);
|
|
|
|
match fn {
|
|
copy => |ptr| ffi::gst_audio_stream_align_copy(mut_override(ptr)),
|
|
free => |ptr| ffi::gst_audio_stream_align_free(ptr),
|
|
get_type => || ffi::gst_audio_stream_align_get_type(),
|
|
}
|
|
}
|
|
|
|
impl AudioStreamAlign {
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
pub fn new(rate: i32, alignment_threshold: gst::ClockTime, discont_wait: gst::ClockTime) -> AudioStreamAlign {
|
|
assert_initialized_main_thread!();
|
|
unsafe {
|
|
from_glib_full(ffi::gst_audio_stream_align_new(rate, alignment_threshold.to_glib(), discont_wait.to_glib()))
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
pub fn get_alignment_threshold(&mut self) -> gst::ClockTime {
|
|
unsafe {
|
|
from_glib(ffi::gst_audio_stream_align_get_alignment_threshold(self.to_glib_none_mut().0))
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
pub fn get_discont_wait(&mut self) -> gst::ClockTime {
|
|
unsafe {
|
|
from_glib(ffi::gst_audio_stream_align_get_discont_wait(self.to_glib_none_mut().0))
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
pub fn get_rate(&mut self) -> i32 {
|
|
unsafe {
|
|
ffi::gst_audio_stream_align_get_rate(self.to_glib_none_mut().0)
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
pub fn get_samples_since_discont(&mut self) -> u64 {
|
|
unsafe {
|
|
ffi::gst_audio_stream_align_get_samples_since_discont(self.to_glib_none_mut().0)
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
pub fn get_timestamp_at_discont(&mut self) -> gst::ClockTime {
|
|
unsafe {
|
|
from_glib(ffi::gst_audio_stream_align_get_timestamp_at_discont(self.to_glib_none_mut().0))
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
pub fn mark_discont(&mut self) {
|
|
unsafe {
|
|
ffi::gst_audio_stream_align_mark_discont(self.to_glib_none_mut().0);
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
pub fn set_alignment_threshold(&mut self, alignment_threshold: gst::ClockTime) {
|
|
unsafe {
|
|
ffi::gst_audio_stream_align_set_alignment_threshold(self.to_glib_none_mut().0, alignment_threshold.to_glib());
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
pub fn set_discont_wait(&mut self, discont_wait: gst::ClockTime) {
|
|
unsafe {
|
|
ffi::gst_audio_stream_align_set_discont_wait(self.to_glib_none_mut().0, discont_wait.to_glib());
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
pub fn set_rate(&mut self, rate: i32) {
|
|
unsafe {
|
|
ffi::gst_audio_stream_align_set_rate(self.to_glib_none_mut().0, rate);
|
|
}
|
|
}
|
|
}
|
|
|
|
unsafe impl Send for AudioStreamAlign {}
|
|
unsafe impl Sync for AudioStreamAlign {}
|