From 58cf5d9e6232dad4378ca9e730dda30c602010eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Thu, 18 Feb 2021 09:52:08 +0100 Subject: [PATCH] libmms: allow per feature registration 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: --- ext/libmms/gstmms.c | 4 ++-- ext/libmms/gstmms.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/libmms/gstmms.c b/ext/libmms/gstmms.c index 18f9ad85f5..b127a1f57a 100644 --- a/ext/libmms/gstmms.c +++ b/ext/libmms/gstmms.c @@ -73,6 +73,7 @@ static gboolean gst_mms_uri_set_uri (GstURIHandler * handler, #define gst_mms_parent_class parent_class G_DEFINE_TYPE_WITH_CODE (GstMMS, gst_mms, GST_TYPE_PUSH_SRC, G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_mms_uri_handler_init)); +GST_ELEMENT_REGISTER_DEFINE (mmssrc, "mmssrc", GST_RANK_NONE, GST_TYPE_MMS); /* initialize the plugin's class */ static void @@ -520,7 +521,7 @@ gst_mms_get_property (GObject * object, guint prop_id, static gboolean plugin_init (GstPlugin * plugin) { - return gst_element_register (plugin, "mmssrc", GST_RANK_NONE, GST_TYPE_MMS); + return GST_ELEMENT_REGISTER (mmssrc, plugin); } static GstURIType @@ -627,7 +628,6 @@ gst_mms_uri_handler_init (gpointer g_iface, gpointer iface_data) iface->set_uri = gst_mms_uri_set_uri; } - /* this is the structure that gst-register looks for * so keep the name plugin_desc, or you cannot get your plug-in registered */ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/ext/libmms/gstmms.h b/ext/libmms/gstmms.h index bd988f11e5..2d701d368b 100644 --- a/ext/libmms/gstmms.h +++ b/ext/libmms/gstmms.h @@ -44,6 +44,8 @@ struct _GstMMSClass GType gst_mms_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (mmssrc); + G_END_DECLS #endif /* __GST_MMS_H__ */