libde265: 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-18 09:50:21 +01:00 committed by GStreamer Marge Bot
parent 6a4614e135
commit c2ccead61f
3 changed files with 5 additions and 17 deletions

View file

@ -28,10 +28,7 @@
static gboolean
plugin_init (GstPlugin * plugin)
{
gboolean ret;
ret = gst_libde265_dec_plugin_init (plugin);
return ret;
return GST_ELEMENT_REGISTER (libde265dec, plugin);
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -47,6 +47,8 @@
#define parent_class gst_libde265_dec_parent_class
G_DEFINE_TYPE (GstLibde265Dec, gst_libde265_dec, GST_TYPE_VIDEO_DECODER);
GST_ELEMENT_REGISTER_DEFINE (libde265dec, "libde265dec",
GST_RANK_SECONDARY, GST_TYPE_LIBDE265_DEC);
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
@ -872,14 +874,3 @@ error_input:
gst_buffer_unmap (frame->input_buffer, &info);
return GST_FLOW_ERROR;
}
gboolean
gst_libde265_dec_plugin_init (GstPlugin * plugin)
{
/* create an elementfactory for the libde265 decoder element */
if (!gst_element_register (plugin, "libde265dec",
GST_RANK_SECONDARY, GST_TYPE_LIBDE265_DEC))
return FALSE;
return TRUE;
}

View file

@ -64,8 +64,8 @@ typedef struct _GstLibde265DecClass
GType gst_libde265_dec_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (libde265dec)
G_END_DECLS
gboolean gst_libde265_dec_plugin_init (GstPlugin * plugin);
#endif /* __GST_LIBDE265_DEC_H__ */