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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
This commit is contained in:
parent
8ef56e529f
commit
24c03454e3
@ -84,7 +84,8 @@ static gboolean gst_y4m_encode_set_format (GstVideoEncoder * encoder,
|
|||||||
|
|
||||||
#define gst_y4m_encode_parent_class parent_class
|
#define gst_y4m_encode_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstY4mEncode, gst_y4m_encode, GST_TYPE_VIDEO_ENCODER);
|
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
|
static void
|
||||||
gst_y4m_encode_class_init (GstY4mEncodeClass * klass)
|
gst_y4m_encode_class_init (GstY4mEncodeClass * klass)
|
||||||
@ -301,8 +302,7 @@ gst_y4m_encode_change_state (GstElement * element, GstStateChange transition)
|
|||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
return gst_element_register (plugin, "y4menc", GST_RANK_PRIMARY,
|
return GST_ELEMENT_REGISTER (y4menc, plugin);
|
||||||
GST_TYPE_Y4M_ENCODE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
@ -59,6 +59,8 @@ struct _GstY4mEncodeClass {
|
|||||||
|
|
||||||
GType gst_y4m_encode_get_type(void);
|
GType gst_y4m_encode_get_type(void);
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (y4menc);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_Y4MENCODE_H__ */
|
#endif /* __GST_Y4MENCODE_H__ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user