session: use common send_rtcp method
authorWim Taymans <wim.taymans@collabora.co.uk>
Sun, 4 Aug 2013 21:18:29 +0000 (23:18 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 5 Aug 2013 13:02:59 +0000 (15:02 +0200)
Reuse the send_rtcp method that already asks for the current time when
requesting a keyframe.

gst/rtpmanager/gstrtpsession.c
gst/rtpmanager/rtpsession.c
gst/rtpmanager/rtpsession.h

index 19d9581..143f4a3 100644 (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;
index 6c546b8..f96a223 100644 (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);
-}
index 6c51a2e..1fa04ac 100644 (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);