AudioStreamAlign.process

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

Parameters

discontif this data is considered to be discontinuous
timestampa #GstClockTime of the start of the data
nSamplesnumber of samples to process
outTimestampoutput timestamp of the data
outDurationoutput duration of the data
outSamplePositionoutput sample position of the start of the data

Returns

true if a discontinuity was detected, false otherwise.