[vlc-devel] [RFC PATCH 0/9] Fixing ES id and group collision

Thomas Guillem thomas at gllm.fr
Wed Feb 12 15:43:18 CET 2020


This patch set aims to fix ES ID and group collision when using more than one
demuxers from more than one input_source.

The harder part was to pass a "context" that survive the timeshift without
having to modify the es_out API (and all demuxers modules then).

The new es_out_ctx_t is recounted since it can be used by the timeshift thread.

This new context hold a string identifying the input_source. This id is quite
dumb (for now), it just contain the name part of the url. I think it can be
improved, I'm open to all suggestions. I would like to keep this id humaxin
readable since it can be the base for a future track selection by string, used
by libvlc and variables.

cf. my last commit and the following example:

/* master source without a context: */

/* slave source with a context having the source_id = bbb_sunflower_1080p_60fps_normal.srt */

Keeping the source name is quite convenient for most users. For example, if
they update their subtitle files, they want to use the new subtitle that have
the same name than the one replaced.

Do you think I'm going into the good direction ?

PS: The last 2 commits are still WIP.

Best regards,

Thomas Guillem (9):
  es_out: assert that demux ids are coherent
  es_out: rename function
  es_out: add a refcounted ctx
  es_out: also pass ctx from controls
  input: change InputDemuxNew arguments
  input: pass a specific es_out for each slaves
  es_out: refactor EsOutProgramFind()
  RFC: es_out: fix group_id and i_id collision
  RFC: es_out: add vlc_es_id_GetStrId()

 include/vlc_es.h                              |  18 ++
 include/vlc_es_out.h                          |  10 +-
 modules/access/bluray.c                       |   6 +-
 modules/demux/adaptive/plumbing/FakeESOut.cpp |   8 +-
 modules/demux/timestamps_filter.h             |   3 +-
 src/Makefile.am                               |   1 +
 src/input/es_out.c                            | 259 +++++++++++++-----
 src/input/es_out.h                            |  11 +
 src/input/es_out_ctx.c                        | 162 +++++++++++
 src/input/es_out_timeshift.c                  | 185 ++++++++-----
 src/input/input.c                             |  47 +++-
 src/input/input_internal.h                    |   1 +
 src/libvlccore.sym                            |   1 +
 13 files changed, 555 insertions(+), 157 deletions(-)
 create mode 100644 src/input/es_out_ctx.c


More information about the vlc-devel mailing list