multimediacommsengine/mmceshared/inc/mcecomg711codec.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 CMCECOMG711CODEC_H
       
    22 #define CMCECOMG711CODEC_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 CMceComG711Codec : public CMceComAudioCodec
       
    37     {
       
    38 public:  // Constructors and destructor
       
    39 
       
    40     /**
       
    41     * Two-phased constructor.
       
    42     * @param aSdpName sdp name
       
    43     */
       
    44     static CMceComG711Codec* NewL( TBuf8<KMceMaxSdpNameLength> aSdpName );
       
    45     
       
    46     /**
       
    47     * Two-phased constructor.
       
    48     * @param aSdpName sdp name
       
    49     */
       
    50     static CMceComG711Codec* NewLC( TBuf8<KMceMaxSdpNameLength> aSdpName );
       
    51     
       
    52     /**
       
    53     * Destructor.
       
    54     */
       
    55     ~CMceComG711Codec();
       
    56 
       
    57 public: // from CMceComCodec
       
    58 
       
    59     /**
       
    60     * Sets bitrate used with codec for encoding.
       
    61     * @param aBitrate bitrate value for encoding
       
    62     * @return KErrNotSupported if codec doesn't support bitrate
       
    63     *         value issued
       
    64     */
       
    65     TInt SetBitrate( TUint aBitrate );
       
    66     
       
    67     /**
       
    68     * Set Allowed Bitrate
       
    69     * @return 
       
    70     */
       
    71     TInt SetAllowedBitrates( TUint aBitrates );
       
    72     
       
    73     /**
       
    74     * Sets the codec specific mode.
       
    75     * @param aCodecMode mode of the codec
       
    76     * @return KErrNotSupported if codec doesnt' support codec mode
       
    77     *         value issued
       
    78     */
       
    79     TInt SetCodecMode( TUint aCodecMode );
       
    80     
       
    81    /**
       
    82     * Returns max bit rate
       
    83     * @return max bit rate
       
    84     */
       
    85     TUint GetMaxBitRate();
       
    86     
       
    87 public: // from CMceAudioCodec
       
    88     
       
    89     /**
       
    90     * Sets the packetization rate. 
       
    91     * @param aPTime, Packetization rate, must be multiple of audio frame size.
       
    92     * @return KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
       
    93     */
       
    94     TInt SetPTime( TUint aPTime );
       
    95     
       
    96     /**
       
    97     * Sets the maximum packetization rate.
       
    98     * @param aMaxPTime, maximum allowed packetization rate, must be multiple of audio frame size.
       
    99     * @return KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
       
   100     */
       
   101     TInt SetMaxPTime( TUint aMaxPTime );
       
   102 
       
   103     
       
   104 public: // serialization etc
       
   105 
       
   106     /**
       
   107     * Clones
       
   108     */
       
   109     CMceComAudioCodec* CloneL();
       
   110     
       
   111 
       
   112 private:
       
   113 
       
   114     /**
       
   115     * C++ default constructor.
       
   116     */
       
   117     CMceComG711Codec();
       
   118 
       
   119     /**
       
   120     * By default Symbian 2nd phase constructor is private.
       
   121     */
       
   122     void ConstructL( TBuf8<KMceMaxSdpNameLength> aSdpName);
       
   123 
       
   124     /**
       
   125      * second-phase copy constructor
       
   126      */
       
   127     void ConstructL( CMceComG711Codec& aCodec );
       
   128     
       
   129             
       
   130     };
       
   131 
       
   132 
       
   133 #endif      // __MCP_G711_CODEC_H__
       
   134 
       
   135 // End of File