[gmpi] Re: Reqs 3.9. Time - opening arguments.1

  • From: Tim Hockin <thockin@xxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Thu, 5 Feb 2004 11:19:40 -0800

On Thu, Feb 05, 2004 at 01:47:24PM -0500, Paul Davis wrote:
> >> together. You need to know that sample S (more precisely, the first
> >> sample of a given process block) "happened" at U1, and that video
> >> frame F was drawn at U2, and then you can sync them together.
> >
> >How does it know what UST time that first sample "happened" at when you the
> >sample has not happened until everyone is done processing it AND you can't
> >predict the future of UST timing?
> >
> >You either assign it a UST time in the past, or you need to be able to
> >predict UST times (i.e. UST is linear).
> 
> notice how i did not define "happened" :)
> 
> the UST for the first sample of the process block is obtained by
> asking for it at the start of the process cycle. 

So by the time the process cycle is done, that UST time that is associated
with the start of the block is non-deterministically obsolete, and when the
processed block hits the airwaves it is obsolete by the audio latency time.

Is that right?  Assuming that is acceptable and useful, OK.

But how do you assign UST time to events?  Do you assign it the UST time at
which the event was generated?  Or do you interpolate based on the UST at
the start of buffer?

/* assign UST when you generate the event */
Plug A process()
        create an event bound for Plug C at timestamp 1234
                UST now is 5000
        done
Plug B process()
        create an event bound for Plug C at timestamp 1230
                UST now is 5005
        done

You end up with events that are in order by timestamp, but not by UST.


/* interpolate */
UST at start of buffer was 5000
Plug A process()
        create an event bound for Plug C at timestamp 1234
                UST for this is 5000 + timestamp_to_UST(1234)
        done
Plug B process()
        create an event bound for Plug C at timestamp 1230
                UST for this is 5000 + timestamp_to_UST(1230)
        done

You end up with events that are ordered properly but are obsolete by UST
timing

> >What is the "current" sample time?  the sample number of the start of the
> >current timeslice?  An offset into the current timeslice based on % of
> >plugins processed?  The current sample being calculated in the current
> >plugin being processed?
> 
> Right, you can't define it so easily without references that reach
> outside of GMPI. For 99% of all cases, its sample currently emerging
> from the connector of a representative physical endpoint in a GMPI
> graph.

So, in the middle of a process block that means...?

----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: