Update preset files documentation to match with r16795.
[ffmpeg-lucabe.git] / libavcodec / flac.h
blob02b41e1f998b7143f7cf8d23bccf6dfde3c1d162
1 /*
2 * FLAC (Free Lossless Audio Codec) decoder/demuxer common functions
3 * Copyright (c) 2008 Justin Ruggles
5 * This file is part of FFmpeg.
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 /**
23 * @file flac.h
24 * FLAC (Free Lossless Audio Codec) decoder/demuxer common functions
27 #ifndef AVCODEC_FLAC_H
28 #define AVCODEC_FLAC_H
30 #include "avcodec.h"
32 #define FLAC_STREAMINFO_SIZE 34
34 enum {
35 FLAC_METADATA_TYPE_STREAMINFO = 0,
36 FLAC_METADATA_TYPE_PADDING,
37 FLAC_METADATA_TYPE_APPLICATION,
38 FLAC_METADATA_TYPE_SEEKTABLE,
39 FLAC_METADATA_TYPE_VORBIS_COMMENT,
40 FLAC_METADATA_TYPE_CUESHEET,
41 FLAC_METADATA_TYPE_PICTURE,
42 FLAC_METADATA_TYPE_INVALID = 127
45 /**
46 * Data needed from the Streaminfo header for use by the raw FLAC demuxer
47 * and/or the FLAC decoder.
49 #define FLACSTREAMINFO \
50 int min_blocksize; /**< minimum block size, in samples */\
51 int max_blocksize; /**< maximum block size, in samples */\
52 int max_framesize; /**< maximum frame size, in bytes */\
53 int samplerate; /**< sample rate */\
54 int channels; /**< number of channels */\
55 int bps; /**< bits-per-sample */\
56 int64_t samples; /**< total number of samples */\
58 typedef struct FLACStreaminfo {
59 FLACSTREAMINFO
60 } FLACStreaminfo;
62 /**
63 * Parse the Streaminfo metadata block
64 * @param[out] avctx codec context to set basic stream parameters
65 * @param[out] s where parsed information is stored
66 * @param[in] buffer pointer to start of 34-byte streaminfo data
68 void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
69 const uint8_t *buffer);
71 #endif /* AVCODEC_FLAC_H */