webp: 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-25 08:04:42 +01:00 committed by GStreamer Marge Bot
parent 178dda8623
commit 6adf7dff71
5 changed files with 13 additions and 19 deletions

View file

@ -31,10 +31,12 @@
static gboolean
plugin_init (GstPlugin * plugin)
{
gst_webp_dec_register (plugin);
gst_webp_enc_register (plugin);
gboolean ret = FALSE;
return TRUE;
ret |= GST_ELEMENT_REGISTER (webpdec, plugin);
ret |= GST_ELEMENT_REGISTER (webpenc, plugin);
return ret;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -79,6 +79,8 @@ static gboolean gst_webp_dec_reset_frame (GstWebPDec * webpdec);
#define gst_webp_dec_parent_class parent_class
G_DEFINE_TYPE (GstWebPDec, gst_webp_dec, GST_TYPE_VIDEO_DECODER);
GST_ELEMENT_REGISTER_DEFINE (webpdec, "webpdec",
GST_RANK_PRIMARY, GST_TYPE_WEBP_DEC);
static void
gst_webp_dec_class_init (GstWebPDecClass * klass)
@ -489,10 +491,3 @@ gst_webp_dec_handle_frame (GstVideoDecoder * decoder,
done:
return ret;
}
gboolean
gst_webp_dec_register (GstPlugin * plugin)
{
return gst_element_register (plugin, "webpdec",
GST_RANK_PRIMARY, GST_TYPE_WEBP_DEC);
}

View file

@ -69,7 +69,8 @@ struct _GstWebPDecClass {
};
GType gst_webp_dec_get_type (void);
gboolean gst_webp_dec_register (GstPlugin * plugin);
GST_ELEMENT_REGISTER_DECLARE (webpdec);
G_END_DECLS

View file

@ -107,6 +107,8 @@ gst_webp_enc_preset_get_type (void)
#define gst_webp_enc_parent_class parent_class
G_DEFINE_TYPE (GstWebpEnc, gst_webp_enc, GST_TYPE_VIDEO_ENCODER);
GST_ELEMENT_REGISTER_DEFINE (webpenc, "webpenc",
GST_RANK_PRIMARY, GST_TYPE_WEBP_ENC);
static void
gst_webp_enc_class_init (GstWebpEncClass * klass)
@ -398,10 +400,3 @@ gst_webp_enc_stop (GstVideoEncoder * benc)
gst_video_codec_state_unref (enc->input_state);
return TRUE;
}
gboolean
gst_webp_enc_register (GstPlugin * plugin)
{
return gst_element_register (plugin, "webpenc",
GST_RANK_PRIMARY, GST_TYPE_WEBP_ENC);
}

View file

@ -70,7 +70,8 @@ struct _GstWebpEncClass
};
GType gst_webp_enc_get_type (void);
gboolean gst_webp_enc_register (GstPlugin * plugin);
GST_ELEMENT_REGISTER_DECLARE (webpenc);
G_END_DECLS
#endif /* __GST_WEBPENC_H__ */