\subsection{Stagefright}
\begin{frame}
  \frametitle{Stagefright}
  \begin{itemize}
  \item StageFright is the multimedia playback engine in Android since
    Eclair
  \item In its goals, it is quite similar to GStreamer: Provide an
    abstraction on top of codecs and libraries to easily play
    multimedia files
  \item It uses a plugin system, to easily extend the number of
    formats supported, either software or hardware decoded
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{StageFright Architecture}
  \begin{center}
    \includegraphics[width=0.95\textwidth]{slides/android-native-layer-stagefright/stagefright.pdf}
  \end{center}
\end{frame}

\begin{frame}[fragile]
  \frametitle{StageFright plugins}
  \begin{itemize}
  \item To add support for a new format, you need to:
    \begin{itemize}
    \item Develop a new Extractor class, if the container is not
      supported yet.
    \item Develop a new Decoder class, that implements the interface
      needed by the StageFright core to read the data.
    \item Associate the mime-type of the files to read to your new
      Decoder in the \code{/etc/media_codecs.xml} file provided by
      your device, either in the \code{Decoders} list.
      \begin{itemize}
      \item $\rightarrow$ No runtime extension of the decoders, this
        is done at compilation time.
      \end{itemize}
    \end{itemize}
  \end{itemize}
\begin{minted}[fontsize=\scriptsize]{xml}
<Decoders>
    <MediaCodec name="OMX.google.vorbis.decoder" type="audio/vorbis" />
    <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" />
</Decoders>
\end{minted}
\end{frame}

