diff --git a/docs/libs/gst-plugins-base-libs-sections.txt b/docs/libs/gst-plugins-base-libs-sections.txt index c4789b7037..57222fb56e 100644 --- a/docs/libs/gst-plugins-base-libs-sections.txt +++ b/docs/libs/gst-plugins-base-libs-sections.txt @@ -670,6 +670,7 @@ gst_audio_converter_reset gst_audio_converter_supports_inplace gst_audio_converter_flags_get_type +gst_audio_converter_get_type
diff --git a/gst-libs/gst/audio/audio-converter.c b/gst-libs/gst/audio/audio-converter.c index b8f20152cb..e06d2e99b6 100644 --- a/gst-libs/gst/audio/audio-converter.c +++ b/gst-libs/gst/audio/audio-converter.c @@ -141,6 +141,20 @@ struct _GstAudioConverter AudioConvertSamplesFunc convert; }; +static GstAudioConverter * +gst_audio_converter_copy (GstAudioConverter * convert) +{ + GstAudioConverter *res = + gst_audio_converter_new (convert->flags, &convert->in, &convert->out, + convert->config); + + return res; +} + +G_DEFINE_BOXED_TYPE (GstAudioConverter, gst_audio_converter, + (GBoxedCopyFunc) gst_audio_converter_copy, + (GBoxedFreeFunc) gst_audio_converter_free); + typedef gboolean (*AudioChainFunc) (AudioChain * chain, gpointer user_data); typedef gpointer *(*AudioChainAllocFunc) (AudioChain * chain, gsize num_samples, gpointer user_data); diff --git a/gst-libs/gst/audio/audio-converter.h b/gst-libs/gst/audio/audio-converter.h index 99d12bb524..4d93b0b3b0 100644 --- a/gst-libs/gst/audio/audio-converter.h +++ b/gst-libs/gst/audio/audio-converter.h @@ -121,6 +121,9 @@ GstAudioConverter * gst_audio_converter_new (GstAudioConverterFlags GstAudioInfo *out_info, GstStructure *config); +GST_EXPORT +GType gst_audio_converter_get_type (void); + GST_EXPORT void gst_audio_converter_free (GstAudioConverter * convert);