diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-06-26 01:21:21 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-06-26 17:04:31 +0100 |
| commit | 09a9ac376db005a40a351736bcff4077f098825d (patch) | |
| tree | 64ea69741155d15d114ad96daf0f90e24b3abe28 /doc | |
| parent | 46cd0fe7b5b514f0d9456b25f670679cc584a218 (diff) | |
Another try at sorting out the thorny question of timing.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/design/timing.tex | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/doc/design/timing.tex b/doc/design/timing.tex new file mode 100644 index 000000000..567ba024f --- /dev/null +++ b/doc/design/timing.tex @@ -0,0 +1,42 @@ +\documentclass{article} +\begin{document} + +We are trying to implement full-ish playlist based content specification. The timing is awkward. + +\section{Reference timing} + +Frame rates of things can vary a lot; content can be in pretty much +anything, and DCP video and audio frame rates may change on a whim +depending on what is best for a given set of content. This suggests +(albeit without strong justification) the need for a frame-rate-independent unit of time. + +So far we've been using a time type called \texttt{Time} expressed in +$\mathtt{TIME\_HZ}^{-1}$; e.g. \texttt{TIME\_HZ} units is 1 second. +\texttt{TIME\_HZ} is chosen to be divisible by lots of frame and +sample rates. + +We express content start time as a \texttt{Time}. + + +\section{Timing at different stages of the chain} + +Let's try this: decoders produce sequences of (perhaps) video frames +and (perhaps) audio frames. There are no gaps. They are at the +content's native frame rates and are synchronised (meaning that if +they are played together, at the content's frame rates, they will be +in sync). The decoders give timestamps for each piece of their +output, which are \emph{simple indices} (\texttt{ContentVideoFrame} +and \texttt{ContentAudioFrame}). Decoders know nothing of \texttt{Time}. + + +\section{Split of stuff between decoders and player} + +In some ways it seems nice to have decoders which produce the rawest +possible data and make the player sort it out (e.g.\ cropping and +scaling video, resampling audio). The resampling is awkward, though, +as you really need one resampler per source. So it might make more sense +to put stuff in the decoder. But then, what's one map of resamplers between friends? + + + +\end{document} |
