summaryrefslogtreecommitdiffstats
path: root/video/out/opengl
diff options
context:
space:
mode:
authorLionel CHAZALLON <LongChair@hotmail.com>2017-10-22 23:59:58 -0700
committerwm4 <wm4@nowhere>2017-10-23 21:08:20 +0200
commit1992bb51515b46555e2a75b780dc79d973b7cf3a (patch)
treecfb2cf5b052cb116c050c0c8e279ab498fc6a2b6 /video/out/opengl
parentcfcee4cfe70536faeb9f2aaa87257d067e902b70 (diff)
downloadmpv-1992bb51515b46555e2a75b780dc79d973b7cf3a.tar.bz2
mpv-1992bb51515b46555e2a75b780dc79d973b7cf3a.tar.xz
video : Move drm options to substruct.
This allows to group them and most of all query the group config when needed and when we don't have the access to vo.
Diffstat (limited to 'video/out/opengl')
-rw-r--r--video/out/opengl/context_drm_egl.c5
-rw-r--r--video/out/opengl/hwdec_drmprime_drm.c7
2 files changed, 9 insertions, 3 deletions
diff --git a/video/out/opengl/context_drm_egl.c b/video/out/opengl/context_drm_egl.c
index c7de762e28..606736d483 100644
--- a/video/out/opengl/context_drm_egl.c
+++ b/video/out/opengl/context_drm_egl.c
@@ -347,8 +347,9 @@ static bool drm_egl_init(struct ra_ctx *ctx)
}
MP_VERBOSE(ctx, "Initializing KMS\n");
- p->kms = kms_create(ctx->log, ctx->vo->opts->drm_connector_spec,
- ctx->vo->opts->drm_mode_id, ctx->vo->opts->drm_overlay_id);
+ p->kms = kms_create(ctx->log, ctx->vo->opts->drm_opts->drm_connector_spec,
+ ctx->vo->opts->drm_opts->drm_mode_id,
+ ctx->vo->opts->drm_opts->drm_overlay_id);
if (!p->kms) {
MP_ERR(ctx, "Failed to create KMS.\n");
return false;
diff --git a/video/out/opengl/hwdec_drmprime_drm.c b/video/out/opengl/hwdec_drmprime_drm.c
index 95e42254e0..d942ab3d37 100644
--- a/video/out/opengl/hwdec_drmprime_drm.c
+++ b/video/out/opengl/hwdec_drmprime_drm.c
@@ -37,6 +37,8 @@
#include "ra_gl.h"
+extern const struct m_sub_options drm_conf;
+
struct drm_frame {
struct drm_prime_framebuffer fb;
struct mp_image *image; // associated mpv image
@@ -202,7 +204,10 @@ static int init(struct ra_hwdec *hw)
p->log = hw->log;
- mp_read_option_raw(hw->global, "drm-overlay", &m_option_type_int, &drm_overlay);
+ void *tmp = talloc_new(NULL);
+ struct drm_opts *opts = mp_get_config_group(tmp, hw->global, &drm_conf);
+ drm_overlay = opts->drm_overlay_id;
+ talloc_free(tmp);
GL *gl = ra_gl_get(hw->ra);
struct mpv_opengl_cb_drm_params *params =