\doxysection{oggz.\+h File Reference}
\label{oggz_8h}\index{oggz.h@{oggz.h}}


The liboggz C API.  


{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$sys/types.\+h$>$}\newline
{\ttfamily \#include $<$ogg/ogg.\+h$>$}\newline
{\ttfamily \#include $<$oggz/oggz\+\_\+constants.\+h$>$}\newline
{\ttfamily \#include $<$oggz/oggz\+\_\+table.\+h$>$}\newline
{\ttfamily \#include $<$oggz/oggz\+\_\+off\+\_\+t.\+h$>$}\newline
{\ttfamily \#include $<$oggz/oggz\+\_\+read.\+h$>$}\newline
{\ttfamily \#include $<$oggz/oggz\+\_\+stream.\+h$>$}\newline
{\ttfamily \#include $<$oggz/oggz\+\_\+seek.\+h$>$}\newline
{\ttfamily \#include $<$oggz/oggz\+\_\+write.\+h$>$}\newline
{\ttfamily \#include $<$oggz/oggz\+\_\+io.\+h$>$}\newline
{\ttfamily \#include $<$oggz/oggz\+\_\+comments.\+h$>$}\newline
{\ttfamily \#include $<$oggz/oggz\+\_\+deprecated.\+h$>$}\newline
\doxysubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef void \textbf{ OGGZ}
\begin{DoxyCompactList}\small\item\em An opaque handle to an Ogg file. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ OGGZ} $\ast$ \textbf{ oggz\+\_\+new} (int flags)
\begin{DoxyCompactList}\small\item\em Create a new \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} object. \end{DoxyCompactList}\item 
\textbf{ OGGZ} $\ast$ \textbf{ oggz\+\_\+open} (const char $\ast$filename, int flags)
\begin{DoxyCompactList}\small\item\em Open an Ogg file, creating an \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle for it. \end{DoxyCompactList}\item 
\textbf{ OGGZ} $\ast$ \textbf{ oggz\+\_\+open\+\_\+stdio} (FILE $\ast$file, int flags)
\begin{DoxyCompactList}\small\item\em Create an \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle associated with a stdio stream. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+flush} (\textbf{ OGGZ} $\ast$oggz)
\begin{DoxyCompactList}\small\item\em Ensure any associated io streams are flushed. \end{DoxyCompactList}\item 
long \textbf{ oggz\+\_\+run} (\textbf{ OGGZ} $\ast$oggz)
\begin{DoxyCompactList}\small\item\em Run an \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} until completion, or error. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+run\+\_\+set\+\_\+blocksize} (\textbf{ OGGZ} $\ast$oggz, long blocksize)
\begin{DoxyCompactList}\small\item\em Set the blocksize to use internally for \doxyref{oggz\+\_\+run()}{p.}{oggz_8h_a0561df532fc37f98725007a79f898356} \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+close} (\textbf{ OGGZ} $\ast$oggz)
\begin{DoxyCompactList}\small\item\em Close an \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+get\+\_\+bos} (\textbf{ OGGZ} $\ast$oggz, long serialno)
\begin{DoxyCompactList}\small\item\em Determine if a given logical bitstream is at bos (beginning of stream). \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+get\+\_\+eos} (\textbf{ OGGZ} $\ast$oggz, long serialno)
\begin{DoxyCompactList}\small\item\em Determine if a given logical bitstream is at eos (end of stream). \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+get\+\_\+numtracks} (\textbf{ OGGZ} $\ast$oggz)
\begin{DoxyCompactList}\small\item\em Query the number of tracks (logical bitstreams). \end{DoxyCompactList}\item 
long \textbf{ oggz\+\_\+serialno\+\_\+new} (\textbf{ OGGZ} $\ast$oggz)
\begin{DoxyCompactList}\small\item\em Request a new serialno, as required for a new stream, ensuring the serialno is not yet used for any other streams managed by this \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee}. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ oggz\+\_\+content\+\_\+type} (\textbf{ Oggz\+Stream\+Content} content)
\begin{DoxyCompactList}\small\item\em Return human-\/readable string representation of a content type. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The liboggz C API. 

\doxysubsection{Generic semantics}\label{oggz_8h_general}
All access is managed via an \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle. This can be instantiated in one of three ways\+:


\begin{DoxyItemize}
\item \doxyref{oggz\+\_\+open()}{p.}{oggz_8h_a558cdcfc23c139d8f87312dc34f6e5b6} -\/ Open a full pathname
\item \doxyref{oggz\+\_\+open\+\_\+stdio()}{p.}{oggz_8h_a3da4287bd4b67ee1dddd60fcd67e3038} -\/ Use an already opened FILE $\ast$
\item \doxyref{oggz\+\_\+new()}{p.}{oggz_8h_a69d4565e89aa585b5151af0c046f9e12} -\/ Create an anonymous \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} object, which you can later handle via memory buffers
\end{DoxyItemize}

To finish using an \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle, it should be closed with \doxyref{oggz\+\_\+close()}{p.}{oggz_8h_aadcfc04b2930660710bbcbc93140b783}.\doxysubsection{Reading Ogg data}\label{oggz_8h_reading}
To read from Ogg files or streams you must instantiate an \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle with flags set to OGGZ\+\_\+\+READ, and provide an \doxyref{Oggz\+Read\+Packet}{p.}{group__read__api_ga81d64edc03ec1dac12dfbf3e1c0f97e9} callback with \doxyref{oggz\+\_\+set\+\_\+read\+\_\+callback()}{p.}{group__read__api_ga6d5aae4f7f186fffe19d4fd3cd63148d}. See the \doxyref{Oggz Read API}{p.}{group__read__api} section for details.\doxysubsection{Writing Ogg data}\label{oggz_8h_writing}
To write to Ogg files or streams you must instantiate an \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle with flags set to OGGZ\+\_\+\+WRITE, and provide an Oggz\+Write\+Packet callback with oggz\+\_\+set\+\_\+write\+\_\+callback(). See the \doxyref{Oggz Write API}{p.}{group__write__api} section for details.\doxysubsection{Seeking on Ogg data}\label{oggz_8h_seeking}
To seek while reading Ogg files or streams you must instantiate an \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle for reading, and ensure that an \doxyref{Oggz\+Metric }{p.}{group__metric} function is defined to translate packet positions into units such as time. See the \doxyref{Oggz Seek API}{p.}{group__seek__api} section for details.\doxysubsection{Overriding the IO methods}\label{oggz_8h_io}
When an \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle is instantiated by \doxyref{oggz\+\_\+open()}{p.}{oggz_8h_a558cdcfc23c139d8f87312dc34f6e5b6} or \doxyref{oggz\+\_\+open\+\_\+stdio()}{p.}{oggz_8h_a3da4287bd4b67ee1dddd60fcd67e3038}, Oggz uses stdio functions internally to access the raw data. However for some applications, the raw data cannot be accessed via stdio -- this commonly occurs when integrating with media frameworks. For such applications, you can provide Oggz with custom IO methods that it should use to access the raw data. Oggz will then use these custom methods, rather than using stdio methods, to access the raw data internally.

For details, see \doxyref{$<$oggz/oggz\+\_\+io.\+h$>$ }{p.}{oggz__io_8h}.\doxysubsection{Headers}\label{oggz_8h_headers}
\doxyref{oggz.\+h}{p.}{oggz_8h} provides direct access to libogg types such as ogg\+\_\+packet, defined in $<$ogg/ogg.\+h$>$. 

\doxysubsection{Typedef Documentation}
\index{oggz.h@{oggz.h}!OGGZ@{OGGZ}}
\index{OGGZ@{OGGZ}!oggz.h@{oggz.h}}
\doxysubsubsection{OGGZ}
{\footnotesize\ttfamily \label{oggz_8h_a672d218df13da45a4b41d5366211bfee} 
typedef void \textbf{ OGGZ}}



An opaque handle to an Ogg file. 

This is returned by \doxyref{oggz\+\_\+open()}{p.}{oggz_8h_a558cdcfc23c139d8f87312dc34f6e5b6} or \doxyref{oggz\+\_\+new()}{p.}{oggz_8h_a69d4565e89aa585b5151af0c046f9e12}, and is passed to all other oggz\+\_\+$\ast$ functions. 

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



Close an \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle. 


\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\+\_\+\+BAD\+\_\+\+OGGZ} & {\itshape oggz} does not refer to an existing \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+SYSTEM} & System error; check errno for details \\
\hline
\end{DoxyRetVals}
\index{oggz.h@{oggz.h}!oggz\_content\_type@{oggz\_content\_type}}
\index{oggz\_content\_type@{oggz\_content\_type}!oggz.h@{oggz.h}}
\doxysubsubsection{oggz\_content\_type()}
{\footnotesize\ttfamily \label{oggz_8h_a0d190019ecef860120417e1b57da6edb} 
const char $\ast$ oggz\+\_\+content\+\_\+type (\begin{DoxyParamCaption}\item[{\textbf{ Oggz\+Stream\+Content}}]{content}{}\end{DoxyParamCaption})}



Return human-\/readable string representation of a content type. 


\begin{DoxyRetVals}{Return values}
{\em string} & the name of the content type \\
\hline
{\em NULL} & {\itshape content} invalid \\
\hline
\end{DoxyRetVals}
\index{oggz.h@{oggz.h}!oggz\_flush@{oggz\_flush}}
\index{oggz\_flush@{oggz\_flush}!oggz.h@{oggz.h}}
\doxysubsubsection{oggz\_flush()}
{\footnotesize\ttfamily \label{oggz_8h_a8090c7e886af90dbea4dd5df8035dbf3} 
int oggz\+\_\+flush (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{}\end{DoxyParamCaption})}



Ensure any associated io streams are flushed. 


\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\+\_\+\+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
{\em OGGZ\+\_\+\+ERR\+\_\+\+SYSTEM} & System error; check errno for details \\
\hline
\end{DoxyRetVals}
\index{oggz.h@{oggz.h}!oggz\_get\_bos@{oggz\_get\_bos}}
\index{oggz\_get\_bos@{oggz\_get\_bos}!oggz.h@{oggz.h}}
\doxysubsubsection{oggz\_get\_bos()}
{\footnotesize\ttfamily \label{oggz_8h_a357244f9e73d219015d9ce8260ee08d3} 
int oggz\+\_\+get\+\_\+bos (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{long}]{serialno}{}\end{DoxyParamCaption})}



Determine if a given logical bitstream is at bos (beginning of stream). 


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
{\em serialno} & Identify a logical bitstream within {\itshape oggz}, or -\/1 to query if all logical bitstreams in {\itshape oggz} are at bos \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 1} & The given stream is at bos \\
\hline
{\em 0} & The given stream is not at bos \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD\+\_\+\+SERIALNO} & {\itshape serialno} does not identify an existing logical bitstream in {\itshape oggz}. \\
\hline
\end{DoxyRetVals}
\index{oggz.h@{oggz.h}!oggz\_get\_eos@{oggz\_get\_eos}}
\index{oggz\_get\_eos@{oggz\_get\_eos}!oggz.h@{oggz.h}}
\doxysubsubsection{oggz\_get\_eos()}
{\footnotesize\ttfamily \label{oggz_8h_aee6a754e123ec0fd347d1ed0d4d4b3b7} 
int oggz\+\_\+get\+\_\+eos (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{long}]{serialno}{}\end{DoxyParamCaption})}



Determine if a given logical bitstream is at eos (end of stream). 


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
{\em serialno} & Identify a logical bitstream within {\itshape oggz}, or -\/1 to query if all logical bitstreams in {\itshape oggz} are at eos \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 1} & The given stream is at eos \\
\hline
{\em 0} & The given stream is not at eos \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD\+\_\+\+SERIALNO} & {\itshape serialno} does not identify an existing logical bitstream in {\itshape oggz}. \\
\hline
\end{DoxyRetVals}
\index{oggz.h@{oggz.h}!oggz\_get\_numtracks@{oggz\_get\_numtracks}}
\index{oggz\_get\_numtracks@{oggz\_get\_numtracks}!oggz.h@{oggz.h}}
\doxysubsubsection{oggz\_get\_numtracks()}
{\footnotesize\ttfamily \label{oggz_8h_a0dd3be49fc94531e35546318c14b64e7} 
int oggz\+\_\+get\+\_\+numtracks (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{}\end{DoxyParamCaption})}



Query the number of tracks (logical bitstreams). 

When reading, this number is incremented every time a new track is found, so the returned value is only correct once the \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} is no longer at bos (beginning of stream)\+: see \doxyref{oggz\+\_\+get\+\_\+bos()}{p.}{oggz_8h_a357244f9e73d219015d9ce8260ee08d3} for determining this. 
\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The number of tracks in \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD\+\_\+\+SERIALNO} & {\itshape serialno} does not identify an existing logical bitstream in {\itshape oggz}. \\
\hline
\end{DoxyRetVals}
\index{oggz.h@{oggz.h}!oggz\_new@{oggz\_new}}
\index{oggz\_new@{oggz\_new}!oggz.h@{oggz.h}}
\doxysubsubsection{oggz\_new()}
{\footnotesize\ttfamily \label{oggz_8h_a69d4565e89aa585b5151af0c046f9e12} 
\textbf{ OGGZ} $\ast$ oggz\+\_\+new (\begin{DoxyParamCaption}\item[{int}]{flags}{}\end{DoxyParamCaption})}



Create a new \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} object. 


\begin{DoxyParams}{Parameters}
{\em flags} & OGGZ\+\_\+\+READ or OGGZ\+\_\+\+WRITE \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} object 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em NULL} & on system error; check errno for details \\
\hline
\end{DoxyRetVals}
\index{oggz.h@{oggz.h}!oggz\_open@{oggz\_open}}
\index{oggz\_open@{oggz\_open}!oggz.h@{oggz.h}}
\doxysubsubsection{oggz\_open()}
{\footnotesize\ttfamily \label{oggz_8h_a558cdcfc23c139d8f87312dc34f6e5b6} 
\textbf{ OGGZ} $\ast$ oggz\+\_\+open (\begin{DoxyParamCaption}\item[{const char $\ast$}]{filename}{, }\item[{int}]{flags}{}\end{DoxyParamCaption})}



Open an Ogg file, creating an \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle for it. 


\begin{DoxyParams}{Parameters}
{\em filename} & The file to open \\
\hline
{\em flags} & OGGZ\+\_\+\+READ or OGGZ\+\_\+\+WRITE \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em NULL} & System error; check errno for details \\
\hline
\end{DoxyRetVals}
\index{oggz.h@{oggz.h}!oggz\_open\_stdio@{oggz\_open\_stdio}}
\index{oggz\_open\_stdio@{oggz\_open\_stdio}!oggz.h@{oggz.h}}
\doxysubsubsection{oggz\_open\_stdio()}
{\footnotesize\ttfamily \label{oggz_8h_a3da4287bd4b67ee1dddd60fcd67e3038} 
\textbf{ OGGZ} $\ast$ oggz\+\_\+open\+\_\+stdio (\begin{DoxyParamCaption}\item[{FILE $\ast$}]{file}{, }\item[{int}]{flags}{}\end{DoxyParamCaption})}



Create an \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle associated with a stdio stream. 


\begin{DoxyParams}{Parameters}
{\em file} & An open FILE handle \\
\hline
{\em flags} & OGGZ\+\_\+\+READ or OGGZ\+\_\+\+WRITE \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em NULL} & System error; check errno for details \\
\hline
\end{DoxyRetVals}
\index{oggz.h@{oggz.h}!oggz\_run@{oggz\_run}}
\index{oggz\_run@{oggz\_run}!oggz.h@{oggz.h}}
\doxysubsubsection{oggz\_run()}
{\footnotesize\ttfamily \label{oggz_8h_a0561df532fc37f98725007a79f898356} 
long oggz\+\_\+run (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{}\end{DoxyParamCaption})}



Run an \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} until completion, or error. 

This is a convenience function which repeatedly calls \doxyref{oggz\+\_\+read()}{p.}{group__read__api_ga3ce7a31de5da56375057436c6b5108f2} or \doxyref{oggz\+\_\+write()}{p.}{group__write__api_ga3c97d94ea425d64546adf9c368b71904} as appropriate. For an \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} opened for reading, an \doxyref{Oggz\+Read\+Packet}{p.}{group__read__api_ga81d64edc03ec1dac12dfbf3e1c0f97e9} or \doxyref{Oggz\+Read\+Page}{p.}{group__read__api_ga33c666508e417bb8cc66895d49e97248} callback should have been set before calling this function. For an \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} opened for writing, either an Oggz\+Hungry callback should have been set before calling this function, or you can use this function to write out all unwritten Ogg pages which are pending. 
\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle previously opened for either reading or writing \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & Success \\
\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
{\em OGGZ\+\_\+\+ERR\+\_\+\+SYSTEM} & System error; check errno for details \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+STOP\+\_\+\+OK} & Operation was stopped by a user callback returning OGGZ\+\_\+\+STOP\+\_\+\+OK \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+STOP\+\_\+\+ERR} & Operation was stopped by a user callback returning OGGZ\+\_\+\+STOP\+\_\+\+ERR \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+RECURSIVE\+\_\+\+WRITE} & Attempt to initiate writing from within an Oggz\+Hungry callback \\
\hline
\end{DoxyRetVals}
\index{oggz.h@{oggz.h}!oggz\_run\_set\_blocksize@{oggz\_run\_set\_blocksize}}
\index{oggz\_run\_set\_blocksize@{oggz\_run\_set\_blocksize}!oggz.h@{oggz.h}}
\doxysubsubsection{oggz\_run\_set\_blocksize()}
{\footnotesize\ttfamily \label{oggz_8h_ad500c8ed7147f7fb1ddc6c915a6c10d7} 
int oggz\+\_\+run\+\_\+set\+\_\+blocksize (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{long}]{blocksize}{}\end{DoxyParamCaption})}



Set the blocksize to use internally for \doxyref{oggz\+\_\+run()}{p.}{oggz_8h_a0561df532fc37f98725007a79f898356} 


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle previously opened for either reading or writing \\
\hline
{\em blocksize} & The blocksize to use within \doxyref{oggz\+\_\+run()}{p.}{oggz_8h_a0561df532fc37f98725007a79f898356} \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & Success \\
\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} & Invalid blocksize ({\itshape run\+\_\+blocksize} $<$= 0) \\
\hline
\end{DoxyRetVals}
\index{oggz.h@{oggz.h}!oggz\_serialno\_new@{oggz\_serialno\_new}}
\index{oggz\_serialno\_new@{oggz\_serialno\_new}!oggz.h@{oggz.h}}
\doxysubsubsection{oggz\_serialno\_new()}
{\footnotesize\ttfamily \label{oggz_8h_aaf89877e3e89408387d422f487bcf094} 
long oggz\+\_\+serialno\+\_\+new (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{}\end{DoxyParamCaption})}



Request a new serialno, as required for a new stream, ensuring the serialno is not yet used for any other streams managed by this \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee}. 


\begin{DoxyParams}{Parameters}
{\em oggz} & An \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} handle \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new serialno, not already occuring in any logical bitstreams in {\itshape oggz}. 
\end{DoxyReturn}
