2 * Flash Compatible Streaming Format common header.
3 * Copyright (c) 2000 Fabrice Bellard
4 * Copyright (c) 2003 Tinic Uro
6 * This file is part of Libav.
8 * Libav is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * Libav is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with Libav; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 #ifndef AVFORMAT_SWF_H
24 #define AVFORMAT_SWF_H
26 #include "libavutil/fifo.h"
29 #include "riff.h" /* for CodecTag */
31 /* should have a generic way to indicate probable size */
32 #define DUMMY_FILE_SIZE (100 * 1024 * 1024)
33 #define DUMMY_DURATION 600 /* in seconds */
36 #define TAG_SHOWFRAME 1
37 #define TAG_DEFINESHAPE 2
38 #define TAG_FREECHARACTER 3
39 #define TAG_PLACEOBJECT 4
40 #define TAG_REMOVEOBJECT 5
41 #define TAG_STREAMHEAD 18
42 #define TAG_STREAMBLOCK 19
44 #define TAG_PLACEOBJECT2 26
45 #define TAG_STREAMHEAD2 45
46 #define TAG_VIDEOSTREAM 60
47 #define TAG_VIDEOFRAME 61
48 #define TAG_FILEATTRIBUTES 69
50 #define TAG_LONG 0x100
52 /* flags for shape definition */
53 #define FLAG_MOVETO 0x01
54 #define FLAG_SETFILL0 0x02
55 #define FLAG_SETFILL1 0x04
57 #define AUDIO_FIFO_SIZE 65536
59 /* character id used */
71 int samples_per_frame;
74 int video_frame_number;
77 AVFifoBuffer *audio_fifo;
78 AVCodecContext *audio_enc, *video_enc;
81 static const AVCodecTag swf_codec_tags[] = {
82 {CODEC_ID_FLV1, 0x02},
83 {CODEC_ID_VP6F, 0x04},
87 static const AVCodecTag swf_audio_codec_tags[] = {
88 {CODEC_ID_PCM_S16LE, 0x00},
89 {CODEC_ID_ADPCM_SWF, 0x01},
91 {CODEC_ID_PCM_S16LE, 0x03},
92 //{CODEC_ID_NELLYMOSER, 0x06},
96 #endif /* AVFORMAT_SWF_H */