Skip to content

Commit

Permalink
audioconvert: allow per feature registration
Browse files Browse the repository at this point in the history
  • Loading branch information
Stéphane Cerveau authored and GStreamer Marge Bot committed Mar 16, 2021
1 parent 59163a1 commit 2cc37e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 2 additions & 1 deletion gst/audioconvert/gstaudioconvert.c
Expand Up @@ -165,7 +165,8 @@ enum
#define gst_audio_convert_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstAudioConvert, gst_audio_convert,
GST_TYPE_BASE_TRANSFORM, DEBUG_INIT);

GST_ELEMENT_REGISTER_DEFINE (audioconvert, "audioconvert",
GST_RANK_PRIMARY, GST_TYPE_AUDIO_CONVERT);
/*** GSTREAMER PROTOTYPES *****************************************************/

#define STATIC_CAPS \
Expand Down
4 changes: 3 additions & 1 deletion gst/audioconvert/gstaudioconvert.h
Expand Up @@ -28,7 +28,7 @@

#define GST_TYPE_AUDIO_CONVERT (gst_audio_convert_get_type())
G_DECLARE_FINAL_TYPE (GstAudioConvert, gst_audio_convert,
GST, AUDIO_CONVERT, GstBaseTransform)
GST, AUDIO_CONVERT, GstBaseTransform);

/**
* GstAudioConvert:
Expand All @@ -50,4 +50,6 @@ struct _GstAudioConvert
GstAudioConverter *convert;
};

GST_ELEMENT_REGISTER_DECLARE (audioconvert);

#endif /* __GST_AUDIO_CONVERT_H__ */
6 changes: 1 addition & 5 deletions gst/audioconvert/plugin.c
Expand Up @@ -28,11 +28,7 @@
static gboolean
plugin_init (GstPlugin * plugin)
{
if (!gst_element_register (plugin, "audioconvert",
GST_RANK_PRIMARY, GST_TYPE_AUDIO_CONVERT))
return FALSE;

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

GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
Expand Down

0 comments on commit 2cc37e7

Please sign in to comment.