FFmpeg
Loading...
Searching...
No Matches
comment.h File Reference

Go to the source code of this file.

Functions

int ff_vorbis_comment_length (const AVDictionary *m, const char *vendor_string, AVChapter **chapters, unsigned int nb_chapters)
 Calculate the length in bytes of a VorbisComment.
 
int ff_vorbis_comment_write (AVIOContext *pb, const AVDictionary *m, const char *vendor_string, AVChapter **chapters, unsigned int nb_chapters)
 Write a VorbisComment into an AVIOContext.
 
int ff_vorbis_comment_read (AVFormatContext *ms, AVDictionary **m, const uint8_t *buf, int size, int parse_picture)
 Parse Vorbis comments.
 
int ff_vorbis_comment_read_stream (AVFormatContext *as, AVStream *st, const uint8_t *buf, int size)
 Parse Vorbis comments and add metadata to an AVStream.
 

Variables

const AVMetadataConv ff_vorbis_comment_metadata_conv []
 VorbisComment metadata conversion mapping.
 

Function Documentation

◆ ff_vorbis_comment_length()

int ff_vorbis_comment_length ( const AVDictionary * m,
const char * vendor_string,
AVChapter ** chapters,
unsigned int nb_chapters )

Calculate the length in bytes of a VorbisComment.

This is the minimum size required by ff_vorbis_comment_write().

Parameters
mThe metadata structure to be parsed. For no metadata, set to NULL.
vendor_stringThe vendor string to be added into the VorbisComment. For no string, set to an empty string.
Returns
The length in bytes.

Definition at line 44 of file writer.c.

Referenced by flac_write_block_comment(), and ogg_write_vorbiscomment().

◆ ff_vorbis_comment_write()

int ff_vorbis_comment_write ( AVIOContext * pb,
const AVDictionary * m,
const char * vendor_string,
AVChapter ** chapters,
unsigned int nb_chapters )

Write a VorbisComment into an AVIOContext.

The output size can be obtained in advance by passing the same chapters, AVDictionary and vendor_string to ff_vorbis_comment_length()

Parameters
pbThe AVIOContext to write the output.
mThe metadata struct to write.
vendor_stringThe vendor string to write.
chaptersThe chapters to write.
nb_chaptersThe number of chapters to write.

Definition at line 62 of file writer.c.

Referenced by ff_vorbis_comment_length(), flac_write_block_comment(), and ogg_write_vorbiscomment().

◆ ff_vorbis_comment_read()

int ff_vorbis_comment_read ( AVFormatContext * ms,
AVDictionary ** m,
const uint8_t * buf,
int size,
int parse_picture )

Parse Vorbis comments.

Note
The buffer will be temporarily modified by this function, so it needs to be writable. Furthermore it must be padded by a single byte (not counted in size). All changes will have been reverted upon return.

Definition at line 148 of file reader.c.

Referenced by ff_vorbis_comment_read_stream(), and flac_read_header().

◆ ff_vorbis_comment_read_stream()

int ff_vorbis_comment_read_stream ( AVFormatContext * as,
AVStream * st,
const uint8_t * buf,
int size )

Parse Vorbis comments and add metadata to an AVStream.

Note
The buffer will be temporarily modified by this function, so it needs to be writable. Furthermore it must be padded by a single byte (not counted in size). All changes will have been reverted upon return.

Definition at line 73 of file reader.c.

Referenced by ff_vorbis_update_metadata(), flac_header(), ogm_header(), opus_header(), speex_header(), theora_header(), and vp8_header().

Variable Documentation

◆ ff_vorbis_comment_metadata_conv

const AVMetadataConv ff_vorbis_comment_metadata_conv[]
extern

VorbisComment metadata conversion mapping.

from Ogg Vorbis I format specification: comment field and header specification http://xiph.org/vorbis/doc/v-comment.html

Definition at line 34 of file writer.c.

Referenced by ff_vorbis_comment_read(), flac_write_block_comment(), and ogg_write_vorbiscomment().