wavenc: allow per feature registration
authorStéphane Cerveau <scerveau@collabora.com>
Tue, 16 Feb 2021 16:29:40 +0000 (17:29 +0100)
committerStéphane Cerveau <scerveau@collabora.com>
Mon, 29 Mar 2021 10:45:23 +0000 (12:45 +0200)
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>

gst/wavenc/gstwavenc.c
gst/wavenc/gstwavenc.h

index ddfa795..2392afe 100644 (file)
@@ -116,6 +116,8 @@ G_DEFINE_TYPE_WITH_CODE (GstWavEnc, gst_wavenc, GST_TYPE_ELEMENT,
     G_IMPLEMENT_INTERFACE (GST_TYPE_TAG_SETTER, NULL)
     G_IMPLEMENT_INTERFACE (GST_TYPE_TOC_SETTER, NULL)
     );
+GST_ELEMENT_REGISTER_DEFINE (wavenc, "wavenc", GST_RANK_PRIMARY,
+    GST_TYPE_WAVENC);
 
 static GstFlowReturn gst_wavenc_chain (GstPad * pad, GstObject * parent,
     GstBuffer * buf);
@@ -1140,8 +1142,7 @@ gst_wavenc_change_state (GstElement * element, GstStateChange transition)
 static gboolean
 plugin_init (GstPlugin * plugin)
 {
-  return gst_element_register (plugin, "wavenc", GST_RANK_PRIMARY,
-      GST_TYPE_WAVENC);
+  return GST_ELEMENT_REGISTER (wavenc, plugin);
 }
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
index 11b38bb..a682d32 100644 (file)
@@ -78,6 +78,8 @@ struct _GstWavEncClass {
 
 GType gst_wavenc_get_type (void);
 
+GST_ELEMENT_REGISTER_DECLARE (wavenc);
+
 G_END_DECLS
 
 #endif /* __GST_WAV_ENC_H__ */