mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-02 12:45:51 +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
|
@ -31,10 +31,12 @@
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
gst_webp_dec_register (plugin);
|
gboolean ret = FALSE;
|
||||||
gst_webp_enc_register (plugin);
|
|
||||||
|
|
||||||
return TRUE;
|
ret |= GST_ELEMENT_REGISTER (webpdec, plugin);
|
||||||
|
ret |= GST_ELEMENT_REGISTER (webpenc, plugin);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
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
|
#define gst_webp_dec_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstWebPDec, gst_webp_dec, GST_TYPE_VIDEO_DECODER);
|
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
|
static void
|
||||||
gst_webp_dec_class_init (GstWebPDecClass * klass)
|
gst_webp_dec_class_init (GstWebPDecClass * klass)
|
||||||
|
@ -489,10 +491,3 @@ gst_webp_dec_handle_frame (GstVideoDecoder * decoder,
|
||||||
done:
|
done:
|
||||||
return ret;
|
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);
|
GType gst_webp_dec_get_type (void);
|
||||||
gboolean gst_webp_dec_register (GstPlugin * plugin);
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (webpdec);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -107,6 +107,8 @@ gst_webp_enc_preset_get_type (void)
|
||||||
|
|
||||||
#define gst_webp_enc_parent_class parent_class
|
#define gst_webp_enc_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstWebpEnc, gst_webp_enc, GST_TYPE_VIDEO_ENCODER);
|
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
|
static void
|
||||||
gst_webp_enc_class_init (GstWebpEncClass * klass)
|
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);
|
gst_video_codec_state_unref (enc->input_state);
|
||||||
return TRUE;
|
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);
|
GType gst_webp_enc_get_type (void);
|
||||||
gboolean gst_webp_enc_register (GstPlugin * plugin);
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (webpenc);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* __GST_WEBPENC_H__ */
|
#endif /* __GST_WEBPENC_H__ */
|
||||||
|
|
Loading…
Reference in a new issue