X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=doc%2Fdesign%2Fdecoder_structures.tex;h=594c6645023b2b1a46afbed84345f35073bd3b4f;hb=45d5a5004a49edabbc96cd1acba12e08d31510f1;hp=3aa85b1ec558771183460edec9ec60d8431a78ef;hpb=a3d25b1d8eff4748717177de4f92414f395fc510;p=dcpomatic.git diff --git a/doc/design/decoder_structures.tex b/doc/design/decoder_structures.tex index 3aa85b1ec..594c66450 100644 --- a/doc/design/decoder_structures.tex +++ b/doc/design/decoder_structures.tex @@ -128,9 +128,9 @@ Resampling also looks fiddly in the v1 code. virtual void pass() = 0; virtual void seek(ContentTime time, bool accurate) = 0; - signals2 Video; - signals2 Audio; - signals2 TextSubtitle; + signal Video; + signal Audio; + signal TextSubtitle; }; \end{lstlisting} @@ -154,6 +154,58 @@ or perhaps Questions: \begin{itemize} \item Video / audio frame or \texttt{ContentTime}? +\item Can all the subtitle period notation code go? \end{itemize} +\subsection{Steps} + +\begin{itemize} +\item Add signals to \texttt{Player}. + \begin{itemize} + \item \texttt{signal), DCPTime)> Video;} + \item \texttt{signal, DCPTime)> Audio;} + \item \texttt{signal Subtitle;} + \end{itemize} + \item Remove \texttt{get()}-based loops and replace with \texttt{pass()} and signal connections. + \item Remove \texttt{get()} and \texttt{seek()} from decoder parts; add emission signals. + \item Put \texttt{AudioMerger} back. + \item Remove \texttt{during} stuff from \texttt{SubtitleDecoder} and decoder classes that use it. + \item Rename \texttt{give} methods to \texttt{emit}. + \item Remove \texttt{get} methods from \texttt{Player}; replace with \texttt{pass()} and \texttt{seek()}. +\end{itemize} + + +\section{Summary of work done in \texttt{back-to-pass}} + +The diff between \texttt{back-to-pass} and \texttt{master} as at 21/2/2017 can be summarised as: + +\begin{enumerate} +\item Remove \texttt{AudioDecoderStream}; no more need to buffer, and resampling is done in \texttt{Player}. +\item \texttt{AudioDecoder} is simple; basically counting frames. +\item All subtitles-during stuff is gone; no need to know what happens in a particular period as we just wait and see. +\item Pass reason stuff gone; not sure what it was for but seems to have been a contortion related to trying to find specific stuff. + \item \texttt{Player::pass} back, obviously. + \item \texttt{Player::get\_video}, \texttt{get\_audio} and + \texttt{get\_subtitle} more-or-less become \texttt{Player}'s + handlers for emissions from decoders; lots of buffering crap gone + in the process. + \item Add \texttt{Decoder::position} stuff so that we know what to \texttt{pass()} in \texttt{Player}. + \item Add \texttt{AudioMerger}; necessary as audio arrives at the + \texttt{Player} from different streams at different times. The + \texttt{AudioMerger} just accepts data, mixes and spits it out + again. +\item Obvious consumer changes: what was a loop over the playlist + length and calls to \texttt{get()} is now calls to \texttt{pass()}. + \item Maybe-seek stuff gone. + \item Some small \texttt{const}-correctness bits. +\end{enumerate} + +Obvious things to do: + +\begin{enumerate} +\item Ensure AudioMerger is being tested. +\item Ensure hardest-case in video / audio is being tested. +\item Look at symmetry of video/audio paths / APIs. +\end{enumerate} + \end{document}