mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
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:
parent
fdd708c418
commit
11309247f3
2 changed files with 10 additions and 13 deletions
10
ChangeLog
10
ChangeLog
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue