• 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 #ifndef AMR_MEDIAINFO_H
20 #define AMR_MEDIAINFO_H
21 
22 #include "sdp_memory.h"
23 #include "media_info.h"
24 
25 class amr_mediaInfo : public mediaInfo
26 {
27     private:
28 
29         int maximumPTime;
30 
31         OSCL_HeapString<SDPParserAlloc> lang;
32     public:
amr_mediaInfo()33         amr_mediaInfo()
34         {
35             mediaInfo();
36             maximumPTime = 0;
37             lang = NULL;
38         };
39 
amr_mediaInfo(const amr_mediaInfo & pSource)40         amr_mediaInfo(const amr_mediaInfo &pSource) : mediaInfo(pSource)
41         {
42 
43             setMaximumPTime(pSource.maximumPTime);
44             setLang(pSource.lang);
45         }
46 
~amr_mediaInfo()47         ~amr_mediaInfo() {};
48 
setMaximumPTime(int mPTime)49         inline bool setMaximumPTime(int mPTime)
50         {
51             maximumPTime = mPTime;
52             return true;
53         };
setLang(char * lan)54         inline void setLang(char* lan)
55         {
56             lang = lan;
57         };
setLang(const OSCL_HeapString<SDPParserAlloc> & lan)58         inline void setLang(const OSCL_HeapString<SDPParserAlloc>& lan)
59         {
60             lang = lan;
61         };
setLang(const OsclMemoryFragment memFrag)62         inline void setLang(const OsclMemoryFragment memFrag)
63         {
64             lang.set((const char*)(memFrag.ptr), memFrag.len);
65         };
66 
67 
getLang()68         inline const char *getLang()
69         {
70             return lang.get_cstr();
71         };
getMaximumPTime()72         inline int getMaximumPTime()
73         {
74             return maximumPTime;
75         }
76 
77 
78 };
79 
80 #endif
81