mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 18:51:11 +00:00
[MOVED FROM GST-P-FARSIGHT] Calculate the rtp ts before gst ts get incremented
20070329103946-65035-f74e3a0140c57e941444bb837d6053ad1c3cf567.gz
This commit is contained in:
parent
e158fabe85
commit
f1609fe6e2
1 changed files with 8 additions and 7 deletions
|
@ -568,19 +568,20 @@ gst_rtp_dtmf_src_push_next_rtp_packet (GstRTPDTMFSrc *dtmfsrc)
|
|||
dtmfsrc->seqnum++;
|
||||
gst_rtp_buffer_set_seq (buf, dtmfsrc->seqnum);
|
||||
|
||||
/* timestamp and duration of GstBuffer */
|
||||
GST_BUFFER_DURATION (buf) = DEFAULT_PACKET_INTERVAL * GST_MSECOND;
|
||||
dtmfsrc->timestamp += GST_BUFFER_DURATION (buf);
|
||||
GST_BUFFER_TIMESTAMP (buf) = dtmfsrc->timestamp;
|
||||
/* timestamp of RTP header */
|
||||
gst_rtp_dtmf_src_calc_rtp_timestamp (dtmfsrc);
|
||||
gst_rtp_buffer_set_timestamp (buf, dtmfsrc->rtp_timestamp);
|
||||
|
||||
/* duration of DTMF payload */
|
||||
dtmfsrc->payload->duration +=
|
||||
DEFAULT_PACKET_INTERVAL * dtmfsrc->clock_rate / 1000;
|
||||
|
||||
/* timestamp and duration of GstBuffer */
|
||||
GST_BUFFER_DURATION (buf) = DEFAULT_PACKET_INTERVAL * GST_MSECOND;
|
||||
dtmfsrc->timestamp += GST_BUFFER_DURATION (buf);
|
||||
GST_BUFFER_TIMESTAMP (buf) = dtmfsrc->timestamp;
|
||||
|
||||
payload = (GstRTPDTMFPayload *) gst_rtp_buffer_get_payload (buf);
|
||||
/* timestamp of RTP header */
|
||||
gst_rtp_dtmf_src_calc_rtp_timestamp (dtmfsrc);
|
||||
gst_rtp_buffer_set_timestamp (buf, dtmfsrc->rtp_timestamp);
|
||||
|
||||
/* copy payload and convert to network-byte order */
|
||||
g_memmove (payload, dtmfsrc->payload, sizeof (GstRTPDTMFPayload));
|
||||
|
|
Loading…
Reference in a new issue