\section{oggz\_\-read.h File Reference}
\label{oggz__read_8h}\index{oggz\_\-read.h@{oggz\_\-read.h}}
Interfaces for reading Ogg files and streams.  


{\tt \#include $<$oggz/oggz\_\-packet.h$>$}\par
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef int($\ast$ {\bf OggzReadPacket} )({\bf OGGZ} $\ast$oggz, {\bf oggz\_\-packet} $\ast$packet, long serialno, void $\ast$user\_\-data)
\begin{CompactList}\small\item\em This is the signature of a callback which you must provide for Oggz to call whenever it finds a new packet in the Ogg stream associated with {\em oggz\/}. \item\end{CompactList}\item 
typedef int($\ast$ {\bf OggzReadPage} )({\bf OGGZ} $\ast$oggz, const ogg\_\-page $\ast$og, long serialno, void $\ast$user\_\-data)
\begin{CompactList}\small\item\em This is the signature of a callback which you must provide for Oggz to call whenever it finds a new page in the Ogg stream associated with {\em oggz\/}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int {\bf oggz\_\-set\_\-read\_\-callback} ({\bf OGGZ} $\ast$oggz, long serialno, {\bf OggzReadPacket} read\_\-packet, void $\ast$user\_\-data)
\begin{CompactList}\small\item\em Set a callback for Oggz to call when a new Ogg packet is found in the stream. \item\end{CompactList}\item 
int {\bf oggz\_\-set\_\-read\_\-page} ({\bf OGGZ} $\ast$oggz, long serialno, {\bf OggzReadPage} read\_\-page, void $\ast$user\_\-data)
\begin{CompactList}\small\item\em Set a callback for Oggz to call when a new Ogg page is found in the stream. \item\end{CompactList}\item 
long {\bf oggz\_\-read} ({\bf OGGZ} $\ast$oggz, long n)
\begin{CompactList}\small\item\em Read n bytes into {\em oggz\/}, calling any read callbacks on the fly. \item\end{CompactList}\item 
long {\bf oggz\_\-read\_\-input} ({\bf OGGZ} $\ast$oggz, unsigned char $\ast$buf, long n)
\begin{CompactList}\small\item\em Input data into {\em oggz\/}. \item\end{CompactList}\item 
int {\bf oggz\_\-purge} ({\bf OGGZ} $\ast$oggz)
\begin{CompactList}\small\item\em Erase any input buffered in Oggz. \item\end{CompactList}\item 
{\bf OggzStreamContent} {\bf oggz\_\-stream\_\-get\_\-content} ({\bf OGGZ} $\ast$oggz, long serialno)
\begin{CompactList}\small\item\em Determine the content type of the oggz stream referred to by {\em serialno\/}. \item\end{CompactList}\item 
const char $\ast$ {\bf oggz\_\-stream\_\-get\_\-content\_\-type} ({\bf OGGZ} $\ast$oggz, long serialno)
\begin{CompactList}\small\item\em Return human-readable string representation of content type of oggz stream referred to by {\em serialno\/}. \item\end{CompactList}\item 
int {\bf oggz\_\-stream\_\-get\_\-numheaders} ({\bf OGGZ} $\ast$oggz, long serialno)
\begin{CompactList}\small\item\em Determine the number of headers of the oggz stream referred to by {\em serialno\/}. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Interfaces for reading Ogg files and streams. 



\subsection{Function Documentation}
\index{oggz\_\-read.h@{oggz\_\-read.h}!oggz\_\-purge@{oggz\_\-purge}}
\index{oggz\_\-purge@{oggz\_\-purge}!oggz_read.h@{oggz\_\-read.h}}
\subsubsection[{oggz\_\-purge}]{\setlength{\rightskip}{0pt plus 5cm}int oggz\_\-purge ({\bf OGGZ} $\ast$ {\em oggz})}\label{oggz__read_8h_df606e6641a7d59eff2030b7b9ce51f8}


Erase any input buffered in Oggz. 

This discards any input read from the underlying IO system but not yet delivered as ogg\_\-packets.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em oggz}]An OGGZ handle \end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0}]Success \item[{\em OGGZ\_\-ERR\_\-SYSTEM}]Error seeking on underlying IO. \item[{\em OGGZ\_\-ERR\_\-BAD\_\-OGGZ}]{\em oggz\/} does not refer to an existing OGGZ \item[{\em OGGZ\_\-ERR\_\-INVALID}]Operation not suitable for this OGGZ \end{description}
\end{Desc}
\index{oggz\_\-read.h@{oggz\_\-read.h}!oggz\_\-stream\_\-get\_\-content@{oggz\_\-stream\_\-get\_\-content}}
\index{oggz\_\-stream\_\-get\_\-content@{oggz\_\-stream\_\-get\_\-content}!oggz_read.h@{oggz\_\-read.h}}
\subsubsection[{oggz\_\-stream\_\-get\_\-content}]{\setlength{\rightskip}{0pt plus 5cm}{\bf OggzStreamContent} oggz\_\-stream\_\-get\_\-content ({\bf OGGZ} $\ast$ {\em oggz}, \/  long {\em serialno})}\label{oggz__read_8h_1cd43b28f34bf82dc1830cc517b19e14}


Determine the content type of the oggz stream referred to by {\em serialno\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em oggz}]An OGGZ handle \item[{\em serialno}]An ogg stream serialno \end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em OGGZ\_\-CONTENT\_\-THEORA..OGGZ\_\-CONTENT\_\-UNKNOWN}]content successfully identified \item[{\em OGGZ\_\-ERR\_\-BAD\_\-OGGZ}]{\em oggz\/} does not refer to an existing OGGZ \item[{\em OGGZ\_\-ERR\_\-BAD\_\-SERIALNO}]{\em serialno\/} does not refer to an existing stream \end{description}
\end{Desc}
\index{oggz\_\-read.h@{oggz\_\-read.h}!oggz\_\-stream\_\-get\_\-content\_\-type@{oggz\_\-stream\_\-get\_\-content\_\-type}}
\index{oggz\_\-stream\_\-get\_\-content\_\-type@{oggz\_\-stream\_\-get\_\-content\_\-type}!oggz_read.h@{oggz\_\-read.h}}
\subsubsection[{oggz\_\-stream\_\-get\_\-content\_\-type}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ oggz\_\-stream\_\-get\_\-content\_\-type ({\bf OGGZ} $\ast$ {\em oggz}, \/  long {\em serialno})}\label{oggz__read_8h_85665d758dbc159bc48055bf3f572b37}


Return human-readable string representation of content type of oggz stream referred to by {\em serialno\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em oggz}]An OGGZ handle \item[{\em serialno}]An ogg stream serialno \end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em string}]the name of the content type \item[{\em NULL}]{\em oggz\/} or {\em serialno\/} invalid \end{description}
\end{Desc}
\index{oggz\_\-read.h@{oggz\_\-read.h}!oggz\_\-stream\_\-get\_\-numheaders@{oggz\_\-stream\_\-get\_\-numheaders}}
\index{oggz\_\-stream\_\-get\_\-numheaders@{oggz\_\-stream\_\-get\_\-numheaders}!oggz_read.h@{oggz\_\-read.h}}
\subsubsection[{oggz\_\-stream\_\-get\_\-numheaders}]{\setlength{\rightskip}{0pt plus 5cm}int oggz\_\-stream\_\-get\_\-numheaders ({\bf OGGZ} $\ast$ {\em oggz}, \/  long {\em serialno})}\label{oggz__read_8h_e3b1aa364b5bf0d7b331aab70646ab10}


Determine the number of headers of the oggz stream referred to by {\em serialno\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em oggz}]An OGGZ handle \item[{\em serialno}]An ogg stream serialno \end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em OGGZ\_\-CONTENT\_\-THEORA..OGGZ\_\-CONTENT\_\-UNKNOWN}]content successfully identified \item[{\em OGGZ\_\-ERR\_\-BAD\_\-OGGZ}]{\em oggz\/} does not refer to an existing OGGZ \item[{\em OGGZ\_\-ERR\_\-BAD\_\-SERIALNO}]{\em serialno\/} does not refer to an existing stream \end{description}
\end{Desc}
