session: use common send_rtcp method

Reuse the send_rtcp method that already asks for the current time when
requesting a keyframe.
This commit is contained in:
Wim Taymans 2013-08-04 23:18:29 +02:00
parent 3c14c6021c
commit 3c82de59f9
3 changed files with 16 additions and 17 deletions

View file

@ -1465,7 +1465,7 @@ gst_rtp_session_request_remote_key_unit (GstRtpSession * rtpsession,
if (pli || fir)
return rtp_session_request_key_unit (rtpsession->priv->session, ssrc,
gst_clock_get_time (rtpsession->priv->sysclock), fir, count);
fir, count);
}
return FALSE;

View file

@ -3478,8 +3478,21 @@ dont_send:
RTP_SESSION_UNLOCK (sess);
}
static void
rtp_session_send_rtcp (RTPSession * sess, GstClockTime max_delay)
{
GstClockTime now;
if (!sess->callbacks.send_rtcp)
return;
now = sess->callbacks.request_time (sess, sess->request_time_user_data);
rtp_session_request_early_rtcp (sess, now, max_delay);
}
gboolean
rtp_session_request_key_unit (RTPSession * sess, guint32 ssrc, GstClockTime now,
rtp_session_request_key_unit (RTPSession * sess, guint32 ssrc,
gboolean fir, gint count)
{
RTPSource *src = find_source (sess, ssrc);
@ -3498,20 +3511,7 @@ rtp_session_request_key_unit (RTPSession * sess, guint32 ssrc, GstClockTime now,
src->send_pli = TRUE;
}
rtp_session_request_early_rtcp (sess, now, 200 * GST_MSECOND);
rtp_session_send_rtcp (sess, 200 * GST_MSECOND);
return TRUE;
}
static void
rtp_session_send_rtcp (RTPSession * sess, GstClockTime max_delay)
{
GstClockTime now;
if (!sess->callbacks.send_rtcp)
return;
now = sess->callbacks.request_time (sess, sess->request_time_user_data);
rtp_session_request_early_rtcp (sess, now, max_delay);
}

View file

@ -343,7 +343,6 @@ void rtp_session_request_early_rtcp (RTPSession * sess, GstClockT
/* Notify session of a request for a new key unit */
gboolean rtp_session_request_key_unit (RTPSession * sess,
guint32 ssrc,
GstClockTime now,
gboolean fir,
gint count);