summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Kindestam <antonki@kth.se>2019-04-14 16:03:22 +0200
committerJan Ekström <jeebjp@gmail.com>2019-09-28 14:10:01 +0300
commit2cf8dd645172ffe3e89dcfa674fab4008ddeb7c1 (patch)
treeff85681a1740519178e08c0dbaf43170fd93ec7c
parentc7d0a8f58e536b22db88a229dc2f53daf0f02951 (diff)
downloadmpv-2cf8dd645172ffe3e89dcfa674fab4008ddeb7c1.tar.bz2
mpv-2cf8dd645172ffe3e89dcfa674fab4008ddeb7c1.tar.xz
drm: move struct vsync_tuple into drm_common as drm_vsync_tuple
This struct will be useful in vo_drm as well.
-rw-r--r--video/out/drm_common.h6
-rw-r--r--video/out/opengl/context_drm_egl.c11
2 files changed, 8 insertions, 9 deletions
diff --git a/video/out/drm_common.h b/video/out/drm_common.h
index 41a8e820b9..ba4fceba45 100644
--- a/video/out/drm_common.h
+++ b/video/out/drm_common.h
@@ -55,6 +55,12 @@ struct drm_opts {
struct m_geometry drm_draw_surface_size;
};
+struct drm_vsync_tuple {
+ uint64_t ust;
+ unsigned int msc;
+ unsigned int sbc;
+};
+
bool vt_switcher_init(struct vt_switcher *s, struct mp_log *log);
void vt_switcher_destroy(struct vt_switcher *s);
void vt_switcher_poll(struct vt_switcher *s, int timeout_ms);
diff --git a/video/out/opengl/context_drm_egl.c b/video/out/opengl/context_drm_egl.c
index 875a781fb6..6962237123 100644
--- a/video/out/opengl/context_drm_egl.c
+++ b/video/out/opengl/context_drm_egl.c
@@ -54,16 +54,9 @@ struct framebuffer
uint32_t id;
};
-struct vsync_tuple
-{
- uint64_t ust;
- unsigned int msc;
- unsigned int sbc;
-};
-
struct gbm_frame {
struct gbm_bo *bo;
- struct vsync_tuple vsync;
+ struct drm_vsync_tuple vsync;
};
struct gbm
@@ -106,7 +99,7 @@ struct priv {
bool still;
bool paused;
- struct vsync_tuple vsync;
+ struct drm_vsync_tuple vsync;
struct vo_vsync_info vsync_info;
struct mpv_opengl_drm_params_v2 drm_params;