flac.h

Go to the documentation of this file.
00001 /*
00002  * FLAC (Free Lossless Audio Codec) decoder/demuxer common functions
00003  * Copyright (c) 2008 Justin Ruggles
00004  *
00005  * This file is part of FFmpeg.
00006  *
00007  * FFmpeg is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * FFmpeg is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with FFmpeg; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00020  */
00021 
00022 /**
00023  * @file flac.h
00024  * FLAC (Free Lossless Audio Codec) decoder/demuxer common functions
00025  */
00026 
00027 #ifndef FFMPEG_FLAC_H
00028 #define FFMPEG_FLAC_H
00029 
00030 #include "avcodec.h"
00031 
00032 /**
00033  * Data needed from the Streaminfo header for use by the raw FLAC demuxer
00034  * and/or the FLAC decoder.
00035  */
00036 #define FLACSTREAMINFO \
00037     int min_blocksize;      /**< minimum block size, in samples          */\
00038     int max_blocksize;      /**< maximum block size, in samples          */\
00039     int max_framesize;      /**< maximum frame size, in bytes            */\
00040     int samplerate;         /**< sample rate                             */\
00041     int channels;           /**< number of channels                      */\
00042     int bps;                /**< bits-per-sample                         */\
00043 
00044 typedef struct FLACStreaminfo {
00045     FLACSTREAMINFO
00046 } FLACStreaminfo;
00047 
00048 /**
00049  * Parse the Streaminfo metadata block
00050  * @param[out] avctx   codec context to set basic stream parameters
00051  * @param[out] s       where parsed information is stored
00052  * @param[in]  buffer  pointer to start of 34-byte streaminfo data
00053  */
00054 void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
00055                               const uint8_t *buffer);
00056 
00057 #endif /* FFMPEG_FLAC_H */

Generated on Fri Jan 9 15:44:29 2009 for libextractor by  doxygen 1.5.1