mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
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:
parent
178dda8623
commit
6adf7dff71
5 changed files with 13 additions and 19 deletions
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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__ */
|
||||
|
|
Loading…
Reference in a new issue