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 FFmpeg.
8 * FFmpeg 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 * FFmpeg 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 FFmpeg; 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
32 #include "libavutil/fifo.h"
37 /* should have a generic way to indicate probable size */
38 #define DUMMY_FILE_SIZE (100 * 1024 * 1024)
39 #define DUMMY_DURATION 600 /* in seconds */
45 TAG_FREECHARACTER = 3,
51 TAG_SETBACKGROUNDCOLOR = 9,
55 TAG_DEFINEFONTINFO = 13,
58 TAG_DEFINEBUTTONSOUND = 17,
61 TAG_DEFINEBITSLOSSLESS = 20,
63 TAG_DEFINESHAPE2 = 22,
64 TAG_DEFINEBUTTONCXFORM = 23,
66 TAG_PLACEOBJECT2 = 26,
67 TAG_REMOVEOBJECT2 = 28,
68 TAG_DEFINESHAPE3 = 32,
70 TAG_DEFINEBUTTON2 = 34,
71 TAG_DEFINEBITSJPEG3 = 35,
72 TAG_DEFINEBITSLOSSLESS2 = 36,
73 TAG_DEFINEEDITTEXT = 37,
74 TAG_DEFINESPRITE = 39,
77 TAG_DEFINEMORPHSHAPE = 46,
79 TAG_EXPORTASSETS = 56,
80 TAG_IMPORTASSETS = 57,
81 TAG_ENABLEDEBUGGER = 58,
82 TAG_DOINITACTION = 59,
85 TAG_DEFINEFONTINFO2 = 62,
86 TAG_ENABLEDEBUGGER2 = 64,
87 TAG_SCRIPTLIMITS = 65,
89 TAG_FILEATTRIBUTES = 69,
90 TAG_PLACEOBJECT3 = 70,
91 TAG_IMPORTASSETS2 = 71,
92 TAG_DEFINEFONTALIGNZONES = 73,
93 TAG_CSMTEXTSETTINGS = 74,
97 TAG_DEFINESCALINGGRID = 78,
99 TAG_DEFINESHAPE4 = 83,
100 TAG_DEFINEMORPHSHAPE2 = 84,
101 TAG_DEFINESCENEANDFRAMELABELDATA = 86,
102 TAG_DEFINEBINARYDATA = 87,
103 TAG_DEFINEFONTNAME = 88,
104 TAG_STARTSOUND2 = 89,
105 TAG_DEFINEBITSJPEG4 = 90,
106 TAG_DEFINEFONT4 = 91,
109 #define TAG_LONG 0x100
111 /* flags for shape definition */
112 #define FLAG_MOVETO 0x01
113 #define FLAG_SETFILL0 0x02
114 #define FLAG_SETFILL1 0x04
116 #define AUDIO_FIFO_SIZE 65536
118 /* character id used */
123 typedef struct SWFContext {
124 int64_t duration_pos;
127 int samples_per_frame;
129 int swf_frame_number;
130 int video_frame_number;
133 AVFifoBuffer *audio_fifo;
134 AVCodecContext *audio_enc, *video_enc;
137 #define ZBUF_SIZE 4096
144 extern const AVCodecTag ff_swf_codec_tags[];
146 #endif /* AVFORMAT_SWF_H */