rtpsbcpay: Fix use of gstreamer plugin with rhythmbox and banshee and rtp timestamps.

This commit is contained in:
Luiz Augusto von Dentz 2008-01-23 19:17:33 +00:00 committed by Tim-Philipp Müller
parent 96971cd323
commit 41e2f4f544
2 changed files with 4 additions and 1 deletions

View file

@ -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;
}

View file

@ -48,6 +48,7 @@ struct _GstRtpSBCPay {
GstBaseRTPPayload base;
GstAdapter *adapter;
GstClockTime timestamp;
guint frame_length;