audio-converter: add reset function

This commit is contained in:
Wim Taymans 2016-01-26 16:56:57 +01:00
parent 2d971df593
commit 03566e5002
3 changed files with 18 additions and 0 deletions

View file

@ -972,6 +972,20 @@ gst_audio_converter_get_max_latency (GstAudioConverter * convert)
return 0;
}
/**
* gst_audio_converter_reset:
* @convert: a #GstAudioConverter
*
* Reset @convert to the state it was when it was first created, clearing
* any history it might currently have.
*/
void
gst_audio_converter_reset (GstAudioConverter * convert)
{
if (convert->quant)
gst_audio_quantize_reset (convert->quant);
}
/**
* gst_audio_converter_samples:
* @convert: a #GstAudioConverter

View file

@ -79,6 +79,8 @@ GstAudioConverter * gst_audio_converter_new (GstAudioConverterFlags
void gst_audio_converter_free (GstAudioConverter * convert);
void gst_audio_converter_reset (GstAudioConverter * convert);
gboolean gst_audio_converter_update_config (GstAudioConverter * convert,
gint in_rate, gint out_rate,
GstStructure *config);

View file

@ -53,6 +53,7 @@ EXPORTS
gst_audio_converter_get_max_latency
gst_audio_converter_get_out_frames
gst_audio_converter_new
gst_audio_converter_reset
gst_audio_converter_samples
gst_audio_converter_update_config
gst_audio_decoder_allocate_output_buffer
@ -150,6 +151,7 @@ EXPORTS
gst_audio_quantize_flags_get_type
gst_audio_quantize_free
gst_audio_quantize_new
gst_audio_quantize_reset
gst_audio_quantize_samples
gst_audio_reorder_channels
gst_audio_ring_buffer_acquire