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 PAYLOAD_INFO_H 20 #define PAYLOAD_INFO_H 21 22 class PayloadSpecificInfoTypeBase 23 { 24 public: PayloadSpecificInfoTypeBase()25 PayloadSpecificInfoTypeBase() 26 { 27 payloadNumber = 0; 28 sampleRate = 0; 29 noOfChannels = 0; 30 maxBufferSize = 0; 31 profileLevelID = -1; 32 configSize = 0; 33 }; 34 ~PayloadSpecificInfoTypeBase()35 virtual ~PayloadSpecificInfoTypeBase() 36 {}; 37 setPayloadNumber(int pNumber)38 inline void setPayloadNumber(int pNumber) 39 { 40 payloadNumber = pNumber; 41 }; 42 setSampleRate(int sRate)43 inline void setSampleRate(int sRate) 44 { 45 sampleRate = sRate; 46 }; 47 setNoOfChannels(int channels)48 inline void setNoOfChannels(int channels) 49 { 50 noOfChannels = channels; 51 }; 52 setMaxBufferSize(int maxBuff)53 inline void setMaxBufferSize(int maxBuff) 54 { 55 maxBufferSize = maxBuff; 56 }; 57 setProfileLevelID(int pID)58 inline void setProfileLevelID(int pID) 59 { 60 profileLevelID = pID; 61 }; 62 setDecoderSpecificInfo(OsclSharedPtr<uint8> Info)63 inline void setDecoderSpecificInfo(OsclSharedPtr<uint8> Info) 64 { 65 configHeader = Info; 66 }; 67 getConfigHeader()68 OsclSharedPtr<uint8> getConfigHeader() 69 { 70 return configHeader; 71 } 72 setDecoderSpecificInfoSize(uint32 size)73 inline void setDecoderSpecificInfoSize(uint32 size) 74 { 75 configSize = size; 76 }; 77 getConfigSize()78 uint32 getConfigSize() 79 { 80 return configSize; 81 }; getPayloadNumber()82 uint32 getPayloadNumber() 83 { 84 return payloadNumber; 85 }; 86 getSampleRate()87 uint32 getSampleRate() 88 { 89 return sampleRate; 90 }; 91 getNumberOfChannels()92 uint32 getNumberOfChannels() 93 { 94 return noOfChannels; 95 }; 96 getMaxBufferSize()97 inline int getMaxBufferSize() 98 { 99 return maxBufferSize; 100 }; 101 getProfileLevelID()102 inline int getProfileLevelID() 103 { 104 return profileLevelID; 105 }; 106 107 uint32 payloadNumber; 108 uint32 sampleRate; 109 uint32 noOfChannels; 110 int maxBufferSize; 111 int profileLevelID; 112 OsclSharedPtr<uint8> configHeader; 113 uint32 configSize; 114 115 }; 116 117 #endif 118