• 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 UserDataAtom Class                            */
21 /*     -------------------------------------------------------------------       */
22 /*********************************************************************************/
23 /*
24     This UserDataAtom Class is a container atom for informative user-data.
25 */
26 
27 
28 #ifndef PVUSERDATAATOM_H_INCLUDED
29 #define PVUSERDATAATOM_H_INCLUDED
30 
31 #ifndef ATOM_H_INCLUDED
32 #include "atom.h"
33 #endif
34 
35 #ifndef ISUCCEEDFAIL_H_INCLUDED
36 #include "isucceedfail.h"
37 #endif
38 
39 #ifndef ATOMUTILS_H_INCLUDED
40 #include "atomutils.h"
41 #endif
42 
43 #ifndef ATOMDEFS_H_INCLUDED
44 #include "atomdefs.h"
45 #endif
46 
47 class PVUserDataAtom : public Atom
48 {
49 
50     public:
51         PVUserDataAtom(); // Constructor
52         PVUserDataAtom(MP4_FF_FILE *fp, uint32 size, uint32 type); // Constructor
53         PVUserDataAtom(PVUserDataAtom &atom); // Copy constructor
54         virtual ~PVUserDataAtom();
55 
56         // Member gets
getPVVersion()57         OSCL_wString& getPVVersion()
58         {
59             return _version;    // Special member get
60         }
getPVTitle(MP4FFParserOriginalCharEnc & charType)61         OSCL_wString& getPVTitle(MP4FFParserOriginalCharEnc &charType)
62         {
63             charType = ORIGINAL_CHAR_TYPE_UTF16;
64             return _title;
65         }
getPVAuthor(MP4FFParserOriginalCharEnc & charType)66         OSCL_wString& getPVAuthor(MP4FFParserOriginalCharEnc &charType)
67         {
68             charType = ORIGINAL_CHAR_TYPE_UTF16;
69             return _author;
70         }
getPVCopyright(MP4FFParserOriginalCharEnc & charType)71         OSCL_wString& getPVCopyright(MP4FFParserOriginalCharEnc &charType)
72         {
73             charType = ORIGINAL_CHAR_TYPE_UTF16;
74             return _copyright;
75         }
getPVDescription(MP4FFParserOriginalCharEnc & charType)76         OSCL_wString& getPVDescription(MP4FFParserOriginalCharEnc &charType)
77         {
78             charType = ORIGINAL_CHAR_TYPE_UTF16;
79             return _description;
80         }
getPVRating(MP4FFParserOriginalCharEnc & charType)81         OSCL_wString& getPVRating(MP4FFParserOriginalCharEnc &charType)
82         {
83             charType = ORIGINAL_CHAR_TYPE_UTF16;
84             return _rating;
85         }
getPVCreationDate(MP4FFParserOriginalCharEnc & charType)86         OSCL_wHeapString<OsclMemAllocator> getPVCreationDate(MP4FFParserOriginalCharEnc &charType)
87         {
88             charType = ORIGINAL_CHAR_TYPE_UTF16;
89             return _creationDate;
90         }
91 
92     private:
93         OSCL_wHeapString<OsclMemAllocator> _version; // Static for the version of the file format code
94         OSCL_wHeapString<OsclMemAllocator> _title;
95         OSCL_wHeapString<OsclMemAllocator> _author;
96         OSCL_wHeapString<OsclMemAllocator> _copyright;
97         OSCL_wHeapString<OsclMemAllocator> _description;
98         OSCL_wHeapString<OsclMemAllocator> _rating;
99         OSCL_wHeapString<OsclMemAllocator> _creationDate;
100 };
101 
102 class PVContentTypeAtom : public Atom
103 {
104 
105     public:
106         PVContentTypeAtom(MP4_FF_FILE *fp, uint32 size, uint32 type); // Constructor
~PVContentTypeAtom()107         virtual ~PVContentTypeAtom() {};
108 
getContentType()109         uint32 getContentType() const
110         {
111             return _contentType;
112         }
113 
114     private:
115         uint32 _contentType;
116 };
117 
118 #endif // PVUSERDATAATOM_H_INCLUDED
119 
120 
121