• 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 #ifndef FILETYPEATOM_H_INCLUDED
19 #define FILETYPEATOM_H_INCLUDED
20 
21 #ifndef OSCL_FILE_IO_H_INCLUDED
22 #include "oscl_file_io.h"
23 #endif
24 
25 #ifndef ATOM_H_INCLUDED
26 #include "atom.h"
27 #endif
28 
29 #ifndef OSCL_VECTOR_H_INCLUDED
30 #include "oscl_vector.h"
31 #endif
32 
33 #define  MINIMUM_SIZE_REQUIRED_TO_READ_MAJOR_BRAND 12
34 #define  MINIMUM_SIZE_REQUIRED_TO_READ_MINOR_VERSION 16
35 
36 class FileTypeAtom : public Atom
37 {
38 
39     public:
40         OSCL_IMPORT_REF FileTypeAtom(MP4_FF_FILE *fp, uint32 atomSize, uint32 atomType); // stream-in constructor
41         OSCL_IMPORT_REF virtual ~FileTypeAtom();
42 
getMajorBrand()43         OSCL_IMPORT_REF uint32 getMajorBrand()
44         {
45             return _pMajorBrand;
46         }
getMajorBrandVersion()47         uint32 getMajorBrandVersion()
48         {
49             return _pVersion;
50         }
getCompatibleBrand()51         OSCL_IMPORT_REF Oscl_Vector<uint32, OsclMemAllocator> *getCompatibleBrand()
52         {
53             return _pCompatible_brand;
54         }
55 
56     private:
57         uint32  _pMajorBrand;
58         uint32  _pVersion;
59         Oscl_Vector<uint32, OsclMemAllocator> *_pCompatible_brand;
60 };
61 
62 
63 #endif // FILETYPEATOM_H_INCLUDED
64 
65