• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 /*********************************************************************************/
19 /*     -------------------------------------------------------------------       */
20 /*                            MPEG-4 FullAtom Class                              */
21 /*     -------------------------------------------------------------------       */
22 /*********************************************************************************/
23 /*
24     This FullAtom Class is the base class for some Atoms in the MPEG-4 File
25     Format.
26 */
27 
28 
29 #ifndef FULLATOM_H_INCLUDED
30 #define FULLATOM_H_INCLUDED
31 
32 #ifndef OSCL_FILE_IO_H_INCLUDED
33 #include "oscl_file_io.h"
34 #endif
35 
36 #ifndef ATOM_H_INCLUDED
37 #include "atom.h"
38 #endif
39 
40 const uint32 DEFAULT_FULL_ATOM_SIZE = 12; // (8 bytes from Atom + 1 for
41 //  version and 3 for flags)
42 
43 class FullAtom : public Atom
44 {
45 
46     public:
47         FullAtom(uint32 type, uint8 version, uint32 flags); // Constructor
48         FullAtom(MP4_FF_FILE *fp);
49         FullAtom(MP4_FF_FILE *fp, uint32 size, uint32 type);
50         OSCL_IMPORT_REF virtual ~FullAtom();
51 
52         // No "set" methods as they get set directly in the constructor
getVersion()53         uint8 getVersion() const
54         {
55             return _version;
56         }
getFlags()57         uint32 getFlags() const
58         {
59             return _flags;
60         }
61 
62         OSCL_IMPORT_REF virtual uint32 getDefaultSize() const;
63 
64     private:
65         uint8 _version; // 1 (8bits)
66         uint32 _flags; // 3 (24bits) -- Will need to crop when writing to stream
67 };
68 
69 
70 #endif // FULLATOM_H_INCLUDED
71 
72 
73