mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mceh263codec.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     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 #ifndef CMCEH263CODEC_H
       
    20 #define CMCEH263CODEC_H
       
    21 
       
    22 // INCLUDES
       
    23 #include "mcevideocodec.h"
       
    24 #include "mcedefs.h"
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 const TUint KMceH263FrameHeight = 176;
       
    29 const TUint KMceH263FrameWidth = 144;
       
    30 const TUint KMceH263ClockRate = 90000;
       
    31 const TReal KMceH263FrameRate = 15;
       
    32 
       
    33 const TInt  KMceH263Level10Bitrate = 64000;
       
    34 const TInt  KMceH263Level45Bitrate = 128000;
       
    35 
       
    36 const TUint KMceAllowedH263Bitrate10 = 0x0001;
       
    37 const TUint KMceAllowedH263Bitrate45 = 0x0002;
       
    38 const TUint KMceAllowedH263BitrateAll = 0x00FF;
       
    39 
       
    40 // CLASS DECLARATION
       
    41 
       
    42 /**
       
    43 * Class for the H263 codec information.
       
    44 *
       
    45 * It checks the validity of inserted values for H263
       
    46 * 
       
    47 *  @lib mceclient.lib
       
    48 */
       
    49 class CMceH263Codec : public CMceVideoCodec
       
    50     {
       
    51     
       
    52 	public:  // Constructors and destructor
       
    53 	    
       
    54 	    /**
       
    55 	    * Destructor.
       
    56 	    */
       
    57 	    IMPORT_C ~CMceH263Codec();
       
    58 
       
    59 	public: 
       
    60 
       
    61 	    /**
       
    62 	    * Two-phased constructor.
       
    63 	    * @param aSdpName sdp name
       
    64 	    */
       
    65 	    IMPORT_C static CMceH263Codec* NewL( TBuf8<KMceMaxSdpNameLength> aSdpName);
       
    66 
       
    67 	    /**
       
    68 	    * Two-phased constructor.
       
    69 	    * @param aSdpName sdp name
       
    70 	    */
       
    71 	    IMPORT_C static CMceH263Codec* NewLC( TBuf8<KMceMaxSdpNameLength> aSdpName );
       
    72 	        
       
    73 	public: // From base classes
       
    74 
       
    75 	    /**
       
    76 	    * Sets bitrate used with codec for encoding.
       
    77 	    * @param aBitrate bitrate value for encoding
       
    78 	    * @return KErrNotSupported if codec doesn't support bitrate
       
    79 	    *         value issued
       
    80 	    */
       
    81 	    virtual TInt SetBitrate( TUint aBitrate );
       
    82 	    
       
    83 	    /**
       
    84 	    * Sets bitrates allowed with codec.
       
    85 	    * @param aBitrates allowed bitrate values
       
    86 	    * @return KErrNotSupported if codec doesn't support bitrate
       
    87 	    *         values issued
       
    88 	    */
       
    89 	    virtual TInt SetAllowedBitrates( TUint aBitrates );
       
    90 	    
       
    91 	    /**
       
    92 	    * Sets the codec specific mode.
       
    93 	    * @param aCodecMode mode of the codec 
       
    94 	    * @return KErrNotSupported if codec doesnt' support codec mode
       
    95 	    *         value issued
       
    96 	    */
       
    97 	    virtual TInt SetCodecMode( TUint aCodecMode );
       
    98 	    
       
    99 	    /**
       
   100 	    * Sets the payload type.
       
   101 	    * @param aPayloadType type identifier of the payload
       
   102 	    * @return KErrNotSupported if codec doesn't support payload type issued
       
   103 	    */
       
   104 	    virtual TInt SetPayloadType( TUint8 aPayloadType );
       
   105 	    
       
   106         /**
       
   107 	    * Clones the codec.
       
   108 	    * @return cloned codec; ownership is transferred
       
   109 	    */
       
   110 	    virtual CMceVideoCodec* CloneL() const;
       
   111 	    
       
   112 	    /**
       
   113 	    * Sets maximum bitrate of the codec.
       
   114 	    * @param aMaxBitrate value of maximum bitrate used for encoding
       
   115 	    * @leave KErrNotSupported if codec doesn't support frame sizes issued
       
   116 	    */
       
   117 	    virtual void SetMaxBitrateL( TUint aMaxBitrate );
       
   118         
       
   119         /**
       
   120 	    * Sets resolutions allowed with the codec.
       
   121 	    * @param aResolutions bitfield of allowed resolutions
       
   122 	    * @leave KErrNotSupported if codec doesn't support resolutions issued
       
   123 	    */
       
   124         virtual void SetAllowedResolutionsL( TUint aResolutions );
       
   125         
       
   126         /**
       
   127 	    * Sets resolution of the video.
       
   128 	    * @param aResolution resolution of the video in pixels
       
   129 	    * @leave KErrNotSupported if codec doesn't support resolution issued
       
   130 	    */
       
   131         virtual void SetResolutionL( TSize aResolution );
       
   132         
       
   133         /**
       
   134 	    * Sets frame rates allowed with the codec.
       
   135 	    * @param aFrameRates allowed frame rate values as a bitfield
       
   136 	    * @leave KErrNotSupported if codec doesn't support frame rates issued
       
   137 	    */
       
   138         virtual void SetAllowedFrameRatesL( TUint aFrameRates );
       
   139         
       
   140         /**
       
   141 	    * Sets frame rate used with the codec for encoding.
       
   142 	    * @param aFrameRate frame rate for encoding
       
   143 	    * @leave KErrNotSupported if codec doesn't support frame rate value
       
   144 	    *        issued
       
   145 	    */
       
   146         virtual void SetFrameRateL( TReal aFrameRate );
       
   147         
       
   148         /**
       
   149         * Sets preferred encoding device for uplink stream and preferred decoding
       
   150         * device for downlink stream.
       
   151         * @param aEncodingDecodingDevice
       
   152         * @leave KErrNotSupported if setting preferred device is not possible
       
   153         */
       
   154         virtual void SetPreferredEncodingDecodingDeviceL( 
       
   155                                     TUid aEncodingDecodingDevice );
       
   156         
       
   157         /**
       
   158         * Set config key (sprop-parameter-sets)
       
   159         * @param aConfigKey, config key as Base64 encoded
       
   160         * @leave KErrNotSupported if setting config key is not possible
       
   161         */
       
   162         virtual void SetConfigKeyL( const TDesC8& aConfigKey );
       
   163         
       
   164         
       
   165     private: // Helper functions
       
   166 	    
       
   167 	    /**
       
   168 	    * Sets the sdp name.
       
   169 	    * @param aSdpName the sdp name
       
   170 	    */
       
   171 	    void SetSdpNameL( const TDesC8& aSdpName );
       
   172 	    
       
   173 	private: // Constructors
       
   174 
       
   175 	    /**
       
   176 	    * C++ default constructor.
       
   177 	    */
       
   178 	    CMceH263Codec();
       
   179 
       
   180 	    /**
       
   181 	    * By default Symbian 2nd phase constructor is private.
       
   182 	    */
       
   183 	    void ConstructL( TBuf8<KMceMaxSdpNameLength> aSdpName); 
       
   184 
       
   185 	    
       
   186 
       
   187     private: // Data
       
   188 
       
   189     private: // Reserved for future use
       
   190     
       
   191         TAny* iReserved;     
       
   192 
       
   193 
       
   194     };
       
   195 
       
   196 
       
   197 #endif      
       
   198 
       
   199 // End of File