diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2019-10-11 17:34:06 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-11-11 12:22:30 +0000 |
commit | 73035433d1119556849907a23465f626a1ce0c78 (patch) | |
tree | 9ea375af458f2fe1eabfc34373b0a4d973d9d027 | |
parent | 1c3b149ba368a355fc4767d2f09d6839d3ab0bc9 (diff) |
libs: window: x11: Avoid usage of deprecated API
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiwindow_x11.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiwindow_x11.c b/gst-libs/gst/vaapi/gstvaapiwindow_x11.c index 217815cdaf..7a58c00c2f 100644 --- a/gst-libs/gst/vaapi/gstvaapiwindow_x11.c +++ b/gst-libs/gst/vaapi/gstvaapiwindow_x11.c @@ -105,7 +105,6 @@ timed_wait_event (GstVaapiWindow * window, int type, guint64 end_time, Display *const dpy = GST_VAAPI_WINDOW_NATIVE_DISPLAY (window); const Window xid = GST_VAAPI_WINDOW_ID (window); XEvent tmp_event; - GTimeVal now; guint64 now_time; Bool got_event; @@ -125,8 +124,7 @@ timed_wait_event (GstVaapiWindow * window, int type, guint64 end_time, GST_VAAPI_WINDOW_UNLOCK_DISPLAY (window); if (got_event) return TRUE; - g_get_current_time (&now); - now_time = (guint64) now.tv_sec * 1000000 + now.tv_usec; + now_time = g_get_real_time (); } while (now_time < end_time); return FALSE; } @@ -341,7 +339,6 @@ gst_vaapi_window_x11_set_fullscreen (GstVaapiWindow * window, XEvent e; guint width, height; gboolean has_errors; - GTimeVal now; guint64 end_time; GST_VAAPI_WINDOW_LOCK_DISPLAY (window); @@ -378,8 +375,7 @@ gst_vaapi_window_x11_set_fullscreen (GstVaapiWindow * window, /* Try to wait for the completion of the fullscreen mode switch */ if (!window->use_foreign_window && priv->is_mapped) { const guint DELAY = 100000; /* 100 ms */ - g_get_current_time (&now); - end_time = DELAY + ((guint64) now.tv_sec * 1000000 + now.tv_usec); + end_time = DELAY + g_get_real_time (); while (timed_wait_event (window, ConfigureNotify, end_time, &e)) { if (fullscreen) { gst_vaapi_display_get_size (GST_VAAPI_WINDOW_DISPLAY (window), |