gst-libs/gst/rtp/gstbasertppayload.c: Simply converting the running time into an RTP timestamp by scaling it based on...

Original commit message from CVS:
* gst-libs/gst/rtp/gstbasertppayload.c: (gst_basertppayload_push),
(gst_basertppayload_change_state):
Simply converting the running time into an RTP timestamp by scaling it
based on the clock-rate is good enough for making an RTP timestamp. This
has the added benefit that we can later on expose a property with the
RTP timestamp of running time 0, as is needed for RTSP servers to
generate the response of the PLAY request.
This commit is contained in:
Wim Taymans 2008-05-30 15:29:20 +00:00
parent fdd708c418
commit 11309247f3
2 changed files with 10 additions and 13 deletions

View file

@ -1,3 +1,13 @@
2008-05-30 Wim Taymans <wim.taymans@collabora.co.uk>
* gst-libs/gst/rtp/gstbasertppayload.c: (gst_basertppayload_push),
(gst_basertppayload_change_state):
Simply converting the running time into an RTP timestamp by scaling it
based on the clock-rate is good enough for making an RTP timestamp. This
has the added benefit that we can later on expose a property with the
RTP timestamp of running time 0, as is needed for RTSP servers to
generate the response of the PLAY request.
2008-05-30 Sebastian Dröge <slomo@circular-chaos.org>
* gst/audioconvert/gstaudioconvert.c:

View file

@ -45,8 +45,6 @@ struct _GstBaseRTPPayloadPrivate
gboolean seqnum_offset_random;
gboolean ssrc_random;
guint16 next_seqnum;
GstClockTime rt_base;
};
/* BaseRTPPayload signals and args */
@ -661,15 +659,6 @@ gst_basertppayload_push (GstBaseRTPPayload * payload, GstBuffer * buffer)
rtime = gst_segment_to_running_time (&payload->segment, GST_FORMAT_TIME,
timestamp);
/* take first timestamp as base, we want to calculate the RTP timestamp
* starting from the ts_base */
if (priv->rt_base == -1) {
priv->rt_base = rtime;
GST_LOG_OBJECT (payload, "first timestamp %" GST_TIME_FORMAT,
GST_TIME_ARGS (rtime));
}
rtime -= priv->rt_base;
rtime = gst_util_uint64_scale_int (rtime, payload->clock_rate, GST_SECOND);
/* add running_time in clock-rate units to the base timestamp */
@ -837,8 +826,6 @@ gst_basertppayload_change_state (GstElement * element,
basertppayload->ts_base = g_rand_int (basertppayload->ts_rand);
else
basertppayload->ts_base = basertppayload->ts_offset;
priv->rt_base = -1;
break;
default:
break;