From: Stéphane Cerveau Date: Tue, 16 Feb 2021 16:38:46 +0000 (+0100) Subject: cairo: allow per feature registration X-Git-Tag: 1.19.3~509^2~181 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e63ab37431438de05379c225ea3978722a7b0ac1;p=platform%2Fupstream%2Fgstreamer.git cairo: 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: --- diff --git a/ext/cairo/gstcairo.c b/ext/cairo/gstcairo.c index 5b94387..389ded6 100644 --- a/ext/cairo/gstcairo.c +++ b/ext/cairo/gstcairo.c @@ -27,17 +27,11 @@ #include #include -GST_DEBUG_CATEGORY (cairo_debug); static gboolean plugin_init (GstPlugin * plugin) { - gst_element_register (plugin, "cairooverlay", GST_RANK_NONE, - GST_TYPE_CAIRO_OVERLAY); - - GST_DEBUG_CATEGORY_INIT (cairo_debug, "cairo", 0, "Cairo elements"); - - return TRUE; + return GST_ELEMENT_REGISTER (cairooverlay, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, cairo, diff --git a/ext/cairo/gstcairooverlay.c b/ext/cairo/gstcairooverlay.c index 217c4c2..789ce27 100644 --- a/ext/cairo/gstcairooverlay.c +++ b/ext/cairo/gstcairooverlay.c @@ -104,6 +104,8 @@ #define TEMPLATE_CAPS GST_VIDEO_CAPS_MAKE("{ xRGB, ARGB, RGB16 }") #endif +GST_DEBUG_CATEGORY (cairo_debug); + static GstStaticPadTemplate gst_cairo_overlay_src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, @@ -119,7 +121,9 @@ GST_STATIC_PAD_TEMPLATE ("sink", ); G_DEFINE_TYPE (GstCairoOverlay, gst_cairo_overlay, GST_TYPE_BASE_TRANSFORM); - +GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (cairooverlay, "cairooverlay", + GST_RANK_NONE, GST_TYPE_CAIRO_OVERLAY, GST_DEBUG_CATEGORY_INIT (cairo_debug, + "cairo", 0, "Cairo elements");); enum { PROP_0, diff --git a/ext/cairo/gstcairooverlay.h b/ext/cairo/gstcairooverlay.h index b342c4b..440bead 100644 --- a/ext/cairo/gstcairooverlay.h +++ b/ext/cairo/gstcairooverlay.h @@ -43,6 +43,8 @@ struct _GstCairoOverlay { gboolean attach_compo_to_buffer; }; +GST_ELEMENT_REGISTER_DECLARE (cairooverlay); + G_END_DECLS #endif /* __GST_CAIRO_OVERLAY_H__ */