libavformat/id3v2.c File Reference

#include "id3v2.h"
#include "id3v1.h"
#include "libavutil/avstring.h"
#include "libavutil/intreadwrite.h"
#include "metadata.h"

Go to the source code of this file.

Functions

int ff_id3v2_match (const uint8_t *buf, const char *magic)
 Detect ID3v2 Header.
int ff_id3v2_tag_len (const uint8_t *buf)
 Get the length of an ID3v2 tag.
void ff_id3v2_read (AVFormatContext *s, const char *magic)
 Read an ID3v2 tag.
static unsigned int get_size (ByteIOContext *s, int len)
static void read_ttag (AVFormatContext *s, ByteIOContext *pb, int taglen, const char *key)
void ff_id3v2_parse (AVFormatContext *s, int len, uint8_t version, uint8_t flags)
 ID3v2 parser Handles ID3v2.2, 2.3 and 2.4.

Variables

const AVMetadataConv ff_id3v2_metadata_conv []
const char ff_id3v2_tags [][4]
 A list of ID3v2.4 text information frames.


Function Documentation

int ff_id3v2_match ( const uint8_t *  buf,
const char *  magic 
)

Detect ID3v2 Header.

Parameters:
buf must be ID3v2_HEADER_SIZE byte long
magic magic bytes to identify the header, machine byte order. If in doubt, use ID3v2_DEFAULT_MAGIC.

Definition at line 28 of file id3v2.c.

Referenced by av_probe_input_format2(), ff_id3v2_read(), and oma_read_probe().

void ff_id3v2_parse ( AVFormatContext s,
int  len,
uint8_t  version,
uint8_t  flags 
)

ID3v2 parser Handles ID3v2.2, 2.3 and 2.4.

Definition at line 165 of file id3v2.c.

Referenced by ff_id3v2_read().

void ff_id3v2_read ( AVFormatContext s,
const char *  magic 
)

Read an ID3v2 tag.

Definition at line 53 of file id3v2.c.

Referenced by av_open_input_stream(), and oma_read_header().

int ff_id3v2_tag_len ( const uint8_t *  buf  ) 

Get the length of an ID3v2 tag.

Parameters:
buf must be ID3v2_HEADER_SIZE bytes long and point to the start of an already detected ID3v2 tag

Definition at line 41 of file id3v2.c.

Referenced by av_probe_input_format2(), and oma_read_probe().

static unsigned int get_size ( ByteIOContext s,
int  len 
) [static]

Definition at line 80 of file id3v2.c.

Referenced by ff_id3v2_parse().

static void read_ttag ( AVFormatContext s,
ByteIOContext pb,
int  taglen,
const char *  key 
) [static]

Definition at line 88 of file id3v2.c.

Referenced by ff_id3v2_parse().


Variable Documentation

Definition at line 279 of file id3v2.c.

Referenced by ff_id3v2_parse(), and mp3_write_header().

const char ff_id3v2_tags[][4]

Initial value:

 {
   "TALB", "TBPM", "TCOM", "TCON", "TCOP", "TDEN", "TDLY", "TDOR", "TDRC",
   "TDRL", "TDTG", "TENC", "TEXT", "TFLT", "TIPL", "TIT1", "TIT2", "TIT3",
   "TKEY", "TLAN", "TLEN", "TMCL", "TMED", "TMOO", "TOAL", "TOFN", "TOLY",
   "TOPE", "TOWN", "TPE1", "TPE2", "TPE3", "TPE4", "TPOS", "TPRO", "TPUB",
   "TRCK", "TRSN", "TRSO", "TSOA", "TSOP", "TSOT", "TSRC", "TSSE", "TSST",
   { 0 },
}
A list of ID3v2.4 text information frames.

http://www.id3.org/id3v2.4.0-frames

Definition at line 311 of file id3v2.c.

Referenced by mp3_write_header().


Generated on Wed Jan 19 23:49:50 2011 for FFmpeg by  doxygen 1.5.6