FFmpeg
|
Vorbis audio parser. More...
#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. | |
int | av_vorbis_parse_frame (AVVorbisParseContext *s, const uint8_t *buf, int buf_size) |
Get the duration for a Vorbis packet. | |
void | av_vorbis_parse_reset (AVVorbisParseContext *s) |
void | av_vorbis_parse_free (AVVorbisParseContext **s) |
Free the parser and everything associated with it. | |
AVVorbisParseContext * | av_vorbis_parse_init (const uint8_t *extradata, int extradata_size) |
Allocate and initialize the Vorbis parser using headers in the extradata. | |
int | avpriv_vorbis_parse_extradata (AVCodecContext *avctx, AVVorbisParseContext *s) |
Initialize the Vorbis parser using headers in the extradata. | |
void | avpriv_vorbis_parse_reset (AVVorbisParseContext *s) |
int | avpriv_vorbis_parse_frame (AVVorbisParseContext *s, const uint8_t *buf, int buf_size) |
Get the duration for a Vorbis packet. | |
int | avpriv_vorbis_parse_frame_flags (AVVorbisParseContext *s, const uint8_t *buf, int buf_size, int *flags) |
Get the duration for a Vorbis packet. | |
Variables | |
static const AVClass | vorbis_parser_class |
|
static |
Definition at line 41 of file vorbis_parser.c.
Referenced by vorbis_parse_init().
|
static |
Definition at line 73 of file vorbis_parser.c.
Referenced by vorbis_parse_init().
|
static |
Definition at line 184 of file vorbis_parser.c.
Referenced by av_vorbis_parse_init(), and avpriv_vorbis_parse_extradata().
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.
s | Vorbis parser context |
buf | buffer containing a Vorbis frame |
buf_size | size of the buffer |
flags | flags for special frames |
Definition at line 213 of file vorbis_parser.c.
Referenced by av_vorbis_parse_frame(), avpriv_vorbis_parse_frame_flags(), and vorbis_packet().
int av_vorbis_parse_frame | ( | AVVorbisParseContext * | s, |
const uint8_t * | buf, | ||
int | buf_size | ||
) |
Get the duration for a Vorbis packet.
s | Vorbis parser context |
buf | buffer containing a Vorbis frame |
buf_size | size of the buffer |
Definition at line 262 of file vorbis_parser.c.
Referenced by avpriv_vorbis_parse_frame(), and libvorbis_encode_frame().
void av_vorbis_parse_reset | ( | AVVorbisParseContext * | s | ) |
Definition at line 268 of file vorbis_parser.c.
Referenced by avpriv_vorbis_parse_reset(), and vorbis_packet().
void av_vorbis_parse_free | ( | AVVorbisParseContext ** | s | ) |
Free the parser and everything associated with it.
Definition at line 274 of file vorbis_parser.c.
Referenced by av_vorbis_parse_init(), libvorbis_encode_close(), and vorbis_cleanup().
AVVorbisParseContext* av_vorbis_parse_init | ( | const uint8_t * | extradata, |
int | extradata_size | ||
) |
Allocate and initialize the Vorbis parser using headers in the extradata.
avctx | codec context |
s | Vorbis parser context |
Definition at line 279 of file vorbis_parser.c.
Referenced by libvorbis_encode_init(), and vorbis_header().
int avpriv_vorbis_parse_extradata | ( | AVCodecContext * | avctx, |
AVVorbisParseContext * | s | ||
) |
Initialize the Vorbis parser using headers in the extradata.
avctx | codec context |
s | Vorbis parser context |
Definition at line 298 of file vorbis_parser.c.
void avpriv_vorbis_parse_reset | ( | AVVorbisParseContext * | s | ) |
Definition at line 302 of file vorbis_parser.c.
int avpriv_vorbis_parse_frame | ( | AVVorbisParseContext * | s, |
const uint8_t * | buf, | ||
int | buf_size | ||
) |
Get the duration for a Vorbis packet.
avpriv_vorbis_parse_extradata() must have been successfully called prior to this in order for a correct duration to be returned.
s | Vorbis parser context |
buf | buffer containing a Vorbis frame |
buf_size | size of the buffer |
Definition at line 306 of file vorbis_parser.c.
int avpriv_vorbis_parse_frame_flags | ( | AVVorbisParseContext * | s, |
const uint8_t * | buf, | ||
int | buf_size, | ||
int * | flags | ||
) |
Get the duration for a Vorbis packet.
avpriv_vorbis_parse_extradata() must have been successfully called prior to this in order for a correct duration to be returned. If flags
is NULL
, special frames are considered invalid.
s | Vorbis parser context |
buf | buffer containing a Vorbis frame |
buf_size | size of the buffer |
flags | flags for special frames |
Definition at line 311 of file vorbis_parser.c.
|
static |
Definition at line 35 of file vorbis_parser.c.
Referenced by vorbis_parse_init().