From cafd99311b7928e1cd3f0b005d2e2e59179e8fd4 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Thu, 13 Apr 2006 09:15:31 +0000 Subject: [PATCH] reverting rtp patches to fix freeze break on -base as explained on the list Original commit message from CVS: reverting rtp patches to fix freeze break on -base as explained on the list --- ChangeLog | 44 --------------- gst/rtp/Makefile.am | 4 -- gst/rtp/gstasteriskh263.h | 4 +- gst/rtp/gstrtp.c | 8 --- gst/rtp/gstrtpL16depay.h | 14 +++-- gst/rtp/gstrtpL16pay.h | 4 +- gst/rtp/gstrtpamrdepay.h | 4 +- gst/rtp/gstrtpamrpay.h | 4 +- gst/rtp/gstrtpdepay.h | 2 +- gst/rtp/gstrtpgsmdepay.h | 4 +- gst/rtp/gstrtpgsmpay.h | 4 +- gst/rtp/gstrtph263pay.h | 4 +- gst/rtp/gstrtph263pdepay.h | 4 +- gst/rtp/gstrtph263ppay.h | 4 +- gst/rtp/gstrtpmp4gpay.h | 4 +- gst/rtp/gstrtpmp4vdepay.h | 4 +- gst/rtp/gstrtpmp4vpay.h | 4 +- gst/rtp/gstrtpmpadepay.h | 4 +- gst/rtp/gstrtpmpapay.h | 4 +- gst/rtp/gstrtppcmadepay.h | 4 +- gst/rtp/gstrtppcmapay.c | 130 +++++++++++++++++++++++++++++++++++++++++---- gst/rtp/gstrtppcmapay.h | 15 ++++-- gst/rtp/gstrtppcmudepay.h | 4 +- gst/rtp/gstrtppcmupay.c | 130 +++++++++++++++++++++++++++++++++++++++++---- gst/rtp/gstrtppcmupay.h | 15 ++++-- gst/rtp/gstrtpspeexdepay.h | 4 +- gst/rtp/gstrtpspeexpay.h | 4 +- 27 files changed, 309 insertions(+), 125 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e7a04c..521e104 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,47 +1,3 @@ -2006-04-13 Tim-Philipp Müller - - * gst/rtp/gstasteriskh263.h: - * gst/rtp/gstrtpL16depay.h: - * gst/rtp/gstrtpL16pay.h: - * gst/rtp/gstrtpamrdepay.h: - * gst/rtp/gstrtpamrpay.h: - * gst/rtp/gstrtpdepay.h: - * gst/rtp/gstrtpgsmdepay.h: - * gst/rtp/gstrtpgsmpay.h: - * gst/rtp/gstrtph263pay.h: - * gst/rtp/gstrtph263pdepay.h: - * gst/rtp/gstrtph263ppay.h: - * gst/rtp/gstrtpilbcdepay.h: - * gst/rtp/gstrtpilbcpay.h: - * gst/rtp/gstrtpmp4gpay.h: - * gst/rtp/gstrtpmp4vdepay.h: - * gst/rtp/gstrtpmp4vpay.h: - * gst/rtp/gstrtpmpadepay.h: - * gst/rtp/gstrtpmpapay.h: - * gst/rtp/gstrtppcmadepay.h: - * gst/rtp/gstrtppcmapay.h: - * gst/rtp/gstrtppcmudepay.h: - * gst/rtp/gstrtppcmupay.h: - * gst/rtp/gstrtpspeexdepay.h: - * gst/rtp/gstrtpspeexpay.h: - Fix GObject macros. - -2006-04-12 Philippe Kalaf - - * gst/rtp/gstrtppcmapay.c: - * gst/rtp/gstrtppcmapay.h: - * gst/rtp/gstrtppcmupay.c: - * gst/rtp/gstrtppcmupay.h: - Ported mulaw and alaw payloaders to use new base class - * gst/rtp/Makefile.am: - * gst/rtp/gstrtp.c: - * gst/rtp/gstrtpilbcpay.c: - * gst/rtp/gstrtpilbcpay.h: - * gst/rtp/gstrtpilbcdepay.c: - * gst/rtp/gstrtpilbcdepay.h: - Added new iLBC payloader/depayloader. Payloader uses new audio payload base - class. - 2006-04-12 Wim Taymans * ext/gdk_pixbuf/gstgdkpixbuf.c: (gst_gdk_pixbuf_sink_setcaps), diff --git a/gst/rtp/Makefile.am b/gst/rtp/Makefile.am index 0dd25e5..82648b5 100644 --- a/gst/rtp/Makefile.am +++ b/gst/rtp/Makefile.am @@ -16,8 +16,6 @@ libgstrtp_la_SOURCES = \ gstrtph263pdepay.c \ gstrtph263ppay.c \ gstrtph263pay.c \ - gstrtpilbcpay.c \ - gstrtpilbcdepay.c \ gstasteriskh263.c \ gstrtpmp4vdepay.c \ gstrtpmp4vpay.c \ @@ -54,8 +52,6 @@ noinst_HEADERS = \ gstrtph263pdepay.h \ gstrtph263ppay.h \ gstrtph263pay.h \ - gstrtpilbcpay.h \ - gstrtpilbcdepay.h \ gstrtpmp4vdepay.h \ gstrtpmp4vpay.h \ gstrtpmp4gpay.h \ diff --git a/gst/rtp/gstasteriskh263.h b/gst/rtp/gstasteriskh263.h index eb32080..5ca18ec 100644 --- a/gst/rtp/gstasteriskh263.h +++ b/gst/rtp/gstasteriskh263.h @@ -30,10 +30,10 @@ G_BEGIN_DECLS #define GST_ASTERISK_H263(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ASTERISK_H263,GstAsteriskh263)) #define GST_ASTERISK_H263_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ASTERISK_H263,GstAsteriskh263Class)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ASTERISK_H263,GstAsteriskh263)) #define GST_IS_ASTERISK_H263(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ASTERISK_H263)) -#define GST_IS_ASTERISK_H263_CLASS(klass) \ +#define GST_IS_ASTERISK_H263_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ASTERISK_H263)) typedef struct _GstAsteriskh263 GstAsteriskh263; diff --git a/gst/rtp/gstrtp.c b/gst/rtp/gstrtp.c index d5cd86a..e80d4d6 100644 --- a/gst/rtp/gstrtp.c +++ b/gst/rtp/gstrtp.c @@ -35,8 +35,6 @@ #include "gstrtph263pdepay.h" #include "gstrtph263ppay.h" #include "gstrtph263pay.h" -#include "gstrtpilbcpay.h" -#include "gstrtpilbcdepay.h" #include "gstasteriskh263.h" #include "gstrtpmp4vpay.h" #include "gstrtpmp4gpay.h" @@ -89,12 +87,6 @@ plugin_init (GstPlugin * plugin) if (!gst_rtp_h263_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_asteriskh263_plugin_init (plugin)) return FALSE; diff --git a/gst/rtp/gstrtpL16depay.h b/gst/rtp/gstrtpL16depay.h index 57f7b72..2c06607 100644 --- a/gst/rtp/gstrtpL16depay.h +++ b/gst/rtp/gstrtpL16depay.h @@ -24,7 +24,10 @@ #include "rtp-packet.h" #include "gstrtp-common.h" -G_BEGIN_DECLS +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ /* Definition of structure storing data for this element. */ typedef struct _GstRtpL16Depay GstRtpL16Depay; @@ -54,14 +57,17 @@ struct _GstRtpL16DepayClass #define GST_RTP_L16_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_L16_DEPAY,GstRtpL16Depay)) #define GST_RTP_L16_DEPAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_L16_DEPAY,GstRtpL16DepayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_L16_DEPAY,GstRtpL16Depay)) #define GST_IS_RTP_L16_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_L16_DEPAY)) -#define GST_IS_RTP_L16_DEPAY_CLASS(klass) \ +#define GST_IS_RTP_L16_DEPAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_L16_DEPAY)) gboolean gst_rtp_L16depay_plugin_init (GstPlugin * plugin); -G_END_DECLS +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* __GST_RTP_L16_DEPAY_H__ */ diff --git a/gst/rtp/gstrtpL16pay.h b/gst/rtp/gstrtpL16pay.h index 1743b84..6320798 100644 --- a/gst/rtp/gstrtpL16pay.h +++ b/gst/rtp/gstrtpL16pay.h @@ -59,10 +59,10 @@ struct _GstRtpL16PayClass #define GST_RTP_L16_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_L16_PAY,GstRtpL16Pay)) #define GST_RTP_L16_PAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_L16_PAY,GstRtpL16PayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_L16_PAY,GstRtpL16Pay)) #define GST_IS_RTP_L16_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_L16_PAY)) -#define GST_IS_RTP_L16_PAY_CLASS(klass) \ +#define GST_IS_RTP_L16_PAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_L16_PAY)) gboolean gst_rtpL16pay_plugin_init (GstPlugin * plugin); diff --git a/gst/rtp/gstrtpamrdepay.h b/gst/rtp/gstrtpamrdepay.h index 3ad2ef5..dc382ef 100644 --- a/gst/rtp/gstrtpamrdepay.h +++ b/gst/rtp/gstrtpamrdepay.h @@ -29,10 +29,10 @@ G_BEGIN_DECLS #define GST_RTP_AMR_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_AMR_DEPAY,GstRtpAMRDepay)) #define GST_RTP_AMR_DEPAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_AMR_DEPAY,GstRtpAMRDepayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_AMR_DEPAY,GstRtpAMRDepay)) #define GST_IS_RTP_AMR_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_AMR_DEPAY)) -#define GST_IS_RTP_AMR_DEPAY_CLASS(klass) \ +#define GST_IS_RTP_AMR_DEPAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_AMR_DEPAY)) typedef struct _GstRtpAMRDepay GstRtpAMRDepay; diff --git a/gst/rtp/gstrtpamrpay.h b/gst/rtp/gstrtpamrpay.h index bfcc13f..f531b86 100644 --- a/gst/rtp/gstrtpamrpay.h +++ b/gst/rtp/gstrtpamrpay.h @@ -31,10 +31,10 @@ G_BEGIN_DECLS #define GST_RTP_AMR_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_AMR_PAY,GstRtpAMRPay)) #define GST_RTP_AMR_PAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_AMR_PAY,GstRtpAMRPayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_AMR_PAY,GstRtpAMRPay)) #define GST_IS_RTP_AMR_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_AMR_PAY)) -#define GST_IS_RTP_AMR_PAY_CLASS(klass) \ +#define GST_IS_RTP_AMR_PAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_AMR_PAY)) typedef struct _GstRtpAMRPay GstRtpAMRPay; diff --git a/gst/rtp/gstrtpdepay.h b/gst/rtp/gstrtpdepay.h index 908c193..67b2584 100644 --- a/gst/rtp/gstrtpdepay.h +++ b/gst/rtp/gstrtpdepay.h @@ -26,7 +26,7 @@ G_BEGIN_DECLS #define GST_TYPE_RTP_DEPAY (gst_rtp_depay_get_type()) #define GST_IS_RTP_DEPAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_DEPAY)) -#define GST_IS_RTP_DEPAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_DEPAY)) +#define GST_IS_RTP_DEPAY_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_DEPAY)) #define GST_RTP_DEPAY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_DEPAY, GstRTPDepay)) #define GST_RTP_DEPAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_DEPAY, GstRTPDepayClass)) diff --git a/gst/rtp/gstrtpgsmdepay.h b/gst/rtp/gstrtpgsmdepay.h index 3718c99..b450f8d 100644 --- a/gst/rtp/gstrtpgsmdepay.h +++ b/gst/rtp/gstrtpgsmdepay.h @@ -33,10 +33,10 @@ typedef struct _GstRTPGSMDepayClass GstRTPGSMDepayClass; #define GST_RTP_GSM_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_GSM_DEPAY,GstRTPGSMDepay)) #define GST_RTP_GSM_DEPAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_GSM_DEPAY,GstRTPGSMDepayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_GSM_DEPAY,GstRTPGSMDepay)) #define GST_IS_RTP_GSM_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_GSM_DEPAY)) -#define GST_IS_RTP_GSM_DEPAY_CLASS(klass) \ +#define GST_IS_RTP_GSM_DEPAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_GSM_DEPAY)) struct _GstRTPGSMDepay diff --git a/gst/rtp/gstrtpgsmpay.h b/gst/rtp/gstrtpgsmpay.h index 52f279a..40cf37b 100644 --- a/gst/rtp/gstrtpgsmpay.h +++ b/gst/rtp/gstrtpgsmpay.h @@ -34,10 +34,10 @@ typedef struct _GstRTPGSMPayClass GstRTPGSMPayClass; #define GST_RTP_GSM_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_GSM_PAY,GstRTPGSMPay)) #define GST_RTP_GSM_PAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_GSM_PAY,GstRTPGSMPayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_GSM_PAY,GstRTPGSMPay)) #define GST_IS_RTP_GSM_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_GSM_PAY)) -#define GST_IS_RTP_GSM_PAY_CLASS(klass) \ +#define GST_IS_RTP_GSM_PAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_GSM_PAY)) struct _GstRTPGSMPay diff --git a/gst/rtp/gstrtph263pay.h b/gst/rtp/gstrtph263pay.h index 678ae6c..e7b53ee 100644 --- a/gst/rtp/gstrtph263pay.h +++ b/gst/rtp/gstrtph263pay.h @@ -31,10 +31,10 @@ G_BEGIN_DECLS #define GST_RTP_H263_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_H263_PAY,GstRtpH263Pay)) #define GST_RTP_H263_PAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_H263_PAY,GstRtpH263PayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_H263_PAY,GstRtpH263Pay)) #define GST_IS_RTP_H263_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_H263_PAY)) -#define GST_IS_RTP_H263_PAY_CLASS(klass) \ +#define GST_IS_RTP_H263_PAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_H263_PAY)) typedef struct _GstRtpH263Pay GstRtpH263Pay; diff --git a/gst/rtp/gstrtph263pdepay.h b/gst/rtp/gstrtph263pdepay.h index 9b04527..be8bdd7 100644 --- a/gst/rtp/gstrtph263pdepay.h +++ b/gst/rtp/gstrtph263pdepay.h @@ -31,10 +31,10 @@ G_BEGIN_DECLS #define GST_RTP_H263P_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_H263P_DEPAY,GstRtpH263PDepay)) #define GST_RTP_H263P_DEPAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_H263P_DEPAY,GstRtpH263PDepayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_H263P_DEPAY,GstRtpH263PDepay)) #define GST_IS_RTP_H263P_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_H263P_DEPAY)) -#define GST_IS_RTP_H263P_DEPAY_CLASS(klass) \ +#define GST_IS_RTP_H263P_DEPAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_H263P_DEPAY)) typedef struct _GstRtpH263PDepay GstRtpH263PDepay; diff --git a/gst/rtp/gstrtph263ppay.h b/gst/rtp/gstrtph263ppay.h index dfd88eb..76e709f 100644 --- a/gst/rtp/gstrtph263ppay.h +++ b/gst/rtp/gstrtph263ppay.h @@ -31,10 +31,10 @@ G_BEGIN_DECLS #define GST_RTP_H263P_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_H263P_PAY,GstRtpH263PPay)) #define GST_RTP_H263P_PAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_H263P_PAY,GstRtpH263PPayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_H263P_PAY,GstRtpH263PPay)) #define GST_IS_RTP_H263P_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_H263P_PAY)) -#define GST_IS_RTP_H263P_PAY_CLASS(klass) \ +#define GST_IS_RTP_H263P_PAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_H263P_PAY)) typedef struct _GstRtpH263PPay GstRtpH263PPay; diff --git a/gst/rtp/gstrtpmp4gpay.h b/gst/rtp/gstrtpmp4gpay.h index a1858da..834821a 100644 --- a/gst/rtp/gstrtpmp4gpay.h +++ b/gst/rtp/gstrtpmp4gpay.h @@ -31,10 +31,10 @@ G_BEGIN_DECLS #define GST_RTP_MP4G_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_MP4G_PAY,GstRtpMP4GPay)) #define GST_RTP_MP4G_PAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_MP4G_PAY,GstRtpMP4GPayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_MP4G_PAY,GstRtpMP4GPay)) #define GST_IS_RTP_MP4G_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_MP4G_PAY)) -#define GST_IS_RTP_MP4G_PAY_CLASS(klass) \ +#define GST_IS_RTP_MP4G_PAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_MP4G_PAY)) typedef struct _GstRtpMP4GPay GstRtpMP4GPay; diff --git a/gst/rtp/gstrtpmp4vdepay.h b/gst/rtp/gstrtpmp4vdepay.h index 46556de..99568fb 100644 --- a/gst/rtp/gstrtpmp4vdepay.h +++ b/gst/rtp/gstrtpmp4vdepay.h @@ -31,10 +31,10 @@ G_BEGIN_DECLS #define GST_RTP_MP4V_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_MP4V_DEPAY,GstRtpMP4VDepay)) #define GST_RTP_MP4V_DEPAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_MP4V_DEPAY,GstRtpMP4VDepayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_MP4V_DEPAY,GstRtpMP4VDepay)) #define GST_IS_RTP_MP4V_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_MP4V_DEPAY)) -#define GST_IS_RTP_MP4V_DEPAY_CLASS(klass) \ +#define GST_IS_RTP_MP4V_DEPAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_MP4V_DEPAY)) typedef struct _GstRtpMP4VDepay GstRtpMP4VDepay; diff --git a/gst/rtp/gstrtpmp4vpay.h b/gst/rtp/gstrtpmp4vpay.h index 76f3e13..eb57239 100644 --- a/gst/rtp/gstrtpmp4vpay.h +++ b/gst/rtp/gstrtpmp4vpay.h @@ -31,10 +31,10 @@ G_BEGIN_DECLS #define GST_RTP_MP4V_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_MP4V_PAY,GstRtpMP4VPay)) #define GST_RTP_MP4V_PAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_MP4V_PAY,GstRtpMP4VPayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_MP4V_PAY,GstRtpMP4VPay)) #define GST_IS_RTP_MP4V_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_MP4V_PAY)) -#define GST_IS_RTP_MP4V_PAY_CLASS(klass) \ +#define GST_IS_RTP_MP4V_PAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_MP4V_PAY)) typedef struct _GstRtpMP4VPay GstRtpMP4VPay; diff --git a/gst/rtp/gstrtpmpadepay.h b/gst/rtp/gstrtpmpadepay.h index 581771a..bc607ce 100644 --- a/gst/rtp/gstrtpmpadepay.h +++ b/gst/rtp/gstrtpmpadepay.h @@ -29,10 +29,10 @@ G_BEGIN_DECLS #define GST_RTP_MPA_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_MPA_DEPAY,GstRtpMPADepay)) #define GST_RTP_MPA_DEPAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_MPA_DEPAY,GstRtpMPADepayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_MPA_DEPAY,GstRtpMPADepay)) #define GST_IS_RTP_MPA_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_MPA_DEPAY)) -#define GST_IS_RTP_MPA_DEPAY_CLASS(klass) \ +#define GST_IS_RTP_MPA_DEPAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_MPA_DEPAY)) typedef struct _GstRtpMPADepay GstRtpMPADepay; diff --git a/gst/rtp/gstrtpmpapay.h b/gst/rtp/gstrtpmpapay.h index f63756a..9ab5124 100644 --- a/gst/rtp/gstrtpmpapay.h +++ b/gst/rtp/gstrtpmpapay.h @@ -31,10 +31,10 @@ G_BEGIN_DECLS #define GST_RTP_MPA_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_MPA_PAY,GstRtpMPAPay)) #define GST_RTP_MPA_PAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_MPA_PAY,GstRtpMPAPayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_MPA_PAY,GstRtpMPAPay)) #define GST_IS_RTP_MPA_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_MPA_PAY)) -#define GST_IS_RTP_MPA_PAY_CLASS(klass) \ +#define GST_IS_RTP_MPA_PAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_MPA_PAY)) typedef struct _GstRtpMPAPay GstRtpMPAPay; diff --git a/gst/rtp/gstrtppcmadepay.h b/gst/rtp/gstrtppcmadepay.h index 61d14d9..ca9082e 100644 --- a/gst/rtp/gstrtppcmadepay.h +++ b/gst/rtp/gstrtppcmadepay.h @@ -28,10 +28,10 @@ typedef struct _GstRtpPcmaDepayClass GstRtpPcmaDepayClass; #define GST_RTP_PCMA_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_PCMA_DEPAY,GstRtpPcmaDepay)) #define GST_RTP_PCMA_DEPAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_PCMA_DEPAY,GstRtpPcmaDepayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_PCMA_DEPAY,GstRtpPcmaDepay)) #define GST_IS_RTP_PCMA_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_PCMA_DEPAY)) -#define GST_IS_RTP_PCMA_DEPAY_CLASS(klass) \ +#define GST_IS_RTP_PCMA_DEPAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_PCMA_DEPAY)) struct _GstRtpPcmaDepay diff --git a/gst/rtp/gstrtppcmapay.c b/gst/rtp/gstrtppcmapay.c index 940e6ca..439efaa 100644 --- a/gst/rtp/gstrtppcmapay.c +++ b/gst/rtp/gstrtppcmapay.c @@ -50,9 +50,17 @@ GST_STATIC_PAD_TEMPLATE ("src", static gboolean gst_rtp_pcma_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps); +static GstFlowReturn gst_rtp_pcma_pay_handle_buffer (GstBaseRTPPayload * + payload, GstBuffer * buffer); +static void gst_rtp_pcma_pay_finalize (GObject * object); -GST_BOILERPLATE (GstRtpPmcaPay, gst_rtp_pcma_pay, GstBaseRTPAudioPayload, - GST_TYPE_BASE_RTP_AUDIO_PAYLOAD); +GST_BOILERPLATE (GstRtpPmcaPay, gst_rtp_pcma_pay, GstBaseRTPPayload, + GST_TYPE_BASE_RTP_PAYLOAD); + +/* The lower limit for number of octet to put in one packet + * (clock-rate=8000, octet-per-sample=1). The default 80 is equal + * to to 10msec (see RFC3551) */ +#define GST_RTP_PCMA_MIN_PTIME_OCTETS 80 static void gst_rtp_pcma_pay_base_init (gpointer klass) @@ -78,24 +86,30 @@ gst_rtp_pcma_pay_class_init (GstRtpPmcaPayClass * klass) gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; parent_class = g_type_class_peek_parent (klass); + gobject_class->finalize = gst_rtp_pcma_pay_finalize; gstbasertppayload_class->set_caps = gst_rtp_pcma_pay_setcaps; + gstbasertppayload_class->handle_buffer = gst_rtp_pcma_pay_handle_buffer; } static void gst_rtp_pcma_pay_init (GstRtpPmcaPay * rtppcmapay, GstRtpPmcaPayClass * klass) { - GstBaseRTPAudioPayload *basertpaudiopayload; + rtppcmapay->adapter = gst_adapter_new (); + GST_BASE_RTP_PAYLOAD (rtppcmapay)->clock_rate = 8000; +} - basertpaudiopayload = GST_BASE_RTP_AUDIO_PAYLOAD (rtppcmapay); +static void +gst_rtp_pcma_pay_finalize (GObject * object) +{ + GstRtpPmcaPay *rtppcmapay; - GST_BASE_RTP_PAYLOAD (rtppcmapay)->clock_rate = 8000; + rtppcmapay = GST_RTP_PCMA_PAY (object); - /* tell basertpaudiopayload that this is a sample based codec */ - gst_basertpaudiopayload_set_sample_based (basertpaudiopayload); + g_object_unref (rtppcmapay->adapter); + rtppcmapay->adapter = NULL; - /* octet-per-sample is 1 for PCM */ - gst_basertpaudiopayload_set_sample_options (basertpaudiopayload, 1); + G_OBJECT_CLASS (parent_class)->finalize (object); } static gboolean @@ -109,6 +123,104 @@ gst_rtp_pcma_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps) return TRUE; } +static GstFlowReturn +gst_rtp_pcma_pay_flush (GstRtpPmcaPay * rtppcmapay) +{ + guint avail; + GstBuffer *outbuf; + GstFlowReturn ret; + guint maxptime_octets = G_MAXUINT; + guint minptime_octets = GST_RTP_PCMA_MIN_PTIME_OCTETS; + + if (GST_BASE_RTP_PAYLOAD (rtppcmapay)->max_ptime > 0) { + /* calculate octet count with: + maxptime-nsec * samples-per-sec / nsecs-per-sec * octets-per-sample */ + maxptime_octets = + GST_BASE_RTP_PAYLOAD (rtppcmapay)->max_ptime * + GST_BASE_RTP_PAYLOAD (rtppcmapay)->clock_rate / GST_SECOND; + } + + /* the data available in the adapter is either smaller + * than the MTU or bigger. In the case it is smaller, the complete + * adapter contents can be put in one packet. */ + avail = gst_adapter_available (rtppcmapay->adapter); + + ret = GST_FLOW_OK; + + while (avail >= minptime_octets) { + guint8 *payload; + guint8 *data; + guint payload_len; + guint packet_len; + + /* fill one MTU or all available bytes */ + payload_len = + MIN (MIN (GST_BASE_RTP_PAYLOAD_MTU (rtppcmapay), maxptime_octets), + avail); + + /* this will be the total lenght of the packet */ + packet_len = gst_rtp_buffer_calc_packet_len (payload_len, 0, 0); + + /* create buffer to hold the payload */ + outbuf = gst_rtp_buffer_new_allocate (payload_len, 0, 0); + + /* copy payload */ + gst_rtp_buffer_set_payload_type (outbuf, + GST_BASE_RTP_PAYLOAD_PT (rtppcmapay)); + payload = gst_rtp_buffer_get_payload (outbuf); + data = (guint8 *) gst_adapter_peek (rtppcmapay->adapter, payload_len); + memcpy (payload, data, payload_len); + gst_adapter_flush (rtppcmapay->adapter, payload_len); + + avail -= payload_len; + + GST_BUFFER_TIMESTAMP (outbuf) = rtppcmapay->first_ts; + ret = gst_basertppayload_push (GST_BASE_RTP_PAYLOAD (rtppcmapay), outbuf); + } + + return ret; +} + +static GstFlowReturn +gst_rtp_pcma_pay_handle_buffer (GstBaseRTPPayload * basepayload, + GstBuffer * buffer) +{ + GstRtpPmcaPay *rtppcmapay; + guint size, packet_len, avail; + GstFlowReturn ret; + GstClockTime duration; + + rtppcmapay = GST_RTP_PCMA_PAY (basepayload); + + size = GST_BUFFER_SIZE (buffer); + duration = GST_BUFFER_TIMESTAMP (buffer); + + avail = gst_adapter_available (rtppcmapay->adapter); + if (avail == 0) { + rtppcmapay->first_ts = GST_BUFFER_TIMESTAMP (buffer); + rtppcmapay->duration = 0; + } + + /* get packet length of data and see if we exceeded MTU. */ + packet_len = gst_rtp_buffer_calc_packet_len (avail + size, 0, 0); + + /* if this buffer is going to overflow the packet, flush what we + * have. */ + if (gst_basertppayload_is_filled (basepayload, + packet_len, rtppcmapay->duration + duration)) { + ret = gst_rtp_pcma_pay_flush (rtppcmapay); + rtppcmapay->first_ts = GST_BUFFER_TIMESTAMP (buffer); + rtppcmapay->duration = 0; + } else { + ret = GST_FLOW_OK; + } + + gst_adapter_push (rtppcmapay->adapter, buffer); + rtppcmapay->duration += duration; + + return ret; +} + gboolean gst_rtp_pcma_pay_plugin_init (GstPlugin * plugin) { diff --git a/gst/rtp/gstrtppcmapay.h b/gst/rtp/gstrtppcmapay.h index f5cf800..0d49854 100644 --- a/gst/rtp/gstrtppcmapay.h +++ b/gst/rtp/gstrtppcmapay.h @@ -17,7 +17,8 @@ #define __GST_RTP_PCMA_PAY_H__ #include -#include +#include +#include G_BEGIN_DECLS @@ -29,20 +30,24 @@ typedef struct _GstRtpPmcaPayClass GstRtpPmcaPayClass; #define GST_RTP_PCMA_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_PCMA_PAY,GstRtpPmcaPay)) #define GST_RTP_PCMA_PAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_PCMA_PAY,GstRtpPmcaPayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_PCMA_PAY,GstRtpPmcaPay)) #define GST_IS_RTP_PCMA_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_PCMA_PAY)) -#define GST_IS_RTP_PCMA_PAY_CLASS(klass) \ +#define GST_IS_RTP_PCMA_PAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_PCMA_PAY)) struct _GstRtpPmcaPay { - GstBaseRTPAudioPayload audiopayload; + GstBaseRTPPayload payload; + GstAdapter *adapter; + + GstClockTime first_ts; + GstClockTime duration; }; struct _GstRtpPmcaPayClass { - GstBaseRTPAudioPayloadClass parent_class; + GstBaseRTPPayloadClass parent_class; }; gboolean gst_rtp_pcma_pay_plugin_init (GstPlugin * plugin); diff --git a/gst/rtp/gstrtppcmudepay.h b/gst/rtp/gstrtppcmudepay.h index b7f8bf7..782c0bc 100644 --- a/gst/rtp/gstrtppcmudepay.h +++ b/gst/rtp/gstrtppcmudepay.h @@ -28,10 +28,10 @@ typedef struct _GstRtpPcmuDepayClass GstRtpPcmuDepayClass; #define GST_RTP_PCMU_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_PCMU_DEPAY,GstRtpPcmuDepay)) #define GST_RTP_PCMU_DEPAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_PCMU_DEPAY,GstRtpPcmuDepayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_PCMU_DEPAY,GstRtpPcmuDepay)) #define GST_IS_RTP_PCMU_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_PCMU_DEPAY)) -#define GST_IS_RTP_PCMU_DEPAY_CLASS(klass) \ +#define GST_IS_RTP_PCMU_DEPAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_PCMU_DEPAY)) struct _GstRtpPcmuDepay diff --git a/gst/rtp/gstrtppcmupay.c b/gst/rtp/gstrtppcmupay.c index 02ba1f8..ffb220b 100644 --- a/gst/rtp/gstrtppcmupay.c +++ b/gst/rtp/gstrtppcmupay.c @@ -50,9 +50,17 @@ GST_STATIC_PAD_TEMPLATE ("src", static gboolean gst_rtp_pcmu_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps); +static GstFlowReturn gst_rtp_pcmu_pay_handle_buffer (GstBaseRTPPayload * + payload, GstBuffer * buffer); +static void gst_rtp_pcmu_pay_finalize (GObject * object); -GST_BOILERPLATE (GstRtpPcmuPay, gst_rtp_pcmu_pay, GstBaseRTPAudioPayload, - GST_TYPE_BASE_RTP_AUDIO_PAYLOAD); +GST_BOILERPLATE (GstRtpPcmuPay, gst_rtp_pcmu_pay, GstBaseRTPPayload, + GST_TYPE_BASE_RTP_PAYLOAD); + +/* The lower limit for number of octet to put in one packet + * (clock-rate=8000, octet-per-sample=1). The default 80 is equal + * to to 10msec (see RFC3551) */ +#define GST_RTP_PCMU_MIN_PTIME_OCTETS 80 static void gst_rtp_pcmu_pay_base_init (gpointer klass) @@ -78,24 +86,30 @@ gst_rtp_pcmu_pay_class_init (GstRtpPcmuPayClass * klass) gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; parent_class = g_type_class_peek_parent (klass); + gobject_class->finalize = gst_rtp_pcmu_pay_finalize; gstbasertppayload_class->set_caps = gst_rtp_pcmu_pay_setcaps; + gstbasertppayload_class->handle_buffer = gst_rtp_pcmu_pay_handle_buffer; } static void gst_rtp_pcmu_pay_init (GstRtpPcmuPay * rtppcmupay, GstRtpPcmuPayClass * klass) { - GstBaseRTPAudioPayload *basertpaudiopayload; + rtppcmupay->adapter = gst_adapter_new (); + GST_BASE_RTP_PAYLOAD (rtppcmupay)->clock_rate = 8000; +} - basertpaudiopayload = GST_BASE_RTP_AUDIO_PAYLOAD (rtppcmupay); +static void +gst_rtp_pcmu_pay_finalize (GObject * object) +{ + GstRtpPcmuPay *rtppcmupay; - GST_BASE_RTP_PAYLOAD (rtppcmupay)->clock_rate = 8000; + rtppcmupay = GST_RTP_PCMU_PAY (object); - /* tell basertpaudiopayload that this is a sample based codec */ - gst_basertpaudiopayload_set_sample_based (basertpaudiopayload); + g_object_unref (rtppcmupay->adapter); + rtppcmupay->adapter = NULL; - /* octet-per-sample is 1 for PCM */ - gst_basertpaudiopayload_set_sample_options (basertpaudiopayload, 1); + G_OBJECT_CLASS (parent_class)->finalize (object); } static gboolean @@ -109,6 +123,104 @@ gst_rtp_pcmu_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps) return TRUE; } +static GstFlowReturn +gst_rtp_pcmu_pay_flush (GstRtpPcmuPay * rtppcmupay) +{ + guint avail; + GstBuffer *outbuf; + GstFlowReturn ret; + guint maxptime_octets = G_MAXUINT; + guint minptime_octets = GST_RTP_PCMU_MIN_PTIME_OCTETS; + + if (GST_BASE_RTP_PAYLOAD (rtppcmupay)->max_ptime > 0) { + /* calculate octet count with: + maxptime-nsec * samples-per-sec / nsecs-per-sec * octets-per-sample */ + maxptime_octets = + GST_BASE_RTP_PAYLOAD (rtppcmupay)->max_ptime * + GST_BASE_RTP_PAYLOAD (rtppcmupay)->clock_rate / GST_SECOND; + } + + /* the data available in the adapter is either smaller + * than the MTU or bigger. In the case it is smaller, the complete + * adapter contents can be put in one packet. */ + avail = gst_adapter_available (rtppcmupay->adapter); + + ret = GST_FLOW_OK; + + while (avail >= minptime_octets) { + guint8 *payload; + guint8 *data; + guint payload_len; + guint packet_len; + + /* fill one MTU or all available bytes */ + payload_len = + MIN (MIN (GST_BASE_RTP_PAYLOAD_MTU (rtppcmupay), maxptime_octets), + avail); + + /* this will be the total lenght of the packet */ + packet_len = gst_rtp_buffer_calc_packet_len (payload_len, 0, 0); + + /* create buffer to hold the payload */ + outbuf = gst_rtp_buffer_new_allocate (payload_len, 0, 0); + + /* copy payload */ + gst_rtp_buffer_set_payload_type (outbuf, + GST_BASE_RTP_PAYLOAD_PT (rtppcmupay)); + payload = gst_rtp_buffer_get_payload (outbuf); + data = (guint8 *) gst_adapter_peek (rtppcmupay->adapter, payload_len); + memcpy (payload, data, payload_len); + gst_adapter_flush (rtppcmupay->adapter, payload_len); + + avail -= payload_len; + + GST_BUFFER_TIMESTAMP (outbuf) = rtppcmupay->first_ts; + ret = gst_basertppayload_push (GST_BASE_RTP_PAYLOAD (rtppcmupay), outbuf); + } + + return ret; +} + +static GstFlowReturn +gst_rtp_pcmu_pay_handle_buffer (GstBaseRTPPayload * basepayload, + GstBuffer * buffer) +{ + GstRtpPcmuPay *rtppcmupay; + guint size, packet_len, avail; + GstFlowReturn ret; + GstClockTime duration; + + rtppcmupay = GST_RTP_PCMU_PAY (basepayload); + + size = GST_BUFFER_SIZE (buffer); + duration = GST_BUFFER_TIMESTAMP (buffer); + + avail = gst_adapter_available (rtppcmupay->adapter); + if (avail == 0) { + rtppcmupay->first_ts = GST_BUFFER_TIMESTAMP (buffer); + rtppcmupay->duration = 0; + } + + /* get packet length of data and see if we exceeded MTU. */ + packet_len = gst_rtp_buffer_calc_packet_len (avail + size, 0, 0); + + /* if this buffer is going to overflow the packet, flush what we + * have. */ + if (gst_basertppayload_is_filled (basepayload, + packet_len, rtppcmupay->duration + duration)) { + ret = gst_rtp_pcmu_pay_flush (rtppcmupay); + rtppcmupay->first_ts = GST_BUFFER_TIMESTAMP (buffer); + rtppcmupay->duration = 0; + } else { + ret = GST_FLOW_OK; + } + + gst_adapter_push (rtppcmupay->adapter, buffer); + rtppcmupay->duration += duration; + + return ret; +} + gboolean gst_rtp_pcmu_pay_plugin_init (GstPlugin * plugin) { diff --git a/gst/rtp/gstrtppcmupay.h b/gst/rtp/gstrtppcmupay.h index 411ad8f..046071b 100644 --- a/gst/rtp/gstrtppcmupay.h +++ b/gst/rtp/gstrtppcmupay.h @@ -17,7 +17,8 @@ #define __GST_RTP_PCMU_PAY_H__ #include -#include +#include +#include G_BEGIN_DECLS @@ -29,20 +30,24 @@ typedef struct _GstRtpPcmuPayClass GstRtpPcmuPayClass; #define GST_RTP_PCMU_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_PCMU_PAY,GstRtpPcmuPay)) #define GST_RTP_PCMU_PAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_PCMU_PAY,GstRtpPcmuPayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_PCMU_PAY,GstRtpPcmuPay)) #define GST_IS_RTP_PCMU_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_PCMU_PAY)) -#define GST_IS_RTP_PCMU_PAY_CLASS(klass) \ +#define GST_IS_RTP_PCMU_PAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_PCMU_PAY)) struct _GstRtpPcmuPay { - GstBaseRTPAudioPayload audiopayload; + GstBaseRTPPayload payload; + GstAdapter *adapter; + + GstClockTime first_ts; + GstClockTime duration; }; struct _GstRtpPcmuPayClass { - GstBaseRTPAudioPayloadClass parent_class; + GstBaseRTPPayloadClass parent_class; }; gboolean gst_rtp_pcmu_pay_plugin_init (GstPlugin * plugin); diff --git a/gst/rtp/gstrtpspeexdepay.h b/gst/rtp/gstrtpspeexdepay.h index 4a76a63..c24895c 100644 --- a/gst/rtp/gstrtpspeexdepay.h +++ b/gst/rtp/gstrtpspeexdepay.h @@ -28,10 +28,10 @@ typedef struct _GstRtpSPEEXDepayClass GstRtpSPEEXDepayClass; #define GST_RTP_SPEEX_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_SPEEX_DEPAY,GstRtpSPEEXDepay)) #define GST_RTP_SPEEX_DEPAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_SPEEX_DEPAY,GstRtpSPEEXDepayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_SPEEX_DEPAY,GstRtpSPEEXDepay)) #define GST_IS_RTP_SPEEX_DEPAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_SPEEX_DEPAY)) -#define GST_IS_RTP_SPEEX_DEPAY_CLASS(klass) \ +#define GST_IS_RTP_SPEEX_DEPAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_SPEEX_DEPAY)) struct _GstRtpSPEEXDepay diff --git a/gst/rtp/gstrtpspeexpay.h b/gst/rtp/gstrtpspeexpay.h index faea707..d9d907e 100644 --- a/gst/rtp/gstrtpspeexpay.h +++ b/gst/rtp/gstrtpspeexpay.h @@ -29,10 +29,10 @@ typedef struct _GstRtpSPEEXPayClass GstRtpSPEEXPayClass; #define GST_RTP_SPEEX_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_SPEEX_PAY,GstRtpSPEEXPay)) #define GST_RTP_SPEEX_PAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_SPEEX_PAY,GstRtpSPEEXPayClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_SPEEX_PAY,GstRtpSPEEXPay)) #define GST_IS_RTP_SPEEX_PAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_SPEEX_PAY)) -#define GST_IS_RTP_SPEEX_PAY_CLASS(klass) \ +#define GST_IS_RTP_SPEEX_PAY_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_SPEEX_PAY)) struct _GstRtpSPEEXPay -- 2.7.4