FFmpeg
 All Data Structures Namespaces 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 typedef struct SWFContext {
124  int64_t duration_pos;
125  int64_t tag_pos;
126  int64_t vframes_pos;
132  int tag;
136 #if CONFIG_ZLIB
137 #define ZBUF_SIZE 4096
138  AVIOContext *zpb;
139  uint8_t *zbuf_in;
140  uint8_t *zbuf_out;
141  z_stream zstream;
142 #endif
143 } SWFContext;
144 
145 extern const AVCodecTag ff_swf_codec_tags[];
146 
147 #endif /* AVFORMAT_SWF_H */
Bytestream IO Context.
Definition: avio.h:147
Definition: swf.h:98
Buffered I/O operations.
AVStream * video_st
Definition: swf.h:135
This struct describes the properties of an encoded stream.
Definition: avcodec.h:3973
int frame_rate
Definition: swf.h:131
uint8_t
AVCodecParameters * video_par
Definition: swf.h:134
int swf_frame_number
Definition: swf.h:129
int video_frame_number
Definition: swf.h:130
int sound_samples
Definition: swf.h:128
int samples_per_frame
Definition: swf.h:127
const AVCodecTag ff_swf_codec_tags[]
Definition: swf.c:25
Definition: swf.h:42
Stream structure.
Definition: avformat.h:889
Definition: swf.h:62
a very simple circular buffer FIFO implementation
AVCodecParameters * audio_par
Definition: swf.h:134
int64_t vframes_pos
Definition: swf.h:126
Main libavformat public API header.
int64_t tag_pos
Definition: swf.h:125
int tag
Definition: swf.h:132
AVFifoBuffer * audio_fifo
Definition: swf.h:133
int64_t duration_pos
Definition: swf.h:124