[vlc-devel] [RFC PATCHv2 00/18] ES track id rework

Thomas Guillem thomas at gllm.fr
Tue Feb 18 17:11:13 CET 2020


Hello,

this patch set supersede my previous set: "[RFC PATCH 0/9] Fixing ES id and
group collision"

Change since my last set:

 - Reworked the "input: pass a specific es_out for each slaves" commit: added
   more comments and moved the new code to a new function for code readability.
   Added a quite dumb approach to fix source_id collision. I'm open to any
   suggestions.

 - Reworked the "es_out: add vlc_es_id_GetStrId()" commit: added
   vlc_es_id_IsStrIdStable(), that will tell if the track id is stable (ie.
   possible to save it in a db). Note: A ES string id is expected to be unique
   for one playback instance, a stable ES string id is expected to be the same
   accross several playback instances.

 - Modified a lot of demuxers to send stables IDs.

 - Removed the commit that ensure that a demuxer is always sending automatic or
   specific ids. Indeed, some demuxers will now send specific and auto ids, cf.
   "demux: avi: use stable ids". There won't be any id collision since "auto/"
   will be added to the ES string identifier.

 - The ES string id is now used by "video-track", "audio-track" and "sub-track"
   variable.

 - Removed the "video-track-id, "audio-track-id" and "sub-track-id" handling

Here are some example of possible tracks ids:

mkv with external srt:
video/1
audio/2
audio/3
sub/4
sub/5
my_video.srt/sub/0

demuxer using auto ids with external srt:
video/auto/0
audio/auto/1
audio/auto/2
sub/auto/3
sub/auto/4
my_video.srt/sub/0

decoders using close captions:
video/0
audio/1
video/0/sub/0

Thomas Guillem (18):
  es_out: add es_out_ctx_t
  es_out: also pass ctx from controls
  input: change InputDemuxNew arguments
  input: pass a specific es_out for each slaves
  es_out: fix group_id and i_id collision
  es_out: add vlc_es_id_GetStrId()
  es_out: replace the meta_id by the str_id
  es_out: add sticky programs handling
  input: remove noslave_exts hack
  demux: use a stable id for one-track modules
  demux: mkv: use stable ids
  demux: mp4: use stable ids
  demux: vobsub: use stable id
  demux: avi: use stable ids
  demux: avformat: use stable ids
  demux: ogg: use stable ids
  es_out: use string id for "cat-track" options
  es_out: deprecate "cat-track-id" options

 include/vlc_es.h                              |  29 ++
 include/vlc_es_out.h                          |  10 +-
 modules/access/bluray.c                       |   6 +-
 modules/demux/adaptive/plumbing/FakeESOut.cpp |   8 +-
 modules/demux/aiff.c                          |   1 +
 modules/demux/au.c                            |   1 +
 modules/demux/avformat/demux.c                |   1 +
 modules/demux/avi/avi.c                       |   1 +
 modules/demux/caf.c                           |   1 +
 modules/demux/cdg.c                           |   1 +
 modules/demux/flac.c                          |   1 +
 modules/demux/mjpeg.c                         |   1 +
 modules/demux/mkv/matroska_segment.cpp        |   1 +
 modules/demux/mp4/mp4.c                       |   2 +
 modules/demux/mpc.c                           |   1 +
 modules/demux/mpeg/es.c                       |   1 +
 modules/demux/mpeg/h26x.c                     |   1 +
 modules/demux/nuv.c                           |   3 +
 modules/demux/ogg.c                           |  15 +-
 modules/demux/rawaud.c                        |   1 +
 modules/demux/smf.c                           |   1 +
 modules/demux/stl.c                           |   1 +
 modules/demux/subtitle.c                      |   1 +
 modules/demux/timestamps_filter.h             |   3 +-
 modules/demux/ttml.c                          |   1 +
 modules/demux/vc1.c                           |   1 +
 modules/demux/vobsub.c                        |   1 +
 modules/demux/wav.c                           |   1 +
 modules/demux/webvtt.c                        |   1 +
 src/Makefile.am                               |   1 +
 src/input/es_out.c                            | 346 +++++++++++++-----
 src/input/es_out.h                            |  11 +
 src/input/es_out_ctx.c                        | 160 ++++++++
 src/input/es_out_timeshift.c                  | 185 ++++++----
 src/input/input.c                             |  73 +++-
 src/input/input_internal.h                    |   2 +
 src/input/subtitles.c                         |  16 -
 src/input/var.c                               |  13 +-
 src/libvlc-module.c                           |  40 +-
 src/libvlccore.sym                            |   1 +
 40 files changed, 703 insertions(+), 242 deletions(-)
 create mode 100644 src/input/es_out_ctx.c

-- 
2.20.1



More information about the vlc-devel mailing list