In VLC 3.0, this event was sent for END_S (input_thread_t is stopping)
and INPUT_DEAD_EVENT (input_thread_t is stopped).
In VLC 4.0, this event is sent when the player is stopping.
The renaming reflect the actual state.
There's no reason for an app to mix its error messages with ours.
Applications that may have used this will fail to link so will quickly notice
the change.
ssize_t is not a standard C type. In some cases it's supposed to hold no more
than a long [1]. That's 2 GB in normal case which is enough for 16k*16k 16-bit
RGBA.
> The implementation shall support one or more programming environments in
> which the widths of blksize_t, pid_t, size_t, ssize_t, and suseconds_t are no
> greater than the width of type long. The names of these programming
> environments can be obtained using the confstr() function or the getconf
> utility.
Make sure the new type is equivalent to the old one so we don't break ABI.
And a recompilation will hopefully no bring any warning (otherwise that was
assumed to be ssize_t by the host app was not correct).
[1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html
When running code in C++, remove the macro which is applying regardless
of the language context, and provide dedicated function overload for the
same effect. In addition, provide a dedicated wrapper avoiding cast and
size specification.
Remove vlc_gl_HasExtension helper from the public API and implement it
as a private helper in modules. The reason for such helper was to help
ensuring the core stays compatible with Core OpenGL profile, which is
broken as soon as glGetString(GL_EXTENSIONS) is called instead of the
glGetStringi(GL_EXTENSION, i) variant.
Having the helper in the core led to issues against the MacOSX
implementation.
The extension store in gl_util.h prevents reloading the functions
across multiple calls from vlc_gl_HasExtension, and the helper can
easily be used in any OpenGL client which needs access to the extension
list.
Fix#26606 regression as a side effect
Co-Authored-by: Zhao Zhili <quinkblack@foxmail.com>
The API is not used anymore, and with the removal of the reference
counting pattern in objects, not required.
Indeed, the OpenGL providers are neither multi-thread nor reentrant
so it needs a locked stated when multiple clients needs to use it,
which will also needs to be reference counted across the clients, so
the whole reference counting can be done there.
In addition, if the context was given from module to other module, like
in the filter chain, the video contexts forwarded in those chains would
already be doing the reference counting. As a side note, there would
probably be few reasons to implement such forwarding currently anyway
since it would means that the beginning of the chain would lose usage
of the context, which also encompass a pool of output picture too
currently.
Doxygen for libvlc_video_output_cfg_t and libvlc_video_render_cfg_t
were not correct and led to the documentation of one field being
assigned to the field after it.
In the future, the fields might need more precision regarding the
possible ranges or kind of values they can convey, so use a top
comment instead of a sibling one, which can more easily integrate
a brief and a longer explanation.
Like done by _Generic in the C version, use overloading functions to
define the correct casting behaviour depending on whether the pointer
is already a vlc_object_t or possess a vlc_object_t as ->obj.
This removes the need for listing all the objects which need a casting
case, and non-vlc_object_t objects will fail with the following error:
include/vlc_objects.h: In instantiation of ‘vlc_object_t* VLC_OBJECT(T*) [with T = {anonymous}::demux_sys_t; vlc_object_t = vlc_object_t]’:
include/vlc_objects.h:83:18: error: ‘struct {anonymous}::demux_sys_t’ has no member named ‘obj’
or, if there is a obj field which is not a vlc_object_t:
include/vlc_objects.h: In instantiation of ‘vlc_object_t* VLC_OBJECT(T*) [with T = Open(vlc_object_t*)::foo; vlc_object_t = vlc_object_t]’:
include/vlc_objects.h:83:18: error: cannot convert ‘Open(vlc_object_t*)::foo::obj*’ to ‘vlc_object_t*’ in return
83 | { return &d->obj; }
| ~~~^~~
| |
| Open(vlc_object_t*)::foo::obj*
The previous commit made use of compound literals. MSVC was identified
as not yet having support for compound literals in C++ though, which is
considered a blocking problem to their use. This work around was
suggested by Alexandre Janniaux.
I.e. check the type of the values provided, rather than just blindly
casting, and thus allow mistakes to get caught with compilation errors.
I once lost some hours tracking down the cause of a crash that this type
strictness would have prevented.
Note, now that `change_string_list()` and `change_integer_list()` use type
strictness for the value and label arrays to help make sure they're the
right types, we can more safely make use of `ARRAY_SIZE()` to more cleanly
get the length.
`set_callback[s]()` is excluded from this for obvious reasons.
I've taken the opportunity to ditch remaining use of Hungarian notation
and to fix a param name that should be singular rather than plural
(psz_caps on `add_module[_list]()`.
Re-implemented using compound literals upon excellent suggestion by
Alexandre Janniaux.
Historically this function would set the device for a specified audio
output module. This required the application to somehow "know" what
audio output module it wanted to use, which is very suboptimal for
forward compatibility and portability.
Worse yet, this design failed outright in VLC 2.2 with the addition of
MMDevice and PulseAudio. This lead to the convention of leaving the
module parameter NULL to change the device of the currently active
audio output.
As with the removal of libvlc_audio_output_device_list_get(), it seems
saner to simply remove the old broken semantics.
This function does not work with MMDevice and PulseAudio, and does not
support hot-plug. To enumerate devices, the newer function
libvlc_audio_output_device_enum() ought to be used, which also works
with MMDevice and PulseAudio, and track audio device events.
No amount of documentational warnings will save developers from using
this broken function. It is better to remove it now that there is the
opportunity to do so in the form of the LibVLC 4.0 binary compatibility
break.
Only two such defines were already in use, the rest were pointlessly
duplicating the text, which should be identical in both interfaces and so
it makes sense to have shared defines.
This happens to fix a few unwanted inconsistencies:
- MacOS was using lowercase "settings" in two places.
- Qt was using completely different language for the hotkey and ML tag
tooltips to everything else.
- A trivial difference between input tab tooltips.
- references to member from different structure without context:
- window -> vout_display_cfg.window
- is_display_filled -> vout_display_cfg.is_display_filled
- reset_pictures -> vlc_display_operations.reset_pictures
- fields that have been removed
- cfg in display activation callback
- invalid references: ::source