Consistent with GL (vlc_gl_Create()) and with the function
documentation, this sets the strict flag when looking for a VK platform
plugin. Note that this change has no effects with the default setting.
The choice list always offers "any" and "none", and in this case, the
default is to not have a video splitter. This change fixes a bug whereby
the GUI would save the value "none", which the core would then treat as
a module name. No module by that name exists, so this would ultimately
cause the video output to fail entirely.
Also this treats NULL as an actual memory allocation error, instead of
the default value which was previously undistiguishable.
and a couple of syntax issues.
the hidden subcat is used here rather than `SUBCAT_VIDEO_VFILTER` because
according to discussion in !1181 this option is just used as a hack, not
meant for use as a normal user config option.
lack of a subcat entry when there are options is normally because the
author forgot it, which causes a bug of the options not being visible in
GUI preferences. we should at least have a comment here to highlight that
it is deliberate in this special case.
however, a test for option set validity could be added in future, which
would only end up failing on lack of subcat entry here, so to avoid that
let's add one. using the hidden subcat will "properly" keep the option
hidden from GUI prefs (and also potentially help output if the help output
logic ends up gaining the ability to also skip such hidden options).
The KMS window module shouldn't be loaded when a display server is
running and available from the environment. A user with X11 or Wayland
available can still enforce the kms window module by cleaning the
environment variable from wayland and X11.
Fix#26471
Fix the following build error:
```
../../modules/video_output/kms.c: In function ‘WindowEnable’:
../../modules/video_output/kms.c:335:9: error: a label can only be part of a statement and a declaration is not a statement
335 | struct drm_mode_destroy_dumb destroy_request = {
```
With gcc version 10.2.1 20210110 (Debian 10.2.1-6) and -fsanitize=thread
...rather than cfg.window_props. cfg.display was unused (always zeroes)
on vout_display_New() until this change.
This is consistent with vout_display_SetSize() affecting cfg.display
rather than cfg.window_props.
So far, the display was created without a requested size. Then its size
was immediately changed to that of the window.
With this change, the display is created directly with the correct size.
This matches the core video output behaviour.
the display can be created when the application state is active or inactive
inactive state actually happens when the application comes back from background and becomes active just after a very short amount of time
hence we should allow vout initialization only when application state is not background
The mapping code is copy/pasted from the libavutil<->libplacebo helpers
found in <libplacebo/utils/libav_internal.h>. This is better than
pulling in an ffmpeg dependency, and is reasonably forward-compatible
(the updated libplacebo helper will just have to be copy/pasted in the
unlikely event that this metadata ever gets extended).
This reverts commit 6218609ae4.
This broke the build:
../../modules/video_output/opengl/egl_display_gbm.c: In function ‘OpenDeviceFd’:
../../modules/video_output/opengl/egl_display_gbm.c:72:26: error: expected ‘}’ before ‘DRM_RENDER_MINOR_NAME’
72 | DRM_DIR_NAME "/" DRM_RENDER_MINOR_NAME "128",
| ^~~~~~~~~~~~~~~~~~~~~
../../modules/video_output/opengl/egl_display_gbm.c:71:53: note: to match this ‘{’
71 | static const char *default_drm_device_paths[] = {
| ^
Reports the different available connectors when opening the KMS vout
window module, with naming like most Wayland compositors and DRM info
tools.
This does not implement hotplug support though.
Not all planes can be used with every CRTC, and especially when there
are multiple connectors plugged. Check that the corresponding CRTC is
compatible with the plane we probed before selecting it.
This avoids drmModeSetPlane failing with invalid CRTC -EINVAL errors.
This is not using drmAvailable() which only checks against minor=0,
since card0 might not be available or not support DRM while card1 might
support it and be selected by --kms-device.
In addition, print the debug information about the current underlying
DRM driver implementation used. Note that according to NVidia's DRM
documentation[^1]:
DRM-NVDC does not populate the drmVersionPtr structure's date,
major, minor, and patchlevel fields.
[^1]: https://docs.nvidia.com/jetson/l4t-graphics/group__direct__rendering__manager.html#gaabb52f28bfc81b9af64866f88131d513
Add an option, --kms-connector, to target an arbitrary connector instead
of using the first suitable connector available. This is an equivalent
to selecting the output screen in the VLC API.
This is breaking the plugin option, but --kms is a really bad naming for
selecting the device it's rendering onto (is it the device file? the
connector?), and it would have been much better suited for enabling or
not the KMS window.
The framebuffer from the previous KMS state was lost and not recoverable
once the KMS module exited. It was only possible to reset the state by
switching TTY and switching back to the one where KMS was used.
Implement the vout window interface for the KMS module to allocate the
framebuffer once for multiple playback and split the connector selection
and KMS initialization and cleanup from the vout_display.
This is done as a submodule for now, the display module will actually be
splitted afterwards.
mingw/wine define some things that the C++ compilers don't like.
We currently don't use these helpers anyway.
Also clean the includes since we always end up including d3d11.h in d3d11_xxx.h
headers.
This removes the window configuration parameter from
vout_window_Enable(). The initial configuration is now set when the
window is created, and updated with the regular functions:
vout_window_SetSize(), vout_window_SetFullScreen() and
vout_window_UnsetFullScreen().
This reconciles the window configuration with the full-screen output
selection: if the window provider supports output selection, it can
simply ignore the full-screen flag in the configuration.
In practice, this makes no differences in the GL and splitter cases,
which were creating and enabling the window together. In the vout
case, this actually enables some small simplifications.
This change does not affect the module interface: the window
configuration is still passed via the enable() callback. However window
provider can choose to ignore all parameters other than the decoration
flag. Dimensions is already provided by the resize callback, and
full-screen status via set_fullscreen and unset_fullscreen callbacks.
It should be possible to remove the dimensions and full-screen flag
from the window configuration completely, but that is left for further
work, as it would affect many different modules.
This restores the configuration parameter to vout_window_New(). This is
at least necessary to initialise the decoration flag which is otherwise
constant.
see e967f81f6a.
note, this does **not** affect cat-based module selection items
(of which there are just three in use by the core), since that
mechanism uses subcats not cats.
Since 6ab9638604, the matrices in the
function are only 4x3, but the function kept using the fourth row of
the right hand matrix.
The out of bounds values were in practice multiplied with 0, which is
why this wasn't initially noticed. However, 0 * <uninit> can also
evaluate to NaN, if the uninitialized data happens to make the bit
pattern of a NaN.
In the upcoming Clang 14, the default options for float handling
were changed slightly (in Clang commit
f04e387055).
As Clang can see that these multiplications use undefined values out of
bounds, it assumes that those values are NaNs, which let Clang essentially
optimize out most of D3D_SetupQuad, just setting all of
quad->shaderConstants->Colorspace to NaNs.
This fixes the colorspace matrix when built with Clang 14, by assuming
the fourth, missing, row of the right hand matrix in MultMat43 to be
[0, 0, 0, 1].
Initial version of a standalone vout window provider for macOS,
it still lacks mouse handling and only works if the macosx inteface
module was loaded (or NSApp was initialized by other means).