AudioStreamAlign

#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.

Constructors

this
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.audio_stream_align.AudioStreamAlign.setRate is called with a new rate. A negative rate can be used for reverse playback.

Members

Functions

copy
gstaudio.audio_stream_align.AudioStreamAlign copy()

Copy a GstAudioStreamAlign structure.

getAlignmentThreshold
gst.types.ClockTime getAlignmentThreshold()

Gets the currently configured alignment threshold.

getDiscontWait
gst.types.ClockTime getDiscontWait()

Gets the currently configured discont wait.

getRate
int getRate()

Gets the currently configured sample rate.

getSamplesSinceDiscont
ulong getSamplesSinceDiscont()

Returns the number of samples that were processed since the last discontinuity was detected.

getTimestampAtDiscont
gst.types.ClockTime getTimestampAtDiscont()

Timestamp that was passed when a discontinuity was detected, i.e. the first timestamp after the discontinuity.

markDiscont
void markDiscont()

Marks the next buffer as discontinuous and resets timestamp tracking.

process
bool process(bool discont, gst.types.ClockTime timestamp, uint nSamples, gst.types.ClockTime outTimestamp, gst.types.ClockTime outDuration, 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-discontinuous data will have perfect timestamps and durations.

setAlignmentThreshold
void setAlignmentThreshold(gst.types.ClockTime alignmentThreshold)

Sets alignment_treshold as new alignment threshold for the following processing.

setDiscontWait
void setDiscontWait(gst.types.ClockTime discontWait)

Sets alignment_treshold as new discont wait for the following processing.

setRate
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.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.