gst-libs/gst/rtp/gstbasertpaudiopayload.c: Return FALSE from the event handler to...
authorWim Taymans <wim.taymans@gmail.com>
Tue, 4 Sep 2007 16:18:48 +0000 (16:18 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Tue, 4 Sep 2007 16:18:48 +0000 (16:18 +0000)
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
gst-libs/gst/rtp/gstbasertpaudiopayload.c
gst-libs/gst/rtp/gstbasertpdepayload.c
gst-libs/gst/rtp/gstbasertppayload.c

index 18e941f..5403d5f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2007-09-04  Wim Taymans  <wim.taymans@gmail.com>
+
+       * 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  <jdahlin@async.com.br>
 
        * gst/typefind/gsttypefindfunctions.c (plugin_init): 
index cab27fc..f729dfa 100644 (file)
@@ -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;
 }
 
index 695b3e4..b03a0e7 100644 (file)
@@ -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),
index 9314e80..59d4dbe 100644 (file)
@@ -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