From: Luiz Augusto von Dentz Date: Wed, 23 Jan 2008 19:17:33 +0000 (+0000) Subject: rtpsbcpay: Fix use of gstreamer plugin with rhythmbox and banshee and rtp timestamps. X-Git-Tag: 1.1.1~412 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=41e2f4f544241bf4d1a9ed9352c2e366f5438d92;p=platform%2Fupstream%2Fgst-plugins-good.git rtpsbcpay: Fix use of gstreamer plugin with rhythmbox and banshee and rtp timestamps. --- diff --git a/gst/rtp/gstrtpsbcpay.c b/gst/rtp/gstrtpsbcpay.c index 2d6d705..befeb50 100644 --- a/gst/rtp/gstrtpsbcpay.c +++ b/gst/rtp/gstrtpsbcpay.c @@ -195,7 +195,7 @@ gst_rtp_sbc_pay_flush_buffers (GstRtpSBCPay * sbcpay) memcpy (payload_data + RTP_SBC_PAYLOAD_HEADER_SIZE, data, max_payload); g_free (data); - /* FIXME - timestamp it! */ + GST_BUFFER_TIMESTAMP (outbuf) = sbcpay->timestamp; GST_DEBUG_OBJECT (sbcpay, "Pushing %d bytes", max_payload); return gst_basertppayload_push (GST_BASE_RTP_PAYLOAD (sbcpay), outbuf); @@ -210,6 +210,7 @@ gst_rtp_sbc_pay_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buffer) sbcpay = GST_RTP_SBC_PAY (payload); gst_adapter_push (sbcpay->adapter, gst_buffer_copy (buffer)); + sbcpay->timestamp = GST_BUFFER_TIMESTAMP (buffer); available = gst_adapter_available (sbcpay->adapter); if (available + RTP_SBC_HEADER_TOTAL >= GST_BASE_RTP_PAYLOAD_MTU (sbcpay) || @@ -332,6 +333,7 @@ gst_rtp_sbc_pay_init (GstRtpSBCPay * self, GstRtpSBCPayClass * klass) { self->adapter = gst_adapter_new (); self->frame_length = 0; + self->timestamp = 0; self->min_frames = DEFAULT_MIN_FRAMES; } diff --git a/gst/rtp/gstrtpsbcpay.h b/gst/rtp/gstrtpsbcpay.h index f086a1c..474d720 100644 --- a/gst/rtp/gstrtpsbcpay.h +++ b/gst/rtp/gstrtpsbcpay.h @@ -48,6 +48,7 @@ struct _GstRtpSBCPay { GstBaseRTPPayload base; GstAdapter *adapter; + GstClockTime timestamp; guint frame_length;