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.
This commit is contained in:
LongChair
2018-04-29 15:09:16 +02:00
committed by Jan Ekström
parent 11f915f5ef
commit 9f2970f28a
8 changed files with 113 additions and 35 deletions

View File

@@ -488,11 +488,6 @@ Available video output drivers are:
Mode ID to use (resolution and frame rate).
(default: 0)
``--drm-overlay=<number>``
Select the DRM overlay index to use.
Overlay index is zero based, and related to crtc.
(default: 0)
``--drm-format=<xrgb8888,xrgb2101010>``
Select the DRM format to use (default: xrgb8888). This allows you to
choose the bit depth of the DRM mode. xrgb8888 is your usual 24 bit per
@@ -506,6 +501,13 @@ Available video output drivers are:
This currently only has an effect when used together with the ``drm``
backend for the ``gpu`` VO. The ``drm`` VO always uses xrgb8888.
``--drm-osd-size=<[WxH]>``
Sets the OSD OpenGL size to the specified size. OSD will then be upscaled
to the current screen resolution. This option can be useful when using
several layers in high resolutions with a GPU which cannot handle it.
Note : this option is only available with DRM atomic support.
(default: display resolution)
``mediacodec_embed`` (Android)
Renders ``IMGFMT_MEDIACODEC`` frames directly to an ``android.view.Surface``.
Requires ``--hwdec=mediacodec`` for hardware decoding, along with