\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
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef int($\ast$ \textbf{ Oggz\+Read\+Packet}) (\textbf{ O\+G\+GZ} $\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{ O\+G\+GZ} $\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}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \textbf{ oggz\+\_\+set\+\_\+read\+\_\+callback} (\textbf{ O\+G\+GZ} $\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{ O\+G\+GZ} $\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{ O\+G\+GZ} $\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{ O\+G\+GZ} $\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{ O\+G\+GZ} $\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{ O\+G\+GZ} $\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{ O\+G\+GZ} $\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{ O\+G\+GZ} $\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}
\mbox{\label{oggz__read_8h_adf606e6641a7d59eff2030b7b9ce51f8}} 
\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 int oggz\+\_\+purge (\begin{DoxyParamCaption}\item[{\textbf{ O\+G\+GZ} $\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 O\+G\+GZ handle \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & Success \\
\hline
{\em O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+S\+Y\+S\+T\+EM} & Error seeking on underlying IO. \\
\hline
{\em O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+O\+G\+GZ} & {\itshape oggz} does not refer to an existing O\+G\+GZ \\
\hline
{\em O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+ID} & Operation not suitable for this O\+G\+GZ \\
\hline
\end{DoxyRetVals}
\mbox{\label{oggz__read_8h_a1cd43b28f34bf82dc1830cc517b19e14}} 
\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 \textbf{ Oggz\+Stream\+Content} oggz\+\_\+stream\+\_\+get\+\_\+content (\begin{DoxyParamCaption}\item[{\textbf{ O\+G\+GZ} $\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 O\+G\+GZ handle \\
\hline
{\em serialno} & An ogg stream serialno \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em O\+G\+G\+Z\+\_\+\+C\+O\+N\+T\+E\+N\+T\+\_\+\+T\+H\+E\+O\+R\+A..\+O\+G\+G\+Z\+\_\+\+C\+O\+N\+T\+E\+N\+T\+\_\+\+U\+N\+K\+N\+O\+WN} & content successfully identified \\
\hline
{\em O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+O\+G\+GZ} & {\itshape oggz} does not refer to an existing O\+G\+GZ \\
\hline
{\em O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+S\+E\+R\+I\+A\+L\+NO} & {\itshape serialno} does not refer to an existing stream \\
\hline
\end{DoxyRetVals}
\mbox{\label{oggz__read_8h_a85665d758dbc159bc48055bf3f572b37}} 
\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 const char$\ast$ oggz\+\_\+stream\+\_\+get\+\_\+content\+\_\+type (\begin{DoxyParamCaption}\item[{\textbf{ O\+G\+GZ} $\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 O\+G\+GZ 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 N\+U\+LL} & {\itshape oggz} or {\itshape serialno} invalid \\
\hline
\end{DoxyRetVals}
\mbox{\label{oggz__read_8h_ae3b1aa364b5bf0d7b331aab70646ab10}} 
\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 int oggz\+\_\+stream\+\_\+get\+\_\+numheaders (\begin{DoxyParamCaption}\item[{\textbf{ O\+G\+GZ} $\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 O\+G\+GZ handle \\
\hline
{\em serialno} & An ogg stream serialno \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em O\+G\+G\+Z\+\_\+\+C\+O\+N\+T\+E\+N\+T\+\_\+\+T\+H\+E\+O\+R\+A..\+O\+G\+G\+Z\+\_\+\+C\+O\+N\+T\+E\+N\+T\+\_\+\+U\+N\+K\+N\+O\+WN} & content successfully identified \\
\hline
{\em O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+O\+G\+GZ} & {\itshape oggz} does not refer to an existing O\+G\+GZ \\
\hline
{\em O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+S\+E\+R\+I\+A\+L\+NO} & {\itshape serialno} does not refer to an existing stream \\
\hline
\end{DoxyRetVals}
