mp3dec.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
#include "libavutil/mathematics.h"
#include "avformat.h"
#include "internal.h"
#include "id3v2.h"
#include "id3v1.h"
#include "libavcodec/mpegaudiodecheader.h"
Include dependency graph for mp3dec.c:

Go to the source code of this file.

Data Structures

struct  MP3DecContext
 

Macros

#define XING_FLAG_FRAMES   0x01
 
#define XING_FLAG_SIZE   0x02
 
#define XING_FLAG_TOC   0x04
 
#define XING_TOC_COUNT   100
 
#define MP3_PACKET_SIZE   1024
 
#define MIN_VALID   3
 

Functions

static int mp3_read_probe (AVProbeData *p)
 
static void read_xing_toc (AVFormatContext *s, int64_t filesize, int64_t duration)
 
static int mp3_parse_vbr_tags (AVFormatContext *s, AVStream *st, int64_t base)
 Try to find Xing/Info/VBRI tags and compute duration from info therein. More...
 
static int mp3_read_header (AVFormatContext *s)
 
static int mp3_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int check (AVFormatContext *s, int64_t pos)
 
static int mp3_seek (AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
 

Variables

AVInputFormat ff_mp3_demuxer
 

Macro Definition Documentation

#define MIN_VALID   3

Referenced by mp3_seek().

#define MP3_PACKET_SIZE   1024

Definition at line 225 of file mp3dec.c.

Referenced by mp3_read_packet().

#define XING_FLAG_FRAMES   0x01

Definition at line 32 of file mp3dec.c.

Referenced by mp3_parse_vbr_tags().

#define XING_FLAG_SIZE   0x02

Definition at line 33 of file mp3dec.c.

Referenced by mp3_parse_vbr_tags().

#define XING_FLAG_TOC   0x04

Definition at line 34 of file mp3dec.c.

Referenced by mp3_parse_vbr_tags().

#define XING_TOC_COUNT   100

Definition at line 36 of file mp3dec.c.

Referenced by read_xing_toc().

Function Documentation

static int check ( AVFormatContext s,
int64_t  pos 
)
static

Definition at line 258 of file mp3dec.c.

Referenced by mp3_seek().

static int mp3_parse_vbr_tags ( AVFormatContext s,
AVStream st,
int64_t  base 
)
static

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

Definition at line 114 of file mp3dec.c.

Referenced by mp3_read_header().

static int mp3_read_header ( AVFormatContext s)
static

Definition at line 191 of file mp3dec.c.

static int mp3_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 227 of file mp3dec.c.

static int mp3_read_probe ( AVProbeData p)
static

Definition at line 47 of file mp3dec.c.

static int mp3_seek ( AVFormatContext s,
int  stream_index,
int64_t  timestamp,
int  flags 
)
static

Definition at line 273 of file mp3dec.c.

static void read_xing_toc ( AVFormatContext s,
int64_t  filesize,
int64_t  duration 
)
static

Definition at line 89 of file mp3dec.c.

Referenced by mp3_parse_vbr_tags().

Variable Documentation

AVInputFormat ff_mp3_demuxer
Initial value:
= {
.name = "mp3",
.long_name = NULL_IF_CONFIG_SMALL("MP2/3 (MPEG audio layer 2/3)"),
.read_probe = mp3_read_probe,
.read_header = mp3_read_header,
.read_packet = mp3_read_packet,
.read_seek = mp3_seek,
.priv_data_size = sizeof(MP3DecContext),
.extensions = "mp2,mp3,m2a",
}
static int mp3_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: mp3dec.c:227
static int mp3_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Definition: mp3dec.c:273
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static int mp3_read_header(AVFormatContext *s)
Definition: mp3dec.c:191
static int mp3_read_probe(AVProbeData *p)
Definition: mp3dec.c:47
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition: avformat.h:353
static int flags
Definition: cpu.c:23

Definition at line 319 of file mp3dec.c.