mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-23 00:26:31 +00:00
124 lines
4.1 KiB
Rust
124 lines
4.1 KiB
Rust
// This file was generated by gir (https://github.com/gtk-rs/gir)
|
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
|
// DO NOT EDIT
|
|
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
|
use glib::translate::*;
|
|
|
|
glib::glib_wrapper! {
|
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
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"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
|
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"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
|
pub fn get_alignment_threshold(&self) -> gst::ClockTime {
|
|
unsafe {
|
|
from_glib(ffi::gst_audio_stream_align_get_alignment_threshold(
|
|
mut_override(self.to_glib_none().0),
|
|
))
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
|
pub fn get_discont_wait(&self) -> gst::ClockTime {
|
|
unsafe {
|
|
from_glib(ffi::gst_audio_stream_align_get_discont_wait(mut_override(
|
|
self.to_glib_none().0,
|
|
)))
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
|
pub fn get_rate(&self) -> i32 {
|
|
unsafe { ffi::gst_audio_stream_align_get_rate(mut_override(self.to_glib_none().0)) }
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
|
pub fn get_samples_since_discont(&self) -> u64 {
|
|
unsafe {
|
|
ffi::gst_audio_stream_align_get_samples_since_discont(mut_override(
|
|
self.to_glib_none().0,
|
|
))
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
|
pub fn get_timestamp_at_discont(&self) -> gst::ClockTime {
|
|
unsafe {
|
|
from_glib(ffi::gst_audio_stream_align_get_timestamp_at_discont(
|
|
mut_override(self.to_glib_none().0),
|
|
))
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
|
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"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
|
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"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
|
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"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
|
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 {}
|