Mercurial > audlegacy
comparison Plugins/Input/aac/libmp4v2/INTERNALS @ 201:f2dc045d2327 trunk
[svn] libmp4v2 goes back to the future
author | chainsaw |
---|---|
date | Thu, 17 Nov 2005 14:01:18 -0800 |
parents | 0a2ad94e8607 |
children |
comparison
equal
deleted
inserted
replaced
200:094ef8a0a9fd | 201:f2dc045d2327 |
---|---|
48 | 48 |
49 Atoms are the primary containers within an mp4 file. They can contain | 49 Atoms are the primary containers within an mp4 file. They can contain |
50 any combination of properties, other atoms, or descriptors. | 50 any combination of properties, other atoms, or descriptors. |
51 | 51 |
52 The mp4atom files contain the base class for all the atoms, and provide | 52 The mp4atom files contain the base class for all the atoms, and provide |
53 generic functions that cover most cases. However, each atom has it's own | 53 generic functions that cover most cases. Most atoms are covered in |
54 subclass contained in file atom_<name>.cpp, where <name> is the four | 54 atom_standard.cpp. Atoms that have a special read, generation or |
55 letter name of the atom defined in the MP4 specification. Typically this | 55 write needs are contained in their subclass contained in file atom_<name>.cpp, |
56 atom file just specifies the properties of the atom or the possible child | 56 where <name> is the four letter name of the atom defined in the MP4 |
57 atoms in the case of a container atom. In more specialized cases the atom | 57 specification. |
58 specific file provides routines to initialize, read, or write the atom. | 58 |
59 Atoms that only specifies the properties of the atom or the possible child | |
60 atoms in the case of a container atom are located in atom_standard.cpp. | |
61 | |
62 In more specialized cases the atom specific file provides routines to | |
63 initialize, read, or write the atom. | |
59 | 64 |
60 Properties are the atomic pieces of information. The basic types of | 65 Properties are the atomic pieces of information. The basic types of |
61 properties are integers, floats, strings, and byte arrays. For integers | 66 properties are integers, floats, strings, and byte arrays. For integers |
62 and floats there are subclasses that represent the different storage sizes, | 67 and floats there are subclasses that represent the different storage sizes, |
63 e.g. 8, 16, 24, 32, and 64 bit integers. For strings, there is 1 property | 68 e.g. 8, 16, 24, 32, and 64 bit integers. For strings, there is 1 property |
100 useful when dealing with the stsd atom which contains child atoms with | 105 useful when dealing with the stsd atom which contains child atoms with |
101 various names, but shared property names. | 106 various names, but shared property names. |
102 | 107 |
103 Note that internally when performance matters the code looks up a property | 108 Note that internally when performance matters the code looks up a property |
104 by name once, and then stores the returned pointer to the property class. | 109 by name once, and then stores the returned pointer to the property class. |
110 | |
111 To add an atom, first you should see if an existing atom exists that | |
112 can be used. If not, you need to decide if special read/write or | |
113 generate properties need to be established; for example a property in the atom | |
114 changes other properties (adds, or subtracts). If there are no | |
115 special cases, add the atom properties to atom_standard.cpp. If there | |
116 are special properties, add a new file, add a new class to atoms.h, and | |
117 add the class to MP4Atom::CreateAtom in mp4atom.cpp. | |
118 | |
105 | 119 |
106 | 120 |
107 Generic Tracks | 121 Generic Tracks |
108 ============== | 122 ============== |
109 | 123 |