1
mirror of https://code.videolan.org/videolan/vlc synced 2024-07-25 09:41:30 +02:00
Commit Graph

688 Commits

Author SHA1 Message Date
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
03e671c51c lib: assert that LibVLC and VLC enums match 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
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
32160df718 win32: set the proper libvlc version in the DLL 2022-12-07 08:33:39 +00:00
Steve Lhomme
5157650a45 win32: move libvlc_win32_rc in the lib folder 2022-12-07 08:33:39 +00:00
Steve Lhomme
ebe945df9e lib: use libtool -version-number instead of -version-info
This allows using more common major/minor/micro values.
2022-11-29 07:06:26 +00:00
Steve Lhomme
d111a29aeb configure: add global build values for the libtool version-info
See https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
2022-11-29 07:06:26 +00:00
Steve Lhomme
b20b959658 libvlc_internal: do the half up millisecond rounding with vlc_tick macros
Don't assume any CLOCK_FREQ value.
2022-08-17 04:26:22 +00:00
Steve Lhomme
aa70adf479 libvlc: rename outdated mtime functions to vlc_tick ones 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
Steve Lhomme
d0c11c8154 lib: media: use the proper libvlc_media_get_duration return type 2022-08-12 13:43:35 +00:00
Steve Lhomme
46095bf660 lib: media: use proper functions to convert vlc_tick_t to/from libvlc_time_t 2022-08-12 13:43:35 +00:00
Steve Lhomme
08cac94bf0 lib: picture: use from_mtime() to convert vlc_tick_t to libvlc_time_t 2022-08-12 13:43:35 +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
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
c0de748a3b player: use double for the position 2022-08-06 14:39:45 +00:00
Thomas Guillem
e40112f175 lib/media_player: fix invalid title index
A i_chapters_of_title of -1 mean the current title, so fetch it in that
case.

It fixes a crash while attempting to reach the title array at -1.
2022-07-31 15:00:10 +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
Thomas Guillem
db81e6e148 libvlc: media_player: add a param to get selected tracks 2022-07-27 08:19:21 +00:00
Steve Lhomme
119e63275a lib: media_discoverer: don't cast to vlc_object_t* 2022-06-29 07:44:52 +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
9a887cbd49 lib/media: remove unused argument 2022-06-18 19:10:34 +00:00
Rémi Denis-Courmont
2f91254d19 lib/media: remove instance from media
As discussed on vlc-devel a few years back, it is desirable, if not
sometimes necessary, for media objects to be independent from any given
instance.

A typical reason would be to preparse media in one instance but play
them in another.
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
699fb5357f lib/media: remove the parsed lock 2022-06-17 15:31:35 +00:00
Rémi Denis-Courmont
02fe78a40f lib/media: make parsed status atomic 2022-06-17 15:31:35 +00:00
Rémi Denis-Courmont
15009fbbfc lib/media: remove has_asked_parse
This can now be determined unambiguously from the parsed status.
2022-06-17 15:31:35 +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
6e78605325 lib/media: deindent
No functional changes.
2022-06-17 15:31:35 +00:00
Rémi Denis-Courmont
d902907a64 lib/media_track: privatise one function 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
730279b88a lib/media: remove write-only is_parsed 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
f203272408 lib/media: remove gratuitous parse request cancellation
Media parsing can occur on any instance, and in all likelihood, a freed
media is not being parsed by any instance.

Note: to cancel parsing, libvlc_media_parse_stop() can be used.
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