1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-12 13:44:56 +02:00
Commit Graph

7883 Commits

Author SHA1 Message Date
Rémi Denis-Courmont
77eab7cd4a fourcc: define code point for RTP video/raw 2022-03-16 07:46:28 +00:00
Thomas Guillem
be78a1ac3d lib: media: rename Ended to Stopped
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.
2022-03-12 09:41:12 +00:00
Thomas Guillem
c2c5341f6a lib: media: remove deprecated comment 2022-03-12 09:41:12 +00:00
Thomas Guillem
c338de7b64 lib: media_player: rename EndReached to Stopping
Since it's sent when the player begins to stop (on VLC 3.0 and 4.0).
2022-03-12 09:41:12 +00:00
Steve Lhomme
4c73518d6e libvlc: don't make VLC error reporting public anymore
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.
2022-03-12 09:00:25 +00:00
Juliane de Sartiges
92db822f89 core: static initializer for refcount 2022-03-10 15:12:55 +00:00
Steve Lhomme
6fa58261ff libvlc: add a callback for the type of the resize callback
This will avoid lengthy variable declarations.
2022-03-05 12:23:02 +00:00
Steve Lhomme
553f6091c0 libvlc: add the possibility to flip the rendered textures
Only supported by the D3D11 renderer for now.
2022-03-05 12:23:02 +00:00
Steve Lhomme
4671cfb425 libvlc: use ptrdiff_t instead of POSIX ssize_t in libvlc
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
2022-03-03 17:58:30 +00:00
Rémi Denis-Courmont
fe1083cdf5 cpu: remove unused SSE4a flag
Detection only worked on Linux, but more importantly, this flag fell out of
use with 8512cab6af.
2022-02-27 18:11:02 +00:00
Rémi Denis-Courmont
9d2d171f3a cpu: remove unused SSE 4.2 flag
This flag fell out of use with 8512cab6af.
2022-02-27 18:11:02 +00:00
Rémi Denis-Courmont
c240b18e48 cpu: remove unused XOP flag
Detection only worked on Linux, but more importantly, this flag fell out of
use with 8512cab6af.
2022-02-27 18:11:02 +00:00
Rémi Denis-Courmont
cecad7a516 cpu: remove unused FMA4 flag
Detection only worked on Linux, but more importantly, this flag fell out of
use with 8512cab6af.
2022-02-27 18:11:02 +00:00
Rémi Denis-Courmont
c8128f95f0 cpu: remove unused SSE1 flag 2022-02-27 18:11:02 +00:00
Rémi Denis-Courmont
7d37a70341 cpu: remove unused MMX flag 2022-02-27 18:11:02 +00:00
Alexandre Janniaux
2c43dc1cdc vlc_objects: add C++ helper for vlc_object_create
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.
2022-02-26 11:12:41 +00:00
Alexandre Janniaux
6579042467 vlc_objects: add extern "C" convention 2022-02-26 11:12:41 +00:00
Hugo Beauzée-Luyssen
a5eb80ea3d medialib: Expose missing album properties 2022-02-26 08:08:10 +00:00
Hugo Beauzée-Luyssen
bab97ff0ba medialib: Use proper types for album properties 2022-02-26 08:08:10 +00:00
Hugo Beauzée-Luyssen
53797783a0 medialib: Bind artist number of present tracks 2022-02-26 08:08:10 +00:00
Hugo Beauzée-Luyssen
8f168f446f medialib: Use correct types for media group properties
Date are now exposed as time_t
Duration should have always been an int64_t
And replace unsigned int by uint32_t for coherence
2022-02-26 08:08:10 +00:00
Hugo Beauzée-Luyssen
0c4e0191e7 medialib: Bind new media group properties 2022-02-26 08:08:10 +00:00
Hugo Beauzée-Luyssen
12572d1bea medialib: Bind duration properties 2022-02-26 08:08:10 +00:00
Hugo Beauzée-Luyssen
79905ca608 medialib: Expose playlist nb audio/video/unknown properties 2022-02-26 08:08:10 +00:00
Hugo Beauzée-Luyssen
c7a10410ac medialibrary: Bind folder modifications callbacks 2022-02-25 15:37:01 +00:00
Rémi Denis-Courmont
56e43fabb5 cpu: drop unused MMXEXT flag 2022-02-25 12:12:07 +00:00
Rémi Denis-Courmont
b13555433e cpu: semi-generic helper for hooking SIMD functions 2022-02-24 17:43:59 +00:00
Rémi Denis-Courmont
ea93bcb8d3 compat: Linux getauxval() replacement
This was added over a decade ago, but 🤷...
2022-02-23 21:10:16 +00:00
Rémi Denis-Courmont
8b4fec2456 threads: rewrite and inline vlc_once()
This rewrites vlc_once() as a trivial wrapper for vlc_once_begin() and
vlc_once_complete().
2022-02-23 09:23:55 +00:00
Rémi Denis-Courmont
c86e603948 threads: add vlc_once_begin() and vlc_once_complete()
This supports one-time initialisation without callback, which is
somewhat more flexible and provides better type safety.
2022-02-23 09:23:55 +00:00
Alexandre Janniaux
8f2bf524c0 include: vlc_opengl: use extern "C" in C++ code 2022-02-22 15:29:12 +00:00
Benjamin Arnaud
6f2b25fac0 medialibrary: Udpate folder support 2022-02-20 14:18:57 +00:00
Pierre Lamot
7866b1be2f medialibrary: Add audio(s) list and count functions
Co-authored-by: Benjamin Arnaud <benjamin.arnaud@videolabs.io>
2022-02-20 14:18:57 +00:00
Pierre Lamot
a4e5e0ce26 medialibrary: Add video(s) list and count functions
Co-authored-by: Benjamin Arnaud <benjamin.arnaud@videolabs.io>
2022-02-20 14:18:57 +00:00
Hugo Beauzée-Luyssen
0102a531e4 medialibrary: Update to 0.11.x API
Fix #26491
2022-02-19 15:47:05 +00:00
Alexandre Janniaux
a162a17762 opengl: implement vlc_gl_HasExtension in modules
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>
2022-02-18 10:30:34 +01:00
Alexandre Janniaux
f93738a6f5 opengl: remove reference counting
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.
2022-02-18 10:30:34 +01:00
Alexandre Janniaux
7b8d3fc001 lib: media_player: fix doxygen
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.
2022-02-15 08:09:14 +00:00
Alexandre Janniaux
3a526cb35e vlc_objects: simplify VLC_OBJECT cast handling
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*
2022-02-09 12:36:10 +00:00
Lyndon Brown
17604330bf plugins: use helper to workaround missing c++ language feature support
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.
2022-02-03 16:14:17 +00:00
Lyndon Brown
e8f6a59569 plugins: add type strictness to plugin descriptor macros
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.
2022-02-03 16:14:17 +00:00
Rémi Denis-Courmont
fd34522193 lib: only change device of current output
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.
2022-02-03 10:28:17 +00:00
Rémi Denis-Courmont
2be8d2d03d lib: return an error code when changing audio device 2022-02-03 10:28:17 +00:00
Rémi Denis-Courmont
e0ed460151 lib: remove libvlc_audio_output_device_list_get() (refs #26440)
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.
2022-02-03 10:28:17 +00:00
Rémi Denis-Courmont
2188dd740f cpu: compile-time RISC-V "V" V.E. detection
This detects compiler support for the RISC-V "V" Vector Extension if it
enabled in the compiler flags (or compiler machine definition).
2022-02-01 14:52:06 +00:00
Rémi Denis-Courmont
96ae63596e cpu: compile-time RISC-V FPU detection 2022-02-01 14:52:06 +00:00
Lyndon Brown
a7963fdf21 prefs: use common defines for all simple pref tab titles & tooltips
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.
2022-02-01 13:20:23 +00:00
Alexandre Janniaux
187d974926 vlc_vout_osd: move documentation to header 2022-01-29 18:07:27 +00:00
Alexandre Janniaux
8b6bda47a4 vlc_vout_window: fix doxygen
Fix missing parameters and parameter names.
2022-01-29 18:07:27 +00:00
Alexandre Janniaux
e57a387023 vlc_vout_display: fix doxygen
- 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
2022-01-29 18:07:27 +00:00