libavformat/mp3.c File Reference

#include "avformat.h"
#include "mpegaudio.h"
#include "avstring.h"
#include "mpegaudiodecheader.h"

Go to the source code of this file.

Defines

#define ID3v2_HEADER_SIZE   10
#define ID3v1_TAG_SIZE   128
#define ID3v1_GENRE_MAX   125
#define MP3_PACKET_SIZE   1024

Functions

static int id3v2_match (const uint8_t *buf)
static unsigned int id3v2_get_size (ByteIOContext *s, int len)
static void id3v2_read_ttag (AVFormatContext *s, int taglen, char *dst, int dstlen)
static void id3v2_parse (AVFormatContext *s, int len, uint8_t version, uint8_t flags)
 ID3v2 parser.
static void id3v1_get_string (char *str, int str_size, const uint8_t *buf, int buf_size)
static int id3v1_parse_tag (AVFormatContext *s, const uint8_t *buf)
static void id3v1_create_tag (AVFormatContext *s, uint8_t *buf)
static int mp3_read_probe (AVProbeData *p)
static void mp3_parse_vbr_tags (AVFormatContext *s, AVStream *st, offset_t base)
 Try to find Xing/Info/VBRI tags and compute duration from info therein.
static int mp3_read_header (AVFormatContext *s, AVFormatParameters *ap)
static int mp3_read_packet (AVFormatContext *s, AVPacket *pkt)
static int mp3_read_close (AVFormatContext *s)

Variables

static const char * id3v1_genre_str [ID3v1_GENRE_MAX+1]


Define Documentation

#define ID3v1_GENRE_MAX   125

Definition at line 29 of file mp3.c.

Referenced by id3v1_create_tag(), and id3v1_parse_tag().

#define ID3v1_TAG_SIZE   128

Definition at line 27 of file mp3.c.

Referenced by id3v1_create_tag(), and mp3_read_header().

#define ID3v2_HEADER_SIZE   10

Definition at line 26 of file mp3.c.

Referenced by mp3_read_header().

#define MP3_PACKET_SIZE   1024

Definition at line 530 of file mp3.c.

Referenced by mp3_read_packet().


Function Documentation

static void id3v1_create_tag ( AVFormatContext s,
uint8_t buf 
) [static]

Definition at line 360 of file mp3.c.

static void id3v1_get_string ( char *  str,
int  str_size,
const uint8_t buf,
int  buf_size 
) [static]

Definition at line 318 of file mp3.c.

Referenced by id3v1_parse_tag().

static int id3v1_parse_tag ( AVFormatContext s,
const uint8_t buf 
) [static]

Definition at line 337 of file mp3.c.

Referenced by mp3_read_header().

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

Definition at line 174 of file mp3.c.

Referenced by id3v2_parse().

static int id3v2_match ( const uint8_t buf  )  [static]

Definition at line 161 of file mp3.c.

Referenced by mp3_read_header(), and mp3_read_probe().

static void id3v2_parse ( AVFormatContext s,
int  len,
uint8_t  version,
uint8_t  flags 
) [static]

ID3v2 parser.

Handles ID3v2.2, 2.3 and 2.4.

Definition at line 219 of file mp3.c.

Referenced by mp3_read_header().

static void id3v2_read_ttag ( AVFormatContext s,
int  taglen,
char *  dst,
int  dstlen 
) [static]

Definition at line 182 of file mp3.c.

Referenced by id3v2_parse().

static void mp3_parse_vbr_tags ( AVFormatContext s,
AVStream st,
offset_t  base 
) [static]

Try to find Xing/Info/VBRI tags and compute duration from info therein.

Definition at line 432 of file mp3.c.

Referenced by mp3_read_header().

static int mp3_read_close ( AVFormatContext s  )  [static]

Definition at line 551 of file mp3.c.

static int mp3_read_header ( AVFormatContext s,
AVFormatParameters ap 
) [static]

Definition at line 476 of file mp3.c.

static int mp3_read_packet ( AVFormatContext s,
AVPacket pkt 
) [static]

Definition at line 532 of file mp3.c.

static int mp3_read_probe ( AVProbeData p  )  [static]

Definition at line 393 of file mp3.c.


Variable Documentation

const char* id3v1_genre_str[ID3v1_GENRE_MAX+1] [static]

Definition at line 31 of file mp3.c.

Referenced by id3v1_create_tag(), and id3v1_parse_tag().


Generated on Thu Apr 2 07:16:14 2009 for ffmpeg by  doxygen 1.5.6