Commits on Source (9)
-
The vlc_meta_t struct now uses an array of struct vlc_meta_value objects to store metadata values along with their associated priorities (VLC_META_PRIORITY_BASIC, VLC_META_PRIORITY_PLAYLIST, VLC_META_PRIORITY_INBAND). Modified the vlc_meta_Merge function to support priority-based metadata merging. Metadata values and extra tags in the destination (dst) are only overwritten by source (src) values if the source's priority is greater than or equal to the destination's priority. Refs #4143
cb4c8128 -
Rename `vlc_meta_Set` to `vlc_meta_SetWithPriority` and `vlc_meta_SetExtra` to `vlc_meta_SetExtraWithPriority`. These functions now accept an additional `priority` argument to set the metadata priority for a given key. Add two macros, `vlc_meta_Set` and `vlc_meta_SetExtra`, which call their respective functions with `VLC_META_PRIORITY_BASIC` as the default priority. Refs #4143
118925e3 -
In TRY_META macro, replace input_item_Set##b() with vlc_meta_SetWithPriority(). Rename the TrackNum field to TrackNumber and ArtURL to ArtworkURL for consistency with the vlc_meta_type_t enumeration. Refs #4143
fd442e5a -
Add function `file_is_playlist` to parse the `trusted` property of a file. This function will be used to upgrade the metadata priority from `VLC_META_PRIORITY_BASIC` to `VLC_META_PRIORITY_PLAYLIST` for files marked as trusted. Set the `trusted` property of CUE files as they require playlist metadata priority. Refs #4143
192ae78b -
Check for value of parsed `trusted` property. If the trusted property is true, the metadata priority is elevated to VLC_META_PRIORITY_PLAYLIST. If trusted is false, the metadata priority defaults to VLC_META_PRIORITY_BASIC. Refs #4143
a4c26155 -
This commit splits the StartTitle function and introduces the SetStopStart function, which is responsible for assigning the 'start-time' and 'stop-time' values of the track to the `priv->i_start` and `priv->i_stop` variables. Refs #4143
015a65ac -
Move the SetStopStart function to ensure it is called for all input threads, especially during preparsing. It ensures that the correct timings are used before the duration of the input_item_t is set. Previously, 'start-time' and 'stop-time' values were not parsed during preparation, leading to priv->i_start and priv->i_stop defaulting to 0. Refs #4143
1adfce74 -
Add input_SetItemDuration wrapper function to use the 'start-time' and 'stop-time' values to calculate the track duration. Refs #4143
c86e464f -
Fixes #4143 In a `vlc_meta_t` object, each metadata key is associated with a priority: VLC_META_PRIORITY_BASIC, VLC_META_PRIORITY_PLAYLIST, or VLC_META_PRIORITY_INBAND. During metadata merging, keys with higher or equal priority can override those with lower priority. When parsing playlist metadata from a CUE file, keys are now assigned a priority of VLC_META_PRIORITY_PLAYLIST. This change prevents subsequent audio files, which have VLC_META_PRIORITY_BASIC, from overriding the playlist metadata. Additionally, this commit ensures that the duration of individual tracks is calculated using the 'start-time' and 'stop-time' options. This prevents the total track duration from overriding the individual track durations in the playlist.
bf5b6d59
Showing
- include/vlc_meta.h 13 additions, 2 deletionsinclude/vlc_meta.h
- modules/lua/vlc.c 25 additions, 4 deletionsmodules/lua/vlc.c
- share/lua/playlist/cue.lua 1 addition, 0 deletionsshare/lua/playlist/cue.lua
- src/input/input.c 19 additions, 0 deletionssrc/input/input.c
- src/input/input_internal.h 11 additions, 0 deletionssrc/input/input_internal.h
- src/input/meta.c 61 additions, 20 deletionssrc/input/meta.c
- src/input/parse.c 1 addition, 1 deletionsrc/input/parse.c
- src/libvlccore.sym 2 additions, 2 deletionssrc/libvlccore.sym
- src/player/input.c 1 addition, 1 deletionsrc/player/input.c