From 56e39e7c1c16a4e9871123b8d0b1246893c605b8 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 4 Sep 2007 16:18:48 +0000 Subject: [PATCH] gst-libs/gst/rtp/gstbasertpaudiopayload.c: Return FALSE from the event handler to let the parent class handle the event. Original commit message from CVS: * gst-libs/gst/rtp/gstbasertpaudiopayload.c: (gst_base_rtp_payload_audio_handle_event): Return FALSE from the event handler to let the parent class handle the event. * gst-libs/gst/rtp/gstbasertpdepayload.c: (gst_base_rtp_depayload_chain), (gst_base_rtp_depayload_push_full): Mark outgoing buffers as DISCONT if the incomming buffer was DISCONT. * gst-libs/gst/rtp/gstbasertppayload.c: Bump the MTU to 1400. --- ChangeLog | 14 ++++++++++++++ gst-libs/gst/rtp/gstbasertpaudiopayload.c | 3 ++- gst-libs/gst/rtp/gstbasertpdepayload.c | 14 ++++++++++++++ gst-libs/gst/rtp/gstbasertppayload.c | 2 +- 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 18e941fc80..5403d5f15c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2007-09-04 Wim Taymans + + * gst-libs/gst/rtp/gstbasertpaudiopayload.c: + (gst_base_rtp_payload_audio_handle_event): + Return FALSE from the event handler to let the parent class handle the + event. + + * gst-libs/gst/rtp/gstbasertpdepayload.c: + (gst_base_rtp_depayload_chain), (gst_base_rtp_depayload_push_full): + Mark outgoing buffers as DISCONT if the incomming buffer was DISCONT. + + * gst-libs/gst/rtp/gstbasertppayload.c: + Bump the MTU to 1400. + 2007-09-03 Johan Dahlin * gst/typefind/gsttypefindfunctions.c (plugin_init): diff --git a/gst-libs/gst/rtp/gstbasertpaudiopayload.c b/gst-libs/gst/rtp/gstbasertpaudiopayload.c index cab27fc5fd..f729dfa82e 100644 --- a/gst-libs/gst/rtp/gstbasertpaudiopayload.c +++ b/gst-libs/gst/rtp/gstbasertpaudiopayload.c @@ -621,7 +621,7 @@ static gboolean gst_base_rtp_payload_audio_handle_event (GstPad * pad, GstEvent * event) { GstBaseRTPAudioPayload *basertpaudiopayload; - gboolean res = TRUE; + gboolean res = FALSE; basertpaudiopayload = GST_BASE_RTP_AUDIO_PAYLOAD (gst_pad_get_parent (pad)); @@ -642,6 +642,7 @@ gst_base_rtp_payload_audio_handle_event (GstPad * pad, GstEvent * event) gst_object_unref (basertpaudiopayload); + /* return FALSE to let parent handle the remainder of the event */ return res; } diff --git a/gst-libs/gst/rtp/gstbasertpdepayload.c b/gst-libs/gst/rtp/gstbasertpdepayload.c index 695b3e4f17..b03a0e7630 100644 --- a/gst-libs/gst/rtp/gstbasertpdepayload.c +++ b/gst-libs/gst/rtp/gstbasertpdepayload.c @@ -56,6 +56,8 @@ struct _GstBaseRTPDepayloadPrivate gdouble play_scale; GstClockTime exttimestamp; + + gboolean discont; }; /* Filter signals and args */ @@ -248,6 +250,7 @@ static GstFlowReturn gst_base_rtp_depayload_chain (GstPad * pad, GstBuffer * in) { GstBaseRTPDepayload *filter; + GstBaseRTPDepayloadPrivate *priv; GstBaseRTPDepayloadClass *bclass; GstFlowReturn ret = GST_FLOW_OK; GstBuffer *out_buf; @@ -257,6 +260,9 @@ gst_base_rtp_depayload_chain (GstPad * pad, GstBuffer * in) if (filter->clock_rate == 0) goto not_configured; + priv = filter->priv; + priv->discont = GST_BUFFER_IS_DISCONT (in); + bclass = GST_BASE_RTP_DEPAYLOAD_GET_CLASS (filter); /* let's send it out to processing */ @@ -332,6 +338,9 @@ gst_base_rtp_depayload_push_full (GstBaseRTPDepayload * filter, GstFlowReturn ret; GstCaps *srccaps; GstBaseRTPDepayloadClass *bclass; + GstBaseRTPDepayloadPrivate *priv; + + priv = filter->priv; /* set the caps if any */ srccaps = GST_PAD_CAPS (filter->srcpad); @@ -344,6 +353,11 @@ gst_base_rtp_depayload_push_full (GstBaseRTPDepayload * filter, if (bclass->set_gst_timestamp && do_ts) bclass->set_gst_timestamp (filter, timestamp, out_buf); + if (priv->discont) { + GST_BUFFER_FLAG_SET (out_buf, GST_BUFFER_FLAG_DISCONT); + priv->discont = FALSE; + } + /* push it */ GST_LOG_OBJECT (filter, "Pushing buffer size %d, timestamp %" GST_TIME_FORMAT, GST_BUFFER_SIZE (out_buf), diff --git a/gst-libs/gst/rtp/gstbasertppayload.c b/gst-libs/gst/rtp/gstbasertppayload.c index 9314e805d6..59d4dbeca5 100644 --- a/gst-libs/gst/rtp/gstbasertppayload.c +++ b/gst-libs/gst/rtp/gstbasertppayload.c @@ -60,7 +60,7 @@ enum * 1432 bytes or so. And that should be adjusted downward further for other * encapsulations like PPPoE, so 1400 at most. */ -#define DEFAULT_MTU 1024 +#define DEFAULT_MTU 1400 #define DEFAULT_PT 96 #define DEFAULT_SSRC -1 #define DEFAULT_TIMESTAMP_OFFSET -1