Allocate a new #GstAudioStreamAlign with the given configuration. All
processing happens according to sample rate rate,
until
gst_audio_stream_align_set_rate() is called with a new rate
.
A negative rate can be used for reverse playback.
alignment_threshold
gives the tolerance in nanoseconds after which a
timestamp difference is considered a discontinuity. Once detected,
discont_wait
nanoseconds have to pass without going below the threshold
again until the output buffer is marked as a discontinuity. These can later
be re-configured with gst_audio_stream_align_set_alignment_threshold() and
gst_audio_stream_align_set_discont_wait().
a sample rate
a alignment threshold in nanoseconds
discont wait in nanoseconds
Copy a GstAudioStreamAlign structure.
Free a GstAudioStreamAlign structure previously allocated with gst_audio_stream_align_new() or gst_audio_stream_align_copy().
Gets the currently configured alignment threshold.
Gets the currently configured discont wait.
Gets the currently configured sample rate.
Returns the number of samples that were processed since the last discontinuity was detected.
Timestamp that was passed when a discontinuity was detected, i.e. the first timestamp after the discontinuity.
Marks the next buffer as discontinuous and resets timestamp tracking.
Processes data with timestamp
and n_samples,
and returns the output
timestamp, duration and sample position together with a boolean to signal
whether a discontinuity was detected or not. All non-discontinuous data
will have perfect timestamps and durations.
A discontinuity is detected once the difference between the actual timestamp and the timestamp calculated from the sample count since the last discontinuity differs by more than the alignment threshold for a duration longer than discont wait.
Note: In reverse playback, every buffer is considered discontinuous in the context of buffer flags because the last sample of the previous buffer is discontinuous with the first sample of the current one. However for this function they are only considered discontinuous in reverse playback if the first sample of the previous buffer is discontinuous with the last sample of the current one.
if this data is considered to be discontinuous
a #GstClockTime of the start of the data
number of samples to process
Sets alignment_treshold
as new alignment threshold for the following processing.
a new alignment threshold
Sets alignment_treshold
as new discont wait for the following processing.
a new discont wait
Sets rate
as new sample rate for the following processing. If the sample
rate differs this implicitly marks the next data as discontinuous.
a new sample rate
Allocate a new #GstAudioStreamAlign with the given configuration. All
processing happens according to sample rate rate,
until
gst_audio_stream_align_set_rate() is called with a new rate
.
A negative rate can be used for reverse playback.
alignment_threshold
gives the tolerance in nanoseconds after which a
timestamp difference is considered a discontinuity. Once detected,
discont_wait
nanoseconds have to pass without going below the threshold
again until the output buffer is marked as a discontinuity. These can later
be re-configured with gst_audio_stream_align_set_alignment_threshold() and
gst_audio_stream_align_set_discont_wait().
a sample rate
a alignment threshold in nanoseconds
discont wait in nanoseconds
#GstAudioStreamAlign provides a helper object that helps tracking audio stream alignment and discontinuities, and detects discontinuities if possible.
See gst_audio_stream_align_new() for a description of its parameters and gst_audio_stream_align_process() for the details of the processing.