Commit Graph

8181 Commits

Author SHA1 Message Date
Steve Lhomme 233b54fc21 vlc_common: set VLC_USED/VLC_MALLOC/VLC_DEPRECATED for MSVC
The proper values don't work everywhere as they are not always put in the right
place.
2023-01-17 11:33:05 +00:00
Steve Lhomme 9c863ef17d vlc_fixups: add some fixups for the official Windows SDK
Only used with clan-cl for now.

dirent.h support is disabled. In the end it's never used by code compiled
for Windows.
2023-01-17 11:33:05 +00:00
Steve Lhomme 9673680740 vlc_list: Don't initialize return value with a compound literal in C++
This isn't standard C++ and fails to build with MSVC

Similar to 7180df7a44
2023-01-17 11:33:05 +00:00
Steve Lhomme 3ee6797346 win32: define _USE_MATH_DEFINES
So that M_PI is defined when including math.h.
2023-01-17 11:33:05 +00:00
Steve Lhomme 0dfe633943 win32: define NOMINMAX to avoid having min & max macros
This is confusing a lot of code. It is automatically done when including
windows.h, but not all code includes it.
2023-01-17 11:33:05 +00:00
Steve Lhomme 8df09a9e3b vlc_picture: add C++ extern "C" 2023-01-17 10:37:49 +00:00
Steve Lhomme dc91b16390 vlc_tick: use unsigned for sample frequency
It cannot be negative. The amount of samples and ticks can be negative.
2023-01-17 10:37:49 +00:00
Steve Lhomme 32e310fb36 avoid empty function parameters 2023-01-17 10:37:49 +00:00
Steve Lhomme 352ad101b3 rename __LIBVLC__ to LIBVLC_INTERNAL_
define names starting with 2 underscore are reserved.

https://devblogs.microsoft.com/oldnewthing/20230109-00/?p=107685
2023-01-17 10:37:49 +00:00
Johannes Kauffmann f242e3c7eb meson: fix named argument style
As per the style guide.
2023-01-15 09:26:33 +00:00
Benjamin Arnaud e07e728d58 core/medialibrary: Add the favorite media setter 2023-01-14 08:43:40 +00:00
Steve Lhomme ce225f861a vlc_es: check the orientation on the enum as an integer
Some compilers may not change the type of the enum into an int automatically
before checking the _Generic variant.
2023-01-13 09:43:31 +00:00
Steve Lhomme c952eb4eaf separate defines to export DLL functions
libvlc cannot have the VLC DLL export define set.
2023-01-12 14:50:21 +00:00
Rémi Denis-Courmont 9d78b14ed1 win32: don't define PATH_MAX
That's only used once in the entire code base, in a Linux-specific file.
2023-01-08 08:55:54 +00:00
Steve Lhomme 3b3a8b396f vlc_fs: always map lseek to _lseeki64 on Windows
We can safely pass int64_t offsets this way.
2023-01-07 22:21:26 +00:00
Steve Lhomme d4b73a5443 sout: use uint64_t for seeking offsets
We don't need to depend on the flimsy off_t. This is in line with the way file
and stream offsets are used in access modules.
2023-01-07 22:21:26 +00:00
Steve Lhomme 36d83f710e vlc_common: don't redefine off_t to a larger type on Windows
That makes our usage of mingw-w64 structures like stat, _stat32, _stat64i32
invalid. Plus calls to functions expecting a smaller type.

If we need a bigger type, we need to use our own.

We already set _FILE_OFFSET_BITS so that off_t can be larger than usual.
2023-01-07 22:21:26 +00:00
Steve Lhomme fe48cc9f73 vlc_common: add missing defines when not compiled with gcc/clang 2023-01-06 14:46:46 +00:00
Steve Lhomme 816af9928d vlc_common: don't use __has_attribute() if it's not defined
That's how it's done in other places.
2023-01-06 14:46:46 +00:00
Steve Lhomme 14c1c439ed vlc_tick: do explicit float to integer conversion 2023-01-06 14:46:46 +00:00
Steve Lhomme e03c404b4d vlc_network: define SHUT_xxx values on Windows if they are missing
They are defined in sys/socket.h on POSIX systems.
2023-01-06 14:46:46 +00:00
Steve Lhomme 6a46f1152d compat: define tfind family of functions regardless of the search.h status
The existence of search.h is not relevant for that. search.h may exist but does
not provide tfind, as on Windows.

If tfind.c is included for compilation, then the code needs to be built.
2023-01-06 14:46:46 +00:00
Steve Lhomme 33dc4d1354 vlc_fixups.h: remove unused structure and enums
We only need to define them if they are used in an API but they are not. The
names are very generic and may collide with some defines, so avoid potential
compilation issues.

Only the VISIT enum is needed by twalk().
2023-01-06 14:46:46 +00:00
Steve Lhomme 7c43bcba27 access/dtv: move the lfind() Windows hack in the module
So that we don't have to include search.h each time vlc_fixups.h is used.

The Win32 prototype of lfind() expects an unsigned* for 'nelp', not a size_t*.
2023-01-06 14:46:46 +00:00
Marvin Scholz d5f07af209 meson: add initial meson build system
Co-authored-by: Tanguy Dubroca <tanguy.dubroca@lse.epita.fr>
Co-authored-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
Co-authored-by: Alexandre Janniaux <ajanni@videolabs.io>
2023-01-04 14:48:39 +00:00
Francois Cartegnie b8cec147d6 vlc_tracer: fix union target member 2022-12-29 16:06:01 +00:00
Yann Lochet 30dd6d4c3e gstdecode: add dummy video context and dummy decoder device 2022-12-20 15:00:25 +00:00
Yann Lochet 5d6ce99259 fourcc: add GStreamer Memory opaque chroma 2022-12-20 15:00:25 +00:00
Thomas Guillem fefe9b6053 lib: add libvlc_audio_set_mixmode 2022-12-10 10:50:09 +00:00
Thomas Guillem 42b645e7fc lib: add libvlc_AudioStereoMode_Mono 2022-12-10 10:50:09 +00:00
Thomas Guillem 73630912ba lib: change libvlc_AudioStereoMode_Error enum value
It didn't correspond to any VLC Core values.
2022-12-10 10:50:09 +00:00
Thomas Guillem 9d23e5b123 lib: rename libvlc_audio_set_channel to libvlc_audio_set_stereomode
And also rename the enum.
2022-12-10 10:50:09 +00:00
Steve Lhomme 92efc84601 libvlc: hardcode the values in libvlc_version.h
So it doesn't need to be generated to be used.

We check the values match the ones in configure.ac during compilation.
2022-12-09 10:01:17 +00:00
Steve Lhomme 3f097706d2 libvlc: add libvlc_media_no_skip flag
for META_REQUEST_OPTION_NO_SKIP
2022-12-07 10:45:26 +00:00
Steve Lhomme e32fee6676 input: add an option to force preparsing
For input items without a know type (imem access for example) preparsing
is not possible. With this option we allow forcing the preparsing in that
case, optionally. By default the current behavior remains the same.
2022-12-07 10:45:26 +00:00
Steve Lhomme bd4b273d07 lib: add a function to the ABI version of the libraries
For users of libvlc with manual DLL loading (especially languages not
compatible with C that have to recode the access to the libvlc DLL) it is
important to know the ABI version of the DLL, in case of API/ABI changes the
wrapper need to be updated and know when the provided DLL package matches or
not. This is especially critical for VLC 4.0 which has not changed version in
4 years and yet the libvlc API keeps changing.

This is similar to the versions of libavcodec/libavformat/etc. When the API is
changed the version values should be updated as well, and hopefully documented
as well.

One should avoid loading the DLL of a mismatching libvlc major ABI version.
Since it's likely to not be usable in the end, it's better not to load it at
all.

This should also be backported to VLC 3.0.
2022-12-07 10:16:46 +00:00
Steve Lhomme cf52315aba vlc_codecs: fix warning with mingw-w64
We don't want the OS/SDK values, even though they might/should be the
same.
2022-12-02 04:58:12 +00:00
Steve Lhomme 7d91489649 vlc_frame: use a const frame in vlc_frame_ChainProperties
We should not modify it in this getter.
2022-11-30 08:15:31 +00:00
Steve Lhomme a89da89042 configure: compute the .so version from the libtool version-info 2022-11-29 07:06:26 +00:00
Steve Lhomme 362d50a968 libvlc: dissociate the libvlc version from the libvlccore/VLC package version
The values should be about libvlc and nothing else.
2022-11-29 07:06:26 +00:00
Steve Lhomme 8c2b60de03 libvlc: always include the libvlc version header from vlc.h
Just like the other libvlc headers.
2022-11-29 07:06:26 +00:00
Steve Lhomme 007e5d910c codec/packtizer: rename p_fmt_in to fmt_in
We don't need to know it's a pointer and can save 2 characters.

No functional changes. This is simply renaming "dec->p_fmt_in",
"decoder->p_fmt_in", "dec.p_fmt_in" and "packetizer->p_fmt_in"
2022-11-16 17:42:04 +00:00
Steve Lhomme 08b24866dc codec/packetizer: make the writable input format private
The writable fmt_in is kept in the decoder/packetizer owner.

The decoder/packetizer only has access to a const version.
2022-11-16 17:42:04 +00:00
Steve Lhomme 3bbe3ffe45 codec/packetizer: use read-only input format wherever possible
It's renaming :
"dec->fmt_in.", "dec.fmt_in.", "decoder->fmt_in.", "&dec->fmt_in",
"&p_dec->fmt_in" (except in decoder_Init), "&p_dec->fmt_in->",
"&decoder->fmt_in", "&p_dec->fmt_in,", "= p_dec->fmt_in;",
"&id->p_decoder->fmt_in" and "p_sys->p_decoder->fmt_in"
2022-11-16 17:42:04 +00:00
Steve Lhomme e652fc2b4f codec/packetizer: expose a read-only version of the input format
All code creating a decoder uses decoder_Init().
Packetizer creation needs to be taken care of as well.
2022-11-16 17:42:04 +00:00
Francois Cartegnie 3b379d7a5b block: remove BLOCK_FLAG_CLOCK
was used by removed udp output module to mimic PCR
2022-11-11 10:02:46 +00:00
Alexandre Janniaux 2345ecc7ac video_output: remove vout_GetPicture
The function was only used by the two last visualization modules, but is
now unused and unfit to the purpose of push model. Pools should be
created locally instead of from the video output.

Removing the function allows simplifying the video output.
2022-11-04 13:27:07 +00:00
KO Myung-Hun 3431ed42f8 vlc_fixups: define INET6_ADDRSTRLEN on OS/2
This fixes a compilation error on OS/2:

-----
  CC       stream_out/udp.lo
stream_out/udp.c: In function 'CreateSDP':
stream_out/udp.c:89:16: error: 'INET6_ADDRSTRLEN' undeclared (first use in this function); did you mean 'INET_ADDRSTRLEN'?
   89 |     char dhost[INET6_ADDRSTRLEN];
      |                ^~~~~~~~~~~~~~~~
      |                INET_ADDRSTRLEN
stream_out/udp.c:89:16: note: each undeclared identifier is reported only once for each function it appears in
stream_out/udp.c:89:10: warning: unused variable 'dhost' [-Wunused-variable]
   89 |     char dhost[INET6_ADDRSTRLEN];
      |          ^~~~~
-----
2022-11-04 12:09:41 +00:00
Niklas Haas 7aed2376e3 vlc_es: add DoVi config record to video_format_t
This was missing from the current implementation of DoVi, which only
forwarded the per-frame RPUs. This is, however, insufficient for all
consumers of this metadata - some will need to decide whether DoVi
reshaping is required or not up-front, at init time. To do this cleanly
we need access to the stream-wide DoVi configuration record.
2022-10-23 11:18:31 +00:00
Romain Vimont c808e3e895 media tree: make functions public
This will allow to create and handle a media tree separately from a
media source (linked to a service discovery).
2022-10-11 11:04:00 +00:00
Romain Vimont 98d7763c81 vlc_shared_data_ptr: accept implicit ctor for null
The main constructor, accepting a pointer, is explicit:

    my_ptr_type *p = ...;
    MySharedPtr ptr = p;   /* invalid */
    MySharedPtr ptr{ p };  /* ok */

This prevents to mistakenly assign a pointer to a shared pointer.

However, assignment to nullptr should be acceptable:

    MySharedPtr ptr = nullptr;  /* should be ok */
2022-10-01 04:29:53 +00:00
Marvin Scholz 388cb0b646 input: update capabilities on end and error
When the input is stopped or an error occurred, the capabilities
should reflect that, so that on_capabilities_changed is invoked
as expected.

Fix #27047
2022-09-17 07:25:44 +00:00
Francois Cartegnie 5b1a0562d0 vlc_picture: fix visible_pitch ambiguous label 2022-09-15 13:50:26 +00:00
Alexandre Janniaux 889548beb2 picture_pool: remove picture_pool_Cancel
There is no usage for picture_pool_Cancel anymore. The pool cancellation
was a mechanism for asynchronous signalling within decoders that the
decoder was being flushed and that waiting on picture could be
cancelled. Since it was a concern for decoders, it was moved to the
decoder handling code by ensuring the decoder has enough picture to
finish decoding and reach the pf_flush function.
2022-09-12 06:13:46 +00:00
Alexandre Janniaux 322ea200ac vlc_frame: add vlc_fifo_Held/Assert
vlc_fifo_t are coming with their own lock which is exposed on the public
interface, so provide sanitization state check functions like those
available for vlc_mutex_t.
2022-09-12 06:13:46 +00:00
Rémi Denis-Courmont bdf0ec7b51 vlc_waitpid: fix the documentation
It is currently unspecified what happens if the process does not exit
cleanly, so clarify that. Since this can actually happen, the
documentation ought to state what the result is to some extent.
2022-09-06 09:51:01 +00:00
Francois Cartegnie c5600df311 vlc_events: add event type count define 2022-08-31 18:40:51 +00:00
Steve Lhomme af21f6a728 config: use libvlc_int_t directly
There's no other object that can handle the configuration loading/saving.

We don't need to inherit the options, they can only be in the libvlc_int_t
object. var_GetNonEmptyString() is equivalent to var_InheritString() in that
case.
2022-08-22 05:03:46 +00:00
Steve Lhomme ebfd515a68 vlc_tick: remove outdated comment 2022-08-17 04:26:22 +00:00
Steve Lhomme bd8c5cb9d6 vlc_tick: remove deprecated and unused mtime_t 2022-08-17 04:26:22 +00:00
Martin Finkel 89dbd92813 lib/media_player: add record method
Co-Authored-by: Thomas Guillem <thomas@gllm.fr>
2022-08-13 08:45:38 +00:00
Thomas Guillem 1c5d29d1f7 player: add a dir_path to vlc_player_SetRecordingEnabled 2022-08-13 08:45:38 +00:00
Thomas Guillem a76000e590 input: pass dir_path to DEMUX/STREAM SET_RECORD_STATE
If NULL, it continue to use default directories or the
"input-record-path" variable.
2022-08-13 08:45:38 +00:00
Thomas Guillem 95cbcf0e59 lib/media_player: fix time type/unit used by the timer API
My bad, libvlc_time_t is in ms. The timer API should use the sane unit
than libvlc_clock(), that is us in int64_t.

Also add missing vlc_tick_t <-> us conversion (no harm since 1 tick = 1
us for now).
2022-08-12 13:01:24 +00:00
Thomas Guillem 52cda8377e lib/media_player: add the vlc_player Timer API
Any LibVLC users could request a timer from the player. This Media Player
timer has its own event API since:

 - It is only used to receive time update points:

 - The timer is not locked by the player lock. Indeed the player lock can be
   too "slow" (it can be recursive, it is used by the playlist, and is it held
   when sending all events). So it's not a good idea to hold this lock for
   every frame/sample updates.

 - The minimum delay between each updates can be configured: it avoids to flood
   the UI when playing a media file with very high fps or very low audio sample
   size.

The libvlc_media_player_time_point struct is used by timer update
callbacks. This public struct hold all the informations to interpolate a
time at a given date. It can be done with the
libvlc_media_player_time_point_interpolate() helper. That way, it is
now possible to get the last player time without holding any locks.

There is only one type of timer (for now):

libvlc_media_player_watch_time(): update are sent only when a frame or a
sample is outputted. Users of this timer should take into account that
the delay between each updates is not regular and can be up to 1seconds
(depending of the input). In that case, they should use their own timer
(from their mainloop) and use
libvlc_media_player_time_point_interpolate() to get the last time.
2022-08-10 10:52:27 +00:00
Thomas Guillem 302cb84486 lib/media_player: use double for set_position 2022-08-09 10:02:57 +00:00
Denis Charmet c49d643801 threads: add vlc_queuedmutex_held() 2022-08-08 20:36:51 +02:00
Rémi Denis-Courmont 943ba82743 threads: add queued mutex objects 2022-08-08 20:36:51 +02:00
Niklas Haas 354f3aae4d vout: display: window: add ICC profile glue
The window backend triggers a callback of the vout, and the vout
forwards this to the display using another callback. There are several
unfortunate layers of glue and indirections in the callchain. In
particular, we need to persist these ICC profile objects in some layer,
because of init order between windowing system and the window / vout
display module itself. I've chosen to add them to `vout_display_cfg_t`
because it fits well with the other "dynamic window state" properties in
there.

This approach also allows capable vouts to read directly from the
allocated ICC profile memory, minimizing the number of memcpys.
2022-08-07 11:58:21 +00:00
Thomas Guillem da687b726a lib/media_player: use double for the position 2022-08-06 14:39:45 +00:00
Thomas Guillem d5e785b062 lib/media: use double for the position 2022-08-06 14:39:45 +00:00
Thomas Guillem 8c4cee0293 thumbnailer: use double for the position 2022-08-06 14:39:45 +00:00
Thomas Guillem 92450571e1 media_library: use double for the position 2022-08-06 14:39:45 +00:00
Thomas Guillem c0de748a3b player: use double for the position 2022-08-06 14:39:45 +00:00
Steve Lhomme d57b9a4c0c vlc_fs: make the internal vlc_DIR type private on Windows 2022-08-03 11:44:10 +00:00
Steve Lhomme b95df4e1fe vlc_fs: export vlc_closedir/vlc_rewinddir
So it matches the other exports
2022-08-03 11:44:10 +00:00
Steve Lhomme 15b65c6082 win32: filesystem: use the native Win32 API to list folder contents
The API is available on UWP builds and doesn't rely on dirent which may not be
compiled as UNICODE in mingw-w64.

The call to FindFirstFileExW already gets the first entry so we are always
ahead of one entry.
2022-08-03 11:44:10 +00:00
Steve Lhomme 4862e4195c vlc_fs: always use a custom type for our opendir API's
This will avoid some dirty casts between DIR and vlc_DIR on Windows.

The Windows handling could be done entirely without dirent.h which is not a
standard Windows API.
2022-08-03 11:44:10 +00:00
Steve Lhomme 92240d23be vlc_fs: move up vlc_DIR declaration
No functional changes.
2022-08-03 11:44:10 +00:00
Steve Lhomme 30375359b6 vlc_fs: add vlc_closedir/vlc_rewinddir for all platforms
To have a cleaner balance between the directory API calls.
2022-08-03 11:44:10 +00:00
Thomas Guillem d5e1dd706c vlc_fixups: don't declare swab() on Android NDK25
Fix build on Android NDK25, where swab() is a static inline function
defined in <unistd.h>.
2022-08-03 07:18:28 +00:00
Aymeric Guillien fc9a43be3e medialibrary: add filename field on media 2022-07-30 17:27:58 +00:00
Thomas Guillem 7949712a30 libvlc: add bool selected in libvlc_media_player_get_tracklist
Asked by API users, more convenient than dropping !selected tracks
ourself.
2022-07-27 08:19:21 +00:00
Alexandre Janniaux 94386bab75 vlc_fixups: fix ssize_t not being defined
When compiling and not having writev/readv, the following error happens:

    make[2]: Entering directory '/home/janniaux/Projects/videolabs/vlc/build-tsan/compat'
      CC       strlcpy.lo
      CC       strnstr.lo
    In file included from ../config.h:952,
                     from ../../compat/strnstr.c:22:
    ../../include/vlc_fixups.h:232:1: error: unknown type name ‘ssize_t’; did you mean ‘size_t’?
      232 | ssize_t readv(int, const struct iovec *, int);
          | ^~~~~~~
          | size_t
    In file included from ../config.h:952,
                     from ../../compat/strlcpy.c:22:
    ../../include/vlc_fixups.h:232:1: error: unknown type name ‘ssize_t’; did you mean ‘size_t’?
      232 | ssize_t readv(int, const struct iovec *, int);
          | ^~~~~~~
          | size_t
    ../../include/vlc_fixups.h:237:1: error: unknown type name ‘ssize_t’; did you mean ‘size_t’?
      237 | ssize_t writev(int, const struct iovec *, int);
          | ^~~~~~~
          | size_t
    ../../include/vlc_fixups.h:237:1: error: unknown type name ‘ssize_t’; did you mean ‘size_t’?
      237 | ssize_t writev(int, const struct iovec *, int);
          | ^~~~~~~
          | size_t
    make[2]: *** [Makefile:1531: strnstr.lo] Error 1
2022-07-27 07:55:53 +00:00
Benjamin Arnaud 514aa4afba vlc_playlist: Add FILE_SIZE and FILE_MODIFIED sort keys 2022-07-16 14:30:00 +00:00
Benjamin Arnaud a779726a3c vlc_input_item: Create the 'input_item_GetInfoLocked' function 2022-07-16 14:30:00 +00:00
Steve Lhomme 6642dc1c10 vlc_fixup: don't define the proper lfind for win64
win64 has its own version of lfind() but assumes the 3rd parameter is an
unsigned.

This commit matches the #ifdef _WIN64 below this code which uses the Windows
version with the unsigned limit. The comment is copied from there as well.
2022-07-15 13:12:28 +00:00
Steve Lhomme 456bed4a68 vlc_aout: don't return void in public header
Some compilers don't like that.
2022-07-09 22:24:49 +00:00
Benjamin Arnaud f2bfb770b3 qt/medialibrary: Add the 'vlc_ml_media_set_played' function 2022-07-09 22:02:11 +00:00
Alaric Senat b405dc1ed0 sout: add SetPCR API wrapper 2022-07-07 20:18:50 +00:00
Alaric Senat 240cf3cab0 sout: add `set_pcr` callback
This is the first step for the `SetPCR` implementation in stream output.
These callbacks will allow stream outputs to have precise information
about the stream time advancement.

This patchset only provides the basis for now, a correct implementation
for all stream filters will come in a separate merge request.

Refs #27050

Co-authored-by: Alexandre Janniaux <ajanni@videolabs.io>
2022-07-07 20:18:50 +00:00
Rémi Denis-Courmont a29ba2f99a compat: add writev() replacement 2022-07-03 17:31:24 +00:00
Rémi Denis-Courmont 488162f210 compat: add readv() replacement 2022-07-03 17:31:24 +00:00
Thomas Guillem 08cd94d484 aout: add a reworked timing_report event
This partially reverts commit 02293b1df3.

Don't update the audio clock from this event but store the points in a
circular buffer. The play function will update the clock according to
these points.

Refs #27023
2022-06-29 08:43:09 +00:00
Thomas Guillem c37efd7545 aout: remove (now) unused aout_TimeGetDefault
Refs #27023
2022-06-29 08:43:09 +00:00
Thomas Guillem 049885a232 aout: dec: don't require a valid time_get cb
Refs #27023
2022-06-29 08:43:09 +00:00
Thomas Guillem 53d8690a7f aout: move/hide aout_TimeGet implementation
Refs #27023
2022-06-29 08:43:09 +00:00
Steve Lhomme c3c2d535cc vlc_stream: fix the vlc_stream_ReadPartial() documentation
vlc_stream_ReadPartial() is similar to pf_read of stream_t. It is often used
as such in pf_read callbacks.

vlc_stream_Read() uses it that way as well. On negative return values (-1)
it continues reading.

Internally it's calling vlc_stream_ReadRaw() which also returns pf_read return
values verbatim.
2022-06-24 08:58:46 +00:00
Steve Lhomme be790d9dc8 vlc_messages: fix documentation referencing vlc_msg_SetCallback()
It's actually vlc_LogSet()
2022-06-23 17:08:30 +00:00
Rémi Denis-Courmont dd3a55dfc9 lib: remove useless libvlc_media_new_as_node() parameter 2022-06-18 19:10:34 +00:00
Rémi Denis-Courmont 1943b38100 lib: remove useless libvlc_media_new_callbacks() parameter 2022-06-18 19:10:34 +00:00
Rémi Denis-Courmont cd72cc377b lib: remove useless libvlc_media_new_fd() parameter 2022-06-18 19:10:34 +00:00
Rémi Denis-Courmont b18a675901 lib: remove useless libvlc_media_new_path() parameter 2022-06-18 19:10:34 +00:00
Rémi Denis-Courmont 5aec19d53f lib: remove useless libvlc_media_new_location() parameter 2022-06-18 19:10:34 +00:00
Rémi Denis-Courmont d607bf767f lib/media_player: pass instance when creating from media
The caller ought to be able to select which instance the player should
be instantiated from.
2022-06-18 19:10:34 +00:00
Rémi Denis-Courmont 1e13c0c7b0 lib/media: pass explicit instance to save meta
The caller may want to use a different instance than that which the
media was created from.
2022-06-18 17:34:41 +00:00
Rémi Denis-Courmont e573659479 lib/media: distinguish pending and initial parse status
Note that this shifts all the values by one, but binary compatibility is
already broken anyway.
2022-06-17 15:31:35 +00:00
Rémi Denis-Courmont e7b9687f0e lib/media: name the initial parse status
No functional change.
2022-06-17 15:31:35 +00:00
Rémi Denis-Courmont 7dd8a75347 lib/media: remove (last) deprecated functions
This remove the old API for preparsed tracks.
2022-06-17 15:31:35 +00:00
Rémi Denis-Courmont d6d17eab30 lib/media: remove deprecated libvlc_media_is_parsed() 2022-06-17 15:31:35 +00:00
Rémi Denis-Courmont 13c9e59e12 lib/media: rename libvlc_media_parse_with_options()
The prototype has changed anyhow, and the variants without options no
longer exist.
2022-06-17 15:31:35 +00:00
Rémi Denis-Courmont 12e01a2dcb lib/media: pass explicit instance for parsing 2022-06-17 15:31:35 +00:00
Rémi Denis-Courmont a6d45a4781 lib/media: remove some deprecated functions 2022-06-17 15:31:35 +00:00
Rémi Denis-Courmont cd05f2ff55 lib/media: pass explicit instance to generate thumbnail 2022-06-17 10:30:35 +00:00
Hugo Beauzée-Luyssen 452c0aeb77 medialibrary: folder: Add nb_audio/nb_video counters
Refs #27054
2022-06-09 13:58:07 +02:00
Rémi Denis-Courmont 601d48aaf9 input: add a flag for main title
Fixes #19429.
2022-06-08 07:11:06 +00:00
Rémi Denis-Courmont e5cbfe6831 fourcc: define ABGR 2022-06-06 17:43:23 +00:00
Rémi Denis-Courmont 5696bc01b4 fourcc: clarify RGB(A) (non-HDR) formats 2022-06-06 17:43:23 +00:00
Thomas Guillem 9edef14aa2 keystore: change vlc_credential_get return type
No functional changes.

Refs #27027
2022-06-04 06:38:18 +00:00
Niklas Haas 77bf795c0d core: add missing include to vlc_ancillary.h
This refernces uint32_t without include, breaking this header if
included before others.
2022-06-03 11:11:46 +00:00
Niklas Haas ea89d080ad vlc_es: add ICC profile struct
We store the ICC profile as part of the (ancillary) data allocation,
using a trailing unsized array. This is because we need to copy it in
and out of various libraries anyway, to avoid having to expose things
like AVBufferRef.

The (as of writing) current ICC specification can be found at
https://www.color.org/specification/ICC.1-2022-05.pdf
2022-06-03 11:11:46 +00:00
Alexandre Janniaux c0b2f318ce vlc_opengl: document vlc_gl_GetProcAddress
Document that the function must be called with a context enabled. Even
if most low-level implementation will allow getting an address without
a context, so as to keep the same symbol across contexts, some other
common implementations like glfw[^1] will require an active context.

[^1]: https://www.glfw.org/docs/3.3/group__context.html#ga35f1837e6f666781842483937612f163
2022-06-03 10:58:55 +00:00
Rémi Denis-Courmont 2d7478e196 threads: add the latch synchronisation object
The semantics and names mimick the C/C++2X latch. Latches are a
generalisation of barriers, whence counting down and waiting are
(or rather, can be) done separately.

Note that the C2X uses ptrdiff_t but with does not define negative
values. This uses size_t instead, not squandering the sign bit.
2022-05-30 07:09:00 +00:00
Rémi Denis-Courmont 98102a6b5c charset: add vlc_sscanf_c() and vlc_vsscanf_c() 2022-05-29 19:27:01 +00:00
Rémi Denis-Courmont 412fc33c50 display: allow owner to set the fitting mode
(rather than just the fill flag)
2022-05-29 11:12:33 +00:00
Rémi Denis-Courmont 8e13708a85 display: add fitting modes
So far the video can only be fit within the window. This adds other
modes for fitting to the larger dimension, only to the width or only to
the height. These new modes in effect compute the scale/zoom
differently, potentially causing the video to be cropped.
2022-05-29 11:12:33 +00:00
Rémi Denis-Courmont aadbaeb440 vdpau: merge all video surface formats
This approach does not scale up very well to various bit depths.
2022-05-29 09:52:58 +00:00
Rémi Denis-Courmont 448a6ba69c vdpau/avcodec: track chroma type in context
This stores the VDPAU video surface chroma type within the
corresponding VLC video context. This will be used in the following
changes.
2022-05-29 09:52:58 +00:00
Rémi Denis-Courmont 91646be8e1 charset: rename us_* to vlc_*_c()
This matches the naming convention of vlc_strerror_c(), and avoids
clobbering the global namespace.
2022-05-27 20:22:32 +00:00
Rémi Denis-Courmont 9791d0cd3e charset: inline trivial us_atof() 2022-05-27 20:22:32 +00:00
Rémi Denis-Courmont eb2e8a1ad5 charset: improve Doxygen 2022-05-27 20:22:32 +00:00
Alexandre Janniaux 5957966133 vlc_threads: fix thread name length warning
The warning was always triggered because __builtin_constant_p actually
checks whether the tested value is constant at compile time and strlen()
was never constant at compile time.

Note that __builtin_constant_p can be used with a non-constant test
expression while using the same expression after ? in a ternary
condition.
2022-05-24 11:21:50 +00:00
Alexandre Janniaux bd8f233b0c vlc_fixup: fix usage of typeof from C++
Replace typeof by a decltype()-based equivalent on compilers not
supporting typeof.

Decltype is not equivalent to typeof, but we are mostly concerned about
removing references from the type, since it has no use in C code like
VLC list.

Note that this fixup is there to fix the usage of headers using typeof
in C++ code, not to provide "typeof" directly C++ to replace decltype.
2022-05-21 15:17:00 +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 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 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
Steve Lhomme b54048c100 demux: pass a vlc_object_t to create a custom packetizer 2022-05-18 10:14:50 +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 48a90e9968 display: update vout_display_TranslateCoordiantes() prototype
Take only a struct vout_display_size rather than a full
struct vout_display_cfg_t. No functional changes.
2022-05-17 19:14:06 +00:00
Rémi Denis-Courmont c58018e41f display: update vout_display_PlacePicture() prototype
Take only a struct vout_display_size rather than a full
struct vout_display_cfg_t. No functional changes.
2022-05-17 19:14:06 +00:00
Rémi Denis-Courmont cdc53878de display: update vout_display_GetDefaultDisplaySize() prototype
Take only a struct vout_display_size rather than a full
struct vout_display_cfg_t. No functional changes.
2022-05-17 19:14:06 +00:00
Rémi Denis-Courmont cc4456fd06 vout: gather video placement properties
This puts all the video size and placement properties back together as
vout_display_cfg_t originally was before other parameters were added.

No functional changes.
2022-05-17 19:14:06 +00:00
Rémi Denis-Courmont 6fc884461f display: typedef vout_display_cfg_t::display
No functional changes.
2022-05-17 19:14:06 +00:00
Rémi Denis-Courmont 4bd922622b window: rename <vlc_vout_window.h> to <vlc_window.h> 2022-05-16 16:51:03 +00:00
Rémi Denis-Courmont 84c253cdd1 window: rename vout_window* to vlc_window*
The baseline windowing code has not been specific to the video output
for a while.
2022-05-16 16:51:03 +00:00
Felix Paul Kühne db6b36b6b1 Add 'amrec' file extension
This is a synonym for .ts used by certain video camera systems.
2022-05-14 09:11:05 +00:00