os/mm/mm_plat/wma_decoder_interface_api/inc/WmaDecoderIntfc.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mm_plat/wma_decoder_interface_api/inc/WmaDecoderIntfc.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,320 @@
     1.4 +/*
     1.5 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:  Project specification for WMA 10 Pro decoder 
    1.18 +*              : Custom Interface.
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#ifndef WMADECODERINTFC_H
    1.24 +#define WMADECODERINTFC_H
    1.25 +
    1.26 +// INCLUDES
    1.27 +#include <e32base.h>
    1.28 +
    1.29 +// CONSTANTS
    1.30 +const TUid KUidWmaDecoderIntfc = {0x10207BAD};
    1.31 +
    1.32 +// MACROS
    1.33 +
    1.34 +// DATA TYPES
    1.35 +
    1.36 +// FUNCTION PROTOTYPES
    1.37 +
    1.38 +// FORWARD DECLARATIONS
    1.39 +class CMMFDevSound;
    1.40 +class CMdaAudioInputStream;
    1.41 +class CMdaAudioOutputStream;
    1.42 +
    1.43 +// CLASS DECLARATION
    1.44 +
    1.45 +/**
    1.46 +*  Interface for sending configuration info to WMA 10 Pro decoder.
    1.47 +*  This abstract class just provides the static NewL function for the 
    1.48 +*  creation of the proxy. Also, it defines the APIs to be implemented 
    1.49 +*  by the proxy and the real custom interface implementation.
    1.50 +*
    1.51 +*  @lib WmaDecoderIntfc.lib
    1.52 +*  @since S60 3.2
    1.53 +*/
    1.54 +class CWmaDecoderIntfc : public CBase
    1.55 +    {
    1.56 +    public: //data types
    1.57 +
    1.58 +    enum TFormat
    1.59 +        {
    1.60 +        EWmaVoice = 10,
    1.61 +        EWmaV1 = 352,
    1.62 +        EWma = 353, 
    1.63 +        EWmaV2 = 353, 
    1.64 +        EWmaPro  = 354,
    1.65 +        EWmaLossless = 355,
    1.66 +        };
    1.67 +
    1.68 +    enum TTool
    1.69 +        {
    1.70 + 		EToolOutput32Bit	= 1, //default = disabled
    1.71 +		EDownMixToStereo	= 2, //default = disabled
    1.72 +		ELostDataConcealment= 3  // default = disabled
    1.73 +		};
    1.74 +
    1.75 +    public:  // Constructors and destructor
    1.76 +
    1.77 +        /**
    1.78 +        * Creates the interface.
    1.79 +        */
    1.80 +		IMPORT_C static CWmaDecoderIntfc* 
    1.81 +		                NewL(CMMFDevSound& aDevSound);
    1.82 +
    1.83 +        /**
    1.84 +        * Creates the interface 
    1.85 +        * This function will always leave with KErrNotSuppored
    1.86 +        */
    1.87 +		IMPORT_C static CWmaDecoderIntfc* 
    1.88 +		                NewL(CMdaAudioInputStream& aUtility);
    1.89 +
    1.90 +        /**
    1.91 +        * Creates the interface.
    1.92 +        */
    1.93 +		IMPORT_C static CWmaDecoderIntfc* 
    1.94 +		                NewL(CMdaAudioOutputStream& aUtility);
    1.95 +
    1.96 +    public: // New functions
    1.97 +
    1.98 +        /**
    1.99 +        * Configures the compressed audio format
   1.100 +        * @since S60 3.2
   1.101 +        * @param aFormat - the audio format.
   1.102 +        * @return void
   1.103 +        */
   1.104 +		IMPORT_C virtual void SetFormat(TFormat aFormat) = 0;
   1.105 +
   1.106 +        /**
   1.107 +        * Configures the number of bits per sample 
   1.108 +        * @since S60 3.2
   1.109 +        * @param aBitsPerSample - bits per sample.
   1.110 +        * @return void
   1.111 +        */
   1.112 +		IMPORT_C virtual void SetBitsPerSampleIn(TUint aBitsPerSample) = 0;
   1.113 +
   1.114 +        /**
   1.115 +        * Configures the number of audio channels  
   1.116 +        * @since S60 3.2
   1.117 +        * @param aNumOfChannels: The number of audio channels.
   1.118 +        * @return void
   1.119 +        */
   1.120 +		IMPORT_C virtual void SetNumChannelsIn (TUint aNumChannelsIn) = 0;
   1.121 +
   1.122 +        /**
   1.123 +        * Configures the sampling rate   
   1.124 +        * @since S60 3.2
   1.125 +        * @param aSamplesPerSec: Sample rate value in Hertz.
   1.126 +        * @return void
   1.127 +        */
   1.128 +		IMPORT_C virtual void SetSamplesPerSec (TUint aSamplesPerSec) = 0;
   1.129 +
   1.130 +        /**
   1.131 +        * Configures the average number of bytes per second   
   1.132 +        * @since S60 3.2
   1.133 +        * @param aAvgBytesPerSec: Average bytes per second.
   1.134 +        * @return void
   1.135 +        */
   1.136 +		IMPORT_C virtual void SetAvgBytesPerSec (TUint aAvgBytesPerSec) = 0;
   1.137 +
   1.138 +        /**
   1.139 +        * Configures the block align size in bytes    
   1.140 +        * @since S60 3.2
   1.141 +        * @param aBlockAlign: Block size in bytes
   1.142 +        * @return void
   1.143 +        */
   1.144 +		IMPORT_C virtual void SetBlockAlign (TUint aBlockAlign) = 0;
   1.145 +
   1.146 +        /**
   1.147 +        * Configures information specific to the WMA decoder
   1.148 +        * @since S60 3.2
   1.149 +        * @param aEncodeOptions: The encode options
   1.150 +        * @return void
   1.151 +        */
   1.152 +		IMPORT_C virtual void SetEncodeOptions (TUint aEncodeOptions) = 0;
   1.153 +
   1.154 +        /**
   1.155 +        * Configures information specific to the WMA 10 Pro decoder
   1.156 +        * @since S60 3.2
   1.157 +        * @param aEncodeOpts1: The encode options 1
   1.158 +        * @return void
   1.159 +        */
   1.160 +		IMPORT_C virtual void SetEncodeOptions1 (TUint aEncodeOpts1) = 0;
   1.161 +
   1.162 +        /**
   1.163 +        * Configures information specific to the WMA 10 Pro decoder
   1.164 +        * @since S60 3.2
   1.165 +        * @param aEncodeOpts2: The encode options 2
   1.166 +        * @return void
   1.167 +        */
   1.168 +		IMPORT_C virtual void SetEncodeOptions2 (TUint aEncodeOpts2) = 0;
   1.169 +
   1.170 +        /**
   1.171 +        * Configures the decoder for the channel data arrangement 
   1.172 +        * @since S60 3.2
   1.173 +        * @param aChannelMask: Channel mask
   1.174 +        * @return void
   1.175 +        */
   1.176 +		IMPORT_C virtual void SetChannelMaskIn (TUint aChannelMask) = 0;
   1.177 +
   1.178 +        /**
   1.179 +        * Commits configuration settings to the decoder.
   1.180 +        * @since S60 3.2
   1.181 +        * @return TInt - Status
   1.182 +        */
   1.183 +		IMPORT_C virtual TInt ApplyConfig() = 0;
   1.184 +
   1.185 +        /**
   1.186 +        * Returns the configuration state of audio format.
   1.187 +        * @since S60 3.2
   1.188 +        * @return aFormat: The audio format
   1.189 +        */
   1.190 +		IMPORT_C virtual TInt GetFormat (TFormat& aFormat) = 0;
   1.191 +
   1.192 +        /**
   1.193 +        * Returns the configuration state of number of bits per sample.
   1.194 +        * @since S60 3.2
   1.195 +        * @return aBitsPerSample: Number of bits per sample
   1.196 +        */
   1.197 +		IMPORT_C virtual TInt GetBitsPerSampleIn(TUint& aBitsPerSample) = 0;
   1.198 +
   1.199 +        /**
   1.200 +        * Returns the configuration state of the number of channels.
   1.201 +        * @since S60 3.2
   1.202 +        * @return aNumOfChannels: Number of channels
   1.203 +        */
   1.204 +		IMPORT_C virtual TInt GetNumOfChannelsIn (TUint& aNumOfChannels) = 0;
   1.205 +
   1.206 +        /**
   1.207 +        * Returns the configuration state of the sample rate.
   1.208 +        * @since S60 3.2
   1.209 +        * @return aSamplesPerSec: Sample rate value in Hertz
   1.210 +        */
   1.211 +		IMPORT_C virtual TInt GetSamplesPerSec (TUint& aSamplesPerSec) = 0;
   1.212 +
   1.213 +        /**
   1.214 +        * Returns the configuration state of average bytes per second.
   1.215 +        * @since S60 3.2
   1.216 +        * @return aAvgBytesPerSec: Average bytes per second
   1.217 +        */
   1.218 +		IMPORT_C virtual TInt GetAvgBytesPerSec (TUint& aAvgBytesPerSec) = 0;
   1.219 +
   1.220 +        /**
   1.221 +        * Returns the configuration state of block alignment. 
   1.222 +        * @since S60 3.2
   1.223 +        * @return aBlockAlign: Block size in bytes
   1.224 +        */
   1.225 +		IMPORT_C virtual TInt GetBlockAlign (TUint& aBlockAlign) = 0;
   1.226 +
   1.227 +        /**
   1.228 +        * Returns the configuration state of the encode options.
   1.229 +        * @since S60 3.2
   1.230 +        * @return aEncodeOpts: The encode options.
   1.231 +        */
   1.232 +		IMPORT_C virtual TInt GetEncodeOptions (TUint& aEncodeOpts) = 0;
   1.233 +
   1.234 +        /**
   1.235 +        * Returns the configuration state of the advanced encode options.
   1.236 +        * @since S60 3.2
   1.237 +        * @return aEncodeOpts1: The encode options
   1.238 +        */
   1.239 +		IMPORT_C virtual TInt GetEncodeOptions1 (TUint& aEncodeOpts1) = 0;
   1.240 +
   1.241 +        /**
   1.242 +        * Returns the configuration state of the advanced encode options.
   1.243 +        * @since S60 3.2
   1.244 +        * @return aEncodeOpts2: The encode options
   1.245 +        */
   1.246 +		IMPORT_C virtual TInt GetEncodeOptions2 (TUint& aEncodeOpts2) = 0;
   1.247 +
   1.248 +        /**
   1.249 +        * Returns the configuration state of the input channel mask.
   1.250 +        * @since S60 3.2
   1.251 +        * @return aChannelMask: Channel mask. 
   1.252 +        */
   1.253 +		IMPORT_C virtual TInt GetChannelMaskIn (TUint& aChannelMask) = 0;
   1.254 +
   1.255 +        /**
   1.256 +        * Returns a list of formats supported by the decoder.
   1.257 +        * @since S60 3.2
   1.258 +        * @return aSupportedFormats: An array of the formats, as defined in  TFormat
   1.259 +        */
   1.260 +		IMPORT_C virtual TInt GetSupportedFormats(RArray<TFormat>& aSupportedFormats) = 0;
   1.261 +
   1.262 +        /**
   1.263 +        * Returns a list of tools supported by the decoder.
   1.264 +        * @since S60 3.2
   1.265 +        * @return aSupportedTools: An array of the tools supported by the decoder
   1.266 +        */
   1.267 +		IMPORT_C virtual TInt GetSupportedTools(RArray<TTool>& aSupportedTools) = 0;
   1.268 +
   1.269 +        /**
   1.270 +        * Returns the maximum number of input channels supported by the decoder.
   1.271 +        * @since S60 3.2
   1.272 +        * @return aSupportedMaxChannelsIn: number of channels. 
   1.273 +        */
   1.274 +		IMPORT_C virtual TInt GetSupportedMaxChannelsIn(TUint& aSupportedMaxChannelsIn) = 0;
   1.275 +
   1.276 +        /**
   1.277 +        * Returns the maximum bit rate supported by the decoder.
   1.278 +        * @since S60 3.2
   1.279 +        * @return aSupportedMaxBitrate: maximum bitrate
   1.280 +        */
   1.281 +		IMPORT_C virtual TInt GetSupportedMaxBitrate(TUint& aSupportedMaxBitrate) = 0;
   1.282 +
   1.283 +        /**
   1.284 +        * Returns the maximum sample rate supported by the decoder.
   1.285 +        * @since S60 3.2
   1.286 +        * @return aSupportedMaxSampleRate: maximum sample rate
   1.287 +        */
   1.288 +		IMPORT_C virtual TInt GetSupportedMaxSampleRate(TUint& aSupportedMaxSampleRate) = 0;
   1.289 +
   1.290 +        /**
   1.291 +        * Returns a list of the tools that are controllable through this interface.
   1.292 +        * @since S60 3.2
   1.293 +        * @return aControllableTools: An array of the tools that are controllable through this interface. 
   1.294 +        */
   1.295 +		IMPORT_C virtual TInt GetControllableTools(RArray<TTool>& aControllableTools) = 0;
   1.296 +
   1.297 +        /**
   1.298 +        * Enables the tool specified.
   1.299 +        * @since S60 3.2
   1.300 +        * @return aTool: Specifies the tool to enable.
   1.301 +        */
   1.302 +		IMPORT_C virtual void EnableTool(TTool aTool) = 0;
   1.303 +
   1.304 +        /**
   1.305 +        * Disables the tool specified.
   1.306 +        * @since S60 3.2
   1.307 +        * @return aTool: Specifies the tool to disable. 
   1.308 +        */
   1.309 +		IMPORT_C virtual void DisableTool(TTool aTool) = 0;
   1.310 +
   1.311 +        /**
   1.312 +        * Returns the state of the specified tool
   1.313 +        * @since S60 3.2
   1.314 +        * @return aTool: Specifies the tool for which the state is requested
   1.315 +        * @       aEnabled : Indicates the state of the tool specified in aTool
   1.316 +        */
   1.317 +		IMPORT_C virtual TInt GetTool(TTool aTool, TBool& aEnabled) = 0;
   1.318 +
   1.319 +	};
   1.320 +
   1.321 +#endif      // WMADECODERINTFC_H
   1.322 +
   1.323 +// End of File