Commit 08734e75 authored by Wim Taymans's avatar Wim Taymans

audio-converter: rework the main processing loop

Rework the main processing loop. We now create an audio processing
chain from small core functions. This is very similar to how the
video-converter core works and allows us to statically calculate an
optimal allocation strategy for all possible combinations of operations.
Make sure we support non-interleaved data everywhere.
Add functions to calculate in and out frames and latency.
parent 8bcf183c
This diff is collapsed.
......@@ -69,20 +69,27 @@ typedef enum {
GST_AUDIO_CONVERTER_FLAG_SOURCE_WRITABLE = (1 << 0)
} GstAudioConverterFlags;
GstAudioConverter * gst_audio_converter_new (GstAudioInfo *in_info,
GstAudioInfo *out_info,
GstStructure *config);
GstAudioConverter * gst_audio_converter_new (GstAudioInfo *in_info,
GstAudioInfo *out_info,
GstStructure *config);
void gst_audio_converter_free (GstAudioConverter * convert);
void gst_audio_converter_free (GstAudioConverter * convert);
gboolean gst_audio_converter_set_config (GstAudioConverter * convert, GstStructure *config);
const GstStructure * gst_audio_converter_get_config (GstAudioConverter * convert);
gboolean gst_audio_converter_set_config (GstAudioConverter * convert, GstStructure *config);
const GstStructure * gst_audio_converter_get_config (GstAudioConverter * convert);
gsize gst_audio_converter_get_out_frames (GstAudioConverter *convert,
gsize in_frames);
gsize gst_audio_converter_get_in_frames (GstAudioConverter *convert,
gsize out_frames);
gboolean gst_audio_converter_samples (GstAudioConverter * convert,
GstAudioConverterFlags flags,
gpointer in[], gsize in_samples,
gpointer out[], gsize out_samples,
gsize *in_consumed, gsize *out_produced);
gsize gst_audio_converter_get_max_latency (GstAudioConverter *convert);
gboolean gst_audio_converter_samples (GstAudioConverter * convert,
GstAudioConverterFlags flags,
gpointer in[], gsize in_samples,
gpointer out[], gsize out_samples,
gsize *in_consumed, gsize *out_produced);
#endif /* __GST_AUDIO_CONVERTER_H__ */
......@@ -49,6 +49,9 @@ EXPORTS
gst_audio_converter_flags_get_type
gst_audio_converter_free
gst_audio_converter_get_config
gst_audio_converter_get_in_frames
gst_audio_converter_get_max_latency
gst_audio_converter_get_out_frames
gst_audio_converter_new
gst_audio_converter_samples
gst_audio_converter_set_config
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment