Mercurial > libavformat.hg
annotate flv.h @ 3094:18517a0b71f3 libavformat
Add more riff IDs to support remuxing.
author | banan |
---|---|
date | Wed, 27 Feb 2008 20:34:44 +0000 |
parents | 8ae0431d7f43 |
children | ad5817f1efdb |
rev | line source |
---|---|
1553
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
1 /** |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
2 * @file flv.h |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
3 * FLV common header |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
4 * |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
5 * Copyright (c) 2006 The FFmpeg Project. |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
6 * |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
7 * This file is part of FFmpeg. |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
8 * |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
9 * FFmpeg is free software; you can redistribute it and/or |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
10 * modify it under the terms of the GNU Lesser General Public |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
11 * License as published by the Free Software Foundation; either |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
12 * version 2.1 of the License, or (at your option) any later version. |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
13 * |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
14 * FFmpeg is distributed in the hope that it will be useful, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
17 * Lesser General Public License for more details. |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
18 * |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
19 * You should have received a copy of the GNU Lesser General Public |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
20 * License along with FFmpeg; if not, write to the Free Software |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
22 */ |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
23 |
2620
792383dd085e
Add FFMPEG_ prefix to all multiple inclusion guards.
diego
parents:
1812
diff
changeset
|
24 #ifndef FFMPEG_FLV_H |
792383dd085e
Add FFMPEG_ prefix to all multiple inclusion guards.
diego
parents:
1812
diff
changeset
|
25 #define FFMPEG_FLV_H |
1553
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
26 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
27 /* offsets for packed values */ |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
28 #define FLV_AUDIO_SAMPLESSIZE_OFFSET 1 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
29 #define FLV_AUDIO_SAMPLERATE_OFFSET 2 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
30 #define FLV_AUDIO_CODECID_OFFSET 4 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
31 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
32 #define FLV_VIDEO_FRAMETYPE_OFFSET 4 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
33 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
34 /* bitmasks to isolate specific values */ |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
35 #define FLV_AUDIO_CHANNEL_MASK 0x01 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
36 #define FLV_AUDIO_SAMPLESIZE_MASK 0x02 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
37 #define FLV_AUDIO_SAMPLERATE_MASK 0x0c |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
38 #define FLV_AUDIO_CODECID_MASK 0xf0 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
39 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
40 #define FLV_VIDEO_CODECID_MASK 0x0f |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
41 #define FLV_VIDEO_FRAMETYPE_MASK 0xf0 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
42 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
43 #define AMF_END_OF_OBJECT 0x09 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
44 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
45 enum { |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
46 FLV_HEADER_FLAG_HASVIDEO = 1, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
47 FLV_HEADER_FLAG_HASAUDIO = 4, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
48 }; |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
49 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
50 enum { |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
51 FLV_TAG_TYPE_AUDIO = 0x08, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
52 FLV_TAG_TYPE_VIDEO = 0x09, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
53 FLV_TAG_TYPE_META = 0x12, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
54 }; |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
55 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
56 enum { |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
57 FLV_MONO = 0, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
58 FLV_STEREO = 1, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
59 }; |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
60 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
61 enum { |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
62 FLV_SAMPLESSIZE_8BIT = 0, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
63 FLV_SAMPLESSIZE_16BIT = 1 << FLV_AUDIO_SAMPLESSIZE_OFFSET, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
64 }; |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
65 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
66 enum { |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
67 FLV_SAMPLERATE_SPECIAL = 0, /**< signifies 5512Hz and 8000Hz in the case of NELLYMOSER */ |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
68 FLV_SAMPLERATE_11025HZ = 1 << FLV_AUDIO_SAMPLERATE_OFFSET, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
69 FLV_SAMPLERATE_22050HZ = 2 << FLV_AUDIO_SAMPLERATE_OFFSET, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
70 FLV_SAMPLERATE_44100HZ = 3 << FLV_AUDIO_SAMPLERATE_OFFSET, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
71 }; |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
72 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
73 enum { |
3061
8ae0431d7f43
flv/swf do not have a big endian codec id, they only support
michael
parents:
2620
diff
changeset
|
74 FLV_CODECID_PCM = 0, |
1553
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
75 FLV_CODECID_ADPCM = 1 << FLV_AUDIO_CODECID_OFFSET, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
76 FLV_CODECID_MP3 = 2 << FLV_AUDIO_CODECID_OFFSET, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
77 FLV_CODECID_PCM_LE = 3 << FLV_AUDIO_CODECID_OFFSET, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
78 FLV_CODECID_NELLYMOSER_8HZ_MONO = 5 << FLV_AUDIO_CODECID_OFFSET, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
79 FLV_CODECID_NELLYMOSER = 6 << FLV_AUDIO_CODECID_OFFSET, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
80 }; |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
81 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
82 enum { |
1811 | 83 FLV_CODECID_H263 = 2, |
84 FLV_CODECID_SCREEN = 3, | |
85 FLV_CODECID_VP6 = 4, | |
1812 | 86 FLV_CODECID_VP6A = 5, |
87 FLV_CODECID_SCREEN2 = 6, | |
1553
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
88 }; |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
89 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
90 enum { |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
91 FLV_FRAME_KEY = 1 << FLV_VIDEO_FRAMETYPE_OFFSET, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
92 FLV_FRAME_INTER = 2 << FLV_VIDEO_FRAMETYPE_OFFSET, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
93 FLV_FRAME_DISP_INTER = 3 << FLV_VIDEO_FRAMETYPE_OFFSET, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
94 }; |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
95 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
96 typedef enum { |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
97 AMF_DATA_TYPE_NUMBER = 0x00, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
98 AMF_DATA_TYPE_BOOL = 0x01, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
99 AMF_DATA_TYPE_STRING = 0x02, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
100 AMF_DATA_TYPE_OBJECT = 0x03, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
101 AMF_DATA_TYPE_NULL = 0x05, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
102 AMF_DATA_TYPE_UNDEFINED = 0x06, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
103 AMF_DATA_TYPE_REFERENCE = 0x07, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
104 AMF_DATA_TYPE_MIXEDARRAY = 0x08, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
105 AMF_DATA_TYPE_ARRAY = 0x0a, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
106 AMF_DATA_TYPE_DATE = 0x0b, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
107 AMF_DATA_TYPE_UNSUPPORTED = 0x0d, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
108 } AMFDataType; |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
109 |
2620
792383dd085e
Add FFMPEG_ prefix to all multiple inclusion guards.
diego
parents:
1812
diff
changeset
|
110 #endif /* FFMPEG_FLV_H */ |