mmserv/voipaudioservices/JitterBufferUtility/inc/InternalDef.h
changeset 0 71ca22bcf22a
child 53 eabc8c503852
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Mcc Internal definitions
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef INTERNALDEF_H
       
    21 #define INTERNALDEF_H
       
    22 
       
    23 
       
    24 // CONSTANTS
       
    25 // When the remote end sends us SID/CN frames, then we can update the SID/CN
       
    26 // parameters programmatically. Otherwise, we should not try to "emulate"
       
    27 // SID/CN frames as this can lead to degradation of audio quality. Instead,
       
    28 // we will send NULL/NO_DATA into the decoder.
       
    29 
       
    30 // AMR-NB SID FT value is 8 and is located in the upper 4 bits
       
    31 // See 3GPP TS 26.101
       
    32 const TUint8 KAmrSidMode = 8;
       
    33 
       
    34 // AMR-NB mode mask
       
    35 const TUint8 KAmrModeMask = 0x78;
       
    36 
       
    37 // AMR-NB SID Update frame interval
       
    38 const TInt KAmrNbSidUpdateInterval = 8;
       
    39 
       
    40 // Minimum required data length for DTX decision
       
    41 const TInt KMinDataLenForDtx = 1;
       
    42 
       
    43 // AMR NO_DATA frame needs one byte
       
    44 // See 3GPP TS 26.101 and RFC 2367
       
    45 //  ________________
       
    46 // |0|1|1|1|1|1|0|0|
       
    47 // |P|  FT   |Q|P|P|
       
    48 //
       
    49 //  P = PADDING
       
    50 //  FT = 15 = NO_DATA
       
    51 //  Q = QUALITY
       
    52 const TUint8 KAmrNoDataFrame = 0x7C;
       
    53 
       
    54 // Length of the header and AMR NO_DATA frames
       
    55 const TInt KNoDataLength = 1;
       
    56 
       
    57 // AMR mode solving needs 3 bit shift
       
    58 const TInt KModeShiftBits = 3;
       
    59 
       
    60 // VoIP codec header bytes can be either audio, comfort noise or unvoiced
       
    61 // non-sid (null/no data) frame. Unvoiced non-sid frame is detected when
       
    62 // the header byte does not indicate audio or comfort noise.
       
    63 //const TUint8 KVoIPAudioFrame = 1;
       
    64 const TUint8 KVoIPCNFrame = 2;
       
    65 
       
    66 
       
    67 const TUint KJBAdaptUpdateIval = 250;
       
    68 const TUint KJBMillisecondsToMicroseconds = 1000;
       
    69 const TUint KJBEmptyBufferDelay = 2;
       
    70 
       
    71 const TInt  KDefaultSampleRateInkHz = 8;
       
    72 const TInt  KLowBufferLimit = 2;
       
    73 const TInt  KOverflowAlarmLimit = 20;
       
    74 
       
    75 // Codec frame sizes
       
    76 const TInt  KAMRNBFrameSize = 32;
       
    77 const TInt  KILBCFrameSize  = 52;
       
    78 const TInt  KG729FrameSize  = 24;       // 10 octets + 2 for header
       
    79 
       
    80 // Max possible sequence number of RTP packet with standard RTP header.
       
    81 const TUint KMaxSeqNumber   = 0xFFFF;   // 16-bit value
       
    82 
       
    83 // Codec frame times
       
    84 const TInt  KAMRNBFrameTime = 20;
       
    85 
       
    86 // VoIP codecs have a two byte header
       
    87 const TInt  KVoIPHeaderLength = 2;
       
    88 
       
    89 #endif //INTERNALDEF_H
       
    90 
       
    91 
       
    92 // End of file