[vlc-devel] [PATCH] es_out: merge es->i_id with es->fmt.i_id

Thomas Guillem thomas at gllm.fr
Fri Aug 17 14:43:26 CEST 2018


Should we identify an ES track with a uint64_t that is always
incremented from the es_out ?
This will allow to either:
 - select a track via the original fmt.i_id (for advanced users via
   params/libvlc only, this doesn't prevent es id collision) - select a track with this unique uint64_t id (this will be the id
   propagated via input events).

On Fri, Aug 17, 2018, at 14:28, Rémi Denis-Courmont wrote:
> You have an overflow bug there.
> 
> Le 17 août 2018 15:21:15 GMT+03:00, Thomas Guillem <thomas at gllm.fr>
> a écrit :>> On Fri, Aug 17, 2018, at 14:15, Rémi Denis-Courmont wrote:
>>> How do you make the ID temporally unique?
>> 
>> cf. es_out.c:
>> es->i_meta_id = p_sys->i_id++; /* always incremented */
>> 
>>> 
>>> And if it's not fixed in 4.0 break, when will it be? You want to
>>> break compatibility after 4.0?>> 
>> I don't understand, this need to be fixed for 4.0 with the new input
>> manager.>> 
>>> 
>>> Le 17 août 2018 14:52:21 GMT+03:00, Thomas Guillem <thomas at gllm.fr>
>>> a écrit :>>>> I would prefer to keep using the integer i_id as a unique es track
>>>> identifier since it's very simple to handle.
>>>>>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> The main input or slaves goes through the same es_out instance
>>>> that keep the list of all ES tracks, so this should be a simple
>>>> issue to fix.
>>>>>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> So, either we don't expose fmt.i_id from the demux and always
>>>> increment an unique id (like it's already done if fmt.i_id < 0).
>>>> But then, this break es track selection (when passing parameters
>>>> per es).
>>>>>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> Of we mix both solution: if the demux fmt.i_id is not automatic
>>>> (not -1), we iterate through our es tracks to make sure it is
>>>> unique. If it's not unique: ERROR, or use the incremented unique
>>>> value.
>>>>>>>> 
>>>> 
>>>> 
>>>>  
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On Fri, Aug 17, 2018, at 13:38, Francois Cartegnie wrote:
>>>> 
>>>> 
>>>> 
>>>> 
>>>>>  Le 17/08/2018 à 13:22, Rémi Denis-Courmont a écrit :
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>>  FMT ID is useful metadata in some cases. But ES ID should not
>>>>>>  even exist, as we cannot guarantee uniqueness in case of slave
>>>>>>  demuxers.
>>>>>>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>  
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>  
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>  Then every user would need to know or guess stream creation
>>>>>  order to
>>>>>>>>>> 
>>>>> 
>>>>> 
>>>>>  pass parameters per es.
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>  
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>  Unfair dice or crystal ball also required to remap es in muxers.
>>>>>>>>>> 
>>>>> 
>>>>> 
>>>>>  
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>  -- 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>  Francois Cartegnie
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>  VideoLAN - VLC Developer
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>  vlc-devel mailing list
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>  To unsubscribe or modify your subscription options:
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>  https://mailman.videolan.org/listinfo/vlc-devel
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> vlc-devel mailing list
>>>> 
>>>> 
>>>> 
>>>> 
>>>> To unsubscribe or modify your subscription options:
>>>> 
>>>> 
>>>> 
>>>> 
>>>> https://mailman.videolan.org/listinfo/vlc-devel
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>>> --
>>> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
>>> excuser ma brièveté.>>> _________________________________________________
>>> vlc-devel mailing list
>>> To unsubscribe or modify your subscription options:
>>> https://mailman.videolan.org/listinfo/vlc-devel
>> 
> 
> --
>  Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
>  excuser ma brièveté.> _________________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180817/8ce13b13/attachment-0001.html>


More information about the vlc-devel mailing list