summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2019-10-11 17:34:06 +0200
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2019-10-11 17:59:25 +0200
commit58a512b7c5aa671fd264146d3660633bd8cde47e (patch)
tree3af9cb1990db64bf810b499d8a99e729953ea7b0 /gst-libs
parentf80dee40c8b688f21173094e2853e080d1575449 (diff)
libs: window: x11: Avoid usage of deprecated API
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiwindow_x11.c8
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 7d9eea70..c5bfb860 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),