FFmpeg
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
libavformat
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,
43
TAG_SHOWFRAME
= 1,
44
TAG_DEFINESHAPE
= 2,
45
TAG_FREECHARACTER
= 3,
46
TAG_PLACEOBJECT
= 4,
47
TAG_REMOVEOBJECT
= 5,
48
TAG_DEFINEBITS
= 6,
49
TAG_DEFINEBUTTON
= 7,
50
TAG_JPEGTABLES
= 8,
51
TAG_SETBACKGROUNDCOLOR
= 9,
52
TAG_DEFINEFONT
= 10,
53
TAG_DEFINETEXT
= 11,
54
TAG_DOACTION
= 12,
55
TAG_DEFINEFONTINFO
= 13,
56
TAG_DEFINESOUND
= 14,
57
TAG_STARTSOUND
= 15,
58
TAG_DEFINEBUTTONSOUND
= 17,
59
TAG_STREAMHEAD
= 18,
60
TAG_STREAMBLOCK
= 19,
61
TAG_DEFINEBITSLOSSLESS
= 20,
62
TAG_JPEG2
= 21,
63
TAG_DEFINESHAPE2
= 22,
64
TAG_DEFINEBUTTONCXFORM
= 23,
65
TAG_PROTECT
= 24,
66
TAG_PLACEOBJECT2
= 26,
67
TAG_REMOVEOBJECT2
= 28,
68
TAG_DEFINESHAPE3
= 32,
69
TAG_DEFINETEXT2
= 33,
70
TAG_DEFINEBUTTON2
= 34,
71
TAG_DEFINEBITSJPEG3
= 35,
72
TAG_DEFINEBITSLOSSLESS2
= 36,
73
TAG_DEFINEEDITTEXT
= 37,
74
TAG_DEFINESPRITE
= 39,
75
TAG_FRAMELABEL
= 43,
76
TAG_STREAMHEAD2
= 45,
77
TAG_DEFINEMORPHSHAPE
= 46,
78
TAG_DEFINEFONT2
= 48,
79
TAG_EXPORTASSETS
= 56,
80
TAG_IMPORTASSETS
= 57,
81
TAG_ENABLEDEBUGGER
= 58,
82
TAG_DOINITACTION
= 59,
83
TAG_VIDEOSTREAM
= 60,
84
TAG_VIDEOFRAME
= 61,
85
TAG_DEFINEFONTINFO2
= 62,
86
TAG_ENABLEDEBUGGER2
= 64,
87
TAG_SCRIPTLIMITS
= 65,
88
TAG_SETTABINDEX
= 66,
89
TAG_FILEATTRIBUTES
= 69,
90
TAG_PLACEOBJECT3
= 70,
91
TAG_IMPORTASSETS2
= 71,
92
TAG_DEFINEFONTALIGNZONES
= 73,
93
TAG_CSMTEXTSETTINGS
= 74,
94
TAG_DEFINEFONT3
= 75,
95
TAG_SYMBOLCLASS
= 76,
96
TAG_METADATA
= 77,
97
TAG_DEFINESCALINGGRID
= 78,
98
TAG_DOABC
= 82,
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,
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
;
127
int
samples_per_frame
;
128
int
sound_samples
;
129
int
swf_frame_number
;
130
int
video_frame_number
;
131
int
frame_rate
;
132
int
tag
;
133
AVFifoBuffer
*
audio_fifo
;
134
AVCodecParameters
*
audio_par
, *
video_par
;
135
AVStream
*
video_st
;
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 */
TAG_STARTSOUND
Definition:
swf.h:57
AVIOContext
Bytestream IO Context.
Definition:
avio.h:161
avio.h
Buffered I/O operations.
SWFContext
Definition:
swf.h:123
TAG_DEFINEBUTTONCXFORM
Definition:
swf.h:64
TAG_IMPORTASSETS2
Definition:
swf.h:91
TAG_DEFINEMORPHSHAPE
Definition:
swf.h:77
TAG_STREAMHEAD
Definition:
swf.h:59
SWFContext::video_st
AVStream * video_st
Definition:
swf.h:135
TAG_DEFINEFONT
Definition:
swf.h:52
TAG_DEFINESCALINGGRID
Definition:
swf.h:97
TAG_DOINITACTION
Definition:
swf.h:82
AVCodecParameters
This struct describes the properties of an encoded stream.
Definition:
avcodec.h:3876
TAG_JPEG2
Definition:
swf.h:62
TAG_ENABLEDEBUGGER2
Definition:
swf.h:86
TAG_FILEATTRIBUTES
Definition:
swf.h:89
TAG_STREAMHEAD2
Definition:
swf.h:76
TAG_DEFINEBITSJPEG3
Definition:
swf.h:71
SWFContext::frame_rate
int frame_rate
Definition:
swf.h:131
config.h
uint8_t
uint8_t
Definition:
audio_convert.c:194
TAG_DEFINESHAPE4
Definition:
swf.h:99
TAG_STREAMBLOCK
Definition:
swf.h:60
TAG_CSMTEXTSETTINGS
Definition:
swf.h:93
SWFContext::video_par
AVCodecParameters * video_par
Definition:
swf.h:134
AVCodecTag
Definition:
internal.h:44
TAG_DOACTION
Definition:
swf.h:54
TAG_FREECHARACTER
Definition:
swf.h:45
TAG_DOABC
Definition:
swf.h:98
TAG_DEFINESCENEANDFRAMELABELDATA
Definition:
swf.h:101
TAG_DEFINEMORPHSHAPE2
Definition:
swf.h:100
SWFContext::swf_frame_number
int swf_frame_number
Definition:
swf.h:129
TAG_SHOWFRAME
Definition:
swf.h:43
TAG_DEFINEFONTNAME
Definition:
swf.h:103
TAG_PROTECT
Definition:
swf.h:65
TAG_PLACEOBJECT
Definition:
swf.h:46
TAG_SYMBOLCLASS
Definition:
swf.h:95
TAG_DEFINEFONTINFO2
Definition:
swf.h:85
SWFContext::video_frame_number
int video_frame_number
Definition:
swf.h:130
TAG_EXPORTASSETS
Definition:
swf.h:79
TAG_DEFINEFONT3
Definition:
swf.h:94
TAG_DEFINEBITSJPEG4
Definition:
swf.h:105
internal.h
SWFContext::sound_samples
int sound_samples
Definition:
swf.h:128
TAG_DEFINEBINARYDATA
Definition:
swf.h:102
SWFContext::samples_per_frame
int samples_per_frame
Definition:
swf.h:127
TAG_IMPORTASSETS
Definition:
swf.h:80
TAG_FRAMELABEL
Definition:
swf.h:75
ff_swf_codec_tags
const AVCodecTag ff_swf_codec_tags[]
Definition:
swf.c:25
TAG_DEFINEBITSLOSSLESS2
Definition:
swf.h:72
TAG_SETTABINDEX
Definition:
swf.h:88
TAG_DEFINESHAPE3
Definition:
swf.h:68
TAG_ENABLEDEBUGGER
Definition:
swf.h:81
TAG_END
Definition:
swf.h:42
TAG_DEFINESOUND
Definition:
swf.h:56
AVStream
Stream structure.
Definition:
avformat.h:873
AVFifoBuffer
Definition:
fifo.h:31
TAG_DEFINETEXT
Definition:
swf.h:53
TAG_DEFINETEXT2
Definition:
swf.h:69
TAG_METADATA
Definition:
swf.h:96
TAG_STARTSOUND2
Definition:
swf.h:104
fifo.h
a very simple circular buffer FIFO implementation
SWFContext::audio_par
AVCodecParameters * audio_par
Definition:
swf.h:134
TAG_SCRIPTLIMITS
Definition:
swf.h:87
TAG_DEFINESPRITE
Definition:
swf.h:74
TAG_PLACEOBJECT2
Definition:
swf.h:66
TAG_DEFINEBITSLOSSLESS
Definition:
swf.h:61
SWFContext::vframes_pos
int64_t vframes_pos
Definition:
swf.h:126
TAG_PLACEOBJECT3
Definition:
swf.h:90
TAG_DEFINEBITS
Definition:
swf.h:48
TAG_REMOVEOBJECT2
Definition:
swf.h:67
avformat.h
Main libavformat public API header.
SWFContext::tag_pos
int64_t tag_pos
Definition:
swf.h:125
TAG_JPEGTABLES
Definition:
swf.h:50
TAG_DEFINESHAPE2
Definition:
swf.h:63
TAG_DEFINEBUTTON
Definition:
swf.h:49
TAG_DEFINESHAPE
Definition:
swf.h:44
TAG_REMOVEOBJECT
Definition:
swf.h:47
SWFContext::tag
int tag
Definition:
swf.h:132
TAG_DEFINEBUTTON2
Definition:
swf.h:70
TAG_DEFINEFONT4
Definition:
swf.h:106
TAG_DEFINEFONTINFO
Definition:
swf.h:55
SWFContext::audio_fifo
AVFifoBuffer * audio_fifo
Definition:
swf.h:133
SWFContext::duration_pos
int64_t duration_pos
Definition:
swf.h:124
TAG_DEFINEFONT2
Definition:
swf.h:78
TAG_DEFINEBUTTONSOUND
Definition:
swf.h:58
TAG_DEFINEFONTALIGNZONES
Definition:
swf.h:92
TAG_VIDEOFRAME
Definition:
swf.h:84
TAG_SETBACKGROUNDCOLOR
Definition:
swf.h:51
TAG_DEFINEEDITTEXT
Definition:
swf.h:73
TAG_VIDEOSTREAM
Definition:
swf.h:83
Generated on Sun May 13 2018 02:04:07 for FFmpeg by
1.8.6