[vlc-devel] [PATCH V3 02/19] clock: add AddOriginPoint

Thomas Guillem thomas at gllm.fr
Tue Sep 10 17:04:14 CEST 2019


On Mon, Sep 9, 2019, at 20:25, Rémi Denis-Courmont wrote:
> Le maanantaina 9. syyskuuta 2019, 21.15.11 EEST Rémi Denis-Courmont a écrit :
> > Le maanantaina 9. syyskuuta 2019, 19.15.18 EEST Thomas Guillem a écrit :
> > > > Mapping play time to media timestamps is the job of the demuxer (and
> > > > yes,
> > > > the current DEMUX_GET_TIME/DEMUX_GET_POSITION concept is too limited).
> > > 
> > > Yes it should be in the demux. I put it in the clock in order to reduce
> > > the
> > > number of locks involved and to fix possible a lock-order-inversion.
> > > 
> > > After second thoughts, I can also forward an event to the player from the
> > > demux when the origin changes, keeping the same lock complexity.
> > 
> > AFAICT, we only need a demux control to query the current offset from PCR to
> > NPT - presumably with program ID as parameter - as opposed to the current
> > time.
> 
> Typically:
> 
> static int DemuxControl(...)
> {
> ...
> case DEMUX_GET_GROUP_NPT:

What does NPT stand for ? Now Playing Time ? Is it a better naming than origin time ?

>      vlc_tick_t *ts = va_arg(ap, vlc_tick_t *);
>      int group = va_arg(ap, int);
> 
>     *ts -= VLC_TS_0;
>     (void) group;
>     return VLC_SUCCESS;
> ...
> }
> 
> Just pass the PCR in with potential buffer level adjustment, and get the play 
> time back. We can even remove DEMUX_GET_TIME afterwards.
> 
> -- 
> レミ・デニ-クールモン
> http://www.remlab.net/
> 
> 
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list