FFmpeg
Functions | Variables
vorbis_parser.c File Reference
#include "libavutil/log.h"
#include "get_bits.h"
#include "parser.h"
#include "xiph.h"
#include "vorbis_parser_internal.h"

Go to the source code of this file.

Functions

static int parse_id_header (AVVorbisParseContext *s, const uint8_t *buf, int buf_size)
 
static int parse_setup_header (AVVorbisParseContext *s, const uint8_t *buf, int buf_size)
 
static int vorbis_parse_init (AVVorbisParseContext *s, const uint8_t *extradata, int extradata_size)
 
int av_vorbis_parse_frame_flags (AVVorbisParseContext *s, const uint8_t *buf, int buf_size, int *flags)
 Get the duration for a Vorbis packet. More...
 
int av_vorbis_parse_frame (AVVorbisParseContext *s, const uint8_t *buf, int buf_size)
 Get the duration for a Vorbis packet. More...
 
void av_vorbis_parse_reset (AVVorbisParseContext *s)
 
void av_vorbis_parse_free (AVVorbisParseContext **s)
 Free the parser and everything associated with it. More...
 
AVVorbisParseContextav_vorbis_parse_init (const uint8_t *extradata, int extradata_size)
 Allocate and initialize the Vorbis parser using headers in the extradata. More...
 

Variables

static const AVClass vorbis_parser_class
 

Detailed Description

Vorbis audio parser

Determines the duration for each packet.

Definition in file vorbis_parser.c.

Function Documentation

◆ parse_id_header()

static int parse_id_header ( AVVorbisParseContext s,
const uint8_t buf,
int  buf_size 
)
static

Definition at line 41 of file vorbis_parser.c.

Referenced by vorbis_parse_init().

◆ parse_setup_header()

static int parse_setup_header ( AVVorbisParseContext s,
const uint8_t buf,
int  buf_size 
)
static

Definition at line 73 of file vorbis_parser.c.

Referenced by vorbis_parse_init().

◆ vorbis_parse_init()

static int vorbis_parse_init ( AVVorbisParseContext s,
const uint8_t extradata,
int  extradata_size 
)
static

Definition at line 184 of file vorbis_parser.c.

Referenced by av_vorbis_parse_init().

◆ av_vorbis_parse_frame_flags()

int av_vorbis_parse_frame_flags ( AVVorbisParseContext s,
const uint8_t buf,
int  buf_size,
int flags 
)

Get the duration for a Vorbis packet.

If flags is NULL, special frames are considered invalid.

Parameters
sVorbis parser context
bufbuffer containing a Vorbis frame
buf_sizesize of the buffer
flagsflags for special frames

Definition at line 213 of file vorbis_parser.c.

Referenced by av_vorbis_parse_frame(), and vorbis_packet().

◆ av_vorbis_parse_frame()

int av_vorbis_parse_frame ( AVVorbisParseContext s,
const uint8_t buf,
int  buf_size 
)

Get the duration for a Vorbis packet.

Parameters
sVorbis parser context
bufbuffer containing a Vorbis frame
buf_sizesize of the buffer

Definition at line 264 of file vorbis_parser.c.

Referenced by libvorbis_encode_frame().

◆ av_vorbis_parse_reset()

void av_vorbis_parse_reset ( AVVorbisParseContext s)

Definition at line 270 of file vorbis_parser.c.

Referenced by vorbis_packet().

◆ av_vorbis_parse_free()

void av_vorbis_parse_free ( AVVorbisParseContext **  s)

Free the parser and everything associated with it.

Definition at line 276 of file vorbis_parser.c.

Referenced by av_vorbis_parse_init(), libvorbis_encode_close(), and vorbis_cleanup().

◆ av_vorbis_parse_init()

AVVorbisParseContext* av_vorbis_parse_init ( const uint8_t extradata,
int  extradata_size 
)

Allocate and initialize the Vorbis parser using headers in the extradata.

Definition at line 281 of file vorbis_parser.c.

Referenced by libvorbis_encode_init(), and vorbis_header().

Variable Documentation

◆ vorbis_parser_class

const AVClass vorbis_parser_class
static
Initial value:
= {
.class_name = "Vorbis parser",
.item_name = av_default_item_name,
}

Definition at line 35 of file vorbis_parser.c.

Referenced by vorbis_parse_init().

LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191