rtpsession: properly set the running_time for rtcp packet info

This commit is contained in:
Miguel Paris 2018-11-29 12:55:38 +01:00 committed by Sebastian Dröge
parent d637567ab3
commit 36f55b03e8
3 changed files with 9 additions and 5 deletions

View file

@ -1983,6 +1983,7 @@ gst_rtp_session_chain_recv_rtcp (GstPad * pad, GstObject * parent,
GstRtpSession *rtpsession;
GstRtpSessionPrivate *priv;
GstClockTime current_time;
GstClockTime running_time;
guint64 ntpnstime;
rtpsession = GST_RTP_SESSION (parent);
@ -1995,9 +1996,10 @@ gst_rtp_session_chain_recv_rtcp (GstPad * pad, GstObject * parent,
GST_RTP_SESSION_UNLOCK (rtpsession);
current_time = gst_clock_get_time (priv->sysclock);
get_current_times (rtpsession, NULL, &ntpnstime);
get_current_times (rtpsession, &running_time, &ntpnstime);
rtp_session_process_rtcp (priv->session, buffer, current_time, ntpnstime);
rtp_session_process_rtcp (priv->session, buffer, current_time, running_time,
ntpnstime);
return GST_FLOW_OK; /* always return OK */
}

View file

@ -2188,7 +2188,8 @@ rtp_session_process_rtp (RTPSession * sess, GstBuffer * buffer,
current_time, running_time, ntpnstime)) {
GST_DEBUG ("invalid RTP packet received");
RTP_SESSION_UNLOCK (sess);
return rtp_session_process_rtcp (sess, buffer, current_time, ntpnstime);
return rtp_session_process_rtcp (sess, buffer, current_time, running_time,
ntpnstime);
}
ssrc = pinfo.ssrc;
@ -2877,7 +2878,7 @@ rtp_session_process_feedback (RTPSession * sess, GstRTCPPacket * packet,
*/
GstFlowReturn
rtp_session_process_rtcp (RTPSession * sess, GstBuffer * buffer,
GstClockTime current_time, guint64 ntpnstime)
GstClockTime current_time, GstClockTime running_time, guint64 ntpnstime)
{
GstRTCPPacket packet;
gboolean more, is_bye = FALSE, do_sync = FALSE;
@ -2899,7 +2900,7 @@ rtp_session_process_rtcp (RTPSession * sess, GstBuffer * buffer,
RTP_SESSION_LOCK (sess);
/* update pinfo stats */
update_packet_info (sess, &pinfo, FALSE, FALSE, FALSE, buffer, current_time,
-1, ntpnstime);
running_time, ntpnstime);
/* start processing the compound packet */
gst_rtcp_buffer_map (buffer, GST_MAP_READ, &rtcp);

View file

@ -384,6 +384,7 @@ GstFlowReturn rtp_session_process_rtp (RTPSession *sess, GstBuffer
guint64 ntpnstime);
GstFlowReturn rtp_session_process_rtcp (RTPSession *sess, GstBuffer *buffer,
GstClockTime current_time,
GstClockTime running_time,
guint64 ntpnstime);
/* processing packets for sending */