]> git.sesse.net Git - ffmpeg/blob - libavformat/riff.h
912ad0d5d67d80532f52969ad54dbd038072b907
[ffmpeg] / libavformat / riff.h
1 /*
2  * RIFF codec tags
3  * copyright (c) 2000 Fabrice Bellard
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19
20 #ifndef FF_RIFF_H
21 #define FF_RIFF_H
22
23 offset_t start_tag(ByteIOContext *pb, const char *tag);
24 void end_tag(ByteIOContext *pb, offset_t start);
25
26 typedef struct CodecTag {
27     int id;
28     unsigned int tag;
29     unsigned int invalid_asf : 1;
30 } CodecTag;
31
32 void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const CodecTag *tags, int for_asf);
33 int put_wav_header(ByteIOContext *pb, AVCodecContext *enc);
34 int wav_codec_get_id(unsigned int tag, int bps);
35 void get_wav_header(ByteIOContext *pb, AVCodecContext *codec, int size);
36
37 extern const CodecTag codec_bmp_tags[];
38 extern const CodecTag codec_wav_tags[];
39
40 unsigned int codec_get_tag(const CodecTag *tags, int id);
41 enum CodecID codec_get_id(const CodecTag *tags, unsigned int tag);
42 unsigned int codec_get_bmp_tag(int id);
43 unsigned int codec_get_wav_tag(int id);
44 enum CodecID codec_get_bmp_id(unsigned int tag);
45 enum CodecID codec_get_wav_id(unsigned int tag);
46 unsigned int codec_get_asf_tag(const CodecTag *tags, unsigned int id);
47 void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssize, int *au_scale);
48
49 #endif