diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-05-08 14:39:46 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-05-08 14:39:46 +0100 |
| commit | 97632e5e91fc0e2c0a3dd84ed9a167f79e4bd14d (patch) | |
| tree | ac8bc4c05ef78c4b0df460e707789ff25675548a /doc/design | |
| parent | d02e03907214808ce9da9eb9a2267ff577e85559 (diff) | |
Fix up black-filling logic.
Diffstat (limited to 'doc/design')
| -rw-r--r-- | doc/design/Attic/who_fills_the_gaps.tex (renamed from doc/design/who_fills_the_gaps.tex) | 0 | ||||
| -rw-r--r-- | doc/design/gap_filling.tex | 56 | ||||
| -rw-r--r-- | doc/design/servers_and_ports.tex | 36 |
3 files changed, 92 insertions, 0 deletions
diff --git a/doc/design/who_fills_the_gaps.tex b/doc/design/Attic/who_fills_the_gaps.tex index 00e8ac39f..00e8ac39f 100644 --- a/doc/design/who_fills_the_gaps.tex +++ b/doc/design/Attic/who_fills_the_gaps.tex diff --git a/doc/design/gap_filling.tex b/doc/design/gap_filling.tex new file mode 100644 index 000000000..a6f748748 --- /dev/null +++ b/doc/design/gap_filling.tex @@ -0,0 +1,56 @@ +\documentclass{article} +\renewcommand{\c}[1]{\texttt{#1}} +\begin{document} + +There are two sources of video gaps: + +\begin{enumerate} +\item Discontiguous outputs from \c{FFmpegDecoder} --- it makes sense + to fix these when the frame after the gap is seen, as that's the + first time we know about the gap. For example, it emits frame~1 + then frame~3; when we see 3 we should emit 2 to fill the gap. +\item Periods where there is no video content --- these could be long, + so you can't just wait for the frame after the gap. +\end{enumerate} + +Two solutions suggest themselves for the period of no video content: + +\begin{enumerate} +\item Create `black' \c{Piece}s to act as dummy content and emit black + frames as required. +\item Fix it in \c{Player::pass()}. +\end{enumerate} + +Dummy pieces feels like a nice solution but quite wordy as you need a +hierarchy of \c{Piece}s with virtual functions and so on. + +If we can trust \c{Decoder::position()} we know the earliest time that +a decoder will emit data when it is next \c{pass()}ed. If this is +more than one frame since the last video frame emitted we know we need +to emit a black frame. This much seems straightforward. + +Things appear to get harder with seeking. There are two paths here: + +\begin{enumerate} +\item Seeking into the middle of some video content. +\item Seeking into some empty space. +\end{enumerate} + +and also differences between accurate and inaccurate seek. + +Let's take them case-by-case: + +\begin{enumerate} + \item \emph{Accurate seek into content} --- we should not fill + anything since the correct data will be generated, in time, by + \c{pass()}. + \item \emph{Accurate seek into space} --- we should fill up to the + earliest decoder position. + \item \emph{Inaccurate seek into content} --- we should not fill + anything since \c{pass()} will generate something at some + unknown time. + \item \emph{Inaccurate seek into space} --- we should fill up to + the earliest decoder position from the seek time. +\end{enumerate} + +\end{document} diff --git a/doc/design/servers_and_ports.tex b/doc/design/servers_and_ports.tex new file mode 100644 index 000000000..c635b3054 --- /dev/null +++ b/doc/design/servers_and_ports.tex @@ -0,0 +1,36 @@ +\documentclass{article} +\usepackage[usenames]{xcolor} +\usepackage{listings} +\title{Servers and ports} +\author{} +\date{} +\begin{document} +\maketitle + +\begin{tabular}{|l|l|l|} + \hline + \textbf{Port offset} & \textbf{Component} & \textbf{Purpose} \\ + \hline + 0 & \texttt{EncodeServer} & Listen for frame encoding requests \\ + \hline + 1 & \texttt{EncodeServer} & Listen for \texttt{DCPOMATIC\_HELLO} from masters \\ + \hline + 2 & \texttt{EncodeServerFinder} & Listen for replies to \texttt{DCPOMATIC\_HELLO} from servers \\ + \hline + 3 & Batch converter & Listen for job requests \\ + \hline +\end{tabular} + + +\texttt{EncodeServer} listens on \texttt{server\_port\_base}. +Receives an XML \texttt{EncodingRequest} and then the video data. +Sends back the encoded data. + +\texttt{EncodeServer} also listens on $\texttt{server\_port\_base} + +1$. A main DCP-o-matic instance broadcasts \texttt{DCPOMATIC\_HELLO} +on this port. When a server receives this it connects to the main +DCP-o-matic on $\texttt{server\_port\_base} + 1$ and tells it what it can do. + +Batch Converter listens on $\texttt{server\_port\_base} + 2$ for jobs. + +\end{document} |
