mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
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:
parent
3c14c6021c
commit
3c82de59f9
3 changed files with 16 additions and 17 deletions
|
@ -1465,7 +1465,7 @@ gst_rtp_session_request_remote_key_unit (GstRtpSession * rtpsession,
|
||||||
|
|
||||||
if (pli || fir)
|
if (pli || fir)
|
||||||
return rtp_session_request_key_unit (rtpsession->priv->session, ssrc,
|
return rtp_session_request_key_unit (rtpsession->priv->session, ssrc,
|
||||||
gst_clock_get_time (rtpsession->priv->sysclock), fir, count);
|
fir, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -3478,8 +3478,21 @@ dont_send:
|
||||||
RTP_SESSION_UNLOCK (sess);
|
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
|
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)
|
gboolean fir, gint count)
|
||||||
{
|
{
|
||||||
RTPSource *src = find_source (sess, ssrc);
|
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;
|
src->send_pli = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
rtp_session_request_early_rtcp (sess, now, 200 * GST_MSECOND);
|
rtp_session_send_rtcp (sess, 200 * GST_MSECOND);
|
||||||
|
|
||||||
return TRUE;
|
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);
|
|
||||||
}
|
|
||||||
|
|
|
@ -343,7 +343,6 @@ void rtp_session_request_early_rtcp (RTPSession * sess, GstClockT
|
||||||
/* Notify session of a request for a new key unit */
|
/* Notify session of a request for a new key unit */
|
||||||
gboolean rtp_session_request_key_unit (RTPSession * sess,
|
gboolean rtp_session_request_key_unit (RTPSession * sess,
|
||||||
guint32 ssrc,
|
guint32 ssrc,
|
||||||
GstClockTime now,
|
|
||||||
gboolean fir,
|
gboolean fir,
|
||||||
gint count);
|
gint count);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue