#include "avcodec.h"
#include "get_bits.h"
Go to the source code of this file.
Data Structures | |
struct | FLACStreaminfo |
struct | FLACFrameInfo |
Defines | |
#define | FLAC_STREAMINFO_SIZE 34 |
#define | FLAC_MAX_CHANNELS 8 |
#define | FLAC_MIN_BLOCKSIZE 16 |
#define | FLAC_MAX_BLOCKSIZE 65535 |
#define | FLAC_MIN_FRAME_SIZE 11 |
#define | FLACCOMMONINFO |
bits-per-sample | |
#define | FLACSTREAMINFO |
Data needed from the Streaminfo header for use by the raw FLAC demuxer and/or the FLAC decoder. | |
Enumerations | |
enum | { FLAC_CHMODE_INDEPENDENT = 0, FLAC_CHMODE_LEFT_SIDE = 8, FLAC_CHMODE_RIGHT_SIDE = 9, FLAC_CHMODE_MID_SIDE = 10 } |
enum | { FLAC_METADATA_TYPE_STREAMINFO = 0, FLAC_METADATA_TYPE_PADDING, FLAC_METADATA_TYPE_APPLICATION, FLAC_METADATA_TYPE_SEEKTABLE, FLAC_METADATA_TYPE_VORBIS_COMMENT, FLAC_METADATA_TYPE_CUESHEET, FLAC_METADATA_TYPE_PICTURE, FLAC_METADATA_TYPE_INVALID = 127 } |
enum | FLACExtradataFormat { FLAC_EXTRADATA_FORMAT_STREAMINFO = 0, FLAC_EXTRADATA_FORMAT_FULL_HEADER = 1 } |
Functions | |
void | ff_flac_parse_streaminfo (AVCodecContext *avctx, struct FLACStreaminfo *s, const uint8_t *buffer) |
Parse the Streaminfo metadata block. | |
int | ff_flac_is_extradata_valid (AVCodecContext *avctx, enum FLACExtradataFormat *format, uint8_t **streaminfo_start) |
Validate the FLAC extradata. | |
void | ff_flac_parse_block_header (const uint8_t *block_header, int *last, int *type, int *size) |
Parse the metadata block parameters from the header. | |
int | ff_flac_get_max_frame_size (int blocksize, int ch, int bps) |
Calculate an estimate for the maximum frame size based on verbatim mode. | |
int | ff_flac_decode_frame_header (AVCodecContext *avctx, GetBitContext *gb, FLACFrameInfo *fi, int log_level_offset) |
Validate and decode a frame header. |
Definition in file flac.h.
#define FLAC_MAX_BLOCKSIZE 65535 |
Definition at line 36 of file flac.h.
Referenced by decode_frame(), flac_decode_frame(), and flac_encode_init().
#define FLAC_MAX_CHANNELS 8 |
Definition at line 34 of file flac.h.
Referenced by ff_flac_decode_frame_header(), flac_decode_frame(), and flac_encode_init().
#define FLAC_MIN_BLOCKSIZE 16 |
Definition at line 35 of file flac.h.
Referenced by ff_flac_parse_streaminfo(), and flac_encode_init().
#define FLAC_MIN_FRAME_SIZE 11 |
#define FLAC_STREAMINFO_SIZE 34 |
Definition at line 33 of file flac.h.
Referenced by ff_flac_is_extradata_valid(), ff_flac_parse_streaminfo(), flac_encode_init(), flac_header(), flac_read_header(), flac_write_trailer(), ogg_build_flac_headers(), parse_streaminfo(), and write_streaminfo().
#define FLACCOMMONINFO |
#define FLACSTREAMINFO |
Value:
FLACCOMMONINFO \ int max_blocksize; \ int max_framesize; \ int64_t samples;
total number of samples
anonymous enum |
anonymous enum |
enum FLACExtradataFormat |
int ff_flac_decode_frame_header | ( | AVCodecContext * | avctx, | |
GetBitContext * | gb, | |||
FLACFrameInfo * | fi, | |||
int | log_level_offset | |||
) |
Validate and decode a frame header.
avctx | AVCodecContext to use as av_log() context | |
gb | GetBitContext from which to read frame header | |
[out] | fi | frame information |
log_level_offset | log level offset. can be used to silence error messages. |
Definition at line 36 of file flac.c.
Referenced by decode_frame(), and frame_header_is_valid().
int ff_flac_get_max_frame_size | ( | int | blocksize, | |
int | ch, | |||
int | bps | |||
) |
Calculate an estimate for the maximum frame size based on verbatim mode.
blocksize | block size, in samples | |
ch | number of channels | |
bps | bits-per-sample |
Definition at line 136 of file flac.c.
Referenced by flac_decode_frame(), flac_encode_frame(), and flac_encode_init().
int ff_flac_is_extradata_valid | ( | AVCodecContext * | avctx, | |
enum FLACExtradataFormat * | format, | |||
uint8_t ** | streaminfo_start | |||
) |
Validate the FLAC extradata.
[in] | avctx | codec context containing the extradata. |
[out] | format | extradata format. |
[out] | streaminfo_start | pointer to start of 34-byte STREAMINFO data. |
Definition at line 68 of file flacdec.c.
Referenced by ff_flac_write_header(), flac_decode_init(), flac_write_trailer(), and ogg_build_flac_headers().
void ff_flac_parse_block_header | ( | const uint8_t * | block_header, | |
int * | last, | |||
int * | type, | |||
int * | size | |||
) |
Parse the metadata block parameters from the header.
[in] | block_header | header data, at least 4 bytes |
[out] | last | indicator for last metadata block |
[out] | type | metadata block type |
[out] | size | metadata block size |
Definition at line 179 of file flacdec.c.
Referenced by flac_read_header(), get_metadata_size(), and parse_streaminfo().
void ff_flac_parse_streaminfo | ( | AVCodecContext * | avctx, | |
struct FLACStreaminfo * | s, | |||
const uint8_t * | buffer | |||
) |
Parse the Streaminfo metadata block.
[out] | avctx | codec context to set basic stream parameters |
[out] | s | where parsed information is stored |
[in] | buffer | pointer to start of 34-byte streaminfo data |
Definition at line 145 of file flacdec.c.
Referenced by flac_decode_init(), flac_header(), flac_read_header(), and parse_streaminfo().