mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-05-15 20:58:57 +00:00
smpte: 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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
This commit is contained in:
parent
084c01dd5a
commit
0ea8c2e3a1
5 changed files with 14 additions and 26 deletions
|
@ -149,6 +149,9 @@ static GstStateChangeReturn gst_smpte_change_state (GstElement * element,
|
|||
|
||||
#define gst_smpte_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstSMPTE, gst_smpte, GST_TYPE_ELEMENT);
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (smpte, "smpte", GST_RANK_NONE,
|
||||
GST_TYPE_SMPTE, GST_DEBUG_CATEGORY_INIT (gst_smpte_debug, "smpte", 0,
|
||||
"SMPTE transition effect"));
|
||||
|
||||
static void
|
||||
gst_smpte_class_init (GstSMPTEClass * klass)
|
||||
|
@ -662,12 +665,3 @@ gst_smpte_change_state (GstElement * element, GstStateChange transition)
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_smpte_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (gst_smpte_debug, "smpte", 0,
|
||||
"SMPTE transition effect");
|
||||
|
||||
return gst_element_register (plugin, "smpte", GST_RANK_NONE, GST_TYPE_SMPTE);
|
||||
}
|
||||
|
|
|
@ -79,7 +79,8 @@ struct _GstSMPTEClass {
|
|||
};
|
||||
|
||||
GType gst_smpte_get_type (void);
|
||||
gboolean gst_smpte_plugin_init (GstPlugin * plugin);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (smpte);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_SMPTE_H__ */
|
||||
|
|
|
@ -153,6 +153,9 @@ static GstCaps *gst_smpte_alpha_transform_caps (GstBaseTransform * trans,
|
|||
|
||||
#define gst_smpte_alpha_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstSMPTEAlpha, gst_smpte_alpha, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (smptealpha, "smptealpha", GST_RANK_NONE,
|
||||
GST_TYPE_SMPTE_ALPHA, GST_DEBUG_CATEGORY_INIT (gst_smpte_alpha_debug,
|
||||
"smptealpha", 0, "SMPTE alpha effect"));
|
||||
|
||||
static void
|
||||
gst_smpte_alpha_class_init (GstSMPTEAlphaClass * klass)
|
||||
|
@ -800,13 +803,3 @@ gst_smpte_alpha_get_property (GObject * object, guint prop_id,
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_smpte_alpha_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (gst_smpte_alpha_debug, "smptealpha", 0,
|
||||
"SMPTE alpha effect");
|
||||
|
||||
return gst_element_register (plugin, "smptealpha", GST_RANK_NONE,
|
||||
GST_TYPE_SMPTE_ALPHA);
|
||||
}
|
||||
|
|
|
@ -72,7 +72,8 @@ struct _GstSMPTEAlphaClass {
|
|||
};
|
||||
|
||||
GType gst_smpte_alpha_get_type (void);
|
||||
gboolean gst_smpte_alpha_plugin_init (GstPlugin * plugin);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (smptealpha);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -27,13 +27,12 @@
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
if (!gst_smpte_plugin_init (plugin))
|
||||
return FALSE;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
if (!gst_smpte_alpha_plugin_init (plugin))
|
||||
return FALSE;
|
||||
ret |= GST_ELEMENT_REGISTER (smpte, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (smptealpha, plugin);
|
||||
|
||||
return TRUE;
|
||||
return ret;
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
Loading…
Reference in a new issue