mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-05-20 09:18:28 +00:00
Update gstreamer-audio
This commit is contained in:
parent
e3774ad458
commit
a4f1300f72
|
@ -36,6 +36,11 @@ name = "Gst.Caps"
|
||||||
status = "manual"
|
status = "manual"
|
||||||
ref_mode = "ref"
|
ref_mode = "ref"
|
||||||
|
|
||||||
|
[[object]]
|
||||||
|
name = "Gst.ClockTime"
|
||||||
|
status = "manual"
|
||||||
|
conversion_type = "scalar"
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "GstAudio.AudioFormat"
|
name = "GstAudio.AudioFormat"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
|
@ -109,3 +114,12 @@ status = "generate"
|
||||||
name = "f64"
|
name = "f64"
|
||||||
# Platform dependant
|
# Platform dependant
|
||||||
ignore = true
|
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>
|
||||||
<record name="AudioStreamAlign"
|
<record name="AudioStreamAlign"
|
||||||
c:type="GstAudioStreamAlign"
|
c:type="GstAudioStreamAlign"
|
||||||
|
version="1.14"
|
||||||
glib:type-name="GstAudioStreamAlign"
|
glib:type-name="GstAudioStreamAlign"
|
||||||
glib:get-type="gst_audio_stream_align_get_type"
|
glib:get-type="gst_audio_stream_align_get_type"
|
||||||
c:symbol-prefix="audio_stream_align">
|
c:symbol-prefix="audio_stream_align">
|
||||||
|
|
|
@ -29,6 +29,7 @@ optional = true
|
||||||
[features]
|
[features]
|
||||||
v1_10 = ["gstreamer-sys/v1_10", "gstreamer-audio-sys/v1_10"]
|
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_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"]
|
embed-lgpl-docs = ["rustdoc-stripper"]
|
||||||
purge-lgpl-docs = ["rustdoc-stripper"]
|
purge-lgpl-docs = ["rustdoc-stripper"]
|
||||||
dox = ["gstreamer-audio-sys/dox", "glib/dox", "gstreamer/dox"]
|
dox = ["gstreamer-audio-sys/dox", "glib/dox", "gstreamer/dox"]
|
||||||
|
|
24
gstreamer-audio/src/audio_stream_align.rs
Normal file
24
gstreamer-audio/src/audio_stream_align.rs
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
// 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))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
98
gstreamer-audio/src/auto/audio_stream_align.rs
Normal file
98
gstreamer-audio/src/auto/audio_stream_align.rs
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
// 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 {}
|
|
@ -1,4 +1,4 @@
|
||||||
// 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 @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// 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 @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// 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 @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
@ -6,6 +6,11 @@ mod stream_volume;
|
||||||
pub use self::stream_volume::StreamVolume;
|
pub use self::stream_volume::StreamVolume;
|
||||||
pub use self::stream_volume::StreamVolumeExt;
|
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;
|
mod enums;
|
||||||
pub use self::enums::AudioChannelPosition;
|
pub use self::enums::AudioChannelPosition;
|
||||||
pub use self::enums::AudioFormat;
|
pub use self::enums::AudioFormat;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// 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 @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@ 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::*;
|
||||||
|
mod audio_stream_align;
|
||||||
|
|
||||||
use glib::translate::{from_glib_full, ToGlibPtr};
|
use glib::translate::{from_glib_full, ToGlibPtr};
|
||||||
pub fn audio_buffer_clip(
|
pub fn audio_buffer_clip(
|
||||||
|
|
Loading…
Reference in a new issue