mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
closedcaption: 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
8b9c75eecc
commit
bbe3eecd3f
13 changed files with 36 additions and 22 deletions
|
@ -51,8 +51,10 @@ static GstStaticPadTemplate captiontemplate =
|
|||
("closedcaption/x-cea-608,format={ (string) raw, (string) s334-1a}; "
|
||||
"closedcaption/x-cea-708,format={ (string) cc_data, (string) cdp }"));
|
||||
|
||||
G_DEFINE_TYPE (GstCCCombiner, gst_cc_combiner, GST_TYPE_AGGREGATOR);
|
||||
#define parent_class gst_cc_combiner_parent_class
|
||||
G_DEFINE_TYPE (GstCCCombiner, gst_cc_combiner, GST_TYPE_AGGREGATOR);
|
||||
GST_ELEMENT_REGISTER_DEFINE (cccombiner, "cccombiner",
|
||||
GST_RANK_NONE, GST_TYPE_CCCOMBINER);
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -81,5 +81,7 @@ struct _GstCCCombinerClass
|
|||
|
||||
GType gst_cc_combiner_get_type (void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (cccombiner);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_CCCOMBINER_H__ */
|
||||
|
|
|
@ -69,8 +69,10 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (CC_CAPS));
|
||||
|
||||
G_DEFINE_TYPE (GstCCConverter, gst_cc_converter, GST_TYPE_BASE_TRANSFORM);
|
||||
#define parent_class gst_cc_converter_parent_class
|
||||
G_DEFINE_TYPE (GstCCConverter, gst_cc_converter, GST_TYPE_BASE_TRANSFORM);
|
||||
GST_ELEMENT_REGISTER_DEFINE (ccconverter, "ccconverter",
|
||||
GST_RANK_NONE, GST_TYPE_CCCONVERTER);
|
||||
|
||||
#define GST_TYPE_CC_CONVERTER_CDP_MODE (gst_cc_converter_cdp_mode_get_type())
|
||||
static GType
|
||||
|
|
|
@ -88,5 +88,7 @@ struct _GstCCConverterClass
|
|||
|
||||
GType gst_cc_converter_get_type (void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (ccconverter);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_CCCONVERTER_H__ */
|
||||
|
|
|
@ -65,8 +65,10 @@ static GstStaticPadTemplate captiontemplate =
|
|||
("closedcaption/x-cea-608,format={ (string) raw, (string) s334-1a}; "
|
||||
"closedcaption/x-cea-708,format={ (string) cc_data, (string) cdp }"));
|
||||
|
||||
G_DEFINE_TYPE (GstCCExtractor, gst_cc_extractor, GST_TYPE_ELEMENT);
|
||||
#define parent_class gst_cc_extractor_parent_class
|
||||
G_DEFINE_TYPE (GstCCExtractor, gst_cc_extractor, GST_TYPE_ELEMENT);
|
||||
GST_ELEMENT_REGISTER_DEFINE (ccextractor, "ccextractor",
|
||||
GST_RANK_NONE, GST_TYPE_CCEXTRACTOR);
|
||||
|
||||
static gboolean gst_cc_extractor_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
|
|
|
@ -61,5 +61,7 @@ struct _GstCCExtractorClass
|
|||
|
||||
GType gst_cc_extractor_get_type (void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (ccextractor);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_CCEXTRACTOR_H__ */
|
||||
|
|
|
@ -195,6 +195,9 @@ gst_cea_cc_overlay_get_type (void)
|
|||
return type;
|
||||
}
|
||||
|
||||
GST_ELEMENT_REGISTER_DEFINE (cc708overlay, "cc708overlay",
|
||||
GST_RANK_PRIMARY, GST_TYPE_CEA_CC_OVERLAY);
|
||||
|
||||
static void
|
||||
gst_base_cea_cc_overlay_base_init (gpointer g_class)
|
||||
{
|
||||
|
|
|
@ -132,5 +132,7 @@ struct _GstCeaCcOverlayClass
|
|||
|
||||
GType gst_cea_cc_overlay_get_type (void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (cc708overlay);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_CEA_CC_OVERLAY_H__ */
|
||||
|
|
|
@ -35,25 +35,14 @@
|
|||
static gboolean
|
||||
closedcaption_init (GstPlugin * plugin)
|
||||
{
|
||||
gboolean ret;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
ret = gst_element_register (plugin, "cccombiner", GST_RANK_NONE,
|
||||
GST_TYPE_CCCOMBINER);
|
||||
|
||||
ret &= gst_element_register (plugin, "ccconverter", GST_RANK_NONE,
|
||||
GST_TYPE_CCCONVERTER);
|
||||
|
||||
ret &= gst_element_register (plugin, "ccextractor", GST_RANK_NONE,
|
||||
GST_TYPE_CCEXTRACTOR);
|
||||
|
||||
ret &= gst_element_register (plugin, "line21decoder", GST_RANK_NONE,
|
||||
GST_TYPE_LINE21DECODER);
|
||||
|
||||
ret &= gst_element_register (plugin, "cc708overlay", GST_RANK_PRIMARY,
|
||||
GST_TYPE_CEA_CC_OVERLAY);
|
||||
|
||||
ret &= gst_element_register (plugin, "line21encoder", GST_RANK_NONE,
|
||||
GST_TYPE_LINE21ENCODER);
|
||||
ret |= GST_ELEMENT_REGISTER (cccombiner, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (ccconverter, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (ccextractor, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (line21decoder, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (cc708overlay, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (line21encoder, plugin);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -49,8 +49,10 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (CAPS));
|
||||
|
||||
G_DEFINE_TYPE (GstLine21Decoder, gst_line_21_decoder, GST_TYPE_VIDEO_FILTER);
|
||||
#define parent_class gst_line_21_decoder_parent_class
|
||||
G_DEFINE_TYPE (GstLine21Decoder, gst_line_21_decoder, GST_TYPE_VIDEO_FILTER);
|
||||
GST_ELEMENT_REGISTER_DEFINE (line21decoder, "line21decoder",
|
||||
GST_RANK_NONE, GST_TYPE_LINE21DECODER);
|
||||
|
||||
static void gst_line_21_decoder_finalize (GObject * self);
|
||||
static gboolean gst_line_21_decoder_stop (GstBaseTransform * btrans);
|
||||
|
|
|
@ -69,5 +69,7 @@ struct _GstLine21DecoderClass
|
|||
|
||||
GType gst_line_21_decoder_get_type (void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (line21decoder);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_LINE21DECODER_H__ */
|
||||
|
|
|
@ -60,6 +60,8 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
|
||||
G_DEFINE_TYPE (GstLine21Encoder, gst_line_21_encoder, GST_TYPE_VIDEO_FILTER);
|
||||
#define parent_class gst_line_21_encoder_parent_class
|
||||
GST_ELEMENT_REGISTER_DEFINE (line21encoder, "line21encoder",
|
||||
GST_RANK_NONE, GST_TYPE_LINE21ENCODER);
|
||||
|
||||
static gboolean gst_line_21_encoder_set_info (GstVideoFilter * filter,
|
||||
GstCaps * incaps, GstVideoInfo * in_info,
|
||||
|
|
|
@ -59,5 +59,7 @@ struct _GstLine21EncoderClass
|
|||
|
||||
GType gst_line_21_encoder_get_type (void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (line21encoder);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_LINE21ENCODER_H__ */
|
||||
|
|
Loading…
Reference in a new issue