audio-converter: add reset function
authorWim Taymans <wtaymans@redhat.com>
Tue, 26 Jan 2016 15:56:57 +0000 (16:56 +0100)
committerWim Taymans <wtaymans@redhat.com>
Tue, 26 Jan 2016 16:19:34 +0000 (17:19 +0100)
gst-libs/gst/audio/audio-converter.c
gst-libs/gst/audio/audio-converter.h
win32/common/libgstaudio.def

index abd9070d76f03b1cf9fafc0434b57b94f8c4c8f9..0792345038783e672b30699028a9e910b5534b79 100644 (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
index 6251d2f8fbdbe599d0cc6fa6516844bcc9e947e8..6d037db0dd318d5cde47c5f78b04263121eb4b6b 100644 (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);
index 26914306f30c58c4b6e26c67e3baa415c98b13fa..d0b7f44cb3b188436c26b40d84d7ddd9febc479c 100644 (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