Blob Blame History Raw
\section{Semantics of seeking in Ogg bitstreams}
\label{group__seek__semantics}\index{Semantics of seeking in Ogg bitstreams@{Semantics of seeking in Ogg bitstreams}}
\subsection{Introduction}\label{group__seek__semantics_seek_semantics_intro}
[$\ast$$\ast$$\ast$ This line works around a bug in doxygen $\ast$$\ast$$\ast$]

[$\ast$$\ast$$\ast$ This line works around a bug in doxygen $\ast$$\ast$$\ast$]

The seeking semantics of the Ogg file format were outlined by Monty in {\tt a post to theora-\/dev} in September 2002. Quoting from that post, we have the following assumptions:


\begin{DoxyItemize}
\item Ogg is not a non-\/linear format. ... It is a media transport format designed to do nothing more than deliver content, in a stream, and have all the pieces arrive on time and in sync.
\item The Ogg layer does not know the specifics of the codec data it's multiplexing into a stream. It knows nothing beyond 'Oooo, packets!', that the packets belong to different buckets, that the packets go in order, and that packets have position markers. Ogg does not even have a concept of 'time'; it only knows about the sequentially increasing, unitless position markers. It is up to higher layers which have access to the codec APIs to assign and convert units of framing or time.
\end{DoxyItemize}

(For more details on the structure of Ogg streams, see the \doxyref{Ogg Basics }{p.}{group__basics} section).

For data such as media, for which it is possible to provide a mapping such as 'time', Oggz can efficiently navigate through an Ogg stream by use of an OggzMetric callback, thus allowing automatic seeking to points in 'time'.

For common codecs you can ask Oggz to set this for you automatically by instantiating the OGGZ handle with the OGGZ\_\-AUTO flag set. For others you can specify a multiplier with \doxyref{oggz\_\-set\_\-metric\_\-linear()}{p.}{oggz__deprecated_8h_a12f232bca448853e66a1226ddccff7e0}, or a generic non-\/linear metric with \doxyref{oggz\_\-set\_\-metric()}{p.}{group__metric_ga5a630e8dcd04e1dd6601d8f56f0af3f6}.