27 #ifndef AVCODEC_FLAC_H 28 #define AVCODEC_FLAC_H 31 #include "bytestream.h" 34 #define FLAC_STREAMINFO_SIZE 34 35 #define FLAC_MAX_CHANNELS 8 36 #define FLAC_MIN_BLOCKSIZE 16 37 #define FLAC_MAX_BLOCKSIZE 65535 38 #define FLAC_MIN_FRAME_SIZE 11 41 FLAC_CHMODE_INDEPENDENT = 0,
42 FLAC_CHMODE_LEFT_SIDE = 1,
43 FLAC_CHMODE_RIGHT_SIDE = 2,
44 FLAC_CHMODE_MID_SIDE = 3,
48 FLAC_METADATA_TYPE_STREAMINFO = 0,
49 FLAC_METADATA_TYPE_PADDING,
50 FLAC_METADATA_TYPE_APPLICATION,
51 FLAC_METADATA_TYPE_SEEKTABLE,
52 FLAC_METADATA_TYPE_VORBIS_COMMENT,
53 FLAC_METADATA_TYPE_CUESHEET,
54 FLAC_METADATA_TYPE_PICTURE,
55 FLAC_METADATA_TYPE_INVALID = 127
58 enum FLACExtradataFormat {
59 FLAC_EXTRADATA_FORMAT_STREAMINFO = 0,
60 FLAC_EXTRADATA_FORMAT_FULL_HEADER = 1
63 #define FLACCOMMONINFO \ 72 #define FLACSTREAMINFO \ 86 int64_t frame_or_sample_num;
102 const uint8_t *buffer);
112 enum FLACExtradataFormat *format,
113 uint8_t **streaminfo_start);
143 static av_always_inline
void flac_parse_block_header(
const uint8_t *block_header,
144 int *last,
int *type,
int *size)
146 int tmp = bytestream_get_byte(&block_header);
152 *size = bytestream_get_be24(&block_header);
int ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s, const uint8_t *buffer)
Parse the Streaminfo metadata block.
Definition: flac.c:204
int ff_flac_is_extradata_valid(AVCodecContext *avctx, enum FLACExtradataFormat *format, uint8_t **streaminfo_start)
Validate the FLAC extradata.
Definition: flac.c:169
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.
Definition: flac.c:148
bitstream reader API header.
int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, FLACFrameInfo *fi, int log_level_offset)
Validate and decode a frame header.
Definition: flac.c:50
#define FLACCOMMONINFO
bits-per-sample
Definition: flac.h:63
#define FLACSTREAMINFO
Data needed from the Streaminfo header for use by the raw FLAC demuxer and/or the FLAC decoder...
Definition: flac.h:73
Libavcodec external API header.
main external API structure.
Definition: avcodec.h:1518
Definition: get_bits.h:56