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 RFC3640_MEDIAINFO_H_INCLUDED 20 #define RFC3640_MEDIAINFO_H_INCLUDED 21 22 #ifndef MEDIAINFO_H 23 #include "media_info.h" 24 #endif 25 26 class rfc3640_mediaInfo : public mediaInfo 27 { 28 private: 29 30 uint32 streamType; 31 OSCL_HeapString<SDPParserAlloc> mode; 32 33 public: 34 //For now, just default to AAC high bit-rate. rfc3640_mediaInfo()35 rfc3640_mediaInfo() 36 { 37 mediaInfo(); 38 mode = NULL; 39 40 }; 41 rfc3640_mediaInfo(const rfc3640_mediaInfo & pSource)42 rfc3640_mediaInfo(const rfc3640_mediaInfo &pSource) : mediaInfo(pSource) 43 { 44 45 } 46 const rfc3640_mediaInfo & operator=(const rfc3640_mediaInfo &pSource) 47 { 48 if (this != &pSource) 49 { 50 ((mediaInfo&) *this) = pSource; 51 setStreamType(pSource.streamType); 52 setModeType(pSource.mode); 53 } 54 return *this; 55 } 56 ~rfc3640_mediaInfo()57 ~rfc3640_mediaInfo() {}; 58 setStreamType(uint32 stype)59 inline void setStreamType(uint32 stype) 60 { 61 streamType = stype; 62 }; 63 getStreamType()64 inline uint32 getStreamType() 65 { 66 return streamType; 67 }; setMode(char * md)68 inline void setMode(char* md) 69 { 70 mode = md; 71 }; setModeType(const OSCL_HeapString<SDPParserAlloc> & md)72 inline void setModeType(const OSCL_HeapString<SDPParserAlloc>& md) 73 { 74 mode = md; 75 }; setModeType(const OsclMemoryFragment memFrag)76 inline void setModeType(const OsclMemoryFragment memFrag) 77 { 78 mode.set((const char*)(memFrag.ptr), memFrag.len); 79 }; getMode(void)80 inline char* getMode(void) 81 { 82 return mode.get_str(); 83 }; 84 85 86 87 }; 88 89 #endif 90