mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 18:35:35 +00:00
rtsp-server: Don't use deprecated GLib API
This commit is contained in:
parent
d1df0f3a22
commit
1f442d45b6
1 changed files with 7 additions and 0 deletions
|
@ -476,8 +476,15 @@ collect_timeout (gchar * sessionid, GstRTSPSession * sess, GstPoolSource * psrc)
|
||||||
{
|
{
|
||||||
gint timeout;
|
gint timeout;
|
||||||
GTimeVal now;
|
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);
|
g_source_get_current_time ((GSource *) psrc, &now);
|
||||||
|
#endif
|
||||||
|
|
||||||
timeout = gst_rtsp_session_next_timeout (sess, &now);
|
timeout = gst_rtsp_session_next_timeout (sess, &now);
|
||||||
GST_INFO ("%p: next timeout: %d", sess, timeout);
|
GST_INFO ("%p: next timeout: %d", sess, timeout);
|
||||||
|
|
Loading…
Reference in a new issue