Commit Graph

92775 Commits

Author SHA1 Message Date
Alexandre Janniaux 784c324571 configure: check typeof on C++ compilers
C compilers can have GNU extensions to support typeof in C code, but
some C++ compilers like clang are removing the builtin since decltype
can be used in C++ without the constraints from typeof. Decltype is not
100% equivalent for this reason: references will be kept in the returned
type.

The check in m4/typeof.m4 comes from graydon/monotone and dovecot/core
and was slightly modified to namespace the define for C++ code.
2022-05-21 15:17:00 +00:00
Prince Gupta 0caa9ea0e6 qt: fix cover generation on windows
in previous code, for path "C:/image.jpg", the url scheme will be "C" and
the call to QQmlFile::urlToLocalFileorQrc with fail since url scheme is not "file"
but the provided input path is valid file path, fix such cases
2022-05-21 14:41:02 +00:00
Alexandre Janniaux d305611d6d qt: medialib: add missing override 2022-05-21 13:51:13 +00:00
Alexandre Janniaux 8d838e7ea2 qt: preferences_widgets: use override
... instead of Q_DECL_OVERRIDE, since it always expand to override for
>=C++11 configuration, and the module uses C++11 anyway.
2022-05-21 13:51:13 +00:00
Alexandre Janniaux b763729446 qt: preferences_widgets: add missing override 2022-05-21 13:51:13 +00:00
Alexandre Janniaux a0186adb8e configure.ac: remove x-test checks
x-test syntax (x$foo = xyes/xno) is used to circumvent the fact that
shell variables are substituted and not just defining an argument, so
that $foo doesn't expand to no argument at all.

But "" in posix shell syntax is considered as an argument by itself, so
using quotes around the variable removes this issue. Thus, x-test is
useless in the case where it has been removed in this patch.
2022-05-20 08:51:28 +00:00
Hugo Beauzée-Luyssen 7abfc1fa74 contrib: Bump medialibrary to 0.12.0 2022-05-20 07:40:41 +00:00
Hugo Beauzée-Luyssen bc03e6e46b medialibrary: Update to 0.12.0 API changes 2022-05-20 07:40:41 +00:00
Rémi Denis-Courmont d1cab34788 lib: do not crash in the logo module is absent (refs #26881) 2022-05-20 07:05:58 +00:00
Rémi Denis-Courmont 63785ac640 lib: do not crash in the marq module is absent (refs #26881) 2022-05-20 07:05:58 +00:00
Rémi Denis-Courmont 739f285ed5 share: really sort files in the skins tarball
Looking through the tar command line help is brittle, and as a matter of
facts fails miserably with non-English locales.

Just feed a sorted list of files for tar to archive instead. This should
work regardless of the tar tool version in use.

Fixes Debian #990247.
2022-05-20 06:30:46 +00:00
Alexandre Janniaux a928eb1712 skins2: skin_main: fix window closing after interface
The interface cannot be closed before the vout_window_t object is
disabled, since the playlist/player is running from outside the
interfaces.

When it happens, a warning was raised from skins2 and the OpenGL code
would stay stuck waiting for xcb events, preventing the full closing of
the interface resources and delaying the close of the application itself.

This commit ensures that no skins2 window is enabled before leaving the
Close function from the interface, and no new skins2 window will be
enabled in a racy pattern while or after the Close function from the
interface is running.

The issue was highlighted in previous commit, including the commit
04409ebd45 which required in its commit
description that interface modules should outlive the vout window
instances they provide, but didn't provide a mechanism to do so.

The added mutex was removed in 6083d3f103
because it was useless as-is. This commit adds a reference count of
opened window, and a wait for this reference count to reach zero before
ending the interface Close() function, which justify the use of a mutex.

Note also that this patch uses the Enable/Disable lifecycle of the
window to manage the reference count and skins2 resources, because
there is an inversion between the playlist destruction and the
interface destruction.

We cannot wait for the vout_window_t object to be destroyed while we're
waiting in the interface Close(), since the vout is potentially reused
up to the playlist destruction (or more precisely, input resource
destruction) which can only happen after every interface is destroyed.

The implementation here is a bit different to what has been done for
other interfaces like Qt. The Qt interface is creating a new libvlc
object and stashes the interface state there, while refcounting it.
It means that the interface implementation itself will continue to exist
even if the interface object is dead. It has particular benefit when
the interface is not the usual interface but a dialog provider one.

The submitted approach here tries to keep the lifecycle of the
interface tied together with its object, to simplify the use of its
object for variable or logging, and avoid unnecessary object allocation.
2022-05-20 06:03:01 +00:00
Steve Lhomme 8684656505 direct3d9: fix the texture stretching
The destination texture (sys->sceneTexture) has the visible dimensions, not the
decoder dimensions.

Factorize the size processing for the stretching and the vertex computing.

Ref. https://forum.videolan.org/viewtopic.php?f=14&t=159861
2022-05-20 05:47:04 +00:00
Steve Lhomme a45953d02f vlc_thread: ensure thread names are not bigger than 16 bytes
Some platforms may not accept longer names or will truncate it, so we stick to
that size.

It should work with gcc at least. It also works with LLVM14.
2022-05-20 05:07:42 +00:00
Steve Lhomme c9cf3e67aa vlc_thread: check the delay values when __builtin_constant_p is defined
It exists in very old gcc and clang.

VLC_WARN_CALL/VLC_ERROR_CALL may not warn though.

Don't define check_delay/check_deadline otherwise and don't force the
vlc_tick_sleep/vlc_tick_wait calls.
2022-05-20 05:07:42 +00:00
Steve Lhomme 0ef983754b vlc_common: define more attribute based defines using __has_attribute
Leave VLC_DEPRECATED_ENUM, VLC_FORMAT and VLC_FORMAT_ARG for now as they are
more compiler specific.
2022-05-20 05:07:42 +00:00
Steve Lhomme 4e88107129 vlc_threads: use defines for the builtin checks 2022-05-20 05:07:42 +00:00
Steve Lhomme 072f13a81d vlc_common: add some function attribute defines
They should exist for gcc and clang.

We could also use __has_c_attribute() and the [[]] C23 notation when available.
2022-05-20 05:07:42 +00:00
Rémi Denis-Courmont 2390f360d6 cli: print item extra meta data (fixes #24986) 2022-05-19 18:33:26 +00:00
Rémi Denis-Courmont f2b463f98d cli: print item meta data (refs #24986)
Note that item->p_meta cannot be NULL.
2022-05-19 18:33:26 +00:00
Rémi Denis-Courmont 0b74dc4fa3 cli: factor strings 2022-05-19 18:33:26 +00:00
Rémi Denis-Courmont f67038f224 meta: add vlc_meta_TypeToString()
Same as vlc_meta_TypeToLocalizedString() without localisation.
2022-05-19 18:33:26 +00:00
Rémi Denis-Courmont 85772a0e65 cli: print infos of playlist items (refs #24986)
This matches the Lua RC info semantics. If there is an argument print
the infos of the item with that index, rather than the playing item.
2022-05-19 18:33:26 +00:00
Rémi Denis-Courmont fd0cc5d3bb cli: make info a playlist command 2022-05-19 18:33:26 +00:00
Rémi Denis-Courmont 82e0b9704e cli: factor out item printing 2022-05-19 18:33:26 +00:00
Alaric Senat f7848ef099 input: decoder: remove `DecoderThread_PlaySout()`
As it has become a one-liner function.

`assert( !sout_frame->p_next );` is irrelevant as `sout_frame->p_next`
is guaranteed to be NULL by the calling code anyway.
2022-05-19 18:06:49 +00:00
Alaric Senat 82ba705dfa input: decoder: remove decoder thread in sout scenarios
Currently, a decoder thread is spawned to handle both the display and
the stream output. The decoder thread is actually unneeded by the stream
output as packetizing is the only task to do before forwarding the data
to the stream output. No heavy decoding is involved.

In addition to make the runtime lighter for stream output, having the
sout handling synchronous would help a lot for the implementation of
`PCR` forwarding in stream output (see !1394) as the asynchronous
`SetPCR` handling could be then managed in transcode only.

This patch removes the decoder thread usage in stream output scenarios
directly in the `vlc_input_decoder`. While this is far from ideal and
looks hacky, it's the best way I found to not change the code base too
much and not introduce unseen regressions right before 4.0 release.

These changes can be considered temporary as the plan in the long run
(after 4.0) is to remove stream output mention from `vlc_input_decoder`
and create a stream output specific `es_out` implementation.

Refs #26870 #26825
2022-05-19 18:06:49 +00:00
Marvin Scholz c3df9c3712 vout: caopengllayer: fix resize
Fixes a regression from c58018e41f
2022-05-19 14:46:04 +00:00
Pierre Lamot 7e06c87ad9 qml: seek precisely to chapters when clicking near the chapter time
it remains possible to bypass the "magnetic" effect by holding the shift
modifier when pressing the mouse
2022-05-19 08:33:57 +00:00
Pierre Lamot 5edae38557 qt: allow to retrieve the nearest chapter in ChapterModel 2022-05-19 08:33:57 +00:00
Rémi Denis-Courmont 5a236388de configure: do not force AltiVec on everything
Fixes Debian #842513.
2022-05-19 07:11:58 +00:00
Rémi Denis-Courmont bcbbefbf9d deinterlace: move CPPFLAGS to Makefile 2022-05-19 07:11:58 +00:00
Rémi Denis-Courmont 04cfde414e deinterlace: use VLC_ALTIVEC 2022-05-19 07:11:58 +00:00
Rémi Denis-Courmont b7a7673cf3 configure: remove unused test 2022-05-19 07:11:58 +00:00
Rémi Denis-Courmont 5b7b2ff842 configure: remove unused ALTIVEC_CFLAGS 2022-05-19 07:11:58 +00:00
Rémi Denis-Courmont 03d8a050e0 i420_yuy2: use VLC_ALTIVEC 2022-05-19 07:11:58 +00:00
Rémi Denis-Courmont cb303e77f4 cpu: define VLC_ALTIVEC attribute macro
Like on x86 (e.g. VLC_SSE), this macro enables the use of AltiVec for
just a given function. Thus the other functions in the same C module
can be compiled without AltiVec and run on non-AltiVec processors.
2022-05-19 07:11:58 +00:00
Rémi Denis-Courmont 4af9c85184 configure: do not enable AltiVec in libvlccore
This was added ostensibly to fix compilation of the run-time AltiVec
test which was removed in bc146294cf.
Unfortunately, it causes the compiler to emit AltiVec instructions,
such that the executable crashes if AltiVec is not available.

Regression from e48d619555.
2022-05-19 07:11:58 +00:00
Rémi Denis-Courmont 8cbec77763 configure: remove unused define 2022-05-19 07:11:58 +00:00
Alexandre Janniaux 927d9cc1be window_macosx: fix vout_window drawable type
It was missing from 514954e217.
2022-05-18 11:01:45 +00:00
Steve Lhomme b54048c100 demux: pass a vlc_object_t to create a custom packetizer 2022-05-18 10:14:50 +00:00
Steve Lhomme 36017f9c3a modules: add a fancy name to internal threads 2022-05-18 07:52:09 +02:00
Rémi Denis-Courmont a2e0adec40 vout: remove write-only mouse_event 2022-05-17 19:14:06 +00:00
Rémi Denis-Courmont 6bfaa5289c window: dispatch mouse events 2022-05-17 19:14:06 +00:00
Rémi Denis-Courmont 851efba5bd window: track mouse callback
This gets set explicitly when the video output is started, which always
results in the window being (re)enabled. Conversely, this gets
implicitly unset when the video output is stopped, which always results
in the window being disabled.
2022-05-17 19:14:06 +00:00
Rémi Denis-Courmont 3ed5be7bab window: gather mouse state in a substructure
No functional changes.
2022-05-17 19:14:06 +00:00
Rémi Denis-Courmont 5cb39aeb7c display: remove vout_display_TranslateMouseState()
This is no longer used.
2022-05-17 19:14:06 +00:00
Rémi Denis-Courmont dfcdacd1bc window: translate mouse coordinates
This takes mouse coordinates translation out of the video output and
into the video window code, getting rid of one display lock dependency.
2022-05-17 19:14:06 +00:00
Rémi Denis-Courmont 6f7e056e9c window: track display and video sizes 2022-05-17 19:14:06 +00:00
Rémi Denis-Courmont 5e61db7c65 window: appropriate resize code
No functional changes.
2022-05-17 19:14:06 +00:00