multimediacommscontroller/mmccinterface/inc/mmcccodecg729.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 G729 codec.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __MCC_CODEC_G729_H__
       
    22 #define __MCC_CODEC_G729_H__
       
    23 
       
    24 //  INCLUDES
       
    25 #include "mmcccodecinformation.h"
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // G.729 Codec possible bitrates
       
    30 const TInt KG729Bitrate = 8000;
       
    31 const TInt KG729SampleRate = 8000;
       
    32 
       
    33 _LIT8( KAnnexYes, "annexb=yes" );
       
    34 _LIT8( KAnnexNo, "annexb=no" );
       
    35 
       
    36 // CLASS DECLARATION
       
    37 /**
       
    38 *  Container class for the codec information.
       
    39 *
       
    40 *  @lib mmccinterface.dll
       
    41 */
       
    42 NONSHARABLE_CLASS( CMCCCodecG729 ) : public CMccCodecInformation
       
    43     {
       
    44     public:  // Constructors and destructor
       
    45         
       
    46         /**
       
    47         * Two-phased constructor.
       
    48         */
       
    49         static CMCCCodecG729* NewL();
       
    50         
       
    51         /**
       
    52         * Destructor.
       
    53         */
       
    54         virtual ~CMCCCodecG729();
       
    55         
       
    56     public:    // From CMccCodecInformation
       
    57 
       
    58         /**
       
    59         * From CMccCodecInformation
       
    60         */
       
    61         CMccCodecInformation* CloneDefaultsL();
       
    62         
       
    63         /**
       
    64         * From CMccCodecInformation
       
    65         */
       
    66         CMccCodecInformation* CloneDetailedL();
       
    67         
       
    68         /**
       
    69         * From CMccCodecInformation
       
    70         */
       
    71         TBool RequireSignalling( const CMccCodecInformation& aCandidate ) const;  
       
    72         
       
    73         /**
       
    74         * From MccCodecInformation. Enable / Disable Voice Activity Detection.
       
    75         * @since    Series 60 3.0
       
    76         * @param    aEnableVAD    Boolean indicating whether to enable Voice Activity Detection
       
    77         * @return   KErrNotSupported if codec doesn't support VAD; otherwise KErrNone.
       
    78         */
       
    79         TInt EnableVAD( TBool aEnableVAD );
       
    80                
       
    81         /**
       
    82         * From MccCodecInformation. Sets bitrate used with codec.
       
    83         * @since     Series 60 3.0
       
    84         * @param     aBitrate     New bitrate value
       
    85         * @return    KErrNotSupported if codec doesn't support bitrate value issued; otherwise KErrNone.
       
    86         */
       
    87         TInt SetBitrate( TUint aBitrate );
       
    88         
       
    89         /**
       
    90         * From MccCodecInformation. Sets the sampling frequency.
       
    91         * @since    Series 60 3.0
       
    92         * @param    aSamplingFreq   Sampling frequency to be used
       
    93         * @return   KErrNotSupported if codec doesn't support sampling frequency issued; otherwise KErrNone.
       
    94         */
       
    95         TInt SetSamplingFreq( TUint32 aSamplingFreq );
       
    96 
       
    97         /**
       
    98         * From MccCodecInformation. Sets the packet rate.
       
    99         * @since     Series 60 3.0
       
   100         * @param     aPacketrate        New packetrate
       
   101         * @return    KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
       
   102         */
       
   103         TInt SetPTime( TUint aPTime );
       
   104         
       
   105         /**
       
   106         * From MccCodecInformation. Sets the max packet rate.
       
   107         * @since     Series 60 3.0
       
   108         * @param     aPacketrate        New packetrate
       
   109         * @return    KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
       
   110         */
       
   111         TInt SetMaxPTime( TUint aMaxPTime );
       
   112 
       
   113         /**
       
   114         * From MccCodecInformation. Sets the sdp name.
       
   115         * @since Series 60 3.0
       
   116         * @param aRtpId - [input] RTP session ID
       
   117         * @return One of the standard system-wide error codes.
       
   118         */
       
   119         TInt SetSdpName( const TDesC8& aSdpName );
       
   120         
       
   121         /**
       
   122         * From MccCodecInformation. Sets the payload type.
       
   123         * @since Series 60 3.0
       
   124         * @param aRtpId - [input] RTP session ID
       
   125         * @return One of the standard system-wide error codes.
       
   126         */
       
   127         TInt SetPayloadType( TUint8 aType );
       
   128         
       
   129         /**
       
   130         * From MccCodecInformation. Sets the codec mode.
       
   131         * @since         Series 60 3.0
       
   132         * @param aMode   Codec mode ( e.g. ULAW/ALAW, Bandwidth efficient / octet aligned )
       
   133         * @return        KErrNotSupported if codec doesnt' support codec mode value issued; otherwise KErrNone.
       
   134         */
       
   135         TInt SetCodecMode( TCodecMode aCodecMode );
       
   136         
       
   137         /**
       
   138         * Creates the fmtp string from internal values
       
   139         * @since Series 60 3.0
       
   140         * @return void
       
   141         */
       
   142         void CreateFmtpAttrListL();
       
   143         
       
   144         /**
       
   145         * Parses the fmtp attributes, and updates the internal values
       
   146         * except the iFmtpAttr attribute
       
   147         * @since Series 60 3.0
       
   148         * @param aFmtp Fmtp attribute
       
   149         * @return True if any param was updated
       
   150         */
       
   151         TBool ParseFmtpAttrL( const TDesC8& aFmtp );
       
   152         
       
   153         /**
       
   154         * Get the fmtp string
       
   155         * @since Series 60 3.0
       
   156         * @return Fmtp.
       
   157         */
       
   158         TDesC8& GetFmtpL( ); 
       
   159         
       
   160         /**
       
   161         * Set Allowed BitRate
       
   162         * @since    Series 60 3.0
       
   163         * @param    aBitRateMask
       
   164         *                       
       
   165         * @return   Etrue, if Mask is valid
       
   166         */
       
   167 
       
   168         TInt SetAllowedBitrates( TUint aBitrateMask );
       
   169                    
       
   170     private:
       
   171         
       
   172         /**
       
   173         * C++ default constructor.
       
   174         */
       
   175         CMCCCodecG729();
       
   176 
       
   177         /**
       
   178         * By default Symbian 2nd phase constructor is private.
       
   179         */
       
   180         void ConstructL();
       
   181 
       
   182     };
       
   183 
       
   184 
       
   185 #endif      //__MCC_CODEC_G729_H__
       
   186 
       
   187 // End of File