\doxysection{oggz\+\_\+comments.\+h File Reference}
\label{oggz__comments_8h}\index{oggz\_comments.h@{oggz\_comments.h}}


Reading of comments.  


{\ttfamily \#include $<$oggz/oggz.\+h$>$}\newline
\doxysubsubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ Oggz\+Comment}
\begin{DoxyCompactList}\small\item\em A comment. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
const char $\ast$ \textbf{ oggz\+\_\+comment\+\_\+get\+\_\+vendor} (\textbf{ OGGZ} $\ast$oggz, long serialno)
\begin{DoxyCompactList}\small\item\em Retrieve the vendor string. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+comment\+\_\+set\+\_\+vendor} (\textbf{ OGGZ} $\ast$oggz, long serialno, const char $\ast$vendor\+\_\+string)
\begin{DoxyCompactList}\small\item\em Set the vendor string. \end{DoxyCompactList}\item 
const \textbf{ Oggz\+Comment} $\ast$ \textbf{ oggz\+\_\+comment\+\_\+first} (\textbf{ OGGZ} $\ast$oggz, long serialno)
\begin{DoxyCompactList}\small\item\em Retrieve the first comment. \end{DoxyCompactList}\item 
const \textbf{ Oggz\+Comment} $\ast$ \textbf{ oggz\+\_\+comment\+\_\+next} (\textbf{ OGGZ} $\ast$oggz, long serialno, const \textbf{ Oggz\+Comment} $\ast$comment)
\begin{DoxyCompactList}\small\item\em Retrieve the next comment. \end{DoxyCompactList}\item 
const \textbf{ Oggz\+Comment} $\ast$ \textbf{ oggz\+\_\+comment\+\_\+first\+\_\+byname} (\textbf{ OGGZ} $\ast$oggz, long serialno, char $\ast$name)
\begin{DoxyCompactList}\small\item\em Retrieve the first comment with a given name. \end{DoxyCompactList}\item 
const \textbf{ Oggz\+Comment} $\ast$ \textbf{ oggz\+\_\+comment\+\_\+next\+\_\+byname} (\textbf{ OGGZ} $\ast$oggz, long serialno, const \textbf{ Oggz\+Comment} $\ast$comment)
\begin{DoxyCompactList}\small\item\em Retrieve the next comment following and with the same name as a given comment. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+comment\+\_\+add} (\textbf{ OGGZ} $\ast$oggz, long serialno, \textbf{ Oggz\+Comment} $\ast$comment)
\begin{DoxyCompactList}\small\item\em Add a comment. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+comment\+\_\+add\+\_\+byname} (\textbf{ OGGZ} $\ast$oggz, long serialno, const char $\ast$name, const char $\ast$value)
\begin{DoxyCompactList}\small\item\em Add a comment by name and value. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+comment\+\_\+remove} (\textbf{ OGGZ} $\ast$oggz, long serialno, \textbf{ Oggz\+Comment} $\ast$comment)
\begin{DoxyCompactList}\small\item\em Remove a comment. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+comment\+\_\+remove\+\_\+byname} (\textbf{ OGGZ} $\ast$oggz, long serialno, char $\ast$name)
\begin{DoxyCompactList}\small\item\em Remove all comments with a given name. \end{DoxyCompactList}\item 
ogg\+\_\+packet $\ast$ \textbf{ oggz\+\_\+comments\+\_\+generate} (\textbf{ OGGZ} $\ast$oggz, long serialno, int FLAC\+\_\+final\+\_\+metadata\+\_\+block)
\begin{DoxyCompactList}\small\item\em Output a comment packet for the specified stream. \end{DoxyCompactList}\item 
\label{oggz__comments_8h_a486cd52284cb03032360265d2027f8db} 
int {\bfseries oggz\+\_\+comments\+\_\+copy} (\textbf{ OGGZ} $\ast$src, long src\+\_\+serialno, \textbf{ OGGZ} $\ast$dest, long dest\+\_\+serialno)
\item 
void \textbf{ oggz\+\_\+packet\+\_\+destroy} (ogg\+\_\+packet $\ast$packet)
\begin{DoxyCompactList}\small\item\em Free a packet and its payload. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Reading of comments. 

Vorbis, Speex and Theora bitstreams use a comment format called "{}\+Vorbiscomment"{}, defined {\texttt{ here}}. Many standard comment names (such as TITLE, COPYRIGHT and GENRE) are defined in that document.

The following general features of Vorbiscomment are relevant to this API\+:
\begin{DoxyItemize}
\item Each stream has one comment packet, which occurs before any encoded audio data in the stream.
\item When reading, Oggz will decode the comment block before calling the second read() callback for each stream. Hence, retrieving comment data is possible once the read() callback has been called a second time.
\item When writing, Oggz allows you to set up the comments in memory, and provides a single function to generate a corresponding ogg\+\_\+packet. It is your responsibility to then actually write that packet in sequence.
\end{DoxyItemize}

Each comment block contains one Vendor string, which can be retrieved with \doxyref{oggz\+\_\+comment\+\_\+get\+\_\+vendor()}{p.}{oggz__comments_8h_ac0966fcb30b6af0559012065cc3f1f53}.

The rest of a comment block consists of {\itshape name} = {\itshape value} pairs, with the following restrictions\+:
\begin{DoxyItemize}
\item Both the {\itshape name} and {\itshape value} must be non-\/empty
\item The {\itshape name} is case-\/insensitive and must consist of ASCII within the range 0x20 to 0x7D inclusive, 0x3D (\textquotesingle{}=\textquotesingle{}) excluded.
\item The {\itshape name} is not unique; multiple entries may exist with equivalent {\itshape name} within a Vorbiscomment block.
\item The {\itshape value} may be any UTF-\/8 string.
\end{DoxyItemize}\doxysubsection{Reading comments}\label{oggz__comments_8h_comments_get}
Oggz contains API methods to iterate through all comments associated with the logical bitstreams of an OGGZ$\ast$ handle (\doxyref{oggz\+\_\+comment\+\_\+first()}{p.}{oggz__comments_8h_ae7ddb018e19458f7bc516225cb55a7cb} and \doxyref{oggz\+\_\+comment\+\_\+next()}{p.}{oggz__comments_8h_ac79c35c9b2370935a6aa018931e0e561}, and to iterate through comments matching a particular name (\doxyref{oggz\+\_\+comment\+\_\+first\+\_\+byname()}{p.}{oggz__comments_8h_a9512049b88784d2a36b54cdb8a73a988} and \doxyref{oggz\+\_\+comment\+\_\+next\+\_\+byname()}{p.}{oggz__comments_8h_ac719165380a85c77056faf7e8814507e}). Given that multiple comments may exist with the same {\itshape name}, you should not use \doxyref{oggz\+\_\+comment\+\_\+first\+\_\+byname()}{p.}{oggz__comments_8h_a9512049b88784d2a36b54cdb8a73a988} as a simple "{}get"{} function.\doxysubsection{Writing comments}\label{oggz__comments_8h_comments_set}
For writing, Oggz contains API methods for adding comments (\doxyref{oggz\+\_\+comment\+\_\+add()}{p.}{oggz__comments_8h_ade23081a738d67bec473bdaf317a68d8} and \doxyref{oggz\+\_\+comment\+\_\+add\+\_\+byname()}{p.}{oggz__comments_8h_ad869a8a7246567ba4162183436127a6f}), for removing comments (\doxyref{oggz\+\_\+comment\+\_\+remove()}{p.}{oggz__comments_8h_a75ca47a020dcddce846a320481120a8e} and \doxyref{oggz\+\_\+comment\+\_\+remove\+\_\+byname()}{p.}{oggz__comments_8h_aa0f3f3a3ea3ca28d8678b94495634876}) and for setting the vendor string (\doxyref{oggz\+\_\+comment\+\_\+set\+\_\+vendor()}{p.}{oggz__comments_8h_a281a0956a9a160337f7d00f102d18131}). 

\doxysubsection{Function Documentation}
\index{oggz\_comments.h@{oggz\_comments.h}!oggz\_comment\_add@{oggz\_comment\_add}}
\index{oggz\_comment\_add@{oggz\_comment\_add}!oggz\_comments.h@{oggz\_comments.h}}
\doxysubsubsection{oggz\_comment\_add()}
{\footnotesize\ttfamily \label{oggz__comments_8h_ade23081a738d67bec473bdaf317a68d8} 
int oggz\+\_\+comment\+\_\+add (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{long}]{serialno}{, }\item[{\textbf{ Oggz\+Comment} $\ast$}]{comment}{}\end{DoxyParamCaption})}



Add a comment. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A OGGZ$\ast$ handle (created with mode OGGZ\+\_\+\+WRITE) \\
\hline
{\em serialno} & Identify a logical bitstream within {\itshape oggz} \\
\hline
{\em comment} & The comment to add \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & Success \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD} & {\itshape oggz} is not a valid OGGZ$\ast$ handle \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+INVALID} & Operation not suitable for this \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+OUT\+\_\+\+OF\+\_\+\+MEMORY} & Out of memory \\
\hline
\end{DoxyRetVals}
\index{oggz\_comments.h@{oggz\_comments.h}!oggz\_comment\_add\_byname@{oggz\_comment\_add\_byname}}
\index{oggz\_comment\_add\_byname@{oggz\_comment\_add\_byname}!oggz\_comments.h@{oggz\_comments.h}}
\doxysubsubsection{oggz\_comment\_add\_byname()}
{\footnotesize\ttfamily \label{oggz__comments_8h_ad869a8a7246567ba4162183436127a6f} 
int oggz\+\_\+comment\+\_\+add\+\_\+byname (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{long}]{serialno}{, }\item[{const char $\ast$}]{name}{, }\item[{const char $\ast$}]{value}{}\end{DoxyParamCaption})}



Add a comment by name and value. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A OGGZ$\ast$ handle (created with mode OGGZ\+\_\+\+WRITE) \\
\hline
{\em serialno} & Identify a logical bitstream within {\itshape oggz} \\
\hline
{\em name} & The name of the comment to add \\
\hline
{\em value} & The contents of the comment to add \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & Success \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD} & {\itshape oggz} is not a valid OGGZ$\ast$ handle \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+INVALID} & Operation not suitable for this \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+OUT\+\_\+\+OF\+\_\+\+MEMORY} & Out of memory \\
\hline
\end{DoxyRetVals}
\index{oggz\_comments.h@{oggz\_comments.h}!oggz\_comment\_first@{oggz\_comment\_first}}
\index{oggz\_comment\_first@{oggz\_comment\_first}!oggz\_comments.h@{oggz\_comments.h}}
\doxysubsubsection{oggz\_comment\_first()}
{\footnotesize\ttfamily \label{oggz__comments_8h_ae7ddb018e19458f7bc516225cb55a7cb} 
const \textbf{ Oggz\+Comment} $\ast$ oggz\+\_\+comment\+\_\+first (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{long}]{serialno}{}\end{DoxyParamCaption})}



Retrieve the first comment. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A OGGZ$\ast$ handle \\
\hline
{\em serialno} & Identify a logical bitstream within {\itshape oggz} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A read-\/only copy of the first comment. 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em NULL} & No comments exist for this OGGZ$\ast$ object, or {\itshape serialno} does not identify an existing logical bitstream in {\itshape oggz}. \\
\hline
\end{DoxyRetVals}
\index{oggz\_comments.h@{oggz\_comments.h}!oggz\_comment\_first\_byname@{oggz\_comment\_first\_byname}}
\index{oggz\_comment\_first\_byname@{oggz\_comment\_first\_byname}!oggz\_comments.h@{oggz\_comments.h}}
\doxysubsubsection{oggz\_comment\_first\_byname()}
{\footnotesize\ttfamily \label{oggz__comments_8h_a9512049b88784d2a36b54cdb8a73a988} 
const \textbf{ Oggz\+Comment} $\ast$ oggz\+\_\+comment\+\_\+first\+\_\+byname (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{long}]{serialno}{, }\item[{char $\ast$}]{name}{}\end{DoxyParamCaption})}



Retrieve the first comment with a given name. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A OGGZ$\ast$ handle \\
\hline
{\em serialno} & Identify a logical bitstream within {\itshape oggz} \\
\hline
{\em name} & the name of the comment to retrieve. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A read-\/only copy of the first comment matching the given {\itshape name}. 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em NULL} & No match was found, or {\itshape serialno} does not identify an existing logical bitstream in {\itshape oggz}. \\
\hline
\end{DoxyRetVals}
\begin{DoxyNote}{Note}
If {\itshape name} is NULL, the behaviour is the same as for \doxyref{oggz\+\_\+comment\+\_\+first()}{p.}{oggz__comments_8h_ae7ddb018e19458f7bc516225cb55a7cb} 
\end{DoxyNote}
\index{oggz\_comments.h@{oggz\_comments.h}!oggz\_comment\_get\_vendor@{oggz\_comment\_get\_vendor}}
\index{oggz\_comment\_get\_vendor@{oggz\_comment\_get\_vendor}!oggz\_comments.h@{oggz\_comments.h}}
\doxysubsubsection{oggz\_comment\_get\_vendor()}
{\footnotesize\ttfamily \label{oggz__comments_8h_ac0966fcb30b6af0559012065cc3f1f53} 
const char $\ast$ oggz\+\_\+comment\+\_\+get\+\_\+vendor (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{long}]{serialno}{}\end{DoxyParamCaption})}



Retrieve the vendor string. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A OGGZ$\ast$ handle \\
\hline
{\em serialno} & Identify a logical bitstream within {\itshape oggz} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A read-\/only copy of the vendor string. 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em NULL} & No vendor string is associated with {\itshape oggz}, or {\itshape oggz} is NULL, or {\itshape serialno} does not identify an existing logical bitstream in {\itshape oggz}. \\
\hline
\end{DoxyRetVals}
\index{oggz\_comments.h@{oggz\_comments.h}!oggz\_comment\_next@{oggz\_comment\_next}}
\index{oggz\_comment\_next@{oggz\_comment\_next}!oggz\_comments.h@{oggz\_comments.h}}
\doxysubsubsection{oggz\_comment\_next()}
{\footnotesize\ttfamily \label{oggz__comments_8h_ac79c35c9b2370935a6aa018931e0e561} 
const \textbf{ Oggz\+Comment} $\ast$ oggz\+\_\+comment\+\_\+next (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{long}]{serialno}{, }\item[{const \textbf{ Oggz\+Comment} $\ast$}]{comment}{}\end{DoxyParamCaption})}



Retrieve the next comment. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A OGGZ$\ast$ handle \\
\hline
{\em serialno} & Identify a logical bitstream within {\itshape oggz} \\
\hline
{\em comment} & The previous comment. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A read-\/only copy of the comment immediately following the given comment. 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em NULL} & {\itshape serialno} does not identify an existing logical bitstream in {\itshape oggz}. \\
\hline
\end{DoxyRetVals}
\index{oggz\_comments.h@{oggz\_comments.h}!oggz\_comment\_next\_byname@{oggz\_comment\_next\_byname}}
\index{oggz\_comment\_next\_byname@{oggz\_comment\_next\_byname}!oggz\_comments.h@{oggz\_comments.h}}
\doxysubsubsection{oggz\_comment\_next\_byname()}
{\footnotesize\ttfamily \label{oggz__comments_8h_ac719165380a85c77056faf7e8814507e} 
const \textbf{ Oggz\+Comment} $\ast$ oggz\+\_\+comment\+\_\+next\+\_\+byname (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{long}]{serialno}{, }\item[{const \textbf{ Oggz\+Comment} $\ast$}]{comment}{}\end{DoxyParamCaption})}



Retrieve the next comment following and with the same name as a given comment. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A OGGZ$\ast$ handle \\
\hline
{\em serialno} & Identify a logical bitstream within {\itshape oggz} \\
\hline
{\em comment} & A comment \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A read-\/only copy of the next comment with the same name as {\itshape comment}. 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em NULL} & No further comments with the same name exist for this OGGZ$\ast$ object, or {\itshape serialno} does not identify an existing logical bitstream in {\itshape oggz}. \\
\hline
\end{DoxyRetVals}
\index{oggz\_comments.h@{oggz\_comments.h}!oggz\_comment\_remove@{oggz\_comment\_remove}}
\index{oggz\_comment\_remove@{oggz\_comment\_remove}!oggz\_comments.h@{oggz\_comments.h}}
\doxysubsubsection{oggz\_comment\_remove()}
{\footnotesize\ttfamily \label{oggz__comments_8h_a75ca47a020dcddce846a320481120a8e} 
int oggz\+\_\+comment\+\_\+remove (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{long}]{serialno}{, }\item[{\textbf{ Oggz\+Comment} $\ast$}]{comment}{}\end{DoxyParamCaption})}



Remove a comment. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A OGGZ$\ast$ handle (created with OGGZ\+\_\+\+WRITE) \\
\hline
{\em serialno} & Identify a logical bitstream within {\itshape oggz} \\
\hline
{\em comment} & The comment to remove. \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 1} & Success\+: comment removed \\
\hline
{\em 0} & No-\/op\+: comment not found, nothing to remove \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD} & {\itshape oggz} is not a valid OGGZ$\ast$ handle \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+INVALID} & Operation not suitable for this \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD\+\_\+\+SERIALNO} & {\itshape serialno} does not identify an existing logical bitstream in {\itshape oggz}. \\
\hline
\end{DoxyRetVals}
\index{oggz\_comments.h@{oggz\_comments.h}!oggz\_comment\_remove\_byname@{oggz\_comment\_remove\_byname}}
\index{oggz\_comment\_remove\_byname@{oggz\_comment\_remove\_byname}!oggz\_comments.h@{oggz\_comments.h}}
\doxysubsubsection{oggz\_comment\_remove\_byname()}
{\footnotesize\ttfamily \label{oggz__comments_8h_aa0f3f3a3ea3ca28d8678b94495634876} 
int oggz\+\_\+comment\+\_\+remove\+\_\+byname (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{long}]{serialno}{, }\item[{char $\ast$}]{name}{}\end{DoxyParamCaption})}



Remove all comments with a given name. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A OGGZ$\ast$ handle (created with OGGZ\+\_\+\+WRITE) \\
\hline
{\em serialno} & Identify a logical bitstream within {\itshape oggz} \\
\hline
{\em name} & The name of the comments to remove \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em $>$= 0} & The number of comments removed \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD} & {\itshape oggz} is not a valid OGGZ$\ast$ handle \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+INVALID} & Operation not suitable for this \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD\+\_\+\+SERIALNO} & {\itshape serialno} does not identify an existing logical bitstream in {\itshape oggz}. \\
\hline
\end{DoxyRetVals}
\index{oggz\_comments.h@{oggz\_comments.h}!oggz\_comment\_set\_vendor@{oggz\_comment\_set\_vendor}}
\index{oggz\_comment\_set\_vendor@{oggz\_comment\_set\_vendor}!oggz\_comments.h@{oggz\_comments.h}}
\doxysubsubsection{oggz\_comment\_set\_vendor()}
{\footnotesize\ttfamily \label{oggz__comments_8h_a281a0956a9a160337f7d00f102d18131} 
int oggz\+\_\+comment\+\_\+set\+\_\+vendor (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{long}]{serialno}{, }\item[{const char $\ast$}]{vendor\+\_\+string}{}\end{DoxyParamCaption})}



Set the vendor string. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A OGGZ$\ast$ handle \\
\hline
{\em serialno} & Identify a logical bitstream within {\itshape oggz} \\
\hline
{\em vendor\+\_\+string} & The contents of the vendor string to add \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & Success \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+BAD} & {\itshape oggz} is not a valid OGGZ$\ast$ handle \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+INVALID} & Operation not suitable for this \doxyref{OGGZ}{p.}{oggz_8h_a672d218df13da45a4b41d5366211bfee} \\
\hline
{\em OGGZ\+\_\+\+ERR\+\_\+\+OUT\+\_\+\+OF\+\_\+\+MEMORY} & Out of memory \\
\hline
\end{DoxyRetVals}
\begin{DoxyNote}{Note}
The vendor string should identify the library used to produce the stream, e.\+g. libvorbis 1.\+0 used "{}\+Xiph.\+Org lib\+Vorbis I 20020717"{}. If copying a bitstream it should be the same as the source. 
\end{DoxyNote}
\index{oggz\_comments.h@{oggz\_comments.h}!oggz\_comments\_generate@{oggz\_comments\_generate}}
\index{oggz\_comments\_generate@{oggz\_comments\_generate}!oggz\_comments.h@{oggz\_comments.h}}
\doxysubsubsection{oggz\_comments\_generate()}
{\footnotesize\ttfamily \label{oggz__comments_8h_a90b562c6a44549655737fc5bff416481} 
ogg\+\_\+packet $\ast$ oggz\+\_\+comments\+\_\+generate (\begin{DoxyParamCaption}\item[{\textbf{ OGGZ} $\ast$}]{oggz}{, }\item[{long}]{serialno}{, }\item[{int}]{FLAC\+\_\+final\+\_\+metadata\+\_\+block}{}\end{DoxyParamCaption})}



Output a comment packet for the specified stream. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A OGGZ$\ast$ handle (created with OGGZ\+\_\+\+WRITE) \\
\hline
{\em serialno} & Identify a logical bitstream within {\itshape oggz} \\
\hline
{\em FLAC\+\_\+final\+\_\+metadata\+\_\+block} & Set this to zero unless the packet\+\_\+type is FLAC, and there are no further metadata blocks to follow. See note below for details. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A comment packet for the stream. When no longer needed it should be freed with \doxyref{oggz\+\_\+packet\+\_\+destroy()}{p.}{oggz__comments_8h_a9301332e99b0397cff54c3593595b809}. 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em NULL} & content type does not support comments, not enough memory or comment was too long for FLAC \\
\hline
\end{DoxyRetVals}
\begin{DoxyNote}{Note}
FLAC streams may contain multiple metadata blocks of different types. When encapsulated in Ogg the first of these must be a Vorbis comment packet but PADDING, APPLICATION, SEEKTABLE, CUESHEET and PICTURE may follow. The last metadata block must have its first bit set to 1. Since liboggz does not know whether you will supply more metadata blocks you must tell it if this is the last (or only) metadata block by setting FLAC\+\_\+final\+\_\+metadata\+\_\+block to 1. ~\newline
 As FLAC metadata blocks are limited in size to 16MB minus 1 byte, this function will refuse to produce longer comment packets for FLAC. ~\newline
 See {\texttt{ http\+://flac.\+sourceforge.\+net/format.\+html}} for more details. 
\end{DoxyNote}
\index{oggz\_comments.h@{oggz\_comments.h}!oggz\_packet\_destroy@{oggz\_packet\_destroy}}
\index{oggz\_packet\_destroy@{oggz\_packet\_destroy}!oggz\_comments.h@{oggz\_comments.h}}
\doxysubsubsection{oggz\_packet\_destroy()}
{\footnotesize\ttfamily \label{oggz__comments_8h_a9301332e99b0397cff54c3593595b809} 
void oggz\+\_\+packet\+\_\+destroy (\begin{DoxyParamCaption}\item[{ogg\+\_\+packet $\ast$}]{packet}{}\end{DoxyParamCaption})}



Free a packet and its payload. 


\begin{DoxyParams}{Parameters}
{\em packet} & A packet previously returned from a function such as \doxyref{oggz\+\_\+comment\+\_\+generate()}{p.}{oggz__deprecated_8h_a0089f101033898f6758e5fd172181b34}. User generated packets should not be passed. \\
\hline
\end{DoxyParams}
