• 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_PAYLOAD_INFO_H
20 #define AMR_PAYLOAD_INFO_H
21 
22 #include "payload_info.h"
23 
24 #define PVMF_SDP_DEFAULT_AMR_SAMPLE_RATE 8000
25 
26 class AmrPayloadSpecificInfoType : public PayloadSpecificInfoTypeBase
27 {
28     public:
AmrPayloadSpecificInfoType(int payload)29         AmrPayloadSpecificInfoType(int payload)
30         {
31             payloadNumber = payload;
32 
33             amr_interLeaving  = -1;
34             amr_maximumPTime = -1;
35             amr_modeChangePeriod = -1;
36             amr_codecModeList = 0;
37             amr_modeChangeNeighbor = false;
38             amr_CRC = false;
39             amr_octetAlign = false;
40             amr_robustSorting = false;
41         };
42 
~AmrPayloadSpecificInfoType()43         ~AmrPayloadSpecificInfoType()
44         {};
45 
setCodecModeList(int cModeList)46         inline void setCodecModeList(int cModeList)
47         {
48             amr_codecModeList = cModeList;
49         };
50 
setModeChangePeriod(int mChangePeriod)51         inline void setModeChangePeriod(int mChangePeriod)
52         {
53             amr_modeChangePeriod = mChangePeriod;
54         };
setModeChangeNeighbor(bool mcneighbor)55         inline void setModeChangeNeighbor(bool mcneighbor)
56         {
57             amr_modeChangeNeighbor = mcneighbor;
58         };
59 
setMaximumPTime(int mPTime)60         inline void setMaximumPTime(int mPTime)
61         {
62             amr_maximumPTime = mPTime;
63         };
64 
setRobustSorting(bool arg)65         inline void setRobustSorting(bool arg)
66         {
67             amr_robustSorting = arg;
68         };
setOctetAlign(bool arg)69         inline void setOctetAlign(bool arg)
70         {
71             amr_octetAlign = arg;
72         };
setCRC(bool arg)73         inline void setCRC(bool arg)
74         {
75             amr_CRC = arg;
76         };
setInterLeaving(int iLeaving)77         inline void setInterLeaving(int iLeaving)
78         {
79             amr_interLeaving = iLeaving;
80         };
81 
getMaximumPTime()82         inline int getMaximumPTime()
83         {
84             return amr_maximumPTime;
85         };
86 
getOctetAlign()87         bool getOctetAlign()
88         {
89             return amr_octetAlign;
90         };
91 
getCodecModeList()92         inline int getCodecModeList()
93         {
94             return amr_codecModeList;
95         };
96 
getModeChangePeriod()97         inline int getModeChangePeriod()
98         {
99             return amr_modeChangePeriod;
100         };
101 
getModeChangeNeighbor()102         inline bool getModeChangeNeighbor()
103         {
104             return amr_modeChangeNeighbor;
105         };
106 
getRobustSorting()107         inline bool getRobustSorting()
108         {
109             return amr_robustSorting;
110         };
111 
getInterleaving()112         inline int getInterleaving()
113         {
114             return amr_interLeaving;
115         };
116 
getCrc()117         inline bool getCrc()
118         {
119             return amr_CRC;
120         };
121 
122 
123     private:
124         int     amr_codecModeList;
125         int     amr_modeChangePeriod;
126         bool    amr_modeChangeNeighbor;
127         int     amr_maximumPTime;
128         bool    amr_robustSorting;
129         bool    amr_octetAlign;
130         bool    amr_CRC;
131         int     amr_interLeaving;
132 };
133 
134 #endif
135