mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-08 18:39:54 +00:00
openjpeg: 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
8fa3dd4bf3
commit
c4a1de5510
5 changed files with 13 additions and 7 deletions
|
@ -30,14 +30,12 @@
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
if (!gst_element_register (plugin, "openjpegdec", GST_RANK_PRIMARY,
|
||||
GST_TYPE_OPENJPEG_DEC))
|
||||
return FALSE;
|
||||
if (!gst_element_register (plugin, "openjpegenc", GST_RANK_PRIMARY,
|
||||
GST_TYPE_OPENJPEG_ENC))
|
||||
return FALSE;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
return TRUE;
|
||||
ret |= GST_ELEMENT_REGISTER (openjpegdec, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (openjpegenc, plugin);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
|
|
|
@ -83,6 +83,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
|
|||
|
||||
#define parent_class gst_openjpeg_dec_parent_class
|
||||
G_DEFINE_TYPE (GstOpenJPEGDec, gst_openjpeg_dec, GST_TYPE_VIDEO_DECODER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (openjpegdec, "openjpegdec",
|
||||
GST_RANK_PRIMARY, GST_TYPE_OPENJPEG_DEC);
|
||||
|
||||
static void
|
||||
gst_openjpeg_dec_class_init (GstOpenJPEGDecClass * klass)
|
||||
|
|
|
@ -72,6 +72,8 @@ struct _GstOpenJPEGDecClass
|
|||
|
||||
GType gst_openjpeg_dec_get_type (void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (openjpegdec);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_OPENJPEG_DEC_H__ */
|
||||
|
|
|
@ -134,6 +134,8 @@ static GstStaticPadTemplate gst_openjpeg_enc_src_template =
|
|||
|
||||
#define parent_class gst_openjpeg_enc_parent_class
|
||||
G_DEFINE_TYPE (GstOpenJPEGEnc, gst_openjpeg_enc, GST_TYPE_VIDEO_ENCODER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (openjpegenc, "openjpegenc",
|
||||
GST_RANK_PRIMARY, GST_TYPE_OPENJPEG_ENC);
|
||||
|
||||
static void
|
||||
gst_openjpeg_enc_class_init (GstOpenJPEGEncClass * klass)
|
||||
|
|
|
@ -67,6 +67,8 @@ struct _GstOpenJPEGEncClass
|
|||
|
||||
GType gst_openjpeg_enc_get_type (void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (openjpegenc);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_OPENJPEG_ENC_H__ */
|
||||
|
|
Loading…
Reference in a new issue