GstAudioStreamAlign
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.
Constructors
gst_audio_stream_align_new
GstAudioStreamAlign * gst_audio_stream_align_new (gint rate, GstClockTime alignment_threshold, GstClockTime discont_wait)
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.
Parameters:
rate
–
a sample rate
alignment_threshold
–
a alignment threshold in nanoseconds
discont_wait
–
discont wait in nanoseconds
a new GstAudioStreamAlign. free with gst_audio_stream_align_free.
Since : 1.14
GstAudio.AudioStreamAlign.prototype.new
function GstAudio.AudioStreamAlign.prototype.new(rate: Number, alignment_threshold: Number, discont_wait: Number): {
// javascript wrapper for 'gst_audio_stream_align_new'
}
Allocate a new GstAudio.AudioStreamAlign with the given configuration. All processing happens according to sample rate rate, until GstAudio.AudioStreamAlign.prototype.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 GstAudio.AudioStreamAlign.prototype.set_alignment_threshold and GstAudio.AudioStreamAlign.prototype.set_discont_wait.
Parameters:
a sample rate
a alignment threshold in nanoseconds
discont wait in nanoseconds
a new GstAudio.AudioStreamAlign. free with GstAudio.AudioStreamAlign.prototype.free.
Since : 1.14
GstAudio.AudioStreamAlign.new
def GstAudio.AudioStreamAlign.new (rate, alignment_threshold, discont_wait):
#python wrapper for 'gst_audio_stream_align_new'
Allocate a new GstAudio.AudioStreamAlign with the given configuration. All processing happens according to sample rate rate, until GstAudio.AudioStreamAlign.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 GstAudio.AudioStreamAlign.set_alignment_threshold and GstAudio.AudioStreamAlign.set_discont_wait.
Parameters:
a sample rate
a alignment threshold in nanoseconds
discont wait in nanoseconds
a new GstAudio.AudioStreamAlign. free with GstAudio.AudioStreamAlign.free.
Since : 1.14
Methods
gst_audio_stream_align_copy
GstAudioStreamAlign * gst_audio_stream_align_copy (const GstAudioStreamAlign * align)
Copy a GstAudioStreamAlign structure.
Parameters:
align
–
a new GstAudioStreamAlign. free with gst_audio_stream_align_free.
Since : 1.14
GstAudio.AudioStreamAlign.prototype.copy
function GstAudio.AudioStreamAlign.prototype.copy(): {
// javascript wrapper for 'gst_audio_stream_align_copy'
}
Copy a GstAudioStreamAlign structure.
Parameters:
a new GstAudio.AudioStreamAlign. free with gst_audio_stream_align_free.
Since : 1.14
GstAudio.AudioStreamAlign.copy
def GstAudio.AudioStreamAlign.copy (self):
#python wrapper for 'gst_audio_stream_align_copy'
Copy a GstAudioStreamAlign structure.
Parameters:
a new GstAudio.AudioStreamAlign. free with gst_audio_stream_align_free.
Since : 1.14
gst_audio_stream_align_free
gst_audio_stream_align_free (GstAudioStreamAlign * align)
Free a GstAudioStreamAlign structure previously allocated with gst_audio_stream_align_new or gst_audio_stream_align_copy.
Parameters:
align
–
Since : 1.14
GstAudio.AudioStreamAlign.prototype.free
function GstAudio.AudioStreamAlign.prototype.free(): {
// javascript wrapper for 'gst_audio_stream_align_free'
}
Free a GstAudioStreamAlign structure previously allocated with GstAudio.AudioStreamAlign.prototype.new or GstAudio.AudioStreamAlign.prototype.copy.
Parameters:
Since : 1.14
GstAudio.AudioStreamAlign.free
def GstAudio.AudioStreamAlign.free (self):
#python wrapper for 'gst_audio_stream_align_free'
Free a GstAudioStreamAlign structure previously allocated with GstAudio.AudioStreamAlign.new or GstAudio.AudioStreamAlign.copy.
Parameters:
Since : 1.14
gst_audio_stream_align_get_alignment_threshold
GstClockTime gst_audio_stream_align_get_alignment_threshold (const GstAudioStreamAlign * align)
Gets the currently configured alignment threshold.
Parameters:
align
–
The currently configured alignment threshold
Since : 1.14
GstAudio.AudioStreamAlign.prototype.get_alignment_threshold
function GstAudio.AudioStreamAlign.prototype.get_alignment_threshold(): {
// javascript wrapper for 'gst_audio_stream_align_get_alignment_threshold'
}
Gets the currently configured alignment threshold.
Parameters:
The currently configured alignment threshold
Since : 1.14
GstAudio.AudioStreamAlign.get_alignment_threshold
def GstAudio.AudioStreamAlign.get_alignment_threshold (self):
#python wrapper for 'gst_audio_stream_align_get_alignment_threshold'
Gets the currently configured alignment threshold.
Parameters:
The currently configured alignment threshold
Since : 1.14
gst_audio_stream_align_get_discont_wait
GstClockTime gst_audio_stream_align_get_discont_wait (const GstAudioStreamAlign * align)
Gets the currently configured discont wait.
Parameters:
align
–
The currently configured discont wait
Since : 1.14
GstAudio.AudioStreamAlign.prototype.get_discont_wait
function GstAudio.AudioStreamAlign.prototype.get_discont_wait(): {
// javascript wrapper for 'gst_audio_stream_align_get_discont_wait'
}
Gets the currently configured discont wait.
Parameters:
The currently configured discont wait
Since : 1.14
GstAudio.AudioStreamAlign.get_discont_wait
def GstAudio.AudioStreamAlign.get_discont_wait (self):
#python wrapper for 'gst_audio_stream_align_get_discont_wait'
Gets the currently configured discont wait.
Parameters:
The currently configured discont wait
Since : 1.14
gst_audio_stream_align_get_rate
gint gst_audio_stream_align_get_rate (const GstAudioStreamAlign * align)
Gets the currently configured sample rate.
Parameters:
align
–
The currently configured sample rate
Since : 1.14
GstAudio.AudioStreamAlign.prototype.get_rate
function GstAudio.AudioStreamAlign.prototype.get_rate(): {
// javascript wrapper for 'gst_audio_stream_align_get_rate'
}
Gets the currently configured sample rate.
Parameters:
The currently configured sample rate
Since : 1.14
GstAudio.AudioStreamAlign.get_rate
def GstAudio.AudioStreamAlign.get_rate (self):
#python wrapper for 'gst_audio_stream_align_get_rate'
Gets the currently configured sample rate.
Parameters:
The currently configured sample rate
Since : 1.14
gst_audio_stream_align_get_samples_since_discont
guint64 gst_audio_stream_align_get_samples_since_discont (const GstAudioStreamAlign * align)
Returns the number of samples that were processed since the last discontinuity was detected.
Parameters:
align
–
The number of samples processed since the last discontinuity.
Since : 1.14
GstAudio.AudioStreamAlign.prototype.get_samples_since_discont
function GstAudio.AudioStreamAlign.prototype.get_samples_since_discont(): {
// javascript wrapper for 'gst_audio_stream_align_get_samples_since_discont'
}
Returns the number of samples that were processed since the last discontinuity was detected.
Parameters:
The number of samples processed since the last discontinuity.
Since : 1.14
GstAudio.AudioStreamAlign.get_samples_since_discont
def GstAudio.AudioStreamAlign.get_samples_since_discont (self):
#python wrapper for 'gst_audio_stream_align_get_samples_since_discont'
Returns the number of samples that were processed since the last discontinuity was detected.
Parameters:
The number of samples processed since the last discontinuity.
Since : 1.14
gst_audio_stream_align_get_timestamp_at_discont
GstClockTime gst_audio_stream_align_get_timestamp_at_discont (const GstAudioStreamAlign * align)
Timestamp that was passed when a discontinuity was detected, i.e. the first timestamp after the discontinuity.
Parameters:
align
–
The last timestamp at when a discontinuity was detected
Since : 1.14
GstAudio.AudioStreamAlign.prototype.get_timestamp_at_discont
function GstAudio.AudioStreamAlign.prototype.get_timestamp_at_discont(): {
// javascript wrapper for 'gst_audio_stream_align_get_timestamp_at_discont'
}
Timestamp that was passed when a discontinuity was detected, i.e. the first timestamp after the discontinuity.
Parameters:
The last timestamp at when a discontinuity was detected
Since : 1.14
GstAudio.AudioStreamAlign.get_timestamp_at_discont
def GstAudio.AudioStreamAlign.get_timestamp_at_discont (self):
#python wrapper for 'gst_audio_stream_align_get_timestamp_at_discont'
Timestamp that was passed when a discontinuity was detected, i.e. the first timestamp after the discontinuity.
Parameters:
The last timestamp at when a discontinuity was detected
Since : 1.14
gst_audio_stream_align_mark_discont
gst_audio_stream_align_mark_discont (GstAudioStreamAlign * align)
Marks the next buffer as discontinuous and resets timestamp tracking.
Parameters:
align
–
Since : 1.14
GstAudio.AudioStreamAlign.prototype.mark_discont
function GstAudio.AudioStreamAlign.prototype.mark_discont(): {
// javascript wrapper for 'gst_audio_stream_align_mark_discont'
}
Marks the next buffer as discontinuous and resets timestamp tracking.
Parameters:
Since : 1.14
GstAudio.AudioStreamAlign.mark_discont
def GstAudio.AudioStreamAlign.mark_discont (self):
#python wrapper for 'gst_audio_stream_align_mark_discont'
Marks the next buffer as discontinuous and resets timestamp tracking.
Parameters:
Since : 1.14
gst_audio_stream_align_process
gboolean gst_audio_stream_align_process (GstAudioStreamAlign * align, gboolean discont, GstClockTime timestamp, guint n_samples, GstClockTime * out_timestamp, GstClockTime * out_duration, guint64 * out_sample_position)
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:
align
–
discont
–
if this data is considered to be discontinuous
timestamp
–
a GstClockTime of the start of the data
n_samples
–
number of samples to process
out_timestamp
(
[out])
–
output timestamp of the data
out_duration
(
[out])
–
output duration of the data
out_sample_position
(
[out])
–
output sample position of the start of the data
Since : 1.14
GstAudio.AudioStreamAlign.prototype.process
function GstAudio.AudioStreamAlign.prototype.process(discont: Number, timestamp: Number, n_samples: Number): {
// javascript wrapper for 'gst_audio_stream_align_process'
}
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:
if this data is considered to be discontinuous
number of samples to process
Returns a tuple made of:
Since : 1.14
GstAudio.AudioStreamAlign.process
def GstAudio.AudioStreamAlign.process (self, discont, timestamp, n_samples):
#python wrapper for 'gst_audio_stream_align_process'
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:
if this data is considered to be discontinuous
number of samples to process
Returns a tuple made of:
Since : 1.14
gst_audio_stream_align_set_alignment_threshold
gst_audio_stream_align_set_alignment_threshold (GstAudioStreamAlign * align, GstClockTime alignment_threshold)
Sets alignment_treshold as new alignment threshold for the following processing.
Since : 1.14
GstAudio.AudioStreamAlign.prototype.set_alignment_threshold
function GstAudio.AudioStreamAlign.prototype.set_alignment_threshold(alignment_threshold: Number): {
// javascript wrapper for 'gst_audio_stream_align_set_alignment_threshold'
}
Sets alignment_treshold as new alignment threshold for the following processing.
Parameters:
a new alignment threshold
Since : 1.14
GstAudio.AudioStreamAlign.set_alignment_threshold
def GstAudio.AudioStreamAlign.set_alignment_threshold (self, alignment_threshold):
#python wrapper for 'gst_audio_stream_align_set_alignment_threshold'
Sets alignment_treshold as new alignment threshold for the following processing.
Parameters:
a new alignment threshold
Since : 1.14
gst_audio_stream_align_set_discont_wait
gst_audio_stream_align_set_discont_wait (GstAudioStreamAlign * align, GstClockTime discont_wait)
Sets alignment_treshold as new discont wait for the following processing.
Since : 1.14
GstAudio.AudioStreamAlign.prototype.set_discont_wait
function GstAudio.AudioStreamAlign.prototype.set_discont_wait(discont_wait: Number): {
// javascript wrapper for 'gst_audio_stream_align_set_discont_wait'
}
Sets alignment_treshold as new discont wait for the following processing.
Parameters:
a new discont wait
Since : 1.14
GstAudio.AudioStreamAlign.set_discont_wait
def GstAudio.AudioStreamAlign.set_discont_wait (self, discont_wait):
#python wrapper for 'gst_audio_stream_align_set_discont_wait'
Sets alignment_treshold as new discont wait for the following processing.
Parameters:
a new discont wait
Since : 1.14
gst_audio_stream_align_set_rate
gst_audio_stream_align_set_rate (GstAudioStreamAlign * align, gint rate)
Sets rate as new sample rate for the following processing. If the sample rate differs this implicitly marks the next data as discontinuous.
Since : 1.14
GstAudio.AudioStreamAlign.prototype.set_rate
function GstAudio.AudioStreamAlign.prototype.set_rate(rate: Number): {
// javascript wrapper for 'gst_audio_stream_align_set_rate'
}
Sets rate as new sample rate for the following processing. If the sample rate differs this implicitly marks the next data as discontinuous.
Parameters:
a new sample rate
Since : 1.14
GstAudio.AudioStreamAlign.set_rate
def GstAudio.AudioStreamAlign.set_rate (self, rate):
#python wrapper for 'gst_audio_stream_align_set_rate'
Sets rate as new sample rate for the following processing. If the sample rate differs this implicitly marks the next data as discontinuous.
Parameters:
a new sample rate
Since : 1.14
Constants
GST_TYPE_AUDIO_INFO_STREAM_ALIGN
#define GST_TYPE_AUDIO_INFO_STREAM_ALIGN (gst_audio_stream_align_get_type ())
The results of the search are