libopusenc  0.1.1
Stand-alone encoder library for .opus files.
 All Data Structures Functions Variables Typedefs Modules
Comments Handling

Functions for handling comments

These functions make it possible to add comments and pictures to Ogg Opus files.

OPE_EXPORT OggOpusComments * ope_comments_create (void)
 Create a new comments object. More...
 
OPE_EXPORT OggOpusComments * ope_comments_copy (OggOpusComments *comments)
 Create a deep copy of a comments object. More...
 
OPE_EXPORT void ope_comments_destroy (OggOpusComments *comments)
 Destroys a comments object. More...
 
OPE_EXPORT int ope_comments_add (OggOpusComments *comments, const char *tag, const char *val)
 Add a comment. More...
 
OPE_EXPORT int ope_comments_add_string (OggOpusComments *comments, const char *tag_and_val)
 Add a comment as a single tag=value string. More...
 
OPE_EXPORT int ope_comments_add_picture (OggOpusComments *comments, const char *filename, int picture_type, const char *description)
 Add a picture. More...
 

Detailed Description

Function Documentation

OPE_EXPORT OggOpusComments* ope_comments_create ( void  )

Create a new comments object.

Returns
Newly-created comments object.
OPE_EXPORT OggOpusComments* ope_comments_copy ( OggOpusComments *  comments)

Create a deep copy of a comments object.

Parameters
commentsComments object to copy
Returns
Deep copy of input.
OPE_EXPORT void ope_comments_destroy ( OggOpusComments *  comments)

Destroys a comments object.

Parameters
commentsComments object to destroy
OPE_EXPORT int ope_comments_add ( OggOpusComments *  comments,
const char *  tag,
const char *  val 
)

Add a comment.

Parameters
[in,out]commentsWhere to add the comments
tagTag for the comment (must not contain = char)
valValue for the tag
Returns
Error code
OPE_EXPORT int ope_comments_add_string ( OggOpusComments *  comments,
const char *  tag_and_val 
)

Add a comment as a single tag=value string.

Parameters
[in,out]commentsWhere to add the comments
tag_and_valstring of the form tag=value (must contain = char)
Returns
Error code
OPE_EXPORT int ope_comments_add_picture ( OggOpusComments *  comments,
const char *  filename,
int  picture_type,
const char *  description 
)

Add a picture.

Parameters
[in,out]commentsWhere to add the comments
filenameFile name for the picture
picture_typeType of picture (-1 for default)
descriptionDescription (NULL means no comment)
Returns
Error code