• 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 RFC3640_PAYLOAD_INFO_H
20 #define RFC3640_PAYLOAD_INFO_H
21 
22 #include "payload_info.h"
23 
24 //#define PVMF_SDP_DEFAULT_RFC3640_VIDEO_SAMPLE_RATE 90000
25 //Default Values
26 #define AAC_HBR_SIZELENGTH_DEFAULT_VALUE        13
27 #define AAC_HBR_INDEXLENGTH_DEFAULT_VALUE       3
28 #define AAC_HBR_INDEXDELTALENGTH_DEFAULT_VALUE  3
29 #define AAC_HBR_CTSDELTALENGTH_DEFAULT_VALUE    0
30 #define AAC_HBR_DTSDELTALENGTH_DEFAULT_VALUE    0
31 #define AAC_HBR_HEADERSLENGTH_DEFAULT_VALUE     16
32 #define AAC_HBR_AUXDATASIZELENGTH_DEFAULT_VALUE 0
33 
34 class RFC3640PayloadSpecificInfoType : public PayloadSpecificInfoTypeBase
35 {
36     public:
RFC3640PayloadSpecificInfoType(int payload)37         RFC3640PayloadSpecificInfoType(int payload)
38         {
39             payloadNumber = payload;
40             //For now, just default to AAC high bit-rate.
41             sizeLength             = 13;
42             indexLength            = 3;
43             indexDeltaLength       = 3;
44             CTSDeltaLength         = 0;
45             DTSDeltaLength         = 0;
46             constantDuration       = 0;
47             maxDisplacement        = 0;
48             deInterleaveBufferSize = 0;
49         };
50 
RFC3640PayloadSpecificInfoType()51         RFC3640PayloadSpecificInfoType()
52         {};
53 
setSizeLength(uint32 sLength)54         inline void setSizeLength(uint32 sLength)
55         {
56             sizeLength = sLength;
57         };
setIndexLength(uint32 iLength)58         inline void setIndexLength(uint32 iLength)
59         {
60             indexLength = iLength;
61         };
setIndexDeltaLength(uint32 idLength)62         inline void setIndexDeltaLength(uint32 idLength)
63         {
64             indexDeltaLength = idLength;
65         };
setCTSDeltaLength(uint32 ctsdLength)66         inline void setCTSDeltaLength(uint32 ctsdLength)
67         {
68             CTSDeltaLength = ctsdLength;
69         };
setDTSDeltaLength(uint32 dtsLength)70         inline void setDTSDeltaLength(uint32 dtsLength)
71         {
72             DTSDeltaLength = dtsLength;
73         };
setConstantDuration(uint32 cDuration)74         inline void setConstantDuration(uint32 cDuration)
75         {
76             constantDuration = cDuration;
77         };
setMaxDisplacement(uint32 max)78         inline void setMaxDisplacement(uint32 max)
79         {
80             maxDisplacement = max;
81         };
setDeInterleaveBufferSize(uint32 size)82         inline void setDeInterleaveBufferSize(uint32 size)
83         {
84             deInterleaveBufferSize = size;
85         };
86 
getIndexLength()87         inline uint32 getIndexLength()
88         {
89             return indexLength;
90         };
getSizeLength()91         inline uint32 getSizeLength()
92         {
93             return sizeLength;
94         };
getIndexDeltaLength()95         inline uint32 getIndexDeltaLength()
96         {
97             return indexDeltaLength;
98         };
getCTSDeltaLength()99         inline uint32 getCTSDeltaLength()
100         {
101             return CTSDeltaLength;
102         };
getDTSDeltaLength()103         inline uint32 getDTSDeltaLength()
104         {
105             return DTSDeltaLength;
106         };
getConstantDuration()107         inline uint32 getConstantDuration()
108         {
109             return constantDuration;
110         };
getMaxDisplacement()111         inline uint32 getMaxDisplacement()
112         {
113             return maxDisplacement;
114         };
getDeInterleaveBufferSize()115         inline uint32 getDeInterleaveBufferSize()
116         {
117             return deInterleaveBufferSize;
118         };
119 
120     private:
121         uint32 sizeLength;
122         uint32 indexLength;
123         uint32 indexDeltaLength;
124         uint32 CTSDeltaLength;
125         uint32 DTSDeltaLength;
126         uint32 constantDuration;
127         uint32 maxDisplacement;
128         uint32 deInterleaveBufferSize;
129 };
130 
131 #endif
132