libavformat/metadata.c File Reference

#include <strings.h>
#include "avformat.h"
#include "metadata.h"

Go to the source code of this file.

Functions

AVMetadataTagav_metadata_get (AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags)
 Gets a metadata element with matching key.
int av_metadata_set2 (AVMetadata **pm, const char *key, const char *value, int flags)
 Sets the given tag in m, overwriting an existing tag.
int av_metadata_set (AVMetadata **pm, const char *key, const char *value)
 Sets the given tag in m, overwriting an existing tag.
void av_metadata_free (AVMetadata **pm)
 Frees all the memory allocated for an AVMetadata struct.
void metadata_conv (AVMetadata **pm, const AVMetadataConv *d_conv, const AVMetadataConv *s_conv)
void av_metadata_conv (AVFormatContext *ctx, const AVMetadataConv *d_conv, const AVMetadataConv *s_conv)
 Converts all the metadata sets from ctx according to the source and destination conversion tables.


Function Documentation

void av_metadata_conv ( struct AVFormatContext ctx,
const AVMetadataConv d_conv,
const AVMetadataConv s_conv 
)

Converts all the metadata sets from ctx according to the source and destination conversion tables.

If one of the tables is NULL, then tags are converted to/from ffmpeg generic tag names.

Parameters:
d_conv destination tags format conversion table
s_conv source tags format conversion table

Definition at line 142 of file metadata.c.

Referenced by av_transcode(), opt_output_file(), and show_format().

void av_metadata_free ( AVMetadata **  pm  ) 

AVMetadataTag* av_metadata_get ( AVMetadata m,
const char *  key,
const AVMetadataTag prev,
int  flags 
)

Gets a metadata element with matching key.

Parameters:
prev Set to the previous matching element to find the next. If set to NULL the first matching element is returned.
flags Allows case as well as suffix-insensitive comparisons.
Returns:
Found tag or NULL, changing key or value leads to undefined behavior.

Definition at line 26 of file metadata.c.

Referenced by asf_write_header1(), av_metadata_set2(), av_transcode(), av_write_header(), avi_write_header(), copy_chapters(), dump_format(), dump_metadata(), dump_stream_format(), ff_vorbiscomment_length(), ff_vorbiscomment_write(), metadata_conv(), mkv_write_chapters(), mkv_write_header(), mkv_write_tracks(), mov_write_3gp_udta_tag(), mov_write_chpl_tag(), mov_write_header(), mov_write_string_metadata(), mov_write_trkn_tag(), mov_write_uuidusmt_tag(), mpegts_write_header(), mpegts_write_pmt(), rv10_write_header(), show_format(), show_stream(), sox_write_header(), tta_read_header(), write_globalinfo(), and wv_read_header().

int av_metadata_set ( AVMetadata **  pm,
const char *  key,
const char *  value 
)

Sets the given tag in m, overwriting an existing tag.

Parameters:
key tag key to add to m (will be av_strduped)
value tag value to add to m (will be av_strduped)
Returns:
>= 0 on success otherwise an error code <0
Deprecated:
Use av_metadata_set2() instead.

Definition at line 90 of file metadata.c.

int av_metadata_set2 ( AVMetadata **  pm,
const char *  key,
const char *  value,
int  flags 
)

void metadata_conv ( AVMetadata **  pm,
const AVMetadataConv d_conv,
const AVMetadataConv s_conv 
)

Definition at line 110 of file metadata.c.

Referenced by av_metadata_conv(), and av_write_header().


Generated on Fri Oct 26 02:36:54 2012 for FFmpeg by  doxygen 1.5.8