rtp: Use GST_BUFFER_PTS() instead of GST_BUFFER_TIMESTAMP()

The mix between all these in the RTP code is confusing, let's try to be
consistent.
This commit is contained in:
Sebastian Dröge 2015-06-10 14:33:50 +02:00
parent c7e168ec70
commit dc059efa60
37 changed files with 81 additions and 81 deletions

View file

@ -169,7 +169,7 @@ gst_asteriskh263_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
gst_buffer_unmap (outbuf, &map);
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
GST_BUFFER_PTS (outbuf) = timestamp;
if (!gst_pad_has_current_caps (asteriskh263->srcpad)) {
GstCaps *caps;

View file

@ -322,7 +322,7 @@ gst_rtp_ac3_pay_flush (GstRtpAC3Pay * rtpac3pay)
gst_rtp_buffer_set_marker (&rtp, TRUE);
gst_rtp_buffer_unmap (&rtp);
GST_BUFFER_TIMESTAMP (outbuf) = rtpac3pay->first_ts;
GST_BUFFER_PTS (outbuf) = rtpac3pay->first_ts;
GST_BUFFER_DURATION (outbuf) = rtpac3pay->duration;
ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpac3pay), outbuf);
@ -347,7 +347,7 @@ gst_rtp_ac3_pay_handle_buffer (GstRTPBasePayload * basepayload,
gst_buffer_map (buffer, &map, GST_MAP_READ);
duration = GST_BUFFER_DURATION (buffer);
timestamp = GST_BUFFER_TIMESTAMP (buffer);
timestamp = GST_BUFFER_PTS (buffer);
if (GST_BUFFER_IS_DISCONT (buffer)) {
GST_DEBUG_OBJECT (rtpac3pay, "DISCONT");

View file

@ -259,7 +259,7 @@ gst_rtp_amr_pay_handle_buffer (GstRTPBasePayload * basepayload,
gst_buffer_map (buffer, &map, GST_MAP_READ);
timestamp = GST_BUFFER_TIMESTAMP (buffer);
timestamp = GST_BUFFER_PTS (buffer);
duration = GST_BUFFER_DURATION (buffer);
/* setup frame size pointer */
@ -315,7 +315,7 @@ gst_rtp_amr_pay_handle_buffer (GstRTPBasePayload * basepayload,
gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp);
/* copy timestamp */
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
GST_BUFFER_PTS (outbuf) = timestamp;
if (duration != GST_CLOCK_TIME_NONE)
GST_BUFFER_DURATION (outbuf) = duration;

View file

@ -210,7 +210,7 @@ gst_rtp_celt_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
frame_size = rtpceltdepay->frame_size;
framesize_ns = gst_util_uint64_scale_int (frame_size, GST_SECOND, clock_rate);
timestamp = GST_BUFFER_TIMESTAMP (buf);
timestamp = GST_BUFFER_PTS (buf);
gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp);
@ -253,12 +253,12 @@ gst_rtp_celt_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
offset += size;
if (frame_size != -1 && clock_rate != -1) {
GST_BUFFER_TIMESTAMP (outbuf) = timestamp + framesize_ns * n;
GST_BUFFER_PTS (outbuf) = timestamp + framesize_ns * n;
GST_BUFFER_DURATION (outbuf) = framesize_ns;
}
GST_LOG_OBJECT (depayload, "push timestamp=%"
GST_TIME_FORMAT ", duration=%" GST_TIME_FORMAT,
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
GST_TIME_ARGS (GST_BUFFER_PTS (outbuf)),
GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)));
gst_rtp_base_depayload_push (depayload, outbuf);

View file

@ -334,8 +334,8 @@ gst_rtp_celt_pay_flush_queued (GstRtpCELTPay * rtpceltpay)
guint size;
/* copy first timestamp to output */
if (GST_BUFFER_TIMESTAMP (outbuf) == -1)
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buf);
if (GST_BUFFER_PTS (outbuf) == -1)
GST_BUFFER_PTS (outbuf) = GST_BUFFER_PTS (buf);
/* write the size to the header */
size = gst_buffer_get_size (buf);

View file

@ -313,7 +313,7 @@ gst_rtp_dv_pay_handle_buffer (GstRTPBasePayload * basepayload,
"DV RTP payloader got buffer of %" G_GSIZE_FORMAT
" bytes, splitting in %u byte " "payload fragments, at time %"
GST_TIME_FORMAT, size, max_payload_size,
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)));
GST_TIME_ARGS (GST_BUFFER_PTS (buffer)));
if (!rtpdvpay->negotiated) {
gst_dv_pay_negotiate (rtpdvpay, data, size);
@ -330,7 +330,7 @@ gst_rtp_dv_pay_handle_buffer (GstRTPBasePayload * basepayload,
/* Allocate a new buffer, set the timestamp */
if (outbuf == NULL) {
outbuf = gst_rtp_buffer_new_allocate (max_payload_size, 0, 0);
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buffer);
GST_BUFFER_PTS (outbuf) = GST_BUFFER_PTS (buffer);
if (!gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp)) {
gst_buffer_unref (outbuf);

View file

@ -159,7 +159,7 @@ gst_rtp_g723_pay_flush (GstRTPG723Pay * pay)
gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp);
payload = gst_rtp_buffer_get_payload (&rtp);
GST_BUFFER_TIMESTAMP (outbuf) = pay->timestamp;
GST_BUFFER_PTS (outbuf) = pay->timestamp;
GST_BUFFER_DURATION (outbuf) = pay->duration;
/* copy G723 data as payload */
@ -204,7 +204,7 @@ gst_rtp_g723_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buf)
pay = GST_RTP_G723_PAY (payload);
gst_buffer_map (buf, &map, GST_MAP_READ);
timestamp = GST_BUFFER_TIMESTAMP (buf);
timestamp = GST_BUFFER_PTS (buf);
if (GST_BUFFER_IS_DISCONT (buf)) {
/* flush everything on discont */

View file

@ -185,7 +185,7 @@ gst_rtp_g729_pay_push (GstRTPG729Pay * rtpg729pay,
frames =
(payload_len / G729_FRAME_SIZE) + ((payload_len % G729_FRAME_SIZE) >> 1);
duration = frames * G729_FRAME_DURATION;
GST_BUFFER_TIMESTAMP (outbuf) = rtpg729pay->next_ts;
GST_BUFFER_PTS (outbuf) = rtpg729pay->next_ts;
GST_BUFFER_DURATION (outbuf) = duration;
GST_BUFFER_OFFSET (outbuf) = rtpg729pay->next_rtp_time;
rtpg729pay->next_ts += duration;
@ -314,7 +314,7 @@ gst_rtp_g729_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buf)
adapter = rtpg729pay->adapter;
available = gst_adapter_available (adapter);
timestamp = GST_BUFFER_TIMESTAMP (buf);
timestamp = GST_BUFFER_PTS (buf);
/* resync rtp time on discont or a discontinuous cn packet */
if (GST_BUFFER_IS_DISCONT (buf)) {

View file

@ -137,7 +137,7 @@ gst_rtp_gsm_pay_handle_buffer (GstRTPBasePayload * basepayload,
gst_buffer_map (buffer, &map, GST_MAP_READ);
timestamp = GST_BUFFER_TIMESTAMP (buffer);
timestamp = GST_BUFFER_PTS (buffer);
duration = GST_BUFFER_DURATION (buffer);
/* FIXME, only one GSM frame per RTP packet for now */
@ -150,7 +150,7 @@ gst_rtp_gsm_pay_handle_buffer (GstRTPBasePayload * basepayload,
outbuf = gst_rtp_buffer_new_allocate (payload_len, 0, 0);
/* copy timestamp and duration */
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
GST_BUFFER_PTS (outbuf) = timestamp;
GST_BUFFER_DURATION (outbuf) = duration;
/* get payload */

View file

@ -338,7 +338,7 @@ gst_rtp_gst_pay_create_from_adapter (GstRtpGSTPay * rtpgstpay,
/* create a new group to hold the rtp header and the payload */
gst_buffer_append (outbuf, paybuf);
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
GST_BUFFER_PTS (outbuf) = timestamp;
/* and add to list */
gst_buffer_list_insert (list, -1, outbuf);
@ -614,7 +614,7 @@ gst_rtp_gst_pay_handle_buffer (GstRTPBasePayload * basepayload,
rtpgstpay = GST_RTP_GST_PAY (basepayload);
timestamp = GST_BUFFER_TIMESTAMP (buffer);
timestamp = GST_BUFFER_PTS (buffer);
/* check if we need to send the caps and taglist now */
if (rtpgstpay->config_interval > 0) {

View file

@ -1303,7 +1303,7 @@ gst_rtp_h263_pay_push (GstRtpH263Pay * rtph263pay,
/*
* timestamp the buffer
*/
GST_BUFFER_TIMESTAMP (package->outbuf) = rtph263pay->first_ts;
GST_BUFFER_PTS (package->outbuf) = rtph263pay->first_ts;
gst_rtp_buffer_set_marker (&rtp, package->marker);
if (package->marker)
@ -1820,7 +1820,7 @@ gst_rtp_h263_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buffer)
GST_DEBUG ("-------------------- NEW FRAME ---------------");
rtph263pay = GST_RTP_H263_PAY (payload);
rtph263pay->first_ts = GST_BUFFER_TIMESTAMP (buffer);
rtph263pay->first_ts = GST_BUFFER_PTS (buffer);
/* we always encode and flush a full picture */
gst_adapter_push (rtph263pay->adapter, buffer);

View file

@ -734,7 +734,7 @@ gst_rtp_h263p_pay_flush (GstRtpH263PPay * rtph263ppay)
payload[0] = (fragmented && !found_gob) ? 0x00 : 0x04;
payload[1] = 0;
GST_BUFFER_TIMESTAMP (outbuf) = rtph263ppay->first_timestamp;
GST_BUFFER_PTS (outbuf) = rtph263ppay->first_timestamp;
GST_BUFFER_DURATION (outbuf) = rtph263ppay->first_duration;
gst_rtp_buffer_unmap (&rtp);
@ -759,7 +759,7 @@ gst_rtp_h263p_pay_handle_buffer (GstRTPBasePayload * payload,
rtph263ppay = GST_RTP_H263P_PAY (payload);
rtph263ppay->first_timestamp = GST_BUFFER_TIMESTAMP (buffer);
rtph263ppay->first_timestamp = GST_BUFFER_PTS (buffer);
rtph263ppay->first_duration = GST_BUFFER_DURATION (buffer);
/* we always encode and flush a full picture */

View file

@ -770,7 +770,7 @@ gst_rtp_h264_depay_handle_nal (GstRtpH264Depay * rtph264depay, GstBuffer * nal,
}
outbuf = gst_buffer_make_writable (outbuf);
GST_BUFFER_TIMESTAMP (outbuf) = out_timestamp;
GST_BUFFER_PTS (outbuf) = out_timestamp;
if (out_keyframe)
GST_BUFFER_FLAG_UNSET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT);
@ -854,7 +854,7 @@ gst_rtp_h264_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
GstClockTime timestamp;
gboolean marker;
timestamp = GST_BUFFER_TIMESTAMP (buf);
timestamp = GST_BUFFER_PTS (buf);
gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp);

View file

@ -333,7 +333,7 @@ gst_rtp_j2k_pay_handle_buffer (GstRTPBasePayload * basepayload,
mtu = GST_RTP_BASE_PAYLOAD_MTU (pay);
gst_buffer_map (buffer, &map, GST_MAP_READ);
timestamp = GST_BUFFER_TIMESTAMP (buffer);
timestamp = GST_BUFFER_PTS (buffer);
offset = pos = end = 0;
GST_LOG_OBJECT (pay,
@ -427,7 +427,7 @@ gst_rtp_j2k_pay_handle_buffer (GstRTPBasePayload * basepayload,
/* make buffer for header */
outbuf = gst_rtp_buffer_new_allocate (HEADER_SIZE, 0, 0);
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
GST_BUFFER_PTS (outbuf) = timestamp;
gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp);

View file

@ -689,7 +689,7 @@ gst_rtp_jpeg_pay_handle_buffer (GstRTPBasePayload * basepayload,
gst_buffer_map (buffer, &map, GST_MAP_READ);
data = map.data;
size = map.size;
timestamp = GST_BUFFER_TIMESTAMP (buffer);
timestamp = GST_BUFFER_PTS (buffer);
offset = 0;
discont = GST_BUFFER_IS_DISCONT (buffer);
@ -888,7 +888,7 @@ gst_rtp_jpeg_pay_handle_buffer (GstRTPBasePayload * basepayload,
/* join memory parts */
outbuf = gst_buffer_append (outbuf, paybuf);
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
GST_BUFFER_PTS (outbuf) = timestamp;
if (discont) {
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);

View file

@ -157,7 +157,7 @@ gst_rtp_mp2t_pay_flush (GstRTPMP2TPay * rtpmp2tpay)
outbuf = gst_buffer_append (outbuf, paybuf);
avail -= payload_len;
GST_BUFFER_TIMESTAMP (outbuf) = rtpmp2tpay->first_ts;
GST_BUFFER_PTS (outbuf) = rtpmp2tpay->first_ts;
GST_BUFFER_DURATION (outbuf) = rtpmp2tpay->duration;
GST_DEBUG_OBJECT (rtpmp2tpay, "pushing buffer of size %u",
@ -181,7 +181,7 @@ gst_rtp_mp2t_pay_handle_buffer (GstRTPBasePayload * basepayload,
rtpmp2tpay = GST_RTP_MP2T_PAY (basepayload);
size = gst_buffer_get_size (buffer);
timestamp = GST_BUFFER_TIMESTAMP (buffer);
timestamp = GST_BUFFER_PTS (buffer);
duration = GST_BUFFER_DURATION (buffer);
again:

View file

@ -311,7 +311,7 @@ gst_rtp_mp4a_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
outbuf = gst_rtp_buffer_get_payload_buffer (&rtp);
outbuf = gst_buffer_make_writable (outbuf);
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (buf);
GST_BUFFER_PTS (outbuf) = GST_BUFFER_PTS (buf);
gst_adapter_push (rtpmp4adepay->adapter, outbuf);
/* RTP marker bit indicates the last packet of the AudioMuxElement => create
@ -372,7 +372,7 @@ gst_rtp_mp4a_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
data += skip;
avail -= skip;
GST_BUFFER_TIMESTAMP (tmp) = timestamp;
GST_BUFFER_PTS (tmp) = timestamp;
gst_rtp_base_depayload_push (depayload, tmp);
/* shift ts for next buffers */

View file

@ -366,7 +366,7 @@ gst_rtp_mp4a_pay_handle_buffer (GstRTPBasePayload * basepayload,
size = map.size;
data = map.data;
timestamp = GST_BUFFER_TIMESTAMP (buffer);
timestamp = GST_BUFFER_PTS (buffer);
fragmented = FALSE;
mtu = GST_RTP_BASE_PAYLOAD_MTU (rtpmp4apay);
@ -431,7 +431,7 @@ gst_rtp_mp4a_pay_handle_buffer (GstRTPBasePayload * basepayload,
gst_rtp_buffer_unmap (&rtp);
/* copy incomming timestamp (if any) to outgoing buffers */
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
GST_BUFFER_PTS (outbuf) = timestamp;
ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpmp4apay), outbuf);

View file

@ -433,7 +433,7 @@ gst_rtp_mp4g_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
gst_adapter_clear (rtpmp4gdepay->adapter);
}
timestamp = GST_BUFFER_TIMESTAMP (buf);
timestamp = GST_BUFFER_PTS (buf);
{
gint payload_len, payload_AU;
@ -663,7 +663,7 @@ gst_rtp_mp4g_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
/* copy some of the fields we calculated above on the buffer. We also
* copy the AU_index so that we can sort the packets in our queue. */
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
GST_BUFFER_PTS (outbuf) = timestamp;
GST_BUFFER_OFFSET (outbuf) = AU_index;
/* make sure we don't use the timestamp again for other AUs in this

View file

@ -535,7 +535,7 @@ gst_rtp_mp4g_pay_flush (GstRtpMP4GPay * rtpmp4gpay)
paybuf = gst_adapter_take_buffer_fast (rtpmp4gpay->adapter, payload_len);
outbuf = gst_buffer_append (outbuf, paybuf);
GST_BUFFER_TIMESTAMP (outbuf) = rtpmp4gpay->first_timestamp;
GST_BUFFER_PTS (outbuf) = rtpmp4gpay->first_timestamp;
GST_BUFFER_DURATION (outbuf) = rtpmp4gpay->first_duration;
if (rtpmp4gpay->frame_len) {
@ -567,7 +567,7 @@ gst_rtp_mp4g_pay_handle_buffer (GstRTPBasePayload * basepayload,
rtpmp4gpay = GST_RTP_MP4G_PAY (basepayload);
rtpmp4gpay->first_timestamp = GST_BUFFER_TIMESTAMP (buffer);
rtpmp4gpay->first_timestamp = GST_BUFFER_PTS (buffer);
rtpmp4gpay->first_duration = GST_BUFFER_DURATION (buffer);
rtpmp4gpay->discont = GST_BUFFER_IS_DISCONT (buffer);

View file

@ -288,7 +288,7 @@ gst_rtp_mp4v_pay_flush (GstRtpMP4VPay * rtpmp4vpay)
outbuf = gst_buffer_append (outbuf, outbuf_data);
GST_BUFFER_TIMESTAMP (outbuf) = rtpmp4vpay->first_timestamp;
GST_BUFFER_PTS (outbuf) = rtpmp4vpay->first_timestamp;
/* add to list */
gst_buffer_list_insert (list, -1, outbuf);
@ -434,7 +434,7 @@ gst_rtp_mp4v_pay_handle_buffer (GstRTPBasePayload * basepayload,
gst_buffer_map (buffer, &map, GST_MAP_READ);
size = map.size;
timestamp = GST_BUFFER_TIMESTAMP (buffer);
timestamp = GST_BUFFER_PTS (buffer);
duration = GST_BUFFER_DURATION (buffer);
avail = gst_adapter_available (rtpmp4vpay->adapter);
@ -464,7 +464,7 @@ gst_rtp_mp4v_pay_handle_buffer (GstRTPBasePayload * basepayload,
/* strip off header */
subbuf = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_MEMORY, strip,
size - strip);
GST_BUFFER_TIMESTAMP (subbuf) = timestamp;
GST_BUFFER_PTS (subbuf) = timestamp;
gst_buffer_unref (buffer);
buffer = subbuf;
@ -513,7 +513,7 @@ gst_rtp_mp4v_pay_handle_buffer (GstRTPBasePayload * basepayload,
/* insert header */
buffer = gst_buffer_append (gst_buffer_ref (rtpmp4vpay->config), buffer);
GST_BUFFER_TIMESTAMP (buffer) = timestamp;
GST_BUFFER_PTS (buffer) = timestamp;
size = gst_buffer_get_size (buffer);
if (timestamp != -1) {

View file

@ -233,7 +233,7 @@ gst_rtp_mpa_pay_flush (GstRtpMPAPay * rtpmpapay)
paybuf = gst_adapter_take_buffer_fast (rtpmpapay->adapter, payload_len);
outbuf = gst_buffer_append (outbuf, paybuf);
GST_BUFFER_TIMESTAMP (outbuf) = rtpmpapay->first_ts;
GST_BUFFER_PTS (outbuf) = rtpmpapay->first_ts;
GST_BUFFER_DURATION (outbuf) = rtpmpapay->duration;
ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpmpapay), outbuf);
@ -256,7 +256,7 @@ gst_rtp_mpa_pay_handle_buffer (GstRTPBasePayload * basepayload,
size = gst_buffer_get_size (buffer);
duration = GST_BUFFER_DURATION (buffer);
timestamp = GST_BUFFER_TIMESTAMP (buffer);
timestamp = GST_BUFFER_PTS (buffer);
if (GST_BUFFER_IS_DISCONT (buffer)) {
GST_DEBUG_OBJECT (rtpmpapay, "DISCONT");

View file

@ -290,7 +290,7 @@ gst_rtp_mpa_robust_depay_generate_dummy_frame (GstRtpMPARobustDepay *
GST_WRITE_UINT32_BE (map.data, dummy->header);
gst_buffer_unmap (dummy->buffer, &map);
GST_BUFFER_TIMESTAMP (dummy->buffer) = GST_BUFFER_TIMESTAMP (frame->buffer);
GST_BUFFER_PTS (dummy->buffer) = GST_BUFFER_PTS (frame->buffer);
return dummy;
}
@ -609,7 +609,7 @@ gst_rtp_mpa_robust_depay_push_mp3_frames (GstRtpMPARobustDepay * rtpmpadepay)
flush:
buf = gst_byte_writer_free_and_get_buffer (rtpmpadepay->mp3_frame);
rtpmpadepay->mp3_frame = NULL;
GST_BUFFER_TIMESTAMP (buf) = GST_BUFFER_TIMESTAMP (head->buffer);
GST_BUFFER_PTS (buf) = GST_BUFFER_PTS (head->buffer);
/* no longer need head ADU frame header and side info */
/* NOTE maybe head == current, then size and offset go off a bit,
* but current gets reset to NULL, and then also offset and size */
@ -653,7 +653,7 @@ gst_rtp_mpa_robust_depay_process (GstRTPBaseDepayload * depayload,
rtpmpadepay = GST_RTP_MPA_ROBUST_DEPAY (depayload);
timestamp = GST_BUFFER_TIMESTAMP (buf);
timestamp = GST_BUFFER_PTS (buf);
gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp);
@ -716,7 +716,7 @@ gst_rtp_mpa_robust_depay_process (GstRTPBaseDepayload * depayload,
if (av == size) {
timestamp = gst_adapter_prev_pts (rtpmpadepay->adapter, NULL);
buf = gst_adapter_take_buffer (rtpmpadepay->adapter, size);
GST_BUFFER_TIMESTAMP (buf) = timestamp;
GST_BUFFER_PTS (buf) = timestamp;
gst_rtp_mpa_robust_depay_submit_adu (rtpmpadepay, buf);
} else if (av > size) {
GST_DEBUG_OBJECT (rtpmpadepay,
@ -730,7 +730,7 @@ gst_rtp_mpa_robust_depay_process (GstRTPBaseDepayload * depayload,
/* not continuation, first fragment or whole ADU */
if (payload_len == size) {
/* whole ADU */
GST_BUFFER_TIMESTAMP (buf) = timestamp;
GST_BUFFER_PTS (buf) = timestamp;
gst_rtp_mpa_robust_depay_submit_adu (rtpmpadepay, buf);
} else if (payload_len < size) {
/* first fragment */

View file

@ -216,7 +216,7 @@ gst_rtp_mpv_pay_flush (GstRTPMPVPay * rtpmpvpay)
paybuf = gst_adapter_take_buffer_fast (rtpmpvpay->adapter, payload_len);
outbuf = gst_buffer_append (outbuf, paybuf);
GST_BUFFER_TIMESTAMP (outbuf) = rtpmpvpay->first_ts;
GST_BUFFER_PTS (outbuf) = rtpmpvpay->first_ts;
ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpmpvpay), outbuf);
}
@ -235,7 +235,7 @@ gst_rtp_mpv_pay_handle_buffer (GstRTPBasePayload * basepayload,
rtpmpvpay = GST_RTP_MPV_PAY (basepayload);
timestamp = GST_BUFFER_TIMESTAMP (buffer);
timestamp = GST_BUFFER_PTS (buffer);
duration = GST_BUFFER_DURATION (buffer);
if (GST_BUFFER_IS_DISCONT (buffer)) {

View file

@ -267,7 +267,7 @@ gst_rtp_qcelp_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
if (payload_len < 2)
goto too_small;
timestamp = GST_BUFFER_TIMESTAMP (buf);
timestamp = GST_BUFFER_PTS (buf);
payload = gst_rtp_buffer_get_payload (&rtp);
@ -354,7 +354,7 @@ gst_rtp_qcelp_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
outbuf = gst_rtp_buffer_get_payload_subbuffer (&rtp, offset, frame_len);
}
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
GST_BUFFER_PTS (outbuf) = timestamp;
GST_BUFFER_DURATION (outbuf) = FRAME_DURATION;
if (!depay->interleaved || index == 0) {

View file

@ -251,7 +251,7 @@ gst_rtp_qdm2_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
flush_data (rtpqdm2depay);
/* And store new timestamp */
rtpqdm2depay->ptimestamp = rtpqdm2depay->timestamp;
rtpqdm2depay->timestamp = GST_BUFFER_TIMESTAMP (buf);
rtpqdm2depay->timestamp = GST_BUFFER_PTS (buf);
/* And that previous data will be pushed at the bottom */
}
rtpqdm2depay->nextseq = seq + 1;
@ -273,7 +273,7 @@ gst_rtp_qdm2_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
GST_DEBUG ("Headers");
/* Store the incoming timestamp */
rtpqdm2depay->ptimestamp = rtpqdm2depay->timestamp;
rtpqdm2depay->timestamp = GST_BUFFER_TIMESTAMP (buf);
rtpqdm2depay->timestamp = GST_BUFFER_PTS (buf);
/* flush the internal data if needed */
flush_data (rtpqdm2depay);
if (G_UNLIKELY (!rtpqdm2depay->configured)) {
@ -356,7 +356,7 @@ gst_rtp_qdm2_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
if (G_UNLIKELY (avail)) {
GST_DEBUG ("Pushing out %d bytes of collected data", avail);
outbuf = gst_adapter_take_buffer (rtpqdm2depay->adapter, avail);
GST_BUFFER_TIMESTAMP (outbuf) = rtpqdm2depay->ptimestamp;
GST_BUFFER_PTS (outbuf) = rtpqdm2depay->ptimestamp;
GST_DEBUG ("Outgoing buffer timestamp %" GST_TIME_FORMAT,
GST_TIME_ARGS (rtpqdm2depay->ptimestamp));
}

View file

@ -205,7 +205,7 @@ gst_rtp_sbc_pay_flush_buffers (GstRtpSBCPay * sbcpay)
gst_adapter_flush (sbcpay->adapter, payload_length);
/* FIXME: what about duration? */
GST_BUFFER_TIMESTAMP (outbuf) = sbcpay->timestamp;
GST_BUFFER_PTS (outbuf) = sbcpay->timestamp;
GST_DEBUG_OBJECT (sbcpay, "Pushing %d bytes", payload_length);
return gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (sbcpay), outbuf);
@ -220,7 +220,7 @@ gst_rtp_sbc_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buffer)
/* FIXME check for negotiation */
sbcpay = GST_RTP_SBC_PAY (payload);
sbcpay->timestamp = GST_BUFFER_TIMESTAMP (buffer);
sbcpay->timestamp = GST_BUFFER_PTS (buffer);
gst_adapter_push (sbcpay->adapter, buffer);

View file

@ -271,7 +271,7 @@ gst_rtp_speex_pay_handle_buffer (GstRTPBasePayload * basepayload,
goto done;
}
timestamp = GST_BUFFER_TIMESTAMP (buffer);
timestamp = GST_BUFFER_PTS (buffer);
duration = GST_BUFFER_DURATION (buffer);
/* FIXME, only one SPEEX frame per RTP packet for now */
@ -282,7 +282,7 @@ gst_rtp_speex_pay_handle_buffer (GstRTPBasePayload * basepayload,
g_assert (payload_len <= GST_RTP_BASE_PAYLOAD_MTU (rtpspeexpay));
/* copy timestamp and duration */
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
GST_BUFFER_PTS (outbuf) = timestamp;
GST_BUFFER_DURATION (outbuf) = duration;
gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp);

View file

@ -157,7 +157,7 @@ gst_rtp_sv3v_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
seq = gst_rtp_buffer_get_seq (&rtp);
GST_DEBUG ("timestamp %" GST_TIME_FORMAT ", sequence number:%d",
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), seq);
GST_TIME_ARGS (GST_BUFFER_PTS (buf)), seq);
if (seq != rtpsv3vdepay->nextseq) {
GST_DEBUG ("Sequence discontinuity, clearing adapter");

View file

@ -285,7 +285,7 @@ gst_rtp_theora_pay_init_packet (GstRtpTheoraPay * rtptheorapay, guint8 TDT,
(rtptheorapay), 0, 0);
gst_rtp_theora_pay_reset_packet (rtptheorapay, TDT);
GST_BUFFER_TIMESTAMP (rtptheorapay->packet) = timestamp;
GST_BUFFER_PTS (rtptheorapay->packet) = timestamp;
}
static GstFlowReturn
@ -731,7 +731,7 @@ gst_rtp_theora_pay_handle_buffer (GstRTPBasePayload * basepayload,
data = map.data;
size = map.size;
duration = GST_BUFFER_DURATION (buffer);
timestamp = GST_BUFFER_TIMESTAMP (buffer);
timestamp = GST_BUFFER_PTS (buffer);
GST_DEBUG_OBJECT (rtptheorapay, "size %" G_GSIZE_FORMAT
", duration %" GST_TIME_FORMAT, size, GST_TIME_ARGS (duration));

View file

@ -280,7 +280,7 @@ gst_rtp_vorbis_pay_init_packet (GstRtpVorbisPay * rtpvorbispay, guint8 VDT,
(rtpvorbispay), 0, 0);
gst_rtp_vorbis_pay_reset_packet (rtpvorbispay, VDT);
GST_BUFFER_TIMESTAMP (rtpvorbispay->packet) = timestamp;
GST_BUFFER_PTS (rtpvorbispay->packet) = timestamp;
}
static GstFlowReturn
@ -724,7 +724,7 @@ gst_rtp_vorbis_pay_handle_buffer (GstRTPBasePayload * basepayload,
data = map.data;
size = map.size;
duration = GST_BUFFER_DURATION (buffer);
timestamp = GST_BUFFER_TIMESTAMP (buffer);
timestamp = GST_BUFFER_PTS (buffer);
GST_LOG_OBJECT (rtpvorbispay, "size %" G_GSIZE_FORMAT
", duration %" GST_TIME_FORMAT, size, GST_TIME_ARGS (duration));

View file

@ -364,7 +364,7 @@ gst_rtp_vraw_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
goto alloc_failed;
/* clear timestamp from alloc... */
GST_BUFFER_TIMESTAMP (new_buffer) = -1;
GST_BUFFER_PTS (new_buffer) = -1;
if (!gst_video_frame_map (&rtpvrawdepay->frame, &rtpvrawdepay->vinfo,
new_buffer, GST_MAP_WRITE | GST_VIDEO_FRAME_MAP_FLAG_NO_REF)) {

View file

@ -346,9 +346,9 @@ gst_rtp_vraw_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buffer)
out = gst_rtp_buffer_new_allocate (left, 0, 0);
if (field == 0) {
GST_BUFFER_TIMESTAMP (out) = GST_BUFFER_TIMESTAMP (buffer);
GST_BUFFER_PTS (out) = GST_BUFFER_PTS (buffer);
} else {
GST_BUFFER_TIMESTAMP (out) = GST_BUFFER_TIMESTAMP (buffer) +
GST_BUFFER_PTS (out) = GST_BUFFER_PTS (buffer) +
GST_BUFFER_DURATION (buffer) / 2;
}

View file

@ -394,8 +394,8 @@ process_list_item (GstBuffer ** buffer, guint idx, gpointer user_data)
return FALSE;
if (GST_BUFFER_DURATION_IS_VALID (*buffer) &&
GST_BUFFER_TIMESTAMP_IS_VALID (*buffer))
bd->rtp_mux->last_stop = GST_BUFFER_TIMESTAMP (*buffer) +
GST_BUFFER_PTS_IS_VALID (*buffer))
bd->rtp_mux->last_stop = GST_BUFFER_PTS (*buffer) +
GST_BUFFER_DURATION (*buffer);
else
bd->rtp_mux->last_stop = GST_CLOCK_TIME_NONE;
@ -504,8 +504,8 @@ gst_rtp_mux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
}
if (GST_BUFFER_DURATION_IS_VALID (buffer) &&
GST_BUFFER_TIMESTAMP_IS_VALID (buffer))
rtp_mux->last_stop = GST_BUFFER_TIMESTAMP (buffer) +
GST_BUFFER_PTS_IS_VALID (buffer))
rtp_mux->last_stop = GST_BUFFER_PTS (buffer) +
GST_BUFFER_DURATION (buffer);
else
rtp_mux->last_stop = GST_CLOCK_TIME_NONE;

View file

@ -1742,7 +1742,7 @@ gst_rtp_session_chain_recv_rtp (GstPad * pad, GstObject * parent,
GST_RTP_SESSION_UNLOCK (rtpsession);
/* get NTP time when this packet was captured, this depends on the timestamp. */
timestamp = GST_BUFFER_TIMESTAMP (buffer);
timestamp = GST_BUFFER_PTS (buffer);
if (GST_CLOCK_TIME_IS_VALID (timestamp)) {
/* convert to running time using the segment values */
running_time =
@ -2106,11 +2106,11 @@ gst_rtp_session_chain_send_rtp_common (GstRtpSession * rtpsession,
* So, just take it from the first group. */
buffer = gst_buffer_list_get (GST_BUFFER_LIST_CAST (data), 0);
if (buffer)
timestamp = GST_BUFFER_TIMESTAMP (buffer);
timestamp = GST_BUFFER_PTS (buffer);
else
timestamp = -1;
} else {
timestamp = GST_BUFFER_TIMESTAMP (GST_BUFFER_CAST (data));
timestamp = GST_BUFFER_PTS (GST_BUFFER_CAST (data));
}
if (GST_CLOCK_TIME_IS_VALID (timestamp)) {

View file

@ -2557,7 +2557,7 @@ rtp_session_process_feedback (RTPSession * sess, GstRTCPPacket * packet,
fci_buffer = gst_buffer_copy_region (packet->rtcp->buffer,
GST_BUFFER_COPY_MEMORY, fci_data - packet->rtcp->map.data,
fci_length);
GST_BUFFER_TIMESTAMP (fci_buffer) = pinfo->running_time;
GST_BUFFER_PTS (fci_buffer) = pinfo->running_time;
}
RTP_SESSION_UNLOCK (sess);

View file

@ -1764,7 +1764,7 @@ rtp_source_timeout (RTPSource * src, GstClockTime current_time,
/* Time out AVPF packets that are older than the desired length */
while ((pkt = g_queue_peek_tail (src->retained_feedback)) &&
GST_BUFFER_TIMESTAMP (pkt) < feedback_retention_window)
GST_BUFFER_PTS (pkt) < feedback_retention_window)
gst_buffer_unref (g_queue_pop_tail (src->retained_feedback));
}
@ -1774,7 +1774,7 @@ compare_buffers (gconstpointer a, gconstpointer b, gpointer user_data)
const GstBuffer *bufa = a;
const GstBuffer *bufb = b;
return GST_BUFFER_TIMESTAMP (bufa) - GST_BUFFER_TIMESTAMP (bufb);
return GST_BUFFER_PTS (bufa) - GST_BUFFER_PTS (bufb);
}
void
@ -1786,7 +1786,7 @@ rtp_source_retain_rtcp_packet (RTPSource * src, GstRTCPPacket * packet,
buffer = gst_buffer_copy_region (packet->rtcp->buffer, GST_BUFFER_COPY_MEMORY,
packet->offset, (gst_rtcp_packet_get_length (packet) + 1) * 4);
GST_BUFFER_TIMESTAMP (buffer) = running_time;
GST_BUFFER_PTS (buffer) = running_time;
g_queue_insert_sorted (src->retained_feedback, buffer, compare_buffers, NULL);
}