summaryrefslogtreecommitdiff
path: root/sys/uvch264/gstuvch264.c
diff options
context:
space:
mode:
authorStéphane Cerveau <scerveau@collabora.com>2021-03-26 11:00:50 +0100
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>2021-04-09 19:23:40 +0000
commitda9e012e8a0b82e9487ab9802162023d87d63d3f (patch)
treec0a13fd3d7a2f34a9dfe61d3ef5943b46e96a692 /sys/uvch264/gstuvch264.c
parentfee725f3cc75a74b77ee3ce785e65f1d2d500305 (diff)
downloadgstreamer-plugins-bad-da9e012e8a0b82e9487ab9802162023d87d63d3f.tar.gz
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2116>
Diffstat (limited to 'sys/uvch264/gstuvch264.c')
-rw-r--r--sys/uvch264/gstuvch264.c19
1 files changed, 6 insertions, 13 deletions
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 <gst/gst.h>
#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,