forked from mirrors/gstreamer-rs
audio/stream_align: Don't require mutable references in getters
This commit is contained in:
parent
0ffd86c37e
commit
7fa810873f
2 changed files with 27 additions and 19 deletions
|
@ -144,6 +144,12 @@ status = "generate"
|
|||
# bool does not signal error
|
||||
ignore = true
|
||||
|
||||
[[object.function]]
|
||||
pattern = "get_.*"
|
||||
[[object.function.parameter]]
|
||||
name = "align"
|
||||
const = true
|
||||
|
||||
[[object]]
|
||||
name = "GstAudio.AudioDecoder"
|
||||
status = "generate"
|
||||
|
|
|
@ -37,46 +37,48 @@ impl AudioStreamAlign {
|
|||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn get_alignment_threshold(&mut self) -> gst::ClockTime {
|
||||
pub fn get_alignment_threshold(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(
|
||||
gst_audio_sys::gst_audio_stream_align_get_alignment_threshold(
|
||||
self.to_glib_none_mut().0,
|
||||
),
|
||||
gst_audio_sys::gst_audio_stream_align_get_alignment_threshold(mut_override(
|
||||
self.to_glib_none().0,
|
||||
)),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn get_discont_wait(&mut self) -> gst::ClockTime {
|
||||
pub fn get_discont_wait(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(gst_audio_sys::gst_audio_stream_align_get_discont_wait(
|
||||
self.to_glib_none_mut().0,
|
||||
mut_override(self.to_glib_none().0),
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn get_rate(&mut self) -> i32 {
|
||||
unsafe { gst_audio_sys::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 {
|
||||
pub fn get_rate(&self) -> i32 {
|
||||
unsafe {
|
||||
gst_audio_sys::gst_audio_stream_align_get_samples_since_discont(
|
||||
self.to_glib_none_mut().0,
|
||||
)
|
||||
gst_audio_sys::gst_audio_stream_align_get_rate(mut_override(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn get_timestamp_at_discont(&mut self) -> gst::ClockTime {
|
||||
pub fn get_samples_since_discont(&self) -> u64 {
|
||||
unsafe {
|
||||
gst_audio_sys::gst_audio_stream_align_get_samples_since_discont(mut_override(
|
||||
self.to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn get_timestamp_at_discont(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(
|
||||
gst_audio_sys::gst_audio_stream_align_get_timestamp_at_discont(
|
||||
self.to_glib_none_mut().0,
|
||||
),
|
||||
gst_audio_sys::gst_audio_stream_align_get_timestamp_at_discont(mut_override(
|
||||
self.to_glib_none().0,
|
||||
)),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue