\doxysection{oggz\+\_\+read.\+h File Reference}
\label{oggz__read_8h}\index{oggz\_read.h@{oggz\_read.h}}


Interfaces for reading Ogg files and streams.  


{\ttfamily \#include $<$oggz/oggz\+\_\+packet.\+h$>$}\newline
\doxysubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef int($\ast$ \textbf{ Oggz\+Read\+Packet}) (\textbf{ OGGZ} $\ast$oggz, \textbf{ oggz\+\_\+packet} $\ast$packet, long serialno, void $\ast$user\+\_\+data)
\begin{DoxyCompactList}\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 {\itshape oggz}. \end{DoxyCompactList}\item 
typedef int($\ast$ \textbf{ Oggz\+Read\+Page}) (\textbf{ OGGZ} $\ast$oggz, const ogg\+\_\+page $\ast$og, long serialno, void $\ast$user\+\_\+data)
\begin{DoxyCompactList}\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 {\itshape oggz}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \textbf{ oggz\+\_\+set\+\_\+read\+\_\+callback} (\textbf{ OGGZ} $\ast$oggz, long serialno, \textbf{ Oggz\+Read\+Packet} read\+\_\+packet, void $\ast$user\+\_\+data)
\begin{DoxyCompactList}\small\item\em Set a callback for Oggz to call when a new Ogg packet is found in the stream. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+set\+\_\+read\+\_\+page} (\textbf{ OGGZ} $\ast$oggz, long serialno, \textbf{ Oggz\+Read\+Page} read\+\_\+page, void $\ast$user\+\_\+data)
\begin{DoxyCompactList}\small\item\em Set a callback for Oggz to call when a new Ogg page is found in the stream. \end{DoxyCompactList}\item 
long \textbf{ oggz\+\_\+read} (\textbf{ OGGZ} $\ast$oggz, long n)
\begin{DoxyCompactList}\small\item\em Read n bytes into {\itshape oggz}, calling any read callbacks on the fly. \end{DoxyCompactList}\item 
long \textbf{ oggz\+\_\+read\+\_\+input} (\textbf{ OGGZ} $\ast$oggz, unsigned char $\ast$buf, long n)
\begin{DoxyCompactList}\small\item\em Input data into {\itshape oggz}. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+purge} (\textbf{ OGGZ} $\ast$oggz)
\begin{DoxyCompactList}\small\item\em Erase any input buffered in Oggz. \end{DoxyCompactList}\item 
\textbf{ Oggz\+Stream\+Content} \textbf{ oggz\+\_\+stream\+\_\+get\+\_\+content} (\textbf{ OGGZ} $\ast$oggz, long serialno)
\begin{DoxyCompactList}\small\item\em Determine the content type of the oggz stream referred to by {\itshape serialno}. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ oggz\+\_\+stream\+\_\+get\+\_\+content\+\_\+type} (\textbf{ OGGZ} $\ast$oggz, long serialno)
\begin{DoxyCompactList}\small\item\em Return human-\/readable string representation of content type of oggz stream referred to by {\itshape serialno}. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+stream\+\_\+get\+\_\+numheaders} (\textbf{ OGGZ} $\ast$oggz, long serialno)
\begin{DoxyCompactList}\small\item\em Determine the number of headers of the oggz stream referred to by {\itshape serialno}. \end{DoxyCompactList}\end{DoxyCompactItemize}


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



\doxysubsection{Function Documentation}
\index{oggz\_read.h@{oggz\_read.h}!oggz\_purge@{oggz\_purge}}
\index{oggz\_purge@{oggz\_purge}!oggz\_read.h@{oggz\_read.h}}
\doxysubsubsection{oggz\_purge()}
{\footnotesize\ttfamily \label{oggz__read_8h_adf606e6641a7d59eff2030b7b9ce51f8} 
int oggz\+\_\+purge (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{}\end{DoxyParamCaption})}



Erase any input buffered in Oggz. 

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


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & Success \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+SYSTEM} & Error seeking on underlying IO. \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD\+\_\+\+OGGZ} & {\itshape oggz} does not refer to an existing \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+INVALID} & Operation not suitable for this \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} \\
\hline
\end{DoxyRetVals}
\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}}
\doxysubsubsection{oggz\_stream\_get\_content()}
{\footnotesize\ttfamily \label{oggz__read_8h_a1cd43b28f34bf82dc1830cc517b19e14} 
\textbf{ Oggz\+Stream\+Content} oggz\+\_\+stream\+\_\+get\+\_\+content (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{long}]{serialno}{}\end{DoxyParamCaption})}



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


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
{\em serialno} & An ogg stream serialno \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em OGGZ\+\_\+\+CONTENT\+\_\+\+THEORA..\+OGGZ\+\_\+\+CONTENT\+\_\+\+UNKNOWN} & content successfully identified \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD\+\_\+\+OGGZ} & {\itshape oggz} does not refer to an existing \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD\+\_\+\+SERIALNO} & {\itshape serialno} does not refer to an existing stream \\
\hline
\end{DoxyRetVals}
\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}}
\doxysubsubsection{oggz\_stream\_get\_content\_type()}
{\footnotesize\ttfamily \label{oggz__read_8h_a0a57a0b8723c999160cf0379477341b1} 
const char $\ast$ oggz\+\_\+stream\+\_\+get\+\_\+content\+\_\+type (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{long}]{serialno}{}\end{DoxyParamCaption})}



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


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
{\em serialno} & An ogg stream serialno \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em string} & the name of the content type \\
\hline
{\em NULL} & {\itshape oggz} or {\itshape serialno} invalid \\
\hline
\end{DoxyRetVals}
\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}}
\doxysubsubsection{oggz\_stream\_get\_numheaders()}
{\footnotesize\ttfamily \label{oggz__read_8h_ae3b1aa364b5bf0d7b331aab70646ab10} 
int oggz\+\_\+stream\+\_\+get\+\_\+numheaders (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{long}]{serialno}{}\end{DoxyParamCaption})}



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


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
{\em serialno} & An ogg stream serialno \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em OGGZ\+\_\+\+CONTENT\+\_\+\+THEORA..\+OGGZ\+\_\+\+CONTENT\+\_\+\+UNKNOWN} & content successfully identified \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD\+\_\+\+OGGZ} & {\itshape oggz} does not refer to an existing \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD\+\_\+\+SERIALNO} & {\itshape serialno} does not refer to an existing stream \\
\hline
\end{DoxyRetVals}
