deinterlace: 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:
Stéphane Cerveau 2021-02-16 17:10:33 +01:00
parent 31a780a061
commit 213753b9d8
2 changed files with 14 additions and 8 deletions

View file

@ -342,6 +342,7 @@ static void gst_deinterlace_update_qos (GstDeinterlace * self,
static void gst_deinterlace_reset_qos (GstDeinterlace * self);
static void gst_deinterlace_read_qos (GstDeinterlace * self,
gdouble * proportion, GstClockTime * time);
static gboolean deinterlace_element_init (GstPlugin * plugin);
#define IS_TELECINE(m) ((m) == GST_VIDEO_INTERLACE_MODE_MIXED && self->pattern > 1)
@ -365,9 +366,9 @@ _do_init (GType object_type)
}
#endif
G_DEFINE_TYPE (GstDeinterlace, gst_deinterlace, GST_TYPE_ELEMENT);
#define parent_class gst_deinterlace_parent_class
G_DEFINE_TYPE (GstDeinterlace, gst_deinterlace, GST_TYPE_ELEMENT);
GST_ELEMENT_REGISTER_DEFINE_CUSTOM (deinterlace, deinterlace_element_init);
static const struct
{
@ -3314,8 +3315,9 @@ gst_deinterlace_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
return res;
}
static gboolean
plugin_init (GstPlugin * plugin)
deinterlace_element_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (deinterlace_debug, "deinterlace", 0, "Deinterlacer");
@ -3323,12 +3325,14 @@ plugin_init (GstPlugin * plugin)
orc_init ();
#endif
if (!gst_element_register (plugin, "deinterlace", GST_RANK_NONE,
GST_TYPE_DEINTERLACE)) {
return FALSE;
}
return gst_element_register (plugin, "deinterlace", GST_RANK_NONE,
GST_TYPE_DEINTERLACE);
}
return TRUE;
static gboolean
plugin_init (GstPlugin * plugin)
{
return GST_ELEMENT_REGISTER (deinterlace, plugin);
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -206,6 +206,8 @@ struct _GstDeinterlaceClass
GType gst_deinterlace_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (deinterlace);
G_END_DECLS
#endif /* __GST_DEINTERLACE_H__ */