|
1 /* |
|
2 * Copyright (c) 2006 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: Provides DTMF support |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MCCINTERNALCODECS_H |
|
20 #define MCCINTERNALCODECS_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <mmf\common\mmfutilities.h> |
|
24 #include <mmf\common\mmffourcc.h> |
|
25 #include <mmf\common\mmfbase.h> |
|
26 #include <in_sock.h> |
|
27 #include "mmcccodecinformation.h" |
|
28 #include "mmccnetworksettings.h" |
|
29 |
|
30 // CONSTANTS |
|
31 |
|
32 // Internal value for Mcc codec information in order to catch undefined values |
|
33 const TUint KMccCodecParamUndefined = 0; |
|
34 // Internal value for undefined payload type as max payload type is 127 (7-bit value) |
|
35 // and values 0-127 are used for different payload types. Naturally then value 128 is |
|
36 // then a good value for payload type. |
|
37 const TUint8 KMccPayloadTypeMax = 128; |
|
38 |
|
39 // Default ports for RTP & RTCP |
|
40 //const TUint KMDefaultRtpPort = 5000; |
|
41 //const TUint KDefaultRtcpPort = 5001; |
|
42 |
|
43 // Default jitter buffer size in milliseconds |
|
44 const TUint KDefautJitterBufferSize = 200; |
|
45 |
|
46 // Number of AMR bitrates supported |
|
47 const TUint KAmrBitratesSupported = 8; |
|
48 |
|
49 // Number of G.711 bitrates supported |
|
50 const TUint KG711BitratesSupported = 1; |
|
51 |
|
52 // Number of iLBC bitrates supported |
|
53 const TUint KIlbcBitratesSupported = 2; |
|
54 |
|
55 // Number of G.729 bitrates supported |
|
56 const TUint KG729BitratesSupported = 1; |
|
57 |
|
58 // AMR BITRATES |
|
59 const TUint KAmrBitrates[KAmrBitratesSupported] = |
|
60 { |
|
61 4750, 5150, 5900, 6700, 7400, 7950, 10200, 12200 |
|
62 }; |
|
63 |
|
64 // G.711 BITRATES |
|
65 const TUint KG711Bitrates[KG711BitratesSupported] = |
|
66 { |
|
67 64000 |
|
68 }; |
|
69 |
|
70 // iLBC BITRATES (Can also tell the codec mode for iLBC (20ms, 30ms) |
|
71 const TUint KIlbcBitrates[KIlbcBitratesSupported] = |
|
72 { |
|
73 13330, 15200 |
|
74 }; |
|
75 |
|
76 // G.729 BITRATES |
|
77 const TUint KG729Bitrates[KG729BitratesSupported] = |
|
78 { |
|
79 8000 |
|
80 }; |
|
81 |
|
82 // Generic nothing mode |
|
83 const TUint KMccCodecModeNone = 1; |
|
84 |
|
85 // G.711 Codec modes as it uses one FourCC |
|
86 const TUint KG711ModeaLawEnc = 2; |
|
87 const TUint KG711ModeuLawEnc = 3; |
|
88 |
|
89 // AMR Codec modes |
|
90 const TUint KAmrCodecModeBandwidthEfficient = 4; |
|
91 const TUint KAmrCodecModeOctetAlign = 5; |
|
92 |
|
93 // DTMF Modes |
|
94 const TUint KDtmfModeEvent = 6; |
|
95 const TUint KDtmfModeTone = 7; |
|
96 const TUint KDtmfModeRedEvents = 8; |
|
97 |
|
98 // iLBC codec modes |
|
99 const TUint KIlbcMode20msFrame = 9; |
|
100 const TUint KIlbcMode30msFrame = 10; |
|
101 |
|
102 // NALU constants |
|
103 const TInt KMccNaluStartCodeLen = 3; |
|
104 const TInt KMccNaluEndCodeLen = 2; |
|
105 |
|
106 // MACROS |
|
107 |
|
108 // DATA TYPES |
|
109 |
|
110 // FUNCTION PROTOTYPES |
|
111 |
|
112 // FORWARD DECLARATIONS |
|
113 |
|
114 // CLASS DECLARATION |
|
115 |
|
116 /** |
|
117 * Mcc Codec information for Mcc internal use |
|
118 * |
|
119 * @lib N/A |
|
120 * @since Series 60 3.0 |
|
121 */ |
|
122 |
|
123 class TMccCodecInfo |
|
124 { |
|
125 public: // Constructors |
|
126 |
|
127 /** |
|
128 * Default constructor |
|
129 */ |
|
130 inline TMccCodecInfo() : |
|
131 iType(TUid()), |
|
132 iFourCC( TFourCC() ), |
|
133 iPayloadFormatEncoder( 0 ), |
|
134 iPayloadFormatDecoder( 0 ), |
|
135 iBitrate( KMccCodecParamUndefined ), |
|
136 iSamplingFreq( 0 ), |
|
137 iEnableDTX( EFalse ), |
|
138 iCodecMode( KMccCodecParamUndefined ), |
|
139 iAlgoUsed( ENoAlgoUsed ), |
|
140 iPtime( KMccCodecParamUndefined ), |
|
141 iMaxPtime( KMccCodecParamUndefined ), |
|
142 iPayloadType( KMccPayloadTypeMax ), |
|
143 iRedundantPayload( KMccPayloadTypeMax ), |
|
144 iRedundancyCount( static_cast<TUint8>( KMccCodecParamUndefined ) ), |
|
145 iHwFrameTime( 0 ), |
|
146 iFrameSize( 0 ), |
|
147 iCNFrameSize( 0 ), |
|
148 iFmtpLength( 0 ), |
|
149 iJitterSize( 0 ), |
|
150 iNeighbor( EFalse ), |
|
151 iModeChangePeriod( 1 ), |
|
152 iJitterBufInactivityTimeOut( 0 ), |
|
153 iJitterBufPlayToneTimeout( 0 ), |
|
154 iJitterBufPlayToneFrequency( 0 ), |
|
155 iJitterBufPlayToneDuration( 0 ), |
|
156 iJitterBufThreshold( 0 ), |
|
157 iJitterBufBufferLength( 0 ), |
|
158 iComfortNoiseGenerationPt( KPayloadTypeUndefined ), |
|
159 iBitrateMask( 0 ), |
|
160 iAverageBitrate( 0 ), |
|
161 iMaxBitrate( 0 ), |
|
162 iFramerate( 0 ), |
|
163 iVideoWidth( 0 ), |
|
164 iVideoHeight( 0 ), |
|
165 iMTUSize( 1400 ), |
|
166 iSessionID( 0 ), |
|
167 iLinkID( 0 ), |
|
168 iStreamID( 0 ), |
|
169 iKeepaliveInterval( 0 ), |
|
170 iKeepalivePT( 0 ), |
|
171 iKeepaliveData( KNullDesC8 ), |
|
172 iIsUpdate(0), |
|
173 iMaxRed( -1 ), |
|
174 iSourceDefinedTimeStamps( EFalse ), |
|
175 iConfigKey( KNullDesC8 ), |
|
176 iEncodingDecodingDevice( KNullUid ) |
|
177 { }; |
|
178 |
|
179 /** |
|
180 * Copy constructor |
|
181 */ |
|
182 inline TMccCodecInfo( const TMccCodecInfo& aCodec ) : |
|
183 iType( aCodec.iType ), |
|
184 iSdpName( aCodec.iSdpName ), |
|
185 iFourCC( aCodec.iFourCC ), |
|
186 iPayloadFormatEncoder( aCodec.iPayloadFormatEncoder ), |
|
187 iPayloadFormatDecoder( aCodec.iPayloadFormatDecoder ), |
|
188 iBitrate( aCodec.iBitrate ), |
|
189 iSamplingFreq( aCodec.iSamplingFreq ), |
|
190 iEnableDTX( aCodec.iEnableDTX ), |
|
191 iCodecMode( aCodec.iCodecMode ), |
|
192 iAlgoUsed( aCodec.iAlgoUsed ), |
|
193 iPtime( aCodec.iPtime ), |
|
194 iMaxPtime( aCodec.iMaxPtime ), |
|
195 iPayloadType( aCodec.iPayloadType ), |
|
196 iRedundantPayload( aCodec.iRedundantPayload ), |
|
197 iRedundancyCount( aCodec.iRedundancyCount ), |
|
198 iHwFrameTime( aCodec.iHwFrameTime ), |
|
199 iFrameSize( aCodec.iFrameSize ), |
|
200 iCNFrameSize( aCodec.iCNFrameSize ), |
|
201 iFmtpLength( aCodec.iFmtpLength ), |
|
202 iJitterSize( aCodec.iJitterSize ), |
|
203 iNeighbor( aCodec.iNeighbor ), |
|
204 iModeChangePeriod( aCodec.iModeChangePeriod ), |
|
205 iJitterBufInactivityTimeOut( aCodec.iJitterBufInactivityTimeOut ), |
|
206 iJitterBufPlayToneTimeout( aCodec.iJitterBufPlayToneTimeout ), |
|
207 iJitterBufPlayToneFrequency( aCodec.iJitterBufPlayToneFrequency ), |
|
208 iJitterBufPlayToneDuration( aCodec.iJitterBufPlayToneDuration ), |
|
209 iJitterBufThreshold( aCodec.iJitterBufThreshold ), |
|
210 iJitterBufBufferLength( aCodec.iJitterBufBufferLength ), |
|
211 iComfortNoiseGenerationPt( aCodec.iComfortNoiseGenerationPt ), |
|
212 iBitrateMask( aCodec.iBitrateMask ), |
|
213 iAverageBitrate( aCodec.iAverageBitrate ), |
|
214 iMaxBitrate( aCodec.iMaxBitrate ), |
|
215 iFramerate( aCodec.iFramerate ), |
|
216 iVideoWidth( aCodec.iVideoWidth ), |
|
217 iVideoHeight( aCodec.iVideoHeight ), |
|
218 iMTUSize( aCodec.iMTUSize ), |
|
219 iSessionID( aCodec.iSessionID ), |
|
220 iLinkID( aCodec.iLinkID ), |
|
221 iStreamID( aCodec.iStreamID ), |
|
222 iPriority( aCodec.iPriority ), |
|
223 iKeepaliveInterval( aCodec.iKeepaliveInterval ), |
|
224 iKeepalivePT( aCodec.iKeepalivePT ), |
|
225 iKeepaliveData( aCodec.iKeepaliveData ), |
|
226 iIsUpdate( aCodec.iIsUpdate ), |
|
227 iMaxRed( aCodec.iMaxRed ), |
|
228 iSourceDefinedTimeStamps( aCodec.iSourceDefinedTimeStamps ), |
|
229 iConfigKey( aCodec.iConfigKey ), |
|
230 iEncodingDecodingDevice( aCodec.iEncodingDecodingDevice ) |
|
231 |
|
232 { }; |
|
233 |
|
234 public: // Functions |
|
235 |
|
236 /** |
|
237 * Helper method for checking the codecinfo parameters |
|
238 * @since Series 60 3.0 |
|
239 * @param aCodec Codec which to check |
|
240 * @return KErrNotReady or KErrNone |
|
241 */ |
|
242 static inline TInt CheckCodecInfo( const TMccCodecInfo& /*aCodec*/ ) |
|
243 { |
|
244 // And different codec bitrate/mode combinations should be checked also |
|
245 /* |
|
246 if( aCodec.iFourCC == KMMFFourCCCodeNULL) |
|
247 { |
|
248 return KErrNotReady; |
|
249 } |
|
250 else if( KMccCodecParamUndefined == aCodec.iBitrate ) |
|
251 { |
|
252 return KErrNotReady-1; |
|
253 } |
|
254 else if( KMccCodecParamUndefined == aCodec.iPtime ) |
|
255 { |
|
256 return KErrNotReady-2; |
|
257 } |
|
258 else if( KMccCodecParamUndefined == aCodec.iMaxPtime ) |
|
259 { |
|
260 return KErrNotReady-3; |
|
261 } |
|
262 else if( KMccPayloadTypeMax <= aCodec.iPayloadType ) |
|
263 { |
|
264 return KErrNotReady-4; |
|
265 } |
|
266 else |
|
267 { |
|
268 return KErrNone; |
|
269 } |
|
270 */ |
|
271 // Need to reimplement this as this is not a good function |
|
272 return KErrNone; |
|
273 }; |
|
274 |
|
275 /** |
|
276 * Function for comparing two codec info objects |
|
277 * @since Series 60 3.0 |
|
278 * @param aCodec1 Codecinfo 1 to compare |
|
279 * @param aCodec2 Codecinfo 2 to compare |
|
280 * @return TBool ETrue if aCodec1 and aCodec2 match |
|
281 */ |
|
282 static inline TBool Compare( const TMccCodecInfo& aCodec1, |
|
283 const TMccCodecInfo& aCodec2 ) |
|
284 { |
|
285 if( aCodec1.iFourCC == aCodec2.iFourCC && |
|
286 aCodec1.iBitrate == aCodec2.iBitrate && |
|
287 aCodec1.iSamplingFreq == aCodec2.iSamplingFreq && |
|
288 aCodec1.iVideoHeight == aCodec2.iVideoHeight && |
|
289 aCodec1.iVideoWidth == aCodec2.iVideoWidth && |
|
290 aCodec1.iFramerate == aCodec2.iFramerate && |
|
291 aCodec1.iEnableDTX == aCodec2.iEnableDTX && |
|
292 aCodec1.iCodecMode == aCodec2.iCodecMode && |
|
293 aCodec1.iAlgoUsed == aCodec2.iAlgoUsed && |
|
294 aCodec1.iPtime == aCodec2.iPtime && |
|
295 aCodec1.iMaxPtime == aCodec2.iMaxPtime && |
|
296 aCodec1.iPayloadType == aCodec2.iPayloadType && |
|
297 aCodec1.iRedundantPayload == aCodec2.iRedundantPayload && |
|
298 aCodec1.iRedundancyCount == aCodec2.iRedundancyCount && |
|
299 aCodec1.iHwFrameTime == aCodec2.iHwFrameTime && |
|
300 aCodec1.iFrameSize == aCodec2.iFrameSize && |
|
301 aCodec1.iCNFrameSize == aCodec2.iCNFrameSize && |
|
302 aCodec1.iJitterSize == aCodec2.iJitterSize && |
|
303 aCodec1.iPriority.iPriority == aCodec2.iPriority.iPriority && |
|
304 aCodec1.iPriority.iPref == aCodec2.iPriority.iPref && |
|
305 aCodec1.iKeepaliveInterval == aCodec2.iKeepaliveInterval && |
|
306 aCodec1.iKeepalivePT == aCodec2.iKeepalivePT && |
|
307 aCodec1.iKeepaliveData == aCodec2.iKeepaliveData && |
|
308 aCodec1.iSourceDefinedTimeStamps == aCodec2.iSourceDefinedTimeStamps && |
|
309 aCodec1.iConfigKey == aCodec2.iConfigKey && |
|
310 aCodec1.iEncodingDecodingDevice == aCodec2.iEncodingDecodingDevice ) |
|
311 { |
|
312 return ETrue; |
|
313 } |
|
314 else |
|
315 { |
|
316 return EFalse; |
|
317 } |
|
318 }; |
|
319 |
|
320 static TBool IsAvcPpsOrSpsData( const TDesC8& aBuffer, TBool aIgnoreStartCode = EFalse ) |
|
321 { |
|
322 TBool isPpsOrSps( EFalse ); |
|
323 const TUint8 KMccAvcTypeMask = 0x1F; |
|
324 const TUint8 KMccAvcTypePps = 0x7; |
|
325 const TUint8 KMccAvcTypeSps = 0x8; |
|
326 |
|
327 TInt bufferIndex( 0 ); |
|
328 TInt index( KErrNotFound ); |
|
329 if ( aIgnoreStartCode ) |
|
330 { |
|
331 index = aBuffer.Length() > 0 ? 0 : KErrNotFound; |
|
332 } |
|
333 else |
|
334 { |
|
335 index = FindAvcNaluStart( bufferIndex, aBuffer ); |
|
336 } |
|
337 |
|
338 if ( index != KErrNotFound ) |
|
339 { |
|
340 TUint8 typeInfo = aBuffer[ index ]; |
|
341 isPpsOrSps = ( ( typeInfo & KMccAvcTypeMask ) == KMccAvcTypePps || |
|
342 ( typeInfo & KMccAvcTypeMask ) == KMccAvcTypeSps ); |
|
343 } |
|
344 return isPpsOrSps; |
|
345 }; |
|
346 |
|
347 /** |
|
348 * This function finds a NALU's starting byte by detecting unique start code |
|
349 * occurring in the buffer, as specified in sec B.2 of H264 specs. |
|
350 * NOTE: 4-byte start code 0x00000001 is a special case of 3-byte code, |
|
351 * automatically catered in the logic |
|
352 * |
|
353 * @param aBufferIndex, search start index, on return contains information |
|
354 * of how for buffer was searched |
|
355 * @param aBuffer |
|
356 * @return KErrNotFound if nalu start code is not found, otherwise index |
|
357 * to beginning of end code. |
|
358 */ |
|
359 static TInt FindAvcNaluStart( TInt& aBufferIndex, const TDesC8& aBuffer ) |
|
360 { |
|
361 TUint8 a1, a2, a3; |
|
362 |
|
363 if ( aBufferIndex < 0 ) |
|
364 { |
|
365 return KErrNotFound; |
|
366 } |
|
367 |
|
368 const TUint8 *origDataPtr = aBuffer.Ptr(); |
|
369 const TUint8 *dataPtr = origDataPtr; |
|
370 TInt size( aBuffer.Size() ); |
|
371 while ( aBufferIndex+KMccNaluStartCodeLen < size ) // at least one byte after start code |
|
372 { |
|
373 dataPtr = ( origDataPtr + aBufferIndex ); |
|
374 a1 = *dataPtr; |
|
375 dataPtr++; |
|
376 a2 = *dataPtr; |
|
377 dataPtr++; |
|
378 a3 = *dataPtr; |
|
379 |
|
380 if ( a1 == 0x00 && a2 == 0x00 && a3 == 0x01 ) |
|
381 { |
|
382 aBufferIndex += KMccNaluStartCodeLen; |
|
383 return aBufferIndex; |
|
384 } |
|
385 |
|
386 aBufferIndex++; |
|
387 } |
|
388 |
|
389 return KErrNotFound; |
|
390 }; |
|
391 |
|
392 /** |
|
393 * This function returns location of first byte at the end of NALU |
|
394 * by detecting unique end pattern, as specified in sec B.2 of H264 specs. |
|
395 * |
|
396 * @param aBufferIndex, search start index, on return contains information |
|
397 * of how for buffer was searched |
|
398 * @param aBuffer |
|
399 * @return index to end beginning of end code or last index of aBuffer if |
|
400 * end code is not found |
|
401 */ |
|
402 static TInt FindAvcNaluEnd( TInt& aBufferIndex, const TDesC8& aBuffer ) |
|
403 { |
|
404 TUint8 a1, a2, a3; |
|
405 |
|
406 if ( ( aBufferIndex < 0 ) || ( aBufferIndex >= aBuffer.Size() ) ) |
|
407 { |
|
408 return KErrNotFound; |
|
409 } |
|
410 |
|
411 const TUint8 *origDataPtr = aBuffer.Ptr(); |
|
412 const TUint8 *dataPtr = origDataPtr; |
|
413 TInt size( aBuffer.Size() ); |
|
414 while ( aBufferIndex < size ) |
|
415 { |
|
416 if ( aBufferIndex+KMccNaluEndCodeLen < size ) |
|
417 { |
|
418 dataPtr = ( origDataPtr + aBufferIndex ); |
|
419 a1 = *dataPtr; |
|
420 dataPtr++; |
|
421 a2 = *dataPtr; |
|
422 dataPtr++; |
|
423 a3 = *dataPtr; |
|
424 |
|
425 if( ( a1 == 0x00 && a2 == 0x00 && a3 == 0x01 ) || |
|
426 ( a1 == 0x00 && a2 == 0x00 && a3 == 0x00 ) ) |
|
427 { |
|
428 return aBufferIndex; |
|
429 } |
|
430 } |
|
431 aBufferIndex++; |
|
432 } |
|
433 |
|
434 return aBufferIndex; |
|
435 }; |
|
436 |
|
437 public: // Data |
|
438 |
|
439 TUid iType; |
|
440 |
|
441 /** |
|
442 * Sdp name used in SDP messages |
|
443 */ |
|
444 TBuf8<KMaxSdpNameLength> iSdpName; |
|
445 |
|
446 // MMF FourCC code of the codec |
|
447 TFourCC iFourCC; |
|
448 |
|
449 // MMF format encoder for the codec |
|
450 TUint32 iPayloadFormatEncoder; |
|
451 |
|
452 // MMF format decoder for the codec |
|
453 TUint32 iPayloadFormatDecoder; |
|
454 |
|
455 // Codec bitrate |
|
456 TUint iBitrate; |
|
457 |
|
458 // sampling rate |
|
459 TUint32 iSamplingFreq; |
|
460 |
|
461 // Should DTX/VAD/CNG be enabled |
|
462 TBool iEnableDTX; |
|
463 |
|
464 // Codec mode |
|
465 TUint iCodecMode; |
|
466 |
|
467 // Algorithm used |
|
468 TUint iAlgoUsed; |
|
469 |
|
470 // Minimum packet time for codec |
|
471 TUint iPtime; |
|
472 |
|
473 // Maximum packet time for codec |
|
474 TUint iMaxPtime; |
|
475 |
|
476 // RTP Payload type for the codec |
|
477 TUint8 iPayloadType; |
|
478 |
|
479 // RTP payload type for redundant audio |
|
480 TUint8 iRedundantPayload; |
|
481 |
|
482 // Number of redundant frames if enabled |
|
483 TUint8 iRedundancyCount; |
|
484 |
|
485 // Frametime |
|
486 TUint8 iHwFrameTime; |
|
487 |
|
488 // Frame size |
|
489 TUint iFrameSize; |
|
490 |
|
491 // CN Frame size |
|
492 TUint8 iCNFrameSize; |
|
493 |
|
494 //Fmtp size |
|
495 TInt iFmtpLength; |
|
496 |
|
497 // Jitter buffer size |
|
498 TUint iJitterSize; |
|
499 |
|
500 // Mode change neighbor |
|
501 TBool iNeighbor; |
|
502 |
|
503 // Mode change period |
|
504 TUint iModeChangePeriod; |
|
505 |
|
506 //JitterBuffer InactivityTimeOut |
|
507 TUint iJitterBufInactivityTimeOut; |
|
508 |
|
509 //JitterBuffer tone TimeOut |
|
510 TUint iJitterBufPlayToneTimeout; |
|
511 |
|
512 //JitterBuffer tone frequecy |
|
513 TUint iJitterBufPlayToneFrequency; |
|
514 |
|
515 //JitterBuffer tone duration |
|
516 TUint iJitterBufPlayToneDuration; |
|
517 |
|
518 //JitterBuffer threshold |
|
519 TUint iJitterBufThreshold; |
|
520 |
|
521 //JitterBuffer buffer length |
|
522 TUint iJitterBufBufferLength; |
|
523 |
|
524 /** |
|
525 * Comfort noise generation payload type . |
|
526 * Disabled if KPayloadTypeUndefined. |
|
527 */ |
|
528 TUint8 iComfortNoiseGenerationPt; |
|
529 |
|
530 //Bitrates used in codec |
|
531 TUint iBitrateMask; |
|
532 |
|
533 //Average bitrate used in codec |
|
534 TUint iAverageBitrate; |
|
535 |
|
536 //Max bitrate used in codec |
|
537 TUint iMaxBitrate; |
|
538 |
|
539 //Frame rate for video |
|
540 TReal iFramerate; |
|
541 |
|
542 // Horizontal resolution of video |
|
543 TUint iVideoWidth; |
|
544 |
|
545 // Vertical resolution of video |
|
546 TUint iVideoHeight; |
|
547 |
|
548 // Network MTU size (in order to determine outgoing packet's maximum size, if needed) default: 1400 |
|
549 TUint iMTUSize; |
|
550 |
|
551 // Session ID |
|
552 TUint32 iSessionID; |
|
553 |
|
554 // Link ID |
|
555 TUint32 iLinkID; |
|
556 |
|
557 // Stream ID |
|
558 TUint32 iStreamID; |
|
559 |
|
560 // MMF Priority settings |
|
561 TMMFPrioritySettings iPriority; |
|
562 |
|
563 // Rtp keepalive interval (secs) |
|
564 TUint8 iKeepaliveInterval; |
|
565 |
|
566 // Rtp keepalive payload type |
|
567 TUint8 iKeepalivePT; |
|
568 |
|
569 // Rtp keepalive data |
|
570 TBuf8<KMaxKeepAliveDataLen> iKeepaliveData; |
|
571 |
|
572 // Indicates if update param set |
|
573 TBool iIsUpdate; |
|
574 |
|
575 /** |
|
576 * Maximum redundancy in milliseconds |
|
577 */ |
|
578 TInt iMaxRed; |
|
579 |
|
580 // Trust timestamps provided by datasource |
|
581 TBool iSourceDefinedTimeStamps; |
|
582 |
|
583 // Rtp keepalive data |
|
584 TBuf8<KMaxConfigKeyLen> iConfigKey; |
|
585 |
|
586 TUid iEncodingDecodingDevice; |
|
587 }; |
|
588 |
|
589 typedef TPckgBuf<TMccCodecInfo> TMccCodecInfoBuffer; |
|
590 |
|
591 /** |
|
592 * Mcc Stream settings for Mcc internal use |
|
593 * |
|
594 * @lib N/A |
|
595 * @since Series 60 3.0 |
|
596 */ |
|
597 class TMccStreamSettings |
|
598 { |
|
599 public: // Constructors |
|
600 |
|
601 /** |
|
602 * Default constructor |
|
603 */ |
|
604 inline TMccStreamSettings() : iRemoteAddress( KInetAddrAny ), |
|
605 iLocalRtpPort( KDefaultRtpPort ), iLocalRtcpPort( KDefaultRtcpPort ), |
|
606 iPriority( TMMFPrioritySettings() ), iIapId( 0 ), iRtcpEnabled( EFalse ), |
|
607 iIpTos( 0 ) |
|
608 { }; |
|
609 |
|
610 public: // Data |
|
611 |
|
612 // Remote address |
|
613 TInetAddr iRemoteAddress; |
|
614 |
|
615 // Local RTP port |
|
616 TUint iLocalRtpPort; |
|
617 |
|
618 // Local RTCP port |
|
619 TUint iLocalRtcpPort; |
|
620 |
|
621 // MMF Priority settings |
|
622 TMMFPrioritySettings iPriority; |
|
623 |
|
624 // IAP ID |
|
625 TInt iIapId; |
|
626 |
|
627 // RTCP enabled |
|
628 TBool iRtcpEnabled; |
|
629 |
|
630 // TOS setting |
|
631 TInt iIpTos; |
|
632 }; |
|
633 |
|
634 #endif // MCCINTERNALCODECS_H |
|
635 |
|
636 // End of File |