From fb0bc126c987efcc572a48307b14ad31274315f9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 17 Feb 2016 15:15:11 +0000 Subject: [PATCH] rtp: opus: move Opus RTP payloader/depayloader from -bad to -good https://bugzilla.gnome.org/show_bug.cgi?id=756282 --- gst/rtp/Makefile.am | 4 ++++ gst/rtp/gstrtp.c | 8 ++++++++ gst/rtp/gstrtpopusdepay.c | 7 +++++++ gst/rtp/gstrtpopusdepay.h | 2 ++ gst/rtp/gstrtpopuspay.c | 7 +++++++ gst/rtp/gstrtpopuspay.h | 2 ++ 6 files changed, 30 insertions(+) diff --git a/gst/rtp/Makefile.am b/gst/rtp/Makefile.am index 2207864..5315f9d 100644 --- a/gst/rtp/Makefile.am +++ b/gst/rtp/Makefile.am @@ -68,6 +68,8 @@ libgstrtp_la_SOURCES = \ gstrtpmp4gpay.c \ gstrtpmp4adepay.c \ gstrtpmp4apay.c \ + gstrtpopusdepay.c \ + gstrtpopuspay.c \ gstrtpqcelpdepay.c \ gstrtpqdmdepay.c \ gstrtpsbcdepay.c \ @@ -174,6 +176,8 @@ noinst_HEADERS = \ gstrtpmp4gpay.h \ gstrtpmp4adepay.h \ gstrtpmp4apay.h \ + gstrtpopusdepay.h \ + gstrtpopuspay.h \ gstasteriskh263.h \ gstrtpqcelpdepay.h \ gstrtpqdmdepay.h \ diff --git a/gst/rtp/gstrtp.c b/gst/rtp/gstrtp.c index b583382..10fdbca 100644 --- a/gst/rtp/gstrtp.c +++ b/gst/rtp/gstrtp.c @@ -56,6 +56,8 @@ #include "gstrtpmparobustdepay.h" #include "gstrtpmpvdepay.h" #include "gstrtpmpvpay.h" +#include "gstrtpopusdepay.h" +#include "gstrtpopuspay.h" #include "gstrtph261pay.h" #include "gstrtph261depay.h" #include "gstrtph263pdepay.h" @@ -212,6 +214,12 @@ plugin_init (GstPlugin * plugin) 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; diff --git a/gst/rtp/gstrtpopusdepay.c b/gst/rtp/gstrtpopusdepay.c index 8152cd5..b9d529e 100644 --- a/gst/rtp/gstrtpopusdepay.c +++ b/gst/rtp/gstrtpopusdepay.c @@ -173,3 +173,10 @@ gst_rtp_opus_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) 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); +} diff --git a/gst/rtp/gstrtpopusdepay.h b/gst/rtp/gstrtpopusdepay.h index 7890eb1..38cc851 100644 --- a/gst/rtp/gstrtpopusdepay.h +++ b/gst/rtp/gstrtpopusdepay.h @@ -53,5 +53,7 @@ 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__ */ diff --git a/gst/rtp/gstrtpopuspay.c b/gst/rtp/gstrtpopuspay.c index 5038028..1c6fb51 100644 --- a/gst/rtp/gstrtpopuspay.c +++ b/gst/rtp/gstrtpopuspay.c @@ -276,3 +276,10 @@ 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); +} diff --git a/gst/rtp/gstrtpopuspay.h b/gst/rtp/gstrtpopuspay.h index e21bbe3..45f40d8 100644 --- a/gst/rtp/gstrtpopuspay.h +++ b/gst/rtp/gstrtpopuspay.h @@ -53,6 +53,8 @@ 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__ */ -- 2.7.4