diff --git a/ext/avtp/gstavtp.c b/ext/avtp/gstavtp.c index 3e6073f7ba..2a42d19d1e 100644 --- a/ext/avtp/gstavtp.c +++ b/ext/avtp/gstavtp.c @@ -249,24 +249,18 @@ static gboolean plugin_init (GstPlugin * plugin) { - if (!gst_avtp_aaf_pay_plugin_init (plugin)) - 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; + gboolean ret = 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, diff --git a/ext/avtp/gstavtpaafdepay.c b/ext/avtp/gstavtpaafdepay.c index 0c925ddc77..17f78005eb 100644 --- a/ext/avtp/gstavtpaafdepay.c +++ b/ext/avtp/gstavtpaafdepay.c @@ -56,6 +56,8 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", G_DEFINE_TYPE (GstAvtpAafDepay, gst_avtp_aaf_depay, 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, GstBuffer * buffer); @@ -317,10 +319,3 @@ discard: gst_buffer_unref (buffer); 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); -} diff --git a/ext/avtp/gstavtpaafdepay.h b/ext/avtp/gstavtpaafdepay.h index ef639b70ec..6d92a63e11 100644 --- a/ext/avtp/gstavtpaafdepay.h +++ b/ext/avtp/gstavtpaafdepay.h @@ -58,7 +58,7 @@ struct _GstAvtpAafDepayClass 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 diff --git a/ext/avtp/gstavtpaafpay.c b/ext/avtp/gstavtpaafpay.c index bc92e1c996..7418365f1b 100644 --- a/ext/avtp/gstavtpaafpay.c +++ b/ext/avtp/gstavtpaafpay.c @@ -88,6 +88,8 @@ gst_avtp_aaf_timestamp_mode_get_type (void) #define gst_avtp_aaf_pay_parent_class parent_class 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, const GValue * value, GParamSpec * pspec); @@ -391,10 +393,3 @@ gst_avtp_aaf_pay_sink_event (GstPad * pad, GstObject * parent, GstEvent * 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); -} diff --git a/ext/avtp/gstavtpaafpay.h b/ext/avtp/gstavtpaafpay.h index cdd169d910..0cd8da304f 100644 --- a/ext/avtp/gstavtpaafpay.h +++ b/ext/avtp/gstavtpaafpay.h @@ -67,7 +67,7 @@ struct _GstAvtpAafPayClass 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 diff --git a/ext/avtp/gstavtpcrfcheck.c b/ext/avtp/gstavtpcrfcheck.c index 09f1adbc7c..4df2caa04d 100644 --- a/ext/avtp/gstavtpcrfcheck.c +++ b/ext/avtp/gstavtpcrfcheck.c @@ -58,6 +58,8 @@ enum #define gst_avtp_crf_check_parent_class parent_class 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, const GValue * value, GParamSpec * pspec); @@ -254,10 +256,3 @@ exit: gst_buffer_unmap (buffer, &info); 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); -} diff --git a/ext/avtp/gstavtpcrfcheck.h b/ext/avtp/gstavtpcrfcheck.h index 8a137333cf..f6ddbd94fc 100644 --- a/ext/avtp/gstavtpcrfcheck.h +++ b/ext/avtp/gstavtpcrfcheck.h @@ -52,7 +52,7 @@ struct _GstAvtpCrfCheckClass 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 #endif /* __GST_AVTP_CRF_CHECK_H__ */ diff --git a/ext/avtp/gstavtpcrfsync.c b/ext/avtp/gstavtpcrfsync.c index 4a17977bb3..4b4d083189 100644 --- a/ext/avtp/gstavtpcrfsync.c +++ b/ext/avtp/gstavtpcrfsync.c @@ -54,7 +54,8 @@ GST_DEBUG_CATEGORY_STATIC (avtpcrfsync_debug); #define gst_avtp_crf_sync_parent_class parent_class 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, GstBuffer * buffer); @@ -240,10 +241,3 @@ exit: gst_buffer_unmap (buffer, &info); 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); -} diff --git a/ext/avtp/gstavtpcrfsync.h b/ext/avtp/gstavtpcrfsync.h index 37ee183adb..86359e0d6a 100644 --- a/ext/avtp/gstavtpcrfsync.h +++ b/ext/avtp/gstavtpcrfsync.h @@ -50,7 +50,7 @@ struct _GstAvtpCrfSyncClass 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 #endif /* __GST_AVTP_CRF_SYNC_H__ */ diff --git a/ext/avtp/gstavtpcvfdepay.c b/ext/avtp/gstavtpcvfdepay.c index 738c5d9ab3..43b44c8ec2 100644 --- a/ext/avtp/gstavtpcvfdepay.c +++ b/ext/avtp/gstavtpcvfdepay.c @@ -83,6 +83,8 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", #define gst_avtp_cvf_depay_parent_class parent_class G_DEFINE_TYPE (GstAvtpCvfDepay, gst_avtp_cvf_depay, GST_TYPE_AVTP_BASE_DEPAYLOAD); +GST_ELEMENT_REGISTER_DEFINE (avtpcvfdepay, "avtpcvfdepay", GST_RANK_NONE, + GST_TYPE_AVTP_CVF_DEPAY); static void gst_avtp_cvf_depay_class_init (GstAvtpCvfDepayClass * klass) @@ -727,10 +729,3 @@ end: 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); -} diff --git a/ext/avtp/gstavtpcvfdepay.h b/ext/avtp/gstavtpcvfdepay.h index db1419044c..7394814e3c 100644 --- a/ext/avtp/gstavtpcvfdepay.h +++ b/ext/avtp/gstavtpcvfdepay.h @@ -57,7 +57,7 @@ struct _GstAvtpCvfDepayClass 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 diff --git a/ext/avtp/gstavtpcvfpay.c b/ext/avtp/gstavtpcvfpay.c index 97791f47d4..4a3c3aff38 100644 --- a/ext/avtp/gstavtpcvfpay.c +++ b/ext/avtp/gstavtpcvfpay.c @@ -97,6 +97,8 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", #define gst_avtp_cvf_pay_parent_class parent_class 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 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, event); } - -gboolean -gst_avtp_cvf_pay_plugin_init (GstPlugin * plugin) -{ - return gst_element_register (plugin, "avtpcvfpay", GST_RANK_NONE, - GST_TYPE_AVTP_CVF_PAY); -} diff --git a/ext/avtp/gstavtpcvfpay.h b/ext/avtp/gstavtpcvfpay.h index ecabe34add..db23dd98a2 100644 --- a/ext/avtp/gstavtpcvfpay.h +++ b/ext/avtp/gstavtpcvfpay.h @@ -62,7 +62,7 @@ struct _GstAvtpCvfPayClass 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 diff --git a/ext/avtp/gstavtpsink.c b/ext/avtp/gstavtpsink.c index 00db1264a2..2c3dd998ca 100644 --- a/ext/avtp/gstavtpsink.c +++ b/ext/avtp/gstavtpsink.c @@ -84,7 +84,8 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", #define gst_avtp_sink_parent_class parent_class 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_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); @@ -475,10 +476,3 @@ gst_avtp_sink_get_times (GstBaseSink * bsink, GstBuffer * buffer, *start = 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); -} diff --git a/ext/avtp/gstavtpsink.h b/ext/avtp/gstavtpsink.h index 327d92e576..e2c3f196f7 100644 --- a/ext/avtp/gstavtpsink.h +++ b/ext/avtp/gstavtpsink.h @@ -61,7 +61,7 @@ struct _GstAvtpSinkClass GType gst_avtp_sink_get_type (void); -gboolean gst_avtp_sink_plugin_init (GstPlugin * plugin); +GST_ELEMENT_REGISTER_DECLARE (avtpsink); G_END_DECLS diff --git a/ext/avtp/gstavtpsrc.c b/ext/avtp/gstavtpsrc.c index dfc9f3f29d..ea9b6f1b8d 100644 --- a/ext/avtp/gstavtpsrc.c +++ b/ext/avtp/gstavtpsrc.c @@ -75,6 +75,8 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", #define gst_avtp_src_parent_class parent_class 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_set_property (GObject * object, guint prop_id, @@ -304,10 +306,3 @@ retry: 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); -} diff --git a/ext/avtp/gstavtpsrc.h b/ext/avtp/gstavtpsrc.h index 3bbb5aef21..4bc0c6202c 100644 --- a/ext/avtp/gstavtpsrc.h +++ b/ext/avtp/gstavtpsrc.h @@ -57,7 +57,7 @@ struct _GstAvtpSrcClass GType gst_avtp_src_get_type (void); -gboolean gst_avtp_src_plugin_init (GstPlugin * plugin); +GST_ELEMENT_REGISTER_DECLARE (avtpsrc); G_END_DECLS