• 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 ObjectDescriptor Class                          */
21 /*     -------------------------------------------------------------------       */
22 /*********************************************************************************/
23 /*
24     This ObjectDescriptor Class
25 */
26 
27 
28 #ifndef OBJECTDESCRIPTOR_H_INCLUDED
29 #define OBJECTDESCRIPTOR_H_INCLUDED
30 
31 #ifndef OSCL_FILE_IO_H_INCLUDED
32 #include "oscl_file_io.h"
33 #endif
34 
35 #ifndef BASEDESCRIPTOR_H_INCLUDED
36 #include "basedescriptor.h"
37 #endif
38 
39 #ifndef ESDESCRIPTOR_H_INCLUDED
40 #include "esdescriptor.h"
41 #endif
42 
43 #ifndef ES_ID_REF_H_INCLUDED
44 #include "es_id_ref.h"
45 #endif
46 
47 #ifndef OSCL_VECTOR_H_INCLUDED
48 #include "oscl_vector.h"
49 #endif
50 
51 
52 class ObjectDescriptor : public BaseDescriptor
53 {
54 
55     public:
56         ObjectDescriptor(MP4_FF_FILE *fp, bool all = false); // Stream-in Constructor
57         virtual ~ObjectDescriptor();
58 
59         // Member gets
getObjectDescriptorID()60         uint16 getObjectDescriptorID() const
61         {
62             return _objectDescriptorID;
63         }
getUrlFlag()64         bool getUrlFlag() const
65         {
66             return _urlFlag;
67         }
getUrlLength()68         uint8 getUrlLength() const
69         {
70             return _urlLength;
71         }
72 
73         // Retuns a UNICODE string given the null-terminated byte array
74         OSCL_wHeapString<OsclMemAllocator> getUrlString() const;
75 
76     protected:
77         uint16 _objectDescriptorID; // (10)
78         bool _urlFlag; // (1)
79         uint8 _reserved; // 0b11111; // (5)
80 
81         uint8 _urlLength; // (8)
82         uint8 *_urlStringPtr; // (8)[_urlLength]
83 
84         Oscl_Vector<uint32, OsclMemAllocator> *_pESIDVec;
85         Oscl_Vector<ES_ID_Ref *, OsclMemAllocator> * _pES_ID_Ref;
86 };
87 
88 #endif // OBJECTDESCRIPTOR_H_INCLUDED
89 
90 
91