smoothstreaming: allow per feature registration
authorStéphane Cerveau <scerveau@collabora.com>
Fri, 19 Feb 2021 11:18:39 +0000 (12:18 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 23 Mar 2021 14:19:17 +0000 (14:19 +0000)
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-bad/-/merge_requests/2038>

ext/smoothstreaming/gstmssdemux.c
ext/smoothstreaming/gstmssdemux.h
ext/smoothstreaming/gstsmoothstreaming-plugin.c

index 3e9a375..a3c24fd 100644 (file)
@@ -109,7 +109,8 @@ GST_STATIC_PAD_TEMPLATE ("audio_%02u",
 
 #define gst_mss_demux_parent_class parent_class
 G_DEFINE_TYPE (GstMssDemux, gst_mss_demux, GST_TYPE_ADAPTIVE_DEMUX);
-
+GST_ELEMENT_REGISTER_DEFINE (mssdemux, "mssdemux",
+    GST_RANK_PRIMARY, GST_TYPE_MSS_DEMUX);
 static void gst_mss_demux_dispose (GObject * object);
 static void gst_mss_demux_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec);
index f3ea6cf..7076188 100644 (file)
@@ -79,7 +79,7 @@ struct _GstMssDemuxClass {
 };
 
 GType gst_mss_demux_get_type (void);
-
+GST_ELEMENT_REGISTER_DECLARE (mssdemux);
 G_END_DECLS
 
 #endif /* __GST_MSSDEMUX_H__ */
index f7fecb1..36261f0 100644 (file)
 static gboolean
 plugin_init (GstPlugin * plugin)
 {
-  if (!gst_element_register (plugin, "mssdemux",
-          GST_RANK_PRIMARY, GST_TYPE_MSS_DEMUX))
-    return FALSE;
-
-  return TRUE;
+  return GST_ELEMENT_REGISTER (mssdemux, plugin);
 }
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,