AudioConverter: register as boxed type

https://bugzilla.gnome.org/show_bug.cgi?id=793492
This commit is contained in:
Mathieu Duponchelle 2018-02-15 19:56:46 +01:00
parent 3d50d0e8b0
commit 9046e6001b
3 changed files with 18 additions and 0 deletions

View file

@ -670,6 +670,7 @@ gst_audio_converter_reset
gst_audio_converter_supports_inplace
<SUBSECTION Standard>
gst_audio_converter_flags_get_type
gst_audio_converter_get_type
</SECTION>
<SECTION>

View file

@ -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);

View file

@ -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);