gstaudio.audio_stream_align
Module for [AudioStreamAlign] class
class AudioStreamAlign
Types 1
#GstAudioStreamAlign provides a helper object that helps tracking audio stream alignment and discontinuities, and detects discontinuities if possible.
See [gstaudio.audio_stream_align.AudioStreamAlign.new_] for a description of its parameters and [gstaudio.audio_stream_align.AudioStreamAlign.process] for the details of the processing.
Methods
AudioStreamAlign self()Returns `this`, for use in `with` statements.gstaudio.audio_stream_align.AudioStreamAlign copy()Copy a GstAudioStreamAlign structure. Returns: a new #GstAudioStreamAlign. free with gstaudiostreamalignfree.gst.types.ClockTime getAlignmentThreshold()Gets the currently configured alignment threshold. Returns: The currently configured alignment thresholdgst.types.ClockTime getDiscontWait()Gets the currently configured discont wait. Returns: The currently configured discont waitint getRate()Gets the currently configured sample rate. Returns: The currently configured sample rateulong getSamplesSinceDiscont()Returns the number of samples that were processed since the last discontinuity was detected. Returns: The number of samples processed since the last discontinuity.gst.types.ClockTime getTimestampAtDiscont()Timestamp that was passed when a discontinuity was detected, i.e. the first timestamp after the discontinuity. Returns: The last timestamp at when a discontinuity was detectedvoid markDiscont()Marks the next buffer as discontinuous and resets timestamp tracking.bool process(bool discont, gst.types.ClockTime timestamp, uint nSamples, out gst.types.ClockTime outTimestamp, out gst.types.ClockTime outDuration, out ulong outSamplePosition)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-di...void setAlignmentThreshold(gst.types.ClockTime alignmentThreshold)Sets alignment_treshold as new alignment threshold for the following processing.void setDiscontWait(gst.types.ClockTime discontWait)Sets alignment_treshold as new discont wait for the following processing.void setRate(int rate)Sets rate as new sample rate for the following processing. If the sample rate differs this implicitly marks the next data as discontinuous.Constructors
this(int rate, gst.types.ClockTime alignmentThreshold, gst.types.ClockTime discontWait)Allocate a new #GstAudioStreamAlign with the given configuration. All processing happens according to sample rate rate, until [gstaudio.audiostreamalign.AudioStreamAlign.setRate] is called with a n...