multimediacommscontroller/mmccinterface/inc/mmcccodecg711.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2004-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:    Class is used for configuring G711 codec.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __MCC_CODEC_G711_H__
       
    22 #define __MCC_CODEC_G711_H__
       
    23 
       
    24 //  INCLUDES
       
    25 #include "mmcccodecinformation.h"
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // G.711 Codec possible bitrates
       
    30 const TUint KG711Bitrate64 = 64000;
       
    31 const TInt KG711DefaultHwFrameTime( 20 );
       
    32 const TUint8 KG711PayloadTypePCMU( 0 );
       
    33 const TUint8 KG711PayloadTypePCMA( 8 );
       
    34 
       
    35 // CLASS DECLARATION
       
    36 /**
       
    37 *  Container class for the codec information.
       
    38 *
       
    39 *  @lib mmccinterface.dll 
       
    40 */
       
    41 NONSHARABLE_CLASS( CMCCCodecG711 ) : public CMccCodecInformation
       
    42     {
       
    43     public:  // Constructors and destructor
       
    44         
       
    45         /**
       
    46         * Two-phased constructor.
       
    47         */
       
    48         static CMCCCodecG711* NewL( );
       
    49         
       
    50         /**
       
    51         * Destructor.
       
    52         */
       
    53         virtual ~CMCCCodecG711();
       
    54         
       
    55     public:    // From CMCCCodecInformation
       
    56 
       
    57         /**
       
    58         * From CMCCCodecInformation
       
    59         */
       
    60         CMccCodecInformation* CloneDefaultsL();
       
    61         
       
    62         /**
       
    63         * From CMCCCodecInformation
       
    64         */
       
    65         CMccCodecInformation* CloneDetailedL();
       
    66         
       
    67         /**
       
    68         * From CMccCodecInformation
       
    69         */
       
    70         TBool RequireSignalling( const CMccCodecInformation& aCandidate ) const;  
       
    71         
       
    72 // sets
       
    73     
       
    74         /**
       
    75         * From MccCodecInformation. Enable / Disable Voice Activity Detection.
       
    76         * @since    Series 60 3.0
       
    77         * @param    aEnableVAD    Boolean indicating whether to enable Voice Activity Detection
       
    78         * @return   KErrNotSupported if codec doesn't support VAD; otherwise KErrNone.
       
    79         */
       
    80         TInt EnableVAD( TBool aEnableVAD );
       
    81         
       
    82         /**
       
    83         * From MccCodecInformation. Sets bitrate used with codec.
       
    84         * @since     Series 60 3.0
       
    85         * @param     aBitrate     New bitrate value
       
    86         * @return     KErrNotSupported if codec doesn't support bitrate value issued; otherwise KErrNone.
       
    87         */
       
    88         TInt SetBitrate( TUint aBitrate );
       
    89         
       
    90         /**
       
    91         * From MccCodecInformation. Sets the sampling frequency.
       
    92         * @since    Series 60 3.0
       
    93         * @param    aSamplingFreq   Sampling frequency to be used
       
    94         * @return   KErrNotSupported if codec doesn't support sampling frequency issued; otherwise KErrNone.
       
    95         */
       
    96         TInt SetSamplingFreq( TUint32 aSamplingFreq );
       
    97 
       
    98         /**
       
    99         * From MccCodecInformation. Sets the packet time.
       
   100         * @since    Series 60 3.0
       
   101         * @param aPTime PacketTime.
       
   102         * @return One of the standard system-wide error codes.
       
   103         */
       
   104         TInt SetPTime( TUint aPTime );
       
   105         
       
   106         /**
       
   107         * From MccCodecInformation. Sets max packet time.
       
   108         * @since    Series 60 3.0
       
   109         * @param aMaxPTime Maximum PacketTime
       
   110         * @return One of the standard system-wide error codes.
       
   111         */
       
   112         TInt SetMaxPTime( TUint aMaxPTime );
       
   113 
       
   114         /**
       
   115         * From MccCodecInformation. Sets the sdp name.
       
   116         * @since Series 60 3.0
       
   117         * @param aRtpId - [input] RTP session ID
       
   118         * @return One of the standard system-wide error codes.
       
   119         */
       
   120         TInt SetSdpName( const TDesC8& aSdpName );
       
   121         
       
   122         /**
       
   123         * From MccCodecInformation. Sets the payload type.
       
   124         * @since Series 60 3.0
       
   125         * @param aRtpId - [input] RTP session ID
       
   126         * @return One of the standard system-wide error codes.
       
   127         */
       
   128         TInt SetPayloadType( TUint8 aType );
       
   129         
       
   130         /**
       
   131         * From MccCodecInformation. Sets the codec mode.
       
   132         * @since         Series 60 3.0
       
   133         * @param aMode    Codec mode ( e.g. ULAW/ALAW, Bandwidth efficient / octet aligned )
       
   134         * @return        KErrNotSupported if codec doesnt' support codec mode value issued; otherwise KErrNone.
       
   135         */
       
   136         TInt SetCodecMode( TCodecMode aCodecMode );
       
   137         
       
   138         /**
       
   139         * Enable / Disable Comfort noise generation.
       
   140         * @param aComfortNoisePT Payloadtype value indicating what
       
   141         *        payload type should be used for comfort noise.
       
   142         *        KPayloadTypeUndefined can be used to turn comfor noise
       
   143         *        generation off.
       
   144         * @return One of the standard system-wide error codes.
       
   145         */
       
   146         TInt SetComfortNoiseGeneration( TUint8 aComfortNoisePT );
       
   147         
       
   148         /**
       
   149         * Set Allowed BitRate
       
   150         * @since    Series 60 3.0
       
   151         * @param    aBitRateMask
       
   152         *                       
       
   153         * @return   Etrue, if Mask is valid
       
   154         */
       
   155 
       
   156         TInt SetAllowedBitrates( TUint aBitrateMask );
       
   157                    
       
   158     private:
       
   159         
       
   160         /**
       
   161         * C++ default constructor.
       
   162         */
       
   163         CMCCCodecG711();
       
   164 
       
   165         /**
       
   166         * By default Symbian 2nd phase constructor is private.
       
   167         */
       
   168         void ConstructL( );
       
   169 
       
   170     };
       
   171 
       
   172 
       
   173 #endif      //__MCC_CODEC_G711_H__
       
   174 
       
   175 // End of File