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