Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gst-plugins-good
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jakub Adam
gst-plugins-good
Commits
dc059efa
Commit
dc059efa
authored
Jun 10, 2015
by
Sebastian Dröge
🍵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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.
parent
c7e168ec
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
81 additions
and
81 deletions
+81
-81
gst/rtp/gstasteriskh263.c
gst/rtp/gstasteriskh263.c
+1
-1
gst/rtp/gstrtpac3pay.c
gst/rtp/gstrtpac3pay.c
+2
-2
gst/rtp/gstrtpamrpay.c
gst/rtp/gstrtpamrpay.c
+2
-2
gst/rtp/gstrtpceltdepay.c
gst/rtp/gstrtpceltdepay.c
+3
-3
gst/rtp/gstrtpceltpay.c
gst/rtp/gstrtpceltpay.c
+2
-2
gst/rtp/gstrtpdvpay.c
gst/rtp/gstrtpdvpay.c
+2
-2
gst/rtp/gstrtpg723pay.c
gst/rtp/gstrtpg723pay.c
+2
-2
gst/rtp/gstrtpg729pay.c
gst/rtp/gstrtpg729pay.c
+2
-2
gst/rtp/gstrtpgsmpay.c
gst/rtp/gstrtpgsmpay.c
+2
-2
gst/rtp/gstrtpgstpay.c
gst/rtp/gstrtpgstpay.c
+2
-2
gst/rtp/gstrtph263pay.c
gst/rtp/gstrtph263pay.c
+2
-2
gst/rtp/gstrtph263ppay.c
gst/rtp/gstrtph263ppay.c
+2
-2
gst/rtp/gstrtph264depay.c
gst/rtp/gstrtph264depay.c
+2
-2
gst/rtp/gstrtpj2kpay.c
gst/rtp/gstrtpj2kpay.c
+2
-2
gst/rtp/gstrtpjpegpay.c
gst/rtp/gstrtpjpegpay.c
+2
-2
gst/rtp/gstrtpmp2tpay.c
gst/rtp/gstrtpmp2tpay.c
+2
-2
gst/rtp/gstrtpmp4adepay.c
gst/rtp/gstrtpmp4adepay.c
+2
-2
gst/rtp/gstrtpmp4apay.c
gst/rtp/gstrtpmp4apay.c
+2
-2
gst/rtp/gstrtpmp4gdepay.c
gst/rtp/gstrtpmp4gdepay.c
+2
-2
gst/rtp/gstrtpmp4gpay.c
gst/rtp/gstrtpmp4gpay.c
+2
-2
gst/rtp/gstrtpmp4vpay.c
gst/rtp/gstrtpmp4vpay.c
+4
-4
gst/rtp/gstrtpmpapay.c
gst/rtp/gstrtpmpapay.c
+2
-2
gst/rtp/gstrtpmparobustdepay.c
gst/rtp/gstrtpmparobustdepay.c
+5
-5
gst/rtp/gstrtpmpvpay.c
gst/rtp/gstrtpmpvpay.c
+2
-2
gst/rtp/gstrtpqcelpdepay.c
gst/rtp/gstrtpqcelpdepay.c
+2
-2
gst/rtp/gstrtpqdmdepay.c
gst/rtp/gstrtpqdmdepay.c
+3
-3
gst/rtp/gstrtpsbcpay.c
gst/rtp/gstrtpsbcpay.c
+2
-2
gst/rtp/gstrtpspeexpay.c
gst/rtp/gstrtpspeexpay.c
+2
-2
gst/rtp/gstrtpsv3vdepay.c
gst/rtp/gstrtpsv3vdepay.c
+1
-1
gst/rtp/gstrtptheorapay.c
gst/rtp/gstrtptheorapay.c
+2
-2
gst/rtp/gstrtpvorbispay.c
gst/rtp/gstrtpvorbispay.c
+2
-2
gst/rtp/gstrtpvrawdepay.c
gst/rtp/gstrtpvrawdepay.c
+1
-1
gst/rtp/gstrtpvrawpay.c
gst/rtp/gstrtpvrawpay.c
+2
-2
gst/rtpmanager/gstrtpmux.c
gst/rtpmanager/gstrtpmux.c
+4
-4
gst/rtpmanager/gstrtpsession.c
gst/rtpmanager/gstrtpsession.c
+3
-3
gst/rtpmanager/rtpsession.c
gst/rtpmanager/rtpsession.c
+1
-1
gst/rtpmanager/rtpsource.c
gst/rtpmanager/rtpsource.c
+3
-3
No files found.
gst/rtp/gstasteriskh263.c
View file @
dc059efa
...
...
@@ -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
;
...
...
gst/rtp/gstrtpac3pay.c
View file @
dc059efa
...
...
@@ -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"
);
...
...
gst/rtp/gstrtpamrpay.c
View file @
dc059efa
...
...
@@ -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
;
...
...
gst/rtp/gstrtpceltdepay.c
View file @
dc059efa
...
...
@@ -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
);
...
...
gst/rtp/gstrtpceltpay.c
View file @
dc059efa
...
...
@@ -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
);
...
...
gst/rtp/gstrtpdvpay.c
View file @
dc059efa
...
...
@@ -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
);
...
...
gst/rtp/gstrtpg723pay.c
View file @
dc059efa
...
...
@@ -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 */
...
...
gst/rtp/gstrtpg729pay.c
View file @
dc059efa
...
...
@@ -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
))
{
...
...
gst/rtp/gstrtpgsmpay.c
View file @
dc059efa
...
...
@@ -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 */
...
...
gst/rtp/gstrtpgstpay.c
View file @
dc059efa
...
...
@@ -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
)
{
...
...
gst/rtp/gstrtph263pay.c
View file @
dc059efa
...
...
@@ -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
);
...
...
gst/rtp/gstrtph263ppay.c
View file @
dc059efa
...
...
@@ -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 */
...
...
gst/rtp/gstrtph264depay.c
View file @
dc059efa
...
...
@@ -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
);
...
...
gst/rtp/gstrtpj2kpay.c
View file @
dc059efa
...
...
@@ -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
);
...
...
gst/rtp/gstrtpjpegpay.c
View file @
dc059efa
...
...
@@ -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
);
...
...
gst/rtp/gstrtpmp2tpay.c
View file @
dc059efa
...
...
@@ -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:
...
...
gst/rtp/gstrtpmp4adepay.c
View file @
dc059efa
...
...
@@ -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 */
...
...
gst/rtp/gstrtpmp4apay.c
View file @
dc059efa
...
...
@@ -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
);
...
...
gst/rtp/gstrtpmp4gdepay.c
View file @
dc059efa
...
...
@@ -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
...
...
gst/rtp/gstrtpmp4gpay.c
View file @
dc059efa
...
...
@@ -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
);
...
...
gst/rtp/gstrtpmp4vpay.c
View file @
dc059efa
...
...
@@ -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
)
{
...
...
gst/rtp/gstrtpmpapay.c
View file @
dc059efa
...
...
@@ -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"
);
...
...
gst/rtp/gstrtpmparobustdepay.c
View file @
dc059efa
...
...
@@ -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 */
...
...
gst/rtp/gstrtpmpvpay.c
View file @
dc059efa
...
...
@@ -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
))
{
...
...
gst/rtp/gstrtpqcelpdepay.c
View file @
dc059efa
...
...
@@ -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
)
{
...
...
gst/rtp/gstrtpqdmdepay.c
View file @
dc059efa
...
...
@@ -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
));
}
...
...
gst/rtp/gstrtpsbcpay.c
View file @
dc059efa
...
...
@@ -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
);
...
...
gst/rtp/gstrtpspeexpay.c
View file @
dc059efa
...
...
@@ -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
);
...
...
gst/rtp/gstrtpsv3vdepay.c
View file @
dc059efa
...
...
@@ -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"
);
...
...
gst/rtp/gstrtptheorapay.c
View file @
dc059efa
...
...
@@ -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
));
...
...
gst/rtp/gstrtpvorbispay.c
View file @
dc059efa
...
...
@@ -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
));
...
...
gst/rtp/gstrtpvrawdepay.c
View file @
dc059efa
...
...
@@ -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
;