rtp: Update codes based on 1.18.4
[platform/upstream/gst-plugins-good.git] / gst / rtp / gstrtp.c
index 7de6da3..b2a6706 100644 (file)
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
  *
  * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include <gst/tag/tag.h>
+
+#include "gstrtputils.h"
+
 #include "gstrtpac3depay.h"
 #include "gstrtpac3pay.h"
 #include "gstrtpbvdepay.h"
 #include "gstrtpac3depay.h"
 #include "gstrtpac3pay.h"
 #include "gstrtpbvdepay.h"
 #include "gstrtpmparobustdepay.h"
 #include "gstrtpmpvdepay.h"
 #include "gstrtpmpvpay.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 "gstrtph263pdepay.h"
 #include "gstrtph263ppay.h"
 #include "gstrtph263depay.h"
 #include "gstrtph263pay.h"
 #include "gstrtph264depay.h"
 #include "gstrtph264pay.h"
+#include "gstrtph265depay.h"
+#include "gstrtph265pay.h"
 #include "gstrtpj2kdepay.h"
 #include "gstrtpj2kpay.h"
 #include "gstrtpjpegdepay.h"
 #include "gstrtpjpegpay.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 "gstrtpL16depay.h"
 #include "gstrtpL16pay.h"
+#include "gstrtpL24depay.h"
+#include "gstrtpL24pay.h"
 #include "gstasteriskh263.h"
 #include "gstrtpmp1sdepay.h"
 #include "gstrtpmp2tdepay.h"
 #include "gstasteriskh263.h"
 #include "gstrtpmp1sdepay.h"
 #include "gstrtpmp2tdepay.h"
@@ -78,6 +94,8 @@
 #include "gstrtpmp4gpay.h"
 #include "gstrtpqcelpdepay.h"
 #include "gstrtpqdmdepay.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 "gstrtpsirenpay.h"
 #include "gstrtpsirendepay.h"
 #include "gstrtpspeexpay.h"
 #include "gstrtptheorapay.h"
 #include "gstrtpvorbisdepay.h"
 #include "gstrtpvorbispay.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 "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)
 {
 
 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_depay_plugin_init (plugin))
     return FALSE;
 
@@ -192,6 +228,18 @@ plugin_init (GstPlugin * plugin)
   if (!gst_rtp_mpv_pay_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_pay_plugin_init (plugin))
     return FALSE;
 
@@ -210,6 +258,12 @@ plugin_init (GstPlugin * plugin)
   if (!gst_rtp_h264_pay_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_depay_plugin_init (plugin))
     return FALSE;
 
@@ -222,12 +276,30 @@ plugin_init (GstPlugin * plugin)
   if (!gst_rtp_jpeg_pay_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_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_asteriskh263_plugin_init (plugin))
     return FALSE;
 
   if (!gst_asteriskh263_plugin_init (plugin))
     return FALSE;
 
@@ -264,6 +336,12 @@ plugin_init (GstPlugin * plugin)
   if (!gst_rtp_qdm2_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_pay_plugin_init (plugin))
     return FALSE;
 
@@ -291,17 +369,55 @@ plugin_init (GstPlugin * plugin)
   if (!gst_rtp_vorbis_pay_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_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_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;
 }
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
   return TRUE;
 }
 
 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     GST_VERSION_MINOR,
-    "rtp",
+    rtp,
     "Real-time protocol plugins",
     plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
     "Real-time protocol plugins",
     plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);