From da9e012e8a0b82e9487ab9802162023d87d63d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Fri, 26 Mar 2021 11:00:50 +0100 Subject: plugins-sys: 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: --- sys/uvch264/gstuvch264.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'sys/uvch264/gstuvch264.c') diff --git a/sys/uvch264/gstuvch264.c b/sys/uvch264/gstuvch264.c index e3d76e322..a532687ae 100644 --- a/sys/uvch264/gstuvch264.c +++ b/sys/uvch264/gstuvch264.c @@ -28,26 +28,19 @@ #include #include "gstuvch264_mjpgdemux.h" #include "gstuvch264_src.h" - -extern GType gst_uvc_h264_device_provider_get_type (); +#include "gstuvch264deviceprovider.h" static gboolean plugin_init (GstPlugin * plugin) { - if (!gst_element_register (plugin, "uvch264mjpgdemux", GST_RANK_NONE, - GST_TYPE_UVC_H264_MJPG_DEMUX)) - return FALSE; - - if (!gst_element_register (plugin, "uvch264src", GST_RANK_NONE, - GST_TYPE_UVC_H264_SRC)) - return FALSE; + gboolean ret = FALSE; - if (!gst_device_provider_register (plugin, "uvch264deviceprovider", - GST_RANK_PRIMARY, gst_uvc_h264_device_provider_get_type ())) - return FALSE; + ret |= GST_ELEMENT_REGISTER (uvch264mjpgdemux, plugin); + ret |= GST_ELEMENT_REGISTER (uvch264src, plugin); + ret |= GST_DEVICE_PROVIDER_REGISTER (uvch264deviceprovider, plugin); - return TRUE; + return ret; } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, -- cgit v1.2.1