Navigation Menu

Skip to content

Commit

Permalink
audiotestsrc: 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 51ed45e commit a176f1a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions gst/audiotestsrc/gstaudiotestsrc.c
Expand Up @@ -154,6 +154,10 @@ GST_STATIC_PAD_TEMPLATE ("src",

#define gst_audio_test_src_parent_class parent_class
G_DEFINE_TYPE (GstAudioTestSrc, gst_audio_test_src, GST_TYPE_BASE_SRC);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (audiotestsrc, "audiotestsrc",
GST_RANK_NONE, GST_TYPE_AUDIO_TEST_SRC,
GST_DEBUG_CATEGORY_INIT (audio_test_src_debug, "audiotestsrc", 0,
"Audio Test Source"));

#define GST_TYPE_AUDIO_TEST_SRC_WAVE (gst_audiostestsrc_wave_get_type())
static GType
Expand Down Expand Up @@ -1679,11 +1683,7 @@ gst_audio_test_src_get_property (GObject * object, guint prop_id,
static gboolean
plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (audio_test_src_debug, "audiotestsrc", 0,
"Audio Test Source");

return gst_element_register (plugin, "audiotestsrc",
GST_RANK_NONE, GST_TYPE_AUDIO_TEST_SRC);
return GST_ELEMENT_REGISTER (audiotestsrc, plugin);
}

GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
Expand Down
2 changes: 2 additions & 0 deletions gst/audiotestsrc/gstaudiotestsrc.h
Expand Up @@ -135,6 +135,8 @@ struct _GstAudioTestSrc {
guint tick_counter;
};

GST_ELEMENT_REGISTER_DECLARE (audiotestsrc);

G_END_DECLS

#endif /* __GST_AUDIO_TEST_SRC_H__ */

0 comments on commit a176f1a

Please sign in to comment.