\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
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ Oggz\+Comment}
\begin{DoxyCompactList}\small\item\em A comment. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
const char $\ast$ \textbf{ oggz\+\_\+comment\+\_\+get\+\_\+vendor} (\textbf{ O\+G\+GZ} $\ast$oggz, long serialno)
\begin{DoxyCompactList}\small\item\em Retrieve the vendor string. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+comment\+\_\+set\+\_\+vendor} (\textbf{ O\+G\+GZ} $\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{ O\+G\+GZ} $\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{ O\+G\+GZ} $\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{ O\+G\+GZ} $\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{ O\+G\+GZ} $\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{ O\+G\+GZ} $\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{ O\+G\+GZ} $\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{ O\+G\+GZ} $\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{ O\+G\+GZ} $\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{ O\+G\+GZ} $\ast$oggz, long serialno, int F\+L\+A\+C\+\_\+final\+\_\+metadata\+\_\+block)
\begin{DoxyCompactList}\small\item\em Output a comment packet for the specified stream. \end{DoxyCompactList}\item 
\mbox{\label{oggz__comments_8h_a486cd52284cb03032360265d2027f8db}} 
int {\bfseries oggz\+\_\+comments\+\_\+copy} (\textbf{ O\+G\+GZ} $\ast$src, long src\+\_\+serialno, \textbf{ O\+G\+GZ} $\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 \char`\"{}\+Vorbiscomment\char`\"{}, defined {\texttt{ here}}. Many standard comment names (such as T\+I\+T\+LE, C\+O\+P\+Y\+R\+I\+G\+HT and G\+E\+N\+RE) are defined in that document.

The following general features of Vorbiscomment are relevant to this A\+PI\+:
\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_ae5d522df5fce262953d8bb5cb8c00b00}.

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 A\+S\+C\+II 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 U\+T\+F-\/8 string.
\end{DoxyItemize}\doxysubsection{Reading comments}\label{oggz__comments_8h_comments_get}
Oggz contains A\+PI methods to iterate through all comments associated with the logical bitstreams of an O\+G\+G\+Z$\ast$ handle (\doxyref{oggz\+\_\+comment\+\_\+first()}{p.}{oggz__comments_8h_a306a979d84b61932930d44ea5d4f95d9} and \doxyref{oggz\+\_\+comment\+\_\+next()}{p.}{oggz__comments_8h_a9501d8c166187c8d503e1335827b2d5e}, and to iterate through comments matching a particular name (\doxyref{oggz\+\_\+comment\+\_\+first\+\_\+byname()}{p.}{oggz__comments_8h_a9a3a72be012b6474a1e1d95f7ce7afe8} and \doxyref{oggz\+\_\+comment\+\_\+next\+\_\+byname()}{p.}{oggz__comments_8h_a1dd05e02a121ba639b8012acaa21a37c}). Given that multiple comments may exist with the same {\itshape name}, you should not use \doxyref{oggz\+\_\+comment\+\_\+first\+\_\+byname()}{p.}{oggz__comments_8h_a9a3a72be012b6474a1e1d95f7ce7afe8} as a simple \char`\"{}get\char`\"{} function.\doxysubsection{Writing comments}\label{oggz__comments_8h_comments_set}
For writing, Oggz contains A\+PI 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}
\mbox{\label{oggz__comments_8h_ade23081a738d67bec473bdaf317a68d8}} 
\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 int oggz\+\_\+comment\+\_\+add (\begin{DoxyParamCaption}\item[{\textbf{ O\+G\+GZ} $\ast$}]{oggz,  }\item[{long}]{serialno,  }\item[{\textbf{ Oggz\+Comment} $\ast$}]{comment }\end{DoxyParamCaption})}



Add a comment. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A O\+G\+G\+Z$\ast$ handle (created with mode O\+G\+G\+Z\+\_\+\+W\+R\+I\+TE) \\
\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 O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+B\+AD} & {\itshape oggz} is not a valid O\+G\+G\+Z$\ast$ handle \\
\hline
{\em O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+ID} & Operation not suitable for this O\+G\+GZ \\
\hline
{\em O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+O\+U\+T\+\_\+\+O\+F\+\_\+\+M\+E\+M\+O\+RY} & Out of memory \\
\hline
\end{DoxyRetVals}
\mbox{\label{oggz__comments_8h_ad869a8a7246567ba4162183436127a6f}} 
\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 int oggz\+\_\+comment\+\_\+add\+\_\+byname (\begin{DoxyParamCaption}\item[{\textbf{ O\+G\+GZ} $\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 O\+G\+G\+Z$\ast$ handle (created with mode O\+G\+G\+Z\+\_\+\+W\+R\+I\+TE) \\
\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 O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+B\+AD} & {\itshape oggz} is not a valid O\+G\+G\+Z$\ast$ handle \\
\hline
{\em O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+ID} & Operation not suitable for this O\+G\+GZ \\
\hline
{\em O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+O\+U\+T\+\_\+\+O\+F\+\_\+\+M\+E\+M\+O\+RY} & Out of memory \\
\hline
\end{DoxyRetVals}
\mbox{\label{oggz__comments_8h_a306a979d84b61932930d44ea5d4f95d9}} 
\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 const \textbf{ Oggz\+Comment}$\ast$ oggz\+\_\+comment\+\_\+first (\begin{DoxyParamCaption}\item[{\textbf{ O\+G\+GZ} $\ast$}]{oggz,  }\item[{long}]{serialno }\end{DoxyParamCaption})}



Retrieve the first comment. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A O\+G\+G\+Z$\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 N\+U\+LL} & No comments exist for this O\+G\+G\+Z$\ast$ object, or {\itshape serialno} does not identify an existing logical bitstream in {\itshape oggz}. \\
\hline
\end{DoxyRetVals}
\mbox{\label{oggz__comments_8h_a9a3a72be012b6474a1e1d95f7ce7afe8}} 
\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 const \textbf{ Oggz\+Comment}$\ast$ oggz\+\_\+comment\+\_\+first\+\_\+byname (\begin{DoxyParamCaption}\item[{\textbf{ O\+G\+GZ} $\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 O\+G\+G\+Z$\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 N\+U\+LL} & 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 N\+U\+LL, the behaviour is the same as for \doxyref{oggz\+\_\+comment\+\_\+first()}{p.}{oggz__comments_8h_a306a979d84b61932930d44ea5d4f95d9} 
\end{DoxyNote}
\mbox{\label{oggz__comments_8h_ae5d522df5fce262953d8bb5cb8c00b00}} 
\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 const char$\ast$ oggz\+\_\+comment\+\_\+get\+\_\+vendor (\begin{DoxyParamCaption}\item[{\textbf{ O\+G\+GZ} $\ast$}]{oggz,  }\item[{long}]{serialno }\end{DoxyParamCaption})}



Retrieve the vendor string. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A O\+G\+G\+Z$\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 N\+U\+LL} & No vendor string is associated with {\itshape oggz}, or {\itshape oggz} is N\+U\+LL, or {\itshape serialno} does not identify an existing logical bitstream in {\itshape oggz}. \\
\hline
\end{DoxyRetVals}
\mbox{\label{oggz__comments_8h_a9501d8c166187c8d503e1335827b2d5e}} 
\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 const \textbf{ Oggz\+Comment}$\ast$ oggz\+\_\+comment\+\_\+next (\begin{DoxyParamCaption}\item[{\textbf{ O\+G\+GZ} $\ast$}]{oggz,  }\item[{long}]{serialno,  }\item[{const \textbf{ Oggz\+Comment} $\ast$}]{comment }\end{DoxyParamCaption})}



Retrieve the next comment. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A O\+G\+G\+Z$\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 N\+U\+LL} & {\itshape serialno} does not identify an existing logical bitstream in {\itshape oggz}. \\
\hline
\end{DoxyRetVals}
\mbox{\label{oggz__comments_8h_a1dd05e02a121ba639b8012acaa21a37c}} 
\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 const \textbf{ Oggz\+Comment}$\ast$ oggz\+\_\+comment\+\_\+next\+\_\+byname (\begin{DoxyParamCaption}\item[{\textbf{ O\+G\+GZ} $\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 O\+G\+G\+Z$\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 N\+U\+LL} & No further comments with the same name exist for this O\+G\+G\+Z$\ast$ object, or {\itshape serialno} does not identify an existing logical bitstream in {\itshape oggz}. \\
\hline
\end{DoxyRetVals}
\mbox{\label{oggz__comments_8h_a75ca47a020dcddce846a320481120a8e}} 
\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 int oggz\+\_\+comment\+\_\+remove (\begin{DoxyParamCaption}\item[{\textbf{ O\+G\+GZ} $\ast$}]{oggz,  }\item[{long}]{serialno,  }\item[{\textbf{ Oggz\+Comment} $\ast$}]{comment }\end{DoxyParamCaption})}



Remove a comment. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A O\+G\+G\+Z$\ast$ handle (created with O\+G\+G\+Z\+\_\+\+W\+R\+I\+TE) \\
\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 O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+B\+AD} & {\itshape oggz} is not a valid O\+G\+G\+Z$\ast$ handle \\
\hline
{\em O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+ID} & Operation not suitable for this 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 identify an existing logical bitstream in {\itshape oggz}. \\
\hline
\end{DoxyRetVals}
\mbox{\label{oggz__comments_8h_aa0f3f3a3ea3ca28d8678b94495634876}} 
\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 int oggz\+\_\+comment\+\_\+remove\+\_\+byname (\begin{DoxyParamCaption}\item[{\textbf{ O\+G\+GZ} $\ast$}]{oggz,  }\item[{long}]{serialno,  }\item[{char $\ast$}]{name }\end{DoxyParamCaption})}



Remove all comments with a given name. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A O\+G\+G\+Z$\ast$ handle (created with O\+G\+G\+Z\+\_\+\+W\+R\+I\+TE) \\
\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 O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+B\+AD} & {\itshape oggz} is not a valid O\+G\+G\+Z$\ast$ handle \\
\hline
{\em O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+ID} & Operation not suitable for this 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 identify an existing logical bitstream in {\itshape oggz}. \\
\hline
\end{DoxyRetVals}
\mbox{\label{oggz__comments_8h_a281a0956a9a160337f7d00f102d18131}} 
\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 int oggz\+\_\+comment\+\_\+set\+\_\+vendor (\begin{DoxyParamCaption}\item[{\textbf{ O\+G\+GZ} $\ast$}]{oggz,  }\item[{long}]{serialno,  }\item[{const char $\ast$}]{vendor\+\_\+string }\end{DoxyParamCaption})}



Set the vendor string. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A O\+G\+G\+Z$\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 O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+B\+AD} & {\itshape oggz} is not a valid O\+G\+G\+Z$\ast$ handle \\
\hline
{\em O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+ID} & Operation not suitable for this O\+G\+GZ \\
\hline
{\em O\+G\+G\+Z\+\_\+\+E\+R\+R\+\_\+\+O\+U\+T\+\_\+\+O\+F\+\_\+\+M\+E\+M\+O\+RY} & 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 \char`\"{}\+Xiph.\+Org lib\+Vorbis I 20020717\char`\"{}. If copying a bitstream it should be the same as the source. 
\end{DoxyNote}
\mbox{\label{oggz__comments_8h_a1ee69481fa517d80e63db962a23d53ae}} 
\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 ogg\+\_\+packet$\ast$ oggz\+\_\+comments\+\_\+generate (\begin{DoxyParamCaption}\item[{\textbf{ O\+G\+GZ} $\ast$}]{oggz,  }\item[{long}]{serialno,  }\item[{int}]{F\+L\+A\+C\+\_\+final\+\_\+metadata\+\_\+block }\end{DoxyParamCaption})}



Output a comment packet for the specified stream. 


\begin{DoxyParams}{Parameters}
{\em oggz} & A O\+G\+G\+Z$\ast$ handle (created with O\+G\+G\+Z\+\_\+\+W\+R\+I\+TE) \\
\hline
{\em serialno} & Identify a logical bitstream within {\itshape oggz} \\
\hline
{\em F\+L\+A\+C\+\_\+final\+\_\+metadata\+\_\+block} & Set this to zero unless the packet\+\_\+type is F\+L\+AC, 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 N\+U\+LL} & content type does not support comments, not enough memory or comment was too long for F\+L\+AC \\
\hline
\end{DoxyRetVals}
\begin{DoxyNote}{Note}
F\+L\+AC streams may contain multiple metadata blocks of different types. When encapsulated in Ogg the first of these must be a Vorbis comment packet but P\+A\+D\+D\+I\+NG, A\+P\+P\+L\+I\+C\+A\+T\+I\+ON, S\+E\+E\+K\+T\+A\+B\+LE, C\+U\+E\+S\+H\+E\+ET and P\+I\+C\+T\+U\+RE 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 F\+L\+A\+C\+\_\+final\+\_\+metadata\+\_\+block to 1. ~\newline
 As F\+L\+AC metadata blocks are limited in size to 16MB minus 1 byte, this function will refuse to produce longer comment packets for F\+L\+AC. ~\newline
 See {\texttt{ http\+://flac.\+sourceforge.\+net/format.\+html}} for more details. 
\end{DoxyNote}
\mbox{\label{oggz__comments_8h_a9301332e99b0397cff54c3593595b809}} 
\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 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_aab908fe161372aceb99f98a3be54ead5}. User generated packets should not be passed. \\
\hline
\end{DoxyParams}
