summaryrefslogtreecommitdiffstats
path: root/video/out/drm_common.c
diff options
context:
space:
mode:
authorLongChair <longchair@hotmail.com>2018-04-29 15:09:16 +0200
committerJan Ekström <jeebjp@gmail.com>2018-05-01 20:48:02 +0300
commit9f2970f28a28076897fda1100de2b6eb9a92be79 (patch)
tree7cd8db166d6b6c621684cdd9750866c9842c454a /video/out/drm_common.c
parent11f915f5ef7d622a225bee6ab98ee6a9da34991f (diff)
downloadmpv-9f2970f28a28076897fda1100de2b6eb9a92be79.tar.bz2
mpv-9f2970f28a28076897fda1100de2b6eb9a92be79.tar.xz
drm/atomic: refactor hwdec_drmprime_drm with native resources
That new API was introduced and allows to have several native resources. Thisuses that mechanisma for drm resources rather than the deprecated opengl-cb structs. This patch therefore add two structs that can be used with the drm atomic interop. - mpv_opengl_drm_params : which will hold all the drm handles - mpv_opengl_drm_osd_size : which will hold osd layer size This commit adds a drm-osd-size=WxH parameter to commandline which allows to define the OSD plane dimension. OSD can be upscaled to screen resolution when having OSD at video resolution is too heavy. This is especially useful for UHD modes on embedded devices where the GPU cannot handle UHD modes at a decent framerate.
Diffstat (limited to 'video/out/drm_common.c')
-rw-r--r--video/out/drm_common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/drm_common.c b/video/out/drm_common.c
index 68c64d4298..8723f59bd3 100644
--- a/video/out/drm_common.c
+++ b/video/out/drm_common.c
@@ -51,6 +51,7 @@ const struct m_sub_options drm_conf = {
OPT_CHOICE("drm-format", drm_format, 0,
({"xrgb8888", DRM_OPTS_FORMAT_XRGB8888},
{"xrgb2101010", DRM_OPTS_FORMAT_XRGB2101010})),
+ OPT_SIZE_BOX("drm-osd-size", drm_osd_size, 0),
{0},
},
.size = sizeof(struct drm_opts),