FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
swf.h
Go to the documentation of this file.
1 /*
2  * Flash Compatible Streaming Format common header.
3  * Copyright (c) 2000 Fabrice Bellard
4  * Copyright (c) 2003 Tinic Uro
5  *
6  * This file is part of FFmpeg.
7  *
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.
12  *
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.
17  *
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
21  */
22 
23 #ifndef AVFORMAT_SWF_H
24 #define AVFORMAT_SWF_H
25 
26 #include "config.h"
27 
28 #if CONFIG_ZLIB
29 #include <zlib.h>
30 #endif
31 
32 #include "libavutil/fifo.h"
33 #include "avformat.h"
34 #include "avio.h"
35 #include "internal.h"
36 
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 */
40 
41 enum {
42  TAG_END = 0,
62  TAG_JPEG2 = 21,
98  TAG_DOABC = 82,
107 };
108 
109 #define TAG_LONG 0x100
110 
111 /* flags for shape definition */
112 #define FLAG_MOVETO 0x01
113 #define FLAG_SETFILL0 0x02
114 #define FLAG_SETFILL1 0x04
115 
116 #define AUDIO_FIFO_SIZE 65536
117 
118 /* character id used */
119 #define BITMAP_ID 0
120 #define VIDEO_ID 0
121 #define SHAPE_ID 1
122 
123 #undef NDEBUG
124 #include <assert.h>
125 
126 typedef struct SWFContext {
127  int64_t duration_pos;
128  int64_t tag_pos;
129  int64_t vframes_pos;
135  int tag;
138 #if CONFIG_ZLIB
139  AVIOContext *zpb;
140 #define ZBUF_SIZE 4096
141  uint8_t *zbuf_in;
142  uint8_t *zbuf_out;
143  z_stream zstream;
144 #endif
145 } SWFContext;
146 
147 extern const AVCodecTag ff_swf_codec_tags[];
148 
149 #endif /* AVFORMAT_SWF_H */