From: Stéphane Cerveau Date: Tue, 16 Feb 2021 16:34:34 +0000 (+0100) Subject: y4m: allow per feature registration X-Git-Tag: 1.19.3~509^2~182 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=24c03454e3512fa663cfa24dbd03659a8e82a509;p=platform%2Fupstream%2Fgstreamer.git y4m: 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: --- diff --git a/gst/y4m/gsty4mencode.c b/gst/y4m/gsty4mencode.c index e4a1e60..16890e7 100644 --- a/gst/y4m/gsty4mencode.c +++ b/gst/y4m/gsty4mencode.c @@ -84,7 +84,8 @@ static gboolean gst_y4m_encode_set_format (GstVideoEncoder * encoder, #define gst_y4m_encode_parent_class parent_class G_DEFINE_TYPE (GstY4mEncode, gst_y4m_encode, GST_TYPE_VIDEO_ENCODER); - +GST_ELEMENT_REGISTER_DEFINE (y4menc, "y4menc", GST_RANK_PRIMARY, + GST_TYPE_Y4M_ENCODE); static void gst_y4m_encode_class_init (GstY4mEncodeClass * klass) @@ -301,8 +302,7 @@ gst_y4m_encode_change_state (GstElement * element, GstStateChange transition) static gboolean plugin_init (GstPlugin * plugin) { - return gst_element_register (plugin, "y4menc", GST_RANK_PRIMARY, - GST_TYPE_Y4M_ENCODE); + return GST_ELEMENT_REGISTER (y4menc, plugin); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/gst/y4m/gsty4mencode.h b/gst/y4m/gsty4mencode.h index 13a7a1b..77c5edd 100644 --- a/gst/y4m/gsty4mencode.h +++ b/gst/y4m/gsty4mencode.h @@ -59,6 +59,8 @@ struct _GstY4mEncodeClass { GType gst_y4m_encode_get_type(void); +GST_ELEMENT_REGISTER_DECLARE (y4menc); + G_END_DECLS #endif /* __GST_Y4MENCODE_H__ */