gstreamer-rs/gstreamer-audio/src/auto/audio_stream_align.rs

97 lines
3.2 KiB
Rust
Raw Normal View History

2018-04-23 17:34:22 +00:00
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
2018-03-15 08:03:01 +00:00
// DO NOT EDIT
use ffi;
#[cfg(any(feature = "v1_14", feature = "dox"))]
2018-03-15 08:03:01 +00:00
use glib::translate::*;
#[cfg(any(feature = "v1_14", feature = "dox"))]
use gst;
glib_wrapper! {
2018-08-17 21:25:12 +00:00
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
2018-03-15 08:03:01 +00:00
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 {}