mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
avtp: 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
6638dd2ff4
commit
476dfe4f6f
17 changed files with 35 additions and 83 deletions
|
@ -249,24 +249,18 @@
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
if (!gst_avtp_aaf_pay_plugin_init (plugin))
|
gboolean ret = FALSE;
|
||||||
return FALSE;
|
|
||||||
if (!gst_avtp_aaf_depay_plugin_init (plugin))
|
|
||||||
return FALSE;
|
|
||||||
if (!gst_avtp_sink_plugin_init (plugin))
|
|
||||||
return FALSE;
|
|
||||||
if (!gst_avtp_src_plugin_init (plugin))
|
|
||||||
return FALSE;
|
|
||||||
if (!gst_avtp_cvf_pay_plugin_init (plugin))
|
|
||||||
return FALSE;
|
|
||||||
if (!gst_avtp_cvf_depay_plugin_init (plugin))
|
|
||||||
return FALSE;
|
|
||||||
if (!gst_avtp_crf_sync_plugin_init (plugin))
|
|
||||||
return FALSE;
|
|
||||||
if (!gst_avtp_crf_check_plugin_init (plugin))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
ret |= GST_ELEMENT_REGISTER (avtpaafpay, plugin);
|
||||||
|
ret |= GST_ELEMENT_REGISTER (avtpaafdepay, plugin);
|
||||||
|
ret |= GST_ELEMENT_REGISTER (avtpsink, plugin);
|
||||||
|
ret |= GST_ELEMENT_REGISTER (avtpsrc, plugin);
|
||||||
|
ret |= GST_ELEMENT_REGISTER (avtpcvfpay, plugin);
|
||||||
|
ret |= GST_ELEMENT_REGISTER (avtpcvfdepay, plugin);
|
||||||
|
ret |= GST_ELEMENT_REGISTER (avtpcrfsync, plugin);
|
||||||
|
ret |= GST_ELEMENT_REGISTER (avtpcrfcheck, plugin);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR,
|
||||||
|
|
|
@ -56,6 +56,8 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
|
|
||||||
G_DEFINE_TYPE (GstAvtpAafDepay, gst_avtp_aaf_depay,
|
G_DEFINE_TYPE (GstAvtpAafDepay, gst_avtp_aaf_depay,
|
||||||
GST_TYPE_AVTP_BASE_DEPAYLOAD);
|
GST_TYPE_AVTP_BASE_DEPAYLOAD);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (avtpaafdepay, "avtpaafdepay", GST_RANK_NONE,
|
||||||
|
GST_TYPE_AVTP_AAF_DEPAY);
|
||||||
|
|
||||||
static GstFlowReturn gst_avtp_aaf_depay_chain (GstPad * pad, GstObject * parent,
|
static GstFlowReturn gst_avtp_aaf_depay_chain (GstPad * pad, GstObject * parent,
|
||||||
GstBuffer * buffer);
|
GstBuffer * buffer);
|
||||||
|
@ -317,10 +319,3 @@ discard:
|
||||||
gst_buffer_unref (buffer);
|
gst_buffer_unref (buffer);
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_avtp_aaf_depay_plugin_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
return gst_element_register (plugin, "avtpaafdepay", GST_RANK_NONE,
|
|
||||||
GST_TYPE_AVTP_AAF_DEPAY);
|
|
||||||
}
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ struct _GstAvtpAafDepayClass
|
||||||
|
|
||||||
GType gst_avtp_aaf_depay_get_type (void);
|
GType gst_avtp_aaf_depay_get_type (void);
|
||||||
|
|
||||||
gboolean gst_avtp_aaf_depay_plugin_init (GstPlugin * plugin);
|
GST_ELEMENT_REGISTER_DECLARE (avtpaafdepay);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,8 @@ gst_avtp_aaf_timestamp_mode_get_type (void)
|
||||||
|
|
||||||
#define gst_avtp_aaf_pay_parent_class parent_class
|
#define gst_avtp_aaf_pay_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstAvtpAafPay, gst_avtp_aaf_pay, GST_TYPE_AVTP_BASE_PAYLOAD);
|
G_DEFINE_TYPE (GstAvtpAafPay, gst_avtp_aaf_pay, GST_TYPE_AVTP_BASE_PAYLOAD);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (avtpaafpay, "avtpaafpay", GST_RANK_NONE,
|
||||||
|
GST_TYPE_AVTP_AAF_PAY);
|
||||||
|
|
||||||
static void gst_avtp_aaf_pay_set_property (GObject * object, guint prop_id,
|
static void gst_avtp_aaf_pay_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
|
@ -391,10 +393,3 @@ gst_avtp_aaf_pay_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
parent, event);
|
parent, event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_avtp_aaf_pay_plugin_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
return gst_element_register (plugin, "avtpaafpay", GST_RANK_NONE,
|
|
||||||
GST_TYPE_AVTP_AAF_PAY);
|
|
||||||
}
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ struct _GstAvtpAafPayClass
|
||||||
|
|
||||||
GType gst_avtp_aaf_pay_get_type (void);
|
GType gst_avtp_aaf_pay_get_type (void);
|
||||||
|
|
||||||
gboolean gst_avtp_aaf_pay_plugin_init (GstPlugin * plugin);
|
GST_ELEMENT_REGISTER_DECLARE (avtpaafpay);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,8 @@ enum
|
||||||
|
|
||||||
#define gst_avtp_crf_check_parent_class parent_class
|
#define gst_avtp_crf_check_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstAvtpCrfCheck, gst_avtp_crf_check, GST_TYPE_AVTP_CRF_BASE);
|
G_DEFINE_TYPE (GstAvtpCrfCheck, gst_avtp_crf_check, GST_TYPE_AVTP_CRF_BASE);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (avtpcrfcheck, "avtpcrfcheck", GST_RANK_NONE,
|
||||||
|
GST_TYPE_AVTP_CRF_CHECK);
|
||||||
|
|
||||||
static void gst_avtp_crf_check_set_property (GObject * object, guint prop_id,
|
static void gst_avtp_crf_check_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
|
@ -254,10 +256,3 @@ exit:
|
||||||
gst_buffer_unmap (buffer, &info);
|
gst_buffer_unmap (buffer, &info);
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_avtp_crf_check_plugin_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
return gst_element_register (plugin, "avtpcrfcheck", GST_RANK_NONE,
|
|
||||||
GST_TYPE_AVTP_CRF_CHECK);
|
|
||||||
}
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ struct _GstAvtpCrfCheckClass
|
||||||
|
|
||||||
GType gst_avtp_crf_check_get_type (void);
|
GType gst_avtp_crf_check_get_type (void);
|
||||||
|
|
||||||
gboolean gst_avtp_crf_check_plugin_init (GstPlugin * plugin);
|
GST_ELEMENT_REGISTER_DECLARE (avtpcrfcheck);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* __GST_AVTP_CRF_CHECK_H__ */
|
#endif /* __GST_AVTP_CRF_CHECK_H__ */
|
||||||
|
|
|
@ -54,7 +54,8 @@ GST_DEBUG_CATEGORY_STATIC (avtpcrfsync_debug);
|
||||||
|
|
||||||
#define gst_avtp_crf_sync_parent_class parent_class
|
#define gst_avtp_crf_sync_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstAvtpCrfSync, gst_avtp_crf_sync, GST_TYPE_AVTP_CRF_BASE);
|
G_DEFINE_TYPE (GstAvtpCrfSync, gst_avtp_crf_sync, GST_TYPE_AVTP_CRF_BASE);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (avtpcrfsync, "avtpcrfsync", GST_RANK_NONE,
|
||||||
|
GST_TYPE_AVTP_CRF_SYNC);
|
||||||
static GstFlowReturn gst_avtp_crf_sync_transform_ip (GstBaseTransform * parent,
|
static GstFlowReturn gst_avtp_crf_sync_transform_ip (GstBaseTransform * parent,
|
||||||
GstBuffer * buffer);
|
GstBuffer * buffer);
|
||||||
|
|
||||||
|
@ -240,10 +241,3 @@ exit:
|
||||||
gst_buffer_unmap (buffer, &info);
|
gst_buffer_unmap (buffer, &info);
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_avtp_crf_sync_plugin_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
return gst_element_register (plugin, "avtpcrfsync", GST_RANK_NONE,
|
|
||||||
GST_TYPE_AVTP_CRF_SYNC);
|
|
||||||
}
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ struct _GstAvtpCrfSyncClass
|
||||||
|
|
||||||
GType gst_avtp_crf_sync_get_type (void);
|
GType gst_avtp_crf_sync_get_type (void);
|
||||||
|
|
||||||
gboolean gst_avtp_crf_sync_plugin_init (GstPlugin * plugin);
|
GST_ELEMENT_REGISTER_DECLARE (avtpcrfsync);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* __GST_AVTP_CRF_SYNC_H__ */
|
#endif /* __GST_AVTP_CRF_SYNC_H__ */
|
||||||
|
|
|
@ -83,6 +83,8 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
#define gst_avtp_cvf_depay_parent_class parent_class
|
#define gst_avtp_cvf_depay_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstAvtpCvfDepay, gst_avtp_cvf_depay,
|
G_DEFINE_TYPE (GstAvtpCvfDepay, gst_avtp_cvf_depay,
|
||||||
GST_TYPE_AVTP_BASE_DEPAYLOAD);
|
GST_TYPE_AVTP_BASE_DEPAYLOAD);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (avtpcvfdepay, "avtpcvfdepay", GST_RANK_NONE,
|
||||||
|
GST_TYPE_AVTP_CVF_DEPAY);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_avtp_cvf_depay_class_init (GstAvtpCvfDepayClass * klass)
|
gst_avtp_cvf_depay_class_init (GstAvtpCvfDepayClass * klass)
|
||||||
|
@ -727,10 +729,3 @@ end:
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_avtp_cvf_depay_plugin_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
return gst_element_register (plugin, "avtpcvfdepay", GST_RANK_NONE,
|
|
||||||
GST_TYPE_AVTP_CVF_DEPAY);
|
|
||||||
}
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ struct _GstAvtpCvfDepayClass
|
||||||
|
|
||||||
GType gst_avtp_cvf_depay_get_type (void);
|
GType gst_avtp_cvf_depay_get_type (void);
|
||||||
|
|
||||||
gboolean gst_avtp_cvf_depay_plugin_init (GstPlugin * plugin);
|
GST_ELEMENT_REGISTER_DECLARE (avtpcvfdepay);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -97,6 +97,8 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
|
|
||||||
#define gst_avtp_cvf_pay_parent_class parent_class
|
#define gst_avtp_cvf_pay_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstAvtpCvfPay, gst_avtp_cvf_pay, GST_TYPE_AVTP_BASE_PAYLOAD);
|
G_DEFINE_TYPE (GstAvtpCvfPay, gst_avtp_cvf_pay, GST_TYPE_AVTP_BASE_PAYLOAD);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (avtpcvfpay, "avtpcvfpay", GST_RANK_NONE,
|
||||||
|
GST_TYPE_AVTP_CVF_PAY);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_avtp_cvf_pay_class_init (GstAvtpCvfPayClass * klass)
|
gst_avtp_cvf_pay_class_init (GstAvtpCvfPayClass * klass)
|
||||||
|
@ -766,10 +768,3 @@ gst_avtp_cvf_pay_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
return GST_AVTP_BASE_PAYLOAD_CLASS (parent_class)->sink_event (pad, parent,
|
return GST_AVTP_BASE_PAYLOAD_CLASS (parent_class)->sink_event (pad, parent,
|
||||||
event);
|
event);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_avtp_cvf_pay_plugin_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
return gst_element_register (plugin, "avtpcvfpay", GST_RANK_NONE,
|
|
||||||
GST_TYPE_AVTP_CVF_PAY);
|
|
||||||
}
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ struct _GstAvtpCvfPayClass
|
||||||
|
|
||||||
GType gst_avtp_cvf_pay_get_type (void);
|
GType gst_avtp_cvf_pay_get_type (void);
|
||||||
|
|
||||||
gboolean gst_avtp_cvf_pay_plugin_init (GstPlugin * plugin);
|
GST_ELEMENT_REGISTER_DECLARE (avtpcvfpay);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,8 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
|
|
||||||
#define gst_avtp_sink_parent_class parent_class
|
#define gst_avtp_sink_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstAvtpSink, gst_avtp_sink, GST_TYPE_BASE_SINK);
|
G_DEFINE_TYPE (GstAvtpSink, gst_avtp_sink, GST_TYPE_BASE_SINK);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (avtpsink, "avtpsink", GST_RANK_NONE,
|
||||||
|
GST_TYPE_AVTP_SINK);
|
||||||
static void gst_avtp_sink_finalize (GObject * gobject);
|
static void gst_avtp_sink_finalize (GObject * gobject);
|
||||||
static void gst_avtp_sink_set_property (GObject * object, guint prop_id,
|
static void gst_avtp_sink_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
|
@ -475,10 +476,3 @@ gst_avtp_sink_get_times (GstBaseSink * bsink, GstBuffer * buffer,
|
||||||
*start = GST_CLOCK_TIME_NONE;
|
*start = GST_CLOCK_TIME_NONE;
|
||||||
*end = GST_CLOCK_TIME_NONE;
|
*end = GST_CLOCK_TIME_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_avtp_sink_plugin_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
return gst_element_register (plugin, "avtpsink", GST_RANK_NONE,
|
|
||||||
GST_TYPE_AVTP_SINK);
|
|
||||||
}
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ struct _GstAvtpSinkClass
|
||||||
|
|
||||||
GType gst_avtp_sink_get_type (void);
|
GType gst_avtp_sink_get_type (void);
|
||||||
|
|
||||||
gboolean gst_avtp_sink_plugin_init (GstPlugin * plugin);
|
GST_ELEMENT_REGISTER_DECLARE (avtpsink);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -75,6 +75,8 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
|
|
||||||
#define gst_avtp_src_parent_class parent_class
|
#define gst_avtp_src_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstAvtpSrc, gst_avtp_src, GST_TYPE_PUSH_SRC);
|
G_DEFINE_TYPE (GstAvtpSrc, gst_avtp_src, GST_TYPE_PUSH_SRC);
|
||||||
|
GST_ELEMENT_REGISTER_DEFINE (avtpsrc, "avtpsrc", GST_RANK_NONE,
|
||||||
|
GST_TYPE_AVTP_SRC);
|
||||||
|
|
||||||
static void gst_avtp_src_finalize (GObject * gobject);
|
static void gst_avtp_src_finalize (GObject * gobject);
|
||||||
static void gst_avtp_src_set_property (GObject * object, guint prop_id,
|
static void gst_avtp_src_set_property (GObject * object, guint prop_id,
|
||||||
|
@ -304,10 +306,3 @@ retry:
|
||||||
|
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_avtp_src_plugin_init (GstPlugin * plugin)
|
|
||||||
{
|
|
||||||
return gst_element_register (plugin, "avtpsrc", GST_RANK_NONE,
|
|
||||||
GST_TYPE_AVTP_SRC);
|
|
||||||
}
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ struct _GstAvtpSrcClass
|
||||||
|
|
||||||
GType gst_avtp_src_get_type (void);
|
GType gst_avtp_src_get_type (void);
|
||||||
|
|
||||||
gboolean gst_avtp_src_plugin_init (GstPlugin * plugin);
|
GST_ELEMENT_REGISTER_DECLARE (avtpsrc);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue