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

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


Is it really important to get the NPT for a specific group ? I don't see the usage at all from input.c/player.c

I would do like DEMUX_GET_TIME, returning the time for the current group (so the demux is taking care of getting the right group).

On Tue, Sep 10, 2019, at 17:04, Thomas Guillem wrote:
> 
> 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
> _______________________________________________
> 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