Libav
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 Libav.
7
*
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.
12
*
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.
17
*
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
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
#define TAG_END 0
42
#define TAG_SHOWFRAME 1
43
#define TAG_DEFINESHAPE 2
44
#define TAG_FREECHARACTER 3
45
#define TAG_PLACEOBJECT 4
46
#define TAG_REMOVEOBJECT 5
47
#define TAG_STREAMHEAD 18
48
#define TAG_STREAMBLOCK 19
49
#define TAG_JPEG2 21
50
#define TAG_PLACEOBJECT2 26
51
#define TAG_STREAMHEAD2 45
52
#define TAG_VIDEOSTREAM 60
53
#define TAG_VIDEOFRAME 61
54
#define TAG_FILEATTRIBUTES 69
55
56
#define TAG_LONG 0x100
57
58
/* flags for shape definition */
59
#define FLAG_MOVETO 0x01
60
#define FLAG_SETFILL0 0x02
61
#define FLAG_SETFILL1 0x04
62
63
#define AUDIO_FIFO_SIZE 65536
64
65
/* character id used */
66
#define BITMAP_ID 0
67
#define VIDEO_ID 0
68
#define SHAPE_ID 1
69
70
typedef
struct
SWFContext
{
71
int64_t
duration_pos
;
72
int64_t
tag_pos
;
73
int64_t
vframes_pos
;
74
int
samples_per_frame
;
75
int
sound_samples
;
76
int
swf_frame_number
;
77
int
video_frame_number
;
78
int
frame_rate
;
79
int
tag
;
80
AVFifoBuffer
*
audio_fifo
;
81
AVCodecParameters
*
audio_par
, *
video_par
;
82
AVStream
*
video_st
;
83
#if CONFIG_ZLIB
84
#define ZBUF_SIZE 4096
85
AVIOContext
*zpb;
86
uint8_t
*zbuf_in;
87
uint8_t
*zbuf_out;
88
z_stream zstream;
89
#endif
90
}
SWFContext
;
91
92
extern
const
AVCodecTag
ff_swf_codec_tags
[];
93
94
#endif
/* AVFORMAT_SWF_H */
AVIOContext
Bytestream IO Context.
Definition:
avio.h:104
avio.h
Buffered I/O operations.
SWFContext
Definition:
swf.h:70
SWFContext::video_st
AVStream * video_st
Definition:
swf.h:82
AVCodecParameters
This struct describes the properties of an encoded stream.
Definition:
avcodec.h:3475
SWFContext::frame_rate
int frame_rate
Definition:
swf.h:78
config.h
uint8_t
uint8_t
Definition:
audio_convert.c:194
SWFContext::video_par
AVCodecParameters * video_par
Definition:
swf.h:81
AVCodecTag
Definition:
internal.h:36
SWFContext::swf_frame_number
int swf_frame_number
Definition:
swf.h:76
SWFContext::video_frame_number
int video_frame_number
Definition:
swf.h:77
internal.h
SWFContext::sound_samples
int sound_samples
Definition:
swf.h:75
SWFContext::samples_per_frame
int samples_per_frame
Definition:
swf.h:74
ff_swf_codec_tags
const AVCodecTag ff_swf_codec_tags[]
Definition:
swf.c:25
AVStream
Stream structure.
Definition:
avformat.h:705
AVFifoBuffer
Definition:
fifo.h:31
fifo.h
a very simple circular buffer FIFO implementation
SWFContext::audio_par
AVCodecParameters * audio_par
Definition:
swf.h:81
SWFContext::vframes_pos
int64_t vframes_pos
Definition:
swf.h:73
avformat.h
Main libavformat public API header.
SWFContext::tag_pos
int64_t tag_pos
Definition:
swf.h:72
SWFContext::tag
int tag
Definition:
swf.h:79
SWFContext::audio_fifo
AVFifoBuffer * audio_fifo
Definition:
swf.h:80
SWFContext::duration_pos
int64_t duration_pos
Definition:
swf.h:71
Generated on Fri Dec 1 2017 07:12:13 for Libav by
1.8.13