|
1 /* |
|
2 * Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __RTPPACKETPARAM_H |
|
22 #define __RTPPACKETPARAM_H |
|
23 |
|
24 // INCLUDES |
|
25 //#include <e32def.h> |
|
26 #include <rtpheader.h> |
|
27 |
|
28 // DATA TYPES |
|
29 enum TRtpPacketType |
|
30 { |
|
31 ERTP = 1, |
|
32 ERTCP_HEADER = 2, |
|
33 ERTCP_SR = 200, |
|
34 ERTCP_RR = 201, |
|
35 ERTCP_SDES = 202, |
|
36 ERTCP_BYE = 203, |
|
37 ERTCP_APP = 204 |
|
38 }; |
|
39 |
|
40 /** |
|
41 * Stream status parameters as received in latest packet. |
|
42 * |
|
43 * @lib RtpService.dll |
|
44 */ |
|
45 class TRtpPacketStreamParam |
|
46 { |
|
47 public://Nested classes |
|
48 |
|
49 /** |
|
50 * RTP packet |
|
51 * Header field |
|
52 **/ |
|
53 class TRtpStreamHeaderField |
|
54 { |
|
55 public: //Constructor |
|
56 TRtpStreamHeaderField(); |
|
57 |
|
58 public: //Data |
|
59 TRtpSSRC SSRC; |
|
60 TUint8 payload; |
|
61 TRtpSequence seqNum; |
|
62 TRtpTimeStamp timeStamp; |
|
63 }; |
|
64 |
|
65 /** |
|
66 * RTCP packet |
|
67 * Header field |
|
68 **/ |
|
69 class TRtcpStreamHeaderField |
|
70 { |
|
71 public://Constructor |
|
72 TRtcpStreamHeaderField(); |
|
73 |
|
74 public: //Data |
|
75 TRtpSSRC SSRC; |
|
76 }; |
|
77 |
|
78 /** |
|
79 * RTCP packet |
|
80 * SR field |
|
81 **/ |
|
82 class TRtcpStreamHeaderFieldSR |
|
83 { |
|
84 public://Constructor |
|
85 TRtcpStreamHeaderFieldSR(); |
|
86 |
|
87 public://Data |
|
88 TRtpSSRC SSRC; |
|
89 TUint cumNumOctetsSent; |
|
90 TUint numPacketsSent; |
|
91 }; |
|
92 |
|
93 /** |
|
94 * RTCP packet |
|
95 * RR field |
|
96 **/ |
|
97 class TRtcpStreamHeaderFieldRR |
|
98 { |
|
99 public://Constructor |
|
100 TRtcpStreamHeaderFieldRR(); |
|
101 |
|
102 public: //Data |
|
103 TRtpSSRC SSRC; |
|
104 TUint8 fractionLost; |
|
105 TUint cumNumPacketsLost; |
|
106 TUint32 seqNumReceived; |
|
107 TUint arrivalJitter; |
|
108 }; |
|
109 |
|
110 /** |
|
111 * RTCP packet |
|
112 * SDES field |
|
113 **/ |
|
114 class TRtcpStreamHeaderFieldSDES |
|
115 { |
|
116 public://Constructor |
|
117 TRtcpStreamHeaderFieldSDES(); |
|
118 |
|
119 public://Data |
|
120 TRtpSSRC SSRC; |
|
121 }; |
|
122 |
|
123 /** |
|
124 * RTCP packet |
|
125 * BYE field |
|
126 **/ |
|
127 class TRtcpStreamHeaderFieldBYE |
|
128 { |
|
129 public://Constructor |
|
130 TRtcpStreamHeaderFieldBYE(); |
|
131 |
|
132 public://Data |
|
133 TRtpSSRC SSRC; |
|
134 }; |
|
135 |
|
136 /** |
|
137 * RTCP packet |
|
138 * APP field |
|
139 **/ |
|
140 class TRtcpStreamHeaderFieldAPP |
|
141 { |
|
142 public: //Constructor |
|
143 TRtcpStreamHeaderFieldAPP(); |
|
144 |
|
145 public://Data |
|
146 TRtpSSRC SSRC; |
|
147 TInt totalPacketLen; |
|
148 }; |
|
149 |
|
150 public://Packet data fields |
|
151 TRtpStreamHeaderField TRTP; |
|
152 TRtcpStreamHeaderField TRTCP_HEADER; |
|
153 TRtcpStreamHeaderFieldSR TRTCP_SR; |
|
154 TRtcpStreamHeaderFieldRR TRTCP_RR; |
|
155 TRtcpStreamHeaderFieldSDES TRTCP_SDES; |
|
156 TRtcpStreamHeaderFieldBYE TRTCP_BYE; |
|
157 TRtcpStreamHeaderFieldAPP TRTCP_APP; |
|
158 }; |
|
159 |
|
160 /** |
|
161 * Other passed/parsed parameters of the packet. |
|
162 * |
|
163 * @lib RtpService.dll |
|
164 */ |
|
165 class TRtpPacketIOParam |
|
166 { |
|
167 public://Nested classes |
|
168 |
|
169 /** |
|
170 * RTP packet |
|
171 * Header field |
|
172 **/ |
|
173 class TRtpIOHeaderField |
|
174 { |
|
175 |
|
176 public://Constructor |
|
177 TRtpIOHeaderField(); |
|
178 |
|
179 public://Data |
|
180 TUint8 padding; |
|
181 TUint8 marker; |
|
182 TUint8 fHeaderExtension; |
|
183 TUint8 numCSRC; |
|
184 TUint32* CSRCarray; |
|
185 TUint8* payloadData; |
|
186 TInt payloadDataLen; |
|
187 |
|
188 public://Nested class |
|
189 /** |
|
190 * RTP packet |
|
191 * Header extension field |
|
192 **/ |
|
193 class TRtpIOHeaderExtension |
|
194 { |
|
195 public://Constructor && Destructor |
|
196 TRtpIOHeaderExtension(); |
|
197 |
|
198 public://Data |
|
199 TInt type; |
|
200 TInt length; |
|
201 TUint8* data; |
|
202 }; |
|
203 |
|
204 public://Packet data field |
|
205 TRtpIOHeaderExtension extension; |
|
206 |
|
207 }; |
|
208 |
|
209 /** |
|
210 * RTCP packet |
|
211 * Header field |
|
212 **/ |
|
213 class TRtcpIOHeaderField |
|
214 { |
|
215 public://Constructor |
|
216 TRtcpIOHeaderField(); |
|
217 |
|
218 public://Data |
|
219 TRtpPacketType pt; |
|
220 TInt sourceCount; |
|
221 TInt length; |
|
222 }; |
|
223 |
|
224 /** |
|
225 * RTCP packet |
|
226 * SR field |
|
227 **/ |
|
228 class TRtcpIOHeaderFieldSR |
|
229 { |
|
230 public://Constructor |
|
231 TRtcpIOHeaderFieldSR(); |
|
232 |
|
233 public://Data |
|
234 TUint32 NTPTimeStampSec; |
|
235 TUint32 NTPTimeStampFrac; |
|
236 TRtpTimeStamp timeStamp; |
|
237 }; |
|
238 |
|
239 /** |
|
240 * RTCP packet |
|
241 * RR field |
|
242 **/ |
|
243 class TRtcpIOHeaderFieldRR |
|
244 { |
|
245 public://Constructor |
|
246 TRtcpIOHeaderFieldRR(); |
|
247 |
|
248 public://Data |
|
249 TUint32 lastSRTimeStamp; |
|
250 TUint32 delaySinceLSR; |
|
251 }; |
|
252 |
|
253 /** |
|
254 * RTCP packet |
|
255 * SDES field |
|
256 **/ |
|
257 class TRtcpIOHeaderFieldSDES |
|
258 { |
|
259 public://Constructor |
|
260 TRtcpIOHeaderFieldSDES(); |
|
261 |
|
262 public://Data |
|
263 TUint8* sdesItems[8]; |
|
264 TInt sdesItemsSize[8]; |
|
265 TInt paddingSize; |
|
266 }; |
|
267 |
|
268 /** |
|
269 * RTCP packet |
|
270 * BYE field |
|
271 **/ |
|
272 class TRtcpIOHeaderFieldBYE |
|
273 { |
|
274 public://Constructor |
|
275 TRtcpIOHeaderFieldBYE(); |
|
276 |
|
277 public://Data |
|
278 TUint8* reason; |
|
279 TInt reasonSize; |
|
280 TInt paddingSize; |
|
281 }; |
|
282 |
|
283 /** |
|
284 * RTCP packet |
|
285 * APP field |
|
286 **/ |
|
287 class TRtcpIOHeaderFieldAPP |
|
288 { |
|
289 public://Constructor |
|
290 TRtcpIOHeaderFieldAPP(); |
|
291 |
|
292 public://Data |
|
293 TRtcpAppName name; |
|
294 TUint8* appData; |
|
295 TInt appDataLen; |
|
296 }; |
|
297 |
|
298 public:// Packet data fields |
|
299 TRtpIOHeaderField TRTP; |
|
300 TRtcpIOHeaderField TRTCP_HEADER; |
|
301 TRtcpIOHeaderFieldSR TRTCP_SR; |
|
302 TRtcpIOHeaderFieldRR TRTCP_RR; |
|
303 TRtcpIOHeaderFieldSDES TRTCP_SDES; |
|
304 TRtcpIOHeaderFieldBYE TRTCP_BYE; |
|
305 TRtcpIOHeaderFieldAPP TRTCP_APP; |
|
306 }; |
|
307 |
|
308 #endif // __RTPPACKETPARAMS_H |
|
309 |
|
310 // End of File |