[vlc-devel] [RFC PATCH 09/13] FIXUP: implement audio/video/spu delay

Rémi Denis-Courmont remi at remlab.net
Fri Jun 29 17:20:56 CEST 2018


First, I don't see how that contradicts feeding decoders and filters with delay-adjusted PTS. At most, it means that VT cannot handle a variable adjustment for video PTS.

Second, it does not override the mathematical reality that we newd to adjust PTS before decoder FIFO to support non-small negative delays without losing the ES. And I care a lot more about that bug and the valid complaints about it than VT design bugs.

Le 29 juin 2018 15:05:31 GMT+02:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>VT care:
>"The behavior is undefined if samples in a CMSampleBuffer (or even in
>multiple buffers in the same stream) have the same
>presentationTimeStamp. Can be NULL."
>https://developer.apple.com/documentation/coremedia/1489513-cmsamplebuffercreateready?language=objc
>and I don't want to take any risks with all different implementation of
>MediaCodec/OMX.
>(Because if you apply the delay before decoding, nothing prevent to
>feed
>the same pts to a decoder).
>On Fri, Jun 29, 2018, at 14:21, Rémi Denis-Courmont wrote:
>> I cannot agree and I don't see why hw decodet should care about
>> original PTS.> 
>> Le 29 juin 2018 15:02:50 GMT+03:00, Thomas Guillem <thomas at gllm.fr>
>> a écrit :>> 
>>> On Fri, Jun 29, 2018, at 12:44, Rémi Denis-Courmont wrote:
>>>> It boils down to which ES the original PTS are needed for. For
>>>> instance, a timecode SPU source will need the original PTS of the
>>>> video track>> 
>>> No it need the converted time of the video because the video can be
>>> delayed too.>> 
>>>> 
>>>> 
>>>> not SPU (i.e. video + SPU delay). If you apply cross-ES delay after
>>>> filters/sources, timecodes won't work.>>> 
>>>> As far as I can tell, cross-ES delay musyt be applied before
>decoder
>>>> FIFO and befote filters. So it can not be done in output clock -
>>>> that's too far downstream.>> 
>>> Before Decoder FIFO ? It will fail with some HW decoders...
>>> 
>>>> 
>>>> Le 29 juin 2018 13:29:52 GMT+03:00, Thomas Guillem <thomas at gllm.fr>
>>>> a écrit :>>>> 
>>>>> On Fri, Jun 29, 2018, at 12:18, Rémi Denis-Courmont wrote:
>>>>>> I expect major problems with SPU and with audio visualization if
>>>>>> the original PTS are not shifted, but the output times are.>>>> 
>>>>> What kind of major problems ? I tested this set and fount out that
>>>>> SPU delay synchronization was really improved.>>>> 
>>>>>> 
>>>>>> Le 29 juin 2018 12:55:20 GMT+03:00, Thomas Guillem
>>>>>> <thomas at gllm.fr> a écrit :>>>>>> On Wed, Jun 27, 2018, at 21:06,
>Rémi Denis-Courmont wrote:
>>>>>>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>>   Hi,
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>  
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>  Le keskiviikkona 27. kesäkuuta 2018, 15.41.31 EEST Thomas
>>>>>>>>  Guillem a écrit :
>>>>>>>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>>  Each ESses will set the delay to their specific clocks.
>>>>>>>>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>>  Setting a delay on the master clock has an effect on all
>>>>>>>>>  others slaves
>>>>>>>>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>>  clocks. Setting a delay on a slave clock has only an effect
>>>>>>>>>  for the current
>>>>>>>>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>>  clock.
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>  
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>  Why can the delay no longer applied/applicable to original
>PTS?
>>>>>>>>  And then, why
>>>>>>>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>  is the delay not applied within the clock?
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> In this patch, the delay is applied within the clock, no ?
>>>>>>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> When do you want to modify the original PTS ? I tried to do that
>>>>>>> solution first, like we discussed in the meeting, but it seemed
>>>>>>> very complicated and not easy to implement. Furthermore, I
>really
>>>>>>> prefer to keep the original PTS the longer possible. It make it
>>>>>>> more reactive when changing the delay of subtitles for example
>>>>>>> (since the core keep a list of subtitles).
>>>>>>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>>  
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>  It seems rather repetitive/wasteful to boilerplate this in
>>>>>>>>  every clock user.
>>>>>>>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>  
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>  -- 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>  Реми Дёни-Курмон
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>  http://www.remlab.net/
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>  
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>  
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>  
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>  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
>>> 
>> 
>> --
>>  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é.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180629/90a3b273/attachment.html>


More information about the vlc-devel mailing list