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.
OPE_EXPORT OggOpusComments * ope_comments_copy (OggOpusComments *comments)
 Create a deep copy of a comments object.
OPE_EXPORT void ope_comments_destroy (OggOpusComments *comments)
 Destroys a comments object.
OPE_EXPORT int ope_comments_add (OggOpusComments *comments, const char *tag, const char *val)
 Add a comment.
OPE_EXPORT int ope_comments_add_string (OggOpusComments *comments, const char *tag_and_val)
 Add a comment as a single tag=value string.
OPE_EXPORT int ope_comments_add_picture (OggOpusComments *comments, const char *filename, int picture_type, const char *description)
 Add a picture from a file.
OPE_EXPORT int ope_comments_add_picture_from_memory (OggOpusComments *comments, const char *ptr, size_t size, int picture_type, const char *description)
 Add a picture already in memory.

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:
comments Comments object to copy
Returns:
Deep copy of input.
OPE_EXPORT void ope_comments_destroy ( OggOpusComments *  comments  ) 

Destroys a comments object.

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

Add a comment.

Parameters:
[in,out] comments Where to add the comments
tag Tag for the comment (must not contain = char)
val Value 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] comments Where to add the comments
tag_and_val string 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 from a file.

Parameters:
[in,out] comments Where to add the comments
filename File name for the picture
picture_type Type of picture (-1 for default)
description Description (NULL means no comment)
Returns:
Error code
OPE_EXPORT int ope_comments_add_picture_from_memory ( OggOpusComments *  comments,
const char *  ptr,
size_t  size,
int  picture_type,
const char *  description 
)

Add a picture already in memory.

Parameters:
[in,out] comments Where to add the comments
ptr Pointer to picture in memory
size Size of picture pointed to by ptr
picture_type Type of picture (-1 for default)
description Description (NULL means no comment)
Returns:
Error code
 All Data Structures Variables

Generated on 10 Nov 2020 for libopusenc by  doxygen 1.6.1