Skip to content

Commit

Permalink
audiorate: 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 6bcd6e1 commit bc75b81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
9 changes: 4 additions & 5 deletions gst/audiorate/gstaudiorate.c
Expand Up @@ -138,6 +138,9 @@ static GParamSpec *pspec_add = NULL;

#define gst_audio_rate_parent_class parent_class
G_DEFINE_TYPE (GstAudioRate, gst_audio_rate, GST_TYPE_ELEMENT);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (audiorate, "audiorate", GST_RANK_NONE,
GST_TYPE_AUDIO_RATE, GST_DEBUG_CATEGORY_INIT (audio_rate_debug, "audiorate",
0, "AudioRate stream fixer"));

static void
gst_audio_rate_class_init (GstAudioRateClass * klass)
Expand Down Expand Up @@ -782,11 +785,7 @@ gst_audio_rate_change_state (GstElement * element, GstStateChange transition)
static gboolean
plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (audio_rate_debug, "audiorate", 0,
"AudioRate stream fixer");

return gst_element_register (plugin, "audiorate", GST_RANK_NONE,
GST_TYPE_AUDIO_RATE);
return GST_ELEMENT_REGISTER (audiorate, plugin);
}

GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
Expand Down
1 change: 1 addition & 0 deletions gst/audiorate/gstaudiorate.h
Expand Up @@ -60,6 +60,7 @@ struct _GstAudioRate
/* we output TIME format on the src */
GstSegment src_segment;
};
GST_ELEMENT_REGISTER_DECLARE (audiorate);

G_END_DECLS

Expand Down

0 comments on commit bc75b81

Please sign in to comment.