multimediacommsengine/mmceshared/inc/mcecomg729codec.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2005 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:    
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CMCECOMG729CODEC_H
       
    22 #define CMCECOMG729CODEC_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include "mcecomaudiocodec.h"
       
    26 #include "mcedefs.h"
       
    27 
       
    28 
       
    29 
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32 *  Container class for the codec information.
       
    33 *
       
    34 *  @lib 
       
    35 */
       
    36 class CMceComG729Codec : public CMceComAudioCodec
       
    37     {
       
    38 public:  // Constructors and destructor
       
    39 
       
    40     /**
       
    41     * Two-phased constructor.
       
    42     * @param aSdpName sdp name
       
    43     */
       
    44     static CMceComG729Codec* NewL( TBuf8<KMceMaxSdpNameLength> aSdpName );
       
    45     
       
    46     /**
       
    47     * Two-phased constructor.
       
    48     * @param aSdpName sdp name
       
    49     */
       
    50     static CMceComG729Codec* NewLC( TBuf8<KMceMaxSdpNameLength> aSdpName );
       
    51     
       
    52     /**
       
    53     * Destructor.
       
    54     */
       
    55     ~CMceComG729Codec();
       
    56 
       
    57 
       
    58 public: // from CMceComCodec
       
    59 
       
    60     /**
       
    61     * Sets bitrate used with codec for encoding.
       
    62     * @param aBitrate bitrate value for encoding
       
    63     * @return KErrNotSupported if codec doesn't support bitrate
       
    64     *         value issued
       
    65     */
       
    66     TInt SetBitrate( TUint aBitrate );
       
    67     
       
    68     
       
    69     /**
       
    70     * Sets bitrates allowed with codec.
       
    71     * @param aBitrates allowed bitrate values
       
    72     * @return KErrNotSupported if codec doesn't support bitrate
       
    73     *         values issued
       
    74     */
       
    75     TInt SetAllowedBitrates( TUint aBitrates );
       
    76     
       
    77     
       
    78     /**
       
    79     * Sets the codec specific mode.
       
    80     * @param aCodecMode mode of the codec
       
    81     * @return KErrNotSupported if codec doesnt' support codec mode
       
    82     *         value issued
       
    83     */
       
    84     TInt SetCodecMode( TUint aCodecMode );
       
    85     
       
    86    /**
       
    87     * Returns max bit rate
       
    88     * @return max bit rate
       
    89     */
       
    90     TUint GetMaxBitRate();
       
    91    
       
    92 public: // from CMceAudioCodec
       
    93     
       
    94     /**
       
    95     * Sets the packetization rate. 
       
    96     * @param aPTime, Packetization rate, must be multiple of audio frame size.
       
    97     * @return KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
       
    98     */
       
    99     TInt SetPTime( TUint aPTime );
       
   100     
       
   101     /**
       
   102     * Sets the maximum packetization rate.
       
   103     * @param aMaxPTime, maximum allowed packetization rate, must be multiple of audio frame size.
       
   104     * @return KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
       
   105     */
       
   106     TInt SetMaxPTime( TUint aMaxPTime );
       
   107 
       
   108 public: // serialization etc
       
   109 
       
   110     /**
       
   111     * Clones
       
   112     */
       
   113     CMceComAudioCodec* CloneL();
       
   114     
       
   115 
       
   116 private:
       
   117 
       
   118     /**
       
   119     * C++ default constructor.
       
   120     */
       
   121     CMceComG729Codec();
       
   122 
       
   123     /**
       
   124     * By default Symbian 2nd phase constructor is private.
       
   125     */
       
   126     void ConstructL( TBuf8<KMceMaxSdpNameLength> aSdpName);
       
   127 
       
   128     /**
       
   129      * second-phase copy constructor
       
   130      */
       
   131     void ConstructL( CMceComG729Codec& aCodec );
       
   132     
       
   133             
       
   134     };
       
   135 
       
   136 
       
   137 #endif      // __MCP_G729_CODEC_H__
       
   138 
       
   139 
       
   140 // End of File