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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
This commit is contained in:
Stéphane Cerveau 2021-02-16 17:38:46 +01:00
parent 24c03454e3
commit e63ab37431
3 changed files with 8 additions and 8 deletions

View file

@ -27,17 +27,11 @@
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
GST_DEBUG_CATEGORY (cairo_debug);
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
gst_element_register (plugin, "cairooverlay", GST_RANK_NONE, return GST_ELEMENT_REGISTER (cairooverlay, plugin);
GST_TYPE_CAIRO_OVERLAY);
GST_DEBUG_CATEGORY_INIT (cairo_debug, "cairo", 0, "Cairo elements");
return TRUE;
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, cairo, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, cairo,

View file

@ -104,6 +104,8 @@
#define TEMPLATE_CAPS GST_VIDEO_CAPS_MAKE("{ xRGB, ARGB, RGB16 }") #define TEMPLATE_CAPS GST_VIDEO_CAPS_MAKE("{ xRGB, ARGB, RGB16 }")
#endif #endif
GST_DEBUG_CATEGORY (cairo_debug);
static GstStaticPadTemplate gst_cairo_overlay_src_template = static GstStaticPadTemplate gst_cairo_overlay_src_template =
GST_STATIC_PAD_TEMPLATE ("src", GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC, GST_PAD_SRC,
@ -119,7 +121,9 @@ GST_STATIC_PAD_TEMPLATE ("sink",
); );
G_DEFINE_TYPE (GstCairoOverlay, gst_cairo_overlay, GST_TYPE_BASE_TRANSFORM); 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 enum
{ {
PROP_0, PROP_0,

View file

@ -43,6 +43,8 @@ struct _GstCairoOverlay {
gboolean attach_compo_to_buffer; gboolean attach_compo_to_buffer;
}; };
GST_ELEMENT_REGISTER_DECLARE (cairooverlay);
G_END_DECLS G_END_DECLS
#endif /* __GST_CAIRO_OVERLAY_H__ */ #endif /* __GST_CAIRO_OVERLAY_H__ */