Skip to content

Commit

Permalink
audioresample: allow per feature registration
Browse files Browse the repository at this point in the history
  • Loading branch information
Stéphane Cerveau committed Mar 29, 2021
1 parent bc75b81 commit 51ed45e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
15 changes: 5 additions & 10 deletions gst/audioresample/gstaudioresample.c
Expand Up @@ -136,7 +136,10 @@ static void gst_audio_resample_push_drain (GstAudioResample * resample,

#define gst_audio_resample_parent_class parent_class
G_DEFINE_TYPE (GstAudioResample, gst_audio_resample, GST_TYPE_BASE_TRANSFORM);

GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (audioresample, "audioresample",
GST_RANK_PRIMARY, GST_TYPE_AUDIO_RESAMPLE,
GST_DEBUG_CATEGORY_INIT (audio_resample_debug, "audioresample", 0,
"audio resampling element"));
static void
gst_audio_resample_class_init (GstAudioResampleClass * klass)
{
Expand Down Expand Up @@ -1121,15 +1124,7 @@ gst_audio_resample_get_property (GObject * object, guint prop_id,
static gboolean
plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (audio_resample_debug, "audioresample", 0,
"audio resampling element");

if (!gst_element_register (plugin, "audioresample", GST_RANK_PRIMARY,
GST_TYPE_AUDIO_RESAMPLE)) {
return FALSE;
}

return TRUE;
return GST_ELEMENT_REGISTER (audioresample, plugin);
}

GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
Expand Down
1 change: 1 addition & 0 deletions gst/audioresample/gstaudioresample.h
Expand Up @@ -64,6 +64,7 @@ struct _GstAudioResample {
GstAudioInfo out;
GstAudioConverter *converter;
};
GST_ELEMENT_REGISTER_DECLARE (audioresample);

G_END_DECLS

Expand Down

0 comments on commit 51ed45e

Please sign in to comment.