mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-30 19:18:31 +00:00
libpng: 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
abd5c40691
commit
fb29c4b07f
5 changed files with 12 additions and 7 deletions
|
@ -29,15 +29,12 @@
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
if (!gst_element_register (plugin, "pngdec", GST_RANK_PRIMARY,
|
gboolean ret = FALSE;
|
||||||
GST_TYPE_PNGDEC))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
if (!gst_element_register (plugin, "pngenc", GST_RANK_PRIMARY,
|
ret |= GST_ELEMENT_REGISTER (pngdec, plugin);
|
||||||
GST_TYPE_PNGENC))
|
ret |= GST_ELEMENT_REGISTER (pngenc, plugin);
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
|
|
@ -62,6 +62,8 @@ static gboolean gst_pngdec_sink_event (GstVideoDecoder * bdec,
|
||||||
|
|
||||||
#define parent_class gst_pngdec_parent_class
|
#define parent_class gst_pngdec_parent_class
|
||||||
G_DEFINE_TYPE (GstPngDec, gst_pngdec, GST_TYPE_VIDEO_DECODER);
|
G_DEFINE_TYPE (GstPngDec, gst_pngdec, GST_TYPE_VIDEO_DECODER);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (pngdec, "pngdec", GST_RANK_PRIMARY,
|
||||||
|
GST_TYPE_PNGDEC);
|
||||||
|
|
||||||
static GstStaticPadTemplate gst_pngdec_src_pad_template =
|
static GstStaticPadTemplate gst_pngdec_src_pad_template =
|
||||||
GST_STATIC_PAD_TEMPLATE ("src",
|
GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
|
|
|
@ -53,6 +53,8 @@ struct _GstPngDec
|
||||||
gsize read_data;
|
gsize read_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (pngdec);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_PNGDEC_H__ */
|
#endif /* __GST_PNGDEC_H__ */
|
||||||
|
|
|
@ -74,6 +74,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
|
|
||||||
#define parent_class gst_pngenc_parent_class
|
#define parent_class gst_pngenc_parent_class
|
||||||
G_DEFINE_TYPE (GstPngEnc, gst_pngenc, GST_TYPE_VIDEO_ENCODER);
|
G_DEFINE_TYPE (GstPngEnc, gst_pngenc, GST_TYPE_VIDEO_ENCODER);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (pngenc, "pngenc", GST_RANK_PRIMARY,
|
||||||
|
GST_TYPE_PNGENC);
|
||||||
|
|
||||||
static void gst_pngenc_set_property (GObject * object,
|
static void gst_pngenc_set_property (GObject * object,
|
||||||
guint prop_id, const GValue * value, GParamSpec * pspec);
|
guint prop_id, const GValue * value, GParamSpec * pspec);
|
||||||
|
|
|
@ -50,6 +50,8 @@ struct _GstPngEnc
|
||||||
gboolean newmedia;
|
gboolean newmedia;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (pngenc);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_PNGENC_H__ */
|
#endif /* __GST_PNGENC_H__ */
|
||||||
|
|
Loading…
Reference in a new issue