Commit a4f1300f authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Update gstreamer-audio

parent e3774ad4
......@@ -36,6 +36,11 @@ name = "Gst.Caps"
status = "manual"
ref_mode = "ref"
[[object]]
name = "Gst.ClockTime"
status = "manual"
conversion_type = "scalar"
[[object]]
name = "GstAudio.AudioFormat"
status = "generate"
......@@ -109,3 +114,12 @@ status = "generate"
name = "f64"
# Platform dependant
ignore = true
[[object]]
name = "GstAudio.AudioStreamAlign"
status = "generate"
[[object.function]]
name = "process"
# bool does not signal error
ignore = true
......@@ -8417,6 +8417,7 @@ functionality.</doc>
</record>
<record name="AudioStreamAlign"
c:type="GstAudioStreamAlign"
version="1.14"
glib:type-name="GstAudioStreamAlign"
glib:get-type="gst_audio_stream_align_get_type"
c:symbol-prefix="audio_stream_align">
......
......@@ -29,6 +29,7 @@ optional = true
[features]
v1_10 = ["gstreamer-sys/v1_10", "gstreamer-audio-sys/v1_10"]
v1_12 = ["gstreamer-sys/v1_12", "gstreamer-audio-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer-sys/v1_14", "gstreamer-audio-sys/v1_14", "v1_12"]
embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"]
dox = ["gstreamer-audio-sys/dox", "glib/dox", "gstreamer/dox"]
......
// Copyright (C) 2018 Sebastian Dröge <sebastian@centricular.com>
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use ffi;
use AudioStreamAlign;
impl AudioStreamAlign {
#[cfg(any(feature = "v1_14", feature = "dox"))]
pub fn process(&mut self, discont: bool, timestamp: gst::ClockTime, n_samples: u32) -> (bool, gst::ClockTime, gst::ClockTime, u64) {
unsafe {
let mut out_timestamp = mem::uninitialized();
let mut out_duration = mem::uninitialized();
let mut out_sample_position = mem::uninitialized();
let ret = from_glib(ffi::gst_audio_stream_align_process(self.to_glib_none_mut().0, discont.to_glib(), timestamp.to_glib(), n_samples, &mut out_timestamp, &mut out_duration, &mut out_sample_position));
(from_glib(ret), from_glib(out_timestamp), from_glib(out_duration), out_sample_position))
}
}
}
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
// 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 {}
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT
......
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT
......
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT
......@@ -6,6 +6,11 @@ mod stream_volume;
pub use self::stream_volume::StreamVolume;
pub use self::stream_volume::StreamVolumeExt;
#[cfg(any(feature = "v1_14", feature = "dox"))]
mod audio_stream_align;
#[cfg(any(feature = "v1_14", feature = "dox"))]
pub use self::audio_stream_align::AudioStreamAlign;
mod enums;
pub use self::enums::AudioChannelPosition;
pub use self::enums::AudioFormat;
......
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT
......
......@@ -54,6 +54,7 @@ mod audio_info;
pub use audio_info::*;
mod audio_channel_position;
pub use audio_channel_position::*;
mod audio_stream_align;
use glib::translate::{from_glib_full, ToGlibPtr};
pub fn audio_buffer_clip(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment