VSYNC halt status can be toggled by the controls, which means that
it can be asynchronously switched on and off. If we abort a VSYNC
because of controls, we must ensure to return to the control state.
displayed.next was also overriden before returning, leading to issues.
vout_Stop() is stopping the display, but it wasn't accounted the same
way and a decoder video format update could actually try to stop the
display a second time.
OpenGL calls should not be used when resigining. When in background,
those calls would make the application crash. But it seems this event
is emitted when the control center is opened, so continue drawing anyway.
If a fallback chroma is used instead of the original chroma, we need to
trigger the insertion of a video converter to adapt to this new chroma.
Forgotten from c5ea9b76f2.
Regression from b79c2b2249 which removed
the converter for RGB fallbacks and the following change in vout_helper
c5ea9b76f2 which reintroduce the
conversion without taking care of converters for RGB.
The proper way to avoid the insertion of converters is to add support
for the formats in the interop.c instead of using RGB fallbacks.
Checking only fallbacks means that VLC_CODEC_BGRA will typically be
reinterpreted as VLC_CODEC_RBG32 and will not display correctly.
It might be a regression from previous change refactoring the interop
code, and the resulting chroma issue is a regression from
b79c2b2249 which removed the converter
for RGB fallbacks and the following change in vout_helper
c5ea9b76f2 which reintroduce the
conversion without taking care of converters for RGB.
The support for detached threads has been removed completely. There is
no need to document then in vlc_join now.
See the following commits:
android: thread: remove unused detached thread support
043d7ebf6b
os2: thread: remove unused detached thread support
f09937dc6d
win32: thread: remove unused detached thread support
8675f083e7
threads: remove vlc_clone_detach()
a10ac09d42
Deprecate vlc_clone_detach()
c5f960ff25
The input format is fixed for the lifetime of the decoder thread.
The output format is not always available as the packetiser or the
decoder may delay the determination of their output format until they
start outputting packets.
The downside is the assumption that input and output category are the
same. This assumption is already enforced by an assertion, and relied
heavily upon by the ES output for track selection, so it is hardly a
problem.
Fixes#21975
According to the specification, EGL displays are not reference-counted
by default. As such, `eglTerminate()` will terminate a display even if
there are other users for it in the same process.
This becomes a fatal problem if platform display is shared by multiple
components, and the EGL display parameters are identical or deemed
compatible by the EGL driver. Typically, this will occur with the
window provider and the display.
To fix this, the Khronos group defined an EGL extension to negotiate
reference counting explicitly.
* On Android, this patch makes no differences as the EGL enables
reference counting by default, regardless of the baseline
specifications.
* On X11, this patch makes no differences because the module will
create its own private Xlib `Display` as the platform display,
such that the EGL display is not shareable.
* This patch matters on Wayland where the `wl_display` pointer must be
shared between the window provider and display. Without this patch,
Either the window provider or the display cannot use EGL.
* On Windows, the situation ought to be similar to Wayland, though this
is much less of an issue, as EGL is not typically used.
This patch does **not** require reference counting if not available as
this would needlessly break on Android and X11, as well as with the
non-embedded XDG-shell window provider on Wayland.
The OpenGL states must not be set on Open, but on each Draw call if
necessary (they may impact other filters).
In practice, it is not necessary to set them at all:
- GL_CULL_FACE is useless for the renderer;
- the other states are assumed to be the default values in all other
filters.
Suggested-by: Niklas Haas <git@haasn.dev>
For historical reasons, the TLS cleanup was serialised on a critical
section. Now that there is a read/write lock, there are no reasons to
serialise exit. The thread exit process only reads the list head and
elements, does not modify the list per se; only vlc_threadvar_create()
and vlc_threadvar_delete() add and remove elements respectively.
This allows threads to exit in parallel.
The VLC API "wastes" time preserving the thread's system error code.
There are no ways to consume those errors in the thread exit code, so
there is really no point in going out of our way here.
Old-style TLS keys only need to be in the list if they have a
per-thread destructor. If they don't, then don't put them in that list,
so iterating the list is faster.
Old-style TLS keys only need to be in the list if they have a
per-thread destructor. If they don't, then don't put them in that list,
so iterating the list is faster.