rsvg: 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-bad/-/merge_requests/2038>
This commit is contained in:
Stéphane Cerveau 2021-02-19 11:53:12 +01:00 committed by GStreamer Marge Bot
parent 1b0d570ee3
commit 144623bd43
5 changed files with 12 additions and 5 deletions

View file

@ -29,11 +29,12 @@
static gboolean
plugin_init (GstPlugin * plugin)
{
return (gst_element_register (plugin, "rsvgoverlay",
GST_RANK_NONE, GST_TYPE_RSVG_OVERLAY)
&&
gst_element_register (plugin, "rsvgdec", GST_RANK_PRIMARY,
GST_TYPE_RSVG_DEC));
gboolean ret = FALSE;
ret |= GST_ELEMENT_REGISTER (rsvgoverlay, plugin);
ret |= GST_ELEMENT_REGISTER (rsvgdec, plugin);
return ret;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -59,6 +59,8 @@ GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
#define gst_rsv_dec_parent_class parent_class
G_DEFINE_TYPE (GstRsvgDec, gst_rsvg_dec, GST_TYPE_VIDEO_DECODER);
GST_ELEMENT_REGISTER_DEFINE (rsvgdec, "rsvgdec", GST_RANK_PRIMARY,
GST_TYPE_RSVG_DEC);
static gboolean gst_rsvg_dec_stop (GstVideoDecoder * decoder);
static gboolean gst_rsvg_dec_set_format (GstVideoDecoder * decoder,

View file

@ -70,6 +70,7 @@ struct _GstRsvgDecClass
};
GType gst_rsvg_dec_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (rsvgdec);
G_END_DECLS

View file

@ -123,6 +123,8 @@ static GstStaticPadTemplate data_sink_template =
#define gst_rsv_overlay_parent_class parent_class
G_DEFINE_TYPE (GstRsvgOverlay, gst_rsvg_overlay, GST_TYPE_VIDEO_FILTER);
GST_ELEMENT_REGISTER_DEFINE (rsvgoverlay, "rsvgoverlay", GST_RANK_NONE,
GST_TYPE_RSVG_OVERLAY);
static void gst_rsvg_overlay_finalize (GObject * object);

View file

@ -73,6 +73,7 @@ struct _GstRsvgOverlayClass
};
GType gst_rsvg_overlay_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (rsvgoverlay);
G_END_DECLS
#endif /* __GST_RSVG_OVERLAY_H__ */