riff.h 1.8 KB
Newer Older
1 2 3 4
/*
 * RIFF codec tags
 * copyright (c) 2000 Fabrice Bellard
 *
5 6 7
 * This file is part of FFmpeg.
 *
 * FFmpeg is free software; you can redistribute it and/or
8 9
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
10
 * version 2.1 of the License, or (at your option) any later version.
11
 *
12
 * FFmpeg is distributed in the hope that it will be useful,
13 14 15 16 17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * 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 20 21
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

22 23 24 25 26 27
/**
 * @file riff.h
 * internal header for RIFF based (de)muxers
 * do NOT include this in end user applications
 */

28 29
#ifndef AVFORMAT_RIFF_H
#define AVFORMAT_RIFF_H
30

31
#include "libavcodec/avcodec.h"
32 33
#include "avio.h"

34 35
int64_t start_tag(ByteIOContext *pb, const char *tag);
void end_tag(ByteIOContext *pb, int64_t start);
36

37
typedef struct AVCodecTag {
38 39
    int id;
    unsigned int tag;
40
} AVCodecTag;
41

42
void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const AVCodecTag *tags, int for_asf);
43 44 45 46
int put_wav_header(ByteIOContext *pb, AVCodecContext *enc);
int wav_codec_get_id(unsigned int tag, int bps);
void get_wav_header(ByteIOContext *pb, AVCodecContext *codec, int size);

47 48
extern const AVCodecTag codec_bmp_tags[];
extern const AVCodecTag codec_wav_tags[];
49

50 51
unsigned int codec_get_tag(const AVCodecTag *tags, int id);
enum CodecID codec_get_id(const AVCodecTag *tags, unsigned int tag);
52 53
void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssize, int *au_scale);

54
#endif /* AVFORMAT_RIFF_H */