{
gint timeout;
GTimeVal now;
+#if GLIB_CHECK_VERSION(2,28,0)
+ 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;
+#else
g_source_get_current_time ((GSource *) psrc, &now);
+#endif
timeout = gst_rtsp_session_next_timeout (sess, &now);
GST_INFO ("%p: next timeout: %d", sess, timeout);