Mercurial > libavformat.hg
annotate flv.h @ 5786:7d670040187e libavformat
In mpegts muxer, search for h264 aud nal, it might not be the first nal.
Improve ther error message when bitstream is malformated and tell user to use
the bitstream filter.
author | bcoudurier |
---|---|
date | Mon, 08 Mar 2010 23:59:05 +0000 |
parents | ce86dfc507ec |
children | 178de7695c6c |
rev | line source |
---|---|
1553
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
1 /** |
4331
49c1d3b27727
Use full internal pathname in doxygen @file directives.
diego
parents:
4251
diff
changeset
|
2 * @file libavformat/flv.h |
1553
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 * |
4251
77e0c7511d41
cosmetics: Remove pointless period after copyright statement non-sentences.
diego
parents:
3996
diff
changeset
|
5 * Copyright (c) 2006 The FFmpeg Project |
1553
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 |
3852 | 24 #ifndef AVFORMAT_FLV_H |
25 #define AVFORMAT_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 { |
3996
41f9a32e9516
8HZ -> 8KHZ, cosmetics patch by Alexander Wichers development at wichersdot nu
banan
parents:
3852
diff
changeset
|
74 FLV_CODECID_PCM = 0, |
41f9a32e9516
8HZ -> 8KHZ, cosmetics patch by Alexander Wichers development at wichersdot nu
banan
parents:
3852
diff
changeset
|
75 FLV_CODECID_ADPCM = 1 << FLV_AUDIO_CODECID_OFFSET, |
41f9a32e9516
8HZ -> 8KHZ, cosmetics patch by Alexander Wichers development at wichersdot nu
banan
parents:
3852
diff
changeset
|
76 FLV_CODECID_MP3 = 2 << FLV_AUDIO_CODECID_OFFSET, |
41f9a32e9516
8HZ -> 8KHZ, cosmetics patch by Alexander Wichers development at wichersdot nu
banan
parents:
3852
diff
changeset
|
77 FLV_CODECID_PCM_LE = 3 << FLV_AUDIO_CODECID_OFFSET, |
41f9a32e9516
8HZ -> 8KHZ, cosmetics patch by Alexander Wichers development at wichersdot nu
banan
parents:
3852
diff
changeset
|
78 FLV_CODECID_NELLYMOSER_8KHZ_MONO = 5 << FLV_AUDIO_CODECID_OFFSET, |
41f9a32e9516
8HZ -> 8KHZ, cosmetics patch by Alexander Wichers development at wichersdot nu
banan
parents:
3852
diff
changeset
|
79 FLV_CODECID_NELLYMOSER = 6 << FLV_AUDIO_CODECID_OFFSET, |
41f9a32e9516
8HZ -> 8KHZ, cosmetics patch by Alexander Wichers development at wichersdot nu
banan
parents:
3852
diff
changeset
|
80 FLV_CODECID_AAC = 10<< FLV_AUDIO_CODECID_OFFSET, |
41f9a32e9516
8HZ -> 8KHZ, cosmetics patch by Alexander Wichers development at wichersdot nu
banan
parents:
3852
diff
changeset
|
81 FLV_CODECID_SPEEX = 11<< FLV_AUDIO_CODECID_OFFSET, |
1553
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
82 }; |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
83 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
84 enum { |
1811 | 85 FLV_CODECID_H263 = 2, |
86 FLV_CODECID_SCREEN = 3, | |
87 FLV_CODECID_VP6 = 4, | |
1812 | 88 FLV_CODECID_VP6A = 5, |
89 FLV_CODECID_SCREEN2 = 6, | |
3337 | 90 FLV_CODECID_H264 = 7, |
1553
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
91 }; |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
92 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
93 enum { |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
94 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
|
95 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
|
96 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
|
97 }; |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
98 |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
99 typedef enum { |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
100 AMF_DATA_TYPE_NUMBER = 0x00, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
101 AMF_DATA_TYPE_BOOL = 0x01, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
102 AMF_DATA_TYPE_STRING = 0x02, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
103 AMF_DATA_TYPE_OBJECT = 0x03, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
104 AMF_DATA_TYPE_NULL = 0x05, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
105 AMF_DATA_TYPE_UNDEFINED = 0x06, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
106 AMF_DATA_TYPE_REFERENCE = 0x07, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
107 AMF_DATA_TYPE_MIXEDARRAY = 0x08, |
5105
ce86dfc507ec
Register some additional AMF types in libavformat/flv.h
kostya
parents:
4331
diff
changeset
|
108 AMF_DATA_TYPE_OBJECT_END = 0x09, |
1553
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
109 AMF_DATA_TYPE_ARRAY = 0x0a, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
110 AMF_DATA_TYPE_DATE = 0x0b, |
5105
ce86dfc507ec
Register some additional AMF types in libavformat/flv.h
kostya
parents:
4331
diff
changeset
|
111 AMF_DATA_TYPE_LONG_STRING = 0x0c, |
1553
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
112 AMF_DATA_TYPE_UNSUPPORTED = 0x0d, |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
113 } AMFDataType; |
504ceaa50e31
Defines various common FLV format values between the FLV muxer and demuxer
aurel
parents:
diff
changeset
|
114 |
3852 | 115 #endif /* AVFORMAT_FLV_H */ |