/** * gst_rtsp_session_is_expired: * @session: a #GstRTSPSession * @now: the current system time * * Check if @session timeout out. * * Returns: %TRUE if @session timed out */ gboolean gst_rtsp_session_is_expired (GstRTSPSession * session, GTimeVal * now) { gboolean res; res = (gst_rtsp_session_next_timeout (session, now) == 0); return res; }
static void collect_timeout (gchar *sessionid, GstRTSPSession *sess, GstPoolSource *psrc) { gint timeout; GTimeVal now; g_source_get_current_time ((GSource*)psrc, &now); timeout = gst_rtsp_session_next_timeout (sess, &now); g_message ("%p: next timeout: %d", sess, timeout); if (psrc->timeout == -1 || timeout < psrc->timeout) psrc->timeout = timeout; }
static void collect_timeout (gchar * sessionid, GstRTSPSession * sess, GstPoolSource * psrc) { gint timeout; GTimeVal now; gint64 tmp; tmp = g_source_get_time ((GSource *) psrc); now.tv_sec = tmp / G_USEC_PER_SEC; now.tv_usec = tmp % G_USEC_PER_SEC; timeout = gst_rtsp_session_next_timeout (sess, &now); GST_INFO ("%p: next timeout: %d", sess, timeout); if (psrc->timeout == -1 || timeout < psrc->timeout) psrc->timeout = timeout; }