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 AAC_MEDIAINFO_H 20 #define AAC_MEDIAINFO_H 21 22 #include "sdp_memory.h" 23 #include "media_info.h" 24 25 26 // NOTE.... this information really needs to exist for only one media object... 27 // i.e., there is no reason to have arrays of these fields, since we have one of these 28 // mediaInfo elements for each media object... the trick is how to get these from the SDP 29 // file into each of the media elements... 30 31 32 33 class aac_mediaInfo : public mediaInfo 34 { 35 private: 36 int profileLevelID; 37 OSCL_HeapString<SDPParserAlloc> lang; 38 int numSampleEntries; 39 40 public: aac_mediaInfo()41 aac_mediaInfo() 42 { 43 lang = NULL; 44 profileLevelID = -1; 45 }; aac_mediaInfo(const aac_mediaInfo & pSource)46 aac_mediaInfo(const aac_mediaInfo & pSource) : mediaInfo(pSource) 47 { 48 setLang(pSource.lang); 49 setProfileLevelID(pSource.profileLevelID); 50 } 51 ~aac_mediaInfo()52 ~aac_mediaInfo() 53 { 54 }; setLang(char * language)55 inline void setLang(char* language) 56 { 57 lang = language; 58 }; setLang(const OSCL_HeapString<SDPParserAlloc> & language)59 inline void setLang(const OSCL_HeapString<SDPParserAlloc>& language) 60 { 61 lang = language; 62 }; setLang(const OsclMemoryFragment memFrag)63 inline void setLang(const OsclMemoryFragment memFrag) 64 { 65 lang.set((const char*)(memFrag.ptr), memFrag.len); 66 }; setProfileLevelID(int pID)67 inline void setProfileLevelID(int pID) 68 { 69 profileLevelID = pID; 70 }; 71 setNumSampleEntries(int inNumSampleEntries)72 inline void setNumSampleEntries(int inNumSampleEntries) 73 { 74 numSampleEntries = inNumSampleEntries; 75 }; 76 77 getLang()78 inline const char *getLang() 79 { 80 return lang.get_cstr(); 81 }; getProfileLevelID()82 inline int getProfileLevelID() 83 { 84 return profileLevelID; 85 }; getNumSampleEntries()86 inline int getNumSampleEntries() 87 { 88 return numSampleEntries; 89 }; 90 91 }; 92 #endif 93