gpointer *tmp;
gboolean src_writable;
- src_writable = (convert->flags & GST_AUDIO_CONVERTER_FLAG_SOURCE_WRITABLE);
+ src_writable = (convert->flags & GST_AUDIO_CONVERTER_FLAG_IN_WRITABLE);
if (!chain->allow_ip || !src_writable || !convert->in_default) {
gint i;
/**
* gst_audio_converter_new: (skip)
+ * @flags: #GstAudioConverterFlags
* @in_info: a source #GstAudioInfo
* @out_info: a destination #GstAudioInfo
* @config: (transfer full): a #GstStructure with configuration options
* Returns: a #GstAudioConverter or %NULL if conversion is not possible.
*/
GstAudioConverter *
-gst_audio_converter_new (GstAudioInfo * in_info, GstAudioInfo * out_info,
- GstStructure * config)
+gst_audio_converter_new (GstAudioConverterFlags flags, GstAudioInfo * in_info,
+ GstAudioInfo * out_info, GstStructure * config)
{
GstAudioConverter *convert;
AudioChain *prev;
/**
* GstAudioConverterFlags:
* @GST_AUDIO_CONVERTER_FLAG_NONE: no flag
- * @GST_AUDIO_CONVERTER_FLAG_SOURCE_WRITABLE: the source is writable and can be
+ * @GST_AUDIO_CONVERTER_FLAG_IN_WRITABLE: the input sample arrays are writable and can be
* used as temporary storage during conversion.
+ * @GST_AUDIO_CONVERTER_FLAG_VARIABLE_RATE: allow arbitrary rate updates with
+ * gst_audio_converter_update_config().
*
- * Extra flags passed to gst_audio_converter_samples().
+ * Extra flags passed to gst_audio_converter_new() and gst_audio_converter_samples().
*/
typedef enum {
GST_AUDIO_CONVERTER_FLAG_NONE = 0,
- GST_AUDIO_CONVERTER_FLAG_SOURCE_WRITABLE = (1 << 0)
+ GST_AUDIO_CONVERTER_FLAG_IN_WRITABLE = (1 << 0),
+ GST_AUDIO_CONVERTER_FLAG_VARIABLE_RATE = (1 << 1)
} GstAudioConverterFlags;
-GstAudioConverter * gst_audio_converter_new (GstAudioInfo *in_info,
+GstAudioConverter * gst_audio_converter_new (GstAudioConverterFlags flags,
+ GstAudioInfo *in_info,
GstAudioInfo *out_info,
GstStructure *config);
if (!gst_audio_info_from_caps (&out_info, outcaps))
goto invalid_out;
- this->convert = gst_audio_converter_new (&in_info, &out_info,
+ this->convert = gst_audio_converter_new (0, &in_info, &out_info,
gst_structure_new ("GstAudioConverterConfig",
GST_AUDIO_CONVERTER_OPT_DITHER_METHOD, GST_TYPE_AUDIO_DITHER_METHOD,
this->dither,
/* and convert the samples */
flags = 0;
if (inbuf_writable)
- flags |= GST_AUDIO_CONVERTER_FLAG_SOURCE_WRITABLE;
+ flags |= GST_AUDIO_CONVERTER_FLAG_IN_WRITABLE;
if (!GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_GAP)) {
gpointer in[1] = { srcmap.data };