[vlc-devel] [PATCHv3 00/17] libvlc: new track list and new track selection

Thomas Guillem thomas at gllm.fr
Wed Jun 10 14:57:39 CEST 2020


The full branch is available here: https://code.videolan.org/tguillem/vlc/commits/libvlc-tracks/6

Change since v2

 - libvlc_media_tracklist_at() doesn't return a const media anymore. The media
   need to be writable by the user so that he can update the selected state
   (via libvlc_media_player_update_tracklist()).
 - Improved lib_media_player tests
 - Added lib_media_player tracks API test

There is a problem with libvlc_media_tracklist_at() not returning const. The
user might want to use libvlc_media_track_release() on a single track coming
from the list (when he should use libvlc_media_tracklist_release()). The API &
documentation says that it's illegal, but I'm not sure if it is enough. I could
add assert/abort or change the way to update the track selection. What do you
think ?

The old track API will be removed later (but before 4.0 release), when all
major VLC ports are updated. Cf.
https://code.videolan.org/tguillem/vlc/commits/libvlc-tracks-remove-deprecated
for the branch without the old track API.

Best regards,
Thomas Guillem (17):
  lib: media: factorize track type conversion
  lib: move libvlc_media_track_t to a specific header
  lib: move track in media_track.c
  lib: add libvlc_media_tracklist API
  lib: add libvlc_media_get_tracklist()
  lib: media_track: add new members
  lib: add libvlc_media_track_release
  core: fix vlc_es_id_IsStrIdStable not exposed
  lib: add new player track API
  lib: update media_player track events
  test: media: use libvlc_media_get_tracklist
  lib: video: use libvlc_media_player_get_selected_track()
  test: media_player: use "mock://"
  lib: media_player: fix wrong assert
  test: lib: media_player: pause can now be always tested
  test: lib: media_player: add event_ctx
  test: lib: media_player: test track API

 include/vlc/libvlc_events.h       |  23 +-
 include/vlc/libvlc_media.h        | 129 +++--------
 include/vlc/libvlc_media_player.h | 138 ++++++++++++
 include/vlc/libvlc_media_track.h  | 220 ++++++++++++++++++
 lib/Makefile.am                   |   2 +
 lib/libvlc.sym                    |  11 +
 lib/media.c                       | 113 ++--------
 lib/media_internal.h              |  58 +++++
 lib/media_player.c                | 193 ++++++++++++++--
 lib/media_player_internal.h       |   1 +
 lib/media_track.c                 | 264 ++++++++++++++++++++++
 lib/video.c                       |  22 +-
 src/libvlccore.sym                |   1 +
 test/libvlc/media.c               |  31 ++-
 test/libvlc/media_list_player.c   |  20 +-
 test/libvlc/media_player.c        | 362 ++++++++++++++++++++++++++++--
 test/libvlc/test.h                |   5 +-
 17 files changed, 1328 insertions(+), 265 deletions(-)
 create mode 100644 include/vlc/libvlc_media_track.h
 create mode 100644 lib/media_track.c

-- 
2.20.1



More information about the vlc-devel mailing list