mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
bz2: 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
6bfa751d8b
commit
d0d5663e06
5 changed files with 12 additions and 5 deletions
|
@ -30,11 +30,12 @@
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * p)
|
plugin_init (GstPlugin * p)
|
||||||
{
|
{
|
||||||
if (!gst_element_register (p, "bz2enc", GST_RANK_NONE, GST_TYPE_BZ2ENC))
|
gboolean ret = FALSE;
|
||||||
return FALSE;
|
|
||||||
if (!gst_element_register (p, "bz2dec", GST_RANK_NONE, GST_TYPE_BZ2DEC))
|
ret |= GST_ELEMENT_REGISTER (bz2enc, p);
|
||||||
return FALSE;
|
ret |= GST_ELEMENT_REGISTER (bz2dec, p);
|
||||||
return TRUE;
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, bz2,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, bz2,
|
||||||
|
|
|
@ -59,6 +59,7 @@ struct _GstBz2decClass
|
||||||
|
|
||||||
#define gst_bz2dec_parent_class parent_class
|
#define gst_bz2dec_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstBz2dec, gst_bz2dec, GST_TYPE_ELEMENT);
|
G_DEFINE_TYPE (GstBz2dec, gst_bz2dec, GST_TYPE_ELEMENT);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (bz2dec, "bz2dec", GST_RANK_NONE, GST_TYPE_BZ2DEC);
|
||||||
|
|
||||||
#define DEFAULT_FIRST_BUFFER_SIZE 1024
|
#define DEFAULT_FIRST_BUFFER_SIZE 1024
|
||||||
#define DEFAULT_BUFFER_SIZE 1024
|
#define DEFAULT_BUFFER_SIZE 1024
|
||||||
|
|
|
@ -35,5 +35,7 @@ GType
|
||||||
gst_bz2dec_get_type (void)
|
gst_bz2dec_get_type (void)
|
||||||
G_GNUC_CONST;
|
G_GNUC_CONST;
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (bz2dec);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* __GST_BZ2DEC_H__ */
|
#endif /* __GST_BZ2DEC_H__ */
|
||||||
|
|
|
@ -67,6 +67,7 @@ struct _GstBz2encClass
|
||||||
|
|
||||||
#define gst_bz2enc_parent_class parent_class
|
#define gst_bz2enc_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstBz2enc, gst_bz2enc, GST_TYPE_ELEMENT);
|
G_DEFINE_TYPE (GstBz2enc, gst_bz2enc, GST_TYPE_ELEMENT);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (bz2enc, "bz2enc", GST_RANK_NONE, GST_TYPE_BZ2ENC);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_bz2enc_compress_end (GstBz2enc * b)
|
gst_bz2enc_compress_end (GstBz2enc * b)
|
||||||
|
|
|
@ -35,5 +35,7 @@ GType
|
||||||
gst_bz2enc_get_type (void)
|
gst_bz2enc_get_type (void)
|
||||||
G_GNUC_CONST;
|
G_GNUC_CONST;
|
||||||
|
|
||||||
|
GST_ELEMENT_REGISTER_DECLARE (bz2enc);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* __GST_BZ2ENC_H__ */
|
#endif /* __GST_BZ2ENC_H__ */
|
||||||
|
|
Loading…
Reference in a new issue