mp3.c File Reference

Go to the source code of this file.

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)
static void id3v2_put_size (AVFormatContext *s, int size)
static void id3v2_put_ttag (AVFormatContext *s, char *string, uint32_t tag)
static int mp3_write_header (struct AVFormatContext *s)
 Write an ID3v2.4 header at beginning of stream.
static int mp3_write_packet (struct AVFormatContext *s, AVPacket *pkt)
static int mp3_write_trailer (struct AVFormatContext *s)

Variables

static const char * id3v1_genre_str [ID3v1_GENRE_MAX+1]
AVInputFormat mp3_demuxer
AVOutputFormat mp2_muxer
AVOutputFormat mp3_muxer


Function Documentation

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 unsigned int id3v2_get_size ( ByteIOContext s,
int  len 
) [static]

Definition at line 174 of file mp3.c.

Referenced by id3v2_parse().

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 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 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 void id3v1_create_tag ( AVFormatContext s,
uint8_t *  buf 
) [static]

Definition at line 360 of file mp3.c.

Referenced by mp3_write_trailer().

static int mp3_read_probe ( AVProbeData p  )  [static]

Definition at line 393 of file mp3.c.

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 431 of file mp3.c.

Referenced by mp3_read_header().

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

Definition at line 475 of file mp3.c.

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

Definition at line 531 of file mp3.c.

static int mp3_read_close ( AVFormatContext s  )  [static]

Definition at line 550 of file mp3.c.

static void id3v2_put_size ( AVFormatContext s,
int  size 
) [static]

Definition at line 558 of file mp3.c.

Referenced by id3v2_put_ttag(), and mp3_write_header().

static void id3v2_put_ttag ( AVFormatContext s,
char *  string,
uint32_t  tag 
) [static]

Definition at line 566 of file mp3.c.

Referenced by mp3_write_header().

static int mp3_write_header ( struct AVFormatContext s  )  [static]

Write an ID3v2.4 header at beginning of stream.

Definition at line 581 of file mp3.c.

static int mp3_write_packet ( struct AVFormatContext s,
AVPacket pkt 
) [static]

Definition at line 623 of file mp3.c.

static int mp3_write_trailer ( struct AVFormatContext s  )  [static]

Definition at line 630 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().

Initial value:

 {
    "mp3",
    "MPEG audio",
    0,
    mp3_read_probe,
    mp3_read_header,
    mp3_read_packet,
    mp3_read_close,
    .flags= AVFMT_GENERIC_INDEX,
    .extensions = "mp2,mp3,m2a", 
}

Definition at line 645 of file mp3.c.

Initial value:

 {
    "mp2",
    "MPEG audio layer 2",
    "audio/x-mpeg",
#ifdef CONFIG_LIBMP3LAME
    "mp2,m2a",
#else
    "mp2,mp3,m2a",
#endif
    0,
    CODEC_ID_MP2,
    0,
    NULL,
    mp3_write_packet,
    mp3_write_trailer,
}

Definition at line 658 of file mp3.c.

Initial value:

 {
    "mp3",
    "MPEG audio layer 3",
    "audio/x-mpeg",
    "mp3",
    0,
    CODEC_ID_MP3,
    0,
    mp3_write_header,
    mp3_write_packet,
    mp3_write_trailer,
}

Definition at line 676 of file mp3.c.


Generated on Sat Dec 18 05:15:54 2010 for MythTV by  doxygen 1.5.5