FFmpeg
Loading...
Searching...
No Matches
mpegaudiodecheader.h File Reference

MPEG Audio header decoder. More...

#include <stdint.h>
#include "libavutil/attributes.h"
#include "codec_id.h"
#include "version_major.h"

Go to the source code of this file.

Data Structures

struct  MPADecodeHeader2
 Same as MPADecodeHeader, plus the header fields that carry no decoding information. More...
 

Macros

#define MP3_MASK   0xFFFE0CCF
 
#define FF_MPEGAUDIO_LEGACY_DECODE_HEADER   (LIBAVCODEC_VERSION_MAJOR < 64)
 

Functions

int avpriv_mpegaudio_decode_header2 (MPADecodeHeader2 **phdr, uint32_t header)
 Decode an MPEG audio header into *phdr, which is allocated if it is NULL.
 
int ff_mpegaudio_decode_header (MPADecodeHeader2 *s, uint32_t header)
 
int ff_mpa_decode_header (uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bitrate, enum AVCodecID *codec_id)
 
static int ff_mpa_check_header (uint32_t header)
 
static uint32_t ff_mpa_encode_header (const MPADecodeHeader2 *s)
 

Detailed Description

MPEG Audio header decoder.

Definition in file mpegaudiodecheader.h.

Macro Definition Documentation

◆ MP3_MASK

#define MP3_MASK   0xFFFE0CCF

Definition at line 37 of file mpegaudiodecheader.h.

Referenced by mp3_read_header(), and mp3_read_probe().

◆ FF_MPEGAUDIO_LEGACY_DECODE_HEADER

#define FF_MPEGAUDIO_LEGACY_DECODE_HEADER   (LIBAVCODEC_VERSION_MAJOR < 64)

Definition at line 39 of file mpegaudiodecheader.h.

Function Documentation

◆ avpriv_mpegaudio_decode_header2()

int avpriv_mpegaudio_decode_header2 ( MPADecodeHeader2 ** phdr,
uint32_t header )

Decode an MPEG audio header into *phdr, which is allocated if it is NULL.

The header must have been checked beforehand, as no consistency check is done here.

Returns
1 if free format was found and the frame size must be computed externally, 0 on success, a negative AVERROR code on failure

Definition at line 128 of file mpegaudiodecheader.c.

Referenced by check(), main(), mp3_parse_vbr_tags(), mp3_read_probe(), mp3_write_audio_packet(), and mp3_write_xing().

◆ ff_mpegaudio_decode_header()

int ff_mpegaudio_decode_header ( MPADecodeHeader2 * s,
uint32_t header )

◆ ff_mpa_decode_header()

int ff_mpa_decode_header ( uint32_t head,
int * sample_rate,
int * channels,
int * frame_size,
int * bitrate,
enum AVCodecID * codec_id )

Definition at line 176 of file mpegaudiodecheader.c.

Referenced by ffat_create_decoder(), and mpegaudio_parse().

◆ ff_mpa_check_header()

static int ff_mpa_check_header ( uint32_t header)
inlinestatic

◆ ff_mpa_encode_header()

static uint32_t ff_mpa_encode_header ( const MPADecodeHeader2 * s)
inlinestatic

Definition at line 128 of file mpegaudiodecheader.h.

Referenced by main(), and mp3_update_xing().