From 9d68d8fb0f806f25408435c09ac5dbbe34b95462 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 17 Jan 2017 14:51:08 +0100 Subject: vo_opengl, vo_opengl_cb: better hwdec interop backend selection Introduce the --opengl-hwdec-interop option, which replaces --hwdec-preload. The new option allows explicit selection of the interop backend. This is relatively complex, and I would have preferred not to add this, but it's probably useful to debug certain problems. In exchange, the "new" option documents that pretty much any but the simplest use of it will not be forward compatible. --- DOCS/man/input.rst | 7 +++++-- DOCS/man/options.rst | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) (limited to 'DOCS/man') diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 70a05dcaef..68f5ae53e8 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -1331,8 +1331,8 @@ Property list This is known only once the VO has opened (and possibly later). With some VOs (like ``opengl``), this might be never known in advance, but only when the decoder attempted to create the hw decoder successfully. (Using - ``--hwdec-preload`` can load it eagerly.) If there are multiple drivers - loaded, they will be separated by ``,``. + ``--opengl-hwdec-interop`` can load it eagerly.) If there are multiple + drivers loaded, they will be separated by ``,``. If no VO is active or no interop driver is known, this property is unavailable. @@ -1341,6 +1341,9 @@ Property list multiple interop drivers for the same hardware decoder, depending on platform and VO. + This is somewhat similar to the ``--opengl-hwdec-interop`` option, but + it returns the actually loaded backend, not the value of this option. + ``video-format`` Video format as string. diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 3794ff23e3..a812fb088c 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -746,12 +746,12 @@ Video In particular, ``auto-copy`` will only select safe modes (although potentially slower than other methods). -``--hwdec-preload=`` +``--opengl-hwdec-interop=`` This is useful for the ``opengl`` and ``opengl-cb`` VOs for creating the hardware decoding OpenGL interop context, but without actually enabling hardware decoding itself (like ``--hwdec`` does). - If set to ``no`` (default), the ``--hwdec`` option is used. + If set to an empty string (default), the ``--hwdec`` option is used. For ``opengl``, if set, do not create the interop context on demand, but when the VO is created. @@ -762,6 +762,19 @@ Video to temporarily set the ``hwdec`` option just during OpenGL context initialization with ``mpv_opengl_cb_init_gl()``. + See ``--opengl-hwdec-interop=help`` for accepted values. This lists the + interop backend, with the ``--hwdec`` alias after it in ``[...]``. Consider + all values except the proper interop backend name, ``auto``, and ``no`` as + silently deprecated and subject to change. Also, if you use this in + application code (e.g. via libmpv), any value other than ``auto`` and ``no`` + should be avoided, as backends can change. + + Currently the option sets a single value. It is possible that the option + type changes to a list in the future. + + The old alias ``--hwdec-preload`` has different behavior if the option value + is ``no``. + ``--videotoolbox-format=`` Set the internal pixel format used by ``--hwdec=videotoolbox`` on OSX. The choice of the format can influence performance considerably. On the other -- cgit v1.2.3