rtp: allow per feature registration
authorStéphane Cerveau <scerveau@collabora.com>
Fri, 12 Feb 2021 12:16:28 +0000 (13:16 +0100)
committerStéphane Cerveau <scerveau@collabora.com>
Mon, 29 Mar 2021 10:45:22 +0000 (12:45 +0200)
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-good/-/merge_requests/876>

191 files changed:
gst/rtp/gstasteriskh263.c
gst/rtp/gstasteriskh263.h
gst/rtp/gstrtp.c
gst/rtp/gstrtpL16depay.c
gst/rtp/gstrtpL16depay.h
gst/rtp/gstrtpL16pay.c
gst/rtp/gstrtpL16pay.h
gst/rtp/gstrtpL24depay.c
gst/rtp/gstrtpL24depay.h
gst/rtp/gstrtpL24pay.c
gst/rtp/gstrtpL24pay.h
gst/rtp/gstrtpL8depay.c
gst/rtp/gstrtpL8depay.h
gst/rtp/gstrtpL8pay.c
gst/rtp/gstrtpL8pay.h
gst/rtp/gstrtpac3depay.c
gst/rtp/gstrtpac3depay.h
gst/rtp/gstrtpac3pay.c
gst/rtp/gstrtpac3pay.h
gst/rtp/gstrtpamrdepay.c
gst/rtp/gstrtpamrdepay.h
gst/rtp/gstrtpamrpay.c
gst/rtp/gstrtpamrpay.h
gst/rtp/gstrtpbvdepay.c
gst/rtp/gstrtpbvdepay.h
gst/rtp/gstrtpbvpay.c
gst/rtp/gstrtpbvpay.h
gst/rtp/gstrtpceltdepay.c
gst/rtp/gstrtpceltdepay.h
gst/rtp/gstrtpceltpay.c
gst/rtp/gstrtpceltpay.h
gst/rtp/gstrtpdvdepay.c
gst/rtp/gstrtpdvdepay.h
gst/rtp/gstrtpdvpay.c
gst/rtp/gstrtpdvpay.h
gst/rtp/gstrtpelement.c [new file with mode: 0644]
gst/rtp/gstrtpelements.h [new file with mode: 0644]
gst/rtp/gstrtpg722depay.c
gst/rtp/gstrtpg722depay.h
gst/rtp/gstrtpg722pay.c
gst/rtp/gstrtpg722pay.h
gst/rtp/gstrtpg723depay.c
gst/rtp/gstrtpg723depay.h
gst/rtp/gstrtpg723pay.c
gst/rtp/gstrtpg723pay.h
gst/rtp/gstrtpg726depay.c
gst/rtp/gstrtpg726depay.h
gst/rtp/gstrtpg726pay.c
gst/rtp/gstrtpg726pay.h
gst/rtp/gstrtpg729depay.c
gst/rtp/gstrtpg729depay.h
gst/rtp/gstrtpg729pay.c
gst/rtp/gstrtpg729pay.h
gst/rtp/gstrtpgsmdepay.c
gst/rtp/gstrtpgsmdepay.h
gst/rtp/gstrtpgsmpay.c
gst/rtp/gstrtpgsmpay.h
gst/rtp/gstrtpgstdepay.c
gst/rtp/gstrtpgstdepay.h
gst/rtp/gstrtpgstpay.c
gst/rtp/gstrtpgstpay.h
gst/rtp/gstrtph261depay.c
gst/rtp/gstrtph261depay.h
gst/rtp/gstrtph261pay.c
gst/rtp/gstrtph261pay.h
gst/rtp/gstrtph263depay.c
gst/rtp/gstrtph263depay.h
gst/rtp/gstrtph263pay.c
gst/rtp/gstrtph263pay.h
gst/rtp/gstrtph263pdepay.c
gst/rtp/gstrtph263pdepay.h
gst/rtp/gstrtph263ppay.c
gst/rtp/gstrtph263ppay.h
gst/rtp/gstrtph264depay.c
gst/rtp/gstrtph264depay.h
gst/rtp/gstrtph264pay.c
gst/rtp/gstrtph264pay.h
gst/rtp/gstrtph265depay.c
gst/rtp/gstrtph265depay.h
gst/rtp/gstrtph265pay.c
gst/rtp/gstrtph265pay.h
gst/rtp/gstrtpilbcdepay.c
gst/rtp/gstrtpilbcdepay.h
gst/rtp/gstrtpilbcpay.c
gst/rtp/gstrtpilbcpay.h
gst/rtp/gstrtpisacdepay.c
gst/rtp/gstrtpisacdepay.h
gst/rtp/gstrtpisacpay.c
gst/rtp/gstrtpisacpay.h
gst/rtp/gstrtpj2kdepay.c
gst/rtp/gstrtpj2kdepay.h
gst/rtp/gstrtpj2kpay.c
gst/rtp/gstrtpj2kpay.h
gst/rtp/gstrtpjpegdepay.c
gst/rtp/gstrtpjpegdepay.h
gst/rtp/gstrtpjpegpay.c
gst/rtp/gstrtpjpegpay.h
gst/rtp/gstrtpklvdepay.c
gst/rtp/gstrtpklvdepay.h
gst/rtp/gstrtpklvpay.c
gst/rtp/gstrtpklvpay.h
gst/rtp/gstrtpldacpay.c
gst/rtp/gstrtpmp1sdepay.c
gst/rtp/gstrtpmp1sdepay.h
gst/rtp/gstrtpmp2tdepay.c
gst/rtp/gstrtpmp2tdepay.h
gst/rtp/gstrtpmp2tpay.c
gst/rtp/gstrtpmp2tpay.h
gst/rtp/gstrtpmp4adepay.c
gst/rtp/gstrtpmp4adepay.h
gst/rtp/gstrtpmp4apay.c
gst/rtp/gstrtpmp4apay.h
gst/rtp/gstrtpmp4gdepay.c
gst/rtp/gstrtpmp4gdepay.h
gst/rtp/gstrtpmp4gpay.c
gst/rtp/gstrtpmp4gpay.h
gst/rtp/gstrtpmp4vdepay.c
gst/rtp/gstrtpmp4vdepay.h
gst/rtp/gstrtpmp4vpay.c
gst/rtp/gstrtpmp4vpay.h
gst/rtp/gstrtpmpadepay.c
gst/rtp/gstrtpmpadepay.h
gst/rtp/gstrtpmpapay.c
gst/rtp/gstrtpmpapay.h
gst/rtp/gstrtpmparobustdepay.c
gst/rtp/gstrtpmparobustdepay.h
gst/rtp/gstrtpmpvdepay.c
gst/rtp/gstrtpmpvdepay.h
gst/rtp/gstrtpmpvpay.c
gst/rtp/gstrtpmpvpay.h
gst/rtp/gstrtpopusdepay.c
gst/rtp/gstrtpopusdepay.h
gst/rtp/gstrtpopuspay.c
gst/rtp/gstrtpopuspay.h
gst/rtp/gstrtppcmadepay.c
gst/rtp/gstrtppcmadepay.h
gst/rtp/gstrtppcmapay.c
gst/rtp/gstrtppcmapay.h
gst/rtp/gstrtppcmudepay.c
gst/rtp/gstrtppcmudepay.h
gst/rtp/gstrtppcmupay.c
gst/rtp/gstrtppcmupay.h
gst/rtp/gstrtpqcelpdepay.c
gst/rtp/gstrtpqcelpdepay.h
gst/rtp/gstrtpqdmdepay.c
gst/rtp/gstrtpqdmdepay.h
gst/rtp/gstrtpreddec.c
gst/rtp/gstrtpredenc.c
gst/rtp/gstrtpsbcdepay.c
gst/rtp/gstrtpsbcdepay.h
gst/rtp/gstrtpsbcpay.c
gst/rtp/gstrtpsbcpay.h
gst/rtp/gstrtpsirendepay.c
gst/rtp/gstrtpsirendepay.h
gst/rtp/gstrtpsirenpay.c
gst/rtp/gstrtpsirenpay.h
gst/rtp/gstrtpspeexdepay.c
gst/rtp/gstrtpspeexdepay.h
gst/rtp/gstrtpspeexpay.c
gst/rtp/gstrtpspeexpay.h
gst/rtp/gstrtpstorage.c
gst/rtp/gstrtpstreamdepay.c
gst/rtp/gstrtpstreamdepay.h
gst/rtp/gstrtpstreampay.c
gst/rtp/gstrtpstreampay.h
gst/rtp/gstrtpsv3vdepay.c
gst/rtp/gstrtpsv3vdepay.h
gst/rtp/gstrtptheoradepay.c
gst/rtp/gstrtptheoradepay.h
gst/rtp/gstrtptheorapay.c
gst/rtp/gstrtptheorapay.h
gst/rtp/gstrtpulpfecdec.c
gst/rtp/gstrtpulpfecenc.c
gst/rtp/gstrtpvorbisdepay.c
gst/rtp/gstrtpvorbisdepay.h
gst/rtp/gstrtpvorbispay.c
gst/rtp/gstrtpvorbispay.h
gst/rtp/gstrtpvp8depay.c
gst/rtp/gstrtpvp8depay.h
gst/rtp/gstrtpvp8pay.c
gst/rtp/gstrtpvp8pay.h
gst/rtp/gstrtpvp9depay.c
gst/rtp/gstrtpvp9depay.h
gst/rtp/gstrtpvp9pay.c
gst/rtp/gstrtpvp9pay.h
gst/rtp/gstrtpvrawdepay.c
gst/rtp/gstrtpvrawdepay.h
gst/rtp/gstrtpvrawpay.c
gst/rtp/gstrtpvrawpay.h
gst/rtp/meson.build
tests/check/meson.build

index 8aa7fd4..f22c33f 100644 (file)
@@ -24,6 +24,7 @@
 #include <string.h>
 
 #include <gst/rtp/gstrtpbuffer.h>
+#include "gstrtpelements.h"
 #include "gstasteriskh263.h"
 
 #define GST_ASTERISKH263_HEADER_LEN 6
@@ -64,6 +65,8 @@ static GstStateChangeReturn gst_asteriskh263_change_state (GstElement *
 
 #define gst_asteriskh263_parent_class parent_class
 G_DEFINE_TYPE (GstAsteriskh263, gst_asteriskh263, GST_TYPE_ELEMENT);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (asteriskh263, "asteriskh263",
+    GST_RANK_NONE, GST_TYPE_ASTERISK_H263, rtp_element_init (plugin));
 
 static void
 gst_asteriskh263_class_init (GstAsteriskh263Class * klass)
@@ -221,10 +224,3 @@ gst_asteriskh263_change_state (GstElement * element, GstStateChange transition)
    */
   return ret;
 }
-
-gboolean
-gst_asteriskh263_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "asteriskh263",
-      GST_RANK_NONE, GST_TYPE_ASTERISK_H263);
-}
index 1c9523d..f0416b5 100644 (file)
@@ -58,8 +58,6 @@ struct _GstAsteriskh263Class
 
 GType gst_asteriskh263_get_type (void);
 
-gboolean gst_asteriskh263_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_ASTERISK_H263_H__ */
index 8354901..20f3d85 100644 (file)
 
 #include <gst/tag/tag.h>
 
-#include "gstrtputils.h"
+#include "gstrtpelements.h"
 
-#include "gstrtpac3depay.h"
-#include "gstrtpac3pay.h"
-#include "gstrtpbvdepay.h"
-#include "gstrtpbvpay.h"
-#include "gstrtpceltdepay.h"
-#include "gstrtpceltpay.h"
-#include "gstrtpdvdepay.h"
-#include "gstrtpdvpay.h"
-#include "gstrtpgstdepay.h"
-#include "gstrtpgstpay.h"
-#include "gstrtpilbcdepay.h"
-#include "gstrtpilbcpay.h"
-#include "gstrtppcmupay.h"
-#include "gstrtppcmapay.h"
-#include "gstrtppcmadepay.h"
-#include "gstrtppcmudepay.h"
-#include "gstrtpg722depay.h"
-#include "gstrtpg722pay.h"
-#include "gstrtpg723depay.h"
-#include "gstrtpg723pay.h"
-#include "gstrtpg726depay.h"
-#include "gstrtpg726pay.h"
-#include "gstrtpg729depay.h"
-#include "gstrtpg729pay.h"
-#include "gstrtpgsmpay.h"
-#include "gstrtpgsmdepay.h"
-#include "gstrtpamrpay.h"
-#include "gstrtpamrdepay.h"
-#include "gstrtpmpapay.h"
-#include "gstrtpmpadepay.h"
-#include "gstrtpmparobustdepay.h"
-#include "gstrtpmpvdepay.h"
-#include "gstrtpmpvpay.h"
-#include "gstrtpopusdepay.h"
-#include "gstrtpopuspay.h"
-#include "gstrtph261pay.h"
-#include "gstrtph261depay.h"
-#include "gstrtph263pdepay.h"
-#include "gstrtph263ppay.h"
-#include "gstrtph263depay.h"
-#include "gstrtph263pay.h"
-#include "gstrtph264depay.h"
-#include "gstrtph264pay.h"
-#include "gstrtph265depay.h"
-#include "gstrtph265pay.h"
-#include "gstrtpisacdepay.h"
-#include "gstrtpisacpay.h"
-#include "gstrtpj2kdepay.h"
-#include "gstrtpj2kpay.h"
-#include "gstrtpjpegdepay.h"
-#include "gstrtpjpegpay.h"
-#include "gstrtpklvdepay.h"
-#include "gstrtpklvpay.h"
-#include "gstrtpL8depay.h"
-#include "gstrtpL8pay.h"
-#include "gstrtpL16depay.h"
-#include "gstrtpL16pay.h"
-#include "gstrtpL24depay.h"
-#include "gstrtpL24pay.h"
-#include "gstrtpldacpay.h"
-#include "gstasteriskh263.h"
-#include "gstrtpmp1sdepay.h"
-#include "gstrtpmp2tdepay.h"
-#include "gstrtpmp2tpay.h"
-#include "gstrtpmp4vdepay.h"
-#include "gstrtpmp4vpay.h"
-#include "gstrtpmp4adepay.h"
-#include "gstrtpmp4apay.h"
-#include "gstrtpmp4gdepay.h"
-#include "gstrtpmp4gpay.h"
-#include "gstrtpqcelpdepay.h"
-#include "gstrtpqdmdepay.h"
-#include "gstrtpsbcdepay.h"
-#include "gstrtpsbcpay.h"
-#include "gstrtpsirenpay.h"
-#include "gstrtpsirendepay.h"
-#include "gstrtpspeexpay.h"
-#include "gstrtpspeexdepay.h"
-#include "gstrtpsv3vdepay.h"
-#include "gstrtptheoradepay.h"
-#include "gstrtptheorapay.h"
-#include "gstrtpvorbisdepay.h"
-#include "gstrtpvorbispay.h"
-#include "gstrtpvp8depay.h"
-#include "gstrtpvp8pay.h"
-#include "gstrtpvp9depay.h"
-#include "gstrtpvp9pay.h"
-#include "gstrtpvrawdepay.h"
-#include "gstrtpvrawpay.h"
-#include "gstrtpstreampay.h"
-#include "gstrtpstreamdepay.h"
-#include "gstrtpredenc.h"
-#include "gstrtpreddec.h"
-#include "gstrtpulpfecdec.h"
-#include "gstrtpulpfecenc.h"
-#include "gstrtpstorage.h"
 
 static gboolean
 plugin_init (GstPlugin * plugin)
 {
-  gst_tag_image_type_get_type ();
-
-  rtp_quark_meta_tag_video =
-      g_quark_from_static_string (GST_META_TAG_VIDEO_STR);
-  rtp_quark_meta_tag_audio =
-      g_quark_from_static_string (GST_META_TAG_AUDIO_STR);
-
-  if (!gst_rtp_ac3_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_ac3_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_bv_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_bv_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_celt_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_celt_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_dv_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_dv_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_gst_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_gst_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_ilbc_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_ilbc_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_g722_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_g722_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_g723_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_g723_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_g726_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_g726_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_g729_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_g729_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_gsm_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_gsm_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_amr_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_amr_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_pcma_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_pcmu_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_pcmu_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_pcma_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_mpa_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_mpa_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_mpa_robust_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_mpv_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_mpv_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_opus_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_opus_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_h261_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_h261_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_h263p_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_h263p_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_h263_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_h263_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_h264_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_h264_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_h265_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_h265_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_j2k_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_j2k_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_jpeg_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_jpeg_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_klv_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_klv_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_L8_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_L8_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_L16_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_L16_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_L24_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_L24_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_ldac_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_asteriskh263_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_mp1s_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_mp2t_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_mp2t_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_mp4v_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_mp4v_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_mp4a_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_mp4a_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_mp4g_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_mp4g_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_qcelp_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_qdm2_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_sbc_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_sbc_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_siren_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_siren_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_speex_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_speex_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_sv3v_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_theora_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_theora_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_vorbis_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_vorbis_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_vp8_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_vp8_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_vp9_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_vp9_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_vraw_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_vraw_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_stream_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_stream_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_isac_pay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_rtp_isac_depay_plugin_init (plugin))
-    return FALSE;
-
-  if (!gst_element_register (plugin, "rtpredenc", GST_RANK_NONE,
-          GST_TYPE_RTP_RED_ENC))
-    return FALSE;
-
-  if (!gst_element_register (plugin, "rtpreddec", GST_RANK_NONE,
-          GST_TYPE_RTP_RED_DEC))
-    return FALSE;
-
-  if (!gst_element_register (plugin, "rtpulpfecdec", GST_RANK_NONE,
-          GST_TYPE_RTP_ULPFEC_DEC))
-    return FALSE;
-
-  if (!gst_element_register (plugin, "rtpulpfecenc", GST_RANK_NONE,
-          GST_TYPE_RTP_ULPFEC_ENC))
-    return FALSE;
-
-  if (!gst_element_register (plugin, "rtpstorage", GST_RANK_NONE,
-          GST_TYPE_RTP_STORAGE))
-    return FALSE;
-
-  return TRUE;
+  gboolean ret = FALSE;
+
+  ret |= GST_ELEMENT_REGISTER (rtpac3depay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpac3pay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpbvdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpbvpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpceltdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpceltpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpdvdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpdvpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpgstdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpgstpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpilbcpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpilbcdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpg722depay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpg722pay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpg723depay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpg723pay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpg726depay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpg726pay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpg729depay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpg729pay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpgsmdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpgsmpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpamrdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpamrpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtppcmadepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtppcmudepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtppcmupay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtppcmapay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpmpadepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpmpapay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpmparobustdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpmpvdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpmpvpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpopusdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpopuspay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtph261pay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtph261depay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtph263ppay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtph263pdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtph263depay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtph263pay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtph264depay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtph264pay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtph265depay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtph265pay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpj2kdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpj2kpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpjpegdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpjpegpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpklvdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpklvpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpL8pay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpL8depay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpL16pay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpL16depay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpL24pay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpL24depay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpldacpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (asteriskh263, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpmp1sdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpmp2tdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpmp2tpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpmp4vpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpmp4vdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpmp4apay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpmp4adepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpmp4gdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpmp4gpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpqcelpdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpqdm2depay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpsbcdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpsbcpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpsirenpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpsirendepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpspeexpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpspeexdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpsv3vdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtptheoradepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtptheorapay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpvorbisdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpvorbispay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpvp8depay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpvp8pay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpvp9depay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpvp9pay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpvrawdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpvrawpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpstreampay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpstreamdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpisacpay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpisacdepay, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpredenc, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpreddec, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpulpfecdec, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpulpfecenc, plugin);
+  ret |= GST_ELEMENT_REGISTER (rtpstorage, plugin);
+
+  return ret;
 }
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
index f054a24..aa7e5d0 100644 (file)
@@ -42,6 +42,7 @@
 
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpL16depay.h"
 #include "gstrtpchannels.h"
 #include "gstrtputils.h"
@@ -81,6 +82,8 @@ static GstStaticPadTemplate gst_rtp_L16_depay_sink_template =
 
 #define gst_rtp_L16_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpL16Depay, gst_rtp_L16_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpL16depay, "rtpL16depay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_L16_DEPAY, rtp_element_init (plugin));
 
 static gboolean gst_rtp_L16_depay_setcaps (GstRTPBaseDepayload * depayload,
     GstCaps * caps);
@@ -291,10 +294,3 @@ reorder_failed:
     return NULL;
   }
 }
-
-gboolean
-gst_rtp_L16_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpL16depay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_L16_DEPAY);
-}
index 125d4cd..fac933b 100644 (file)
@@ -60,8 +60,6 @@ struct _GstRtpL16DepayClass
 
 GType gst_rtp_L16_depay_get_type (void);
 
-gboolean gst_rtp_L16_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_L16_DEPAY_H__ */
index 7e358d3..41a7c05 100644 (file)
@@ -42,6 +42,7 @@
 #include <gst/audio/audio.h>
 #include <gst/rtp/gstrtpbuffer.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpL16pay.h"
 #include "gstrtpchannels.h"
 
@@ -90,6 +91,8 @@ gst_rtp_L16_pay_handle_buffer (GstRTPBasePayload * basepayload,
 
 #define gst_rtp_L16_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpL16Pay, gst_rtp_L16_pay, GST_TYPE_RTP_BASE_AUDIO_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpL16pay, "rtpL16pay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_L16_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_L16_pay_class_init (GstRtpL16PayClass * klass)
@@ -254,10 +257,3 @@ gst_rtp_L16_pay_handle_buffer (GstRTPBasePayload * basepayload,
   return GST_RTP_BASE_PAYLOAD_CLASS (parent_class)->handle_buffer (basepayload,
       buffer);
 }
-
-gboolean
-gst_rtp_L16_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpL16pay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_L16_PAY);
-}
index f4f3702..b3078db 100644 (file)
@@ -56,8 +56,6 @@ struct _GstRtpL16PayClass
 
 GType gst_rtp_L16_pay_get_type (void);
 
-gboolean gst_rtp_L16_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_L16_PAY_H__ */
index 448dac0..e39fe7c 100644 (file)
@@ -42,6 +42,7 @@
 
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpL24depay.h"
 #include "gstrtpchannels.h"
 #include "gstrtputils.h"
@@ -70,6 +71,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
 
 #define gst_rtp_L24_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpL24Depay, gst_rtp_L24_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpL24depay, "rtpL24depay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_L24_DEPAY, rtp_element_init (plugin));
 
 static gboolean gst_rtp_L24_depay_setcaps (GstRTPBaseDepayload * depayload,
     GstCaps * caps);
@@ -256,10 +259,3 @@ reorder_failed:
     return NULL;
   }
 }
-
-gboolean
-gst_rtp_L24_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpL24depay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_L24_DEPAY);
-}
index c4e00e6..411adf9 100644 (file)
@@ -60,8 +60,6 @@ struct _GstRtpL24DepayClass
 
 GType gst_rtp_L24_depay_get_type (void);
 
-gboolean gst_rtp_L24_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_L24_DEPAY_H__ */
index d2ad725..aa8fc22 100644 (file)
@@ -42,6 +42,7 @@
 #include <gst/audio/audio.h>
 #include <gst/rtp/gstrtpbuffer.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpL24pay.h"
 #include "gstrtpchannels.h"
 
@@ -79,6 +80,8 @@ gst_rtp_L24_pay_handle_buffer (GstRTPBasePayload * basepayload,
 
 #define gst_rtp_L24_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpL24Pay, gst_rtp_L24_pay, GST_TYPE_RTP_BASE_AUDIO_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpL24pay, "rtpL24pay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_L24_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_L24_pay_class_init (GstRtpL24PayClass * klass)
@@ -235,10 +238,3 @@ gst_rtp_L24_pay_handle_buffer (GstRTPBasePayload * basepayload,
   return GST_RTP_BASE_PAYLOAD_CLASS (parent_class)->handle_buffer (basepayload,
       buffer);
 }
-
-gboolean
-gst_rtp_L24_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpL24pay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_L24_PAY);
-}
index 47395ad..4dd64db 100644 (file)
@@ -56,8 +56,6 @@ struct _GstRtpL24PayClass
 
 GType gst_rtp_L24_pay_get_type (void);
 
-gboolean gst_rtp_L24_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_L24_PAY_H__ */
index 121a749..f1c0fe3 100644 (file)
@@ -42,6 +42,7 @@
 
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpL8depay.h"
 #include "gstrtpchannels.h"
 
@@ -73,6 +74,10 @@ static GstStaticPadTemplate gst_rtp_L8_depay_sink_template =
 #define gst_rtp_L8_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpL8Depay, gst_rtp_L8_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
 
+
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpL8depay, "rtpL8depay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_L8_DEPAY, rtp_element_init (plugin));
+
 static gboolean gst_rtp_L8_depay_setcaps (GstRTPBaseDepayload * depayload,
     GstCaps * caps);
 static GstBuffer *gst_rtp_L8_depay_process (GstRTPBaseDepayload * depayload,
@@ -258,10 +263,3 @@ reorder_failed:
     return NULL;
   }
 }
-
-gboolean
-gst_rtp_L8_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpL8depay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_L8_DEPAY);
-}
index a2d9bec..589e9fb 100644 (file)
@@ -58,8 +58,6 @@ struct _GstRtpL8DepayClass
 
 GType gst_rtp_L8_depay_get_type (void);
 
-gboolean gst_rtp_L8_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_L8_DEPAY_H__ */
index 6662cda..b7a39e8 100644 (file)
@@ -42,6 +42,7 @@
 #include <gst/audio/audio.h>
 #include <gst/rtp/gstrtpbuffer.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpL8pay.h"
 #include "gstrtpchannels.h"
 
@@ -80,6 +81,10 @@ gst_rtp_L8_pay_handle_buffer (GstRTPBasePayload * basepayload,
 #define gst_rtp_L8_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpL8Pay, gst_rtp_L8_pay, GST_TYPE_RTP_BASE_AUDIO_PAYLOAD);
 
+
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpL8pay, "rtpL8pay", GST_RANK_SECONDARY,
+    GST_TYPE_RTP_L8_PAY, rtp_element_init (plugin));
+
 static void
 gst_rtp_L8_pay_class_init (GstRtpL8PayClass * klass)
 {
@@ -234,10 +239,3 @@ gst_rtp_L8_pay_handle_buffer (GstRTPBasePayload * basepayload,
   return GST_RTP_BASE_PAYLOAD_CLASS (parent_class)->handle_buffer (basepayload,
       buffer);
 }
-
-gboolean
-gst_rtp_L8_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpL8pay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_L8_PAY);
-}
index 183eb2f..bebd724 100644 (file)
@@ -57,8 +57,6 @@ struct _GstRtpL8PayClass
 
 GType gst_rtp_L8_pay_get_type (void);
 
-gboolean gst_rtp_L8_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_L8_PAY_H__ */
index 54339f3..68c23e2 100644 (file)
@@ -41,6 +41,7 @@
 #include <gst/audio/audio.h>
 
 #include <string.h>
+#include "gstrtpelements.h"
 #include "gstrtpac3depay.h"
 #include "gstrtputils.h"
 
@@ -65,6 +66,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
     );
 
 G_DEFINE_TYPE (GstRtpAC3Depay, gst_rtp_ac3_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpac3depay, "rtpac3depay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_AC3_DEPAY, rtp_element_init (plugin));
 
 static gboolean gst_rtp_ac3_depay_setcaps (GstRTPBaseDepayload * depayload,
     GstCaps * caps);
@@ -171,10 +174,3 @@ empty_packet:
     return NULL;
   }
 }
-
-gboolean
-gst_rtp_ac3_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpac3depay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_AC3_DEPAY);
-}
index 294bb12..62478f9 100644 (file)
@@ -51,8 +51,6 @@ struct _GstRtpAC3DepayClass
 
 GType gst_rtp_ac3_depay_get_type (void);
 
-gboolean gst_rtp_ac3_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_AC3_DEPAY_H__ */
index 1fecced..efce5b5 100644 (file)
@@ -42,6 +42,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpac3pay.h"
 #include "gstrtputils.h"
 
@@ -81,6 +82,8 @@ static GstFlowReturn gst_rtp_ac3_pay_handle_buffer (GstRTPBasePayload * payload,
 
 #define gst_rtp_ac3_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpAC3Pay, gst_rtp_ac3_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpac3pay, "rtpac3pay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_AC3_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_ac3_pay_class_init (GstRtpAC3PayClass * klass)
@@ -470,10 +473,3 @@ gst_rtp_ac3_pay_change_state (GstElement * element, GstStateChange transition)
   }
   return ret;
 }
-
-gboolean
-gst_rtp_ac3_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpac3pay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_AC3_PAY);
-}
index c131eac..918a250 100644 (file)
@@ -57,8 +57,6 @@ struct _GstRtpAC3PayClass
 
 GType gst_rtp_ac3_pay_get_type (void);
 
-gboolean gst_rtp_ac3_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_AC3_PAY_H__ */
index de02758..08e64e5 100644 (file)
@@ -48,6 +48,7 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include "gstrtpelements.h"
 #include "gstrtpamrdepay.h"
 #include "gstrtputils.h"
 
@@ -130,6 +131,8 @@ static GstBuffer *gst_rtp_amr_depay_process (GstRTPBaseDepayload * depayload,
 
 #define gst_rtp_amr_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpAMRDepay, gst_rtp_amr_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpamrdepay, "rtpamrdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_AMR_DEPAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_amr_depay_class_init (GstRtpAMRDepayClass * klass)
@@ -469,10 +472,3 @@ bad_packet:
     return NULL;
   }
 }
-
-gboolean
-gst_rtp_amr_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpamrdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_AMR_DEPAY);
-}
index 0b80634..b1ebe4f 100644 (file)
@@ -70,8 +70,6 @@ struct _GstRtpAMRDepayClass
 
 GType gst_rtp_amr_depay_get_type (void);
 
-gboolean gst_rtp_amr_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_AMR_DEPAY_H__ */
index 828a718..bf92a54 100644 (file)
@@ -55,6 +55,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpamrpay.h"
 #include "gstrtputils.h"
 
@@ -113,6 +114,8 @@ gst_rtp_amr_pay_change_state (GstElement * element, GstStateChange transition);
 
 #define gst_rtp_amr_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpAMRPay, gst_rtp_amr_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpamrpay, "rtpamrpay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_AMR_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_amr_pay_class_init (GstRtpAMRPayClass * klass)
@@ -456,10 +459,3 @@ gst_rtp_amr_pay_change_state (GstElement * element, GstStateChange transition)
 
   return ret;
 }
-
-gboolean
-gst_rtp_amr_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpamrpay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_AMR_PAY);
-}
index a3df1ce..b6e2148 100644 (file)
@@ -63,8 +63,6 @@ struct _GstRtpAMRPayClass
 
 GType gst_rtp_amr_pay_get_type (void);
 
-gboolean gst_rtp_amr_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_AMR_PAY_H__ */
index 625bb37..98cff92 100644 (file)
@@ -35,6 +35,7 @@
 
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
+#include "gstrtpelements.h"
 #include "gstrtpbvdepay.h"
 #include "gstrtputils.h"
 
@@ -65,6 +66,8 @@ static gboolean gst_rtp_bv_depay_setcaps (GstRTPBaseDepayload * depayload,
 
 #define gst_rtp_bv_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRTPBVDepay, gst_rtp_bv_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpbvdepay, "rtpbvdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_BV_DEPAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_bv_depay_class_init (GstRTPBVDepayClass * klass)
@@ -182,10 +185,3 @@ gst_rtp_bv_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp)
 
   return outbuf;
 }
-
-gboolean
-gst_rtp_bv_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpbvdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_BV_DEPAY);
-}
index f130682..9a9ea7c 100644 (file)
@@ -53,8 +53,6 @@ struct _GstRTPBVDepayClass
 
 GType gst_rtp_bv_depay_get_type (void);
 
-gboolean gst_rtp_bv_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_BV_DEPAY_H__ */
index a396d26..a70f3c2 100644 (file)
@@ -34,6 +34,7 @@
 #include <string.h>
 
 #include <gst/rtp/gstrtpbuffer.h>
+#include "gstrtpelements.h"
 #include "gstrtpbvpay.h"
 
 GST_DEBUG_CATEGORY_STATIC (rtpbvpay_debug);
@@ -69,6 +70,8 @@ static gboolean gst_rtp_bv_pay_sink_setcaps (GstRTPBasePayload * payload,
 
 #define gst_rtp_bv_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRTPBVPay, gst_rtp_bv_pay, GST_TYPE_RTP_BASE_AUDIO_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpbvpay, "rtpbvpay", GST_RANK_SECONDARY,
+    GST_TYPE_RTP_BV_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_bv_pay_class_init (GstRTPBVPayClass * klass)
@@ -231,10 +234,3 @@ gst_rtp_bv_pay_sink_getcaps (GstRTPBasePayload * rtppayload, GstPad * pad,
 
   return caps;
 }
-
-gboolean
-gst_rtp_bv_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpbvpay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_BV_PAY);
-}
index 09766cc..afb3485 100644 (file)
@@ -53,8 +53,6 @@ struct _GstRTPBVPayClass
 
 GType gst_rtp_bv_pay_get_type (void);
 
-gboolean gst_rtp_bv_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_BV_PAY_H__ */
index 97c17f0..9054af7 100644 (file)
@@ -26,6 +26,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpceltdepay.h"
 #include "gstrtputils.h"
 
@@ -74,7 +75,8 @@ static gboolean gst_rtp_celt_depay_setcaps (GstRTPBaseDepayload * depayload,
 #define gst_rtp_celt_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpCELTDepay, gst_rtp_celt_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
-
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpceltdepay, "rtpceltdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_CELT_DEPAY, rtp_element_init (plugin));
 static void
 gst_rtp_celt_depay_class_init (GstRtpCELTDepayClass * klass)
 {
@@ -267,10 +269,3 @@ gst_rtp_celt_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp)
 
   return NULL;
 }
-
-gboolean
-gst_rtp_celt_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpceltdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_CELT_DEPAY);
-}
index 0905c68..eb4bc30 100644 (file)
@@ -47,8 +47,6 @@ struct _GstRtpCELTDepayClass
 
 GType gst_rtp_celt_depay_get_type (void);
 
-gboolean gst_rtp_celt_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_CELT_DEPAY_H__ */
index a29d23b..18ef556 100644 (file)
@@ -26,6 +26,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpceltpay.h"
 #include "gstrtputils.h"
 
@@ -66,6 +67,8 @@ static GstFlowReturn gst_rtp_celt_pay_handle_buffer (GstRTPBasePayload *
 
 #define gst_rtp_celt_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpCELTPay, gst_rtp_celt_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpceltpay, "rtpceltpay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_CELT_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_celt_pay_class_init (GstRtpCELTPayClass * klass)
@@ -495,10 +498,3 @@ gst_rtp_celt_pay_change_state (GstElement * element, GstStateChange transition)
   }
   return ret;
 }
-
-gboolean
-gst_rtp_celt_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpceltpay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_CELT_PAY);
-}
index dcdd0ec..452c124 100644 (file)
@@ -55,8 +55,6 @@ struct _GstRtpCELTPayClass
 
 GType gst_rtp_celt_pay_get_type (void);
 
-gboolean gst_rtp_celt_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_CELT_PAY_H__ */
index 12297f0..6558ddd 100644 (file)
@@ -33,6 +33,8 @@
 #include <gst/gst.h>
 
 #include "gstrtpdvdepay.h"
+
+#include "gstrtpelements.h"
 #include "gstrtputils.h"
 
 GST_DEBUG_CATEGORY (rtpdvdepay_debug);
@@ -82,7 +84,8 @@ static gboolean gst_rtp_dv_depay_setcaps (GstRTPBaseDepayload * depayload,
 
 #define gst_rtp_dv_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRTPDVDepay, gst_rtp_dv_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
-
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpdvdepay, "rtpdvdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_DV_DEPAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_dv_depay_class_init (GstRTPDVDepayClass * klass)
@@ -416,10 +419,3 @@ gst_rtp_dv_depay_change_state (GstElement * element, GstStateChange transition)
   }
   return ret;
 }
-
-gboolean
-gst_rtp_dv_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpdvdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_DV_DEPAY);
-}
index 1ce5b97..3cd9214 100644 (file)
@@ -59,8 +59,6 @@ struct _GstRTPDVDepayClass
 
 GType gst_rtp_dv_depay_get_type (void);
 
-gboolean gst_rtp_dv_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GSTRTPDVDEPAY_H__ */
index 3600251..2a0e92e 100644 (file)
@@ -26,6 +26,7 @@
 #include <string.h>
 #include <gst/rtp/gstrtpbuffer.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpdvpay.h"
 #include "gstrtputils.h"
 
@@ -97,6 +98,8 @@ static void gst_dv_pay_get_property (GObject * object,
 
 #define gst_rtp_dv_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRTPDVPay, gst_rtp_dv_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpdvpay, "rtpdvpay", GST_RANK_SECONDARY,
+    GST_TYPE_RTP_DV_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_dv_pay_class_init (GstRTPDVPayClass * klass)
@@ -392,10 +395,3 @@ beach:
 
   return ret;
 }
-
-gboolean
-gst_rtp_dv_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpdvpay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_DV_PAY);
-}
index 4c250a8..def525b 100644 (file)
@@ -62,8 +62,6 @@ struct _GstRTPDVPayClass
 
 GType gst_rtp_dv_pay_get_type (void);
 
-gboolean gst_rtp_dv_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GSTRTPDVPAY_H__ */
diff --git a/gst/rtp/gstrtpelement.c b/gst/rtp/gstrtpelement.c
new file mode 100644 (file)
index 0000000..cd6d883
--- /dev/null
@@ -0,0 +1,46 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) 2020 Huawei Technologies Co., Ltd.
+ *   @Author: Julian Bouzas <julian.bouzas@collabora.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/tag/tag.h>
+#include <gst/video/video.h>
+#include <gst/audio/audio.h>
+
+#include "gstrtpelements.h"
+#include "gstrtputils.h"
+
+
+void
+rtp_element_init (GstPlugin * plugin)
+{
+  static gsize res = FALSE;
+  if (g_once_init_enter (&res)) {
+    gst_tag_image_type_get_type ();
+    rtp_quark_meta_tag_video =
+        g_quark_from_static_string (GST_META_TAG_VIDEO_STR);
+    rtp_quark_meta_tag_audio =
+        g_quark_from_static_string (GST_META_TAG_AUDIO_STR);
+    g_once_init_leave (&res, TRUE);
+  }
+}
diff --git a/gst/rtp/gstrtpelements.h b/gst/rtp/gstrtpelements.h
new file mode 100644 (file)
index 0000000..5f71f16
--- /dev/null
@@ -0,0 +1,133 @@
+/* GStreamer
+ * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
+ * Copyright (C) 2020 Huawei Technologies Co., Ltd.
+ *   @Author: Julian Bouzas <julian.bouzas@collabora.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __GST_RTP_ELEMENTS_H__
+#define __GST_RTP_ELEMENTS_H__
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gst/gst.h>
+
+G_BEGIN_DECLS
+
+void rtp_element_init (GstPlugin * plugin);
+
+GST_ELEMENT_REGISTER_DECLARE (rtpac3depay);
+GST_ELEMENT_REGISTER_DECLARE (rtpac3pay);
+GST_ELEMENT_REGISTER_DECLARE (rtpbvdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpbvpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpceltdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpceltpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpdvdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpdvpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpgstdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpgstpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpilbcpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpilbcdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpg722depay);
+GST_ELEMENT_REGISTER_DECLARE (rtpg722pay);
+GST_ELEMENT_REGISTER_DECLARE (rtpg723depay);
+GST_ELEMENT_REGISTER_DECLARE (rtpg723pay);
+GST_ELEMENT_REGISTER_DECLARE (rtpg726depay);
+GST_ELEMENT_REGISTER_DECLARE (rtpg726pay);
+GST_ELEMENT_REGISTER_DECLARE (rtpg729depay);
+GST_ELEMENT_REGISTER_DECLARE (rtpg729pay);
+GST_ELEMENT_REGISTER_DECLARE (rtpgsmdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpgsmpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpamrdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpamrpay);
+GST_ELEMENT_REGISTER_DECLARE (rtppcmadepay);
+GST_ELEMENT_REGISTER_DECLARE (rtppcmudepay);
+GST_ELEMENT_REGISTER_DECLARE (rtppcmupay);
+GST_ELEMENT_REGISTER_DECLARE (rtppcmapay);
+GST_ELEMENT_REGISTER_DECLARE (rtpmpadepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpmpapay);
+GST_ELEMENT_REGISTER_DECLARE (rtpmparobustdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpmpvdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpmpvpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpopusdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpopuspay);
+GST_ELEMENT_REGISTER_DECLARE (rtph261pay);
+GST_ELEMENT_REGISTER_DECLARE (rtph261depay);
+GST_ELEMENT_REGISTER_DECLARE (rtph263ppay);
+GST_ELEMENT_REGISTER_DECLARE (rtph263pdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtph263depay);
+GST_ELEMENT_REGISTER_DECLARE (rtph263pay);
+GST_ELEMENT_REGISTER_DECLARE (rtph264depay);
+GST_ELEMENT_REGISTER_DECLARE (rtph264pay);
+GST_ELEMENT_REGISTER_DECLARE (rtph265depay);
+GST_ELEMENT_REGISTER_DECLARE (rtph265pay);
+GST_ELEMENT_REGISTER_DECLARE (rtpj2kdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpj2kpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpjpegdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpjpegpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpklvdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpklvpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpL8pay);
+GST_ELEMENT_REGISTER_DECLARE (rtpL8depay);
+GST_ELEMENT_REGISTER_DECLARE (rtpL16pay);
+GST_ELEMENT_REGISTER_DECLARE (rtpL16depay);
+GST_ELEMENT_REGISTER_DECLARE (rtpL24pay);
+GST_ELEMENT_REGISTER_DECLARE (rtpL24depay);
+GST_ELEMENT_REGISTER_DECLARE (rtpldacpay);
+GST_ELEMENT_REGISTER_DECLARE (asteriskh263);
+GST_ELEMENT_REGISTER_DECLARE (rtpmp1sdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpmp2tdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpmp2tpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpmp4vpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpmp4vdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpmp4apay);
+GST_ELEMENT_REGISTER_DECLARE (rtpmp4adepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpmp4gdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpmp4gpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpqcelpdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpqdm2depay);
+GST_ELEMENT_REGISTER_DECLARE (rtpsbcdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpsbcpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpsirenpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpsirendepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpspeexpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpspeexdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpsv3vdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtptheoradepay);
+GST_ELEMENT_REGISTER_DECLARE (rtptheorapay);
+GST_ELEMENT_REGISTER_DECLARE (rtpvorbisdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpvorbispay);
+GST_ELEMENT_REGISTER_DECLARE (rtpvp8depay);
+GST_ELEMENT_REGISTER_DECLARE (rtpvp8pay);
+GST_ELEMENT_REGISTER_DECLARE (rtpvp9depay);
+GST_ELEMENT_REGISTER_DECLARE (rtpvp9pay);
+GST_ELEMENT_REGISTER_DECLARE (rtpvrawdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpvrawpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpstreampay);
+GST_ELEMENT_REGISTER_DECLARE (rtpstreamdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpisacpay);
+GST_ELEMENT_REGISTER_DECLARE (rtpisacdepay);
+GST_ELEMENT_REGISTER_DECLARE (rtpredenc);
+GST_ELEMENT_REGISTER_DECLARE (rtpreddec);
+GST_ELEMENT_REGISTER_DECLARE (rtpulpfecdec);
+GST_ELEMENT_REGISTER_DECLARE (rtpulpfecenc);
+GST_ELEMENT_REGISTER_DECLARE (rtpstorage);
+
+G_END_DECLS
+
+#endif /* __GST_RTP_ELEMENTS_H__ */
index 5a25eef..060c7e1 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpg722depay.h"
 #include "gstrtpchannels.h"
 #include "gstrtputils.h"
@@ -63,6 +64,8 @@ static GstStaticPadTemplate gst_rtp_g722_depay_sink_template =
 #define gst_rtp_g722_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpG722Depay, gst_rtp_g722_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpg722depay, "rtpg722depay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_G722_DEPAY, rtp_element_init (plugin));
 
 static gboolean gst_rtp_g722_depay_setcaps (GstRTPBaseDepayload * depayload,
     GstCaps * caps);
@@ -253,10 +256,3 @@ empty_packet:
     return NULL;
   }
 }
-
-gboolean
-gst_rtp_g722_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpg722depay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_G722_DEPAY);
-}
index 8b6ffa0..2acdf28 100644 (file)
@@ -57,8 +57,6 @@ struct _GstRtpG722DepayClass
 
 GType gst_rtp_g722_depay_get_type (void);
 
-gboolean gst_rtp_g722_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_G722_DEPAY_H__ */
index a383e01..8afc2eb 100644 (file)
@@ -26,6 +26,7 @@
 #include <gst/audio/audio.h>
 #include <gst/rtp/gstrtpbuffer.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpg722pay.h"
 #include "gstrtpchannels.h"
 
@@ -64,6 +65,8 @@ static GstCaps *gst_rtp_g722_pay_getcaps (GstRTPBasePayload * rtppayload,
 #define gst_rtp_g722_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpG722Pay, gst_rtp_g722_pay,
     GST_TYPE_RTP_BASE_AUDIO_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpg722pay, "rtpg722pay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_G722_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_g722_pay_class_init (GstRtpG722PayClass * klass)
@@ -227,10 +230,3 @@ gst_rtp_g722_pay_getcaps (GstRTPBasePayload * rtppayload, GstPad * pad,
 
   return caps;
 }
-
-gboolean
-gst_rtp_g722_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpg722pay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_G722_PAY);
-}
index f238286..1211ca0 100644 (file)
@@ -54,8 +54,6 @@ struct _GstRtpG722PayClass
 
 GType gst_rtp_g722_pay_get_type (void);
 
-gboolean gst_rtp_g722_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_G722_PAY_H__ */
index 901d9ae..e4f416e 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include "gstrtpelements.h"
 #include "gstrtpg723depay.h"
 
 GST_DEBUG_CATEGORY_STATIC (rtpg723depay_debug);
@@ -80,6 +81,8 @@ static GstBuffer *gst_rtp_g723_depay_process (GstRTPBaseDepayload * depayload,
 #define gst_rtp_g723_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpG723Depay, gst_rtp_g723_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpg723depay, "rtpg723depay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_G723_DEPAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_g723_depay_class_init (GstRtpG723DepayClass * klass)
@@ -214,10 +217,3 @@ bad_packet:
     return NULL;
   }
 }
-
-gboolean
-gst_rtp_g723_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpg723depay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_G723_DEPAY);
-}
index dd942b3..673a137 100644 (file)
@@ -52,8 +52,6 @@ struct _GstRtpG723DepayClass
 
 GType gst_rtp_g723_depay_get_type (void);
 
-gboolean gst_rtp_g723_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_G723_DEPAY_H__ */
index 18e294a..ebe7343 100644 (file)
@@ -28,6 +28,7 @@
 #include <gst/base/gstadapter.h>
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpg723pay.h"
 #include "gstrtputils.h"
 
@@ -68,6 +69,8 @@ static GstStateChangeReturn gst_rtp_g723_pay_change_state (GstElement * element,
 
 #define gst_rtp_g723_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRTPG723Pay, gst_rtp_g723_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpg723pay, "rtpg723pay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_G723_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_g723_pay_class_init (GstRTPG723PayClass * klass)
@@ -298,11 +301,3 @@ gst_rtp_g723_pay_change_state (GstElement * element, GstStateChange transition)
 
   return ret;
 }
-
-/*Plugin init functions*/
-gboolean
-gst_rtp_g723_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpg723pay", GST_RANK_SECONDARY,
-      gst_rtp_g723_pay_get_type ());
-}
index 3780741..03bff50 100644 (file)
@@ -57,8 +57,6 @@ struct _GstRTPG723PayClass
 
 GType gst_rtp_g723_pay_get_type (void);
 
-gboolean gst_rtp_g723_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_G723_PAY_H__ */
index 7af1928..a3c5de3 100644 (file)
@@ -30,6 +30,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpg726depay.h"
 #include "gstrtputils.h"
 
@@ -91,6 +92,8 @@ static gboolean gst_rtp_g726_depay_setcaps (GstRTPBaseDepayload * depayload,
 #define gst_rtp_g726_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpG726Depay, gst_rtp_g726_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpg726depay, "rtpg726depay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_G726_DEPAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_g726_depay_class_init (GstRtpG726DepayClass * klass)
@@ -384,10 +387,3 @@ gst_rtp_g726_depay_get_property (GObject * object, guint prop_id,
       break;
   }
 }
-
-gboolean
-gst_rtp_g726_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpg726depay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_G726_DEPAY);
-}
index 45fd2ed..04ceec2 100644 (file)
@@ -52,7 +52,5 @@ struct _GstRtpG726DepayClass
 
 GType gst_rtp_g726_depay_get_type (void);
 
-gboolean gst_rtp_g726_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 #endif /* __GST_RTP_G726_DEPAY_H__ */
index d251b49..76dad40 100644 (file)
@@ -28,6 +28,7 @@
 #include <string.h>
 #include <gst/rtp/gstrtpbuffer.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpg726pay.h"
 
 GST_DEBUG_CATEGORY_STATIC (rtpg726pay_debug);
@@ -77,6 +78,8 @@ static GstFlowReturn gst_rtp_g726_pay_handle_buffer (GstRTPBasePayload *
 #define gst_rtp_g726_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpG726Pay, gst_rtp_g726_pay,
     GST_TYPE_RTP_BASE_AUDIO_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpg726pay, "rtpg726pay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_G726_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_g726_pay_class_init (GstRtpG726PayClass * klass)
@@ -413,10 +416,3 @@ gst_rtp_g726_pay_get_property (GObject * object, guint prop_id,
       break;
   }
 }
-
-gboolean
-gst_rtp_g726_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpg726pay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_G726_PAY);
-}
index d9dbfa4..fd3078c 100644 (file)
@@ -49,7 +49,5 @@ struct _GstRtpG726PayClass
 
 GType gst_rtp_g726_pay_get_type (void);
 
-gboolean gst_rtp_g726_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 #endif /* __GST_RTP_G726_PAY_H__ */
index 69c1c4d..0fb0bcd 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include "gstrtpelements.h"
 #include "gstrtpg729depay.h"
 #include "gstrtputils.h"
 
@@ -80,6 +81,8 @@ static GstBuffer *gst_rtp_g729_depay_process (GstRTPBaseDepayload * depayload,
 #define gst_rtp_g729_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpG729Depay, gst_rtp_g729_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpg729depay, "rtpg729depay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_G729_DEPAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_g729_depay_class_init (GstRtpG729DepayClass * klass)
@@ -216,10 +219,3 @@ bad_packet:
     return NULL;
   }
 }
-
-gboolean
-gst_rtp_g729_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpg729depay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_G729_DEPAY);
-}
index a23562e..355ee50 100644 (file)
@@ -54,8 +54,6 @@ struct _GstRtpG729DepayClass
 
 GType gst_rtp_g729_depay_get_type (void);
 
-gboolean gst_rtp_g729_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_G729_DEPAY_H__ */
index 7809780..18e2bad 100644 (file)
@@ -34,6 +34,7 @@
 #include <gst/base/gstadapter.h>
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpg729pay.h"
 #include "gstrtputils.h"
 
@@ -78,6 +79,8 @@ static GstStaticPadTemplate gst_rtp_g729_pay_src_template =
 
 #define gst_rtp_g729_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRTPG729Pay, gst_rtp_g729_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpg729pay, "rtpg729pay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_G729_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_g729_pay_finalize (GObject * object)
@@ -389,10 +392,3 @@ gst_rtp_g729_pay_change_state (GstElement * element, GstStateChange transition)
 
   return ret;
 }
-
-gboolean
-gst_rtp_g729_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpg729pay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_G729_PAY);
-}
index 1b92460..c9e76c2 100644 (file)
@@ -59,8 +59,6 @@ struct _GstRTPG729PayClass
 
 GType gst_rtp_g729_pay_get_type (void);
 
-gboolean gst_rtp_g729_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_G729_PAY_H__ */
index c87c618..313acb5 100644 (file)
@@ -25,6 +25,7 @@
 #include <string.h>
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
+#include "gstrtpelements.h"
 #include "gstrtpgsmdepay.h"
 #include "gstrtputils.h"
 
@@ -65,6 +66,8 @@ static gboolean gst_rtp_gsm_depay_setcaps (GstRTPBaseDepayload * _depayload,
 
 #define gst_rtp_gsm_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRTPGSMDepay, gst_rtp_gsm_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpgsmdepay, "rtpgsmdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_GSM_DEPAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_gsm_depay_class_init (GstRTPGSMDepayClass * klass)
@@ -143,10 +146,3 @@ gst_rtp_gsm_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp)
 
   return outbuf;
 }
-
-gboolean
-gst_rtp_gsm_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpgsmdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_GSM_DEPAY);
-}
index e428aa0..166f558 100644 (file)
@@ -51,8 +51,6 @@ struct _GstRTPGSMDepayClass
 
 GType gst_rtp_gsm_depay_get_type (void);
 
-gboolean gst_rtp_gsm_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_GSM_DEPAY_H__ */
index 25fa0fa..b3197cb 100644 (file)
@@ -27,6 +27,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpgsmpay.h"
 #include "gstrtputils.h"
 
@@ -61,6 +62,8 @@ static GstFlowReturn gst_rtp_gsm_pay_handle_buffer (GstRTPBasePayload * payload,
 
 #define gst_rtp_gsm_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRTPGSMPay, gst_rtp_gsm_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpgsmpay, "rtpgsmpay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_GSM_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_gsm_pay_class_init (GstRTPGSMPayClass * klass)
@@ -172,10 +175,3 @@ too_big:
     return GST_FLOW_ERROR;
   }
 }
-
-gboolean
-gst_rtp_gsm_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpgsmpay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_GSM_PAY);
-}
index b6437f5..357a7c6 100644 (file)
@@ -52,7 +52,6 @@ struct _GstRTPGSMPayClass
 
 GType gst_rtp_gsm_pay_get_type (void);
 
-gboolean gst_rtp_gsm_pay_plugin_init (GstPlugin * plugin);
 
 G_END_DECLS
 
index 0f08177..ebf8382 100644 (file)
@@ -24,6 +24,7 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpgstdepay.h"
 #include "gstrtputils.h"
 
@@ -49,6 +50,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
 
 #define gst_rtp_gst_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpGSTDepay, gst_rtp_gst_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpgstdepay, "rtpgstdepay",
+    GST_RANK_MARGINAL, GST_TYPE_RTP_GST_DEPAY, rtp_element_init (plugin));
 
 static void gst_rtp_gst_depay_finalize (GObject * object);
 
@@ -602,11 +605,3 @@ gst_rtp_gst_depay_change_state (GstElement * element, GstStateChange transition)
   }
   return ret;
 }
-
-
-gboolean
-gst_rtp_gst_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpgstdepay",
-      GST_RANK_MARGINAL, GST_TYPE_RTP_GST_DEPAY);
-}
index 9ea9ec6..4152879 100644 (file)
@@ -59,8 +59,6 @@ struct _GstRtpGSTDepayClass
 
 GType gst_rtp_gst_depay_get_type (void);
 
-gboolean gst_rtp_gst_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_GST_DEPAY_H__ */
index 15b281b..81ff4a4 100644 (file)
@@ -26,6 +26,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/video/video.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpgstpay.h"
 #include "gstrtputils.h"
 
@@ -102,6 +103,8 @@ static gboolean gst_rtp_gst_pay_src_event (GstRTPBasePayload * payload,
 
 #define gst_rtp_gst_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpGSTPay, gst_rtp_gst_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpgstpay, "rtpgstpay", GST_RANK_NONE,
+    GST_TYPE_RTP_GST_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_gst_pay_class_init (GstRtpGSTPayClass * klass)
@@ -694,10 +697,3 @@ gst_rtp_gst_pay_handle_buffer (GstRTPBasePayload * basepayload,
 
   return ret;
 }
-
-gboolean
-gst_rtp_gst_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpgstpay",
-      GST_RANK_NONE, GST_TYPE_RTP_GST_PAY);
-}
index 6625a4d..2294e17 100644 (file)
@@ -66,8 +66,6 @@ struct _GstRtpGSTPayClass
 
 GType gst_rtp_gst_pay_get_type (void);
 
-gboolean gst_rtp_gst_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_GST_PAY_H__ */
index 164d2f0..23a888a 100644 (file)
@@ -46,6 +46,7 @@
 
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/video/video.h>
+#include "gstrtpelements.h"
 #include "gstrtph261depay.h"
 #include "gstrtph261pay.h"      /* GstRtpH261PayHeader */
 #include "gstrtputils.h"
@@ -75,10 +76,11 @@ static GstStaticPadTemplate gst_rtp_h261_depay_sink_template =
         "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
         "clock-rate = (int) 90000, " "encoding-name = (string) \"H261\"")
     );
-
+#define parent_class gst_rtp_h261_depay_parent_class
 G_DEFINE_TYPE (GstRtpH261Depay, gst_rtp_h261_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
-#define parent_class gst_rtp_h261_depay_parent_class
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtph261depay, "rtph261depay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_H261_DEPAY, rtp_element_init (plugin));
 
 static GstBuffer *
 gst_rtp_h261_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp)
@@ -285,10 +287,3 @@ gst_rtp_h261_depay_init (GstRtpH261Depay * depay)
   depay->adapter = gst_adapter_new ();
   depay->leftover = NO_LEFTOVER;
 }
-
-gboolean
-gst_rtp_h261_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtph261depay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_H261_DEPAY);
-}
index f87f817..821eff9 100644 (file)
@@ -54,7 +54,5 @@ struct _GstRtpH261DepayClass
 
 GType gst_rtp_h261_depay_get_type (void);
 
-gboolean gst_rtp_h261_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 #endif /* __GST_RTP_H261_DEPAY_H__ */
index fadc2c9..1814325 100644 (file)
@@ -48,6 +48,7 @@
 #  include "config.h"
 #endif
 
+#include "gstrtpelements.h"
 #include "gstrtph261pay.h"
 #include "gstrtputils.h"
 #include <gst/rtp/gstrtpbuffer.h>
@@ -82,8 +83,10 @@ static GstStaticPadTemplate gst_rtp_h261_pay_src_template =
         "clock-rate = (int) 90000, " "encoding-name = (string) \"H261\"")
     );
 
-G_DEFINE_TYPE (GstRtpH261Pay, gst_rtp_h261_pay, GST_TYPE_RTP_BASE_PAYLOAD);
 #define parent_class gst_rtp_h261_pay_parent_class
+G_DEFINE_TYPE (GstRtpH261Pay, gst_rtp_h261_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtph261pay, "rtph261pay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_H261_PAY, rtp_element_init (plugin));
 
 typedef struct
 {
@@ -1063,10 +1066,3 @@ gst_rtp_h261_pay_class_init (GstRtpH261PayClass * klass)
   GST_DEBUG_CATEGORY_INIT (rtph261pay_debug, "rtph261pay", 0,
       "H261 RTP Payloader");
 }
-
-gboolean
-gst_rtp_h261_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtph261pay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_H261_PAY);
-}
index eae4bf2..1052d01 100644 (file)
@@ -94,7 +94,5 @@ typedef struct _GstRtpH261PayHeader
 
 GType gst_rtp_h261_pay_get_type (void);
 
-gboolean gst_rtp_h261_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 #endif /* __GST_RTP_H261_PAY_H__ */
index 296f917..f6b41a5 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/video/video.h>
+#include "gstrtpelements.h"
 #include "gstrtph263depay.h"
 #include "gstrtputils.h"
 
@@ -72,6 +73,8 @@ static GstStaticPadTemplate gst_rtp_h263_depay_sink_template =
 #define gst_rtp_h263_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpH263Depay, gst_rtp_h263_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtph263depay, "rtph263depay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_H263_DEPAY, rtp_element_init (plugin));
 
 static void gst_rtp_h263_depay_finalize (GObject * object);
 
@@ -438,10 +441,3 @@ gst_rtp_h263_depay_change_state (GstElement * element,
   }
   return ret;
 }
-
-gboolean
-gst_rtp_h263_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtph263depay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_H263_DEPAY);
-}
index 2d9ca55..485fc9d 100644 (file)
@@ -58,8 +58,6 @@ struct _GstRtpH263DepayClass
 
 GType gst_rtp_h263_depay_get_type (void);
 
-gboolean gst_rtp_h263_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_H263_DEPAY_H__ */
index 9c296a9..b7239f4 100644 (file)
@@ -29,6 +29,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/video/video.h>
 
+#include "gstrtpelements.h"
 #include "gstrtph263pay.h"
 #include "gstrtputils.h"
 
@@ -399,6 +400,8 @@ static void gst_rtp_h263_pay_package_destroy (GstRtpH263PayPackage * pack);
 
 #define gst_rtp_h263_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpH263Pay, gst_rtp_h263_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtph263pay, "rtph263pay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_H263_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_h263_pay_class_init (GstRtpH263PayClass * klass)
@@ -1865,10 +1868,3 @@ gst_rtp_h263_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buffer)
 
   return ret;
 }
-
-gboolean
-gst_rtp_h263_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtph263pay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_H263_PAY);
-}
index 2abfc87..c77e6ac 100644 (file)
@@ -409,7 +409,5 @@ struct _GstRtpH263PayPackage
 
 GType gst_rtp_h263_pay_get_type (void);
 
-gboolean gst_rtp_h263_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 #endif /* __GST_RTP_H263_PAY_H__ */
index a1fc40c..f35d3de 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/video/video.h>
+#include "gstrtpelements.h"
 #include "gstrtph263pdepay.h"
 #include "gstrtputils.h"
 
@@ -84,6 +85,8 @@ static GstStaticPadTemplate gst_rtp_h263p_depay_sink_template =
 #define gst_rtp_h263p_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpH263PDepay, gst_rtp_h263p_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtph263pdepay, "rtph263pdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_H263P_DEPAY, rtp_element_init (plugin));
 
 static void gst_rtp_h263p_depay_finalize (GObject * object);
 
@@ -394,10 +397,3 @@ gst_rtp_h263p_depay_change_state (GstElement * element,
   }
   return ret;
 }
-
-gboolean
-gst_rtp_h263p_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtph263pdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_H263P_DEPAY);
-}
index bbdb2b0..bdcb826 100644 (file)
@@ -55,8 +55,6 @@ struct _GstRtpH263PDepayClass
 
 GType gst_rtp_h263p_depay_get_type (void);
 
-gboolean gst_rtp_h263p_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_H263P_DEPAY_H__ */
index bb45455..5e4aac0 100644 (file)
@@ -28,6 +28,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/video/video.h>
 
+#include "gstrtpelements.h"
 #include "gstrtph263ppay.h"
 #include "gstrtputils.h"
 
@@ -112,6 +113,8 @@ static GstFlowReturn gst_rtp_h263p_pay_handle_buffer (GstRTPBasePayload *
 
 #define gst_rtp_h263p_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpH263PPay, gst_rtp_h263p_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtph263ppay, "rtph263ppay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_H263P_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_h263p_pay_class_init (GstRtpH263PPayClass * klass)
@@ -809,10 +812,3 @@ gst_rtp_h263p_pay_handle_buffer (GstRTPBasePayload * payload,
 
   return ret;
 }
-
-gboolean
-gst_rtp_h263p_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtph263ppay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_H263P_PAY);
-}
index 23ec8b8..7197b86 100644 (file)
@@ -63,8 +63,6 @@ struct _GstRtpH263PPayClass
 
 GType gst_rtp_h263p_pay_get_type (void);
 
-gboolean gst_rtp_h263p_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_H263P_PAY_H__ */
index 9194026..c5608d0 100644 (file)
@@ -28,6 +28,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/pbutils/pbutils.h>
 #include <gst/video/video.h>
+#include "gstrtpelements.h"
 #include "gstrtph264depay.h"
 #include "gstrtputils.h"
 
@@ -91,6 +92,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
 #define gst_rtp_h264_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpH264Depay, gst_rtp_h264_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtph264depay, "rtph264depay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_H264_DEPAY, rtp_element_init (plugin));
 
 static void gst_rtp_h264_depay_finalize (GObject * object);
 
@@ -1506,13 +1509,3 @@ gst_rtp_h264_depay_change_state (GstElement * element,
   }
   return ret;
 }
-
-gboolean
-gst_rtp_h264_depay_plugin_init (GstPlugin * plugin)
-{
-  GST_DEBUG_CATEGORY_INIT (rtph264depay_debug, "rtph264depay", 0,
-      "H264 Video RTP Depayloader");
-
-  return gst_element_register (plugin, "rtph264depay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_H264_DEPAY);
-}
index 2805841..8ca7381 100644 (file)
@@ -84,8 +84,6 @@ struct _GstRtpH264DepayClass
 
 GType gst_rtp_h264_depay_get_type (void);
 
-gboolean gst_rtp_h264_depay_plugin_init (GstPlugin * plugin);
-
 gboolean gst_rtp_h264_add_sps_pps (GstElement * rtph264, GPtrArray * sps,
     GPtrArray * pps, GstBuffer * nal);
 
index 52e92a5..49471d8 100644 (file)
@@ -31,6 +31,7 @@
 /* Included to not duplicate gst_rtp_h264_add_sps_pps () */
 #include "gstrtph264depay.h"
 
+#include "gstrtpelements.h"
 #include "gstrtph264pay.h"
 #include "gstrtputils.h"
 #include "gstbuffermemory.h"
@@ -133,6 +134,8 @@ static void gst_rtp_h264_pay_reset_bundle (GstRtpH264Pay * rtph264pay);
 
 #define gst_rtp_h264_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpH264Pay, gst_rtp_h264_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtph264pay, "rtph264pay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_H264_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_h264_pay_class_init (GstRtpH264PayClass * klass)
@@ -1809,10 +1812,3 @@ gst_rtp_h264_pay_get_property (GObject * object, guint prop_id,
       break;
   }
 }
-
-gboolean
-gst_rtp_h264_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtph264pay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_H264_PAY);
-}
index 879394b..47cc896 100644 (file)
@@ -104,8 +104,6 @@ struct _GstRtpH264PayClass
 
 GType gst_rtp_h264_pay_get_type (void);
 
-gboolean gst_rtp_h264_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_H264_PAY_H__ */
index 38f53e4..c6edaeb 100644 (file)
@@ -28,6 +28,7 @@
 #include <gst/base/gstbitreader.h>
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/video/video.h>
+#include "gstrtpelements.h"
 #include "gstrtph265depay.h"
 #include "gstrtputils.h"
 
@@ -97,6 +98,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
 #define gst_rtp_h265_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpH265Depay, gst_rtp_h265_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtph265depay, "rtph265depay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_H265_DEPAY, rtp_element_init (plugin));
 
 static void gst_rtp_h265_depay_finalize (GObject * object);
 
@@ -460,7 +463,6 @@ gst_rtp_h265_set_src_caps (GstRtpH265Depay * rtph265depay)
     gst_rtp_read_golomb (&br, &chroma_format_idc);      /* chroma_format_idc */
 
     if (chroma_format_idc == 3)
-
       gst_bit_reader_get_bits_uint8 (&br, &tmp8, 1);    /* separate_colour_plane_flag */
 
     gst_rtp_read_golomb (&br, &tmp);    /* pic_width_in_luma_samples */
@@ -1661,13 +1663,3 @@ gst_rtp_h265_depay_change_state (GstElement * element,
   }
   return ret;
 }
-
-gboolean
-gst_rtp_h265_depay_plugin_init (GstPlugin * plugin)
-{
-  GST_DEBUG_CATEGORY_INIT (rtph265depay_debug, "rtph265depay", 0,
-      "H265 Video RTP Depayloader");
-
-  return gst_element_register (plugin, "rtph265depay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_H265_DEPAY);
-}
index b3b55ee..505bdb5 100644 (file)
@@ -108,8 +108,6 @@ typedef struct
 
 GType gst_rtp_h265_depay_get_type (void);
 
-gboolean gst_rtp_h265_depay_plugin_init (GstPlugin * plugin);
-
 gboolean gst_rtp_h265_add_vps_sps_pps (GstElement * rtph265, GPtrArray * vps,
     GPtrArray * sps, GPtrArray * pps, GstBuffer * nal);
 
index 81e2bce..9c19515 100644 (file)
@@ -32,6 +32,7 @@
 /* Included to not duplicate gst_rtp_h265_add_vps_sps_pps () */
 #include "gstrtph265depay.h"
 
+#include "gstrtpelements.h"
 #include "gstrtph265pay.h"
 #include "gstrtputils.h"
 #include "gstbuffermemory.h"
@@ -166,6 +167,8 @@ static void gst_rtp_h265_pay_reset_bundle (GstRtpH265Pay * rtph265pay);
 
 #define gst_rtp_h265_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpH265Pay, gst_rtp_h265_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtph265pay, "rtph265pay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_H265_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_h265_pay_class_init (GstRtpH265PayClass * klass)
@@ -1821,10 +1824,3 @@ gst_rtp_h265_pay_get_property (GObject * object, guint prop_id,
       break;
   }
 }
-
-gboolean
-gst_rtp_h265_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtph265pay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_H265_PAY);
-}
index 6d14095..af80c72 100644 (file)
@@ -87,7 +87,5 @@ struct _GstRtpH265PayClass
 
 GType gst_rtp_h265_pay_get_type (void);
 
-gboolean gst_rtp_h265_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 #endif /* __GST_RTP_H265_PAY_H__ */
index 0b020af..043e065 100644 (file)
@@ -25,6 +25,7 @@
 #include <stdlib.h>
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
+#include "gstrtpelements.h"
 #include "gstrtpilbcdepay.h"
 #include "gstrtputils.h"
 
@@ -74,6 +75,8 @@ static gboolean gst_rtp_ilbc_depay_setcaps (GstRTPBaseDepayload * depayload,
 #define gst_rtp_ilbc_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRTPiLBCDepay, gst_rtp_ilbc_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpilbcdepay, "rtpilbcdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_ILBC_DEPAY, rtp_element_init (plugin));
 
 #define GST_TYPE_ILBC_MODE (gst_ilbc_mode_get_type())
 static GType
@@ -230,10 +233,3 @@ gst_ilbc_depay_get_property (GObject * object,
       break;
   }
 }
-
-gboolean
-gst_rtp_ilbc_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpilbcdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_ILBC_DEPAY);
-}
index 01fd225..b016004 100644 (file)
@@ -58,8 +58,6 @@ struct _GstRTPiLBCDepayClass
 
 GType gst_rtp_ilbc_depay_get_type (void);
 
-gboolean gst_rtp_ilbc_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_ILBC_DEPAY_H__ */
index cbc7d93..0048045 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <stdlib.h>
 #include <gst/rtp/gstrtpbuffer.h>
+#include "gstrtpelements.h"
 #include "gstrtpilbcpay.h"
 
 GST_DEBUG_CATEGORY_STATIC (rtpilbcpay_debug);
@@ -56,6 +57,8 @@ static gboolean gst_rtp_ilbc_pay_sink_setcaps (GstRTPBasePayload * payload,
 #define gst_rtp_ilbc_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRTPILBCPay, gst_rtp_ilbc_pay,
     GST_TYPE_RTP_BASE_AUDIO_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpilbcpay, "rtpilbcpay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_ILBC_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_ilbc_pay_class_init (GstRTPILBCPayClass * klass)
@@ -219,10 +222,3 @@ gst_rtp_ilbc_pay_sink_getcaps (GstRTPBasePayload * rtppayload, GstPad * pad,
 
   return caps;
 }
-
-gboolean
-gst_rtp_ilbc_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpilbcpay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_ILBC_PAY);
-}
index 14363c0..d30c112 100644 (file)
@@ -53,8 +53,6 @@ struct _GstRTPILBCPayClass
 
 GType gst_rtp_ilbc_pay_get_type (void);
 
-gboolean gst_rtp_ilbc_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_ILBC_PAY_H__ */
index 38d02ac..bac1fa0 100644 (file)
@@ -36,6 +36,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpisacdepay.h"
 #include "gstrtputils.h"
 
@@ -72,6 +73,8 @@ struct _GstRtpIsacDepay
 #define gst_rtp_isac_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpIsacDepay, gst_rtp_isac_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpisacdepay, "rtpisacdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_ISAC_DEPAY, rtp_element_init (plugin));
 
 static gboolean
 gst_rtp_isac_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
@@ -142,10 +145,3 @@ static void
 gst_rtp_isac_depay_init (GstRtpIsacDepay * rtpisacdepay)
 {
 }
-
-gboolean
-gst_rtp_isac_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpisacdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_ISAC_DEPAY);
-}
index e0540b2..f5ab289 100644 (file)
@@ -27,7 +27,5 @@ G_BEGIN_DECLS
 G_DECLARE_FINAL_TYPE (GstRtpIsacDepay, gst_rtp_isac_depay, GST, RTP_ISAC_DEPAY,
     GstRTPBaseDepayload);
 
-gboolean gst_rtp_isac_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 #endif /* __GST_RTP_ISAC_DEPAY_H__ */
index 7be272b..ad03a19 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <gst/rtp/gstrtpbuffer.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpisacpay.h"
 #include "gstrtputils.h"
 
@@ -67,6 +68,8 @@ struct _GstRtpIsacPay
 
 #define gst_rtp_isac_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpIsacPay, gst_rtp_isac_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpisacpay, "rtpisacpay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_ISAC_PAY, rtp_element_init (plugin));
 
 static GstCaps *
 gst_rtp_isac_pay_getcaps (GstRTPBasePayload * payload, GstPad * pad,
@@ -178,10 +181,3 @@ static void
 gst_rtp_isac_pay_init (GstRtpIsacPay * rtpisacpay)
 {
 }
-
-gboolean
-gst_rtp_isac_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpisacpay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_ISAC_PAY);
-}
index 764fae4..82c072b 100644 (file)
@@ -26,8 +26,6 @@ G_BEGIN_DECLS
 
 G_DECLARE_FINAL_TYPE(GstRtpIsacPay, gst_rtp_isac_pay, GST, RTP_ISAC_PAY, GstRTPBasePayload);
 
-gboolean gst_rtp_isac_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_ISAC_PAY_H__ */
index 132bcf5..4456b3d 100644 (file)
@@ -37,6 +37,7 @@
 #include <gst/video/video.h>
 
 #include <string.h>
+#include "gstrtpelements.h"
 #include "gstrtpj2kcommon.h"
 #include "gstrtpj2kdepay.h"
 #include "gstrtputils.h"
@@ -74,6 +75,8 @@ enum
 
 #define gst_rtp_j2k_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpJ2KDepay, gst_rtp_j2k_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpj2kdepay, "rtpj2kdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_J2K_DEPAY, rtp_element_init (plugin));
 
 static void gst_rtp_j2k_depay_finalize (GObject * object);
 
@@ -659,10 +662,3 @@ gst_rtp_j2k_depay_change_state (GstElement * element, GstStateChange transition)
   }
   return ret;
 }
-
-gboolean
-gst_rtp_j2k_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpj2kdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_J2K_DEPAY);
-}
index ebc7433..5f49939 100644 (file)
@@ -66,7 +66,6 @@ struct _GstRtpJ2KDepayClass
 
 GType gst_rtp_j2k_depay_get_type (void);
 
-gboolean gst_rtp_j2k_depay_plugin_init (GstPlugin * plugin);
 
 G_END_DECLS
 #endif /* __GST_RTP_J2K_DEPAY_H__ */
index 41d1fad..1fb3516 100644 (file)
@@ -40,6 +40,7 @@
 #include <string.h>
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/video/video.h>
+#include "gstrtpelements.h"
 #include "gstrtpj2kcommon.h"
 #include "gstrtpj2kpay.h"
 #include "gstrtputils.h"
@@ -97,6 +98,8 @@ static GstFlowReturn gst_rtp_j2k_pay_handle_buffer (GstRTPBasePayload * pad,
 
 #define gst_rtp_j2k_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpJ2KPay, gst_rtp_j2k_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpj2kpay, "rtpj2kpay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_J2K_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_j2k_pay_class_init (GstRtpJ2KPayClass * klass)
@@ -562,10 +565,3 @@ gst_rtp_j2k_pay_get_property (GObject * object, guint prop_id,
       break;
   }
 }
-
-gboolean
-gst_rtp_j2k_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpj2kpay", GST_RANK_SECONDARY,
-      GST_TYPE_RTP_J2K_PAY);
-}
index 14f5295..e547493 100644 (file)
@@ -52,7 +52,5 @@ struct _GstRtpJ2KPayClass
 
 GType gst_rtp_j2k_pay_get_type (void);
 
-gboolean gst_rtp_j2k_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 #endif /* __GST_RTP_J2K_PAY_H__ */
index 5cd5428..02209d5 100644 (file)
@@ -28,6 +28,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include "gstrtpelements.h"
 #include "gstrtpjpegdepay.h"
 #include "gstrtputils.h"
 
@@ -70,6 +71,8 @@ static GstStaticPadTemplate gst_rtp_jpeg_depay_sink_template =
 #define gst_rtp_jpeg_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpJPEGDepay, gst_rtp_jpeg_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpjpegdepay, "rtpjpegdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_JPEG_DEPAY, rtp_element_init (plugin));
 
 static void gst_rtp_jpeg_depay_finalize (GObject * object);
 
@@ -790,11 +793,3 @@ gst_rtp_jpeg_depay_change_state (GstElement * element,
   }
   return ret;
 }
-
-
-gboolean
-gst_rtp_jpeg_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpjpegdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_JPEG_DEPAY);
-}
index cb74f12..3f7aea2 100644 (file)
@@ -63,7 +63,6 @@ struct _GstRtpJPEGDepayClass
 
 GType gst_rtp_jpeg_depay_get_type (void);
 
-gboolean gst_rtp_jpeg_depay_plugin_init (GstPlugin * plugin);
 
 G_END_DECLS
 
index b79ecc6..d2d6b99 100644 (file)
@@ -41,6 +41,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/video/video.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpjpegpay.h"
 #include "gstrtputils.h"
 #include "gstbuffermemory.h"
@@ -248,6 +249,8 @@ static GstFlowReturn gst_rtp_jpeg_pay_handle_buffer (GstRTPBasePayload * pad,
 
 #define gst_rtp_jpeg_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpJPEGPay, gst_rtp_jpeg_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpjpegpay, "rtpjpegpay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_JPEG_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_jpeg_pay_class_init (GstRtpJPEGPayClass * klass)
@@ -1047,10 +1050,3 @@ gst_rtp_jpeg_pay_get_property (GObject * object, guint prop_id,
       break;
   }
 }
-
-gboolean
-gst_rtp_jpeg_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpjpegpay", GST_RANK_SECONDARY,
-      GST_TYPE_RTP_JPEG_PAY);
-}
index 4d65ea7..696dc39 100644 (file)
@@ -57,7 +57,5 @@ struct _GstRtpJPEGPayClass
 
 GType gst_rtp_jpeg_pay_get_type (void);
 
-gboolean gst_rtp_jpeg_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 #endif /* __GST_RTP_JPEG_PAY_H__ */
index a502671..1cb8bc3 100644 (file)
@@ -37,6 +37,7 @@
 #include "config.h"
 #endif
 
+#include "gstrtpelements.h"
 #include "gstrtpklvdepay.h"
 
 #include <string.h>
@@ -59,6 +60,8 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
 
 #define gst_rtp_klv_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpKlvDepay, gst_rtp_klv_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpklvdepay, "rtpklvdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_KLV_DEPAY, rtp_element_init (plugin));
 
 static void gst_rtp_klv_depay_finalize (GObject * object);
 
@@ -388,10 +391,3 @@ gst_rtp_klv_depay_change_state (GstElement * element, GstStateChange transition)
   }
   return ret;
 }
-
-gboolean
-gst_rtp_klv_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpklvdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_KLV_DEPAY);
-}
index 71a256d..e1042a7 100644 (file)
@@ -58,8 +58,6 @@ struct _GstRtpKlvDepayClass
 
 G_GNUC_INTERNAL GType     gst_rtp_klv_depay_get_type (void);
 
-G_GNUC_INTERNAL gboolean  gst_rtp_klv_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_KLV_DEPAY_H__ */
index 779d6a7..03a59a9 100644 (file)
@@ -37,6 +37,7 @@
 #include "config.h"
 #endif
 
+#include "gstrtpelements.h"
 #include "gstrtpklvpay.h"
 #include "gstrtputils.h"
 
@@ -60,6 +61,8 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
 
 #define gst_rtp_klv_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpKlvPay, gst_rtp_klv_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpklvpay, "rtpklvpay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_KLV_PAY, rtp_element_init (plugin));
 
 static gboolean gst_rtp_klv_pay_setcaps (GstRTPBasePayload * pay,
     GstCaps * caps);
@@ -195,10 +198,3 @@ bad_input:
     goto done;
   }
 }
-
-gboolean
-gst_rtp_klv_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpklvpay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_KLV_PAY);
-}
index 9ee8134..41187d6 100644 (file)
@@ -53,8 +53,6 @@ struct _GstRtpKlvPayClass
 
 G_GNUC_INTERNAL  GType     gst_rtp_klv_pay_get_type (void);
 
-G_GNUC_INTERNAL  gboolean  gst_rtp_klv_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_KLV_PAY_H__ */
index 0e200ac..2b14b74 100644 (file)
@@ -44,6 +44,7 @@
 #endif
 
 #include <gst/audio/audio.h>
+#include "gstrtpelements.h"
 #include "gstrtpldacpay.h"
 #include "gstrtputils.h"
 
@@ -56,6 +57,8 @@ GST_DEBUG_CATEGORY_STATIC (gst_rtp_ldac_pay_debug);
 
 #define parent_class gst_rtp_ldac_pay_parent_class
 G_DEFINE_TYPE (GstRtpLdacPay, gst_rtp_ldac_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpldacpay, "rtpldacpay", GST_RANK_NONE,
+    GST_TYPE_RTP_LDAC_PAY, rtp_element_init (plugin));
 
 static GstStaticPadTemplate gst_rtp_ldac_pay_sink_factory =
 GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
@@ -166,10 +169,3 @@ gst_rtp_ldac_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buffer)
 
   return gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (ldacpay), outbuf);
 }
-
-gboolean
-gst_rtp_ldac_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpldacpay", GST_RANK_NONE,
-      GST_TYPE_RTP_LDAC_PAY);
-}
index 31a3108..e07dc2c 100644 (file)
@@ -24,6 +24,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 
 #include <string.h>
+#include "gstrtpelements.h"
 #include "gstrtpmp1sdepay.h"
 #include "gstrtputils.h"
 
@@ -63,6 +64,8 @@ static GstStaticPadTemplate gst_rtp_mp1s_depay_sink_template =
 
 G_DEFINE_TYPE (GstRtpMP1SDepay, gst_rtp_mp1s_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpmp1sdepay, "rtpmp1sdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_MP1S_DEPAY, rtp_element_init (plugin));
 
 static gboolean gst_rtp_mp1s_depay_setcaps (GstRTPBaseDepayload * depayload,
     GstCaps * caps);
@@ -134,10 +137,3 @@ gst_rtp_mp1s_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp)
 
   return outbuf;
 }
-
-gboolean
-gst_rtp_mp1s_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpmp1sdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_MP1S_DEPAY);
-}
index 582933b..e2e582c 100644 (file)
@@ -51,8 +51,6 @@ struct _GstRtpMP1SDepayClass
 
 GType gst_rtp_mp1s_depay_get_type (void);
 
-gboolean gst_rtp_mp1s_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_MP1S_DEPAY_H__ */
index f8e0d0c..7acf3f8 100644 (file)
@@ -24,6 +24,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 
 #include <string.h>
+#include "gstrtpelements.h"
 #include "gstrtpmp2tdepay.h"
 #include "gstrtputils.h"
 
@@ -71,6 +72,8 @@ static GstStaticPadTemplate gst_rtp_mp2t_depay_sink_template =
 
 G_DEFINE_TYPE (GstRtpMP2TDepay, gst_rtp_mp2t_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpmp2tdepay, "rtpmp2tdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_MP2T_DEPAY, rtp_element_init (plugin));
 
 static gboolean gst_rtp_mp2t_depay_setcaps (GstRTPBaseDepayload * depayload,
     GstCaps * caps);
@@ -234,10 +237,3 @@ gst_rtp_mp2t_depay_get_property (GObject * object, guint prop_id,
       break;
   }
 }
-
-gboolean
-gst_rtp_mp2t_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpmp2tdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_MP2T_DEPAY);
-}
index aa936dc..f1e5d08 100644 (file)
@@ -53,8 +53,6 @@ struct _GstRtpMP2TDepayClass
 
 GType gst_rtp_mp2t_depay_get_type (void);
 
-gboolean gst_rtp_mp2t_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_MP2T_DEPAY_H__ */
index 8dac50b..ecde5a2 100644 (file)
@@ -25,6 +25,7 @@
 #include <string.h>
 #include <gst/rtp/gstrtpbuffer.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpmp2tpay.h"
 #include "gstrtputils.h"
 
@@ -59,6 +60,8 @@ static void gst_rtp_mp2t_pay_finalize (GObject * object);
 
 #define gst_rtp_mp2t_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRTPMP2TPay, gst_rtp_mp2t_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpmp2tpay, "rtpmp2tpay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_MP2T_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_mp2t_pay_class_init (GstRTPMP2TPayClass * klass)
@@ -230,10 +233,3 @@ again:
   return ret;
 
 }
-
-gboolean
-gst_rtp_mp2t_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpmp2tpay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_MP2T_PAY);
-}
index 12f4959..9ed02d9 100644 (file)
@@ -57,8 +57,6 @@ struct _GstRTPMP2TPayClass
 
 GType gst_rtp_mp2t_pay_get_type (void);
 
-gboolean gst_rtp_mp2t_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_MP2T_PAY_H__ */
index 9177d7c..f278fc5 100644 (file)
@@ -26,6 +26,7 @@
 #include <gst/audio/audio.h>
 
 #include <string.h>
+#include "gstrtpelements.h"
 #include "gstrtpmp4adepay.h"
 #include "gstrtputils.h"
 
@@ -60,6 +61,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
 #define gst_rtp_mp4a_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpMP4ADepay, gst_rtp_mp4a_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpmp4adepay, "rtpmp4adepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_MP4A_DEPAY, rtp_element_init (plugin));
 
 static void gst_rtp_mp4a_depay_finalize (GObject * object);
 
@@ -457,10 +460,3 @@ gst_rtp_mp4a_depay_change_state (GstElement * element,
   }
   return ret;
 }
-
-gboolean
-gst_rtp_mp4a_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpmp4adepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_MP4A_DEPAY);
-}
index 31eaf56..c5aaaa3 100644 (file)
@@ -56,8 +56,6 @@ struct _GstRtpMP4ADepayClass
 
 GType gst_rtp_mp4a_depay_get_type (void);
 
-gboolean gst_rtp_mp4a_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_MP4A_DEPAY_H__ */
index ab1eeb5..bd37062 100644 (file)
@@ -26,6 +26,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpmp4apay.h"
 #include "gstrtputils.h"
 
@@ -68,6 +69,8 @@ static GstFlowReturn gst_rtp_mp4a_pay_handle_buffer (GstRTPBasePayload *
 
 #define gst_rtp_mp4a_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpMP4APay, gst_rtp_mp4a_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpmp4apay, "rtpmp4apay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_MP4A_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_mp4a_pay_class_init (GstRtpMP4APayClass * klass)
@@ -456,10 +459,3 @@ gst_rtp_mp4a_pay_handle_buffer (GstRTPBasePayload * basepayload,
 
   return ret;
 }
-
-gboolean
-gst_rtp_mp4a_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpmp4apay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_MP4A_PAY);
-}
index 49d9b65..997aa35 100644 (file)
@@ -58,8 +58,6 @@ struct _GstRtpMP4APayClass
 
 GType gst_rtp_mp4a_pay_get_type (void);
 
-gboolean gst_rtp_mp4a_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_MP4A_PAY_H__ */
index a734be0..8ee094d 100644 (file)
@@ -25,6 +25,7 @@
 #include <stdlib.h>
 #include <gst/rtp/gstrtpbuffer.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpmp4gdepay.h"
 #include "gstrtputils.h"
 
@@ -129,6 +130,8 @@ gst_bs_parse_read (GstBsParse * bs, guint n)
 #define gst_rtp_mp4g_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpMP4GDepay, gst_rtp_mp4g_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpmp4gdepay, "rtpmp4gdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_MP4G_DEPAY, rtp_element_init (plugin));
 
 static void gst_rtp_mp4g_depay_finalize (GObject * object);
 
@@ -806,10 +809,3 @@ gst_rtp_mp4g_depay_change_state (GstElement * element,
   }
   return ret;
 }
-
-gboolean
-gst_rtp_mp4g_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpmp4gdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_MP4G_DEPAY);
-}
index 8437328..a6a88a0 100644 (file)
@@ -82,8 +82,6 @@ struct _GstRtpMP4GDepayClass
 
 GType gst_rtp_mp4g_depay_get_type (void);
 
-gboolean gst_rtp_mp4g_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_MP4G_DEPAY_H__ */
index 532e2de..7e61e9f 100644 (file)
@@ -26,6 +26,7 @@
 #include <gst/base/gstbitreader.h>
 #include <gst/rtp/gstrtpbuffer.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpmp4gpay.h"
 #include "gstrtputils.h"
 
@@ -88,6 +89,8 @@ static gboolean gst_rtp_mp4g_pay_sink_event (GstRTPBasePayload * payload,
 
 #define gst_rtp_mp4g_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpMP4GPay, gst_rtp_mp4g_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpmp4gpay, "rtpmp4gpay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_MP4G_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_mp4g_pay_class_init (GstRtpMP4GPayClass * klass)
@@ -632,10 +635,3 @@ gst_rtp_mp4g_pay_change_state (GstElement * element, GstStateChange transition)
 
   return ret;
 }
-
-gboolean
-gst_rtp_mp4g_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpmp4gpay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_MP4G_PAY);
-}
index 14fd68a..6e7a625 100644 (file)
@@ -65,8 +65,6 @@ struct _GstRtpMP4GPayClass
 
 GType gst_rtp_mp4g_pay_get_type (void);
 
-gboolean gst_rtp_mp4g_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_MP4G_PAY_H__ */
index c860f88..204828c 100644 (file)
@@ -25,6 +25,7 @@
 #include <gst/video/video.h>
 
 #include <string.h>
+#include "gstrtpelements.h"
 #include "gstrtpmp4vdepay.h"
 #include "gstrtputils.h"
 
@@ -57,6 +58,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
 #define gst_rtp_mp4v_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpMP4VDepay, gst_rtp_mp4v_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpmp4vdepay, "rtpmp4vdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_MP4V_DEPAY, rtp_element_init (plugin));
 
 static void gst_rtp_mp4v_depay_finalize (GObject * object);
 
@@ -218,10 +221,3 @@ gst_rtp_mp4v_depay_change_state (GstElement * element,
   }
   return ret;
 }
-
-gboolean
-gst_rtp_mp4v_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpmp4vdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_MP4V_DEPAY);
-}
index 436e0db..0eecdf0 100644 (file)
@@ -54,8 +54,6 @@ struct _GstRtpMP4VDepayClass
 
 GType gst_rtp_mp4v_depay_get_type (void);
 
-gboolean gst_rtp_mp4v_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_MP4V_DEPAY_H__ */
index 30c679d..f6a4229 100644 (file)
@@ -26,6 +26,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/video/video.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpmp4vpay.h"
 #include "gstrtputils.h"
 
@@ -81,6 +82,12 @@ static gboolean gst_rtp_mp4v_pay_sink_event (GstRTPBasePayload * pay,
 
 #define gst_rtp_mp4v_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpMP4VPay, gst_rtp_mp4v_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+/* Note: This element is marked at a "+1" rank to make sure that
+ * auto-plugging of payloaders for MPEG4 elementary streams don't
+ * end up using the 'rtpmp4gpay' element (generic mpeg4) which isn't
+ * as well supported as this RFC */
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpmp4vpay, "rtpmp4vpay",
+    GST_RANK_SECONDARY + 1, GST_TYPE_RTP_MP4V_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_mp4v_pay_class_init (GstRtpMP4VPayClass * klass)
@@ -631,14 +638,3 @@ gst_rtp_mp4v_pay_get_property (GObject * object, guint prop_id,
       break;
   }
 }
-
-gboolean
-gst_rtp_mp4v_pay_plugin_init (GstPlugin * plugin)
-{
-  /* Note: This element is marked at a "+1" rank to make sure that
-   * auto-plugging of payloaders for MPEG4 elementary streams don't
-   * end up using the 'rtpmp4gpay' element (generic mpeg4) which isn't
-   * as well supported as this RFC */
-  return gst_element_register (plugin, "rtpmp4vpay",
-      GST_RANK_SECONDARY + 1, GST_TYPE_RTP_MP4V_PAY);
-}
index 26c0ba0..1d906fd 100644 (file)
@@ -67,8 +67,6 @@ struct _GstRtpMP4VPayClass
 
 GType gst_rtp_mp4v_pay_get_type (void);
 
-gboolean gst_rtp_mp4v_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_MP4V_PAY_H__ */
index 18506db..afa852f 100644 (file)
@@ -25,6 +25,7 @@
 #include <gst/audio/audio.h>
 
 #include <string.h>
+#include "gstrtpelements.h"
 #include "gstrtpmpadepay.h"
 #include "gstrtputils.h"
 
@@ -53,6 +54,8 @@ static GstStaticPadTemplate gst_rtp_mpa_depay_sink_template =
 
 #define gst_rtp_mpa_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpMPADepay, gst_rtp_mpa_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpmpadepay, "rtpmpadepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_MPA_DEPAY, rtp_element_init (plugin));
 
 static gboolean gst_rtp_mpa_depay_setcaps (GstRTPBaseDepayload * depayload,
     GstCaps * caps);
@@ -172,10 +175,3 @@ empty_packet:
     return NULL;
   }
 }
-
-gboolean
-gst_rtp_mpa_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpmpadepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_MPA_DEPAY);
-}
index 1070d77..9c06df3 100644 (file)
@@ -51,8 +51,6 @@ struct _GstRtpMPADepayClass
 
 GType gst_rtp_mpa_depay_get_type (void);
 
-gboolean gst_rtp_mpa_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_MPA_DEPAY_H__ */
index 62639f7..87ff430 100644 (file)
@@ -26,6 +26,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpmpapay.h"
 #include "gstrtputils.h"
 
@@ -68,6 +69,8 @@ static GstFlowReturn gst_rtp_mpa_pay_handle_buffer (GstRTPBasePayload * payload,
 
 #define gst_rtp_mpa_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpMPAPay, gst_rtp_mpa_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpmpapay, "rtpmpapay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_MPA_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_mpa_pay_class_init (GstRtpMPAPayClass * klass)
@@ -336,10 +339,3 @@ gst_rtp_mpa_pay_change_state (GstElement * element, GstStateChange transition)
   }
   return ret;
 }
-
-gboolean
-gst_rtp_mpa_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpmpapay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_MPA_PAY);
-}
index db29852..759ce87 100644 (file)
@@ -56,8 +56,6 @@ struct _GstRtpMPAPayClass
 
 GType gst_rtp_mpa_pay_get_type (void);
 
-gboolean gst_rtp_mpa_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_MPA_PAY_H__ */
index 702d2b0..ca7f1f1 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <stdio.h>
 #include <string.h>
+#include "gstrtpelements.h"
 #include "gstrtpmparobustdepay.h"
 
 GST_DEBUG_CATEGORY_STATIC (rtpmparobustdepay_debug);
@@ -70,6 +71,9 @@ typedef struct _GstADUFrame
 #define gst_rtp_mpa_robust_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpMPARobustDepay, gst_rtp_mpa_robust_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpmparobustdepay, "rtpmparobustdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_MPA_ROBUST_DEPAY,
+    rtp_element_init (plugin));
 
 static GstStateChangeReturn gst_rtp_mpa_robust_change_state (GstElement *
     element, GstStateChange transition);
@@ -802,10 +806,3 @@ gst_rtp_mpa_robust_change_state (GstElement * element,
 
   return ret;
 }
-
-gboolean
-gst_rtp_mpa_robust_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpmparobustdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_MPA_ROBUST_DEPAY);
-}
index fc9ec0b..8a3f51b 100644 (file)
@@ -71,8 +71,6 @@ struct _GstRtpMPARobustDepayClass
 
 GType gst_rtp_mpa_robust_depay_get_type (void);
 
-gboolean gst_rtp_mpa_robust_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_MPA_ROBUST_DEPAY_H__ */
index 9731946..71c0712 100644 (file)
@@ -25,6 +25,7 @@
 #include <gst/video/video.h>
 
 #include <string.h>
+#include "gstrtpelements.h"
 #include "gstrtpmpvdepay.h"
 #include "gstrtputils.h"
 
@@ -55,6 +56,8 @@ static GstStaticPadTemplate gst_rtp_mpv_depay_sink_template =
     );
 
 G_DEFINE_TYPE (GstRtpMPVDepay, gst_rtp_mpv_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpmpvdepay, "rtpmpvdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_MPV_DEPAY, rtp_element_init (plugin));
 
 static gboolean gst_rtp_mpv_depay_setcaps (GstRTPBaseDepayload * depayload,
     GstCaps * caps);
@@ -189,10 +192,3 @@ empty_packet:
     return NULL;
   }
 }
-
-gboolean
-gst_rtp_mpv_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpmpvdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_MPV_DEPAY);
-}
index 80f6c43..158c2dc 100644 (file)
@@ -51,8 +51,6 @@ struct _GstRtpMPVDepayClass
 
 GType gst_rtp_mpv_depay_get_type (void);
 
-gboolean gst_rtp_mpv_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_MPV_DEPAY_H__ */
index 24ad3c7..ef8b4a6 100644 (file)
@@ -26,6 +26,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/video/video.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpmpvpay.h"
 #include "gstrtputils.h"
 
@@ -69,6 +70,8 @@ static gboolean gst_rtp_mpv_pay_sink_event (GstRTPBasePayload * payload,
 
 #define gst_rtp_mpv_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRTPMPVPay, gst_rtp_mpv_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpmpvpay, "rtpmpvpay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_MPV_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_mpv_pay_class_init (GstRTPMPVPayClass * klass)
@@ -327,11 +330,3 @@ gst_rtp_mpv_pay_change_state (GstElement * element, GstStateChange transition)
   }
   return ret;
 }
-
-
-gboolean
-gst_rtp_mpv_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpmpvpay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_MPV_PAY);
-}
index bcebad9..a909ce9 100644 (file)
@@ -57,8 +57,6 @@ struct _GstRTPMPVPayClass
 
 GType gst_rtp_mpv_pay_get_type (void);
 
-gboolean gst_rtp_mpv_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_MPV_PAY_H__ */
index dc9213b..26434e8 100644 (file)
@@ -27,6 +27,7 @@
 #include <stdlib.h>
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
+#include "gstrtpelements.h"
 #include "gstrtpopusdepay.h"
 #include "gstrtputils.h"
 
@@ -58,6 +59,8 @@ static gboolean gst_rtp_opus_depay_setcaps (GstRTPBaseDepayload * depayload,
 
 G_DEFINE_TYPE (GstRTPOpusDepay, gst_rtp_opus_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpopusdepay, "rtpopusdepay",
+    GST_RANK_PRIMARY, GST_TYPE_RTP_OPUS_DEPAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_opus_depay_class_init (GstRTPOpusDepayClass * klass)
@@ -251,10 +254,3 @@ gst_rtp_opus_depay_process (GstRTPBaseDepayload * depayload,
 
   return outbuf;
 }
-
-gboolean
-gst_rtp_opus_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpopusdepay",
-      GST_RANK_PRIMARY, GST_TYPE_RTP_OPUS_DEPAY);
-}
index 38cc851..7890eb1 100644 (file)
@@ -53,7 +53,5 @@ struct _GstRTPOpusDepayClass
 
 GType gst_rtp_opus_depay_get_type (void);
 
-gboolean gst_rtp_opus_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 #endif /* __GST_RTP_OPUS_DEPAY_H__ */
index 260602e..bee7bb5 100644 (file)
@@ -51,6 +51,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpopuspay.h"
 #include "gstrtputils.h"
 
@@ -86,6 +87,8 @@ static GstFlowReturn gst_rtp_opus_pay_handle_buffer (GstRTPBasePayload *
     payload, GstBuffer * buffer);
 
 G_DEFINE_TYPE (GstRtpOPUSPay, gst_rtp_opus_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpopuspay, "rtpopuspay",
+    GST_RANK_PRIMARY, GST_TYPE_RTP_OPUS_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_opus_pay_class_init (GstRtpOPUSPayClass * klass)
@@ -312,10 +315,3 @@ gst_rtp_opus_pay_getcaps (GstRTPBasePayload * payload,
   GST_DEBUG_OBJECT (payload, "Returning caps: %" GST_PTR_FORMAT, caps);
   return caps;
 }
-
-gboolean
-gst_rtp_opus_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpopuspay",
-      GST_RANK_PRIMARY, GST_TYPE_RTP_OPUS_PAY);
-}
index 45f40d8..e21bbe3 100644 (file)
@@ -53,8 +53,6 @@ struct _GstRtpOPUSPayClass
 
 GType gst_rtp_opus_pay_get_type (void);
 
-gboolean gst_rtp_opus_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_OPUS_PAY_H__ */
index 476a20a..82727fb 100644 (file)
@@ -26,6 +26,7 @@
 #include <string.h>
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
+#include "gstrtpelements.h"
 #include "gstrtppcmadepay.h"
 #include "gstrtputils.h"
 
@@ -69,6 +70,8 @@ static gboolean gst_rtp_pcma_depay_setcaps (GstRTPBaseDepayload * depayload,
 #define gst_rtp_pcma_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpPcmaDepay, gst_rtp_pcma_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtppcmadepay, "rtppcmadepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_PCMA_DEPAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_pcma_depay_class_init (GstRtpPcmaDepayClass * klass)
@@ -155,10 +158,3 @@ gst_rtp_pcma_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp)
 
   return outbuf;
 }
-
-gboolean
-gst_rtp_pcma_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtppcmadepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_PCMA_DEPAY);
-}
index e664a2d..c74bd05 100644 (file)
@@ -46,8 +46,6 @@ struct _GstRtpPcmaDepayClass
 
 GType gst_rtp_pcma_depay_get_type (void);
 
-gboolean gst_rtp_pcma_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_PCMA_DEPAY_H__ */
index fde1b64..c516396 100644 (file)
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <gst/rtp/gstrtpbuffer.h>
 
+#include "gstrtpelements.h"
 #include "gstrtppcmapay.h"
 
 static GstStaticPadTemplate gst_rtp_pcma_pay_sink_template =
@@ -56,6 +57,8 @@ static gboolean gst_rtp_pcma_pay_setcaps (GstRTPBasePayload * payload,
 #define gst_rtp_pcma_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpPcmaPay, gst_rtp_pcma_pay,
     GST_TYPE_RTP_BASE_AUDIO_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtppcmapay, "rtppcmapay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_PCMA_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_pcma_pay_class_init (GstRtpPcmaPayClass * klass)
@@ -107,10 +110,3 @@ gst_rtp_pcma_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
 
   return res;
 }
-
-gboolean
-gst_rtp_pcma_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtppcmapay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_PCMA_PAY);
-}
index 4e084ad..7f67dff 100644 (file)
@@ -47,8 +47,6 @@ struct _GstRtpPcmaPayClass
 
 GType gst_rtp_pcma_pay_get_type (void);
 
-gboolean gst_rtp_pcma_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_PCMA_PAY_H__ */
index 1a06d18..9bd3afb 100644 (file)
@@ -26,6 +26,7 @@
 #include <string.h>
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
+#include "gstrtpelements.h"
 #include "gstrtppcmudepay.h"
 #include "gstrtputils.h"
 
@@ -70,6 +71,8 @@ static gboolean gst_rtp_pcmu_depay_setcaps (GstRTPBaseDepayload * depayload,
 #define gst_rtp_pcmu_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpPcmuDepay, gst_rtp_pcmu_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtppcmudepay, "rtppcmudepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_PCMU_DEPAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_pcmu_depay_class_init (GstRtpPcmuDepayClass * klass)
@@ -156,10 +159,3 @@ gst_rtp_pcmu_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp)
 
   return outbuf;
 }
-
-gboolean
-gst_rtp_pcmu_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtppcmudepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_PCMU_DEPAY);
-}
index 6a97559..a3d0173 100644 (file)
@@ -46,8 +46,6 @@ struct _GstRtpPcmuDepayClass
 
 GType gst_rtp_pcmu_depay_get_type (void);
 
-gboolean gst_rtp_pcmu_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_PCMU_DEPAY_H__ */
index 5931f85..5662789 100644 (file)
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <gst/rtp/gstrtpbuffer.h>
 
+#include "gstrtpelements.h"
 #include "gstrtppcmupay.h"
 
 static GstStaticPadTemplate gst_rtp_pcmu_pay_sink_template =
@@ -56,6 +57,8 @@ static gboolean gst_rtp_pcmu_pay_setcaps (GstRTPBasePayload * payload,
 #define gst_rtp_pcmu_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpPcmuPay, gst_rtp_pcmu_pay,
     GST_TYPE_RTP_BASE_AUDIO_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtppcmupay, "rtppcmupay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_PCMU_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_pcmu_pay_class_init (GstRtpPcmuPayClass * klass)
@@ -107,10 +110,3 @@ gst_rtp_pcmu_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
 
   return res;
 }
-
-gboolean
-gst_rtp_pcmu_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtppcmupay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_PCMU_PAY);
-}
index 7529d46..cdeb3a2 100644 (file)
@@ -47,8 +47,6 @@ struct _GstRtpPcmuPayClass
 
 GType gst_rtp_pcmu_pay_get_type (void);
 
-gboolean gst_rtp_pcmu_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_PCMU_PAY_H__ */
index cb5d9eb..949cf60 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include "gstrtpelements.h"
 #include "gstrtpqcelpdepay.h"
 #include "gstrtputils.h"
 
@@ -81,6 +82,8 @@ static GstBuffer *gst_rtp_qcelp_depay_process (GstRTPBaseDepayload * depayload,
 #define gst_rtp_qcelp_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpQCELPDepay, gst_rtp_qcelp_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpqcelpdepay, "rtpqcelpdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_QCELP_DEPAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_qcelp_depay_class_init (GstRtpQCELPDepayClass * klass)
@@ -423,10 +426,3 @@ invalid_frame:
     return NULL;
   }
 }
-
-gboolean
-gst_rtp_qcelp_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpqcelpdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_QCELP_DEPAY);
-}
index ade274d..f278a73 100644 (file)
@@ -55,8 +55,6 @@ struct _GstRtpQCELPDepayClass
 
 GType gst_rtp_qcelp_depay_get_type (void);
 
-gboolean gst_rtp_qcelp_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_QCELP_DEPAY_H__ */
index 898663a..3edfb46 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
+#include "gstrtpelements.h"
 #include "gstrtpqdmdepay.h"
 #include "gstrtputils.h"
 
@@ -49,6 +50,12 @@ GST_STATIC_PAD_TEMPLATE ("sink",
 #define gst_rtp_qdm2_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpQDM2Depay, gst_rtp_qdm2_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+#define _do_init \
+  GST_DEBUG_CATEGORY_INIT (rtpqdm2depay_debug, "rtpqdm2depay", 0, \
+      "RTP QDM2 depayloader"); \
+  rtp_element_init (plugin)
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpqdm2depay, "rtpqdm2depay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_QDM2_DEPAY, _do_init);
 
 static const guint8 headheader[20] = {
   0x0, 0x0, 0x0, 0xc, 0x66, 0x72, 0x6d, 0x61,
@@ -402,13 +409,3 @@ gst_rtp_qdm2_depay_change_state (GstElement * element,
   }
   return ret;
 }
-
-gboolean
-gst_rtp_qdm2_depay_plugin_init (GstPlugin * plugin)
-{
-  GST_DEBUG_CATEGORY_INIT (rtpqdm2depay_debug, "rtpqdm2depay", 0,
-      "RTP QDM2 depayloader");
-
-  return gst_element_register (plugin, "rtpqdm2depay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_QDM2_DEPAY);
-}
index 8a6b2b2..d5d3756 100644 (file)
@@ -78,8 +78,6 @@ struct _GstRtpQDM2DepayClass
 
 GType gst_rtp_qdm2_depay_get_type (void);
 
-gboolean gst_rtp_qdm2_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_QDM2_DEPAY_H__ */
index 1e47817..c9482cb 100644 (file)
@@ -48,6 +48,7 @@
 
 #include <gst/rtp/gstrtpbuffer.h>
 
+#include "gstrtpelements.h"
 #include "rtpredcommon.h"
 #include "gstrtpreddec.h"
 #include "rtpulpfeccommon.h"
@@ -82,6 +83,8 @@ GST_DEBUG_CATEGORY_STATIC (gst_rtp_red_dec_debug);
 #define GST_CAT_DEFAULT gst_rtp_red_dec_debug
 
 G_DEFINE_TYPE (GstRtpRedDec, gst_rtp_red_dec, GST_TYPE_ELEMENT);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpreddec, "rtpreddec", GST_RANK_NONE,
+    GST_TYPE_RTP_RED_DEC, rtp_element_init (plugin));
 
 enum
 {
index f192b78..862f799 100644 (file)
@@ -52,6 +52,7 @@
 #include <string.h>
 #include <stdio.h>
 
+#include "gstrtpelements.h"
 #include "rtpredcommon.h"
 #include "gstrtpredenc.h"
 
@@ -78,8 +79,9 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
 
 GST_DEBUG_CATEGORY_STATIC (gst_rtp_red_enc_debug);
 #define GST_CAT_DEFAULT (gst_rtp_red_enc_debug)
-
 G_DEFINE_TYPE (GstRtpRedEnc, gst_rtp_red_enc, GST_TYPE_ELEMENT);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpredenc, "rtpredenc", GST_RANK_NONE,
+    GST_TYPE_RTP_RED_ENC, rtp_element_init (plugin));
 
 enum
 {
index 9549bb0..f5dec8b 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
+#include "gstrtpelements.h"
 #include "gstrtpsbcdepay.h"
 #include "gstrtputils.h"
 
@@ -64,6 +65,8 @@ enum
 
 #define gst_rtp_sbc_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpSbcDepay, gst_rtp_sbc_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpsbcdepay, "rtpsbcdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_SBC_DEPAY, rtp_element_init (plugin));
 
 static void gst_rtp_sbc_depay_set_property (GObject * object,
     guint prop_id, const GValue * value, GParamSpec * pspec);
@@ -386,10 +389,3 @@ bad_packet:
       ("Received invalid RTP payload, dropping"), (NULL));
   goto out;
 }
-
-gboolean
-gst_rtp_sbc_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpsbcdepay", GST_RANK_SECONDARY,
-      GST_TYPE_RTP_SBC_DEPAY);
-}
index 9cac3ad..bc5a396 100644 (file)
@@ -64,7 +64,5 @@ struct _GstRtpSbcDepayClass
 
 GType gst_rtp_sbc_depay_get_type (void);
 
-gboolean gst_rtp_sbc_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 #endif
index f2cf849..98e21a0 100644 (file)
@@ -24,6 +24,7 @@
 #endif
 
 #include <gst/audio/audio.h>
+#include "gstrtpelements.h"
 #include "gstrtpsbcpay.h"
 #include <math.h>
 #include <string.h>
@@ -80,6 +81,8 @@ GST_DEBUG_CATEGORY_STATIC (gst_rtp_sbc_pay_debug);
 
 #define parent_class gst_rtp_sbc_pay_parent_class
 G_DEFINE_TYPE (GstRtpSBCPay, gst_rtp_sbc_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpsbcpay, "rtpsbcpay", GST_RANK_NONE,
+    GST_TYPE_RTP_SBC_PAY, rtp_element_init (plugin));
 
 static GstStaticPadTemplate gst_rtp_sbc_pay_sink_factory =
 GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
@@ -376,10 +379,3 @@ gst_rtp_sbc_pay_init (GstRtpSBCPay * self)
 
   self->min_frames = DEFAULT_MIN_FRAMES;
 }
-
-gboolean
-gst_rtp_sbc_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpsbcpay", GST_RANK_NONE,
-      GST_TYPE_RTP_SBC_PAY);
-}
index e570229..6f42c1e 100644 (file)
@@ -60,6 +60,4 @@ struct _GstRtpSBCPayClass {
 
 GType gst_rtp_sbc_pay_get_type(void);
 
-gboolean gst_rtp_sbc_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
index f227268..86a9dff 100644 (file)
@@ -27,6 +27,7 @@
 #include <stdlib.h>
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
+#include "gstrtpelements.h"
 #include "gstrtpsirendepay.h"
 #include "gstrtputils.h"
 
@@ -55,6 +56,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
 
 G_DEFINE_TYPE (GstRTPSirenDepay, gst_rtp_siren_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpsirendepay, "rtpsirendepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_SIREN_DEPAY, rtp_element_init (plugin));
 
      static void gst_rtp_siren_depay_class_init (GstRTPSirenDepayClass * klass)
 {
@@ -116,10 +119,3 @@ gst_rtp_siren_depay_process (GstRTPBaseDepayload * depayload,
 
   return outbuf;
 }
-
-gboolean
-gst_rtp_siren_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpsirendepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_SIREN_DEPAY);
-}
index d1ffb11..cdc108a 100644 (file)
@@ -53,7 +53,5 @@ struct _GstRTPSirenDepayClass
 
 GType gst_rtp_siren_depay_get_type (void);
 
-gboolean gst_rtp_siren_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 #endif /* __GST_RTP_SIREN_DEPAY_H__ */
index 04f9aa8..93385a4 100644 (file)
@@ -23,6 +23,7 @@
 #include "config.h"
 #endif
 
+#include "gstrtpelements.h"
 #include "gstrtpsirenpay.h"
 #include <gst/rtp/gstrtpbuffer.h>
 
@@ -53,6 +54,8 @@ static gboolean gst_rtp_siren_pay_setcaps (GstRTPBasePayload * payload,
 
 G_DEFINE_TYPE (GstRTPSirenPay, gst_rtp_siren_pay,
     GST_TYPE_RTP_BASE_AUDIO_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpsirenpay, "rtpsirenpay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_SIREN_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_siren_pay_class_init (GstRTPSirenPayClass * klass)
@@ -138,10 +141,3 @@ wrong_caps:
     return FALSE;
   }
 }
-
-gboolean
-gst_rtp_siren_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpsirenpay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_SIREN_PAY);
-}
index eaba5b5..56fc664 100644 (file)
@@ -51,7 +51,5 @@ struct _GstRTPSirenPayClass
 
 GType gst_rtp_siren_pay_get_type (void);
 
-gboolean gst_rtp_siren_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 #endif /* __GST_RTP_SIREN_PAY_H__ */
index a2c987b..ca70cd3 100644 (file)
@@ -26,6 +26,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpspeexdepay.h"
 #include "gstrtputils.h"
 
@@ -66,6 +67,8 @@ static gboolean gst_rtp_speex_depay_setcaps (GstRTPBaseDepayload * depayload,
 
 G_DEFINE_TYPE (GstRtpSPEEXDepay, gst_rtp_speex_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpspeexdepay, "rtpspeexdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_SPEEX_DEPAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_speex_depay_class_init (GstRtpSPEEXDepayClass * klass)
@@ -217,10 +220,3 @@ gst_rtp_speex_depay_process (GstRTPBaseDepayload * depayload,
 
   return outbuf;
 }
-
-gboolean
-gst_rtp_speex_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpspeexdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_SPEEX_DEPAY);
-}
index 59ffed0..3961ef1 100644 (file)
@@ -46,8 +46,6 @@ struct _GstRtpSPEEXDepayClass
 
 GType gst_rtp_speex_depay_get_type (void);
 
-gboolean gst_rtp_speex_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_SPEEX_DEPAY_H__ */
index 6f086b0..17b2aa5 100644 (file)
@@ -26,6 +26,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpspeexpay.h"
 #include "gstrtputils.h"
 
@@ -64,6 +65,8 @@ static GstFlowReturn gst_rtp_speex_pay_handle_buffer (GstRTPBasePayload *
 
 #define gst_rtp_speex_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpSPEEXPay, gst_rtp_speex_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpspeexpay, "rtpspeexpay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_SPEEX_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_speex_pay_class_init (GstRtpSPEEXPayClass * klass)
@@ -341,10 +344,3 @@ gst_rtp_speex_pay_change_state (GstElement * element, GstStateChange transition)
   }
   return ret;
 }
-
-gboolean
-gst_rtp_speex_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpspeexpay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_SPEEX_PAY);
-}
index 0ccaefb..a89350e 100644 (file)
@@ -49,8 +49,6 @@ struct _GstRtpSPEEXPayClass
 
 GType gst_rtp_speex_pay_get_type (void);
 
-gboolean gst_rtp_speex_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_SPEEX_PAY_H__ */
index b43eb98..a3e1593 100644 (file)
@@ -53,6 +53,7 @@
  * Since: 1.14
  */
 
+#include "gstrtpelements.h"
 #include "gstrtpstorage.h"
 
 static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
@@ -83,6 +84,8 @@ GST_DEBUG_CATEGORY (gst_rtp_storage_debug);
 #define GST_CAT_DEFAULT (gst_rtp_storage_debug)
 
 G_DEFINE_TYPE (GstRtpStorage, gst_rtp_storage, GST_TYPE_ELEMENT);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpstorage, "rtpstorage", GST_RANK_NONE,
+    GST_TYPE_RTP_STORAGE, rtp_element_init (plugin));
 
 static GstFlowReturn
 gst_rtp_storage_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
index bcaec19..978c753 100644 (file)
@@ -36,6 +36,7 @@
 #include "config.h"
 #endif
 
+#include "gstrtpelements.h"
 #include "gstrtpstreamdepay.h"
 
 GST_DEBUG_CATEGORY (gst_rtp_stream_depay_debug);
@@ -57,6 +58,8 @@ static GstStaticPadTemplate sink_template =
 
 #define parent_class gst_rtp_stream_depay_parent_class
 G_DEFINE_TYPE (GstRtpStreamDepay, gst_rtp_stream_depay, GST_TYPE_BASE_PARSE);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpstreamdepay, "rtpstreamdepay",
+    GST_RANK_NONE, GST_TYPE_RTP_STREAM_DEPAY, rtp_element_init (plugin));
 
 static gboolean gst_rtp_stream_depay_set_sink_caps (GstBaseParse * parse,
     GstCaps * caps);
@@ -223,10 +226,3 @@ gst_rtp_stream_depay_sink_activate (GstPad * pad, GstObject * parent)
 {
   return gst_pad_activate_mode (pad, GST_PAD_MODE_PUSH, TRUE);
 }
-
-gboolean
-gst_rtp_stream_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpstreamdepay",
-      GST_RANK_NONE, GST_TYPE_RTP_STREAM_DEPAY);
-}
index b6011cb..32bd6c1 100644 (file)
@@ -50,7 +50,6 @@ struct _GstRtpStreamDepayClass
 };
 
 GType gst_rtp_stream_depay_get_type (void);
-gboolean gst_rtp_stream_depay_plugin_init (GstPlugin * plugin);
 
 G_END_DECLS
 
index b575822..51206ff 100644 (file)
@@ -37,6 +37,7 @@
 #include "config.h"
 #endif
 
+#include "gstrtpelements.h"
 #include "gstrtpstreampay.h"
 
 #define GST_CAT_DEFAULT gst_rtp_stream_pay_debug
@@ -58,6 +59,8 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
 
 #define parent_class gst_rtp_stream_pay_parent_class
 G_DEFINE_TYPE (GstRtpStreamPay, gst_rtp_stream_pay, GST_TYPE_ELEMENT);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpstreampay, "rtpstreampay",
+    GST_RANK_NONE, GST_TYPE_RTP_STREAM_PAY, rtp_element_init (plugin));
 
 static gboolean gst_rtp_stream_pay_sink_query (GstPad * pad, GstObject * parent,
     GstQuery * query);
@@ -277,10 +280,3 @@ gst_rtp_stream_pay_sink_chain (GstPad * pad, GstObject * parent,
 
   return gst_pad_push (self->srcpad, outbuf);
 }
-
-gboolean
-gst_rtp_stream_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpstreampay",
-      GST_RANK_NONE, GST_TYPE_RTP_STREAM_PAY);
-}
index a9436a8..b90165a 100644 (file)
@@ -47,8 +47,6 @@ struct _GstRtpStreamPayClass {
 
 GType gst_rtp_stream_pay_get_type (void);
 
-gboolean gst_rtp_stream_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_STREAM_PAY_H__ */
index 3d091c2..5e13db4 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/video/video.h>
+#include "gstrtpelements.h"
 #include "gstrtpsv3vdepay.h"
 #include "gstrtputils.h"
 
@@ -51,6 +52,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
 #define gst_rtp_sv3v_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpSV3VDepay, gst_rtp_sv3v_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpsv3vdepay, "rtpsv3vdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_SV3V_DEPAY, rtp_element_init (plugin));
 
 static void gst_rtp_sv3v_depay_finalize (GObject * object);
 
@@ -310,13 +313,3 @@ gst_rtp_sv3v_depay_change_state (GstElement * element,
   }
   return ret;
 }
-
-gboolean
-gst_rtp_sv3v_depay_plugin_init (GstPlugin * plugin)
-{
-  GST_DEBUG_CATEGORY_INIT (rtpsv3vdepay_debug, "rtpsv3vdepay", 0,
-      "RTP SV3V depayloader");
-
-  return gst_element_register (plugin, "rtpsv3vdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_SV3V_DEPAY);
-}
index 428684a..1f3fc7f 100644 (file)
@@ -60,8 +60,6 @@ struct _GstRtpSV3VDepayClass
 
 GType gst_rtp_sv3v_depay_get_type (void);
 
-gboolean gst_rtp_sv3v_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_SV3V_DEPAY_H__ */
index c8af974..e7ff9e1 100644 (file)
@@ -26,6 +26,7 @@
 #include <gst/video/video.h>
 
 #include <string.h>
+#include "gstrtpelements.h"
 #include "gstrtptheoradepay.h"
 #include "gstrtputils.h"
 
@@ -64,6 +65,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
 #define gst_rtp_theora_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpTheoraDepay, gst_rtp_theora_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtptheoradepay, "rtptheoradepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_THEORA_DEPAY, rtp_element_init (plugin));
 
 static gboolean gst_rtp_theora_depay_setcaps (GstRTPBaseDepayload * depayload,
     GstCaps * caps);
@@ -680,13 +683,6 @@ gst_rtp_theora_depay_change_state (GstElement * element,
   return ret;
 }
 
-gboolean
-gst_rtp_theora_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtptheoradepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_THEORA_DEPAY);
-}
-
 static gboolean
 gst_rtp_theora_depay_packet_lost (GstRTPBaseDepayload * depayload,
     GstEvent * event)
index 2b0b260..492d33d 100644 (file)
@@ -65,8 +65,6 @@ struct _GstRtpTheoraDepayClass
 
 GType gst_rtp_theora_depay_get_type (void);
 
-gboolean gst_rtp_theora_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_THEORA_DEPAY_H__ */
index 136ce7d..5780757 100644 (file)
@@ -26,6 +26,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/video/video.h>
 
+#include "gstrtpelements.h"
 #include "fnv1hash.h"
 #include "gstrtptheorapay.h"
 #include "gstrtputils.h"
@@ -79,6 +80,8 @@ enum
 
 #define gst_rtp_theora_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpTheoraPay, gst_rtp_theora_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtptheorapay, "rtptheorapay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_THEORA_PAY, rtp_element_init (plugin));
 
 static gboolean gst_rtp_theora_pay_setcaps (GstRTPBasePayload * basepayload,
     GstCaps * caps);
@@ -976,10 +979,3 @@ gst_rtp_theora_pay_get_property (GObject * object, guint prop_id,
       break;
   }
 }
-
-gboolean
-gst_rtp_theora_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtptheorapay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_THEORA_PAY);
-}
index 22bc01d..d009364 100644 (file)
@@ -79,8 +79,6 @@ struct _GstRtpTheoraPayClass
 
 GType gst_rtp_theora_pay_get_type (void);
 
-gboolean gst_rtp_theora_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_THEORA_PAY_H__ */
index 709309a..cfc2229 100644 (file)
@@ -62,6 +62,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/rtp/gstrtp-enumtypes.h>
 
+#include "gstrtpelements.h"
 #include "rtpulpfeccommon.h"
 #include "gstrtpulpfecdec.h"
 
@@ -95,6 +96,8 @@ GST_DEBUG_CATEGORY (gst_rtp_ulpfec_dec_debug);
 #define GST_CAT_DEFAULT (gst_rtp_ulpfec_dec_debug)
 
 G_DEFINE_TYPE (GstRtpUlpFecDec, gst_rtp_ulpfec_dec, GST_TYPE_ELEMENT);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpulpfecdec, "rtpulpfecdec",
+    GST_RANK_NONE, GST_TYPE_RTP_ULPFEC_DEC, rtp_element_init (plugin));
 
 #define RTP_FEC_MAP_INFO_NTH(dec, data) (&g_array_index (\
     ((GstRtpUlpFecDec *)dec)->info_arr, \
index bd2df23..3862f8f 100644 (file)
@@ -88,6 +88,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <string.h>
 
+#include "gstrtpelements.h"
 #include "rtpulpfeccommon.h"
 #include "gstrtpulpfecenc.h"
 
@@ -114,6 +115,8 @@ GST_DEBUG_CATEGORY (gst_rtp_ulpfec_enc_debug);
 #define GST_CAT_DEFAULT (gst_rtp_ulpfec_enc_debug)
 
 G_DEFINE_TYPE (GstRtpUlpFecEnc, gst_rtp_ulpfec_enc, GST_TYPE_ELEMENT);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpulpfecenc, "rtpulpfecenc",
+    GST_RANK_NONE, GST_TYPE_RTP_ULPFEC_ENC, rtp_element_init (plugin));
 
 enum
 {
index 556bd76..053e647 100644 (file)
@@ -26,6 +26,7 @@
 #include <gst/audio/audio.h>
 
 #include <string.h>
+#include "gstrtpelements.h"
 #include "gstrtpvorbisdepay.h"
 #include "gstrtputils.h"
 
@@ -61,6 +62,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
 #define gst_rtp_vorbis_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpVorbisDepay, gst_rtp_vorbis_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpvorbisdepay, "rtpvorbisdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_VORBIS_DEPAY, rtp_element_init (plugin));
 
 static gboolean gst_rtp_vorbis_depay_setcaps (GstRTPBaseDepayload * depayload,
     GstCaps * caps);
@@ -702,10 +705,3 @@ gst_rtp_vorbis_depay_change_state (GstElement * element,
   }
   return ret;
 }
-
-gboolean
-gst_rtp_vorbis_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpvorbisdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_VORBIS_DEPAY);
-}
index a343d04..40f8d5f 100644 (file)
@@ -63,8 +63,6 @@ struct _GstRtpVorbisDepayClass
 
 GType gst_rtp_vorbis_depay_get_type (void);
 
-gboolean gst_rtp_vorbis_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_VORBIS_DEPAY_H__ */
index 8a3c249..e54e2a7 100644 (file)
@@ -26,6 +26,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/audio/audio.h>
 
+#include "gstrtpelements.h"
 #include "fnv1hash.h"
 #include "gstrtpvorbispay.h"
 #include "gstrtputils.h"
@@ -70,6 +71,8 @@ enum
 
 #define gst_rtp_vorbis_pay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpVorbisPay, gst_rtp_vorbis_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpvorbispay, "rtpvorbispay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_VORBIS_PAY, rtp_element_init (plugin));
 
 static gboolean gst_rtp_vorbis_pay_setcaps (GstRTPBasePayload * basepayload,
     GstCaps * caps);
@@ -997,10 +1000,3 @@ gst_rtp_vorbis_pay_get_property (GObject * object, guint prop_id,
       break;
   }
 }
-
-gboolean
-gst_rtp_vorbis_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpvorbispay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_VORBIS_PAY);
-}
index a5d693a..e1625ef 100644 (file)
@@ -78,8 +78,6 @@ struct _GstRtpVorbisPayClass
 
 GType gst_rtp_vorbis_pay_get_type (void);
 
-gboolean gst_rtp_vorbis_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_VORBIS_PAY_H__ */
index 6e0e7dd..bf97d0a 100644 (file)
@@ -22,6 +22,7 @@
 # include "config.h"
 #endif
 
+#include "gstrtpelements.h"
 #include "gstrtpvp8depay.h"
 #include "gstrtputils.h"
 
@@ -47,6 +48,8 @@ static gboolean gst_rtp_vp8_depay_packet_lost (GstRTPBaseDepayload * depay,
     GstEvent * event);
 
 G_DEFINE_TYPE (GstRtpVP8Depay, gst_rtp_vp8_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpvp8depay, "rtpvp8depay",
+    GST_RANK_MARGINAL, GST_TYPE_RTP_VP8_DEPAY, rtp_element_init (plugin));
 
 static GstStaticPadTemplate gst_rtp_vp8_depay_src_template =
 GST_STATIC_PAD_TEMPLATE ("src",
@@ -558,10 +561,3 @@ gst_rtp_vp8_depay_packet_lost (GstRTPBaseDepayload * depay, GstEvent * event)
 
   return ret;
 }
-
-gboolean
-gst_rtp_vp8_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpvp8depay",
-      GST_RANK_MARGINAL, GST_TYPE_RTP_VP8_DEPAY);
-}
index 34748ed..76be52a 100644 (file)
@@ -76,8 +76,6 @@ struct _GstRtpVP8Depay
 
 GType gst_rtp_vp8_depay_get_type (void);
 
-gboolean gst_rtp_vp8_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* #ifndef __GST_RTP_VP8_DEPAY_H__ */
index 717eaea..61bfcd6 100644 (file)
@@ -31,6 +31,7 @@
 #include <gst/rtp/gstrtppayloads.h>
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/video/video.h>
+#include "gstrtpelements.h"
 #include "dboolhuff.h"
 #include "gstrtpvp8pay.h"
 #include "gstrtputils.h"
@@ -79,6 +80,8 @@ static gboolean gst_rtp_vp8_pay_set_caps (GstRTPBasePayload * payload,
     GstCaps * caps);
 
 G_DEFINE_TYPE (GstRtpVP8Pay, gst_rtp_vp8_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpvp8pay, "rtpvp8pay",
+    GST_RANK_MARGINAL, GST_TYPE_RTP_VP8_PAY, rtp_element_init (plugin));
 
 static GstStaticPadTemplate gst_rtp_vp8_pay_src_template =
 GST_STATIC_PAD_TEMPLATE ("src",
@@ -722,10 +725,3 @@ gst_rtp_vp8_pay_set_caps (GstRTPBasePayload * payload, GstCaps * caps)
 
   return gst_rtp_base_payload_set_outcaps (payload, NULL);
 }
-
-gboolean
-gst_rtp_vp8_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpvp8pay",
-      GST_RANK_MARGINAL, GST_TYPE_RTP_VP8_PAY);
-}
index febec2a..30ad99a 100644 (file)
@@ -70,8 +70,6 @@ struct _GstRtpVP8Pay
 
 GType gst_rtp_vp8_pay_get_type (void);
 
-gboolean gst_rtp_vp8_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* #ifndef __GST_RTP_VP8_PAY_H__ */
index d943289..ec271cf 100644 (file)
@@ -23,6 +23,7 @@
 # include "config.h"
 #endif
 
+#include "gstrtpelements.h"
 #include "gstrtpvp9depay.h"
 #include "gstrtputils.h"
 
@@ -44,6 +45,8 @@ static gboolean gst_rtp_vp9_depay_packet_lost (GstRTPBaseDepayload * depay,
     GstEvent * event);
 
 G_DEFINE_TYPE (GstRtpVP9Depay, gst_rtp_vp9_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpvp9depay, "rtpvp9depay",
+    GST_RANK_MARGINAL, GST_TYPE_RTP_VP9_DEPAY, rtp_element_init (plugin));
 
 static GstStaticPadTemplate gst_rtp_vp9_depay_src_template =
 GST_STATIC_PAD_TEMPLATE ("src",
@@ -523,10 +526,3 @@ gst_rtp_vp9_depay_packet_lost (GstRTPBaseDepayload * depay, GstEvent * event)
       GST_RTP_BASE_DEPAYLOAD_CLASS
       (gst_rtp_vp9_depay_parent_class)->packet_lost (depay, event);
 }
-
-gboolean
-gst_rtp_vp9_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpvp9depay",
-      GST_RANK_MARGINAL, GST_TYPE_RTP_VP9_DEPAY);
-}
index 2a95230..96007bf 100644 (file)
@@ -74,8 +74,6 @@ struct _GstRtpVP9Depay
 
 GType gst_rtp_vp9_depay_get_type (void);
 
-gboolean gst_rtp_vp9_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* #ifndef __GST_RTP_VP9_DEPAY_H__ */
index 6ec4251..447a429 100644 (file)
@@ -32,6 +32,7 @@
 #include <gst/rtp/gstrtppayloads.h>
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/video/video.h>
+#include "gstrtpelements.h"
 #include "dboolhuff.h"
 #include "gstrtpvp9pay.h"
 #include "gstrtputils.h"
@@ -78,6 +79,8 @@ static gboolean gst_rtp_vp9_pay_set_caps (GstRTPBasePayload * payload,
     GstCaps * caps);
 
 G_DEFINE_TYPE (GstRtpVP9Pay, gst_rtp_vp9_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpvp9pay, "rtpvp9pay",
+    GST_RANK_MARGINAL, GST_TYPE_RTP_VP9_PAY, rtp_element_init (plugin));
 
 static GstStaticPadTemplate gst_rtp_vp9_pay_src_template =
 GST_STATIC_PAD_TEMPLATE ("src",
@@ -558,10 +561,3 @@ gst_rtp_vp9_pay_set_caps (GstRTPBasePayload * payload, GstCaps * caps)
 
   return gst_rtp_base_payload_set_outcaps (payload, NULL);
 }
-
-gboolean
-gst_rtp_vp9_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpvp9pay",
-      GST_RANK_MARGINAL, GST_TYPE_RTP_VP9_PAY);
-}
index fc2aa8e..407e3e0 100644 (file)
@@ -65,8 +65,6 @@ struct _GstRtpVP9Pay
 
 GType gst_rtp_vp9_pay_get_type (void);
 
-gboolean gst_rtp_vp9_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* #ifndef __GST_RTP_VP9_PAY_H__ */
index d679f68..d3bb5af 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <string.h>
 #include <stdlib.h>
+#include "gstrtpelements.h"
 #include "gstrtpvrawdepay.h"
 #include "gstrtputils.h"
 
@@ -60,6 +61,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
 #define gst_rtp_vraw_depay_parent_class parent_class
 G_DEFINE_TYPE (GstRtpVRawDepay, gst_rtp_vraw_depay,
     GST_TYPE_RTP_BASE_DEPAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpvrawdepay, "rtpvrawdepay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_VRAW_DEPAY, rtp_element_init (plugin));
 
 static gboolean gst_rtp_vraw_depay_setcaps (GstRTPBaseDepayload * depayload,
     GstCaps * caps);
@@ -658,10 +661,3 @@ gst_rtp_vraw_depay_change_state (GstElement * element,
   }
   return ret;
 }
-
-gboolean
-gst_rtp_vraw_depay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpvrawdepay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_VRAW_DEPAY);
-}
index 18ca755..736da75 100644 (file)
@@ -64,8 +64,6 @@ struct _GstRtpVRawDepayClass
 
 GType gst_rtp_vraw_depay_get_type (void);
 
-gboolean gst_rtp_vraw_depay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_VRAW_DEPAY_H__ */
index 3059071..1b19cdb 100644 (file)
@@ -26,6 +26,7 @@
 #include <gst/rtp/gstrtpbuffer.h>
 #include <gst/video/video.h>
 
+#include "gstrtpelements.h"
 #include "gstrtpvrawpay.h"
 #include "gstrtputils.h"
 
@@ -85,6 +86,8 @@ static void gst_rtp_vraw_pay_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec);
 
 G_DEFINE_TYPE (GstRtpVRawPay, gst_rtp_vraw_pay, GST_TYPE_RTP_BASE_PAYLOAD);
+GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (rtpvrawpay, "rtpvrawpay",
+    GST_RANK_SECONDARY, GST_TYPE_RTP_VRAW_PAY, rtp_element_init (plugin));
 
 static void
 gst_rtp_vraw_pay_class_init (GstRtpVRawPayClass * klass)
@@ -656,10 +659,3 @@ gst_rtp_vraw_pay_get_property (GObject * object, guint prop_id,
       break;
   }
 }
-
-gboolean
-gst_rtp_vraw_pay_plugin_init (GstPlugin * plugin)
-{
-  return gst_element_register (plugin, "rtpvrawpay",
-      GST_RANK_SECONDARY, GST_TYPE_RTP_VRAW_PAY);
-}
index 3fd2442..008cbee 100644 (file)
@@ -60,8 +60,6 @@ struct _GstRtpVRawPayClass
 
 GType gst_rtp_vraw_pay_get_type (void);
 
-gboolean gst_rtp_vraw_pay_plugin_init (GstPlugin * plugin);
-
 G_END_DECLS
 
 #endif /* __GST_RTP_VRAW_PAY_H__ */
index 1d8c4b9..0ad1465 100644 (file)
@@ -2,6 +2,7 @@ rtp_sources = [
   'dboolhuff.c',
   'fnv1hash.c',
   'gstbuffermemory.c',
+  'gstrtpelement.c',
   'gstrtp.c',
   'gstrtpchannels.c',
   'gstrtpac3depay.c',
index 0160f09..b974865 100644 (file)
@@ -84,6 +84,8 @@ good_tests = [
   [ 'elements/rtprtx' ],
   [ 'elements/rtpsession' ],
   [ 'elements/rtpstorage', false, [],  ['../../gst/rtp/gstrtpstorage.c',
+                                       '../../gst/rtp/gstrtpelement.c',
+                                       '../../gst/rtp/gstrtputils.c',
                                        '../../gst/rtp/rtpstorage.c',
                                        '../../gst/rtp/rtpstoragestream.c']],
   [ 'elements/rtpred' ],