Mercurial > audlegacy
annotate Plugins/Input/aac/libmp4v2/atoms.h @ 201:f2dc045d2327 trunk
[svn] libmp4v2 goes back to the future
author | chainsaw |
---|---|
date | Thu, 17 Nov 2005 14:01:18 -0800 |
parents | 0a2ad94e8607 |
children |
rev | line source |
---|---|
61 | 1 /* |
2 * The contents of this file are subject to the Mozilla Public | |
3 * License Version 1.1 (the "License"); you may not use this file | |
4 * except in compliance with the License. You may obtain a copy of | |
5 * the License at http://www.mozilla.org/MPL/ | |
6 * | |
7 * Software distributed under the License is distributed on an "AS | |
8 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or | |
9 * implied. See the License for the specific language governing | |
10 * rights and limitations under the License. | |
11 * | |
12 * The Original Code is MPEG4IP. | |
13 * | |
14 * The Initial Developer of the Original Code is Cisco Systems Inc. | |
15 * Portions created by Cisco Systems Inc. are | |
201 | 16 * Copyright (C) Cisco Systems Inc. 2001 - 2005. All Rights Reserved. |
61 | 17 * |
18 * 3GPP features implementation is based on 3GPP's TS26.234-v5.60, | |
19 * and was contributed by Ximpo Group Ltd. | |
20 * | |
21 * Portions created by Ximpo Group Ltd. are | |
22 * Copyright (C) Ximpo Group Ltd. 2003, 2004. All Rights Reserved. | |
23 * | |
24 * Contributor(s): | |
25 * Dave Mackie dmackie@cisco.com | |
26 * Ximpo Group Ltd. mp4v2@ximpo.com | |
201 | 27 * Bill May wmay@cisco.com |
61 | 28 */ |
29 | |
30 #ifndef __MP4_ATOMS_INCLUDED__ | |
31 #define __MP4_ATOMS_INCLUDED__ | |
32 | |
33 // declare all the atom subclasses | |
34 // i.e. spare us atom_xxxx.h for all the atoms | |
35 // | |
36 // The majority of atoms just need their own constructor declared | |
37 // Some atoms have a few special needs | |
38 // A small minority of atoms need lots of special handling | |
39 | |
40 class MP4RootAtom : public MP4Atom { | |
41 public: | |
42 MP4RootAtom(); | |
43 void BeginWrite(bool use64 = false); | |
44 void Write(); | |
45 void FinishWrite(bool use64 = false); | |
46 | |
47 void BeginOptimalWrite(); | |
48 void FinishOptimalWrite(); | |
49 | |
50 protected: | |
51 u_int32_t GetLastMdatIndex(); | |
52 void WriteAtomType(const char* type, bool onlyOne); | |
53 }; | |
54 | |
201 | 55 /*********************************************************************** |
56 * Common atom classes - standard for anything that just contains atoms | |
57 * and non-maleable properties, treftype and url | |
58 ***********************************************************************/ | |
59 class MP4StandardAtom : public MP4Atom { | |
60 public: | |
61 MP4StandardAtom(const char *name); | |
61 | 62 }; |
63 | |
64 class MP4TrefTypeAtom : public MP4Atom { | |
65 public: | |
66 MP4TrefTypeAtom(const char* type); | |
67 void Read(); | |
68 }; | |
69 | |
70 class MP4UrlAtom : public MP4Atom { | |
71 public: | |
72 MP4UrlAtom(const char *type="url "); | |
73 void Read(); | |
74 void Write(); | |
75 }; | |
76 | |
201 | 77 /*********************************************************************** |
78 * Sound and Video atoms - use the generic atoms when possible | |
79 * (MP4SoundAtom and MP4VideoAtom) | |
80 ***********************************************************************/ | |
81 class MP4SoundAtom : public MP4Atom { | |
82 public: | |
83 MP4SoundAtom(const char *atomid); | |
84 void Generate(); | |
85 void Read(); | |
86 protected: | |
87 void AddProperties(u_int8_t version); | |
88 }; | |
89 | |
90 class MP4VideoAtom : public MP4Atom { | |
91 public: | |
92 MP4VideoAtom(const char *atomid); | |
93 void Generate(); | |
94 }; | |
95 | |
96 class MP4AmrAtom : public MP4Atom { | |
97 public: | |
98 MP4AmrAtom(const char *type); | |
99 void Generate(); | |
61 | 100 }; |
101 | |
201 | 102 // H.264 atoms |
103 | |
104 class MP4Avc1Atom : public MP4Atom { | |
105 public: | |
106 MP4Avc1Atom(); | |
107 void Generate(); | |
108 }; | |
109 | |
110 class MP4AvcCAtom : public MP4Atom { | |
111 public: | |
112 MP4AvcCAtom(); | |
113 void Generate(); | |
61 | 114 }; |
115 | |
201 | 116 |
117 | |
118 class MP4D263Atom : public MP4Atom { | |
119 public: | |
120 MP4D263Atom(); | |
121 void Generate(); | |
122 void Write(); | |
123 }; | |
124 | |
125 class MP4DamrAtom : public MP4Atom { | |
126 public: | |
127 MP4DamrAtom(); | |
128 void Generate(); | |
129 }; | |
130 | |
131 class MP4EncaAtom : public MP4Atom { | |
61 | 132 public: |
201 | 133 MP4EncaAtom(); |
134 void Generate(); | |
135 }; | |
136 | |
137 class MP4EncvAtom : public MP4Atom { | |
138 public: | |
139 MP4EncvAtom(); | |
140 void Generate(); | |
61 | 141 }; |
142 | |
143 class MP4Mp4aAtom : public MP4Atom { | |
144 public: | |
145 MP4Mp4aAtom(); | |
146 void Generate(); | |
147 }; | |
148 | |
149 class MP4Mp4sAtom : public MP4Atom { | |
150 public: | |
151 MP4Mp4sAtom(); | |
152 void Generate(); | |
153 }; | |
154 | |
155 class MP4Mp4vAtom : public MP4Atom { | |
156 public: | |
157 MP4Mp4vAtom(); | |
158 void Generate(); | |
159 }; | |
160 | |
161 | |
201 | 162 class MP4S263Atom : public MP4Atom { |
163 public: | |
164 MP4S263Atom(); | |
165 void Generate(); | |
61 | 166 }; |
201 | 167 |
168 | |
169 | |
170 /************************************************************************ | |
171 * Specialized Atoms | |
172 ************************************************************************/ | |
199
0a2ad94e8607
[svn] Synced with bmp-mp4. Build system is fragile, but should work now.
chainsaw
parents:
61
diff
changeset
|
173 |
201 | 174 class MP4DataAtom : public MP4Atom { |
199
0a2ad94e8607
[svn] Synced with bmp-mp4. Build system is fragile, but should work now.
chainsaw
parents:
61
diff
changeset
|
175 public: |
201 | 176 MP4DataAtom(); |
177 void Read(); | |
61 | 178 }; |
179 | |
201 | 180 class MP4DrefAtom : public MP4Atom { |
61 | 181 public: |
201 | 182 MP4DrefAtom(); |
61 | 183 void Read(); |
184 }; | |
185 | |
186 class MP4ElstAtom : public MP4Atom { | |
187 public: | |
188 MP4ElstAtom(); | |
189 void Generate(); | |
190 void Read(); | |
191 protected: | |
192 void AddProperties(u_int8_t version); | |
193 }; | |
194 | |
201 | 195 class MP4FreeAtom : public MP4Atom { |
61 | 196 public: |
201 | 197 MP4FreeAtom(); |
198 void Read(); | |
199 void Write(); | |
200 }; | |
201 | |
202 class MP4FtypAtom : public MP4Atom { | |
203 public: | |
204 MP4FtypAtom(); | |
205 void Generate(); | |
61 | 206 void Read(); |
207 }; | |
208 | |
201 | 209 class MP4HdlrAtom : public MP4Atom { |
61 | 210 public: |
201 | 211 MP4HdlrAtom(); |
212 void Read(); | |
213 }; | |
214 | |
215 class MP4HinfAtom : public MP4Atom { | |
216 public: | |
217 MP4HinfAtom(); | |
218 void Generate(); | |
61 | 219 }; |
220 | |
221 class MP4HntiAtom : public MP4Atom { | |
222 public: | |
223 MP4HntiAtom(); | |
224 void Read(); | |
225 }; | |
226 | |
201 | 227 |
228 class MP4MdatAtom : public MP4Atom { | |
229 public: | |
230 MP4MdatAtom(); | |
231 void Read(); | |
232 void Write(); | |
233 }; | |
234 | |
235 class MP4MdhdAtom : public MP4Atom { | |
236 public: | |
237 MP4MdhdAtom(); | |
238 void Generate(); | |
239 void Read(); | |
240 protected: | |
241 void AddProperties(u_int8_t version); | |
242 }; | |
243 | |
244 class MP4MeanAtom : public MP4Atom { | |
245 public: | |
246 MP4MeanAtom(); | |
247 void Read(); | |
248 }; | |
249 | |
250 | |
251 class MP4MvhdAtom : public MP4Atom { | |
252 public: | |
253 MP4MvhdAtom(); | |
254 void Generate(); | |
255 void Read(); | |
256 protected: | |
257 void AddProperties(u_int8_t version); | |
258 }; | |
259 | |
260 class MP4NameAtom : public MP4Atom { | |
261 public: | |
262 MP4NameAtom(); | |
263 void Read(); | |
264 }; | |
265 | |
61 | 266 class MP4RtpAtom : public MP4Atom { |
267 public: | |
268 MP4RtpAtom(); | |
269 void Generate(); | |
270 void Read(); | |
271 void Write(); | |
272 | |
273 protected: | |
274 void AddPropertiesStsdType(); | |
275 void AddPropertiesHntiType(); | |
276 | |
277 void GenerateStsdType(); | |
278 void GenerateHntiType(); | |
279 | |
280 void ReadStsdType(); | |
281 void ReadHntiType(); | |
282 | |
283 void WriteHntiType(); | |
284 }; | |
285 | |
286 class MP4SdpAtom : public MP4Atom { | |
287 public: | |
288 MP4SdpAtom(); | |
289 void Read(); | |
290 void Write(); | |
291 }; | |
292 | |
201 | 293 class MP4SmiAtom : public MP4Atom { |
294 public: | |
295 MP4SmiAtom(void); | |
296 void Read(); | |
297 }; | |
298 | |
299 class MP4StblAtom : public MP4Atom { | |
61 | 300 public: |
201 | 301 MP4StblAtom(); |
61 | 302 void Generate(); |
303 }; | |
304 | |
201 | 305 class MP4StdpAtom : public MP4Atom { |
61 | 306 public: |
201 | 307 MP4StdpAtom(); |
308 void Read(); | |
61 | 309 }; |
310 | |
201 | 311 class MP4StscAtom : public MP4Atom { |
61 | 312 public: |
201 | 313 MP4StscAtom(); |
314 void Read(); | |
61 | 315 }; |
316 | |
201 | 317 class MP4StsdAtom : public MP4Atom { |
61 | 318 public: |
201 | 319 MP4StsdAtom(); |
320 void Read(); | |
61 | 321 }; |
322 | |
201 | 323 class MP4StszAtom : public MP4Atom { |
61 | 324 public: |
201 | 325 MP4StszAtom(); |
326 void Read(); | |
327 void Write(); | |
61 | 328 }; |
329 | |
330 class MP4TfhdAtom : public MP4Atom { | |
331 public: | |
332 MP4TfhdAtom(); | |
333 void Read(); | |
334 protected: | |
335 void AddProperties(u_int32_t flags); | |
336 }; | |
337 | |
201 | 338 class MP4TkhdAtom : public MP4Atom { |
339 public: | |
340 MP4TkhdAtom(); | |
341 void Generate(); | |
342 void Read(); | |
343 protected: | |
344 void AddProperties(u_int8_t version); | |
345 }; | |
61 | 346 class MP4TrunAtom : public MP4Atom { |
347 public: | |
348 MP4TrunAtom(); | |
349 void Read(); | |
350 protected: | |
351 void AddProperties(u_int32_t flags); | |
352 }; | |
353 | |
201 | 354 class MP4UdtaAtom : public MP4Atom { |
61 | 355 public: |
201 | 356 MP4UdtaAtom(); |
357 void Read(); | |
61 | 358 }; |
359 | |
201 | 360 class MP4UrnAtom : public MP4Atom { |
199
0a2ad94e8607
[svn] Synced with bmp-mp4. Build system is fragile, but should work now.
chainsaw
parents:
61
diff
changeset
|
361 public: |
201 | 362 MP4UrnAtom(); |
363 void Read(); | |
199
0a2ad94e8607
[svn] Synced with bmp-mp4. Build system is fragile, but should work now.
chainsaw
parents:
61
diff
changeset
|
364 }; |
201 | 365 class MP4VmhdAtom : public MP4Atom { |
199
0a2ad94e8607
[svn] Synced with bmp-mp4. Build system is fragile, but should work now.
chainsaw
parents:
61
diff
changeset
|
366 public: |
201 | 367 MP4VmhdAtom(); |
368 void Generate(); | |
61 | 369 }; |
370 | |
201 | 371 class MP4HrefAtom : public MP4Atom { |
61 | 372 public: |
201 | 373 MP4HrefAtom(); |
374 void Generate(void); | |
61 | 375 }; |
376 | |
377 #endif /* __MP4_ATOMS_INCLUDED__ */ |