update for base class rename

This commit is contained in:
Wim Taymans 2011-11-11 12:25:01 +01:00
parent 3d9d2c6c05
commit 249d0083cc
136 changed files with 1092 additions and 1092 deletions

View file

@ -92,13 +92,13 @@ GST_STATIC_PAD_TEMPLATE ("sink",
); );
#define gst_rtp_xqt_depay_parent_class parent_class #define gst_rtp_xqt_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpXQTDepay, gst_rtp_xqt_depay, GST_TYPE_BASE_RTP_DEPAYLOAD); G_DEFINE_TYPE (GstRtpXQTDepay, gst_rtp_xqt_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
static void gst_rtp_xqt_depay_finalize (GObject * object); static void gst_rtp_xqt_depay_finalize (GObject * object);
static gboolean gst_rtp_xqt_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_xqt_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
static GstBuffer *gst_rtp_xqt_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_xqt_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static GstStateChangeReturn gst_rtp_xqt_depay_change_state (GstElement * static GstStateChangeReturn gst_rtp_xqt_depay_change_state (GstElement *
@ -110,11 +110,11 @@ gst_rtp_xqt_depay_class_init (GstRtpXQTDepayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
parent_class = g_type_class_peek_parent (klass); parent_class = g_type_class_peek_parent (klass);
@ -122,8 +122,8 @@ gst_rtp_xqt_depay_class_init (GstRtpXQTDepayClass * klass)
gstelement_class->change_state = gst_rtp_xqt_depay_change_state; gstelement_class->change_state = gst_rtp_xqt_depay_change_state;
gstbasertpdepayload_class->set_caps = gst_rtp_xqt_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_xqt_depay_setcaps;
gstbasertpdepayload_class->process = gst_rtp_xqt_depay_process; gstrtpbasedepayload_class->process = gst_rtp_xqt_depay_process;
GST_DEBUG_CATEGORY_INIT (rtpxqtdepay_debug, "rtpxqtdepay", 0, GST_DEBUG_CATEGORY_INIT (rtpxqtdepay_debug, "rtpxqtdepay", 0,
"QT Media RTP Depayloader"); "QT Media RTP Depayloader");
@ -213,7 +213,7 @@ gst_rtp_quicktime_parse_sd (GstRtpXQTDepay * rtpxqtdepay, guint8 * data,
caps = gst_caps_new_simple ("video/x-h264", caps = gst_caps_new_simple ("video/x-h264",
"codec_data", GST_TYPE_BUFFER, buf, NULL); "codec_data", GST_TYPE_BUFFER, buf, NULL);
gst_buffer_unref (buf); gst_buffer_unref (buf);
gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD (rtpxqtdepay)->srcpad, caps); gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD (rtpxqtdepay)->srcpad, caps);
gst_caps_unref (caps); gst_caps_unref (caps);
break; break;
} }
@ -235,7 +235,7 @@ too_short:
} }
static gboolean static gboolean
gst_rtp_xqt_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_xqt_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstStructure *structure; GstStructure *structure;
gint clock_rate = 90000; /* default */ gint clock_rate = 90000; /* default */
@ -249,7 +249,7 @@ gst_rtp_xqt_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
} }
static GstBuffer * static GstBuffer *
gst_rtp_xqt_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_xqt_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpXQTDepay *rtpxqtdepay; GstRtpXQTDepay *rtpxqtdepay;
GstBuffer *outbuf = NULL; GstBuffer *outbuf = NULL;
@ -597,7 +597,7 @@ gst_rtp_xqt_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
if (!s) if (!s)
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT); GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT);
gst_base_rtp_depayload_push (depayload, outbuf); gst_rtp_base_depayload_push (depayload, outbuf);
/* aligned on 32 bit boundary */ /* aligned on 32 bit boundary */
slen = GST_ROUND_UP_4 (slen); slen = GST_ROUND_UP_4 (slen);

View file

@ -42,7 +42,7 @@ typedef struct _GstRtpXQTDepayClass GstRtpXQTDepayClass;
struct _GstRtpXQTDepay struct _GstRtpXQTDepay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
GstAdapter *adapter; GstAdapter *adapter;
@ -54,7 +54,7 @@ struct _GstRtpXQTDepay
struct _GstRtpXQTDepayClass struct _GstRtpXQTDepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_xqt_depay_get_type (void); GType gst_rtp_xqt_depay_get_type (void);

View file

@ -65,24 +65,24 @@ static GstStaticPadTemplate gst_rtp_L16_depay_sink_template =
); );
#define gst_rtp_L16_depay_parent_class parent_class #define gst_rtp_L16_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpL16Depay, gst_rtp_L16_depay, GST_TYPE_BASE_RTP_DEPAYLOAD); G_DEFINE_TYPE (GstRtpL16Depay, gst_rtp_L16_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
static gboolean gst_rtp_L16_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_L16_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
static GstBuffer *gst_rtp_L16_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_L16_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static void static void
gst_rtp_L16_depay_class_init (GstRtpL16DepayClass * klass) gst_rtp_L16_depay_class_init (GstRtpL16DepayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gstbasertpdepayload_class->set_caps = gst_rtp_L16_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_L16_depay_setcaps;
gstbasertpdepayload_class->process = gst_rtp_L16_depay_process; gstrtpbasedepayload_class->process = gst_rtp_L16_depay_process;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_L16_depay_src_template)); gst_static_pad_template_get (&gst_rtp_L16_depay_src_template));
@ -121,7 +121,7 @@ gst_rtp_L16_depay_parse_int (GstStructure * structure, const gchar * field,
} }
static gboolean static gboolean
gst_rtp_L16_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_L16_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstStructure *structure; GstStructure *structure;
GstRtpL16Depay *rtpL16depay; GstRtpL16Depay *rtpL16depay;
@ -211,7 +211,7 @@ no_clockrate:
} }
static GstBuffer * static GstBuffer *
gst_rtp_L16_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_L16_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpL16Depay *rtpL16depay; GstRtpL16Depay *rtpL16depay;
GstBuffer *outbuf; GstBuffer *outbuf;

View file

@ -43,7 +43,7 @@ typedef struct _GstRtpL16DepayClass GstRtpL16DepayClass;
/* Definition of structure storing data for this element. */ /* Definition of structure storing data for this element. */
struct _GstRtpL16Depay struct _GstRtpL16Depay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
guint rate; guint rate;
guint channels; guint channels;
@ -52,7 +52,7 @@ struct _GstRtpL16Depay
/* Standard definition defining a class for this element. */ /* Standard definition defining a class for this element. */
struct _GstRtpL16DepayClass struct _GstRtpL16DepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_L16_depay_get_type (void); GType gst_rtp_L16_depay_get_type (void);

View file

@ -64,25 +64,25 @@ static GstStaticPadTemplate gst_rtp_L16_pay_src_template =
"clock-rate = (int) 44100") "clock-rate = (int) 44100")
); );
static gboolean gst_rtp_L16_pay_setcaps (GstBaseRTPPayload * basepayload, static gboolean gst_rtp_L16_pay_setcaps (GstRTPBasePayload * basepayload,
GstCaps * caps); GstCaps * caps);
static GstCaps *gst_rtp_L16_pay_getcaps (GstBaseRTPPayload * rtppayload, static GstCaps *gst_rtp_L16_pay_getcaps (GstRTPBasePayload * rtppayload,
GstPad * pad, GstCaps * filter); GstPad * pad, GstCaps * filter);
#define gst_rtp_L16_pay_parent_class parent_class #define gst_rtp_L16_pay_parent_class parent_class
G_DEFINE_TYPE (GstRtpL16Pay, gst_rtp_L16_pay, GST_TYPE_BASE_RTP_AUDIO_PAYLOAD); G_DEFINE_TYPE (GstRtpL16Pay, gst_rtp_L16_pay, GST_TYPE_RTP_BASE_AUDIO_PAYLOAD);
static void static void
gst_rtp_L16_pay_class_init (GstRtpL16PayClass * klass) gst_rtp_L16_pay_class_init (GstRtpL16PayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gstbasertppayload_class->set_caps = gst_rtp_L16_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_L16_pay_setcaps;
gstbasertppayload_class->get_caps = gst_rtp_L16_pay_getcaps; gstrtpbasepayload_class->get_caps = gst_rtp_L16_pay_getcaps;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_L16_pay_src_template)); gst_static_pad_template_get (&gst_rtp_L16_pay_src_template));
@ -101,16 +101,16 @@ gst_rtp_L16_pay_class_init (GstRtpL16PayClass * klass)
static void static void
gst_rtp_L16_pay_init (GstRtpL16Pay * rtpL16pay) gst_rtp_L16_pay_init (GstRtpL16Pay * rtpL16pay)
{ {
GstBaseRTPAudioPayload *basertpaudiopayload; GstRTPBaseAudioPayload *rtpbaseaudiopayload;
basertpaudiopayload = GST_BASE_RTP_AUDIO_PAYLOAD (rtpL16pay); rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (rtpL16pay);
/* tell basertpaudiopayload that this is a sample based codec */ /* tell rtpbaseaudiopayload that this is a sample based codec */
gst_base_rtp_audio_payload_set_sample_based (basertpaudiopayload); gst_rtp_base_audio_payload_set_sample_based (rtpbaseaudiopayload);
} }
static gboolean static gboolean
gst_rtp_L16_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps) gst_rtp_L16_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
{ {
GstRtpL16Pay *rtpL16pay; GstRtpL16Pay *rtpL16pay;
GstStructure *structure; GstStructure *structure;
@ -119,9 +119,9 @@ gst_rtp_L16_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
gchar *params; gchar *params;
GstAudioChannelPosition *pos; GstAudioChannelPosition *pos;
const GstRTPChannelOrder *order; const GstRTPChannelOrder *order;
GstBaseRTPAudioPayload *basertpaudiopayload; GstRTPBaseAudioPayload *rtpbaseaudiopayload;
basertpaudiopayload = GST_BASE_RTP_AUDIO_PAYLOAD (basepayload); rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (basepayload);
rtpL16pay = GST_RTP_L16_PAY (basepayload); rtpL16pay = GST_RTP_L16_PAY (basepayload);
structure = gst_caps_get_structure (caps, 0); structure = gst_caps_get_structure (caps, 0);
@ -140,7 +140,7 @@ gst_rtp_L16_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
else else
order = NULL; order = NULL;
gst_base_rtp_payload_set_options (basepayload, "audio", TRUE, "L16", rate); gst_rtp_base_payload_set_options (basepayload, "audio", TRUE, "L16", rate);
params = g_strdup_printf ("%d", channels); params = g_strdup_printf ("%d", channels);
if (!order && channels > 2) { if (!order && channels > 2) {
@ -149,11 +149,11 @@ gst_rtp_L16_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
} }
if (order && order->name) { if (order && order->name) {
res = gst_base_rtp_payload_set_outcaps (basepayload, res = gst_rtp_base_payload_set_outcaps (basepayload,
"encoding-params", G_TYPE_STRING, params, "channels", G_TYPE_INT, "encoding-params", G_TYPE_STRING, params, "channels", G_TYPE_INT,
channels, "channel-order", G_TYPE_STRING, order->name, NULL); channels, "channel-order", G_TYPE_STRING, order->name, NULL);
} else { } else {
res = gst_base_rtp_payload_set_outcaps (basepayload, res = gst_rtp_base_payload_set_outcaps (basepayload,
"encoding-params", G_TYPE_STRING, params, "channels", G_TYPE_INT, "encoding-params", G_TYPE_STRING, params, "channels", G_TYPE_INT,
channels, NULL); channels, NULL);
} }
@ -165,7 +165,7 @@ gst_rtp_L16_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
rtpL16pay->channels = channels; rtpL16pay->channels = channels;
/* octet-per-sample is 2 * channels for L16 */ /* octet-per-sample is 2 * channels for L16 */
gst_base_rtp_audio_payload_set_sample_options (basertpaudiopayload, gst_rtp_base_audio_payload_set_sample_options (rtpbaseaudiopayload,
2 * rtpL16pay->channels); 2 * rtpL16pay->channels);
return res; return res;
@ -184,7 +184,7 @@ no_channels:
} }
static GstCaps * static GstCaps *
gst_rtp_L16_pay_getcaps (GstBaseRTPPayload * rtppayload, GstPad * pad, gst_rtp_L16_pay_getcaps (GstRTPBasePayload * rtppayload, GstPad * pad,
GstCaps * filter) GstCaps * filter)
{ {
GstCaps *otherpadcaps; GstCaps *otherpadcaps;

View file

@ -41,7 +41,7 @@ typedef struct _GstRtpL16PayClass GstRtpL16PayClass;
struct _GstRtpL16Pay struct _GstRtpL16Pay
{ {
GstBaseRTPAudioPayload payload; GstRTPBaseAudioPayload payload;
gint rate; gint rate;
gint channels; gint channels;
@ -49,7 +49,7 @@ struct _GstRtpL16Pay
struct _GstRtpL16PayClass struct _GstRtpL16PayClass
{ {
GstBaseRTPAudioPayloadClass parent_class; GstRTPBaseAudioPayloadClass parent_class;
}; };
GType gst_rtp_L16_pay_get_type (void); GType gst_rtp_L16_pay_get_type (void);

View file

@ -47,21 +47,21 @@ GST_STATIC_PAD_TEMPLATE ("sink",
"encoding-name = (string) \"AC3\"") "encoding-name = (string) \"AC3\"")
); );
G_DEFINE_TYPE (GstRtpAC3Depay, gst_rtp_ac3_depay, GST_TYPE_BASE_RTP_DEPAYLOAD); G_DEFINE_TYPE (GstRtpAC3Depay, gst_rtp_ac3_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
static gboolean gst_rtp_ac3_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_ac3_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
static GstBuffer *gst_rtp_ac3_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_ac3_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static void static void
gst_rtp_ac3_depay_class_init (GstRtpAC3DepayClass * klass) gst_rtp_ac3_depay_class_init (GstRtpAC3DepayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_ac3_depay_src_template)); gst_static_pad_template_get (&gst_rtp_ac3_depay_src_template));
@ -73,8 +73,8 @@ gst_rtp_ac3_depay_class_init (GstRtpAC3DepayClass * klass)
"Extracts AC3 audio from RTP packets (RFC 4184)", "Extracts AC3 audio from RTP packets (RFC 4184)",
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gstbasertpdepayload_class->set_caps = gst_rtp_ac3_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_ac3_depay_setcaps;
gstbasertpdepayload_class->process = gst_rtp_ac3_depay_process; gstrtpbasedepayload_class->process = gst_rtp_ac3_depay_process;
GST_DEBUG_CATEGORY_INIT (rtpac3depay_debug, "rtpac3depay", 0, GST_DEBUG_CATEGORY_INIT (rtpac3depay_debug, "rtpac3depay", 0,
"AC3 Audio RTP Depayloader"); "AC3 Audio RTP Depayloader");
@ -87,7 +87,7 @@ gst_rtp_ac3_depay_init (GstRtpAC3Depay * rtpac3depay)
} }
static gboolean static gboolean
gst_rtp_ac3_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_ac3_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstStructure *structure; GstStructure *structure;
gint clock_rate; gint clock_rate;
@ -155,7 +155,7 @@ static const struct frmsize_s frmsizecod_tbl[] = {
}; };
static GstBuffer * static GstBuffer *
gst_rtp_ac3_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_ac3_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpAC3Depay *rtpac3depay; GstRtpAC3Depay *rtpac3depay;
GstBuffer *outbuf; GstBuffer *outbuf;

View file

@ -41,12 +41,12 @@ typedef struct _GstRtpAC3DepayClass GstRtpAC3DepayClass;
struct _GstRtpAC3Depay struct _GstRtpAC3Depay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
}; };
struct _GstRtpAC3DepayClass struct _GstRtpAC3DepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_ac3_depay_get_type (void); GType gst_rtp_ac3_depay_get_type (void);

View file

@ -53,30 +53,30 @@ static void gst_rtp_ac3_pay_finalize (GObject * object);
static GstStateChangeReturn gst_rtp_ac3_pay_change_state (GstElement * element, static GstStateChangeReturn gst_rtp_ac3_pay_change_state (GstElement * element,
GstStateChange transition); GstStateChange transition);
static gboolean gst_rtp_ac3_pay_setcaps (GstBaseRTPPayload * payload, static gboolean gst_rtp_ac3_pay_setcaps (GstRTPBasePayload * payload,
GstCaps * caps); GstCaps * caps);
static gboolean gst_rtp_ac3_pay_handle_event (GstBaseRTPPayload * payload, static gboolean gst_rtp_ac3_pay_handle_event (GstRTPBasePayload * payload,
GstEvent * event); GstEvent * event);
static GstFlowReturn gst_rtp_ac3_pay_flush (GstRtpAC3Pay * rtpac3pay); static GstFlowReturn gst_rtp_ac3_pay_flush (GstRtpAC3Pay * rtpac3pay);
static GstFlowReturn gst_rtp_ac3_pay_handle_buffer (GstBaseRTPPayload * payload, static GstFlowReturn gst_rtp_ac3_pay_handle_buffer (GstRTPBasePayload * payload,
GstBuffer * buffer); GstBuffer * buffer);
#define gst_rtp_ac3_pay_parent_class parent_class #define gst_rtp_ac3_pay_parent_class parent_class
G_DEFINE_TYPE (GstRtpAC3Pay, gst_rtp_ac3_pay, GST_TYPE_BASE_RTP_PAYLOAD); G_DEFINE_TYPE (GstRtpAC3Pay, gst_rtp_ac3_pay, GST_TYPE_RTP_BASE_PAYLOAD);
static void static void
gst_rtp_ac3_pay_class_init (GstRtpAC3PayClass * klass) gst_rtp_ac3_pay_class_init (GstRtpAC3PayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
GST_DEBUG_CATEGORY_INIT (rtpac3pay_debug, "rtpac3pay", 0, GST_DEBUG_CATEGORY_INIT (rtpac3pay_debug, "rtpac3pay", 0,
"AC3 Audio RTP Depayloader"); "AC3 Audio RTP Depayloader");
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gobject_class->finalize = gst_rtp_ac3_pay_finalize; gobject_class->finalize = gst_rtp_ac3_pay_finalize;
@ -92,9 +92,9 @@ gst_rtp_ac3_pay_class_init (GstRtpAC3PayClass * klass)
"Payload AC3 audio as RTP packets (RFC 4184)", "Payload AC3 audio as RTP packets (RFC 4184)",
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gstbasertppayload_class->set_caps = gst_rtp_ac3_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_ac3_pay_setcaps;
gstbasertppayload_class->handle_event = gst_rtp_ac3_pay_handle_event; gstrtpbasepayload_class->handle_event = gst_rtp_ac3_pay_handle_event;
gstbasertppayload_class->handle_buffer = gst_rtp_ac3_pay_handle_buffer; gstrtpbasepayload_class->handle_buffer = gst_rtp_ac3_pay_handle_buffer;
} }
static void static void
@ -125,7 +125,7 @@ gst_rtp_ac3_pay_reset (GstRtpAC3Pay * pay)
} }
static gboolean static gboolean
gst_rtp_ac3_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps) gst_rtp_ac3_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
{ {
gboolean res; gboolean res;
gint rate; gint rate;
@ -136,14 +136,14 @@ gst_rtp_ac3_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
if (!gst_structure_get_int (structure, "rate", &rate)) if (!gst_structure_get_int (structure, "rate", &rate))
rate = 90000; /* default */ rate = 90000; /* default */
gst_base_rtp_payload_set_options (payload, "audio", TRUE, "AC3", rate); gst_rtp_base_payload_set_options (payload, "audio", TRUE, "AC3", rate);
res = gst_base_rtp_payload_set_outcaps (payload, NULL); res = gst_rtp_base_payload_set_outcaps (payload, NULL);
return res; return res;
} }
static gboolean static gboolean
gst_rtp_ac3_pay_handle_event (GstBaseRTPPayload * payload, GstEvent * event) gst_rtp_ac3_pay_handle_event (GstRTPBasePayload * payload, GstEvent * event)
{ {
gboolean res; gboolean res;
GstRtpAC3Pay *rtpac3pay; GstRtpAC3Pay *rtpac3pay;
@ -163,7 +163,7 @@ gst_rtp_ac3_pay_handle_event (GstBaseRTPPayload * payload, GstEvent * event)
} }
res = res =
GST_BASE_RTP_PAYLOAD_CLASS (parent_class)->handle_event (payload, event); GST_RTP_BASE_PAYLOAD_CLASS (parent_class)->handle_event (payload, event);
return res; return res;
} }
@ -235,7 +235,7 @@ gst_rtp_ac3_pay_flush (GstRtpAC3Pay * rtpac3pay)
/* number of frames */ /* number of frames */
NF = rtpac3pay->NF; NF = rtpac3pay->NF;
mtu = GST_BASE_RTP_PAYLOAD_MTU (rtpac3pay); mtu = GST_RTP_BASE_PAYLOAD_MTU (rtpac3pay);
GST_LOG_OBJECT (rtpac3pay, "flushing %u bytes", avail); GST_LOG_OBJECT (rtpac3pay, "flushing %u bytes", avail);
@ -310,14 +310,14 @@ gst_rtp_ac3_pay_flush (GstRtpAC3Pay * rtpac3pay)
GST_BUFFER_TIMESTAMP (outbuf) = rtpac3pay->first_ts; GST_BUFFER_TIMESTAMP (outbuf) = rtpac3pay->first_ts;
GST_BUFFER_DURATION (outbuf) = rtpac3pay->duration; GST_BUFFER_DURATION (outbuf) = rtpac3pay->duration;
ret = gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtpac3pay), outbuf); ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpac3pay), outbuf);
} }
return ret; return ret;
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_ac3_pay_handle_buffer (GstBaseRTPPayload * basepayload, gst_rtp_ac3_pay_handle_buffer (GstRTPBasePayload * basepayload,
GstBuffer * buffer) GstBuffer * buffer)
{ {
GstRtpAC3Pay *rtpac3pay; GstRtpAC3Pay *rtpac3pay;
@ -385,7 +385,7 @@ gst_rtp_ac3_pay_handle_buffer (GstBaseRTPPayload * basepayload,
/* if this buffer is going to overflow the packet, flush what we /* if this buffer is going to overflow the packet, flush what we
* have. */ * have. */
if (gst_base_rtp_payload_is_filled (basepayload, if (gst_rtp_base_payload_is_filled (basepayload,
packet_len, rtpac3pay->duration + duration)) { packet_len, rtpac3pay->duration + duration)) {
ret = gst_rtp_ac3_pay_flush (rtpac3pay); ret = gst_rtp_ac3_pay_flush (rtpac3pay);
avail = 0; avail = 0;

View file

@ -42,7 +42,7 @@ typedef struct _GstRtpAC3PayClass GstRtpAC3PayClass;
struct _GstRtpAC3Pay struct _GstRtpAC3Pay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
GstAdapter *adapter; GstAdapter *adapter;
GstClockTime first_ts; GstClockTime first_ts;
@ -52,7 +52,7 @@ struct _GstRtpAC3Pay
struct _GstRtpAC3PayClass struct _GstRtpAC3PayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
GType gst_rtp_ac3_pay_get_type (void); GType gst_rtp_ac3_pay_get_type (void);

View file

@ -106,22 +106,22 @@ static GstStaticPadTemplate gst_rtp_amr_depay_src_template =
"audio/AMR-WB, " "channels = (int) 1," "rate = (int) 16000") "audio/AMR-WB, " "channels = (int) 1," "rate = (int) 16000")
); );
static gboolean gst_rtp_amr_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_amr_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
static GstBuffer *gst_rtp_amr_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_amr_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
#define gst_rtp_amr_depay_parent_class parent_class #define gst_rtp_amr_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpAMRDepay, gst_rtp_amr_depay, GST_TYPE_BASE_RTP_DEPAYLOAD); G_DEFINE_TYPE (GstRtpAMRDepay, gst_rtp_amr_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
static void static void
gst_rtp_amr_depay_class_init (GstRtpAMRDepayClass * klass) gst_rtp_amr_depay_class_init (GstRtpAMRDepayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_amr_depay_src_template)); gst_static_pad_template_get (&gst_rtp_amr_depay_src_template));
@ -133,8 +133,8 @@ gst_rtp_amr_depay_class_init (GstRtpAMRDepayClass * klass)
"Extracts AMR or AMR-WB audio from RTP packets (RFC 3267)", "Extracts AMR or AMR-WB audio from RTP packets (RFC 3267)",
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gstbasertpdepayload_class->process = gst_rtp_amr_depay_process; gstrtpbasedepayload_class->process = gst_rtp_amr_depay_process;
gstbasertpdepayload_class->set_caps = gst_rtp_amr_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_amr_depay_setcaps;
GST_DEBUG_CATEGORY_INIT (rtpamrdepay_debug, "rtpamrdepay", 0, GST_DEBUG_CATEGORY_INIT (rtpamrdepay_debug, "rtpamrdepay", 0,
"AMR/AMR-WB RTP Depayloader"); "AMR/AMR-WB RTP Depayloader");
@ -143,15 +143,15 @@ gst_rtp_amr_depay_class_init (GstRtpAMRDepayClass * klass)
static void static void
gst_rtp_amr_depay_init (GstRtpAMRDepay * rtpamrdepay) gst_rtp_amr_depay_init (GstRtpAMRDepay * rtpamrdepay)
{ {
GstBaseRTPDepayload *depayload; GstRTPBaseDepayload *depayload;
depayload = GST_BASE_RTP_DEPAYLOAD (rtpamrdepay); depayload = GST_RTP_BASE_DEPAYLOAD (rtpamrdepay);
gst_pad_use_fixed_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload)); gst_pad_use_fixed_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload));
} }
static gboolean static gboolean
gst_rtp_amr_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_amr_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstStructure *structure; GstStructure *structure;
GstCaps *srccaps; GstCaps *srccaps;
@ -241,7 +241,7 @@ gst_rtp_amr_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
srccaps = gst_caps_new_simple (type, srccaps = gst_caps_new_simple (type,
"channels", G_TYPE_INT, rtpamrdepay->channels, "channels", G_TYPE_INT, rtpamrdepay->channels,
"rate", G_TYPE_INT, clock_rate, NULL); "rate", G_TYPE_INT, clock_rate, NULL);
res = gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload), srccaps); res = gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload), srccaps);
gst_caps_unref (srccaps); gst_caps_unref (srccaps);
return res; return res;
@ -266,7 +266,7 @@ static const gint wb_frame_size[16] = {
}; };
static GstBuffer * static GstBuffer *
gst_rtp_amr_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_amr_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpAMRDepay *rtpamrdepay; GstRtpAMRDepay *rtpamrdepay;
const gint *frame_size; const gint *frame_size;

View file

@ -47,7 +47,7 @@ typedef enum {
struct _GstRtpAMRDepay struct _GstRtpAMRDepay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
GstRtpAMRDepayMode mode; GstRtpAMRDepayMode mode;
@ -65,7 +65,7 @@ struct _GstRtpAMRDepay
struct _GstRtpAMRDepayClass struct _GstRtpAMRDepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_amr_depay_get_type (void); GType gst_rtp_amr_depay_get_type (void);

View file

@ -85,25 +85,25 @@ static GstStaticPadTemplate gst_rtp_amr_pay_src_template =
"maxptime = (int) [ 20, MAX ], " "ptime = (int) [ 20, MAX ]") "maxptime = (int) [ 20, MAX ], " "ptime = (int) [ 20, MAX ]")
); );
static gboolean gst_rtp_amr_pay_setcaps (GstBaseRTPPayload * basepayload, static gboolean gst_rtp_amr_pay_setcaps (GstRTPBasePayload * basepayload,
GstCaps * caps); GstCaps * caps);
static GstFlowReturn gst_rtp_amr_pay_handle_buffer (GstBaseRTPPayload * pad, static GstFlowReturn gst_rtp_amr_pay_handle_buffer (GstRTPBasePayload * pad,
GstBuffer * buffer); GstBuffer * buffer);
static GstStateChangeReturn static GstStateChangeReturn
gst_rtp_amr_pay_change_state (GstElement * element, GstStateChange transition); gst_rtp_amr_pay_change_state (GstElement * element, GstStateChange transition);
#define gst_rtp_amr_pay_parent_class parent_class #define gst_rtp_amr_pay_parent_class parent_class
G_DEFINE_TYPE (GstRtpAMRPay, gst_rtp_amr_pay, GST_TYPE_BASE_RTP_PAYLOAD); G_DEFINE_TYPE (GstRtpAMRPay, gst_rtp_amr_pay, GST_TYPE_RTP_BASE_PAYLOAD);
static void static void
gst_rtp_amr_pay_class_init (GstRtpAMRPayClass * klass) gst_rtp_amr_pay_class_init (GstRtpAMRPayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gstelement_class->change_state = gst_rtp_amr_pay_change_state; gstelement_class->change_state = gst_rtp_amr_pay_change_state;
@ -117,8 +117,8 @@ gst_rtp_amr_pay_class_init (GstRtpAMRPayClass * klass)
"Payload-encode AMR or AMR-WB audio into RTP packets (RFC 3267)", "Payload-encode AMR or AMR-WB audio into RTP packets (RFC 3267)",
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gstbasertppayload_class->set_caps = gst_rtp_amr_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_amr_pay_setcaps;
gstbasertppayload_class->handle_buffer = gst_rtp_amr_pay_handle_buffer; gstrtpbasepayload_class->handle_buffer = gst_rtp_amr_pay_handle_buffer;
GST_DEBUG_CATEGORY_INIT (rtpamrpay_debug, "rtpamrpay", 0, GST_DEBUG_CATEGORY_INIT (rtpamrpay_debug, "rtpamrpay", 0,
"AMR/AMR-WB RTP Payloader"); "AMR/AMR-WB RTP Payloader");
@ -138,7 +138,7 @@ gst_rtp_amr_pay_reset (GstRtpAMRPay * pay)
} }
static gboolean static gboolean
gst_rtp_amr_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps) gst_rtp_amr_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
{ {
GstRtpAMRPay *rtpamrpay; GstRtpAMRPay *rtpamrpay;
gboolean res; gboolean res;
@ -160,12 +160,12 @@ gst_rtp_amr_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
goto wrong_type; goto wrong_type;
if (rtpamrpay->mode == GST_RTP_AMR_P_MODE_NB) if (rtpamrpay->mode == GST_RTP_AMR_P_MODE_NB)
gst_base_rtp_payload_set_options (basepayload, "audio", TRUE, "AMR", 8000); gst_rtp_base_payload_set_options (basepayload, "audio", TRUE, "AMR", 8000);
else else
gst_base_rtp_payload_set_options (basepayload, "audio", TRUE, "AMR-WB", gst_rtp_base_payload_set_options (basepayload, "audio", TRUE, "AMR-WB",
16000); 16000);
res = gst_base_rtp_payload_set_outcaps (basepayload, res = gst_rtp_base_payload_set_outcaps (basepayload,
"encoding-params", G_TYPE_STRING, "1", "octet-align", G_TYPE_STRING, "1", "encoding-params", G_TYPE_STRING, "1", "octet-align", G_TYPE_STRING, "1",
/* don't set the defaults /* don't set the defaults
* *
@ -221,7 +221,7 @@ static const gint wb_frame_size[16] = {
}; };
static GstFlowReturn static GstFlowReturn
gst_rtp_amr_pay_handle_buffer (GstBaseRTPPayload * basepayload, gst_rtp_amr_pay_handle_buffer (GstRTPBasePayload * basepayload,
GstBuffer * buffer) GstBuffer * buffer)
{ {
GstRtpAMRPay *rtpamrpay; GstRtpAMRPay *rtpamrpay;
@ -239,7 +239,7 @@ gst_rtp_amr_pay_handle_buffer (GstBaseRTPPayload * basepayload,
GstRTPBuffer rtp = { NULL }; GstRTPBuffer rtp = { NULL };
rtpamrpay = GST_RTP_AMR_PAY (basepayload); rtpamrpay = GST_RTP_AMR_PAY (basepayload);
mtu = GST_BASE_RTP_PAYLOAD_MTU (rtpamrpay); mtu = GST_RTP_BASE_PAYLOAD_MTU (rtpamrpay);
data = gst_buffer_map (buffer, &size, NULL, GST_MAP_READ); data = gst_buffer_map (buffer, &size, NULL, GST_MAP_READ);
@ -376,7 +376,7 @@ gst_rtp_amr_pay_handle_buffer (GstBaseRTPPayload * basepayload,
gst_rtp_buffer_unmap (&rtp); gst_rtp_buffer_unmap (&rtp);
ret = gst_base_rtp_payload_push (basepayload, outbuf); ret = gst_rtp_base_payload_push (basepayload, outbuf);
return ret; return ret;

View file

@ -48,7 +48,7 @@ typedef enum {
struct _GstRtpAMRPay struct _GstRtpAMRPay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
GstRtpAMRPayMode mode; GstRtpAMRPayMode mode;
GstClockTime first_ts; GstClockTime first_ts;
@ -58,7 +58,7 @@ struct _GstRtpAMRPay
struct _GstRtpAMRPayClass struct _GstRtpAMRPayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
GType gst_rtp_amr_pay_get_type (void); GType gst_rtp_amr_pay_get_type (void);

View file

@ -49,22 +49,22 @@ GST_STATIC_PAD_TEMPLATE ("src",
GST_STATIC_CAPS ("audio/x-bv, " "mode = (int) { 16, 32 }") GST_STATIC_CAPS ("audio/x-bv, " "mode = (int) { 16, 32 }")
); );
static GstBuffer *gst_rtp_bv_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_bv_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static gboolean gst_rtp_bv_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_bv_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
#define gst_rtp_bv_depay_parent_class parent_class #define gst_rtp_bv_depay_parent_class parent_class
G_DEFINE_TYPE (GstRTPBVDepay, gst_rtp_bv_depay, GST_TYPE_BASE_RTP_DEPAYLOAD); G_DEFINE_TYPE (GstRTPBVDepay, gst_rtp_bv_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
static void static void
gst_rtp_bv_depay_class_init (GstRTPBVDepayClass * klass) gst_rtp_bv_depay_class_init (GstRTPBVDepayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_bv_depay_src_template)); gst_static_pad_template_get (&gst_rtp_bv_depay_src_template));
@ -76,8 +76,8 @@ gst_rtp_bv_depay_class_init (GstRTPBVDepayClass * klass)
"Extracts BroadcomVoice audio from RTP packets (RFC 4298)", "Extracts BroadcomVoice audio from RTP packets (RFC 4298)",
"Wim Taymans <wim.taymans@collabora.co.uk>"); "Wim Taymans <wim.taymans@collabora.co.uk>");
gstbasertpdepayload_class->process = gst_rtp_bv_depay_process; gstrtpbasedepayload_class->process = gst_rtp_bv_depay_process;
gstbasertpdepayload_class->set_caps = gst_rtp_bv_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_bv_depay_setcaps;
} }
static void static void
@ -87,7 +87,7 @@ gst_rtp_bv_depay_init (GstRTPBVDepay * rtpbvdepay)
} }
static gboolean static gboolean
gst_rtp_bv_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_bv_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstRTPBVDepay *rtpbvdepay = GST_RTP_BV_DEPAY (depayload); GstRTPBVDepay *rtpbvdepay = GST_RTP_BV_DEPAY (depayload);
GstCaps *srccaps; GstCaps *srccaps;
@ -121,7 +121,7 @@ gst_rtp_bv_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
srccaps = gst_caps_new_simple ("audio/x-bv", srccaps = gst_caps_new_simple ("audio/x-bv",
"mode", G_TYPE_INT, rtpbvdepay->mode, NULL); "mode", G_TYPE_INT, rtpbvdepay->mode, NULL);
ret = gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload), srccaps); ret = gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload), srccaps);
GST_DEBUG ("set caps on source: %" GST_PTR_FORMAT " (ret=%d)", srccaps, ret); GST_DEBUG ("set caps on source: %" GST_PTR_FORMAT " (ret=%d)", srccaps, ret);
gst_caps_unref (srccaps); gst_caps_unref (srccaps);
@ -149,7 +149,7 @@ wrong_rate:
} }
static GstBuffer * static GstBuffer *
gst_rtp_bv_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_bv_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstBuffer *outbuf; GstBuffer *outbuf;
gboolean marker; gboolean marker;

View file

@ -41,14 +41,14 @@ typedef struct _GstRTPBVDepayClass GstRTPBVDepayClass;
struct _GstRTPBVDepay struct _GstRTPBVDepay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
gint mode; gint mode;
}; };
struct _GstRTPBVDepayClass struct _GstRTPBVDepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_bv_depay_get_type (void); GType gst_rtp_bv_depay_get_type (void);

View file

@ -53,25 +53,25 @@ static GstStaticPadTemplate gst_rtp_bv_pay_src_template =
); );
static GstCaps *gst_rtp_bv_pay_sink_getcaps (GstBaseRTPPayload * payload, static GstCaps *gst_rtp_bv_pay_sink_getcaps (GstRTPBasePayload * payload,
GstPad * pad, GstCaps * filter); GstPad * pad, GstCaps * filter);
static gboolean gst_rtp_bv_pay_sink_setcaps (GstBaseRTPPayload * payload, static gboolean gst_rtp_bv_pay_sink_setcaps (GstRTPBasePayload * payload,
GstCaps * caps); GstCaps * caps);
#define gst_rtp_bv_pay_parent_class parent_class #define gst_rtp_bv_pay_parent_class parent_class
G_DEFINE_TYPE (GstRTPBVPay, gst_rtp_bv_pay, GST_TYPE_BASE_RTP_AUDIO_PAYLOAD); G_DEFINE_TYPE (GstRTPBVPay, gst_rtp_bv_pay, GST_TYPE_RTP_BASE_AUDIO_PAYLOAD);
static void static void
gst_rtp_bv_pay_class_init (GstRTPBVPayClass * klass) gst_rtp_bv_pay_class_init (GstRTPBVPayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
GST_DEBUG_CATEGORY_INIT (rtpbvpay_debug, "rtpbvpay", 0, GST_DEBUG_CATEGORY_INIT (rtpbvpay_debug, "rtpbvpay", 0,
"BroadcomVoice audio RTP payloader"); "BroadcomVoice audio RTP payloader");
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_bv_pay_sink_template)); gst_static_pad_template_get (&gst_rtp_bv_pay_sink_template));
@ -83,34 +83,34 @@ gst_rtp_bv_pay_class_init (GstRTPBVPayClass * klass)
"Packetize BroadcomVoice audio streams into RTP packets (RFC 4298)", "Packetize BroadcomVoice audio streams into RTP packets (RFC 4298)",
"Wim Taymans <wim.taymans@collabora.co.uk>"); "Wim Taymans <wim.taymans@collabora.co.uk>");
gstbasertppayload_class->set_caps = gst_rtp_bv_pay_sink_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_bv_pay_sink_setcaps;
gstbasertppayload_class->get_caps = gst_rtp_bv_pay_sink_getcaps; gstrtpbasepayload_class->get_caps = gst_rtp_bv_pay_sink_getcaps;
} }
static void static void
gst_rtp_bv_pay_init (GstRTPBVPay * rtpbvpay) gst_rtp_bv_pay_init (GstRTPBVPay * rtpbvpay)
{ {
GstBaseRTPAudioPayload *basertpaudiopayload; GstRTPBaseAudioPayload *rtpbaseaudiopayload;
basertpaudiopayload = GST_BASE_RTP_AUDIO_PAYLOAD (rtpbvpay); rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (rtpbvpay);
rtpbvpay->mode = -1; rtpbvpay->mode = -1;
/* tell basertpaudiopayload that this is a frame based codec */ /* tell rtpbaseaudiopayload that this is a frame based codec */
gst_base_rtp_audio_payload_set_frame_based (basertpaudiopayload); gst_rtp_base_audio_payload_set_frame_based (rtpbaseaudiopayload);
} }
static gboolean static gboolean
gst_rtp_bv_pay_sink_setcaps (GstBaseRTPPayload * basertppayload, GstCaps * caps) gst_rtp_bv_pay_sink_setcaps (GstRTPBasePayload * rtpbasepayload, GstCaps * caps)
{ {
GstRTPBVPay *rtpbvpay; GstRTPBVPay *rtpbvpay;
GstBaseRTPAudioPayload *basertpaudiopayload; GstRTPBaseAudioPayload *rtpbaseaudiopayload;
gint mode; gint mode;
GstStructure *structure; GstStructure *structure;
const char *payload_name; const char *payload_name;
rtpbvpay = GST_RTP_BV_PAY (basertppayload); rtpbvpay = GST_RTP_BV_PAY (rtpbasepayload);
basertpaudiopayload = GST_BASE_RTP_AUDIO_PAYLOAD (basertppayload); rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (rtpbasepayload);
structure = gst_caps_get_structure (caps, 0); structure = gst_caps_get_structure (caps, 0);
@ -125,17 +125,17 @@ gst_rtp_bv_pay_sink_setcaps (GstBaseRTPPayload * basertppayload, GstCaps * caps)
goto wrong_mode; goto wrong_mode;
if (mode == 16) { if (mode == 16) {
gst_base_rtp_payload_set_options (basertppayload, "audio", TRUE, "BV16", gst_rtp_base_payload_set_options (rtpbasepayload, "audio", TRUE, "BV16",
8000); 8000);
basertppayload->clock_rate = 8000; rtpbasepayload->clock_rate = 8000;
} else { } else {
gst_base_rtp_payload_set_options (basertppayload, "audio", TRUE, "BV32", gst_rtp_base_payload_set_options (rtpbasepayload, "audio", TRUE, "BV32",
16000); 16000);
basertppayload->clock_rate = 16000; rtpbasepayload->clock_rate = 16000;
} }
/* set options for this frame based audio codec */ /* set options for this frame based audio codec */
gst_base_rtp_audio_payload_set_frame_options (basertpaudiopayload, gst_rtp_base_audio_payload_set_frame_options (rtpbaseaudiopayload,
mode, mode == 16 ? 10 : 20); mode, mode == 16 ? 10 : 20);
if (mode != rtpbvpay->mode && rtpbvpay->mode != -1) if (mode != rtpbvpay->mode && rtpbvpay->mode != -1)
@ -173,7 +173,7 @@ mode_changed:
/* we return the padtemplate caps with the mode field fixated to a value if we /* we return the padtemplate caps with the mode field fixated to a value if we
* can */ * can */
static GstCaps * static GstCaps *
gst_rtp_bv_pay_sink_getcaps (GstBaseRTPPayload * rtppayload, GstPad * pad, gst_rtp_bv_pay_sink_getcaps (GstRTPBasePayload * rtppayload, GstPad * pad,
GstCaps * filter) GstCaps * filter)
{ {
GstCaps *otherpadcaps; GstCaps *otherpadcaps;

View file

@ -41,14 +41,14 @@ typedef struct _GstRTPBVPayClass GstRTPBVPayClass;
struct _GstRTPBVPay struct _GstRTPBVPay
{ {
GstBaseRTPAudioPayload audiopayload; GstRTPBaseAudioPayload audiopayload;
gint mode; gint mode;
}; };
struct _GstRTPBVPayClass struct _GstRTPBVPayClass
{ {
GstBaseRTPAudioPayloadClass parent_class; GstRTPBaseAudioPayloadClass parent_class;
}; };
GType gst_rtp_bv_pay_get_type (void); GType gst_rtp_bv_pay_get_type (void);

View file

@ -65,26 +65,26 @@ GST_STATIC_PAD_TEMPLATE ("src",
GST_STATIC_CAPS ("audio/x-celt") GST_STATIC_CAPS ("audio/x-celt")
); );
static GstBuffer *gst_rtp_celt_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_celt_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static gboolean gst_rtp_celt_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_celt_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
#define gst_rtp_celt_depay_parent_class parent_class #define gst_rtp_celt_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpCELTDepay, gst_rtp_celt_depay, G_DEFINE_TYPE (GstRtpCELTDepay, gst_rtp_celt_depay,
GST_TYPE_BASE_RTP_DEPAYLOAD); GST_TYPE_RTP_BASE_DEPAYLOAD);
static void static void
gst_rtp_celt_depay_class_init (GstRtpCELTDepayClass * klass) gst_rtp_celt_depay_class_init (GstRtpCELTDepayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
GST_DEBUG_CATEGORY_INIT (rtpceltdepay_debug, "rtpceltdepay", 0, GST_DEBUG_CATEGORY_INIT (rtpceltdepay_debug, "rtpceltdepay", 0,
"CELT RTP Depayloader"); "CELT RTP Depayloader");
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_celt_depay_src_template)); gst_static_pad_template_get (&gst_rtp_celt_depay_src_template));
@ -96,8 +96,8 @@ gst_rtp_celt_depay_class_init (GstRtpCELTDepayClass * klass)
"Extracts CELT audio from RTP packets", "Extracts CELT audio from RTP packets",
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gstbasertpdepayload_class->process = gst_rtp_celt_depay_process; gstrtpbasedepayload_class->process = gst_rtp_celt_depay_process;
gstbasertpdepayload_class->set_caps = gst_rtp_celt_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_celt_depay_setcaps;
} }
static void static void
@ -113,7 +113,7 @@ static const gchar gst_rtp_celt_comment[] =
"\045\0\0\0Depayloaded with GStreamer celtdepay\0\0\0\0"; "\045\0\0\0Depayloaded with GStreamer celtdepay\0\0\0\0";
static gboolean static gboolean
gst_rtp_celt_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_celt_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstStructure *structure; GstStructure *structure;
GstRtpCELTDepay *rtpceltdepay; GstRtpCELTDepay *rtpceltdepay;
@ -175,12 +175,12 @@ gst_rtp_celt_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
res = gst_pad_set_caps (depayload->srcpad, srccaps); res = gst_pad_set_caps (depayload->srcpad, srccaps);
gst_caps_unref (srccaps); gst_caps_unref (srccaps);
gst_base_rtp_depayload_push (GST_BASE_RTP_DEPAYLOAD (rtpceltdepay), buf); gst_rtp_base_depayload_push (GST_RTP_BASE_DEPAYLOAD (rtpceltdepay), buf);
buf = gst_buffer_new_and_alloc (sizeof (gst_rtp_celt_comment)); buf = gst_buffer_new_and_alloc (sizeof (gst_rtp_celt_comment));
gst_buffer_fill (buf, 0, gst_rtp_celt_comment, sizeof (gst_rtp_celt_comment)); gst_buffer_fill (buf, 0, gst_rtp_celt_comment, sizeof (gst_rtp_celt_comment));
gst_base_rtp_depayload_push (GST_BASE_RTP_DEPAYLOAD (rtpceltdepay), buf); gst_rtp_base_depayload_push (GST_RTP_BASE_DEPAYLOAD (rtpceltdepay), buf);
return res; return res;
@ -193,7 +193,7 @@ no_clockrate:
} }
static GstBuffer * static GstBuffer *
gst_rtp_celt_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_celt_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstBuffer *outbuf = NULL; GstBuffer *outbuf = NULL;
guint8 *payload; guint8 *payload;
@ -261,7 +261,7 @@ gst_rtp_celt_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf))); GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)));
gst_base_rtp_depayload_push (depayload, outbuf); gst_rtp_base_depayload_push (depayload, outbuf);
} }
gst_rtp_buffer_unmap (&rtp); gst_rtp_buffer_unmap (&rtp);

View file

@ -36,13 +36,13 @@ typedef struct _GstRtpCELTDepayClass GstRtpCELTDepayClass;
struct _GstRtpCELTDepay struct _GstRtpCELTDepay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
gint frame_size; gint frame_size;
}; };
struct _GstRtpCELTDepayClass struct _GstRtpCELTDepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_celt_depay_get_type (void); GType gst_rtp_celt_depay_get_type (void);

View file

@ -55,29 +55,29 @@ static void gst_rtp_celt_pay_finalize (GObject * object);
static GstStateChangeReturn gst_rtp_celt_pay_change_state (GstElement * static GstStateChangeReturn gst_rtp_celt_pay_change_state (GstElement *
element, GstStateChange transition); element, GstStateChange transition);
static gboolean gst_rtp_celt_pay_setcaps (GstBaseRTPPayload * payload, static gboolean gst_rtp_celt_pay_setcaps (GstRTPBasePayload * payload,
GstCaps * caps); GstCaps * caps);
static GstCaps *gst_rtp_celt_pay_getcaps (GstBaseRTPPayload * payload, static GstCaps *gst_rtp_celt_pay_getcaps (GstRTPBasePayload * payload,
GstPad * pad, GstCaps * filter); GstPad * pad, GstCaps * filter);
static GstFlowReturn gst_rtp_celt_pay_handle_buffer (GstBaseRTPPayload * static GstFlowReturn gst_rtp_celt_pay_handle_buffer (GstRTPBasePayload *
payload, GstBuffer * buffer); payload, GstBuffer * buffer);
#define gst_rtp_celt_pay_parent_class parent_class #define gst_rtp_celt_pay_parent_class parent_class
G_DEFINE_TYPE (GstRtpCELTPay, gst_rtp_celt_pay, GST_TYPE_BASE_RTP_PAYLOAD); G_DEFINE_TYPE (GstRtpCELTPay, gst_rtp_celt_pay, GST_TYPE_RTP_BASE_PAYLOAD);
static void static void
gst_rtp_celt_pay_class_init (GstRtpCELTPayClass * klass) gst_rtp_celt_pay_class_init (GstRtpCELTPayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
GST_DEBUG_CATEGORY_INIT (rtpceltpay_debug, "rtpceltpay", 0, GST_DEBUG_CATEGORY_INIT (rtpceltpay_debug, "rtpceltpay", 0,
"CELT RTP Payloader"); "CELT RTP Payloader");
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gobject_class->finalize = gst_rtp_celt_pay_finalize; gobject_class->finalize = gst_rtp_celt_pay_finalize;
@ -93,9 +93,9 @@ gst_rtp_celt_pay_class_init (GstRtpCELTPayClass * klass)
"Payload-encodes CELT audio into a RTP packet", "Payload-encodes CELT audio into a RTP packet",
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gstbasertppayload_class->set_caps = gst_rtp_celt_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_celt_pay_setcaps;
gstbasertppayload_class->get_caps = gst_rtp_celt_pay_getcaps; gstrtpbasepayload_class->get_caps = gst_rtp_celt_pay_getcaps;
gstbasertppayload_class->handle_buffer = gst_rtp_celt_pay_handle_buffer; gstrtpbasepayload_class->handle_buffer = gst_rtp_celt_pay_handle_buffer;
} }
static void static void
@ -149,7 +149,7 @@ gst_rtp_celt_pay_add_queued (GstRtpCELTPay * rtpceltpay, GstBuffer * buffer,
} }
static gboolean static gboolean
gst_rtp_celt_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps) gst_rtp_celt_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
{ {
/* don't configure yet, we wait for the ident packet */ /* don't configure yet, we wait for the ident packet */
return TRUE; return TRUE;
@ -157,7 +157,7 @@ gst_rtp_celt_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
static GstCaps * static GstCaps *
gst_rtp_celt_pay_getcaps (GstBaseRTPPayload * payload, GstPad * pad, gst_rtp_celt_pay_getcaps (GstRTPBasePayload * payload, GstPad * pad,
GstCaps * filter) GstCaps * filter)
{ {
GstCaps *otherpadcaps; GstCaps *otherpadcaps;
@ -202,7 +202,7 @@ gst_rtp_celt_pay_parse_ident (GstRtpCELTPay * rtpceltpay,
{ {
guint32 version, header_size, rate, nb_channels, frame_size, overlap; guint32 version, header_size, rate, nb_channels, frame_size, overlap;
guint32 bytes_per_packet; guint32 bytes_per_packet;
GstBaseRTPPayload *payload; GstRTPBasePayload *payload;
gchar *cstr, *fsstr; gchar *cstr, *fsstr;
gboolean res; gboolean res;
@ -249,12 +249,12 @@ gst_rtp_celt_pay_parse_ident (GstRtpCELTPay * rtpceltpay,
GST_DEBUG_OBJECT (rtpceltpay, "overlap %d, bytes_per_packet %d", GST_DEBUG_OBJECT (rtpceltpay, "overlap %d, bytes_per_packet %d",
overlap, bytes_per_packet); overlap, bytes_per_packet);
payload = GST_BASE_RTP_PAYLOAD (rtpceltpay); payload = GST_RTP_BASE_PAYLOAD (rtpceltpay);
gst_base_rtp_payload_set_options (payload, "audio", FALSE, "CELT", rate); gst_rtp_base_payload_set_options (payload, "audio", FALSE, "CELT", rate);
cstr = g_strdup_printf ("%d", nb_channels); cstr = g_strdup_printf ("%d", nb_channels);
fsstr = g_strdup_printf ("%d", frame_size); fsstr = g_strdup_printf ("%d", frame_size);
res = gst_base_rtp_payload_set_outcaps (payload, "encoding-params", res = gst_rtp_base_payload_set_outcaps (payload, "encoding-params",
G_TYPE_STRING, cstr, "frame-size", G_TYPE_STRING, fsstr, NULL); G_TYPE_STRING, cstr, "frame-size", G_TYPE_STRING, fsstr, NULL);
g_free (cstr); g_free (cstr);
g_free (fsstr); g_free (fsstr);
@ -354,13 +354,13 @@ gst_rtp_celt_pay_flush_queued (GstRtpCELTPay * rtpceltpay)
rtpceltpay->sbytes = 0; rtpceltpay->sbytes = 0;
rtpceltpay->qduration = 0; rtpceltpay->qduration = 0;
ret = gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtpceltpay), outbuf); ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpceltpay), outbuf);
return ret; return ret;
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_celt_pay_handle_buffer (GstBaseRTPPayload * basepayload, gst_rtp_celt_pay_handle_buffer (GstRTPBasePayload * basepayload,
GstBuffer * buffer) GstBuffer * buffer)
{ {
GstFlowReturn ret; GstFlowReturn ret;
@ -415,7 +415,7 @@ gst_rtp_celt_pay_handle_buffer (GstBaseRTPPayload * basepayload,
packet_len = gst_rtp_buffer_calc_packet_len (payload_len, 0, 0); packet_len = gst_rtp_buffer_calc_packet_len (payload_len, 0, 0);
if (gst_base_rtp_payload_is_filled (basepayload, packet_len, packet_dur)) { if (gst_rtp_base_payload_is_filled (basepayload, packet_len, packet_dur)) {
/* size or duration would overflow the packet, flush the queued data */ /* size or duration would overflow the packet, flush the queued data */
ret = gst_rtp_celt_pay_flush_queued (rtpceltpay); ret = gst_rtp_celt_pay_flush_queued (rtpceltpay);
} }

View file

@ -37,7 +37,7 @@ typedef struct _GstRtpCELTPayClass GstRtpCELTPayClass;
struct _GstRtpCELTPay struct _GstRtpCELTPay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
guint64 packet; guint64 packet;
@ -50,7 +50,7 @@ struct _GstRtpCELTPay
struct _GstRtpCELTPayClass struct _GstRtpCELTPayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
GType gst_rtp_celt_pay_get_type (void); GType gst_rtp_celt_pay_get_type (void);

View file

@ -75,21 +75,21 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
static GstStateChangeReturn static GstStateChangeReturn
gst_rtp_dv_depay_change_state (GstElement * element, GstStateChange transition); gst_rtp_dv_depay_change_state (GstElement * element, GstStateChange transition);
static GstBuffer *gst_rtp_dv_depay_process (GstBaseRTPDepayload * base, static GstBuffer *gst_rtp_dv_depay_process (GstRTPBaseDepayload * base,
GstBuffer * in); GstBuffer * in);
static gboolean gst_rtp_dv_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_dv_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
#define gst_rtp_dv_depay_parent_class parent_class #define gst_rtp_dv_depay_parent_class parent_class
G_DEFINE_TYPE (GstRTPDVDepay, gst_rtp_dv_depay, GST_TYPE_BASE_RTP_DEPAYLOAD); G_DEFINE_TYPE (GstRTPDVDepay, gst_rtp_dv_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
static void static void
gst_rtp_dv_depay_class_init (GstRTPDVDepayClass * klass) gst_rtp_dv_depay_class_init (GstRTPDVDepayClass * klass)
{ {
GstElementClass *gstelement_class = (GstElementClass *) klass; GstElementClass *gstelement_class = (GstElementClass *) klass;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class = GstRTPBaseDepayloadClass *gstrtpbasedepayload_class =
(GstBaseRTPDepayloadClass *) klass; (GstRTPBaseDepayloadClass *) klass;
GST_DEBUG_CATEGORY_INIT (rtpdvdepay_debug, "rtpdvdepay", 0, GST_DEBUG_CATEGORY_INIT (rtpdvdepay_debug, "rtpdvdepay", 0,
"DV RTP Depayloader"); "DV RTP Depayloader");
@ -107,9 +107,9 @@ gst_rtp_dv_depay_class_init (GstRTPDVDepayClass * klass)
"Depayloads DV from RTP packets (RFC 3189)", "Depayloads DV from RTP packets (RFC 3189)",
"Marcel Moreaux <marcelm@spacelabs.nl>, Wim Taymans <wim.taymans@gmail.com>"); "Marcel Moreaux <marcelm@spacelabs.nl>, Wim Taymans <wim.taymans@gmail.com>");
gstbasertpdepayload_class->process = gstrtpbasedepayload_class->process =
GST_DEBUG_FUNCPTR (gst_rtp_dv_depay_process); GST_DEBUG_FUNCPTR (gst_rtp_dv_depay_process);
gstbasertpdepayload_class->set_caps = gstrtpbasedepayload_class->set_caps =
GST_DEBUG_FUNCPTR (gst_rtp_dv_depay_setcaps); GST_DEBUG_FUNCPTR (gst_rtp_dv_depay_setcaps);
} }
@ -159,7 +159,7 @@ parse_encode (GstRTPDVDepay * rtpdvdepay, const gchar * encode)
} }
static gboolean static gboolean
gst_rtp_dv_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_dv_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstStructure *structure; GstStructure *structure;
GstRTPDVDepay *rtpdvdepay; GstRTPDVDepay *rtpdvdepay;
@ -291,7 +291,7 @@ calculate_difblock_location (guint8 * block)
* NTSC. * NTSC.
*/ */
static GstBuffer * static GstBuffer *
gst_rtp_dv_depay_process (GstBaseRTPDepayload * base, GstBuffer * in) gst_rtp_dv_depay_process (GstRTPBaseDepayload * base, GstBuffer * in)
{ {
GstBuffer *out = NULL; GstBuffer *out = NULL;
guint8 *payload; guint8 *payload;

View file

@ -41,7 +41,7 @@ typedef struct _GstRTPDVDepayClass GstRTPDVDepayClass;
struct _GstRTPDVDepay struct _GstRTPDVDepay
{ {
GstBaseRTPDepayload parent; GstRTPBaseDepayload parent;
GstBuffer *acc; GstBuffer *acc;
guint frame_size; guint frame_size;
@ -54,7 +54,7 @@ struct _GstRTPDVDepay
struct _GstRTPDVDepayClass struct _GstRTPDVDepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_dv_depay_get_type (void); GType gst_rtp_dv_depay_get_type (void);

View file

@ -65,9 +65,9 @@ GST_STATIC_PAD_TEMPLATE ("src",
) )
); );
static gboolean gst_rtp_dv_pay_setcaps (GstBaseRTPPayload * payload, static gboolean gst_rtp_dv_pay_setcaps (GstRTPBasePayload * payload,
GstCaps * caps); GstCaps * caps);
static GstFlowReturn gst_rtp_dv_pay_handle_buffer (GstBaseRTPPayload * payload, static GstFlowReturn gst_rtp_dv_pay_handle_buffer (GstRTPBasePayload * payload,
GstBuffer * buffer); GstBuffer * buffer);
#define GST_TYPE_DV_PAY_MODE (gst_dv_pay_mode_get_type()) #define GST_TYPE_DV_PAY_MODE (gst_dv_pay_mode_get_type())
@ -95,20 +95,20 @@ static void gst_dv_pay_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec); guint prop_id, GValue * value, GParamSpec * pspec);
#define gst_rtp_dv_pay_parent_class parent_class #define gst_rtp_dv_pay_parent_class parent_class
G_DEFINE_TYPE (GstRTPDVPay, gst_rtp_dv_pay, GST_TYPE_BASE_RTP_PAYLOAD); G_DEFINE_TYPE (GstRTPDVPay, gst_rtp_dv_pay, GST_TYPE_RTP_BASE_PAYLOAD);
static void static void
gst_rtp_dv_pay_class_init (GstRTPDVPayClass * klass) gst_rtp_dv_pay_class_init (GstRTPDVPayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
GST_DEBUG_CATEGORY_INIT (rtpdvpay_debug, "rtpdvpay", 0, "DV RTP Payloader"); GST_DEBUG_CATEGORY_INIT (rtpdvpay_debug, "rtpdvpay", 0, "DV RTP Payloader");
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gobject_class->set_property = gst_dv_pay_set_property; gobject_class->set_property = gst_dv_pay_set_property;
gobject_class->get_property = gst_dv_pay_get_property; gobject_class->get_property = gst_dv_pay_get_property;
@ -129,8 +129,8 @@ gst_rtp_dv_pay_class_init (GstRTPDVPayClass * klass)
"Payloads DV into RTP packets (RFC 3189)", "Payloads DV into RTP packets (RFC 3189)",
"Marcel Moreaux <marcelm@spacelabs.nl>, Wim Taymans <wim.taymans@gmail.com>"); "Marcel Moreaux <marcelm@spacelabs.nl>, Wim Taymans <wim.taymans@gmail.com>");
gstbasertppayload_class->set_caps = gst_rtp_dv_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_dv_pay_setcaps;
gstbasertppayload_class->handle_buffer = gst_rtp_dv_pay_handle_buffer; gstrtpbasepayload_class->handle_buffer = gst_rtp_dv_pay_handle_buffer;
} }
static void static void
@ -171,7 +171,7 @@ gst_dv_pay_get_property (GObject * object,
} }
static gboolean static gboolean
gst_rtp_dv_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps) gst_rtp_dv_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
{ {
/* We don't do anything here, but we could check if it's a system stream and if /* We don't do anything here, but we could check if it's a system stream and if
* it's not, default to sending the video only. We will negotiate downstream * it's not, default to sending the video only. We will negotiate downstream
@ -221,15 +221,15 @@ gst_dv_pay_negotiate (GstRTPDVPay * rtpdvpay, guint8 * data, gsize size)
default: default:
break; break;
} }
gst_base_rtp_payload_set_options (GST_BASE_RTP_PAYLOAD (rtpdvpay), media, gst_rtp_base_payload_set_options (GST_RTP_BASE_PAYLOAD (rtpdvpay), media,
TRUE, "DV", 90000); TRUE, "DV", 90000);
if (audio_bundled) { if (audio_bundled) {
res = gst_base_rtp_payload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpdvpay), res = gst_rtp_base_payload_set_outcaps (GST_RTP_BASE_PAYLOAD (rtpdvpay),
"encode", G_TYPE_STRING, encode, "encode", G_TYPE_STRING, encode,
"audio", G_TYPE_STRING, "bundled", NULL); "audio", G_TYPE_STRING, "bundled", NULL);
} else { } else {
res = gst_base_rtp_payload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpdvpay), res = gst_rtp_base_payload_set_outcaps (GST_RTP_BASE_PAYLOAD (rtpdvpay),
"encode", G_TYPE_STRING, encode, NULL); "encode", G_TYPE_STRING, encode, NULL);
} }
return res; return res;
@ -274,7 +274,7 @@ include_dif (GstRTPDVPay * rtpdvpay, guint8 * data)
/* Get a DV frame, chop it up in pieces, and push the pieces to the RTP layer. /* Get a DV frame, chop it up in pieces, and push the pieces to the RTP layer.
*/ */
static GstFlowReturn static GstFlowReturn
gst_rtp_dv_pay_handle_buffer (GstBaseRTPPayload * basepayload, gst_rtp_dv_pay_handle_buffer (GstRTPBasePayload * basepayload,
GstBuffer * buffer) GstBuffer * buffer)
{ {
GstRTPDVPay *rtpdvpay; GstRTPDVPay *rtpdvpay;
@ -296,7 +296,7 @@ gst_rtp_dv_pay_handle_buffer (GstBaseRTPPayload * basepayload,
* Therefore, we round the available room down to the nearest multiple of 80. * Therefore, we round the available room down to the nearest multiple of 80.
* *
* The available room is just the packet MTU, minus the RTP header length. */ * The available room is just the packet MTU, minus the RTP header length. */
max_payload_size = ((GST_BASE_RTP_PAYLOAD_MTU (rtpdvpay) - hdrlen) / 80) * 80; max_payload_size = ((GST_RTP_BASE_PAYLOAD_MTU (rtpdvpay) - hdrlen) / 80) * 80;
/* The length of the buffer to transmit. */ /* The length of the buffer to transmit. */
data = gst_buffer_map (buffer, &size, NULL, GST_MAP_READ); data = gst_buffer_map (buffer, &size, NULL, GST_MAP_READ);
@ -360,7 +360,7 @@ gst_rtp_dv_pay_handle_buffer (GstBaseRTPPayload * basepayload,
/* Push out the created piece, and check for errors. */ /* Push out the created piece, and check for errors. */
gst_rtp_buffer_unmap (&rtp); gst_rtp_buffer_unmap (&rtp);
ret = gst_base_rtp_payload_push (basepayload, outbuf); ret = gst_rtp_base_payload_push (basepayload, outbuf);
if (ret != GST_FLOW_OK) if (ret != GST_FLOW_OK)
break; break;

View file

@ -49,7 +49,7 @@ typedef enum
struct _GstRTPDVPay struct _GstRTPDVPay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
gboolean negotiated; gboolean negotiated;
GstDVPayMode mode; GstDVPayMode mode;
@ -57,7 +57,7 @@ struct _GstRTPDVPay
struct _GstRTPDVPayClass struct _GstRTPDVPayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
GType gst_rtp_dv_pay_get_type (void); GType gst_rtp_dv_pay_get_type (void);

View file

@ -64,24 +64,24 @@ static GstStaticPadTemplate gst_rtp_g722_depay_sink_template =
#define gst_rtp_g722_depay_parent_class parent_class #define gst_rtp_g722_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpG722Depay, gst_rtp_g722_depay, G_DEFINE_TYPE (GstRtpG722Depay, gst_rtp_g722_depay,
GST_TYPE_BASE_RTP_DEPAYLOAD); GST_TYPE_RTP_BASE_DEPAYLOAD);
static gboolean gst_rtp_g722_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_g722_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
static GstBuffer *gst_rtp_g722_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_g722_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static void static void
gst_rtp_g722_depay_class_init (GstRtpG722DepayClass * klass) gst_rtp_g722_depay_class_init (GstRtpG722DepayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
GST_DEBUG_CATEGORY_INIT (rtpg722depay_debug, "rtpg722depay", 0, GST_DEBUG_CATEGORY_INIT (rtpg722depay_debug, "rtpg722depay", 0,
"G722 RTP Depayloader"); "G722 RTP Depayloader");
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_g722_depay_src_template)); gst_static_pad_template_get (&gst_rtp_g722_depay_src_template));
@ -93,8 +93,8 @@ gst_rtp_g722_depay_class_init (GstRtpG722DepayClass * klass)
"Extracts G722 audio from RTP packets", "Extracts G722 audio from RTP packets",
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gstbasertpdepayload_class->set_caps = gst_rtp_g722_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_g722_depay_setcaps;
gstbasertpdepayload_class->process = gst_rtp_g722_depay_process; gstrtpbasedepayload_class->process = gst_rtp_g722_depay_process;
} }
static void static void
@ -119,7 +119,7 @@ gst_rtp_g722_depay_parse_int (GstStructure * structure, const gchar * field,
} }
static gboolean static gboolean
gst_rtp_g722_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_g722_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstStructure *structure; GstStructure *structure;
GstRtpG722Depay *rtpg722depay; GstRtpG722Depay *rtpg722depay;
@ -212,7 +212,7 @@ no_clockrate:
} }
static GstBuffer * static GstBuffer *
gst_rtp_g722_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_g722_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpG722Depay *rtpg722depay; GstRtpG722Depay *rtpg722depay;
GstBuffer *outbuf; GstBuffer *outbuf;

View file

@ -43,7 +43,7 @@ typedef struct _GstRtpG722DepayClass GstRtpG722DepayClass;
/* Definition of structure storing data for this element. */ /* Definition of structure storing data for this element. */
struct _GstRtpG722Depay struct _GstRtpG722Depay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
guint rate; guint rate;
guint channels; guint channels;
@ -52,7 +52,7 @@ struct _GstRtpG722Depay
/* Standard definition defining a class for this element. */ /* Standard definition defining a class for this element. */
struct _GstRtpG722DepayClass struct _GstRtpG722DepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_g722_depay_get_type (void); GType gst_rtp_g722_depay_get_type (void);

View file

@ -51,26 +51,26 @@ GST_STATIC_PAD_TEMPLATE ("src",
"clock-rate = (int) 8000") "clock-rate = (int) 8000")
); );
static gboolean gst_rtp_g722_pay_setcaps (GstBaseRTPPayload * basepayload, static gboolean gst_rtp_g722_pay_setcaps (GstRTPBasePayload * basepayload,
GstCaps * caps); GstCaps * caps);
static GstCaps *gst_rtp_g722_pay_getcaps (GstBaseRTPPayload * rtppayload, static GstCaps *gst_rtp_g722_pay_getcaps (GstRTPBasePayload * rtppayload,
GstPad * pad, GstCaps * filter); GstPad * pad, GstCaps * filter);
#define gst_rtp_g722_pay_parent_class parent_class #define gst_rtp_g722_pay_parent_class parent_class
G_DEFINE_TYPE (GstRtpG722Pay, gst_rtp_g722_pay, G_DEFINE_TYPE (GstRtpG722Pay, gst_rtp_g722_pay,
GST_TYPE_BASE_RTP_AUDIO_PAYLOAD); GST_TYPE_RTP_BASE_AUDIO_PAYLOAD);
static void static void
gst_rtp_g722_pay_class_init (GstRtpG722PayClass * klass) gst_rtp_g722_pay_class_init (GstRtpG722PayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
GST_DEBUG_CATEGORY_INIT (rtpg722pay_debug, "rtpg722pay", 0, GST_DEBUG_CATEGORY_INIT (rtpg722pay_debug, "rtpg722pay", 0,
"G722 RTP Payloader"); "G722 RTP Payloader");
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_g722_pay_src_template)); gst_static_pad_template_get (&gst_rtp_g722_pay_src_template));
@ -82,23 +82,23 @@ gst_rtp_g722_pay_class_init (GstRtpG722PayClass * klass)
"Payload-encode Raw audio into RTP packets (RFC 3551)", "Payload-encode Raw audio into RTP packets (RFC 3551)",
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gstbasertppayload_class->set_caps = gst_rtp_g722_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_g722_pay_setcaps;
gstbasertppayload_class->get_caps = gst_rtp_g722_pay_getcaps; gstrtpbasepayload_class->get_caps = gst_rtp_g722_pay_getcaps;
} }
static void static void
gst_rtp_g722_pay_init (GstRtpG722Pay * rtpg722pay) gst_rtp_g722_pay_init (GstRtpG722Pay * rtpg722pay)
{ {
GstBaseRTPAudioPayload *basertpaudiopayload; GstRTPBaseAudioPayload *rtpbaseaudiopayload;
basertpaudiopayload = GST_BASE_RTP_AUDIO_PAYLOAD (rtpg722pay); rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (rtpg722pay);
/* tell basertpaudiopayload that this is a sample based codec */ /* tell rtpbaseaudiopayload that this is a sample based codec */
gst_base_rtp_audio_payload_set_sample_based (basertpaudiopayload); gst_rtp_base_audio_payload_set_sample_based (rtpbaseaudiopayload);
} }
static gboolean static gboolean
gst_rtp_g722_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps) gst_rtp_g722_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
{ {
GstRtpG722Pay *rtpg722pay; GstRtpG722Pay *rtpg722pay;
GstStructure *structure; GstStructure *structure;
@ -107,9 +107,9 @@ gst_rtp_g722_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
gchar *params; gchar *params;
GstAudioChannelPosition *pos; GstAudioChannelPosition *pos;
const GstRTPChannelOrder *order; const GstRTPChannelOrder *order;
GstBaseRTPAudioPayload *basertpaudiopayload; GstRTPBaseAudioPayload *rtpbaseaudiopayload;
basertpaudiopayload = GST_BASE_RTP_AUDIO_PAYLOAD (basepayload); rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (basepayload);
rtpg722pay = GST_RTP_G722_PAY (basepayload); rtpg722pay = GST_RTP_G722_PAY (basepayload);
structure = gst_caps_get_structure (caps, 0); structure = gst_caps_get_structure (caps, 0);
@ -132,7 +132,7 @@ gst_rtp_g722_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
* RFC 3551 although the sampling rate is 16000 Hz */ * RFC 3551 although the sampling rate is 16000 Hz */
clock_rate = 8000; clock_rate = 8000;
gst_base_rtp_payload_set_options (basepayload, "audio", TRUE, "G722", gst_rtp_base_payload_set_options (basepayload, "audio", TRUE, "G722",
clock_rate); clock_rate);
params = g_strdup_printf ("%d", channels); params = g_strdup_printf ("%d", channels);
@ -142,11 +142,11 @@ gst_rtp_g722_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
} }
if (order && order->name) { if (order && order->name) {
res = gst_base_rtp_payload_set_outcaps (basepayload, res = gst_rtp_base_payload_set_outcaps (basepayload,
"encoding-params", G_TYPE_STRING, params, "channels", G_TYPE_INT, "encoding-params", G_TYPE_STRING, params, "channels", G_TYPE_INT,
channels, "channel-order", G_TYPE_STRING, order->name, NULL); channels, "channel-order", G_TYPE_STRING, order->name, NULL);
} else { } else {
res = gst_base_rtp_payload_set_outcaps (basepayload, res = gst_rtp_base_payload_set_outcaps (basepayload,
"encoding-params", G_TYPE_STRING, params, "channels", G_TYPE_INT, "encoding-params", G_TYPE_STRING, params, "channels", G_TYPE_INT,
channels, NULL); channels, NULL);
} }
@ -160,7 +160,7 @@ gst_rtp_g722_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
/* bits-per-sample is 4 * channels for G722, but as the RTP clock runs at /* bits-per-sample is 4 * channels for G722, but as the RTP clock runs at
* half speed (8 instead of 16 khz), pretend it's 8 bits per sample * half speed (8 instead of 16 khz), pretend it's 8 bits per sample
* channels. */ * channels. */
gst_base_rtp_audio_payload_set_samplebits_options (basertpaudiopayload, gst_rtp_base_audio_payload_set_samplebits_options (rtpbaseaudiopayload,
8 * rtpg722pay->channels); 8 * rtpg722pay->channels);
return res; return res;
@ -179,7 +179,7 @@ no_channels:
} }
static GstCaps * static GstCaps *
gst_rtp_g722_pay_getcaps (GstBaseRTPPayload * rtppayload, GstPad * pad, gst_rtp_g722_pay_getcaps (GstRTPBasePayload * rtppayload, GstPad * pad,
GstCaps * filter) GstCaps * filter)
{ {
GstCaps *otherpadcaps; GstCaps *otherpadcaps;

View file

@ -41,7 +41,7 @@ typedef struct _GstRtpG722PayClass GstRtpG722PayClass;
struct _GstRtpG722Pay struct _GstRtpG722Pay
{ {
GstBaseRTPAudioPayload payload; GstRTPBaseAudioPayload payload;
gint rate; gint rate;
gint channels; gint channels;
@ -49,7 +49,7 @@ struct _GstRtpG722Pay
struct _GstRtpG722PayClass struct _GstRtpG722PayClass
{ {
GstBaseRTPAudioPayloadClass parent_class; GstRTPBaseAudioPayloadClass parent_class;
}; };
GType gst_rtp_g722_pay_get_type (void); GType gst_rtp_g722_pay_get_type (void);

View file

@ -73,26 +73,26 @@ GST_STATIC_PAD_TEMPLATE ("src",
GST_STATIC_CAPS ("audio/G723, " "channels = (int) 1," "rate = (int) 8000") GST_STATIC_CAPS ("audio/G723, " "channels = (int) 1," "rate = (int) 8000")
); );
static gboolean gst_rtp_g723_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_g723_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
static GstBuffer *gst_rtp_g723_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_g723_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
#define gst_rtp_g723_depay_parent_class parent_class #define gst_rtp_g723_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpG723Depay, gst_rtp_g723_depay, G_DEFINE_TYPE (GstRtpG723Depay, gst_rtp_g723_depay,
GST_TYPE_BASE_RTP_DEPAYLOAD); GST_TYPE_RTP_BASE_DEPAYLOAD);
static void static void
gst_rtp_g723_depay_class_init (GstRtpG723DepayClass * klass) gst_rtp_g723_depay_class_init (GstRtpG723DepayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
GST_DEBUG_CATEGORY_INIT (rtpg723depay_debug, "rtpg723depay", 0, GST_DEBUG_CATEGORY_INIT (rtpg723depay_debug, "rtpg723depay", 0,
"G.723 RTP Depayloader"); "G.723 RTP Depayloader");
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_g723_depay_src_template)); gst_static_pad_template_get (&gst_rtp_g723_depay_src_template));
@ -104,22 +104,22 @@ gst_rtp_g723_depay_class_init (GstRtpG723DepayClass * klass)
"Extracts G.723 audio from RTP packets (RFC 3551)", "Extracts G.723 audio from RTP packets (RFC 3551)",
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gstbasertpdepayload_class->process = gst_rtp_g723_depay_process; gstrtpbasedepayload_class->process = gst_rtp_g723_depay_process;
gstbasertpdepayload_class->set_caps = gst_rtp_g723_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_g723_depay_setcaps;
} }
static void static void
gst_rtp_g723_depay_init (GstRtpG723Depay * rtpg723depay) gst_rtp_g723_depay_init (GstRtpG723Depay * rtpg723depay)
{ {
GstBaseRTPDepayload *depayload; GstRTPBaseDepayload *depayload;
depayload = GST_BASE_RTP_DEPAYLOAD (rtpg723depay); depayload = GST_RTP_BASE_DEPAYLOAD (rtpg723depay);
gst_pad_use_fixed_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload)); gst_pad_use_fixed_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload));
} }
static gboolean static gboolean
gst_rtp_g723_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_g723_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstStructure *structure; GstStructure *structure;
GstCaps *srccaps; GstCaps *srccaps;
@ -151,7 +151,7 @@ gst_rtp_g723_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
srccaps = gst_caps_new_simple ("audio/G723", srccaps = gst_caps_new_simple ("audio/G723",
"channels", G_TYPE_INT, channels, "rate", G_TYPE_INT, clock_rate, NULL); "channels", G_TYPE_INT, channels, "rate", G_TYPE_INT, clock_rate, NULL);
ret = gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload), srccaps); ret = gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload), srccaps);
gst_caps_unref (srccaps); gst_caps_unref (srccaps);
return ret; return ret;
@ -172,7 +172,7 @@ wrong_clock_rate:
static GstBuffer * static GstBuffer *
gst_rtp_g723_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_g723_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpG723Depay *rtpg723depay; GstRtpG723Depay *rtpg723depay;
GstBuffer *outbuf = NULL; GstBuffer *outbuf = NULL;

View file

@ -42,12 +42,12 @@ typedef struct _GstRtpG723DepayClass GstRtpG723DepayClass;
struct _GstRtpG723Depay struct _GstRtpG723Depay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
}; };
struct _GstRtpG723DepayClass struct _GstRtpG723DepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_g723_depay_get_type (void); GType gst_rtp_g723_depay_get_type (void);

View file

@ -34,9 +34,9 @@
#define G723_FRAME_DURATION (30 * GST_MSECOND) #define G723_FRAME_DURATION (30 * GST_MSECOND)
static gboolean gst_rtp_g723_pay_set_caps (GstBaseRTPPayload * payload, static gboolean gst_rtp_g723_pay_set_caps (GstRTPBasePayload * payload,
GstCaps * caps); GstCaps * caps);
static GstFlowReturn gst_rtp_g723_pay_handle_buffer (GstBaseRTPPayload * static GstFlowReturn gst_rtp_g723_pay_handle_buffer (GstRTPBasePayload *
payload, GstBuffer * buf); payload, GstBuffer * buf);
static GstStaticPadTemplate gst_rtp_g723_pay_sink_template = static GstStaticPadTemplate gst_rtp_g723_pay_sink_template =
@ -68,18 +68,18 @@ static GstStateChangeReturn gst_rtp_g723_pay_change_state (GstElement * element,
GstStateChange transition); GstStateChange transition);
#define gst_rtp_g723_pay_parent_class parent_class #define gst_rtp_g723_pay_parent_class parent_class
G_DEFINE_TYPE (GstRTPG723Pay, gst_rtp_g723_pay, GST_TYPE_BASE_RTP_PAYLOAD); G_DEFINE_TYPE (GstRTPG723Pay, gst_rtp_g723_pay, GST_TYPE_RTP_BASE_PAYLOAD);
static void static void
gst_rtp_g723_pay_class_init (GstRTPG723PayClass * klass) gst_rtp_g723_pay_class_init (GstRTPG723PayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *payload_class; GstRTPBasePayloadClass *payload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
payload_class = (GstBaseRTPPayloadClass *) klass; payload_class = (GstRTPBasePayloadClass *) klass;
gobject_class->finalize = gst_rtp_g723_pay_finalize; gobject_class->finalize = gst_rtp_g723_pay_finalize;
@ -102,12 +102,12 @@ gst_rtp_g723_pay_class_init (GstRTPG723PayClass * klass)
static void static void
gst_rtp_g723_pay_init (GstRTPG723Pay * pay) gst_rtp_g723_pay_init (GstRTPG723Pay * pay)
{ {
GstBaseRTPPayload *payload = GST_BASE_RTP_PAYLOAD (pay); GstRTPBasePayload *payload = GST_RTP_BASE_PAYLOAD (pay);
pay->adapter = gst_adapter_new (); pay->adapter = gst_adapter_new ();
payload->pt = GST_RTP_PAYLOAD_G723; payload->pt = GST_RTP_PAYLOAD_G723;
gst_base_rtp_payload_set_options (payload, "audio", FALSE, "G723", 8000); gst_rtp_base_payload_set_options (payload, "audio", FALSE, "G723", 8000);
} }
static void static void
@ -125,7 +125,7 @@ gst_rtp_g723_pay_finalize (GObject * object)
static gboolean static gboolean
gst_rtp_g723_pay_set_caps (GstBaseRTPPayload * payload, GstCaps * caps) gst_rtp_g723_pay_set_caps (GstRTPBasePayload * payload, GstCaps * caps)
{ {
gboolean res; gboolean res;
GstStructure *structure; GstStructure *structure;
@ -138,7 +138,7 @@ gst_rtp_g723_pay_set_caps (GstBaseRTPPayload * payload, GstCaps * caps)
payload->pt = pt; payload->pt = pt;
payload->dynamic = pt != GST_RTP_PAYLOAD_G723; payload->dynamic = pt != GST_RTP_PAYLOAD_G723;
res = gst_base_rtp_payload_set_outcaps (payload, NULL); res = gst_rtp_base_payload_set_outcaps (payload, NULL);
return res; return res;
} }
@ -178,7 +178,7 @@ gst_rtp_g723_pay_flush (GstRTPG723Pay * pay)
} }
gst_rtp_buffer_unmap (&rtp); gst_rtp_buffer_unmap (&rtp);
ret = gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (pay), outbuf); ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (pay), outbuf);
return ret; return ret;
} }
@ -192,7 +192,7 @@ static const guint size_tab[4] = {
}; };
static GstFlowReturn static GstFlowReturn
gst_rtp_g723_pay_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buf) gst_rtp_g723_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buf)
{ {
GstFlowReturn ret = GST_FLOW_OK; GstFlowReturn ret = GST_FLOW_OK;
guint8 *data; guint8 *data;
@ -229,7 +229,7 @@ gst_rtp_g723_pay_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buf)
packet_dur = pay->duration + G723_FRAME_DURATION; packet_dur = pay->duration + G723_FRAME_DURATION;
packet_len = gst_rtp_buffer_calc_packet_len (payload_len, 0, 0); packet_len = gst_rtp_buffer_calc_packet_len (payload_len, 0, 0);
if (gst_base_rtp_payload_is_filled (payload, packet_len, packet_dur)) { if (gst_rtp_base_payload_is_filled (payload, packet_len, packet_dur)) {
/* size or duration would overflow the packet, flush the queued data */ /* size or duration would overflow the packet, flush the queued data */
ret = gst_rtp_g723_pay_flush (pay); ret = gst_rtp_g723_pay_flush (pay);
} }

View file

@ -42,7 +42,7 @@ typedef struct _GstRTPG723PayClass GstRTPG723PayClass;
struct _GstRTPG723Pay struct _GstRTPG723Pay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
GstAdapter *adapter; GstAdapter *adapter;
GstClockTime duration; GstClockTime duration;
@ -52,7 +52,7 @@ struct _GstRTPG723Pay
struct _GstRTPG723PayClass struct _GstRTPG723PayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
GType gst_rtp_g723_pay_get_type (void); GType gst_rtp_g723_pay_get_type (void);

View file

@ -82,28 +82,28 @@ static void gst_rtp_g726_depay_get_property (GObject * object, guint prop_id,
static void gst_rtp_g726_depay_set_property (GObject * object, guint prop_id, static void gst_rtp_g726_depay_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);
static GstBuffer *gst_rtp_g726_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_g726_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static gboolean gst_rtp_g726_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_g726_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
#define gst_rtp_g726_depay_parent_class parent_class #define gst_rtp_g726_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpG726Depay, gst_rtp_g726_depay, G_DEFINE_TYPE (GstRtpG726Depay, gst_rtp_g726_depay,
GST_TYPE_BASE_RTP_DEPAYLOAD); GST_TYPE_RTP_BASE_DEPAYLOAD);
static void static void
gst_rtp_g726_depay_class_init (GstRtpG726DepayClass * klass) gst_rtp_g726_depay_class_init (GstRtpG726DepayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
GST_DEBUG_CATEGORY_INIT (rtpg726depay_debug, "rtpg726depay", 0, GST_DEBUG_CATEGORY_INIT (rtpg726depay_debug, "rtpg726depay", 0,
"G.726 RTP Depayloader"); "G.726 RTP Depayloader");
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gobject_class->set_property = gst_rtp_g726_depay_set_property; gobject_class->set_property = gst_rtp_g726_depay_set_property;
gobject_class->get_property = gst_rtp_g726_depay_get_property; gobject_class->get_property = gst_rtp_g726_depay_get_property;
@ -123,24 +123,24 @@ gst_rtp_g726_depay_class_init (GstRtpG726DepayClass * klass)
"Extracts G.726 audio from RTP packets", "Extracts G.726 audio from RTP packets",
"Axis Communications <dev-gstreamer@axis.com>"); "Axis Communications <dev-gstreamer@axis.com>");
gstbasertpdepayload_class->process = gst_rtp_g726_depay_process; gstrtpbasedepayload_class->process = gst_rtp_g726_depay_process;
gstbasertpdepayload_class->set_caps = gst_rtp_g726_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_g726_depay_setcaps;
} }
static void static void
gst_rtp_g726_depay_init (GstRtpG726Depay * rtpG726depay) gst_rtp_g726_depay_init (GstRtpG726Depay * rtpG726depay)
{ {
GstBaseRTPDepayload *depayload; GstRTPBaseDepayload *depayload;
depayload = GST_BASE_RTP_DEPAYLOAD (rtpG726depay); depayload = GST_RTP_BASE_DEPAYLOAD (rtpG726depay);
gst_pad_use_fixed_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload)); gst_pad_use_fixed_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload));
rtpG726depay->force_aal2 = DEFAULT_FORCE_AAL2; rtpG726depay->force_aal2 = DEFAULT_FORCE_AAL2;
} }
static gboolean static gboolean
gst_rtp_g726_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_g726_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstCaps *srccaps; GstCaps *srccaps;
GstStructure *structure; GstStructure *structure;
@ -186,7 +186,7 @@ gst_rtp_g726_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
"bitrate", G_TYPE_INT, depay->bitrate, "bitrate", G_TYPE_INT, depay->bitrate,
"layout", G_TYPE_STRING, LAYOUT_G726, NULL); "layout", G_TYPE_STRING, LAYOUT_G726, NULL);
ret = gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload), srccaps); ret = gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload), srccaps);
gst_caps_unref (srccaps); gst_caps_unref (srccaps);
return ret; return ret;
@ -202,7 +202,7 @@ unknown_encoding:
static GstBuffer * static GstBuffer *
gst_rtp_g726_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_g726_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpG726Depay *depay; GstRtpG726Depay *depay;
GstBuffer *outbuf = NULL; GstBuffer *outbuf = NULL;

View file

@ -37,7 +37,7 @@ typedef struct _GstRtpG726DepayClass GstRtpG726DepayClass;
struct _GstRtpG726Depay struct _GstRtpG726Depay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
gboolean aal2; gboolean aal2;
gboolean force_aal2; gboolean force_aal2;
@ -46,7 +46,7 @@ struct _GstRtpG726Depay
struct _GstRtpG726DepayClass struct _GstRtpG726DepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_g726_depay_get_type (void); GType gst_rtp_g726_depay_get_type (void);

View file

@ -70,25 +70,25 @@ static void gst_rtp_g726_pay_get_property (GObject * object, guint prop_id,
static void gst_rtp_g726_pay_set_property (GObject * object, guint prop_id, static void gst_rtp_g726_pay_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);
static gboolean gst_rtp_g726_pay_setcaps (GstBaseRTPPayload * payload, static gboolean gst_rtp_g726_pay_setcaps (GstRTPBasePayload * payload,
GstCaps * caps); GstCaps * caps);
static GstFlowReturn gst_rtp_g726_pay_handle_buffer (GstBaseRTPPayload * static GstFlowReturn gst_rtp_g726_pay_handle_buffer (GstRTPBasePayload *
payload, GstBuffer * buffer); payload, GstBuffer * buffer);
#define gst_rtp_g726_pay_parent_class parent_class #define gst_rtp_g726_pay_parent_class parent_class
G_DEFINE_TYPE (GstRtpG726Pay, gst_rtp_g726_pay, G_DEFINE_TYPE (GstRtpG726Pay, gst_rtp_g726_pay,
GST_TYPE_BASE_RTP_AUDIO_PAYLOAD); GST_TYPE_RTP_BASE_AUDIO_PAYLOAD);
static void static void
gst_rtp_g726_pay_class_init (GstRtpG726PayClass * klass) gst_rtp_g726_pay_class_init (GstRtpG726PayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gobject_class->set_property = gst_rtp_g726_pay_set_property; gobject_class->set_property = gst_rtp_g726_pay_set_property;
gobject_class->get_property = gst_rtp_g726_pay_get_property; gobject_class->get_property = gst_rtp_g726_pay_get_property;
@ -108,8 +108,8 @@ gst_rtp_g726_pay_class_init (GstRtpG726PayClass * klass)
"Payload-encodes G.726 audio into a RTP packet", "Payload-encodes G.726 audio into a RTP packet",
"Axis Communications <dev-gstreamer@axis.com>"); "Axis Communications <dev-gstreamer@axis.com>");
gstbasertppayload_class->set_caps = gst_rtp_g726_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_g726_pay_setcaps;
gstbasertppayload_class->handle_buffer = gst_rtp_g726_pay_handle_buffer; gstrtpbasepayload_class->handle_buffer = gst_rtp_g726_pay_handle_buffer;
GST_DEBUG_CATEGORY_INIT (rtpg726pay_debug, "rtpg726pay", 0, GST_DEBUG_CATEGORY_INIT (rtpg726pay_debug, "rtpg726pay", 0,
"G.726 RTP Payloader"); "G.726 RTP Payloader");
@ -118,29 +118,29 @@ gst_rtp_g726_pay_class_init (GstRtpG726PayClass * klass)
static void static void
gst_rtp_g726_pay_init (GstRtpG726Pay * rtpg726pay) gst_rtp_g726_pay_init (GstRtpG726Pay * rtpg726pay)
{ {
GstBaseRTPAudioPayload *basertpaudiopayload; GstRTPBaseAudioPayload *rtpbaseaudiopayload;
basertpaudiopayload = GST_BASE_RTP_AUDIO_PAYLOAD (rtpg726pay); rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (rtpg726pay);
GST_BASE_RTP_PAYLOAD (rtpg726pay)->clock_rate = 8000; GST_RTP_BASE_PAYLOAD (rtpg726pay)->clock_rate = 8000;
rtpg726pay->force_aal2 = DEFAULT_FORCE_AAL2; rtpg726pay->force_aal2 = DEFAULT_FORCE_AAL2;
/* sample based codec */ /* sample based codec */
gst_base_rtp_audio_payload_set_sample_based (basertpaudiopayload); gst_rtp_base_audio_payload_set_sample_based (rtpbaseaudiopayload);
} }
static gboolean static gboolean
gst_rtp_g726_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps) gst_rtp_g726_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
{ {
gchar *encoding_name; gchar *encoding_name;
GstStructure *structure; GstStructure *structure;
GstBaseRTPAudioPayload *basertpaudiopayload; GstRTPBaseAudioPayload *rtpbaseaudiopayload;
GstRtpG726Pay *pay; GstRtpG726Pay *pay;
GstCaps *peercaps; GstCaps *peercaps;
gboolean res; gboolean res;
basertpaudiopayload = GST_BASE_RTP_AUDIO_PAYLOAD (payload); rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (payload);
pay = GST_RTP_G726_PAY (payload); pay = GST_RTP_G726_PAY (payload);
structure = gst_caps_get_structure (caps, 0); structure = gst_caps_get_structure (caps, 0);
@ -156,22 +156,22 @@ gst_rtp_g726_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
switch (pay->bitrate) { switch (pay->bitrate) {
case 16000: case 16000:
encoding_name = g_strdup ("G726-16"); encoding_name = g_strdup ("G726-16");
gst_base_rtp_audio_payload_set_samplebits_options (basertpaudiopayload, gst_rtp_base_audio_payload_set_samplebits_options (rtpbaseaudiopayload,
2); 2);
break; break;
case 24000: case 24000:
encoding_name = g_strdup ("G726-24"); encoding_name = g_strdup ("G726-24");
gst_base_rtp_audio_payload_set_samplebits_options (basertpaudiopayload, gst_rtp_base_audio_payload_set_samplebits_options (rtpbaseaudiopayload,
3); 3);
break; break;
case 32000: case 32000:
encoding_name = g_strdup ("G726-32"); encoding_name = g_strdup ("G726-32");
gst_base_rtp_audio_payload_set_samplebits_options (basertpaudiopayload, gst_rtp_base_audio_payload_set_samplebits_options (rtpbaseaudiopayload,
4); 4);
break; break;
case 40000: case 40000:
encoding_name = g_strdup ("G726-40"); encoding_name = g_strdup ("G726-40");
gst_base_rtp_audio_payload_set_samplebits_options (basertpaudiopayload, gst_rtp_base_audio_payload_set_samplebits_options (rtpbaseaudiopayload,
5); 5);
break; break;
default: default:
@ -237,9 +237,9 @@ gst_rtp_g726_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
GST_DEBUG_OBJECT (payload, "no peer caps, AAL2 %d", pay->aal2); GST_DEBUG_OBJECT (payload, "no peer caps, AAL2 %d", pay->aal2);
} }
gst_base_rtp_payload_set_options (payload, "audio", TRUE, encoding_name, gst_rtp_base_payload_set_options (payload, "audio", TRUE, encoding_name,
8000); 8000);
res = gst_base_rtp_payload_set_outcaps (payload, NULL); res = gst_rtp_base_payload_set_outcaps (payload, NULL);
g_free (encoding_name); g_free (encoding_name);
@ -259,7 +259,7 @@ no_format:
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_g726_pay_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buffer) gst_rtp_g726_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buffer)
{ {
GstFlowReturn res; GstFlowReturn res;
GstRtpG726Pay *pay; GstRtpG726Pay *pay;
@ -368,7 +368,7 @@ gst_rtp_g726_pay_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buffer)
} }
res = res =
GST_BASE_RTP_PAYLOAD_CLASS (parent_class)->handle_buffer (payload, GST_RTP_BASE_PAYLOAD_CLASS (parent_class)->handle_buffer (payload,
buffer); buffer);
return res; return res;

View file

@ -35,7 +35,7 @@ typedef struct _GstRtpG726PayClass GstRtpG726PayClass;
struct _GstRtpG726Pay struct _GstRtpG726Pay
{ {
GstBaseRTPAudioPayload audiopayload; GstRTPBaseAudioPayload audiopayload;
gboolean aal2; gboolean aal2;
gboolean force_aal2; gboolean force_aal2;
@ -44,7 +44,7 @@ struct _GstRtpG726Pay
struct _GstRtpG726PayClass struct _GstRtpG726PayClass
{ {
GstBaseRTPAudioPayloadClass parent_class; GstRTPBaseAudioPayloadClass parent_class;
}; };
GType gst_rtp_g726_pay_get_type (void); GType gst_rtp_g726_pay_get_type (void);

View file

@ -71,26 +71,26 @@ GST_STATIC_PAD_TEMPLATE ("src",
GST_STATIC_CAPS ("audio/G729, " "channels = (int) 1," "rate = (int) 8000") GST_STATIC_CAPS ("audio/G729, " "channels = (int) 1," "rate = (int) 8000")
); );
static gboolean gst_rtp_g729_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_g729_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
static GstBuffer *gst_rtp_g729_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_g729_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
#define gst_rtp_g729_depay_parent_class parent_class #define gst_rtp_g729_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpG729Depay, gst_rtp_g729_depay, G_DEFINE_TYPE (GstRtpG729Depay, gst_rtp_g729_depay,
GST_TYPE_BASE_RTP_DEPAYLOAD); GST_TYPE_RTP_BASE_DEPAYLOAD);
static void static void
gst_rtp_g729_depay_class_init (GstRtpG729DepayClass * klass) gst_rtp_g729_depay_class_init (GstRtpG729DepayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
GST_DEBUG_CATEGORY_INIT (rtpg729depay_debug, "rtpg729depay", 0, GST_DEBUG_CATEGORY_INIT (rtpg729depay_debug, "rtpg729depay", 0,
"G.729 RTP Depayloader"); "G.729 RTP Depayloader");
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_g729_depay_src_template)); gst_static_pad_template_get (&gst_rtp_g729_depay_src_template));
@ -102,22 +102,22 @@ gst_rtp_g729_depay_class_init (GstRtpG729DepayClass * klass)
"Extracts G.729 audio from RTP packets (RFC 3551)", "Extracts G.729 audio from RTP packets (RFC 3551)",
"Laurent Glayal <spglegle@yahoo.fr>"); "Laurent Glayal <spglegle@yahoo.fr>");
gstbasertpdepayload_class->process = gst_rtp_g729_depay_process; gstrtpbasedepayload_class->process = gst_rtp_g729_depay_process;
gstbasertpdepayload_class->set_caps = gst_rtp_g729_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_g729_depay_setcaps;
} }
static void static void
gst_rtp_g729_depay_init (GstRtpG729Depay * rtpg729depay) gst_rtp_g729_depay_init (GstRtpG729Depay * rtpg729depay)
{ {
GstBaseRTPDepayload *depayload; GstRTPBaseDepayload *depayload;
depayload = GST_BASE_RTP_DEPAYLOAD (rtpg729depay); depayload = GST_RTP_BASE_DEPAYLOAD (rtpg729depay);
gst_pad_use_fixed_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload)); gst_pad_use_fixed_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload));
} }
static gboolean static gboolean
gst_rtp_g729_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_g729_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstStructure *structure; GstStructure *structure;
GstCaps *srccaps; GstCaps *srccaps;
@ -149,7 +149,7 @@ gst_rtp_g729_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
srccaps = gst_caps_new_simple ("audio/G729", srccaps = gst_caps_new_simple ("audio/G729",
"channels", G_TYPE_INT, channels, "rate", G_TYPE_INT, clock_rate, NULL); "channels", G_TYPE_INT, channels, "rate", G_TYPE_INT, clock_rate, NULL);
ret = gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload), srccaps); ret = gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload), srccaps);
gst_caps_unref (srccaps); gst_caps_unref (srccaps);
return ret; return ret;
@ -169,7 +169,7 @@ wrong_clock_rate:
} }
static GstBuffer * static GstBuffer *
gst_rtp_g729_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_g729_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpG729Depay *rtpg729depay; GstRtpG729Depay *rtpg729depay;
GstBuffer *outbuf = NULL; GstBuffer *outbuf = NULL;

View file

@ -44,12 +44,12 @@ typedef struct _GstRtpG729DepayClass GstRtpG729DepayClass;
struct _GstRtpG729Depay struct _GstRtpG729Depay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
}; };
struct _GstRtpG729DepayClass struct _GstRtpG729DepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_g729_depay_get_type (void); GType gst_rtp_g729_depay_get_type (void);

View file

@ -44,9 +44,9 @@ GST_DEBUG_CATEGORY_STATIC (rtpg729pay_debug);
#define G729_FRAME_DURATION_MS (10) #define G729_FRAME_DURATION_MS (10)
static gboolean static gboolean
gst_rtp_g729_pay_set_caps (GstBaseRTPPayload * payload, GstCaps * caps); gst_rtp_g729_pay_set_caps (GstRTPBasePayload * payload, GstCaps * caps);
static GstFlowReturn static GstFlowReturn
gst_rtp_g729_pay_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buf); gst_rtp_g729_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buf);
static GstStateChangeReturn static GstStateChangeReturn
gst_rtp_g729_pay_change_state (GstElement * element, GstStateChange transition); gst_rtp_g729_pay_change_state (GstElement * element, GstStateChange transition);
@ -75,7 +75,7 @@ static GstStaticPadTemplate gst_rtp_g729_pay_src_template =
); );
#define gst_rtp_g729_pay_parent_class parent_class #define gst_rtp_g729_pay_parent_class parent_class
G_DEFINE_TYPE (GstRTPG729Pay, gst_rtp_g729_pay, GST_TYPE_BASE_RTP_PAYLOAD); G_DEFINE_TYPE (GstRTPG729Pay, gst_rtp_g729_pay, GST_TYPE_RTP_BASE_PAYLOAD);
static void static void
gst_rtp_g729_pay_finalize (GObject * object) gst_rtp_g729_pay_finalize (GObject * object)
@ -92,7 +92,7 @@ gst_rtp_g729_pay_class_init (GstRTPG729PayClass * klass)
{ {
GObjectClass *gobject_class = (GObjectClass *) klass; GObjectClass *gobject_class = (GObjectClass *) klass;
GstElementClass *gstelement_class = (GstElementClass *) klass; GstElementClass *gstelement_class = (GstElementClass *) klass;
GstBaseRTPPayloadClass *payload_class = GST_BASE_RTP_PAYLOAD_CLASS (klass); GstRTPBasePayloadClass *payload_class = GST_RTP_BASE_PAYLOAD_CLASS (klass);
GST_DEBUG_CATEGORY_INIT (rtpg729pay_debug, "rtpg729pay", 0, GST_DEBUG_CATEGORY_INIT (rtpg729pay_debug, "rtpg729pay", 0,
"G.729 RTP Payloader"); "G.729 RTP Payloader");
@ -118,10 +118,10 @@ gst_rtp_g729_pay_class_init (GstRTPG729PayClass * klass)
static void static void
gst_rtp_g729_pay_init (GstRTPG729Pay * pay) gst_rtp_g729_pay_init (GstRTPG729Pay * pay)
{ {
GstBaseRTPPayload *payload = GST_BASE_RTP_PAYLOAD (pay); GstRTPBasePayload *payload = GST_RTP_BASE_PAYLOAD (pay);
payload->pt = GST_RTP_PAYLOAD_G729; payload->pt = GST_RTP_PAYLOAD_G729;
gst_base_rtp_payload_set_options (payload, "audio", FALSE, "G729", 8000); gst_rtp_base_payload_set_options (payload, "audio", FALSE, "G729", 8000);
pay->adapter = gst_adapter_new (); pay->adapter = gst_adapter_new ();
} }
@ -137,7 +137,7 @@ gst_rtp_g729_pay_reset (GstRTPG729Pay * pay)
} }
static gboolean static gboolean
gst_rtp_g729_pay_set_caps (GstBaseRTPPayload * payload, GstCaps * caps) gst_rtp_g729_pay_set_caps (GstRTPBasePayload * payload, GstCaps * caps)
{ {
gboolean res; gboolean res;
GstStructure *structure; GstStructure *structure;
@ -150,7 +150,7 @@ gst_rtp_g729_pay_set_caps (GstBaseRTPPayload * payload, GstCaps * caps)
payload->pt = pt; payload->pt = pt;
payload->dynamic = pt != GST_RTP_PAYLOAD_G729; payload->dynamic = pt != GST_RTP_PAYLOAD_G729;
res = gst_base_rtp_payload_set_outcaps (payload, NULL); res = gst_rtp_base_payload_set_outcaps (payload, NULL);
return res; return res;
} }
@ -159,7 +159,7 @@ static GstFlowReturn
gst_rtp_g729_pay_push (GstRTPG729Pay * rtpg729pay, gst_rtp_g729_pay_push (GstRTPG729Pay * rtpg729pay,
const guint8 * data, guint payload_len) const guint8 * data, guint payload_len)
{ {
GstBaseRTPPayload *basepayload; GstRTPBasePayload *basepayload;
GstClockTime duration; GstClockTime duration;
guint frames; guint frames;
GstBuffer *outbuf; GstBuffer *outbuf;
@ -167,7 +167,7 @@ gst_rtp_g729_pay_push (GstRTPG729Pay * rtpg729pay,
GstFlowReturn ret; GstFlowReturn ret;
GstRTPBuffer rtp = { NULL }; GstRTPBuffer rtp = { NULL };
basepayload = GST_BASE_RTP_PAYLOAD (rtpg729pay); basepayload = GST_RTP_BASE_PAYLOAD (rtpg729pay);
GST_DEBUG_OBJECT (rtpg729pay, "Pushing %d bytes ts %" GST_TIME_FORMAT, GST_DEBUG_OBJECT (rtpg729pay, "Pushing %d bytes ts %" GST_TIME_FORMAT,
payload_len, GST_TIME_ARGS (rtpg729pay->next_ts)); payload_len, GST_TIME_ARGS (rtpg729pay->next_ts));
@ -199,7 +199,7 @@ gst_rtp_g729_pay_push (GstRTPG729Pay * rtpg729pay,
} }
gst_rtp_buffer_unmap (&rtp); gst_rtp_buffer_unmap (&rtp);
ret = gst_base_rtp_payload_push (basepayload, outbuf); ret = gst_rtp_base_payload_push (basepayload, outbuf);
return ret; return ret;
} }
@ -223,7 +223,7 @@ gst_rtp_g729_pay_recalc_rtp_time (GstRTPG729Pay * rtpg729pay, GstClockTime time)
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_g729_pay_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buf) gst_rtp_g729_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buf)
{ {
GstFlowReturn ret = GST_FLOW_OK; GstFlowReturn ret = GST_FLOW_OK;
GstRTPG729Pay *rtpg729pay = GST_RTP_G729_PAY (payload); GstRTPG729Pay *rtpg729pay = GST_RTP_G729_PAY (payload);
@ -261,7 +261,7 @@ gst_rtp_g729_pay_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buf)
max_payload_len = MIN ( max_payload_len = MIN (
/* MTU max */ /* MTU max */
(int) (gst_rtp_buffer_calc_payload_len (GST_BASE_RTP_PAYLOAD_MTU (int) (gst_rtp_buffer_calc_payload_len (GST_RTP_BASE_PAYLOAD_MTU
(payload), 0, 0) / G729_FRAME_SIZE) (payload), 0, 0) / G729_FRAME_SIZE)
* G729_FRAME_SIZE, * G729_FRAME_SIZE,
/* ptime max */ /* ptime max */

View file

@ -42,7 +42,7 @@ typedef struct _GstRTPG729PayClass GstRTPG729PayClass;
struct _GstRTPG729Pay struct _GstRTPG729Pay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
GstAdapter *adapter; GstAdapter *adapter;
GstClockTime next_ts; GstClockTime next_ts;
@ -54,7 +54,7 @@ struct _GstRTPG729Pay
struct _GstRTPG729PayClass struct _GstRTPG729PayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
GType gst_rtp_g729_pay_get_type (void); GType gst_rtp_g729_pay_get_type (void);

View file

@ -57,22 +57,22 @@ static GstStaticPadTemplate gst_rtp_gsm_depay_sink_template =
"clock-rate = (int) 8000") "clock-rate = (int) 8000")
); );
static GstBuffer *gst_rtp_gsm_depay_process (GstBaseRTPDepayload * _depayload, static GstBuffer *gst_rtp_gsm_depay_process (GstRTPBaseDepayload * _depayload,
GstBuffer * buf); GstBuffer * buf);
static gboolean gst_rtp_gsm_depay_setcaps (GstBaseRTPDepayload * _depayload, static gboolean gst_rtp_gsm_depay_setcaps (GstRTPBaseDepayload * _depayload,
GstCaps * caps); GstCaps * caps);
#define gst_rtp_gsm_depay_parent_class parent_class #define gst_rtp_gsm_depay_parent_class parent_class
G_DEFINE_TYPE (GstRTPGSMDepay, gst_rtp_gsm_depay, GST_TYPE_BASE_RTP_DEPAYLOAD); G_DEFINE_TYPE (GstRTPGSMDepay, gst_rtp_gsm_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
static void static void
gst_rtp_gsm_depay_class_init (GstRTPGSMDepayClass * klass) gst_rtp_gsm_depay_class_init (GstRTPGSMDepayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertp_depayload_class; GstRTPBaseDepayloadClass *gstrtpbase_depayload_class;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertp_depayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbase_depayload_class = (GstRTPBaseDepayloadClass *) klass;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_gsm_depay_src_template)); gst_static_pad_template_get (&gst_rtp_gsm_depay_src_template));
@ -83,8 +83,8 @@ gst_rtp_gsm_depay_class_init (GstRTPGSMDepayClass * klass)
"Codec/Depayloader/Network/RTP", "Codec/Depayloader/Network/RTP",
"Extracts GSM audio from RTP packets", "Zeeshan Ali <zeenix@gmail.com>"); "Extracts GSM audio from RTP packets", "Zeeshan Ali <zeenix@gmail.com>");
gstbasertp_depayload_class->process = gst_rtp_gsm_depay_process; gstrtpbase_depayload_class->process = gst_rtp_gsm_depay_process;
gstbasertp_depayload_class->set_caps = gst_rtp_gsm_depay_setcaps; gstrtpbase_depayload_class->set_caps = gst_rtp_gsm_depay_setcaps;
GST_DEBUG_CATEGORY_INIT (rtpgsmdepay_debug, "rtpgsmdepay", 0, GST_DEBUG_CATEGORY_INIT (rtpgsmdepay_debug, "rtpgsmdepay", 0,
"GSM Audio RTP Depayloader"); "GSM Audio RTP Depayloader");
@ -96,7 +96,7 @@ gst_rtp_gsm_depay_init (GstRTPGSMDepay * rtpgsmdepay)
} }
static gboolean static gboolean
gst_rtp_gsm_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_gsm_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstCaps *srccaps; GstCaps *srccaps;
gboolean ret; gboolean ret;
@ -111,14 +111,14 @@ gst_rtp_gsm_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
srccaps = gst_caps_new_simple ("audio/x-gsm", srccaps = gst_caps_new_simple ("audio/x-gsm",
"channels", G_TYPE_INT, 1, "rate", G_TYPE_INT, clock_rate, NULL); "channels", G_TYPE_INT, 1, "rate", G_TYPE_INT, clock_rate, NULL);
ret = gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload), srccaps); ret = gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload), srccaps);
gst_caps_unref (srccaps); gst_caps_unref (srccaps);
return ret; return ret;
} }
static GstBuffer * static GstBuffer *
gst_rtp_gsm_depay_process (GstBaseRTPDepayload * _depayload, GstBuffer * buf) gst_rtp_gsm_depay_process (GstRTPBaseDepayload * _depayload, GstBuffer * buf)
{ {
GstBuffer *outbuf = NULL; GstBuffer *outbuf = NULL;
gboolean marker; gboolean marker;

View file

@ -41,12 +41,12 @@ typedef struct _GstRTPGSMDepayClass GstRTPGSMDepayClass;
struct _GstRTPGSMDepay struct _GstRTPGSMDepay
{ {
GstBaseRTPDepayload _depayload; GstRTPBaseDepayload _depayload;
}; };
struct _GstRTPGSMDepayClass struct _GstRTPGSMDepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_gsm_depay_get_type (void); GType gst_rtp_gsm_depay_get_type (void);

View file

@ -52,25 +52,25 @@ static GstStaticPadTemplate gst_rtp_gsm_pay_src_template =
"clock-rate = (int) 8000, " "encoding-name = (string) \"GSM\"") "clock-rate = (int) 8000, " "encoding-name = (string) \"GSM\"")
); );
static gboolean gst_rtp_gsm_pay_setcaps (GstBaseRTPPayload * payload, static gboolean gst_rtp_gsm_pay_setcaps (GstRTPBasePayload * payload,
GstCaps * caps); GstCaps * caps);
static GstFlowReturn gst_rtp_gsm_pay_handle_buffer (GstBaseRTPPayload * payload, static GstFlowReturn gst_rtp_gsm_pay_handle_buffer (GstRTPBasePayload * payload,
GstBuffer * buffer); GstBuffer * buffer);
#define gst_rtp_gsm_pay_parent_class parent_class #define gst_rtp_gsm_pay_parent_class parent_class
G_DEFINE_TYPE (GstRTPGSMPay, gst_rtp_gsm_pay, GST_TYPE_BASE_RTP_PAYLOAD); G_DEFINE_TYPE (GstRTPGSMPay, gst_rtp_gsm_pay, GST_TYPE_RTP_BASE_PAYLOAD);
static void static void
gst_rtp_gsm_pay_class_init (GstRTPGSMPayClass * klass) gst_rtp_gsm_pay_class_init (GstRTPGSMPayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
GST_DEBUG_CATEGORY_INIT (rtpgsmpay_debug, "rtpgsmpay", 0, GST_DEBUG_CATEGORY_INIT (rtpgsmpay_debug, "rtpgsmpay", 0,
"GSM Audio RTP Payloader"); "GSM Audio RTP Payloader");
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_gsm_pay_sink_template)); gst_static_pad_template_get (&gst_rtp_gsm_pay_sink_template));
@ -82,19 +82,19 @@ gst_rtp_gsm_pay_class_init (GstRTPGSMPayClass * klass)
"Payload-encodes GSM audio into a RTP packet", "Payload-encodes GSM audio into a RTP packet",
"Zeeshan Ali <zeenix@gmail.com>"); "Zeeshan Ali <zeenix@gmail.com>");
gstbasertppayload_class->set_caps = gst_rtp_gsm_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_gsm_pay_setcaps;
gstbasertppayload_class->handle_buffer = gst_rtp_gsm_pay_handle_buffer; gstrtpbasepayload_class->handle_buffer = gst_rtp_gsm_pay_handle_buffer;
} }
static void static void
gst_rtp_gsm_pay_init (GstRTPGSMPay * rtpgsmpay) gst_rtp_gsm_pay_init (GstRTPGSMPay * rtpgsmpay)
{ {
GST_BASE_RTP_PAYLOAD (rtpgsmpay)->clock_rate = 8000; GST_RTP_BASE_PAYLOAD (rtpgsmpay)->clock_rate = 8000;
GST_BASE_RTP_PAYLOAD_PT (rtpgsmpay) = GST_RTP_PAYLOAD_GSM; GST_RTP_BASE_PAYLOAD_PT (rtpgsmpay) = GST_RTP_PAYLOAD_GSM;
} }
static gboolean static gboolean
gst_rtp_gsm_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps) gst_rtp_gsm_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
{ {
const char *stname; const char *stname;
GstStructure *structure; GstStructure *structure;
@ -107,8 +107,8 @@ gst_rtp_gsm_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
if (strcmp ("audio/x-gsm", stname)) if (strcmp ("audio/x-gsm", stname))
goto invalid_type; goto invalid_type;
gst_base_rtp_payload_set_options (payload, "audio", FALSE, "GSM", 8000); gst_rtp_base_payload_set_options (payload, "audio", FALSE, "GSM", 8000);
res = gst_base_rtp_payload_set_outcaps (payload, NULL); res = gst_rtp_base_payload_set_outcaps (payload, NULL);
return res; return res;
@ -121,7 +121,7 @@ invalid_type:
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_gsm_pay_handle_buffer (GstBaseRTPPayload * basepayload, gst_rtp_gsm_pay_handle_buffer (GstRTPBasePayload * basepayload,
GstBuffer * buffer) GstBuffer * buffer)
{ {
GstRTPGSMPay *rtpgsmpay; GstRTPGSMPay *rtpgsmpay;
@ -144,7 +144,7 @@ gst_rtp_gsm_pay_handle_buffer (GstBaseRTPPayload * basepayload,
payload_len = size; payload_len = size;
/* FIXME, just error out for now */ /* FIXME, just error out for now */
if (payload_len > GST_BASE_RTP_PAYLOAD_MTU (rtpgsmpay)) if (payload_len > GST_RTP_BASE_PAYLOAD_MTU (rtpgsmpay))
goto too_big; goto too_big;
outbuf = gst_rtp_buffer_new_allocate (payload_len, 0, 0); outbuf = gst_rtp_buffer_new_allocate (payload_len, 0, 0);
@ -168,7 +168,7 @@ gst_rtp_gsm_pay_handle_buffer (GstBaseRTPPayload * basepayload,
GST_DEBUG ("gst_rtp_gsm_pay_chain: pushing buffer of size %d", GST_DEBUG ("gst_rtp_gsm_pay_chain: pushing buffer of size %d",
gst_buffer_get_size (outbuf)); gst_buffer_get_size (outbuf));
ret = gst_base_rtp_payload_push (basepayload, outbuf); ret = gst_rtp_base_payload_push (basepayload, outbuf);
return ret; return ret;
@ -177,7 +177,7 @@ too_big:
{ {
GST_ELEMENT_ERROR (rtpgsmpay, STREAM, ENCODE, (NULL), GST_ELEMENT_ERROR (rtpgsmpay, STREAM, ENCODE, (NULL),
("payload_len %u > mtu %u", payload_len, ("payload_len %u > mtu %u", payload_len,
GST_BASE_RTP_PAYLOAD_MTU (rtpgsmpay))); GST_RTP_BASE_PAYLOAD_MTU (rtpgsmpay)));
gst_buffer_unmap (buffer, data, size); gst_buffer_unmap (buffer, data, size);
return GST_FLOW_ERROR; return GST_FLOW_ERROR;
} }

View file

@ -42,12 +42,12 @@ typedef struct _GstRTPGSMPayClass GstRTPGSMPayClass;
struct _GstRTPGSMPay struct _GstRTPGSMPay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
}; };
struct _GstRTPGSMPayClass struct _GstRTPGSMPayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
GType gst_rtp_gsm_pay_get_type (void); GType gst_rtp_gsm_pay_get_type (void);

View file

@ -46,7 +46,7 @@ GST_STATIC_PAD_TEMPLATE ("sink",
); );
#define gst_rtp_gst_depay_parent_class parent_class #define gst_rtp_gst_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpGSTDepay, gst_rtp_gst_depay, GST_TYPE_BASE_RTP_DEPAYLOAD); G_DEFINE_TYPE (GstRtpGSTDepay, gst_rtp_gst_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
static void gst_rtp_gst_depay_finalize (GObject * object); static void gst_rtp_gst_depay_finalize (GObject * object);
@ -54,9 +54,9 @@ static GstStateChangeReturn gst_rtp_gst_depay_change_state (GstElement *
element, GstStateChange transition); element, GstStateChange transition);
static void gst_rtp_gst_depay_reset (GstRtpGSTDepay * rtpgstdepay); static void gst_rtp_gst_depay_reset (GstRtpGSTDepay * rtpgstdepay);
static gboolean gst_rtp_gst_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_gst_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
static GstBuffer *gst_rtp_gst_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_gst_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static void static void
@ -64,14 +64,14 @@ gst_rtp_gst_depay_class_init (GstRtpGSTDepayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
GST_DEBUG_CATEGORY_INIT (rtpgstdepay_debug, "rtpgstdepay", 0, GST_DEBUG_CATEGORY_INIT (rtpgstdepay_debug, "rtpgstdepay", 0,
"Gstreamer RTP Depayloader"); "Gstreamer RTP Depayloader");
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gobject_class->finalize = gst_rtp_gst_depay_finalize; gobject_class->finalize = gst_rtp_gst_depay_finalize;
@ -87,8 +87,8 @@ gst_rtp_gst_depay_class_init (GstRtpGSTDepayClass * klass)
"Extracts GStreamer buffers from RTP packets", "Extracts GStreamer buffers from RTP packets",
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gstbasertpdepayload_class->set_caps = gst_rtp_gst_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_gst_depay_setcaps;
gstbasertpdepayload_class->process = gst_rtp_gst_depay_process; gstrtpbasedepayload_class->process = gst_rtp_gst_depay_process;
} }
static void static void
@ -130,7 +130,7 @@ gst_rtp_gst_depay_reset (GstRtpGSTDepay * rtpgstdepay)
} }
static gboolean static gboolean
gst_rtp_gst_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_gst_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstRtpGSTDepay *rtpgstdepay; GstRtpGSTDepay *rtpgstdepay;
GstStructure *structure; GstStructure *structure;
@ -170,7 +170,7 @@ gst_rtp_gst_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
} }
static GstBuffer * static GstBuffer *
gst_rtp_gst_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_gst_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpGSTDepay *rtpgstdepay; GstRtpGSTDepay *rtpgstdepay;
GstBuffer *subbuf, *outbuf = NULL; GstBuffer *subbuf, *outbuf = NULL;

View file

@ -42,7 +42,7 @@ typedef struct _GstRtpGSTDepayClass GstRtpGSTDepayClass;
struct _GstRtpGSTDepay struct _GstRtpGSTDepay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
GstAdapter *adapter; GstAdapter *adapter;
guint current_CV; guint current_CV;
@ -51,7 +51,7 @@ struct _GstRtpGSTDepay
struct _GstRtpGSTDepayClass struct _GstRtpGSTDepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_gst_depay_get_type (void); GType gst_rtp_gst_depay_get_type (void);

View file

@ -65,22 +65,22 @@ GST_STATIC_PAD_TEMPLATE ("src",
"clock-rate = (int) 90000, " "encoding-name = (string) \"X-GST\"") "clock-rate = (int) 90000, " "encoding-name = (string) \"X-GST\"")
); );
static gboolean gst_rtp_gst_pay_setcaps (GstBaseRTPPayload * payload, static gboolean gst_rtp_gst_pay_setcaps (GstRTPBasePayload * payload,
GstCaps * caps); GstCaps * caps);
static GstFlowReturn gst_rtp_gst_pay_handle_buffer (GstBaseRTPPayload * payload, static GstFlowReturn gst_rtp_gst_pay_handle_buffer (GstRTPBasePayload * payload,
GstBuffer * buffer); GstBuffer * buffer);
#define gst_rtp_gst_pay_parent_class parent_class #define gst_rtp_gst_pay_parent_class parent_class
G_DEFINE_TYPE (GstRtpGSTPay, gst_rtp_gst_pay, GST_TYPE_BASE_RTP_PAYLOAD); G_DEFINE_TYPE (GstRtpGSTPay, gst_rtp_gst_pay, GST_TYPE_RTP_BASE_PAYLOAD);
static void static void
gst_rtp_gst_pay_class_init (GstRtpGSTPayClass * klass) gst_rtp_gst_pay_class_init (GstRtpGSTPayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_gst_pay_src_template)); gst_static_pad_template_get (&gst_rtp_gst_pay_src_template));
@ -92,8 +92,8 @@ gst_rtp_gst_pay_class_init (GstRtpGSTPayClass * klass)
"Payload GStreamer buffers as RTP packets", "Payload GStreamer buffers as RTP packets",
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gstbasertppayload_class->set_caps = gst_rtp_gst_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_gst_pay_setcaps;
gstbasertppayload_class->handle_buffer = gst_rtp_gst_pay_handle_buffer; gstrtpbasepayload_class->handle_buffer = gst_rtp_gst_pay_handle_buffer;
} }
static void static void
@ -102,7 +102,7 @@ gst_rtp_gst_pay_init (GstRtpGSTPay * rtpgstpay)
} }
static gboolean static gboolean
gst_rtp_gst_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps) gst_rtp_gst_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
{ {
gboolean res; gboolean res;
gchar *capsstr, *capsenc; gchar *capsstr, *capsenc;
@ -111,10 +111,10 @@ gst_rtp_gst_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
capsenc = g_base64_encode ((guchar *) capsstr, strlen (capsstr)); capsenc = g_base64_encode ((guchar *) capsstr, strlen (capsstr));
g_free (capsstr); g_free (capsstr);
gst_base_rtp_payload_set_options (payload, "application", TRUE, "X-GST", gst_rtp_base_payload_set_options (payload, "application", TRUE, "X-GST",
90000); 90000);
res = res =
gst_base_rtp_payload_set_outcaps (payload, "caps", G_TYPE_STRING, capsenc, gst_rtp_base_payload_set_outcaps (payload, "caps", G_TYPE_STRING, capsenc,
NULL); NULL);
g_free (capsenc); g_free (capsenc);
@ -122,7 +122,7 @@ gst_rtp_gst_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_gst_pay_handle_buffer (GstBaseRTPPayload * basepayload, gst_rtp_gst_pay_handle_buffer (GstRTPBasePayload * basepayload,
GstBuffer * buffer) GstBuffer * buffer)
{ {
GstRtpGSTPay *rtpgstpay; GstRtpGSTPay *rtpgstpay;
@ -170,7 +170,7 @@ gst_rtp_gst_pay_handle_buffer (GstBaseRTPPayload * basepayload,
packet_len = gst_rtp_buffer_calc_packet_len (8 + left, 0, 0); packet_len = gst_rtp_buffer_calc_packet_len (8 + left, 0, 0);
/* fill one MTU or all available bytes */ /* fill one MTU or all available bytes */
towrite = MIN (packet_len, GST_BASE_RTP_PAYLOAD_MTU (rtpgstpay)); towrite = MIN (packet_len, GST_RTP_BASE_PAYLOAD_MTU (rtpgstpay));
/* this is the payload length */ /* this is the payload length */
payload_len = gst_rtp_buffer_calc_payload_len (towrite, 0, 0); payload_len = gst_rtp_buffer_calc_payload_len (towrite, 0, 0);
@ -204,7 +204,7 @@ gst_rtp_gst_pay_handle_buffer (GstBaseRTPPayload * basepayload,
GST_BUFFER_TIMESTAMP (outbuf) = timestamp; GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
ret = gst_base_rtp_payload_push (basepayload, outbuf); ret = gst_rtp_base_payload_push (basepayload, outbuf);
} }
gst_buffer_unmap (buffer, data, size); gst_buffer_unmap (buffer, data, size);
gst_buffer_unref (buffer); gst_buffer_unref (buffer);

View file

@ -41,12 +41,12 @@ typedef struct _GstRtpGSTPayClass GstRtpGSTPayClass;
struct _GstRtpGSTPay struct _GstRtpGSTPay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
}; };
struct _GstRtpGSTPayClass struct _GstRtpGSTPayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
GType gst_rtp_gst_pay_get_type (void); GType gst_rtp_gst_pay_get_type (void);

View file

@ -63,16 +63,16 @@ static GstStaticPadTemplate gst_rtp_h263_depay_sink_template =
#define gst_rtp_h263_depay_parent_class parent_class #define gst_rtp_h263_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpH263Depay, gst_rtp_h263_depay, G_DEFINE_TYPE (GstRtpH263Depay, gst_rtp_h263_depay,
GST_TYPE_BASE_RTP_DEPAYLOAD); GST_TYPE_RTP_BASE_DEPAYLOAD);
static void gst_rtp_h263_depay_finalize (GObject * object); static void gst_rtp_h263_depay_finalize (GObject * object);
static GstStateChangeReturn gst_rtp_h263_depay_change_state (GstElement * static GstStateChangeReturn gst_rtp_h263_depay_change_state (GstElement *
element, GstStateChange transition); element, GstStateChange transition);
static GstBuffer *gst_rtp_h263_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_h263_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
gboolean gst_rtp_h263_depay_setcaps (GstBaseRTPDepayload * filter, gboolean gst_rtp_h263_depay_setcaps (GstRTPBaseDepayload * filter,
GstCaps * caps); GstCaps * caps);
static void static void
@ -80,14 +80,14 @@ gst_rtp_h263_depay_class_init (GstRtpH263DepayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
GST_DEBUG_CATEGORY_INIT (rtph263depay_debug, "rtph263depay", 0, GST_DEBUG_CATEGORY_INIT (rtph263depay_debug, "rtph263depay", 0,
"H263 Video RTP Depayloader"); "H263 Video RTP Depayloader");
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gobject_class->finalize = gst_rtp_h263_depay_finalize; gobject_class->finalize = gst_rtp_h263_depay_finalize;
@ -104,8 +104,8 @@ gst_rtp_h263_depay_class_init (GstRtpH263DepayClass * klass)
"Philippe Kalaf <philippe.kalaf@collabora.co.uk>, " "Philippe Kalaf <philippe.kalaf@collabora.co.uk>, "
"Edward Hervey <bilboed@bilboed.com>"); "Edward Hervey <bilboed@bilboed.com>");
gstbasertpdepayload_class->process = gst_rtp_h263_depay_process; gstrtpbasedepayload_class->process = gst_rtp_h263_depay_process;
gstbasertpdepayload_class->set_caps = gst_rtp_h263_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_h263_depay_setcaps;
} }
static void static void
@ -131,7 +131,7 @@ gst_rtp_h263_depay_finalize (GObject * object)
} }
gboolean gboolean
gst_rtp_h263_depay_setcaps (GstBaseRTPDepayload * filter, GstCaps * caps) gst_rtp_h263_depay_setcaps (GstRTPBaseDepayload * filter, GstCaps * caps)
{ {
GstCaps *srccaps; GstCaps *srccaps;
GstStructure *structure = gst_caps_get_structure (caps, 0); GstStructure *structure = gst_caps_get_structure (caps, 0);
@ -144,14 +144,14 @@ gst_rtp_h263_depay_setcaps (GstBaseRTPDepayload * filter, GstCaps * caps)
srccaps = gst_caps_new_simple ("video/x-h263", srccaps = gst_caps_new_simple ("video/x-h263",
"variant", G_TYPE_STRING, "itu", "variant", G_TYPE_STRING, "itu",
"h263version", G_TYPE_STRING, "h263", NULL); "h263version", G_TYPE_STRING, "h263", NULL);
gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (filter), srccaps); gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (filter), srccaps);
gst_caps_unref (srccaps); gst_caps_unref (srccaps);
return TRUE; return TRUE;
} }
static GstBuffer * static GstBuffer *
gst_rtp_h263_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_h263_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpH263Depay *rtph263depay; GstRtpH263Depay *rtph263depay;
GstBuffer *outbuf; GstBuffer *outbuf;
@ -325,7 +325,7 @@ skip:
GST_DEBUG ("Pushing out a buffer of %d bytes", avail); GST_DEBUG ("Pushing out a buffer of %d bytes", avail);
gst_base_rtp_depayload_push (depayload, outbuf); gst_rtp_base_depayload_push (depayload, outbuf);
rtph263depay->offset = 0; rtph263depay->offset = 0;
rtph263depay->leftover = 0; rtph263depay->leftover = 0;
rtph263depay->start = FALSE; rtph263depay->start = FALSE;

View file

@ -42,7 +42,7 @@ typedef struct _GstRtpH263DepayClass GstRtpH263DepayClass;
struct _GstRtpH263Depay struct _GstRtpH263Depay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
guint8 offset; /* offset to apply to next payload */ guint8 offset; /* offset to apply to next payload */
guint8 leftover; /* leftover from previous payload (if offset != 0) */ guint8 leftover; /* leftover from previous payload (if offset != 0) */
@ -53,7 +53,7 @@ struct _GstRtpH263Depay
struct _GstRtpH263DepayClass struct _GstRtpH263DepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_h263_depay_get_type (void); GType gst_rtp_h263_depay_get_type (void);

View file

@ -369,13 +369,13 @@ static GstStaticPadTemplate gst_rtp_h263_pay_src_template =
static void gst_rtp_h263_pay_finalize (GObject * object); static void gst_rtp_h263_pay_finalize (GObject * object);
static gboolean gst_rtp_h263_pay_setcaps (GstBaseRTPPayload * payload, static gboolean gst_rtp_h263_pay_setcaps (GstRTPBasePayload * payload,
GstCaps * caps); GstCaps * caps);
static void gst_rtp_h263_pay_set_property (GObject * object, guint prop_id, static void gst_rtp_h263_pay_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);
static void gst_rtp_h263_pay_get_property (GObject * object, guint prop_id, static void gst_rtp_h263_pay_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static GstFlowReturn gst_rtp_h263_pay_handle_buffer (GstBaseRTPPayload * static GstFlowReturn gst_rtp_h263_pay_handle_buffer (GstRTPBasePayload *
payload, GstBuffer * buffer); payload, GstBuffer * buffer);
static void gst_rtp_h263_pay_boundry_init (GstRtpH263PayBoundry * boundry, static void gst_rtp_h263_pay_boundry_init (GstRtpH263PayBoundry * boundry,
@ -396,23 +396,23 @@ static void gst_rtp_h263_pay_context_destroy (GstRtpH263PayContext * context,
static void gst_rtp_h263_pay_package_destroy (GstRtpH263PayPackage * pack); static void gst_rtp_h263_pay_package_destroy (GstRtpH263PayPackage * pack);
#define gst_rtp_h263_pay_parent_class parent_class #define gst_rtp_h263_pay_parent_class parent_class
G_DEFINE_TYPE (GstRtpH263Pay, gst_rtp_h263_pay, GST_TYPE_BASE_RTP_PAYLOAD); G_DEFINE_TYPE (GstRtpH263Pay, gst_rtp_h263_pay, GST_TYPE_RTP_BASE_PAYLOAD);
static void static void
gst_rtp_h263_pay_class_init (GstRtpH263PayClass * klass) gst_rtp_h263_pay_class_init (GstRtpH263PayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gobject_class->finalize = gst_rtp_h263_pay_finalize; gobject_class->finalize = gst_rtp_h263_pay_finalize;
gstbasertppayload_class->set_caps = gst_rtp_h263_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_h263_pay_setcaps;
gstbasertppayload_class->handle_buffer = gst_rtp_h263_pay_handle_buffer; gstrtpbasepayload_class->handle_buffer = gst_rtp_h263_pay_handle_buffer;
gobject_class->set_property = gst_rtp_h263_pay_set_property; gobject_class->set_property = gst_rtp_h263_pay_set_property;
gobject_class->get_property = gst_rtp_h263_pay_get_property; gobject_class->get_property = gst_rtp_h263_pay_get_property;
@ -459,13 +459,13 @@ gst_rtp_h263_pay_finalize (GObject * object)
} }
static gboolean static gboolean
gst_rtp_h263_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps) gst_rtp_h263_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
{ {
gboolean res; gboolean res;
payload->pt = GST_RTP_PAYLOAD_H263; payload->pt = GST_RTP_PAYLOAD_H263;
gst_base_rtp_payload_set_options (payload, "video", TRUE, "H263", 90000); gst_rtp_base_payload_set_options (payload, "video", TRUE, "H263", 90000);
res = gst_base_rtp_payload_set_outcaps (payload, NULL); res = gst_rtp_base_payload_set_outcaps (payload, NULL);
return res; return res;
} }
@ -1279,7 +1279,7 @@ gst_rtp_h263_pay_push (GstRtpH263Pay * rtph263pay,
gst_rtp_buffer_unmap (&rtp); gst_rtp_buffer_unmap (&rtp);
ret = ret =
gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtph263pay), gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtph263pay),
package->outbuf); package->outbuf);
GST_DEBUG ("Package pushed, returning"); GST_DEBUG ("Package pushed, returning");
@ -1776,7 +1776,7 @@ end:
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_h263_pay_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buffer) gst_rtp_h263_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buffer)
{ {
GstRtpH263Pay *rtph263pay; GstRtpH263Pay *rtph263pay;

View file

@ -61,7 +61,7 @@ typedef struct _GstRtpH263PayPackage GstRtpH263PayPackage;
struct _GstRtpH263Pay struct _GstRtpH263Pay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
GstAdapter *adapter; GstAdapter *adapter;
GstClockTime first_ts; GstClockTime first_ts;
@ -87,7 +87,7 @@ struct _GstRtpH263PayContext
struct _GstRtpH263PayClass struct _GstRtpH263PayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
typedef struct _GstRtpH263PayAHeader typedef struct _GstRtpH263PayAHeader

View file

@ -80,16 +80,16 @@ static GstStaticPadTemplate gst_rtp_h263p_depay_sink_template =
#define gst_rtp_h263p_depay_parent_class parent_class #define gst_rtp_h263p_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpH263PDepay, gst_rtp_h263p_depay, G_DEFINE_TYPE (GstRtpH263PDepay, gst_rtp_h263p_depay,
GST_TYPE_BASE_RTP_DEPAYLOAD); GST_TYPE_RTP_BASE_DEPAYLOAD);
static void gst_rtp_h263p_depay_finalize (GObject * object); static void gst_rtp_h263p_depay_finalize (GObject * object);
static GstStateChangeReturn gst_rtp_h263p_depay_change_state (GstElement * static GstStateChangeReturn gst_rtp_h263p_depay_change_state (GstElement *
element, GstStateChange transition); element, GstStateChange transition);
static GstBuffer *gst_rtp_h263p_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_h263p_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
gboolean gst_rtp_h263p_depay_setcaps (GstBaseRTPDepayload * filter, gboolean gst_rtp_h263p_depay_setcaps (GstRTPBaseDepayload * filter,
GstCaps * caps); GstCaps * caps);
static void static void
@ -97,11 +97,11 @@ gst_rtp_h263p_depay_class_init (GstRtpH263PDepayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gobject_class->finalize = gst_rtp_h263p_depay_finalize; gobject_class->finalize = gst_rtp_h263p_depay_finalize;
@ -117,8 +117,8 @@ gst_rtp_h263p_depay_class_init (GstRtpH263PDepayClass * klass)
"Extracts H263/+/++ video from RTP packets (RFC 4629)", "Extracts H263/+/++ video from RTP packets (RFC 4629)",
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gstbasertpdepayload_class->process = gst_rtp_h263p_depay_process; gstrtpbasedepayload_class->process = gst_rtp_h263p_depay_process;
gstbasertpdepayload_class->set_caps = gst_rtp_h263p_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_h263p_depay_setcaps;
} }
static void static void
@ -141,7 +141,7 @@ gst_rtp_h263p_depay_finalize (GObject * object)
} }
gboolean gboolean
gst_rtp_h263p_depay_setcaps (GstBaseRTPDepayload * filter, GstCaps * caps) gst_rtp_h263p_depay_setcaps (GstRTPBaseDepayload * filter, GstCaps * caps)
{ {
GstCaps *srccaps = NULL; GstCaps *srccaps = NULL;
GstStructure *structure = gst_caps_get_structure (caps, 0); GstStructure *structure = gst_caps_get_structure (caps, 0);
@ -207,7 +207,7 @@ gst_rtp_h263p_depay_setcaps (GstBaseRTPDepayload * filter, GstCaps * caps)
if (!srccaps) if (!srccaps)
goto no_caps; goto no_caps;
res = gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (filter), srccaps); res = gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (filter), srccaps);
gst_caps_unref (srccaps); gst_caps_unref (srccaps);
return res; return res;
@ -226,7 +226,7 @@ no_caps:
} }
static GstBuffer * static GstBuffer *
gst_rtp_h263p_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_h263p_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpH263PDepay *rtph263pdepay; GstRtpH263PDepay *rtph263pdepay;
GstBuffer *outbuf; GstBuffer *outbuf;

View file

@ -42,7 +42,7 @@ typedef struct _GstRtpH263PDepayClass GstRtpH263PDepayClass;
struct _GstRtpH263PDepay struct _GstRtpH263PDepay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
GstAdapter *adapter; GstAdapter *adapter;
gboolean wait_start; gboolean wait_start;
@ -50,7 +50,7 @@ struct _GstRtpH263PDepay
struct _GstRtpH263PDepayClass struct _GstRtpH263PDepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_h263p_depay_get_type (void); GType gst_rtp_h263p_depay_get_type (void);

View file

@ -101,34 +101,34 @@ static void gst_rtp_h263p_pay_set_property (GObject * object, guint prop_id,
static void gst_rtp_h263p_pay_get_property (GObject * object, guint prop_id, static void gst_rtp_h263p_pay_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static gboolean gst_rtp_h263p_pay_setcaps (GstBaseRTPPayload * payload, static gboolean gst_rtp_h263p_pay_setcaps (GstRTPBasePayload * payload,
GstCaps * caps); GstCaps * caps);
static GstCaps *gst_rtp_h263p_pay_sink_getcaps (GstBaseRTPPayload * payload, static GstCaps *gst_rtp_h263p_pay_sink_getcaps (GstRTPBasePayload * payload,
GstPad * pad, GstCaps * filter); GstPad * pad, GstCaps * filter);
static GstFlowReturn gst_rtp_h263p_pay_handle_buffer (GstBaseRTPPayload * static GstFlowReturn gst_rtp_h263p_pay_handle_buffer (GstRTPBasePayload *
payload, GstBuffer * buffer); payload, GstBuffer * buffer);
#define gst_rtp_h263p_pay_parent_class parent_class #define gst_rtp_h263p_pay_parent_class parent_class
G_DEFINE_TYPE (GstRtpH263PPay, gst_rtp_h263p_pay, GST_TYPE_BASE_RTP_PAYLOAD); G_DEFINE_TYPE (GstRtpH263PPay, gst_rtp_h263p_pay, GST_TYPE_RTP_BASE_PAYLOAD);
static void static void
gst_rtp_h263p_pay_class_init (GstRtpH263PPayClass * klass) gst_rtp_h263p_pay_class_init (GstRtpH263PPayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gobject_class->finalize = gst_rtp_h263p_pay_finalize; gobject_class->finalize = gst_rtp_h263p_pay_finalize;
gobject_class->set_property = gst_rtp_h263p_pay_set_property; gobject_class->set_property = gst_rtp_h263p_pay_set_property;
gobject_class->get_property = gst_rtp_h263p_pay_get_property; gobject_class->get_property = gst_rtp_h263p_pay_get_property;
gstbasertppayload_class->set_caps = gst_rtp_h263p_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_h263p_pay_setcaps;
gstbasertppayload_class->get_caps = gst_rtp_h263p_pay_sink_getcaps; gstrtpbasepayload_class->get_caps = gst_rtp_h263p_pay_sink_getcaps;
gstbasertppayload_class->handle_buffer = gst_rtp_h263p_pay_handle_buffer; gstrtpbasepayload_class->handle_buffer = gst_rtp_h263p_pay_handle_buffer;
g_object_class_install_property (G_OBJECT_CLASS (klass), g_object_class_install_property (G_OBJECT_CLASS (klass),
PROP_FRAGMENTATION_MODE, g_param_spec_enum ("fragmentation-mode", PROP_FRAGMENTATION_MODE, g_param_spec_enum ("fragmentation-mode",
@ -173,7 +173,7 @@ gst_rtp_h263p_pay_finalize (GObject * object)
} }
static gboolean static gboolean
gst_rtp_h263p_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps) gst_rtp_h263p_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
{ {
gboolean res; gboolean res;
GstCaps *peercaps; GstCaps *peercaps;
@ -182,10 +182,10 @@ gst_rtp_h263p_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
g_return_val_if_fail (gst_caps_is_fixed (caps), FALSE); g_return_val_if_fail (gst_caps_is_fixed (caps), FALSE);
peercaps = peercaps =
gst_pad_peer_get_caps (GST_BASE_RTP_PAYLOAD_SRCPAD (payload), NULL); gst_pad_peer_get_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload), NULL);
if (peercaps) { if (peercaps) {
GstCaps *intersect = gst_caps_intersect (peercaps, GstCaps *intersect = gst_caps_intersect (peercaps,
gst_pad_get_pad_template_caps (GST_BASE_RTP_PAYLOAD_SRCPAD (payload))); gst_pad_get_pad_template_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload)));
gst_caps_unref (peercaps); gst_caps_unref (peercaps);
if (!gst_caps_is_empty (intersect)) { if (!gst_caps_is_empty (intersect)) {
@ -198,9 +198,9 @@ gst_rtp_h263p_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
if (!encoding_name) if (!encoding_name)
encoding_name = g_strdup ("H263-1998"); encoding_name = g_strdup ("H263-1998");
gst_base_rtp_payload_set_options (payload, "video", TRUE, gst_rtp_base_payload_set_options (payload, "video", TRUE,
(gchar *) encoding_name, 90000); (gchar *) encoding_name, 90000);
res = gst_base_rtp_payload_set_outcaps (payload, NULL); res = gst_rtp_base_payload_set_outcaps (payload, NULL);
g_free (encoding_name); g_free (encoding_name);
return res; return res;
@ -229,7 +229,7 @@ caps_append (GstCaps * caps, GstStructure * in_s, guint x, guint y, guint mpi)
static GstCaps * static GstCaps *
gst_rtp_h263p_pay_sink_getcaps (GstBaseRTPPayload * payload, GstPad * pad, gst_rtp_h263p_pay_sink_getcaps (GstRTPBasePayload * payload, GstPad * pad,
GstCaps * filter) GstCaps * filter)
{ {
GstRtpH263PPay *rtph263ppay; GstRtpH263PPay *rtph263ppay;
@ -241,14 +241,14 @@ gst_rtp_h263p_pay_sink_getcaps (GstBaseRTPPayload * payload, GstPad * pad,
rtph263ppay = GST_RTP_H263P_PAY (payload); rtph263ppay = GST_RTP_H263P_PAY (payload);
peercaps = peercaps =
gst_pad_peer_get_caps (GST_BASE_RTP_PAYLOAD_SRCPAD (payload), filter); gst_pad_peer_get_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload), filter);
if (!peercaps) if (!peercaps)
return return
gst_caps_copy (gst_pad_get_pad_template_caps gst_caps_copy (gst_pad_get_pad_template_caps
(GST_BASE_RTP_PAYLOAD_SINKPAD (payload))); (GST_RTP_BASE_PAYLOAD_SINKPAD (payload)));
intersect = gst_caps_intersect (peercaps, intersect = gst_caps_intersect (peercaps,
gst_pad_get_pad_template_caps (GST_BASE_RTP_PAYLOAD_SRCPAD (payload))); gst_pad_get_pad_template_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload)));
gst_caps_unref (peercaps); gst_caps_unref (peercaps);
if (gst_caps_is_empty (intersect)) if (gst_caps_is_empty (intersect))
@ -686,7 +686,7 @@ gst_rtp_h263p_pay_flush (GstRtpH263PPay * rtph263ppay)
header_len = (fragmented && !found_gob) ? 2 : 0; header_len = (fragmented && !found_gob) ? 2 : 0;
towrite = MIN (avail, gst_rtp_buffer_calc_payload_len towrite = MIN (avail, gst_rtp_buffer_calc_payload_len
(GST_BASE_RTP_PAYLOAD_MTU (rtph263ppay) - header_len, 0, 0)); (GST_RTP_BASE_PAYLOAD_MTU (rtph263ppay) - header_len, 0, 0));
if (next_gop > 0) if (next_gop > 0)
towrite = MIN (next_gop, towrite); towrite = MIN (next_gop, towrite);
@ -720,7 +720,7 @@ gst_rtp_h263p_pay_flush (GstRtpH263PPay * rtph263ppay)
gst_adapter_flush (rtph263ppay->adapter, towrite); gst_adapter_flush (rtph263ppay->adapter, towrite);
ret = ret =
gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtph263ppay), outbuf); gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtph263ppay), outbuf);
avail -= towrite; avail -= towrite;
fragmented = TRUE; fragmented = TRUE;
@ -730,7 +730,7 @@ gst_rtp_h263p_pay_flush (GstRtpH263PPay * rtph263ppay)
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_h263p_pay_handle_buffer (GstBaseRTPPayload * payload, gst_rtp_h263p_pay_handle_buffer (GstRTPBasePayload * payload,
GstBuffer * buffer) GstBuffer * buffer)
{ {
GstRtpH263PPay *rtph263ppay; GstRtpH263PPay *rtph263ppay;

View file

@ -48,7 +48,7 @@ typedef enum
struct _GstRtpH263PPay struct _GstRtpH263PPay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
GstAdapter *adapter; GstAdapter *adapter;
GstClockTime first_timestamp; GstClockTime first_timestamp;
@ -58,7 +58,7 @@ struct _GstRtpH263PPay
struct _GstRtpH263PPayClass struct _GstRtpH263PPayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
GType gst_rtp_h263p_pay_get_type (void); GType gst_rtp_h263p_pay_get_type (void);

View file

@ -81,7 +81,7 @@ GST_STATIC_PAD_TEMPLATE ("sink",
#define gst_rtp_h264_depay_parent_class parent_class #define gst_rtp_h264_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpH264Depay, gst_rtp_h264_depay, G_DEFINE_TYPE (GstRtpH264Depay, gst_rtp_h264_depay,
GST_TYPE_BASE_RTP_DEPAYLOAD); GST_TYPE_RTP_BASE_DEPAYLOAD);
static void gst_rtp_h264_depay_finalize (GObject * object); static void gst_rtp_h264_depay_finalize (GObject * object);
static void gst_rtp_h264_depay_set_property (GObject * object, guint prop_id, static void gst_rtp_h264_depay_set_property (GObject * object, guint prop_id,
@ -92,11 +92,11 @@ static void gst_rtp_h264_depay_get_property (GObject * object, guint prop_id,
static GstStateChangeReturn gst_rtp_h264_depay_change_state (GstElement * static GstStateChangeReturn gst_rtp_h264_depay_change_state (GstElement *
element, GstStateChange transition); element, GstStateChange transition);
static GstBuffer *gst_rtp_h264_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_h264_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static gboolean gst_rtp_h264_depay_setcaps (GstBaseRTPDepayload * filter, static gboolean gst_rtp_h264_depay_setcaps (GstRTPBaseDepayload * filter,
GstCaps * caps); GstCaps * caps);
static gboolean gst_rtp_h264_depay_handle_event (GstBaseRTPDepayload * depay, static gboolean gst_rtp_h264_depay_handle_event (GstRTPBaseDepayload * depay,
GstEvent * event); GstEvent * event);
static void static void
@ -104,11 +104,11 @@ gst_rtp_h264_depay_class_init (GstRtpH264DepayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gobject_class->finalize = gst_rtp_h264_depay_finalize; gobject_class->finalize = gst_rtp_h264_depay_finalize;
@ -135,9 +135,9 @@ gst_rtp_h264_depay_class_init (GstRtpH264DepayClass * klass)
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gstelement_class->change_state = gst_rtp_h264_depay_change_state; gstelement_class->change_state = gst_rtp_h264_depay_change_state;
gstbasertpdepayload_class->process = gst_rtp_h264_depay_process; gstrtpbasedepayload_class->process = gst_rtp_h264_depay_process;
gstbasertpdepayload_class->set_caps = gst_rtp_h264_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_h264_depay_setcaps;
gstbasertpdepayload_class->handle_event = gst_rtp_h264_depay_handle_event; gstrtpbasedepayload_class->handle_event = gst_rtp_h264_depay_handle_event;
GST_DEBUG_CATEGORY_INIT (rtph264depay_debug, "rtph264depay", 0, GST_DEBUG_CATEGORY_INIT (rtph264depay_debug, "rtph264depay", 0,
"H264 Video RTP Depayloader"); "H264 Video RTP Depayloader");
@ -230,7 +230,7 @@ gst_rtp_h264_depay_negotiate (GstRtpH264Depay * rtph264depay)
gint merge = -1; gint merge = -1;
caps = caps =
gst_pad_get_allowed_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (rtph264depay)); gst_pad_get_allowed_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph264depay));
GST_DEBUG_OBJECT (rtph264depay, "allowed caps: %" GST_PTR_FORMAT, caps); GST_DEBUG_OBJECT (rtph264depay, "allowed caps: %" GST_PTR_FORMAT, caps);
@ -282,7 +282,7 @@ gst_rtp_h264_depay_negotiate (GstRtpH264Depay * rtph264depay)
} }
static gboolean static gboolean
gst_rtp_h264_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_h264_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstCaps *srccaps; GstCaps *srccaps;
gint clock_rate; gint clock_rate;
@ -505,7 +505,7 @@ static GstBuffer *
gst_rtp_h264_depay_handle_nal (GstRtpH264Depay * rtph264depay, GstBuffer * nal, gst_rtp_h264_depay_handle_nal (GstRtpH264Depay * rtph264depay, GstBuffer * nal,
GstClockTime in_timestamp, gboolean marker) GstClockTime in_timestamp, gboolean marker)
{ {
GstBaseRTPDepayload *depayload = GST_BASE_RTP_DEPAYLOAD (rtph264depay); GstRTPBaseDepayload *depayload = GST_RTP_BASE_DEPAYLOAD (rtph264depay);
gint nal_type; gint nal_type;
gsize size; gsize size;
guint8 *data; guint8 *data;
@ -629,7 +629,7 @@ gst_rtp_h264_push_fragmentation_unit (GstRtpH264Depay * rtph264depay,
outbuf = gst_rtp_h264_depay_handle_nal (rtph264depay, outbuf, outbuf = gst_rtp_h264_depay_handle_nal (rtph264depay, outbuf,
rtph264depay->fu_timestamp, rtph264depay->fu_marker); rtph264depay->fu_timestamp, rtph264depay->fu_marker);
if (outbuf) if (outbuf)
gst_base_rtp_depayload_push (GST_BASE_RTP_DEPAYLOAD (rtph264depay), gst_rtp_base_depayload_push (GST_RTP_BASE_DEPAYLOAD (rtph264depay),
outbuf); outbuf);
return NULL; return NULL;
} else { } else {
@ -639,7 +639,7 @@ gst_rtp_h264_push_fragmentation_unit (GstRtpH264Depay * rtph264depay,
} }
static GstBuffer * static GstBuffer *
gst_rtp_h264_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_h264_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpH264Depay *rtph264depay; GstRtpH264Depay *rtph264depay;
GstBuffer *outbuf = NULL; GstBuffer *outbuf = NULL;
@ -916,7 +916,7 @@ not_implemented:
} }
static gboolean static gboolean
gst_rtp_h264_depay_handle_event (GstBaseRTPDepayload * depay, GstEvent * event) gst_rtp_h264_depay_handle_event (GstRTPBaseDepayload * depay, GstEvent * event)
{ {
GstRtpH264Depay *rtph264depay; GstRtpH264Depay *rtph264depay;
@ -931,7 +931,7 @@ gst_rtp_h264_depay_handle_event (GstBaseRTPDepayload * depay, GstEvent * event)
} }
return return
GST_BASE_RTP_DEPAYLOAD_CLASS (parent_class)->handle_event (depay, event); GST_RTP_BASE_DEPAYLOAD_CLASS (parent_class)->handle_event (depay, event);
} }
static GstStateChangeReturn static GstStateChangeReturn

View file

@ -42,7 +42,7 @@ typedef struct _GstRtpH264DepayClass GstRtpH264DepayClass;
struct _GstRtpH264Depay struct _GstRtpH264Depay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
gboolean byte_stream; gboolean byte_stream;
@ -65,7 +65,7 @@ struct _GstRtpH264Depay
struct _GstRtpH264DepayClass struct _GstRtpH264DepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_h264_depay_get_type (void); GType gst_rtp_h264_depay_get_type (void);

View file

@ -110,30 +110,30 @@ static void gst_rtp_h264_pay_set_property (GObject * object, guint prop_id,
static void gst_rtp_h264_pay_get_property (GObject * object, guint prop_id, static void gst_rtp_h264_pay_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static GstCaps *gst_rtp_h264_pay_getcaps (GstBaseRTPPayload * payload, static GstCaps *gst_rtp_h264_pay_getcaps (GstRTPBasePayload * payload,
GstPad * pad, GstCaps * filter); GstPad * pad, GstCaps * filter);
static gboolean gst_rtp_h264_pay_setcaps (GstBaseRTPPayload * basepayload, static gboolean gst_rtp_h264_pay_setcaps (GstRTPBasePayload * basepayload,
GstCaps * caps); GstCaps * caps);
static GstFlowReturn gst_rtp_h264_pay_handle_buffer (GstBaseRTPPayload * pad, static GstFlowReturn gst_rtp_h264_pay_handle_buffer (GstRTPBasePayload * pad,
GstBuffer * buffer); GstBuffer * buffer);
static gboolean gst_rtp_h264_pay_handle_event (GstBaseRTPPayload * payload, static gboolean gst_rtp_h264_pay_handle_event (GstRTPBasePayload * payload,
GstEvent * event); GstEvent * event);
static GstStateChangeReturn gst_rtp_h264_pay_change_state (GstElement * static GstStateChangeReturn gst_rtp_h264_pay_change_state (GstElement *
element, GstStateChange transition); element, GstStateChange transition);
#define gst_rtp_h264_pay_parent_class parent_class #define gst_rtp_h264_pay_parent_class parent_class
G_DEFINE_TYPE (GstRtpH264Pay, gst_rtp_h264_pay, GST_TYPE_BASE_RTP_PAYLOAD); G_DEFINE_TYPE (GstRtpH264Pay, gst_rtp_h264_pay, GST_TYPE_RTP_BASE_PAYLOAD);
static void static void
gst_rtp_h264_pay_class_init (GstRtpH264PayClass * klass) gst_rtp_h264_pay_class_init (GstRtpH264PayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gobject_class->set_property = gst_rtp_h264_pay_set_property; gobject_class->set_property = gst_rtp_h264_pay_set_property;
gobject_class->get_property = gst_rtp_h264_pay_get_property; gobject_class->get_property = gst_rtp_h264_pay_get_property;
@ -190,10 +190,10 @@ gst_rtp_h264_pay_class_init (GstRtpH264PayClass * klass)
gstelement_class->change_state = gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_rtp_h264_pay_change_state); GST_DEBUG_FUNCPTR (gst_rtp_h264_pay_change_state);
gstbasertppayload_class->get_caps = gst_rtp_h264_pay_getcaps; gstrtpbasepayload_class->get_caps = gst_rtp_h264_pay_getcaps;
gstbasertppayload_class->set_caps = gst_rtp_h264_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_h264_pay_setcaps;
gstbasertppayload_class->handle_buffer = gst_rtp_h264_pay_handle_buffer; gstrtpbasepayload_class->handle_buffer = gst_rtp_h264_pay_handle_buffer;
gstbasertppayload_class->handle_event = gst_rtp_h264_pay_handle_event; gstrtpbasepayload_class->handle_event = gst_rtp_h264_pay_handle_event;
GST_DEBUG_CATEGORY_INIT (rtph264pay_debug, "rtph264pay", 0, GST_DEBUG_CATEGORY_INIT (rtph264pay_debug, "rtph264pay", 0,
"H264 RTP Payloader"); "H264 RTP Payloader");
@ -264,13 +264,13 @@ static const gchar *all_levels[] = {
}; };
static GstCaps * static GstCaps *
gst_rtp_h264_pay_getcaps (GstBaseRTPPayload * payload, GstPad * pad, gst_rtp_h264_pay_getcaps (GstRTPBasePayload * payload, GstPad * pad,
GstCaps * filter) GstCaps * filter)
{ {
GstCaps *allowed_caps; GstCaps *allowed_caps;
allowed_caps = allowed_caps =
gst_pad_peer_get_caps (GST_BASE_RTP_PAYLOAD_SRCPAD (payload), filter); gst_pad_peer_get_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload), filter);
if (allowed_caps) { if (allowed_caps) {
GstCaps *caps = NULL; GstCaps *caps = NULL;
@ -364,7 +364,7 @@ any:
/* take the currently configured SPS and PPS lists and set them on the caps as /* take the currently configured SPS and PPS lists and set them on the caps as
* sprop-parameter-sets */ * sprop-parameter-sets */
static gboolean static gboolean
gst_rtp_h264_pay_set_sps_pps (GstBaseRTPPayload * basepayload) gst_rtp_h264_pay_set_sps_pps (GstRTPBasePayload * basepayload)
{ {
GstRtpH264Pay *payloader = GST_RTP_H264_PAY (basepayload); GstRtpH264Pay *payloader = GST_RTP_H264_PAY (basepayload);
gchar *profile; gchar *profile;
@ -406,7 +406,7 @@ gst_rtp_h264_pay_set_sps_pps (GstBaseRTPPayload * basepayload)
/* profile is 24 bit. Force it to respect the limit */ /* profile is 24 bit. Force it to respect the limit */
profile = g_strdup_printf ("%06x", payloader->profile & 0xffffff); profile = g_strdup_printf ("%06x", payloader->profile & 0xffffff);
/* combine into output caps */ /* combine into output caps */
res = gst_base_rtp_payload_set_outcaps (basepayload, res = gst_rtp_base_payload_set_outcaps (basepayload,
"sprop-parameter-sets", G_TYPE_STRING, sprops->str, NULL); "sprop-parameter-sets", G_TYPE_STRING, sprops->str, NULL);
g_string_free (sprops, TRUE); g_string_free (sprops, TRUE);
g_free (profile); g_free (profile);
@ -415,7 +415,7 @@ gst_rtp_h264_pay_set_sps_pps (GstBaseRTPPayload * basepayload)
} }
static gboolean static gboolean
gst_rtp_h264_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps) gst_rtp_h264_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
{ {
GstRtpH264Pay *rtph264pay; GstRtpH264Pay *rtph264pay;
GstStructure *str; GstStructure *str;
@ -431,7 +431,7 @@ gst_rtp_h264_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
/* we can only set the output caps when we found the sprops and profile /* we can only set the output caps when we found the sprops and profile
* NALs */ * NALs */
gst_base_rtp_payload_set_options (basepayload, "video", TRUE, "H264", 90000); gst_rtp_base_payload_set_options (basepayload, "video", TRUE, "H264", 90000);
alignment = gst_structure_get_string (str, "alignment"); alignment = gst_structure_get_string (str, "alignment");
if (alignment && !strcmp (alignment, "au")) if (alignment && !strcmp (alignment, "au"))
@ -782,12 +782,12 @@ gst_rtp_h264_pay_decode_nal (GstRtpH264Pay * payloader,
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_h264_pay_payload_nal (GstBaseRTPPayload * basepayload, gst_rtp_h264_pay_payload_nal (GstRTPBasePayload * basepayload,
const guint8 * data, guint size, GstClockTime timestamp, const guint8 * data, guint size, GstClockTime timestamp,
GstBuffer * buffer_orig, gboolean end_of_au); GstBuffer * buffer_orig, gboolean end_of_au);
static GstFlowReturn static GstFlowReturn
gst_rtp_h264_pay_send_sps_pps (GstBaseRTPPayload * basepayload, gst_rtp_h264_pay_send_sps_pps (GstRTPBasePayload * basepayload,
GstRtpH264Pay * rtph264pay, GstClockTime timestamp) GstRtpH264Pay * rtph264pay, GstClockTime timestamp)
{ {
GstFlowReturn ret = GST_FLOW_OK; GstFlowReturn ret = GST_FLOW_OK;
@ -829,7 +829,7 @@ gst_rtp_h264_pay_send_sps_pps (GstBaseRTPPayload * basepayload,
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_h264_pay_payload_nal (GstBaseRTPPayload * basepayload, gst_rtp_h264_pay_payload_nal (GstRTPBasePayload * basepayload,
const guint8 * data, guint size, GstClockTime timestamp, const guint8 * data, guint size, GstClockTime timestamp,
GstBuffer * buffer_orig, gboolean end_of_au) GstBuffer * buffer_orig, gboolean end_of_au)
{ {
@ -846,7 +846,7 @@ gst_rtp_h264_pay_payload_nal (GstBaseRTPPayload * basepayload,
GstRTPBuffer rtp = { NULL }; GstRTPBuffer rtp = { NULL };
rtph264pay = GST_RTP_H264_PAY (basepayload); rtph264pay = GST_RTP_H264_PAY (basepayload);
mtu = GST_BASE_RTP_PAYLOAD_MTU (rtph264pay); mtu = GST_RTP_BASE_PAYLOAD_MTU (rtph264pay);
nalType = data[0] & 0x1f; nalType = data[0] & 0x1f;
GST_DEBUG_OBJECT (rtph264pay, "Processing Buffer with NAL TYPE=%d", nalType); GST_DEBUG_OBJECT (rtph264pay, "Processing Buffer with NAL TYPE=%d", nalType);
@ -944,7 +944,7 @@ gst_rtp_h264_pay_payload_nal (GstBaseRTPPayload * basepayload,
gst_buffer_list_add (list, paybuf); gst_buffer_list_add (list, paybuf);
/* push the list to the next element in the pipe */ /* push the list to the next element in the pipe */
ret = gst_base_rtp_payload_push_list (basepayload, list); ret = gst_rtp_base_payload_push_list (basepayload, list);
} else } else
#endif #endif
{ {
@ -953,7 +953,7 @@ gst_rtp_h264_pay_payload_nal (GstBaseRTPPayload * basepayload,
memcpy (payload, data, size); memcpy (payload, data, size);
gst_rtp_buffer_unmap (&rtp); gst_rtp_buffer_unmap (&rtp);
ret = gst_base_rtp_payload_push (basepayload, outbuf); ret = gst_rtp_base_payload_push (basepayload, outbuf);
} }
} else { } else {
/* fragmentation Units FU-A */ /* fragmentation Units FU-A */
@ -1052,7 +1052,7 @@ gst_rtp_h264_pay_payload_nal (GstBaseRTPPayload * basepayload,
"recorded %d payload bytes into packet iteration=%d", "recorded %d payload bytes into packet iteration=%d",
limitedSize + 2, ii); limitedSize + 2, ii);
ret = gst_base_rtp_payload_push (basepayload, outbuf); ret = gst_rtp_base_payload_push (basepayload, outbuf);
if (ret != GST_FLOW_OK) if (ret != GST_FLOW_OK)
break; break;
} }
@ -1067,7 +1067,7 @@ gst_rtp_h264_pay_payload_nal (GstBaseRTPPayload * basepayload,
if (rtph264pay->buffer_list) { if (rtph264pay->buffer_list) {
/* free iterator and push the whole buffer list at once */ /* free iterator and push the whole buffer list at once */
gst_buffer_list_iterator_free (it); gst_buffer_list_iterator_free (it);
ret = gst_base_rtp_payload_push_list (basepayload, list); ret = gst_rtp_base_payload_push_list (basepayload, list);
} }
#endif #endif
} }
@ -1075,7 +1075,7 @@ gst_rtp_h264_pay_payload_nal (GstBaseRTPPayload * basepayload,
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_h264_pay_handle_buffer (GstBaseRTPPayload * basepayload, gst_rtp_h264_pay_handle_buffer (GstRTPBasePayload * basepayload,
GstBuffer * buffer) GstBuffer * buffer)
{ {
GstRtpH264Pay *rtph264pay; GstRtpH264Pay *rtph264pay;
@ -1218,7 +1218,7 @@ gst_rtp_h264_pay_handle_buffer (GstBaseRTPPayload * basepayload,
if (rtph264pay->sprop_parameter_sets != NULL) { if (rtph264pay->sprop_parameter_sets != NULL) {
/* explicitly set profile and sprop, use those */ /* explicitly set profile and sprop, use those */
if (rtph264pay->update_caps) { if (rtph264pay->update_caps) {
if (!gst_base_rtp_payload_set_outcaps (basepayload, if (!gst_rtp_base_payload_set_outcaps (basepayload,
"sprop-parameter-sets", G_TYPE_STRING, "sprop-parameter-sets", G_TYPE_STRING,
rtph264pay->sprop_parameter_sets, NULL)) rtph264pay->sprop_parameter_sets, NULL))
goto caps_rejected; goto caps_rejected;
@ -1322,7 +1322,7 @@ caps_rejected:
} }
static gboolean static gboolean
gst_rtp_h264_pay_handle_event (GstBaseRTPPayload * payload, GstEvent * event) gst_rtp_h264_pay_handle_event (GstRTPBasePayload * payload, GstEvent * event)
{ {
gboolean res; gboolean res;
const GstStructure *s; const GstStructure *s;
@ -1347,7 +1347,7 @@ gst_rtp_h264_pay_handle_event (GstBaseRTPPayload * payload, GstEvent * event)
} }
res = res =
GST_BASE_RTP_PAYLOAD_CLASS (parent_class)->handle_event (payload, event); GST_RTP_BASE_PAYLOAD_CLASS (parent_class)->handle_event (payload, event);
return res; return res;
} }

View file

@ -49,7 +49,7 @@ typedef struct _GstRtpH264PayClass GstRtpH264PayClass;
struct _GstRtpH264Pay struct _GstRtpH264Pay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
guint profile; guint profile;
GList *sps, *pps; GList *sps, *pps;
@ -74,7 +74,7 @@ struct _GstRtpH264Pay
struct _GstRtpH264PayClass struct _GstRtpH264PayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
GType gst_rtp_h264_pay_get_type (void); GType gst_rtp_h264_pay_get_type (void);

View file

@ -66,14 +66,14 @@ static void gst_ilbc_depay_set_property (GObject * object,
static void gst_ilbc_depay_get_property (GObject * object, static void gst_ilbc_depay_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec); guint prop_id, GValue * value, GParamSpec * pspec);
static GstBuffer *gst_rtp_ilbc_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_ilbc_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static gboolean gst_rtp_ilbc_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_ilbc_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
#define gst_rtp_ilbc_depay_parent_class parent_class #define gst_rtp_ilbc_depay_parent_class parent_class
G_DEFINE_TYPE (GstRTPiLBCDepay, gst_rtp_ilbc_depay, G_DEFINE_TYPE (GstRTPiLBCDepay, gst_rtp_ilbc_depay,
GST_TYPE_BASE_RTP_DEPAYLOAD); GST_TYPE_RTP_BASE_DEPAYLOAD);
#define GST_TYPE_ILBC_MODE (gst_ilbc_mode_get_type()) #define GST_TYPE_ILBC_MODE (gst_ilbc_mode_get_type())
static GType static GType
@ -97,11 +97,11 @@ gst_rtp_ilbc_depay_class_init (GstRTPiLBCDepayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gobject_class->set_property = gst_ilbc_depay_set_property; gobject_class->set_property = gst_ilbc_depay_set_property;
gobject_class->get_property = gst_ilbc_depay_get_property; gobject_class->get_property = gst_ilbc_depay_get_property;
@ -122,8 +122,8 @@ gst_rtp_ilbc_depay_class_init (GstRTPiLBCDepayClass * klass)
"Extracts iLBC audio from RTP packets (RFC 3952)", "Extracts iLBC audio from RTP packets (RFC 3952)",
"Philippe Kalaf <philippe.kalaf@collabora.co.uk>"); "Philippe Kalaf <philippe.kalaf@collabora.co.uk>");
gstbasertpdepayload_class->process = gst_rtp_ilbc_depay_process; gstrtpbasedepayload_class->process = gst_rtp_ilbc_depay_process;
gstbasertpdepayload_class->set_caps = gst_rtp_ilbc_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_ilbc_depay_setcaps;
} }
static void static void
@ -134,7 +134,7 @@ gst_rtp_ilbc_depay_init (GstRTPiLBCDepay * rtpilbcdepay)
} }
static gboolean static gboolean
gst_rtp_ilbc_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_ilbc_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstRTPiLBCDepay *rtpilbcdepay = GST_RTP_ILBC_DEPAY (depayload); GstRTPiLBCDepay *rtpilbcdepay = GST_RTP_ILBC_DEPAY (depayload);
GstCaps *srccaps; GstCaps *srccaps;
@ -163,7 +163,7 @@ gst_rtp_ilbc_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
srccaps = gst_caps_new_simple ("audio/x-iLBC", srccaps = gst_caps_new_simple ("audio/x-iLBC",
"mode", G_TYPE_INT, rtpilbcdepay->mode, NULL); "mode", G_TYPE_INT, rtpilbcdepay->mode, NULL);
ret = gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload), srccaps); ret = gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload), srccaps);
GST_DEBUG ("set caps on source: %" GST_PTR_FORMAT " (ret=%d)", srccaps, ret); GST_DEBUG ("set caps on source: %" GST_PTR_FORMAT " (ret=%d)", srccaps, ret);
gst_caps_unref (srccaps); gst_caps_unref (srccaps);
@ -172,7 +172,7 @@ gst_rtp_ilbc_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
} }
static GstBuffer * static GstBuffer *
gst_rtp_ilbc_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_ilbc_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstBuffer *outbuf; GstBuffer *outbuf;
gboolean marker; gboolean marker;

View file

@ -46,14 +46,14 @@ typedef enum {
struct _GstRTPiLBCDepay struct _GstRTPiLBCDepay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
GstiLBCMode mode; GstiLBCMode mode;
}; };
struct _GstRTPiLBCDepayClass struct _GstRTPiLBCDepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_ilbc_depay_get_type (void); GType gst_rtp_ilbc_depay_get_type (void);

View file

@ -48,26 +48,26 @@ GST_STATIC_PAD_TEMPLATE ("src",
); );
static GstCaps *gst_rtp_ilbc_pay_sink_getcaps (GstBaseRTPPayload * payload, static GstCaps *gst_rtp_ilbc_pay_sink_getcaps (GstRTPBasePayload * payload,
GstPad * pad, GstCaps * filter); GstPad * pad, GstCaps * filter);
static gboolean gst_rtp_ilbc_pay_sink_setcaps (GstBaseRTPPayload * payload, static gboolean gst_rtp_ilbc_pay_sink_setcaps (GstRTPBasePayload * payload,
GstCaps * caps); GstCaps * caps);
#define gst_rtp_ilbc_pay_parent_class parent_class #define gst_rtp_ilbc_pay_parent_class parent_class
G_DEFINE_TYPE (GstRTPILBCPay, gst_rtp_ilbc_pay, G_DEFINE_TYPE (GstRTPILBCPay, gst_rtp_ilbc_pay,
GST_TYPE_BASE_RTP_AUDIO_PAYLOAD); GST_TYPE_RTP_BASE_AUDIO_PAYLOAD);
static void static void
gst_rtp_ilbc_pay_class_init (GstRTPILBCPayClass * klass) gst_rtp_ilbc_pay_class_init (GstRTPILBCPayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
GST_DEBUG_CATEGORY_INIT (rtpilbcpay_debug, "rtpilbcpay", 0, GST_DEBUG_CATEGORY_INIT (rtpilbcpay_debug, "rtpilbcpay", 0,
"iLBC audio RTP payloader"); "iLBC audio RTP payloader");
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_ilbc_pay_sink_template)); gst_static_pad_template_get (&gst_rtp_ilbc_pay_sink_template));
@ -79,43 +79,43 @@ gst_rtp_ilbc_pay_class_init (GstRTPILBCPayClass * klass)
"Packetize iLBC audio streams into RTP packets", "Packetize iLBC audio streams into RTP packets",
"Philippe Kalaf <philippe.kalaf@collabora.co.uk>"); "Philippe Kalaf <philippe.kalaf@collabora.co.uk>");
gstbasertppayload_class->set_caps = gst_rtp_ilbc_pay_sink_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_ilbc_pay_sink_setcaps;
gstbasertppayload_class->get_caps = gst_rtp_ilbc_pay_sink_getcaps; gstrtpbasepayload_class->get_caps = gst_rtp_ilbc_pay_sink_getcaps;
} }
static void static void
gst_rtp_ilbc_pay_init (GstRTPILBCPay * rtpilbcpay) gst_rtp_ilbc_pay_init (GstRTPILBCPay * rtpilbcpay)
{ {
GstBaseRTPPayload *basertppayload; GstRTPBasePayload *rtpbasepayload;
GstBaseRTPAudioPayload *basertpaudiopayload; GstRTPBaseAudioPayload *rtpbaseaudiopayload;
basertppayload = GST_BASE_RTP_PAYLOAD (rtpilbcpay); rtpbasepayload = GST_RTP_BASE_PAYLOAD (rtpilbcpay);
basertpaudiopayload = GST_BASE_RTP_AUDIO_PAYLOAD (rtpilbcpay); rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (rtpilbcpay);
/* we don't set the payload type, it should be set by the application using /* we don't set the payload type, it should be set by the application using
* the pt property or the default 96 will be used */ * the pt property or the default 96 will be used */
basertppayload->clock_rate = 8000; rtpbasepayload->clock_rate = 8000;
rtpilbcpay->mode = -1; rtpilbcpay->mode = -1;
/* tell basertpaudiopayload that this is a frame based codec */ /* tell rtpbaseaudiopayload that this is a frame based codec */
gst_base_rtp_audio_payload_set_frame_based (basertpaudiopayload); gst_rtp_base_audio_payload_set_frame_based (rtpbaseaudiopayload);
} }
static gboolean static gboolean
gst_rtp_ilbc_pay_sink_setcaps (GstBaseRTPPayload * basertppayload, gst_rtp_ilbc_pay_sink_setcaps (GstRTPBasePayload * rtpbasepayload,
GstCaps * caps) GstCaps * caps)
{ {
GstRTPILBCPay *rtpilbcpay; GstRTPILBCPay *rtpilbcpay;
GstBaseRTPAudioPayload *basertpaudiopayload; GstRTPBaseAudioPayload *rtpbaseaudiopayload;
gboolean ret; gboolean ret;
gint mode; gint mode;
gchar *mode_str; gchar *mode_str;
GstStructure *structure; GstStructure *structure;
const char *payload_name; const char *payload_name;
rtpilbcpay = GST_RTP_ILBC_PAY (basertppayload); rtpilbcpay = GST_RTP_ILBC_PAY (rtpbasepayload);
basertpaudiopayload = GST_BASE_RTP_AUDIO_PAYLOAD (basertppayload); rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (rtpbasepayload);
structure = gst_caps_get_structure (caps, 0); structure = gst_caps_get_structure (caps, 0);
@ -129,15 +129,15 @@ gst_rtp_ilbc_pay_sink_setcaps (GstBaseRTPPayload * basertppayload,
if (mode != 20 && mode != 30) if (mode != 20 && mode != 30)
goto wrong_mode; goto wrong_mode;
gst_base_rtp_payload_set_options (basertppayload, "audio", TRUE, "ILBC", gst_rtp_base_payload_set_options (rtpbasepayload, "audio", TRUE, "ILBC",
8000); 8000);
/* set options for this frame based audio codec */ /* set options for this frame based audio codec */
gst_base_rtp_audio_payload_set_frame_options (basertpaudiopayload, gst_rtp_base_audio_payload_set_frame_options (rtpbaseaudiopayload,
mode, mode == 30 ? 50 : 38); mode, mode == 30 ? 50 : 38);
mode_str = g_strdup_printf ("%d", mode); mode_str = g_strdup_printf ("%d", mode);
ret = ret =
gst_base_rtp_payload_set_outcaps (basertppayload, "mode", G_TYPE_STRING, gst_rtp_base_payload_set_outcaps (rtpbasepayload, "mode", G_TYPE_STRING,
mode_str, NULL); mode_str, NULL);
g_free (mode_str); g_free (mode_str);
@ -176,7 +176,7 @@ mode_changed:
/* we return the padtemplate caps with the mode field fixated to a value if we /* we return the padtemplate caps with the mode field fixated to a value if we
* can */ * can */
static GstCaps * static GstCaps *
gst_rtp_ilbc_pay_sink_getcaps (GstBaseRTPPayload * rtppayload, GstPad * pad, gst_rtp_ilbc_pay_sink_getcaps (GstRTPBasePayload * rtppayload, GstPad * pad,
GstCaps * filter) GstCaps * filter)
{ {
GstCaps *otherpadcaps; GstCaps *otherpadcaps;

View file

@ -41,14 +41,14 @@ typedef struct _GstRTPILBCPayClass GstRTPILBCPayClass;
struct _GstRTPILBCPay struct _GstRTPILBCPay
{ {
GstBaseRTPAudioPayload audiopayload; GstRTPBaseAudioPayload audiopayload;
gint mode; gint mode;
}; };
struct _GstRTPILBCPayClass struct _GstRTPILBCPayClass
{ {
GstBaseRTPAudioPayloadClass parent_class; GstRTPBaseAudioPayloadClass parent_class;
}; };
GType gst_rtp_ilbc_pay_get_type (void); GType gst_rtp_ilbc_pay_get_type (void);

View file

@ -66,7 +66,7 @@ enum
}; };
#define gst_rtp_j2k_depay_parent_class parent_class #define gst_rtp_j2k_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpJ2KDepay, gst_rtp_j2k_depay, GST_TYPE_BASE_RTP_DEPAYLOAD); G_DEFINE_TYPE (GstRtpJ2KDepay, gst_rtp_j2k_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
static void gst_rtp_j2k_depay_finalize (GObject * object); static void gst_rtp_j2k_depay_finalize (GObject * object);
@ -79,9 +79,9 @@ static GstStateChangeReturn
gst_rtp_j2k_depay_change_state (GstElement * element, gst_rtp_j2k_depay_change_state (GstElement * element,
GstStateChange transition); GstStateChange transition);
static gboolean gst_rtp_j2k_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_j2k_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
static GstBuffer *gst_rtp_j2k_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_j2k_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static void static void
@ -89,11 +89,11 @@ gst_rtp_j2k_depay_class_init (GstRtpJ2KDepayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gobject_class->finalize = gst_rtp_j2k_depay_finalize; gobject_class->finalize = gst_rtp_j2k_depay_finalize;
@ -117,8 +117,8 @@ gst_rtp_j2k_depay_class_init (GstRtpJ2KDepayClass * klass)
gstelement_class->change_state = gst_rtp_j2k_depay_change_state; gstelement_class->change_state = gst_rtp_j2k_depay_change_state;
gstbasertpdepayload_class->set_caps = gst_rtp_j2k_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_j2k_depay_setcaps;
gstbasertpdepayload_class->process = gst_rtp_j2k_depay_process; gstrtpbasedepayload_class->process = gst_rtp_j2k_depay_process;
GST_DEBUG_CATEGORY_INIT (rtpj2kdepay_debug, "rtpj2kdepay", 0, GST_DEBUG_CATEGORY_INIT (rtpj2kdepay_debug, "rtpj2kdepay", 0,
"J2K Video RTP Depayloader"); "J2K Video RTP Depayloader");
@ -182,7 +182,7 @@ gst_rtp_j2k_depay_finalize (GObject * object)
} }
static gboolean static gboolean
gst_rtp_j2k_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_j2k_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstStructure *structure; GstStructure *structure;
gint clock_rate; gint clock_rate;
@ -212,7 +212,7 @@ gst_rtp_j2k_depay_clear_pu (GstRtpJ2KDepay * rtpj2kdepay)
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_j2k_depay_flush_pu (GstBaseRTPDepayload * depayload) gst_rtp_j2k_depay_flush_pu (GstRTPBaseDepayload * depayload)
{ {
GstRtpJ2KDepay *rtpj2kdepay; GstRtpJ2KDepay *rtpj2kdepay;
GstBuffer *mheader; GstBuffer *mheader;
@ -259,7 +259,7 @@ done:
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_j2k_depay_flush_tile (GstBaseRTPDepayload * depayload) gst_rtp_j2k_depay_flush_tile (GstRTPBaseDepayload * depayload)
{ {
GstRtpJ2KDepay *rtpj2kdepay; GstRtpJ2KDepay *rtpj2kdepay;
guint avail, mh_id; guint avail, mh_id;
@ -364,7 +364,7 @@ invalid_tile:
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_j2k_depay_flush_frame (GstBaseRTPDepayload * depayload) gst_rtp_j2k_depay_flush_frame (GstRTPBaseDepayload * depayload)
{ {
GstRtpJ2KDepay *rtpj2kdepay; GstRtpJ2KDepay *rtpj2kdepay;
guint8 end[2]; guint8 end[2];
@ -417,13 +417,13 @@ gst_rtp_j2k_depay_flush_frame (GstBaseRTPDepayload * depayload)
gst_buffer_list_iterator_add_list (it, list); gst_buffer_list_iterator_add_list (it, list);
gst_buffer_list_iterator_free (it); gst_buffer_list_iterator_free (it);
ret = gst_base_rtp_depayload_push_list (depayload, buflist); ret = gst_rtp_base_depayload_push_list (depayload, buflist);
} else } else
#endif #endif
{ {
GST_DEBUG_OBJECT (rtpj2kdepay, "pushing buffer of %u bytes", avail); GST_DEBUG_OBJECT (rtpj2kdepay, "pushing buffer of %u bytes", avail);
outbuf = gst_adapter_take_buffer (rtpj2kdepay->f_adapter, avail); outbuf = gst_adapter_take_buffer (rtpj2kdepay->f_adapter, avail);
ret = gst_base_rtp_depayload_push (depayload, outbuf); ret = gst_rtp_base_depayload_push (depayload, outbuf);
} }
} else { } else {
GST_WARNING_OBJECT (rtpj2kdepay, "empty packet"); GST_WARNING_OBJECT (rtpj2kdepay, "empty packet");
@ -445,7 +445,7 @@ done:
} }
static GstBuffer * static GstBuffer *
gst_rtp_j2k_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_j2k_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpJ2KDepay *rtpj2kdepay; GstRtpJ2KDepay *rtpj2kdepay;
guint8 *payload; guint8 *payload;

View file

@ -42,7 +42,7 @@ typedef struct _GstRtpJ2KDepayClass GstRtpJ2KDepayClass;
struct _GstRtpJ2KDepay struct _GstRtpJ2KDepay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
guint64 last_rtptime; guint64 last_rtptime;
guint last_mh_id; guint last_mh_id;
@ -64,7 +64,7 @@ struct _GstRtpJ2KDepay
struct _GstRtpJ2KDepayClass struct _GstRtpJ2KDepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_j2k_depay_get_type (void); GType gst_rtp_j2k_depay_get_type (void);

View file

@ -105,25 +105,25 @@ static void gst_rtp_j2k_pay_set_property (GObject * object, guint prop_id,
static void gst_rtp_j2k_pay_get_property (GObject * object, guint prop_id, static void gst_rtp_j2k_pay_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static gboolean gst_rtp_j2k_pay_setcaps (GstBaseRTPPayload * basepayload, static gboolean gst_rtp_j2k_pay_setcaps (GstRTPBasePayload * basepayload,
GstCaps * caps); GstCaps * caps);
static GstFlowReturn gst_rtp_j2k_pay_handle_buffer (GstBaseRTPPayload * pad, static GstFlowReturn gst_rtp_j2k_pay_handle_buffer (GstRTPBasePayload * pad,
GstBuffer * buffer); GstBuffer * buffer);
#define gst_rtp_j2k_pay_parent_class parent_class #define gst_rtp_j2k_pay_parent_class parent_class
G_DEFINE_TYPE (GstRtpJ2KPay, gst_rtp_j2k_pay, GST_TYPE_BASE_RTP_PAYLOAD); G_DEFINE_TYPE (GstRtpJ2KPay, gst_rtp_j2k_pay, GST_TYPE_RTP_BASE_PAYLOAD);
static void static void
gst_rtp_j2k_pay_class_init (GstRtpJ2KPayClass * klass) gst_rtp_j2k_pay_class_init (GstRtpJ2KPayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gobject_class->set_property = gst_rtp_j2k_pay_set_property; gobject_class->set_property = gst_rtp_j2k_pay_set_property;
gobject_class->get_property = gst_rtp_j2k_pay_get_property; gobject_class->get_property = gst_rtp_j2k_pay_get_property;
@ -143,8 +143,8 @@ gst_rtp_j2k_pay_class_init (GstRtpJ2KPayClass * klass)
"Payload-encodes JPEG 2000 pictures into RTP packets (RFC 5371)", "Payload-encodes JPEG 2000 pictures into RTP packets (RFC 5371)",
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gstbasertppayload_class->set_caps = gst_rtp_j2k_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_j2k_pay_setcaps;
gstbasertppayload_class->handle_buffer = gst_rtp_j2k_pay_handle_buffer; gstrtpbasepayload_class->handle_buffer = gst_rtp_j2k_pay_handle_buffer;
GST_DEBUG_CATEGORY_INIT (rtpj2kpay_debug, "rtpj2kpay", 0, GST_DEBUG_CATEGORY_INIT (rtpj2kpay_debug, "rtpj2kpay", 0,
"JPEG 2000 RTP Payloader"); "JPEG 2000 RTP Payloader");
@ -157,7 +157,7 @@ gst_rtp_j2k_pay_init (GstRtpJ2KPay * pay)
} }
static gboolean static gboolean
gst_rtp_j2k_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps) gst_rtp_j2k_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
{ {
GstStructure *caps_structure = gst_caps_get_structure (caps, 0); GstStructure *caps_structure = gst_caps_get_structure (caps, 0);
GstRtpJ2KPay *pay; GstRtpJ2KPay *pay;
@ -174,9 +174,9 @@ gst_rtp_j2k_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
pay->width = width; pay->width = width;
} }
gst_base_rtp_payload_set_options (basepayload, "video", TRUE, "JPEG2000", gst_rtp_base_payload_set_options (basepayload, "video", TRUE, "JPEG2000",
90000); 90000);
res = gst_base_rtp_payload_set_outcaps (basepayload, NULL); res = gst_rtp_base_payload_set_outcaps (basepayload, NULL);
return res; return res;
} }
@ -325,7 +325,7 @@ find_pu_end (GstRtpJ2KPay * pay, const guint8 * data, guint size,
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_j2k_pay_handle_buffer (GstBaseRTPPayload * basepayload, gst_rtp_j2k_pay_handle_buffer (GstRTPBasePayload * basepayload,
GstBuffer * buffer) GstBuffer * buffer)
{ {
GstRtpJ2KPay *pay; GstRtpJ2KPay *pay;
@ -342,7 +342,7 @@ gst_rtp_j2k_pay_handle_buffer (GstBaseRTPPayload * basepayload,
guint end, pos; guint end, pos;
pay = GST_RTP_J2K_PAY (basepayload); pay = GST_RTP_J2K_PAY (basepayload);
mtu = GST_BASE_RTP_PAYLOAD_MTU (pay); mtu = GST_RTP_BASE_PAYLOAD_MTU (pay);
data = gst_buffer_map (buffer, &size, NULL, GST_MAP_READ); data = gst_buffer_map (buffer, &size, NULL, GST_MAP_READ);
timestamp = GST_BUFFER_TIMESTAMP (buffer); timestamp = GST_BUFFER_TIMESTAMP (buffer);
@ -520,7 +520,7 @@ gst_rtp_j2k_pay_handle_buffer (GstBaseRTPPayload * basepayload,
memcpy (header + HEADER_SIZE, &data[offset], data_size); memcpy (header + HEADER_SIZE, &data[offset], data_size);
gst_rtp_buffer_unmap (&rtp); gst_rtp_buffer_unmap (&rtp);
ret = gst_base_rtp_payload_push (basepayload, outbuf); ret = gst_rtp_base_payload_push (basepayload, outbuf);
if (ret != GST_FLOW_OK) if (ret != GST_FLOW_OK)
goto done; goto done;
} }
@ -542,7 +542,7 @@ done:
if (pay->buffer_list) { if (pay->buffer_list) {
/* free iterator and push the whole buffer list at once */ /* free iterator and push the whole buffer list at once */
gst_buffer_list_iterator_free (it); gst_buffer_list_iterator_free (it);
ret = gst_base_rtp_payload_push_list (basepayload, list); ret = gst_rtp_base_payload_push_list (basepayload, list);
} }
#endif #endif

View file

@ -41,7 +41,7 @@ typedef struct _GstRtpJ2KPayClass GstRtpJ2KPayClass;
struct _GstRtpJ2KPay struct _GstRtpJ2KPay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
gboolean buffer_list; gboolean buffer_list;
@ -51,7 +51,7 @@ struct _GstRtpJ2KPay
struct _GstRtpJ2KPayClass struct _GstRtpJ2KPayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
GType gst_rtp_j2k_pay_get_type (void); GType gst_rtp_j2k_pay_get_type (void);

View file

@ -68,16 +68,16 @@ static GstStaticPadTemplate gst_rtp_jpeg_depay_sink_template =
#define gst_rtp_jpeg_depay_parent_class parent_class #define gst_rtp_jpeg_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpJPEGDepay, gst_rtp_jpeg_depay, G_DEFINE_TYPE (GstRtpJPEGDepay, gst_rtp_jpeg_depay,
GST_TYPE_BASE_RTP_DEPAYLOAD); GST_TYPE_RTP_BASE_DEPAYLOAD);
static void gst_rtp_jpeg_depay_finalize (GObject * object); static void gst_rtp_jpeg_depay_finalize (GObject * object);
static GstStateChangeReturn gst_rtp_jpeg_depay_change_state (GstElement * static GstStateChangeReturn gst_rtp_jpeg_depay_change_state (GstElement *
element, GstStateChange transition); element, GstStateChange transition);
static gboolean gst_rtp_jpeg_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_jpeg_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
static GstBuffer *gst_rtp_jpeg_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_jpeg_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static void static void
@ -85,11 +85,11 @@ gst_rtp_jpeg_depay_class_init (GstRtpJPEGDepayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gobject_class->finalize = gst_rtp_jpeg_depay_finalize; gobject_class->finalize = gst_rtp_jpeg_depay_finalize;
@ -105,8 +105,8 @@ gst_rtp_jpeg_depay_class_init (GstRtpJPEGDepayClass * klass)
gstelement_class->change_state = gst_rtp_jpeg_depay_change_state; gstelement_class->change_state = gst_rtp_jpeg_depay_change_state;
gstbasertpdepayload_class->set_caps = gst_rtp_jpeg_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_jpeg_depay_setcaps;
gstbasertpdepayload_class->process = gst_rtp_jpeg_depay_process; gstrtpbasedepayload_class->process = gst_rtp_jpeg_depay_process;
GST_DEBUG_CATEGORY_INIT (rtpjpegdepay_debug, "rtpjpegdepay", 0, GST_DEBUG_CATEGORY_INIT (rtpjpegdepay_debug, "rtpjpegdepay", 0,
"JPEG Video RTP Depayloader"); "JPEG Video RTP Depayloader");
@ -412,7 +412,7 @@ MakeHeaders (guint8 * p, int type, int width, int height, guint8 * qt,
}; };
static gboolean static gboolean
gst_rtp_jpeg_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_jpeg_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstRtpJPEGDepay *rtpjpegdepay; GstRtpJPEGDepay *rtpjpegdepay;
GstStructure *structure; GstStructure *structure;
@ -477,7 +477,7 @@ gst_rtp_jpeg_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
} }
static GstBuffer * static GstBuffer *
gst_rtp_jpeg_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_jpeg_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpJPEGDepay *rtpjpegdepay; GstRtpJPEGDepay *rtpjpegdepay;
GstBuffer *outbuf; GstBuffer *outbuf;

View file

@ -42,7 +42,7 @@ typedef struct _GstRtpJPEGDepayClass GstRtpJPEGDepayClass;
struct _GstRtpJPEGDepay struct _GstRtpJPEGDepay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
GstAdapter *adapter; GstAdapter *adapter;
gboolean discont; gboolean discont;
@ -58,7 +58,7 @@ struct _GstRtpJPEGDepay
struct _GstRtpJPEGDepayClass struct _GstRtpJPEGDepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_jpeg_depay_get_type (void); GType gst_rtp_jpeg_depay_get_type (void);

View file

@ -230,25 +230,25 @@ static void gst_rtp_jpeg_pay_set_property (GObject * object, guint prop_id,
static void gst_rtp_jpeg_pay_get_property (GObject * object, guint prop_id, static void gst_rtp_jpeg_pay_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static gboolean gst_rtp_jpeg_pay_setcaps (GstBaseRTPPayload * basepayload, static gboolean gst_rtp_jpeg_pay_setcaps (GstRTPBasePayload * basepayload,
GstCaps * caps); GstCaps * caps);
static GstFlowReturn gst_rtp_jpeg_pay_handle_buffer (GstBaseRTPPayload * pad, static GstFlowReturn gst_rtp_jpeg_pay_handle_buffer (GstRTPBasePayload * pad,
GstBuffer * buffer); GstBuffer * buffer);
#define gst_rtp_jpeg_pay_parent_class parent_class #define gst_rtp_jpeg_pay_parent_class parent_class
G_DEFINE_TYPE (GstRtpJPEGPay, gst_rtp_jpeg_pay, GST_TYPE_BASE_RTP_PAYLOAD); G_DEFINE_TYPE (GstRtpJPEGPay, gst_rtp_jpeg_pay, GST_TYPE_RTP_BASE_PAYLOAD);
static void static void
gst_rtp_jpeg_pay_class_init (GstRtpJPEGPayClass * klass) gst_rtp_jpeg_pay_class_init (GstRtpJPEGPayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gobject_class->set_property = gst_rtp_jpeg_pay_set_property; gobject_class->set_property = gst_rtp_jpeg_pay_set_property;
gobject_class->get_property = gst_rtp_jpeg_pay_get_property; gobject_class->get_property = gst_rtp_jpeg_pay_get_property;
@ -263,8 +263,8 @@ gst_rtp_jpeg_pay_class_init (GstRtpJPEGPayClass * klass)
"Payload-encodes JPEG pictures into RTP packets (RFC 2435)", "Payload-encodes JPEG pictures into RTP packets (RFC 2435)",
"Axis Communications <dev-gstreamer@axis.com>"); "Axis Communications <dev-gstreamer@axis.com>");
gstbasertppayload_class->set_caps = gst_rtp_jpeg_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_jpeg_pay_setcaps;
gstbasertppayload_class->handle_buffer = gst_rtp_jpeg_pay_handle_buffer; gstrtpbasepayload_class->handle_buffer = gst_rtp_jpeg_pay_handle_buffer;
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_JPEG_QUALITY, g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_JPEG_QUALITY,
g_param_spec_int ("quality", "Quality", g_param_spec_int ("quality", "Quality",
@ -295,7 +295,7 @@ gst_rtp_jpeg_pay_init (GstRtpJPEGPay * pay)
} }
static gboolean static gboolean
gst_rtp_jpeg_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps) gst_rtp_jpeg_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
{ {
GstStructure *caps_structure = gst_caps_get_structure (caps, 0); GstStructure *caps_structure = gst_caps_get_structure (caps, 0);
GstRtpJPEGPay *pay; GstRtpJPEGPay *pay;
@ -318,8 +318,8 @@ gst_rtp_jpeg_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
} }
pay->width = width / 8; pay->width = width / 8;
gst_base_rtp_payload_set_options (basepayload, "video", TRUE, "JPEG", 90000); gst_rtp_base_payload_set_options (basepayload, "video", TRUE, "JPEG", 90000);
res = gst_base_rtp_payload_set_outcaps (basepayload, NULL); res = gst_rtp_base_payload_set_outcaps (basepayload, NULL);
return res; return res;
@ -595,7 +595,7 @@ gst_rtp_jpeg_pay_scan_marker (const guint8 * data, guint size, guint * offset)
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_jpeg_pay_handle_buffer (GstBaseRTPPayload * basepayload, gst_rtp_jpeg_pay_handle_buffer (GstRTPBasePayload * basepayload,
GstBuffer * buffer) GstBuffer * buffer)
{ {
GstRtpJPEGPay *pay; GstRtpJPEGPay *pay;
@ -619,7 +619,7 @@ gst_rtp_jpeg_pay_handle_buffer (GstBaseRTPPayload * basepayload,
GstBufferList *list = NULL; GstBufferList *list = NULL;
pay = GST_RTP_JPEG_PAY (basepayload); pay = GST_RTP_JPEG_PAY (basepayload);
mtu = GST_BASE_RTP_PAYLOAD_MTU (pay); mtu = GST_RTP_BASE_PAYLOAD_MTU (pay);
data = bdata = gst_buffer_map (buffer, &size, NULL, GST_MAP_READ); data = bdata = gst_buffer_map (buffer, &size, NULL, GST_MAP_READ);
timestamp = GST_BUFFER_TIMESTAMP (buffer); timestamp = GST_BUFFER_TIMESTAMP (buffer);
@ -819,7 +819,7 @@ gst_rtp_jpeg_pay_handle_buffer (GstBaseRTPPayload * basepayload,
/* and add to list */ /* and add to list */
gst_buffer_list_insert (list, -1, outbuf); gst_buffer_list_insert (list, -1, outbuf);
} else { } else {
ret = gst_base_rtp_payload_push (basepayload, outbuf); ret = gst_rtp_base_payload_push (basepayload, outbuf);
if (ret != GST_FLOW_OK) if (ret != GST_FLOW_OK)
break; break;
} }
@ -832,7 +832,7 @@ gst_rtp_jpeg_pay_handle_buffer (GstBaseRTPPayload * basepayload,
if (pay->buffer_list) { if (pay->buffer_list) {
/* push the whole buffer list at once */ /* push the whole buffer list at once */
ret = gst_base_rtp_payload_push_list (basepayload, list); ret = gst_rtp_base_payload_push_list (basepayload, list);
} }
gst_buffer_unmap (buffer, bdata, -1); gst_buffer_unmap (buffer, bdata, -1);

View file

@ -39,7 +39,7 @@ typedef struct _GstRtpJPEGPayClass GstRtpJPEGPayClass;
struct _GstRtpJPEGPay struct _GstRtpJPEGPay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
guint8 quality; guint8 quality;
guint8 type; guint8 type;
@ -54,7 +54,7 @@ struct _GstRtpJPEGPay
struct _GstRtpJPEGPayClass struct _GstRtpJPEGPayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
GType gst_rtp_jpeg_pay_get_type (void); GType gst_rtp_jpeg_pay_get_type (void);

View file

@ -63,24 +63,24 @@ static GstStaticPadTemplate gst_rtp_mp1s_depay_sink_template =
); );
G_DEFINE_TYPE (GstRtpMP1SDepay, gst_rtp_mp1s_depay, G_DEFINE_TYPE (GstRtpMP1SDepay, gst_rtp_mp1s_depay,
GST_TYPE_BASE_RTP_DEPAYLOAD); GST_TYPE_RTP_BASE_DEPAYLOAD);
static gboolean gst_rtp_mp1s_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_mp1s_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
static GstBuffer *gst_rtp_mp1s_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_mp1s_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static void static void
gst_rtp_mp1s_depay_class_init (GstRtpMP1SDepayClass * klass) gst_rtp_mp1s_depay_class_init (GstRtpMP1SDepayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gstbasertpdepayload_class->process = gst_rtp_mp1s_depay_process; gstrtpbasedepayload_class->process = gst_rtp_mp1s_depay_process;
gstbasertpdepayload_class->set_caps = gst_rtp_mp1s_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_mp1s_depay_setcaps;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_mp1s_depay_src_template)); gst_static_pad_template_get (&gst_rtp_mp1s_depay_src_template));
@ -99,7 +99,7 @@ gst_rtp_mp1s_depay_init (GstRtpMP1SDepay * rtpmp1sdepay)
} }
static gboolean static gboolean
gst_rtp_mp1s_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_mp1s_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstCaps *srccaps; GstCaps *srccaps;
GstStructure *structure; GstStructure *structure;
@ -113,14 +113,14 @@ gst_rtp_mp1s_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
srccaps = gst_caps_new_simple ("video/mpeg", srccaps = gst_caps_new_simple ("video/mpeg",
"systemstream", G_TYPE_BOOLEAN, TRUE, NULL); "systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
res = gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload), srccaps); res = gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload), srccaps);
gst_caps_unref (srccaps); gst_caps_unref (srccaps);
return res; return res;
} }
static GstBuffer * static GstBuffer *
gst_rtp_mp1s_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_mp1s_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstBuffer *outbuf; GstBuffer *outbuf;
GstRTPBuffer rtp; GstRTPBuffer rtp;

View file

@ -41,12 +41,12 @@ typedef struct _GstRtpMP1SDepayClass GstRtpMP1SDepayClass;
struct _GstRtpMP1SDepay struct _GstRtpMP1SDepay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
}; };
struct _GstRtpMP1SDepayClass struct _GstRtpMP1SDepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_mp1s_depay_get_type (void); GType gst_rtp_mp1s_depay_get_type (void);

View file

@ -69,11 +69,11 @@ static GstStaticPadTemplate gst_rtp_mp2t_depay_sink_template =
); );
G_DEFINE_TYPE (GstRtpMP2TDepay, gst_rtp_mp2t_depay, G_DEFINE_TYPE (GstRtpMP2TDepay, gst_rtp_mp2t_depay,
GST_TYPE_BASE_RTP_DEPAYLOAD); GST_TYPE_RTP_BASE_DEPAYLOAD);
static gboolean gst_rtp_mp2t_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_mp2t_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
static GstBuffer *gst_rtp_mp2t_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_mp2t_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static void gst_rtp_mp2t_depay_set_property (GObject * object, guint prop_id, static void gst_rtp_mp2t_depay_set_property (GObject * object, guint prop_id,
@ -86,14 +86,14 @@ gst_rtp_mp2t_depay_class_init (GstRtpMP2TDepayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gstbasertpdepayload_class->process = gst_rtp_mp2t_depay_process; gstrtpbasedepayload_class->process = gst_rtp_mp2t_depay_process;
gstbasertpdepayload_class->set_caps = gst_rtp_mp2t_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_mp2t_depay_setcaps;
gobject_class->set_property = gst_rtp_mp2t_depay_set_property; gobject_class->set_property = gst_rtp_mp2t_depay_set_property;
gobject_class->get_property = gst_rtp_mp2t_depay_get_property; gobject_class->get_property = gst_rtp_mp2t_depay_get_property;
@ -124,7 +124,7 @@ gst_rtp_mp2t_depay_init (GstRtpMP2TDepay * rtpmp2tdepay)
} }
static gboolean static gboolean
gst_rtp_mp2t_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_mp2t_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstCaps *srccaps; GstCaps *srccaps;
GstStructure *structure; GstStructure *structure;
@ -139,14 +139,14 @@ gst_rtp_mp2t_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
srccaps = gst_caps_new_simple ("video/mpegts", srccaps = gst_caps_new_simple ("video/mpegts",
"packetsize", G_TYPE_INT, 188, "packetsize", G_TYPE_INT, 188,
"systemstream", G_TYPE_BOOLEAN, TRUE, NULL); "systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
res = gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload), srccaps); res = gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (depayload), srccaps);
gst_caps_unref (srccaps); gst_caps_unref (srccaps);
return res; return res;
} }
static GstBuffer * static GstBuffer *
gst_rtp_mp2t_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_mp2t_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpMP2TDepay *rtpmp2tdepay; GstRtpMP2TDepay *rtpmp2tdepay;
GstBuffer *outbuf; GstBuffer *outbuf;

View file

@ -41,14 +41,14 @@ typedef struct _GstRtpMP2TDepayClass GstRtpMP2TDepayClass;
struct _GstRtpMP2TDepay struct _GstRtpMP2TDepay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
guint8 skip_first_bytes; guint8 skip_first_bytes;
}; };
struct _GstRtpMP2TDepayClass struct _GstRtpMP2TDepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_mp2t_depay_get_type (void); GType gst_rtp_mp2t_depay_get_type (void);

View file

@ -45,31 +45,31 @@ GST_STATIC_PAD_TEMPLATE ("src",
"clock-rate = (int) 90000, " "encoding-name = (string) \"MP2T\"") "clock-rate = (int) 90000, " "encoding-name = (string) \"MP2T\"")
); );
static gboolean gst_rtp_mp2t_pay_setcaps (GstBaseRTPPayload * payload, static gboolean gst_rtp_mp2t_pay_setcaps (GstRTPBasePayload * payload,
GstCaps * caps); GstCaps * caps);
static GstFlowReturn gst_rtp_mp2t_pay_handle_buffer (GstBaseRTPPayload * static GstFlowReturn gst_rtp_mp2t_pay_handle_buffer (GstRTPBasePayload *
payload, GstBuffer * buffer); payload, GstBuffer * buffer);
static GstFlowReturn gst_rtp_mp2t_pay_flush (GstRTPMP2TPay * rtpmp2tpay); static GstFlowReturn gst_rtp_mp2t_pay_flush (GstRTPMP2TPay * rtpmp2tpay);
static void gst_rtp_mp2t_pay_finalize (GObject * object); static void gst_rtp_mp2t_pay_finalize (GObject * object);
#define gst_rtp_mp2t_pay_parent_class parent_class #define gst_rtp_mp2t_pay_parent_class parent_class
G_DEFINE_TYPE (GstRTPMP2TPay, gst_rtp_mp2t_pay, GST_TYPE_BASE_RTP_PAYLOAD); G_DEFINE_TYPE (GstRTPMP2TPay, gst_rtp_mp2t_pay, GST_TYPE_RTP_BASE_PAYLOAD);
static void static void
gst_rtp_mp2t_pay_class_init (GstRTPMP2TPayClass * klass) gst_rtp_mp2t_pay_class_init (GstRTPMP2TPayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gobject_class->finalize = gst_rtp_mp2t_pay_finalize; gobject_class->finalize = gst_rtp_mp2t_pay_finalize;
gstbasertppayload_class->set_caps = gst_rtp_mp2t_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_mp2t_pay_setcaps;
gstbasertppayload_class->handle_buffer = gst_rtp_mp2t_pay_handle_buffer; gstrtpbasepayload_class->handle_buffer = gst_rtp_mp2t_pay_handle_buffer;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_mp2t_pay_sink_template)); gst_static_pad_template_get (&gst_rtp_mp2t_pay_sink_template));
@ -84,8 +84,8 @@ gst_rtp_mp2t_pay_class_init (GstRTPMP2TPayClass * klass)
static void static void
gst_rtp_mp2t_pay_init (GstRTPMP2TPay * rtpmp2tpay) gst_rtp_mp2t_pay_init (GstRTPMP2TPay * rtpmp2tpay)
{ {
GST_BASE_RTP_PAYLOAD (rtpmp2tpay)->clock_rate = 90000; GST_RTP_BASE_PAYLOAD (rtpmp2tpay)->clock_rate = 90000;
GST_BASE_RTP_PAYLOAD_PT (rtpmp2tpay) = GST_RTP_PAYLOAD_MP2T; GST_RTP_BASE_PAYLOAD_PT (rtpmp2tpay) = GST_RTP_PAYLOAD_MP2T;
rtpmp2tpay->adapter = gst_adapter_new (); rtpmp2tpay->adapter = gst_adapter_new ();
} }
@ -104,12 +104,12 @@ gst_rtp_mp2t_pay_finalize (GObject * object)
} }
static gboolean static gboolean
gst_rtp_mp2t_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps) gst_rtp_mp2t_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
{ {
gboolean res; gboolean res;
gst_base_rtp_payload_set_options (payload, "video", TRUE, "MP2T", 90000); gst_rtp_base_payload_set_options (payload, "video", TRUE, "MP2T", 90000);
res = gst_base_rtp_payload_set_outcaps (payload, NULL); res = gst_rtp_base_payload_set_outcaps (payload, NULL);
return res; return res;
} }
@ -140,7 +140,7 @@ gst_rtp_mp2t_pay_flush (GstRTPMP2TPay * rtpmp2tpay)
GST_DEBUG_OBJECT (rtpmp2tpay, "pushing buffer of size %d", GST_DEBUG_OBJECT (rtpmp2tpay, "pushing buffer of size %d",
gst_buffer_get_size (outbuf)); gst_buffer_get_size (outbuf));
ret = gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtpmp2tpay), outbuf); ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpmp2tpay), outbuf);
/* flush the adapter content */ /* flush the adapter content */
gst_adapter_flush (rtpmp2tpay->adapter, avail); gst_adapter_flush (rtpmp2tpay->adapter, avail);
@ -149,7 +149,7 @@ gst_rtp_mp2t_pay_flush (GstRTPMP2TPay * rtpmp2tpay)
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_mp2t_pay_handle_buffer (GstBaseRTPPayload * basepayload, gst_rtp_mp2t_pay_handle_buffer (GstRTPBasePayload * basepayload,
GstBuffer * buffer) GstBuffer * buffer)
{ {
GstRTPMP2TPay *rtpmp2tpay; GstRTPMP2TPay *rtpmp2tpay;
@ -178,7 +178,7 @@ gst_rtp_mp2t_pay_handle_buffer (GstBaseRTPPayload * basepayload,
/* if this buffer is going to overflow the packet, flush what we /* if this buffer is going to overflow the packet, flush what we
* have. */ * have. */
if (gst_base_rtp_payload_is_filled (basepayload, if (gst_rtp_base_payload_is_filled (basepayload,
packet_len, rtpmp2tpay->duration + duration)) { packet_len, rtpmp2tpay->duration + duration)) {
ret = gst_rtp_mp2t_pay_flush (rtpmp2tpay); ret = gst_rtp_mp2t_pay_flush (rtpmp2tpay);
rtpmp2tpay->first_ts = timestamp; rtpmp2tpay->first_ts = timestamp;

View file

@ -43,7 +43,7 @@ typedef struct _GstRTPMP2TPayClass GstRTPMP2TPayClass;
struct _GstRTPMP2TPay struct _GstRTPMP2TPay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
GstAdapter *adapter; GstAdapter *adapter;
GstClockTime first_ts; GstClockTime first_ts;
@ -52,7 +52,7 @@ struct _GstRTPMP2TPay
struct _GstRTPMP2TPayClass struct _GstRTPMP2TPayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
GType gst_rtp_mp2t_pay_get_type (void); GType gst_rtp_mp2t_pay_get_type (void);

View file

@ -58,13 +58,13 @@ GST_STATIC_PAD_TEMPLATE ("sink",
#define gst_rtp_mp4a_depay_parent_class parent_class #define gst_rtp_mp4a_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpMP4ADepay, gst_rtp_mp4a_depay, G_DEFINE_TYPE (GstRtpMP4ADepay, gst_rtp_mp4a_depay,
GST_TYPE_BASE_RTP_DEPAYLOAD); GST_TYPE_RTP_BASE_DEPAYLOAD);
static void gst_rtp_mp4a_depay_finalize (GObject * object); static void gst_rtp_mp4a_depay_finalize (GObject * object);
static gboolean gst_rtp_mp4a_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_mp4a_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
static GstBuffer *gst_rtp_mp4a_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_mp4a_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static GstStateChangeReturn gst_rtp_mp4a_depay_change_state (GstElement * static GstStateChangeReturn gst_rtp_mp4a_depay_change_state (GstElement *
@ -76,18 +76,18 @@ gst_rtp_mp4a_depay_class_init (GstRtpMP4ADepayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gobject_class->finalize = gst_rtp_mp4a_depay_finalize; gobject_class->finalize = gst_rtp_mp4a_depay_finalize;
gstelement_class->change_state = gst_rtp_mp4a_depay_change_state; gstelement_class->change_state = gst_rtp_mp4a_depay_change_state;
gstbasertpdepayload_class->process = gst_rtp_mp4a_depay_process; gstrtpbasedepayload_class->process = gst_rtp_mp4a_depay_process;
gstbasertpdepayload_class->set_caps = gst_rtp_mp4a_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_mp4a_depay_setcaps;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_mp4a_depay_src_template)); gst_static_pad_template_get (&gst_rtp_mp4a_depay_src_template));
@ -128,7 +128,7 @@ static const guint aac_sample_rates[] = { 96000, 88200, 64000, 48000,
}; };
static gboolean static gboolean
gst_rtp_mp4a_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_mp4a_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstStructure *structure; GstStructure *structure;
GstRtpMP4ADepay *rtpmp4adepay; GstRtpMP4ADepay *rtpmp4adepay;
@ -288,7 +288,7 @@ gst_rtp_mp4a_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
} }
static GstBuffer * static GstBuffer *
gst_rtp_mp4a_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_mp4a_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpMP4ADepay *rtpmp4adepay; GstRtpMP4ADepay *rtpmp4adepay;
GstBuffer *outbuf; GstBuffer *outbuf;
@ -367,7 +367,7 @@ gst_rtp_mp4a_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
avail -= skip; avail -= skip;
GST_BUFFER_TIMESTAMP (tmp) = timestamp; GST_BUFFER_TIMESTAMP (tmp) = timestamp;
gst_base_rtp_depayload_push (depayload, tmp); gst_rtp_base_depayload_push (depayload, tmp);
/* shift ts for next buffers */ /* shift ts for next buffers */
if (rtpmp4adepay->frame_len && timestamp != -1 if (rtpmp4adepay->frame_len && timestamp != -1

View file

@ -41,7 +41,7 @@ typedef struct _GstRtpMP4ADepayClass GstRtpMP4ADepayClass;
struct _GstRtpMP4ADepay struct _GstRtpMP4ADepay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
GstAdapter *adapter; GstAdapter *adapter;
guint8 numSubFrames; guint8 numSubFrames;
guint frame_len; guint frame_len;
@ -49,7 +49,7 @@ struct _GstRtpMP4ADepay
struct _GstRtpMP4ADepayClass struct _GstRtpMP4ADepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_mp4a_depay_get_type (void); GType gst_rtp_mp4a_depay_get_type (void);

View file

@ -59,28 +59,28 @@ GST_STATIC_PAD_TEMPLATE ("src",
static void gst_rtp_mp4a_pay_finalize (GObject * object); static void gst_rtp_mp4a_pay_finalize (GObject * object);
static gboolean gst_rtp_mp4a_pay_setcaps (GstBaseRTPPayload * payload, static gboolean gst_rtp_mp4a_pay_setcaps (GstRTPBasePayload * payload,
GstCaps * caps); GstCaps * caps);
static GstFlowReturn gst_rtp_mp4a_pay_handle_buffer (GstBaseRTPPayload * static GstFlowReturn gst_rtp_mp4a_pay_handle_buffer (GstRTPBasePayload *
payload, GstBuffer * buffer); payload, GstBuffer * buffer);
#define gst_rtp_mp4a_pay_parent_class parent_class #define gst_rtp_mp4a_pay_parent_class parent_class
G_DEFINE_TYPE (GstRtpMP4APay, gst_rtp_mp4a_pay, GST_TYPE_BASE_RTP_PAYLOAD) G_DEFINE_TYPE (GstRtpMP4APay, gst_rtp_mp4a_pay, GST_TYPE_RTP_BASE_PAYLOAD)
static void gst_rtp_mp4a_pay_class_init (GstRtpMP4APayClass * klass) static void gst_rtp_mp4a_pay_class_init (GstRtpMP4APayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gobject_class->finalize = gst_rtp_mp4a_pay_finalize; gobject_class->finalize = gst_rtp_mp4a_pay_finalize;
gstbasertppayload_class->set_caps = gst_rtp_mp4a_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_mp4a_pay_setcaps;
gstbasertppayload_class->handle_buffer = gst_rtp_mp4a_pay_handle_buffer; gstrtpbasepayload_class->handle_buffer = gst_rtp_mp4a_pay_handle_buffer;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_mp4a_pay_src_template)); gst_static_pad_template_get (&gst_rtp_mp4a_pay_src_template));
@ -228,7 +228,7 @@ gst_rtp_mp4a_pay_new_caps (GstRtpMP4APay * rtpmp4apay)
gst_value_set_buffer (&v, rtpmp4apay->config); gst_value_set_buffer (&v, rtpmp4apay->config);
config = gst_value_serialize (&v); config = gst_value_serialize (&v);
res = gst_base_rtp_payload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpmp4apay), res = gst_rtp_base_payload_set_outcaps (GST_RTP_BASE_PAYLOAD (rtpmp4apay),
"cpresent", G_TYPE_STRING, "0", "config", G_TYPE_STRING, config, NULL); "cpresent", G_TYPE_STRING, "0", "config", G_TYPE_STRING, config, NULL);
g_value_unset (&v); g_value_unset (&v);
@ -238,7 +238,7 @@ gst_rtp_mp4a_pay_new_caps (GstRtpMP4APay * rtpmp4apay)
} }
static gboolean static gboolean
gst_rtp_mp4a_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps) gst_rtp_mp4a_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
{ {
GstRtpMP4APay *rtpmp4apay; GstRtpMP4APay *rtpmp4apay;
GstStructure *structure; GstStructure *structure;
@ -321,7 +321,7 @@ gst_rtp_mp4a_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
GST_WARNING_OBJECT (payload, "Need framed AAC data as input!"); GST_WARNING_OBJECT (payload, "Need framed AAC data as input!");
} }
gst_base_rtp_payload_set_options (payload, "audio", TRUE, "MP4A-LATM", gst_rtp_base_payload_set_options (payload, "audio", TRUE, "MP4A-LATM",
rtpmp4apay->rate); rtpmp4apay->rate);
res = gst_rtp_mp4a_pay_new_caps (rtpmp4apay); res = gst_rtp_mp4a_pay_new_caps (rtpmp4apay);
@ -339,7 +339,7 @@ config_failed:
/* we expect buffers as exactly one complete AU /* we expect buffers as exactly one complete AU
*/ */
static GstFlowReturn static GstFlowReturn
gst_rtp_mp4a_pay_handle_buffer (GstBaseRTPPayload * basepayload, gst_rtp_mp4a_pay_handle_buffer (GstRTPBasePayload * basepayload,
GstBuffer * buffer) GstBuffer * buffer)
{ {
GstRtpMP4APay *rtpmp4apay; GstRtpMP4APay *rtpmp4apay;
@ -359,7 +359,7 @@ gst_rtp_mp4a_pay_handle_buffer (GstBaseRTPPayload * basepayload,
timestamp = GST_BUFFER_TIMESTAMP (buffer); timestamp = GST_BUFFER_TIMESTAMP (buffer);
fragmented = FALSE; fragmented = FALSE;
mtu = GST_BASE_RTP_PAYLOAD_MTU (rtpmp4apay); mtu = GST_RTP_BASE_PAYLOAD_MTU (rtpmp4apay);
while (size > 0) { while (size > 0) {
guint towrite; guint towrite;
@ -423,7 +423,7 @@ gst_rtp_mp4a_pay_handle_buffer (GstBaseRTPPayload * basepayload,
/* copy incomming timestamp (if any) to outgoing buffers */ /* copy incomming timestamp (if any) to outgoing buffers */
GST_BUFFER_TIMESTAMP (outbuf) = timestamp; GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
ret = gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtpmp4apay), outbuf); ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpmp4apay), outbuf);
fragmented = TRUE; fragmented = TRUE;
} }

View file

@ -42,7 +42,7 @@ typedef struct _GstRtpMP4APayClass GstRtpMP4APayClass;
struct _GstRtpMP4APay struct _GstRtpMP4APay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
gint rate; gint rate;
gchar *params; gchar *params;
@ -53,7 +53,7 @@ struct _GstRtpMP4APay
struct _GstRtpMP4APayClass struct _GstRtpMP4APayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
GType gst_rtp_mp4a_pay_get_type (void); GType gst_rtp_mp4a_pay_get_type (void);

View file

@ -128,15 +128,15 @@ gst_bs_parse_read (GstBsParse * bs, guint n)
#define gst_rtp_mp4g_depay_parent_class parent_class #define gst_rtp_mp4g_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpMP4GDepay, gst_rtp_mp4g_depay, G_DEFINE_TYPE (GstRtpMP4GDepay, gst_rtp_mp4g_depay,
GST_TYPE_BASE_RTP_DEPAYLOAD); GST_TYPE_RTP_BASE_DEPAYLOAD);
static void gst_rtp_mp4g_depay_finalize (GObject * object); static void gst_rtp_mp4g_depay_finalize (GObject * object);
static gboolean gst_rtp_mp4g_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_mp4g_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
static GstBuffer *gst_rtp_mp4g_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_mp4g_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static gboolean gst_rtp_mp4g_depay_handle_event (GstBaseRTPDepayload * filter, static gboolean gst_rtp_mp4g_depay_handle_event (GstRTPBaseDepayload * filter,
GstEvent * event); GstEvent * event);
static GstStateChangeReturn gst_rtp_mp4g_depay_change_state (GstElement * static GstStateChangeReturn gst_rtp_mp4g_depay_change_state (GstElement *
@ -148,19 +148,19 @@ gst_rtp_mp4g_depay_class_init (GstRtpMP4GDepayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gobject_class->finalize = gst_rtp_mp4g_depay_finalize; gobject_class->finalize = gst_rtp_mp4g_depay_finalize;
gstelement_class->change_state = gst_rtp_mp4g_depay_change_state; gstelement_class->change_state = gst_rtp_mp4g_depay_change_state;
gstbasertpdepayload_class->process = gst_rtp_mp4g_depay_process; gstrtpbasedepayload_class->process = gst_rtp_mp4g_depay_process;
gstbasertpdepayload_class->set_caps = gst_rtp_mp4g_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_mp4g_depay_setcaps;
gstbasertpdepayload_class->handle_event = gst_rtp_mp4g_depay_handle_event; gstrtpbasedepayload_class->handle_event = gst_rtp_mp4g_depay_handle_event;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_mp4g_depay_src_template)); gst_static_pad_template_get (&gst_rtp_mp4g_depay_src_template));
@ -215,7 +215,7 @@ gst_rtp_mp4g_depay_parse_int (GstStructure * structure, const gchar * field,
} }
static gboolean static gboolean
gst_rtp_mp4g_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_mp4g_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstStructure *structure; GstStructure *structure;
GstRtpMP4GDepay *rtpmp4gdepay; GstRtpMP4GDepay *rtpmp4gdepay;
@ -348,7 +348,7 @@ gst_rtp_mp4g_depay_flush_queue (GstRtpMP4GDepay * rtpmp4gdepay)
} }
GST_DEBUG_OBJECT (rtpmp4gdepay, "pushing AU_index %u", AU_index); GST_DEBUG_OBJECT (rtpmp4gdepay, "pushing AU_index %u", AU_index);
gst_base_rtp_depayload_push (GST_BASE_RTP_DEPAYLOAD (rtpmp4gdepay), outbuf); gst_rtp_base_depayload_push (GST_RTP_BASE_DEPAYLOAD (rtpmp4gdepay), outbuf);
rtpmp4gdepay->next_AU_index = AU_index + 1; rtpmp4gdepay->next_AU_index = AU_index + 1;
} }
} }
@ -368,7 +368,7 @@ gst_rtp_mp4g_depay_queue (GstRtpMP4GDepay * rtpmp4gdepay, GstBuffer * outbuf)
/* we received the expected packet, push it and flush as much as we can from /* we received the expected packet, push it and flush as much as we can from
* the queue */ * the queue */
gst_base_rtp_depayload_push (GST_BASE_RTP_DEPAYLOAD (rtpmp4gdepay), outbuf); gst_rtp_base_depayload_push (GST_RTP_BASE_DEPAYLOAD (rtpmp4gdepay), outbuf);
rtpmp4gdepay->next_AU_index++; rtpmp4gdepay->next_AU_index++;
while ((outbuf = g_queue_peek_head (rtpmp4gdepay->packets))) { while ((outbuf = g_queue_peek_head (rtpmp4gdepay->packets))) {
@ -380,7 +380,7 @@ gst_rtp_mp4g_depay_queue (GstRtpMP4GDepay * rtpmp4gdepay, GstBuffer * outbuf)
GST_DEBUG_OBJECT (rtpmp4gdepay, "pushing expected AU_index %u", GST_DEBUG_OBJECT (rtpmp4gdepay, "pushing expected AU_index %u",
AU_index); AU_index);
outbuf = g_queue_pop_head (rtpmp4gdepay->packets); outbuf = g_queue_pop_head (rtpmp4gdepay->packets);
gst_base_rtp_depayload_push (GST_BASE_RTP_DEPAYLOAD (rtpmp4gdepay), gst_rtp_base_depayload_push (GST_RTP_BASE_DEPAYLOAD (rtpmp4gdepay),
outbuf); outbuf);
rtpmp4gdepay->next_AU_index++; rtpmp4gdepay->next_AU_index++;
} else { } else {
@ -419,7 +419,7 @@ gst_rtp_mp4g_depay_queue (GstRtpMP4GDepay * rtpmp4gdepay, GstBuffer * outbuf)
} }
static GstBuffer * static GstBuffer *
gst_rtp_mp4g_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_mp4g_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpMP4GDepay *rtpmp4gdepay; GstRtpMP4GDepay *rtpmp4gdepay;
GstBuffer *outbuf = NULL; GstBuffer *outbuf = NULL;
@ -718,7 +718,7 @@ short_payload:
} }
static gboolean static gboolean
gst_rtp_mp4g_depay_handle_event (GstBaseRTPDepayload * filter, GstEvent * event) gst_rtp_mp4g_depay_handle_event (GstRTPBaseDepayload * filter, GstEvent * event)
{ {
gboolean ret; gboolean ret;
GstRtpMP4GDepay *rtpmp4gdepay; GstRtpMP4GDepay *rtpmp4gdepay;
@ -734,7 +734,7 @@ gst_rtp_mp4g_depay_handle_event (GstBaseRTPDepayload * filter, GstEvent * event)
} }
ret = ret =
GST_BASE_RTP_DEPAYLOAD_CLASS (parent_class)->handle_event (filter, event); GST_RTP_BASE_DEPAYLOAD_CLASS (parent_class)->handle_event (filter, event);
return ret; return ret;
} }

View file

@ -42,7 +42,7 @@ typedef struct _GstRtpMP4GDepayClass GstRtpMP4GDepayClass;
struct _GstRtpMP4GDepay struct _GstRtpMP4GDepay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
gint profile_level_id; gint profile_level_id;
gint streamtype; gint streamtype;
@ -74,7 +74,7 @@ struct _GstRtpMP4GDepay
struct _GstRtpMP4GDepayClass struct _GstRtpMP4GDepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_mp4g_depay_get_type (void); GType gst_rtp_mp4g_depay_get_type (void);

View file

@ -78,33 +78,33 @@ static void gst_rtp_mp4g_pay_finalize (GObject * object);
static GstStateChangeReturn gst_rtp_mp4g_pay_change_state (GstElement * element, static GstStateChangeReturn gst_rtp_mp4g_pay_change_state (GstElement * element,
GstStateChange transition); GstStateChange transition);
static gboolean gst_rtp_mp4g_pay_setcaps (GstBaseRTPPayload * payload, static gboolean gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload,
GstCaps * caps); GstCaps * caps);
static GstFlowReturn gst_rtp_mp4g_pay_handle_buffer (GstBaseRTPPayload * static GstFlowReturn gst_rtp_mp4g_pay_handle_buffer (GstRTPBasePayload *
payload, GstBuffer * buffer); payload, GstBuffer * buffer);
static gboolean gst_rtp_mp4g_pay_handle_event (GstBaseRTPPayload * payload, static gboolean gst_rtp_mp4g_pay_handle_event (GstRTPBasePayload * payload,
GstEvent * event); GstEvent * event);
#define gst_rtp_mp4g_pay_parent_class parent_class #define gst_rtp_mp4g_pay_parent_class parent_class
G_DEFINE_TYPE (GstRtpMP4GPay, gst_rtp_mp4g_pay, GST_TYPE_BASE_RTP_PAYLOAD) G_DEFINE_TYPE (GstRtpMP4GPay, gst_rtp_mp4g_pay, GST_TYPE_RTP_BASE_PAYLOAD)
static void gst_rtp_mp4g_pay_class_init (GstRtpMP4GPayClass * klass) static void gst_rtp_mp4g_pay_class_init (GstRtpMP4GPayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gobject_class->finalize = gst_rtp_mp4g_pay_finalize; gobject_class->finalize = gst_rtp_mp4g_pay_finalize;
gstelement_class->change_state = gst_rtp_mp4g_pay_change_state; gstelement_class->change_state = gst_rtp_mp4g_pay_change_state;
gstbasertppayload_class->set_caps = gst_rtp_mp4g_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_mp4g_pay_setcaps;
gstbasertppayload_class->handle_buffer = gst_rtp_mp4g_pay_handle_buffer; gstrtpbasepayload_class->handle_buffer = gst_rtp_mp4g_pay_handle_buffer;
gstbasertppayload_class->handle_event = gst_rtp_mp4g_pay_handle_event; gstrtpbasepayload_class->handle_event = gst_rtp_mp4g_pay_handle_event;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_mp4g_pay_src_template)); gst_static_pad_template_get (&gst_rtp_mp4g_pay_src_template));
@ -370,10 +370,10 @@ gst_rtp_mp4g_pay_new_caps (GstRtpMP4GPay * rtpmp4gpay)
/* hmm, silly */ /* hmm, silly */
if (rtpmp4gpay->params) { if (rtpmp4gpay->params) {
res = gst_base_rtp_payload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpmp4gpay), res = gst_rtp_base_payload_set_outcaps (GST_RTP_BASE_PAYLOAD (rtpmp4gpay),
"encoding-params", G_TYPE_STRING, rtpmp4gpay->params, MP4GCAPS); "encoding-params", G_TYPE_STRING, rtpmp4gpay->params, MP4GCAPS);
} else { } else {
res = gst_base_rtp_payload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpmp4gpay), res = gst_rtp_base_payload_set_outcaps (GST_RTP_BASE_PAYLOAD (rtpmp4gpay),
MP4GCAPS); MP4GCAPS);
} }
@ -385,7 +385,7 @@ gst_rtp_mp4g_pay_new_caps (GstRtpMP4GPay * rtpmp4gpay)
} }
static gboolean static gboolean
gst_rtp_mp4g_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps) gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
{ {
GstRtpMP4GPay *rtpmp4gpay; GstRtpMP4GPay *rtpmp4gpay;
GstStructure *structure; GstStructure *structure;
@ -432,7 +432,7 @@ gst_rtp_mp4g_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
if (media_type == NULL) if (media_type == NULL)
goto config_failed; goto config_failed;
gst_base_rtp_payload_set_options (payload, media_type, TRUE, "MPEG4-GENERIC", gst_rtp_base_payload_set_options (payload, media_type, TRUE, "MPEG4-GENERIC",
rtpmp4gpay->rate); rtpmp4gpay->rate);
res = gst_rtp_mp4g_pay_new_caps (rtpmp4gpay); res = gst_rtp_mp4g_pay_new_caps (rtpmp4gpay);
@ -463,7 +463,7 @@ gst_rtp_mp4g_pay_flush (GstRtpMP4GPay * rtpmp4gpay)
total = avail = gst_adapter_available (rtpmp4gpay->adapter); total = avail = gst_adapter_available (rtpmp4gpay->adapter);
ret = GST_FLOW_OK; ret = GST_FLOW_OK;
mtu = GST_BASE_RTP_PAYLOAD_MTU (rtpmp4gpay); mtu = GST_RTP_BASE_PAYLOAD_MTU (rtpmp4gpay);
while (avail > 0) { while (avail > 0) {
guint towrite; guint towrite;
@ -545,7 +545,7 @@ gst_rtp_mp4g_pay_flush (GstRtpMP4GPay * rtpmp4gpay)
rtpmp4gpay->offset += rtpmp4gpay->frame_len; rtpmp4gpay->offset += rtpmp4gpay->frame_len;
} }
ret = gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtpmp4gpay), outbuf); ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpmp4gpay), outbuf);
avail -= payload_len; avail -= payload_len;
} }
@ -556,7 +556,7 @@ gst_rtp_mp4g_pay_flush (GstRtpMP4GPay * rtpmp4gpay)
/* we expect buffers as exactly one complete AU /* we expect buffers as exactly one complete AU
*/ */
static GstFlowReturn static GstFlowReturn
gst_rtp_mp4g_pay_handle_buffer (GstBaseRTPPayload * basepayload, gst_rtp_mp4g_pay_handle_buffer (GstRTPBasePayload * basepayload,
GstBuffer * buffer) GstBuffer * buffer)
{ {
GstRtpMP4GPay *rtpmp4gpay; GstRtpMP4GPay *rtpmp4gpay;
@ -573,7 +573,7 @@ gst_rtp_mp4g_pay_handle_buffer (GstBaseRTPPayload * basepayload,
} }
static gboolean static gboolean
gst_rtp_mp4g_pay_handle_event (GstBaseRTPPayload * payload, GstEvent * event) gst_rtp_mp4g_pay_handle_event (GstRTPBasePayload * payload, GstEvent * event)
{ {
GstRtpMP4GPay *rtpmp4gpay; GstRtpMP4GPay *rtpmp4gpay;

View file

@ -42,7 +42,7 @@ typedef struct _GstRtpMP4GPayClass GstRtpMP4GPayClass;
struct _GstRtpMP4GPay struct _GstRtpMP4GPay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
GstAdapter *adapter; GstAdapter *adapter;
GstClockTime first_timestamp; GstClockTime first_timestamp;
@ -61,7 +61,7 @@ struct _GstRtpMP4GPay
struct _GstRtpMP4GPayClass struct _GstRtpMP4GPayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
GType gst_rtp_mp4g_pay_get_type (void); GType gst_rtp_mp4g_pay_get_type (void);

View file

@ -55,13 +55,13 @@ GST_STATIC_PAD_TEMPLATE ("sink",
#define gst_rtp_mp4v_depay_parent_class parent_class #define gst_rtp_mp4v_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpMP4VDepay, gst_rtp_mp4v_depay, G_DEFINE_TYPE (GstRtpMP4VDepay, gst_rtp_mp4v_depay,
GST_TYPE_BASE_RTP_DEPAYLOAD); GST_TYPE_RTP_BASE_DEPAYLOAD);
static void gst_rtp_mp4v_depay_finalize (GObject * object); static void gst_rtp_mp4v_depay_finalize (GObject * object);
static gboolean gst_rtp_mp4v_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_mp4v_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
static GstBuffer *gst_rtp_mp4v_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_mp4v_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static GstStateChangeReturn gst_rtp_mp4v_depay_change_state (GstElement * static GstStateChangeReturn gst_rtp_mp4v_depay_change_state (GstElement *
@ -72,18 +72,18 @@ gst_rtp_mp4v_depay_class_init (GstRtpMP4VDepayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gobject_class->finalize = gst_rtp_mp4v_depay_finalize; gobject_class->finalize = gst_rtp_mp4v_depay_finalize;
gstelement_class->change_state = gst_rtp_mp4v_depay_change_state; gstelement_class->change_state = gst_rtp_mp4v_depay_change_state;
gstbasertpdepayload_class->process = gst_rtp_mp4v_depay_process; gstrtpbasedepayload_class->process = gst_rtp_mp4v_depay_process;
gstbasertpdepayload_class->set_caps = gst_rtp_mp4v_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_mp4v_depay_setcaps;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_mp4v_depay_src_template)); gst_static_pad_template_get (&gst_rtp_mp4v_depay_src_template));
@ -119,7 +119,7 @@ gst_rtp_mp4v_depay_finalize (GObject * object)
} }
static gboolean static gboolean
gst_rtp_mp4v_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_mp4v_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstStructure *structure; GstStructure *structure;
GstCaps *srccaps; GstCaps *srccaps;
@ -160,7 +160,7 @@ gst_rtp_mp4v_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
} }
static GstBuffer * static GstBuffer *
gst_rtp_mp4v_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_mp4v_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpMP4VDepay *rtpmp4vdepay; GstRtpMP4VDepay *rtpmp4vdepay;
GstBuffer *outbuf = NULL; GstBuffer *outbuf = NULL;

View file

@ -42,14 +42,14 @@ typedef struct _GstRtpMP4VDepayClass GstRtpMP4VDepayClass;
struct _GstRtpMP4VDepay struct _GstRtpMP4VDepay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
GstAdapter *adapter; GstAdapter *adapter;
}; };
struct _GstRtpMP4VDepayClass struct _GstRtpMP4VDepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_mp4v_depay_get_type (void); GType gst_rtp_mp4v_depay_get_type (void);

View file

@ -74,25 +74,25 @@ static void gst_rtp_mp4v_pay_set_property (GObject * object, guint prop_id,
static void gst_rtp_mp4v_pay_get_property (GObject * object, guint prop_id, static void gst_rtp_mp4v_pay_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static gboolean gst_rtp_mp4v_pay_setcaps (GstBaseRTPPayload * payload, static gboolean gst_rtp_mp4v_pay_setcaps (GstRTPBasePayload * payload,
GstCaps * caps); GstCaps * caps);
static GstFlowReturn gst_rtp_mp4v_pay_handle_buffer (GstBaseRTPPayload * static GstFlowReturn gst_rtp_mp4v_pay_handle_buffer (GstRTPBasePayload *
payload, GstBuffer * buffer); payload, GstBuffer * buffer);
static gboolean gst_rtp_mp4v_pay_handle_event (GstBaseRTPPayload * pay, static gboolean gst_rtp_mp4v_pay_handle_event (GstRTPBasePayload * pay,
GstEvent * event); GstEvent * event);
#define gst_rtp_mp4v_pay_parent_class parent_class #define gst_rtp_mp4v_pay_parent_class parent_class
G_DEFINE_TYPE (GstRtpMP4VPay, gst_rtp_mp4v_pay, GST_TYPE_BASE_RTP_PAYLOAD) G_DEFINE_TYPE (GstRtpMP4VPay, gst_rtp_mp4v_pay, GST_TYPE_RTP_BASE_PAYLOAD)
static void gst_rtp_mp4v_pay_class_init (GstRtpMP4VPayClass * klass) static void gst_rtp_mp4v_pay_class_init (GstRtpMP4VPayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gobject_class->set_property = gst_rtp_mp4v_pay_set_property; gobject_class->set_property = gst_rtp_mp4v_pay_set_property;
gobject_class->get_property = gst_rtp_mp4v_pay_get_property; gobject_class->get_property = gst_rtp_mp4v_pay_get_property;
@ -128,9 +128,9 @@ G_DEFINE_TYPE (GstRtpMP4VPay, gst_rtp_mp4v_pay, GST_TYPE_BASE_RTP_PAYLOAD)
gobject_class->finalize = gst_rtp_mp4v_pay_finalize; gobject_class->finalize = gst_rtp_mp4v_pay_finalize;
gstbasertppayload_class->set_caps = gst_rtp_mp4v_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_mp4v_pay_setcaps;
gstbasertppayload_class->handle_buffer = gst_rtp_mp4v_pay_handle_buffer; gstrtpbasepayload_class->handle_buffer = gst_rtp_mp4v_pay_handle_buffer;
gstbasertppayload_class->handle_event = gst_rtp_mp4v_pay_handle_event; gstrtpbasepayload_class->handle_event = gst_rtp_mp4v_pay_handle_event;
GST_DEBUG_CATEGORY_INIT (rtpmp4vpay_debug, "rtpmp4vpay", 0, GST_DEBUG_CATEGORY_INIT (rtpmp4vpay_debug, "rtpmp4vpay", 0,
"MP4 video RTP Payloader"); "MP4 video RTP Payloader");
@ -180,7 +180,7 @@ gst_rtp_mp4v_pay_new_caps (GstRtpMP4VPay * rtpmp4vpay)
gst_value_set_buffer (&v, rtpmp4vpay->config); gst_value_set_buffer (&v, rtpmp4vpay->config);
config = gst_value_serialize (&v); config = gst_value_serialize (&v);
res = gst_base_rtp_payload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpmp4vpay), res = gst_rtp_base_payload_set_outcaps (GST_RTP_BASE_PAYLOAD (rtpmp4vpay),
"profile-level-id", G_TYPE_STRING, profile, "profile-level-id", G_TYPE_STRING, profile,
"config", G_TYPE_STRING, config, NULL); "config", G_TYPE_STRING, config, NULL);
@ -193,7 +193,7 @@ gst_rtp_mp4v_pay_new_caps (GstRtpMP4VPay * rtpmp4vpay)
} }
static gboolean static gboolean
gst_rtp_mp4v_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps) gst_rtp_mp4v_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
{ {
GstRtpMP4VPay *rtpmp4vpay; GstRtpMP4VPay *rtpmp4vpay;
GstStructure *structure; GstStructure *structure;
@ -202,7 +202,7 @@ gst_rtp_mp4v_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
rtpmp4vpay = GST_RTP_MP4V_PAY (payload); rtpmp4vpay = GST_RTP_MP4V_PAY (payload);
gst_base_rtp_payload_set_options (payload, "video", TRUE, "MP4V-ES", gst_rtp_base_payload_set_options (payload, "video", TRUE, "MP4V-ES",
rtpmp4vpay->rate); rtpmp4vpay->rate);
res = TRUE; res = TRUE;
@ -284,7 +284,7 @@ gst_rtp_mp4v_pay_flush (GstRtpMP4VPay * rtpmp4vpay)
packet_len = gst_rtp_buffer_calc_packet_len (avail, 0, 0); packet_len = gst_rtp_buffer_calc_packet_len (avail, 0, 0);
/* fill one MTU or all available bytes */ /* fill one MTU or all available bytes */
towrite = MIN (packet_len, GST_BASE_RTP_PAYLOAD_MTU (rtpmp4vpay)); towrite = MIN (packet_len, GST_RTP_BASE_PAYLOAD_MTU (rtpmp4vpay));
/* this is the payload length */ /* this is the payload length */
payload_len = gst_rtp_buffer_calc_payload_len (towrite, 0, 0); payload_len = gst_rtp_buffer_calc_payload_len (towrite, 0, 0);
@ -311,14 +311,14 @@ gst_rtp_mp4v_pay_flush (GstRtpMP4VPay * rtpmp4vpay)
gst_buffer_list_insert (list, -1, outbuf); gst_buffer_list_insert (list, -1, outbuf);
} else { } else {
ret = ret =
gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtpmp4vpay), outbuf); gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpmp4vpay), outbuf);
} }
} }
if (rtpmp4vpay->buffer_list) { if (rtpmp4vpay->buffer_list) {
/* push the whole buffer list at once */ /* push the whole buffer list at once */
ret = ret =
gst_base_rtp_payload_push_list (GST_BASE_RTP_PAYLOAD (rtpmp4vpay), gst_rtp_base_payload_push_list (GST_RTP_BASE_PAYLOAD (rtpmp4vpay),
list); list);
} }
@ -438,7 +438,7 @@ gst_rtp_mp4v_pay_depay_data (GstRtpMP4VPay * enc, guint8 * data, guint size,
/* we expect buffers starting on startcodes. /* we expect buffers starting on startcodes.
*/ */
static GstFlowReturn static GstFlowReturn
gst_rtp_mp4v_pay_handle_buffer (GstBaseRTPPayload * basepayload, gst_rtp_mp4v_pay_handle_buffer (GstRTPBasePayload * basepayload,
GstBuffer * buffer) GstBuffer * buffer)
{ {
GstRtpMP4VPay *rtpmp4vpay; GstRtpMP4VPay *rtpmp4vpay;
@ -563,7 +563,7 @@ gst_rtp_mp4v_pay_handle_buffer (GstBaseRTPPayload * basepayload,
/* get packet length of data and see if we exceeded MTU. */ /* get packet length of data and see if we exceeded MTU. */
packet_len = gst_rtp_buffer_calc_packet_len (avail + size, 0, 0); packet_len = gst_rtp_buffer_calc_packet_len (avail + size, 0, 0);
if (gst_base_rtp_payload_is_filled (basepayload, if (gst_rtp_base_payload_is_filled (basepayload,
packet_len, rtpmp4vpay->duration + duration)) { packet_len, rtpmp4vpay->duration + duration)) {
ret = gst_rtp_mp4v_pay_flush (rtpmp4vpay); ret = gst_rtp_mp4v_pay_flush (rtpmp4vpay);
rtpmp4vpay->first_timestamp = timestamp; rtpmp4vpay->first_timestamp = timestamp;
@ -579,7 +579,7 @@ gst_rtp_mp4v_pay_handle_buffer (GstBaseRTPPayload * basepayload,
} }
static gboolean static gboolean
gst_rtp_mp4v_pay_handle_event (GstBaseRTPPayload * pay, GstEvent * event) gst_rtp_mp4v_pay_handle_event (GstRTPBasePayload * pay, GstEvent * event)
{ {
GstRtpMP4VPay *rtpmp4vpay; GstRtpMP4VPay *rtpmp4vpay;

View file

@ -42,7 +42,7 @@ typedef struct _GstRtpMP4VPayClass GstRtpMP4VPayClass;
struct _GstRtpMP4VPay struct _GstRtpMP4VPay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
GstAdapter *adapter; GstAdapter *adapter;
GstClockTime first_timestamp; GstClockTime first_timestamp;
@ -64,7 +64,7 @@ struct _GstRtpMP4VPay
struct _GstRtpMP4VPayClass struct _GstRtpMP4VPayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
GType gst_rtp_mp4v_pay_get_type (void); GType gst_rtp_mp4v_pay_get_type (void);

View file

@ -51,24 +51,24 @@ static GstStaticPadTemplate gst_rtp_mpa_depay_sink_template =
); );
#define gst_rtp_mpa_depay_parent_class parent_class #define gst_rtp_mpa_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpMPADepay, gst_rtp_mpa_depay, GST_TYPE_BASE_RTP_DEPAYLOAD); G_DEFINE_TYPE (GstRtpMPADepay, gst_rtp_mpa_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
static gboolean gst_rtp_mpa_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_mpa_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
static GstBuffer *gst_rtp_mpa_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_mpa_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static void static void
gst_rtp_mpa_depay_class_init (GstRtpMPADepayClass * klass) gst_rtp_mpa_depay_class_init (GstRtpMPADepayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
GST_DEBUG_CATEGORY_INIT (rtpmpadepay_debug, "rtpmpadepay", 0, GST_DEBUG_CATEGORY_INIT (rtpmpadepay_debug, "rtpmpadepay", 0,
"MPEG Audio RTP Depayloader"); "MPEG Audio RTP Depayloader");
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_mpa_depay_src_template)); gst_static_pad_template_get (&gst_rtp_mpa_depay_src_template));
@ -80,8 +80,8 @@ gst_rtp_mpa_depay_class_init (GstRtpMPADepayClass * klass)
"Extracts MPEG audio from RTP packets (RFC 2038)", "Extracts MPEG audio from RTP packets (RFC 2038)",
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gstbasertpdepayload_class->set_caps = gst_rtp_mpa_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_mpa_depay_setcaps;
gstbasertpdepayload_class->process = gst_rtp_mpa_depay_process; gstrtpbasedepayload_class->process = gst_rtp_mpa_depay_process;
} }
static void static void
@ -91,7 +91,7 @@ gst_rtp_mpa_depay_init (GstRtpMPADepay * rtpmpadepay)
} }
static gboolean static gboolean
gst_rtp_mpa_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_mpa_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstStructure *structure; GstStructure *structure;
GstCaps *outcaps; GstCaps *outcaps;
@ -113,7 +113,7 @@ gst_rtp_mpa_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
} }
static GstBuffer * static GstBuffer *
gst_rtp_mpa_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_mpa_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpMPADepay *rtpmpadepay; GstRtpMPADepay *rtpmpadepay;
GstBuffer *outbuf; GstBuffer *outbuf;

View file

@ -41,12 +41,12 @@ typedef struct _GstRtpMPADepayClass GstRtpMPADepayClass;
struct _GstRtpMPADepay struct _GstRtpMPADepay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
}; };
struct _GstRtpMPADepayClass struct _GstRtpMPADepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_mpa_depay_get_type (void); GType gst_rtp_mpa_depay_get_type (void);

View file

@ -56,30 +56,30 @@ static void gst_rtp_mpa_pay_finalize (GObject * object);
static GstStateChangeReturn gst_rtp_mpa_pay_change_state (GstElement * element, static GstStateChangeReturn gst_rtp_mpa_pay_change_state (GstElement * element,
GstStateChange transition); GstStateChange transition);
static gboolean gst_rtp_mpa_pay_setcaps (GstBaseRTPPayload * payload, static gboolean gst_rtp_mpa_pay_setcaps (GstRTPBasePayload * payload,
GstCaps * caps); GstCaps * caps);
static gboolean gst_rtp_mpa_pay_handle_event (GstBaseRTPPayload * payload, static gboolean gst_rtp_mpa_pay_handle_event (GstRTPBasePayload * payload,
GstEvent * event); GstEvent * event);
static GstFlowReturn gst_rtp_mpa_pay_flush (GstRtpMPAPay * rtpmpapay); static GstFlowReturn gst_rtp_mpa_pay_flush (GstRtpMPAPay * rtpmpapay);
static GstFlowReturn gst_rtp_mpa_pay_handle_buffer (GstBaseRTPPayload * payload, static GstFlowReturn gst_rtp_mpa_pay_handle_buffer (GstRTPBasePayload * payload,
GstBuffer * buffer); GstBuffer * buffer);
#define gst_rtp_mpa_pay_parent_class parent_class #define gst_rtp_mpa_pay_parent_class parent_class
G_DEFINE_TYPE (GstRtpMPAPay, gst_rtp_mpa_pay, GST_TYPE_BASE_RTP_PAYLOAD); G_DEFINE_TYPE (GstRtpMPAPay, gst_rtp_mpa_pay, GST_TYPE_RTP_BASE_PAYLOAD);
static void static void
gst_rtp_mpa_pay_class_init (GstRtpMPAPayClass * klass) gst_rtp_mpa_pay_class_init (GstRtpMPAPayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPPayloadClass *gstbasertppayload_class; GstRTPBasePayloadClass *gstrtpbasepayload_class;
GST_DEBUG_CATEGORY_INIT (rtpmpapay_debug, "rtpmpapay", 0, GST_DEBUG_CATEGORY_INIT (rtpmpapay_debug, "rtpmpapay", 0,
"MPEG Audio RTP Depayloader"); "MPEG Audio RTP Depayloader");
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertppayload_class = (GstBaseRTPPayloadClass *) klass; gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;
gobject_class->finalize = gst_rtp_mpa_pay_finalize; gobject_class->finalize = gst_rtp_mpa_pay_finalize;
@ -95,9 +95,9 @@ gst_rtp_mpa_pay_class_init (GstRtpMPAPayClass * klass)
"Payload MPEG audio as RTP packets (RFC 2038)", "Payload MPEG audio as RTP packets (RFC 2038)",
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gstbasertppayload_class->set_caps = gst_rtp_mpa_pay_setcaps; gstrtpbasepayload_class->set_caps = gst_rtp_mpa_pay_setcaps;
gstbasertppayload_class->handle_event = gst_rtp_mpa_pay_handle_event; gstrtpbasepayload_class->handle_event = gst_rtp_mpa_pay_handle_event;
gstbasertppayload_class->handle_buffer = gst_rtp_mpa_pay_handle_buffer; gstrtpbasepayload_class->handle_buffer = gst_rtp_mpa_pay_handle_buffer;
} }
static void static void
@ -129,18 +129,18 @@ gst_rtp_mpa_pay_reset (GstRtpMPAPay * pay)
} }
static gboolean static gboolean
gst_rtp_mpa_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps) gst_rtp_mpa_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
{ {
gboolean res; gboolean res;
gst_base_rtp_payload_set_options (payload, "audio", TRUE, "MPA", 90000); gst_rtp_base_payload_set_options (payload, "audio", TRUE, "MPA", 90000);
res = gst_base_rtp_payload_set_outcaps (payload, NULL); res = gst_rtp_base_payload_set_outcaps (payload, NULL);
return res; return res;
} }
static gboolean static gboolean
gst_rtp_mpa_pay_handle_event (GstBaseRTPPayload * payload, GstEvent * event) gst_rtp_mpa_pay_handle_event (GstRTPBasePayload * payload, GstEvent * event)
{ {
gboolean ret; gboolean ret;
GstRtpMPAPay *rtpmpapay; GstRtpMPAPay *rtpmpapay;
@ -160,7 +160,7 @@ gst_rtp_mpa_pay_handle_event (GstBaseRTPPayload * payload, GstEvent * event)
} }
ret = ret =
GST_BASE_RTP_PAYLOAD_CLASS (parent_class)->handle_event (payload, event); GST_RTP_BASE_PAYLOAD_CLASS (parent_class)->handle_event (payload, event);
return ret; return ret;
} }
@ -195,7 +195,7 @@ gst_rtp_mpa_pay_flush (GstRtpMPAPay * rtpmpapay)
packet_len = gst_rtp_buffer_calc_packet_len (4 + avail, 0, 0); packet_len = gst_rtp_buffer_calc_packet_len (4 + avail, 0, 0);
/* fill one MTU or all available bytes */ /* fill one MTU or all available bytes */
towrite = MIN (packet_len, GST_BASE_RTP_PAYLOAD_MTU (rtpmpapay)); towrite = MIN (packet_len, GST_RTP_BASE_PAYLOAD_MTU (rtpmpapay));
/* this is the payload length */ /* this is the payload length */
payload_len = gst_rtp_buffer_calc_payload_len (towrite, 0, 0); payload_len = gst_rtp_buffer_calc_payload_len (towrite, 0, 0);
@ -236,14 +236,14 @@ gst_rtp_mpa_pay_flush (GstRtpMPAPay * rtpmpapay)
GST_BUFFER_TIMESTAMP (outbuf) = rtpmpapay->first_ts; GST_BUFFER_TIMESTAMP (outbuf) = rtpmpapay->first_ts;
GST_BUFFER_DURATION (outbuf) = rtpmpapay->duration; GST_BUFFER_DURATION (outbuf) = rtpmpapay->duration;
ret = gst_base_rtp_payload_push (GST_BASE_RTP_PAYLOAD (rtpmpapay), outbuf); ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpmpapay), outbuf);
} }
return ret; return ret;
} }
static GstFlowReturn static GstFlowReturn
gst_rtp_mpa_pay_handle_buffer (GstBaseRTPPayload * basepayload, gst_rtp_mpa_pay_handle_buffer (GstRTPBasePayload * basepayload,
GstBuffer * buffer) GstBuffer * buffer)
{ {
GstRtpMPAPay *rtpmpapay; GstRtpMPAPay *rtpmpapay;
@ -271,7 +271,7 @@ gst_rtp_mpa_pay_handle_buffer (GstBaseRTPPayload * basepayload,
/* if this buffer is going to overflow the packet, flush what we /* if this buffer is going to overflow the packet, flush what we
* have. */ * have. */
if (gst_base_rtp_payload_is_filled (basepayload, if (gst_rtp_base_payload_is_filled (basepayload,
packet_len, rtpmpapay->duration + duration)) { packet_len, rtpmpapay->duration + duration)) {
ret = gst_rtp_mpa_pay_flush (rtpmpapay); ret = gst_rtp_mpa_pay_flush (rtpmpapay);
avail = 0; avail = 0;

View file

@ -42,7 +42,7 @@ typedef struct _GstRtpMPAPayClass GstRtpMPAPayClass;
struct _GstRtpMPAPay struct _GstRtpMPAPay
{ {
GstBaseRTPPayload payload; GstRTPBasePayload payload;
GstAdapter *adapter; GstAdapter *adapter;
GstClockTime first_ts; GstClockTime first_ts;
@ -51,7 +51,7 @@ struct _GstRtpMPAPay
struct _GstRtpMPAPayClass struct _GstRtpMPAPayClass
{ {
GstBaseRTPPayloadClass parent_class; GstRTPBasePayloadClass parent_class;
}; };
GType gst_rtp_mpa_pay_get_type (void); GType gst_rtp_mpa_pay_get_type (void);

View file

@ -71,14 +71,14 @@ typedef struct _GstADUFrame
#define gst_rtp_mpa_robust_depay_parent_class parent_class #define gst_rtp_mpa_robust_depay_parent_class parent_class
G_DEFINE_TYPE (GstRtpMPARobustDepay, gst_rtp_mpa_robust_depay, G_DEFINE_TYPE (GstRtpMPARobustDepay, gst_rtp_mpa_robust_depay,
GST_TYPE_BASE_RTP_DEPAYLOAD); GST_TYPE_RTP_BASE_DEPAYLOAD);
static GstStateChangeReturn gst_rtp_mpa_robust_change_state (GstElement * static GstStateChangeReturn gst_rtp_mpa_robust_change_state (GstElement *
element, GstStateChange transition); element, GstStateChange transition);
static gboolean gst_rtp_mpa_robust_depay_setcaps (GstBaseRTPDepayload * static gboolean gst_rtp_mpa_robust_depay_setcaps (GstRTPBaseDepayload *
depayload, GstCaps * caps); depayload, GstCaps * caps);
static GstBuffer *gst_rtp_mpa_robust_depay_process (GstBaseRTPDepayload * static GstBuffer *gst_rtp_mpa_robust_depay_process (GstRTPBaseDepayload *
depayload, GstBuffer * buf); depayload, GstBuffer * buf);
static void static void
@ -99,14 +99,14 @@ gst_rtp_mpa_robust_depay_class_init (GstRtpMPARobustDepayClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
GST_DEBUG_CATEGORY_INIT (rtpmparobustdepay_debug, "rtpmparobustdepay", 0, GST_DEBUG_CATEGORY_INIT (rtpmparobustdepay_debug, "rtpmparobustdepay", 0,
"Robust MPEG Audio RTP Depayloader"); "Robust MPEG Audio RTP Depayloader");
gobject_class = (GObjectClass *) klass; gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gobject_class->finalize = gst_rtp_mpa_robust_depay_finalize; gobject_class->finalize = gst_rtp_mpa_robust_depay_finalize;
@ -123,8 +123,8 @@ gst_rtp_mpa_robust_depay_class_init (GstRtpMPARobustDepayClass * klass)
"Extracts MPEG audio from RTP packets (RFC 5219)", "Extracts MPEG audio from RTP packets (RFC 5219)",
"Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>"); "Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>");
gstbasertpdepayload_class->set_caps = gst_rtp_mpa_robust_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_mpa_robust_depay_setcaps;
gstbasertpdepayload_class->process = gst_rtp_mpa_robust_depay_process; gstrtpbasedepayload_class->process = gst_rtp_mpa_robust_depay_process;
} }
static void static void
@ -135,7 +135,7 @@ gst_rtp_mpa_robust_depay_init (GstRtpMPARobustDepay * rtpmpadepay)
} }
static gboolean static gboolean
gst_rtp_mpa_robust_depay_setcaps (GstBaseRTPDepayload * depayload, gst_rtp_mpa_robust_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps) GstCaps * caps)
{ {
GstRtpMPARobustDepay *rtpmpadepay; GstRtpMPARobustDepay *rtpmpadepay;
@ -495,7 +495,7 @@ gst_rtp_mpa_robust_depay_push_mp3_frames (GstRtpMPARobustDepay * rtpmpadepay)
if (G_UNLIKELY (frame->layer != 3)) { if (G_UNLIKELY (frame->layer != 3)) {
GST_DEBUG_OBJECT (rtpmpadepay, "layer %d frame, sending as-is", GST_DEBUG_OBJECT (rtpmpadepay, "layer %d frame, sending as-is",
frame->layer); frame->layer);
gst_base_rtp_depayload_push (GST_BASE_RTP_DEPAYLOAD (rtpmpadepay), gst_rtp_base_depayload_push (GST_RTP_BASE_DEPAYLOAD (rtpmpadepay),
frame->buffer); frame->buffer);
frame->buffer = NULL; frame->buffer = NULL;
/* and remove it from any further consideration */ /* and remove it from any further consideration */
@ -617,7 +617,7 @@ gst_rtp_mpa_robust_depay_push_mp3_frames (GstRtpMPARobustDepay * rtpmpadepay)
rtpmpadepay->size -= head->data_size; rtpmpadepay->size -= head->data_size;
gst_rtp_mpa_robust_depay_dequeue_frame (rtpmpadepay); gst_rtp_mpa_robust_depay_dequeue_frame (rtpmpadepay);
/* send */ /* send */
ret = gst_base_rtp_depayload_push (GST_BASE_RTP_DEPAYLOAD (rtpmpadepay), ret = gst_rtp_base_depayload_push (GST_RTP_BASE_DEPAYLOAD (rtpmpadepay),
buf); buf);
} }
} }
@ -641,7 +641,7 @@ gst_rtp_mpa_robust_depay_submit_adu (GstRtpMPARobustDepay * rtpmpadepay,
} }
static GstBuffer * static GstBuffer *
gst_rtp_mpa_robust_depay_process (GstBaseRTPDepayload * depayload, gst_rtp_mpa_robust_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf) GstBuffer * buf)
{ {
GstRtpMPARobustDepay *rtpmpadepay; GstRtpMPARobustDepay *rtpmpadepay;
@ -680,8 +680,8 @@ gst_rtp_mpa_robust_depay_process (GstBaseRTPDepayload * depayload,
*/ */
while (payload_len) { while (payload_len) {
if (G_LIKELY (rtpmpadepay->has_descriptor)) { if (G_LIKELY (rtpmpadepay->has_descriptor)) {
cont = !!(payload[offset] & 0x80); cont = ! !(payload[offset] & 0x80);
dtype = !!(payload[offset] & 0x40); dtype = ! !(payload[offset] & 0x40);
if (dtype) { if (dtype) {
size = (payload[offset] & 0x3f) << 8 | payload[offset + 1]; size = (payload[offset] & 0x3f) << 8 | payload[offset + 1];
payload_len--; payload_len--;

View file

@ -44,7 +44,7 @@ typedef struct _GstRtpMPARobustDepayClass GstRtpMPARobustDepayClass;
struct _GstRtpMPARobustDepay struct _GstRtpMPARobustDepay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
GstAdapter *adapter; GstAdapter *adapter;
gboolean has_descriptor; gboolean has_descriptor;
@ -66,7 +66,7 @@ struct _GstRtpMPARobustDepay
struct _GstRtpMPARobustDepayClass struct _GstRtpMPARobustDepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_mpa_robust_depay_get_type (void); GType gst_rtp_mpa_robust_depay_get_type (void);

View file

@ -53,21 +53,21 @@ static GstStaticPadTemplate gst_rtp_mpv_depay_sink_template =
"clock-rate = (int) 90000") "clock-rate = (int) 90000")
); );
G_DEFINE_TYPE (GstRtpMPVDepay, gst_rtp_mpv_depay, GST_TYPE_BASE_RTP_DEPAYLOAD); G_DEFINE_TYPE (GstRtpMPVDepay, gst_rtp_mpv_depay, GST_TYPE_RTP_BASE_DEPAYLOAD);
static gboolean gst_rtp_mpv_depay_setcaps (GstBaseRTPDepayload * depayload, static gboolean gst_rtp_mpv_depay_setcaps (GstRTPBaseDepayload * depayload,
GstCaps * caps); GstCaps * caps);
static GstBuffer *gst_rtp_mpv_depay_process (GstBaseRTPDepayload * depayload, static GstBuffer *gst_rtp_mpv_depay_process (GstRTPBaseDepayload * depayload,
GstBuffer * buf); GstBuffer * buf);
static void static void
gst_rtp_mpv_depay_class_init (GstRtpMPVDepayClass * klass) gst_rtp_mpv_depay_class_init (GstRtpMPVDepayClass * klass)
{ {
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
GstBaseRTPDepayloadClass *gstbasertpdepayload_class; GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;
gstelement_class = (GstElementClass *) klass; gstelement_class = (GstElementClass *) klass;
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass; gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;
gst_element_class_add_pad_template (gstelement_class, gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&gst_rtp_mpv_depay_src_template)); gst_static_pad_template_get (&gst_rtp_mpv_depay_src_template));
@ -79,8 +79,8 @@ gst_rtp_mpv_depay_class_init (GstRtpMPVDepayClass * klass)
"Extracts MPEG video from RTP packets (RFC 2250)", "Extracts MPEG video from RTP packets (RFC 2250)",
"Wim Taymans <wim.taymans@gmail.com>"); "Wim Taymans <wim.taymans@gmail.com>");
gstbasertpdepayload_class->set_caps = gst_rtp_mpv_depay_setcaps; gstrtpbasedepayload_class->set_caps = gst_rtp_mpv_depay_setcaps;
gstbasertpdepayload_class->process = gst_rtp_mpv_depay_process; gstrtpbasedepayload_class->process = gst_rtp_mpv_depay_process;
GST_DEBUG_CATEGORY_INIT (rtpmpvdepay_debug, "rtpmpvdepay", 0, GST_DEBUG_CATEGORY_INIT (rtpmpvdepay_debug, "rtpmpvdepay", 0,
"MPEG Video RTP Depayloader"); "MPEG Video RTP Depayloader");
@ -92,7 +92,7 @@ gst_rtp_mpv_depay_init (GstRtpMPVDepay * rtpmpvdepay)
} }
static gboolean static gboolean
gst_rtp_mpv_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) gst_rtp_mpv_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
{ {
GstStructure *structure; GstStructure *structure;
gint clock_rate; gint clock_rate;
@ -115,7 +115,7 @@ gst_rtp_mpv_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
} }
static GstBuffer * static GstBuffer *
gst_rtp_mpv_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) gst_rtp_mpv_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpMPVDepay *rtpmpvdepay; GstRtpMPVDepay *rtpmpvdepay;
GstBuffer *outbuf; GstBuffer *outbuf;

View file

@ -41,12 +41,12 @@ typedef struct _GstRtpMPVDepayClass GstRtpMPVDepayClass;
struct _GstRtpMPVDepay struct _GstRtpMPVDepay
{ {
GstBaseRTPDepayload depayload; GstRTPBaseDepayload depayload;
}; };
struct _GstRtpMPVDepayClass struct _GstRtpMPVDepayClass
{ {
GstBaseRTPDepayloadClass parent_class; GstRTPBaseDepayloadClass parent_class;
}; };
GType gst_rtp_mpv_depay_get_type (void); GType gst_rtp_mpv_depay_get_type (void);

Some files were not shown because too many files have changed in this diff Show more