[vlc-devel] [PATCH 2/2] Fix libvlc_media_get_tracks_info()
fenrir at elivagar.org
Thu Dec 2 21:59:09 CET 2010
On Thu, Dec 02, 2010 at 09:46:50PM +0100, Rémi Denis-Courmont wrote:
> On Thu, 2 Dec 2010 19:12:33 +0100, Laurent Aimar <fenrir at elivagar.org>
> >> We really need unique IDs for each ES. But I do not believe it can be
> >> implemented in a generic way - each and every demuxer must support it.
> > After the demuxer, they are unique. But I think there is an issue when
> > updating the es format from the decoder. I will have to check.
> Well I meant unique, constant for the ES lifetime and reproducible across
> identical/re-used source media.
My bad, es_format_t::i_id may not be unique. But es_out_id_t::i_meta_id
respects all your constraints, as long as
- the source is exactly the same each time it is read, eg ts from DVB or UDP
won't work, but file source will.
- and the demuxer calls es_out_Add() in the same order. Not a problem except
when multiple threads create ES.
The grey area is when a demuxer delete and then re-add an ES while semantically
being the exact same track. i_meta_id will be unique, but it will not stay constant
accross the delete+add. I think only
- DVD, but considering continuity of tracks across title is debatable.
- TS, when PAT/PMT change, usually rare
- MP4, when the codec change.
More information about the vlc-devel