audiostubs/devsoundextensions_stubs/inc/WmaDecoderIntfcCI.h
changeset 39 65e91466a14b
parent 31 931072794a66
child 40 b7e5ed8c1342
equal deleted inserted replaced
31:931072794a66 39:65e91466a14b
     1 /*
       
     2 * Copyright (c) 2002-2008 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: Audio Stubs -
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef WmaDECODERINTFCCIIMPL_H
       
    20 #define WmaDECODERINTFCCIIMPL_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <WmaDecoderIntfc.h>
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // MACROS
       
    29 
       
    30 // DATA TYPES
       
    31 
       
    32 // FUNCTION PROTOTYPES
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 *  ?one_line_short_description.
       
    40 *  ?other_description_lines
       
    41 *
       
    42 *  @lib ?library
       
    43 *  @since Series ?XX ?SeriesXX_version
       
    44 */
       
    45 class CWmaDecoderIntfcCI : public CWmaDecoderIntfc
       
    46 	{
       
    47     public:  // Constructors and destructor
       
    48 
       
    49         /**
       
    50         * Two-phased constructor.
       
    51         */
       
    52 		IMPORT_C static CWmaDecoderIntfcCI* NewL();
       
    53 
       
    54         /**
       
    55         * Destructor.
       
    56         */
       
    57         IMPORT_C virtual ~CWmaDecoderIntfcCI();
       
    58 
       
    59     public: // New functions
       
    60 
       
    61     public: // Functions from base classes
       
    62 
       
    63     public: // Functions from base classes
       
    64 
       
    65         // From CWmaDecoderIntfc
       
    66 
       
    67         /**
       
    68         * Identifies the compressed audio format
       
    69         * @since S60 3.2
       
    70         * @param aFormat - the audio format.
       
    71         * @return void
       
    72         */
       
    73 		IMPORT_C virtual void SetFormat(TFormat aFormat)  ;
       
    74 
       
    75         /**
       
    76         * Specifies the number of bits per sample
       
    77         * @since S60 3.2
       
    78         * @param aFormat - the audio format.
       
    79         * @return void
       
    80         */
       
    81 		IMPORT_C virtual void SetBitsPerSampleIn(TUint aBitsPerSample)  ;
       
    82 
       
    83         /**
       
    84         * Specifies the number of audio channels
       
    85         * @since S60 3.2
       
    86         * @param aNumOfChannels: The number of audio channels.
       
    87         * @return void
       
    88         */
       
    89 		IMPORT_C virtual void SetNumChannelsIn (TUint aNumChannelsIn)  ;
       
    90 
       
    91         /**
       
    92         * Specifies the sampling rate
       
    93         * @since S60 3.2
       
    94         * @param aSamplesPerSec: Sample rate value in Hertz.
       
    95         * @return void
       
    96         */
       
    97 		IMPORT_C virtual void SetSamplesPerSec (TUint aSamplesPerSec)  ;
       
    98 
       
    99         /**
       
   100         * Specifies the average number of bytes per second
       
   101         * @since S60 3.2
       
   102         * @param aAvgBytesPerSec: Average bytes per second.
       
   103         * @return void
       
   104         */
       
   105 		IMPORT_C virtual void SetAvgBytesPerSec (TUint aAvgBytesPerSec)  ;
       
   106 
       
   107         /**
       
   108         * Specifies the block size in bytes
       
   109         * @since S60 3.2
       
   110         * @param aBlockAlign: Block size in bytes
       
   111         * @return void
       
   112         */
       
   113 		IMPORT_C virtual void SetBlockAlign (TUint aBlockAlign)  ;
       
   114 
       
   115         /**
       
   116         * Configuration information specific to the WMA decoder
       
   117         * @since S60 3.2
       
   118         * @param aEncodeOptions: The encode options
       
   119         * @return void
       
   120         */
       
   121 		IMPORT_C virtual void SetEncodeOptions (TUint aEncodeOptions)  ;
       
   122 
       
   123         /**
       
   124         * Returns the configuration state of the advanced encode options.
       
   125         * @since S60 3.2
       
   126         * @return aAdvEncodeOpts: The encode options
       
   127         */
       
   128 		IMPORT_C virtual TInt GetEncodeOptions1 (TUint& aEncodeOpts1);
       
   129 
       
   130         /**
       
   131         * Returns the configuration state of the advanced encode options.
       
   132         * @since S60 3.2
       
   133         * @return aAdvEncodeOpts: The encode options
       
   134         */
       
   135 		IMPORT_C virtual TInt GetEncodeOptions2 (TUint& aEncodeOpts2);
       
   136 
       
   137         /**
       
   138         * Configures the decoder for the channel data arrangement
       
   139         * @since S60 3.2
       
   140         * @param aChannelMask: Channel mask
       
   141         * @return void
       
   142         */
       
   143 		IMPORT_C virtual void SetChannelMaskIn (TUint aChannelMask)  ;
       
   144 
       
   145         /**
       
   146         * Commits configuration settings to the decoder.
       
   147         * @since S60 3.2
       
   148         * @return TInt - Status
       
   149         */
       
   150 		IMPORT_C virtual TInt ApplyConfig()  ;
       
   151 
       
   152         /**
       
   153         * Returns the configuration state of audio format.
       
   154         * @since S60 3.2
       
   155         * @return aFormat: The audio format
       
   156         */
       
   157 		IMPORT_C virtual TInt GetFormat (TFormat& aFormat)  ;
       
   158 
       
   159         /**
       
   160         * Returns the configuration state of number of bits per sample.
       
   161         * @since S60 3.2
       
   162         * @return aBitsPerSample: Number of bits per sample
       
   163         */
       
   164 		IMPORT_C virtual TInt GetBitsPerSampleIn(TUint& aBitsPerSample)  ;
       
   165 
       
   166         /**
       
   167         * Returns the configuration state of the number of channels.
       
   168         * @since S60 3.2
       
   169         * @return aNumOfChannels: Number of channels
       
   170         */
       
   171 		IMPORT_C virtual TInt GetNumOfChannelsIn (TUint& aNumOfChannels)  ;
       
   172 
       
   173         /**
       
   174         * Returns the configuration state of the sample rate.
       
   175         * @since S60 3.2
       
   176         * @return aSamplesPerSec: Sample rate value in Hertz
       
   177         */
       
   178 		IMPORT_C virtual TInt GetSamplesPerSec (TUint& aSamplesPerSec)  ;
       
   179 
       
   180         /**
       
   181         * Returns the configuration state of average bytes per second.
       
   182         * @since S60 3.2
       
   183         * @return aAvgBytesPerSec: Average bytes per second
       
   184         */
       
   185 		IMPORT_C virtual TInt GetAvgBytesPerSec (TUint& aAvgBytesPerSec)  ;
       
   186 
       
   187         /**
       
   188         * Returns the configuration state of block alignment.
       
   189         * @since S60 3.2
       
   190         * @return aBlockAlign: Block size in bytes
       
   191         */
       
   192 		IMPORT_C virtual TInt GetBlockAlign (TUint& aBlockAlign)  ;
       
   193 
       
   194         /**
       
   195         * Returns the configuration state of the encode options.
       
   196         * @since S60 3.2
       
   197         * @return aEncodeOpts: The encode options.
       
   198         */
       
   199 		IMPORT_C virtual TInt GetEncodeOptions (TUint& aEncodeOpts)  ;
       
   200 
       
   201 
       
   202         /**
       
   203         * Returns the configuration state of the input channel mask.
       
   204         * @since S60 3.2
       
   205         * @return aChannelMask: Channel mask.
       
   206         */
       
   207 		IMPORT_C virtual TInt GetChannelMaskIn (TUint& aChannelMask)  ;
       
   208 
       
   209         /**
       
   210         * Gets a list of formats supported by the decoder.
       
   211         * @since S60 3.2
       
   212         * @return aSupportedFormats: An array of the formats, as defined in  TFormat
       
   213         */
       
   214 		IMPORT_C virtual TInt GetSupportedFormats(RArray<TFormat>& aSupportedFormats)  ;
       
   215 
       
   216         /**
       
   217         * Gets a list of tools supported by the decoder.
       
   218         * @since S60 3.2
       
   219         * @return aSupportedTools: An array of the tools supported by the decoder
       
   220         */
       
   221 		IMPORT_C virtual TInt GetSupportedTools(RArray<TTool>& aSupportedTools)  ;
       
   222 
       
   223         /**
       
   224         * Get the maximum number of input channels supported by the decoder.
       
   225         * @since S60 3.2
       
   226         * @return aSupportedMaxChannelsIn: number of channels.
       
   227         */
       
   228 		IMPORT_C virtual TInt GetSupportedMaxChannelsIn(TUint& aSupportedMaxChannelsIn)  ;
       
   229 
       
   230         /**
       
   231         * Get the maximum bitrate supported by the decoder.
       
   232         * @since S60 3.2
       
   233         * @return aSupportedMaxBitrate: maximum bitrate
       
   234         */
       
   235 		IMPORT_C virtual TInt GetSupportedMaxBitrate(TUint& aSupportedMaxBitrate)  ;
       
   236 
       
   237         /**
       
   238         * Get the maximum sample rate supported by the decoder.
       
   239         * @since S60 3.2
       
   240         * @return aSupportedMaxSampleRate: maximum sample rate
       
   241         */
       
   242 		IMPORT_C virtual TInt GetSupportedMaxSampleRate(TUint& aSupportedMaxSampleRate)  ;
       
   243 
       
   244         /**
       
   245         * Gets a list of the tools that are controllable through this interface.
       
   246         * @since S60 3.2
       
   247         * @return aControllableTools: An array of the tools that are controllable through this interface.
       
   248         */
       
   249 		IMPORT_C virtual TInt GetControllableTools(RArray<TTool>& aControllableTools)  ;
       
   250 
       
   251         /**
       
   252         * Enables the tool specified.
       
   253         * @since S60 3.2
       
   254         * @return aTool: Specifies the tool to enable.
       
   255         */
       
   256 		IMPORT_C virtual void EnableTool(TTool aTool)  ;
       
   257 
       
   258         /**
       
   259         * Disables the tool specified.
       
   260         * @since S60 3.2
       
   261         * @return aTool: Specifies the tool to disable.
       
   262         */
       
   263 		IMPORT_C virtual void DisableTool(TTool aTool)  ;
       
   264 
       
   265         /**
       
   266         * Returns the state of the specified tool
       
   267         * @since S60 3.2
       
   268         * @return aTool: Specifies the tool for which the state is requested
       
   269         * @       aEnabled : Indicates the state of the tool specified in aTool
       
   270         */
       
   271 		IMPORT_C virtual TInt GetTool(TTool aTool, TBool& aEnabled)  ;
       
   272 
       
   273          /**
       
   274         * Configuration information specific to the WMA decoder
       
   275         * @since S60 3.2
       
   276         * @param aEncodeOptions: The encode options
       
   277         * @return void
       
   278         */
       
   279 		IMPORT_C virtual void SetEncodeOptions1 (TUint aEncodeOptions1);
       
   280 
       
   281         /**
       
   282         * Configuration information specific to the WMA decoder
       
   283         * @since S60 3.2
       
   284         * @param aEncodeOptions: The encode options
       
   285         * @return void
       
   286         */
       
   287 		IMPORT_C virtual void SetEncodeOptions2 (TUint aEncodeOptions2);
       
   288 
       
   289         /**
       
   290         * Configures the decoder for the channel data arrangement
       
   291         * @since S60 3.2
       
   292         * @param aChannelMask: Channel mask
       
   293         * @return void
       
   294         */
       
   295 
       
   296 
       
   297     protected:  // New functions
       
   298 
       
   299     protected:  // Functions from base classes
       
   300 
       
   301 	private:
       
   302 
       
   303         /**
       
   304         * C++ default constructor.
       
   305         */
       
   306 	    CWmaDecoderIntfcCI();
       
   307 
       
   308         /**
       
   309         * By default Symbian 2nd phase constructor is private.
       
   310         */
       
   311 	    void ConstructL();
       
   312 
       
   313     public:     // Data
       
   314     protected:  // Data
       
   315     private:    // Data
       
   316         // Working config before ApplyConfig()
       
   317   		TFormat iFormat;
       
   318         TUint iBitsPerSample;
       
   319         TUint iNumChannelsIn;
       
   320         TUint iSamplesPerSec;
       
   321         TUint iAvgBytesPerSec;
       
   322         TUint iBlockAlign;
       
   323         TUint iEncodeOptions;
       
   324 		TUint iEncodeOptions1;
       
   325 		TUint iEncodeOptions2;
       
   326 
       
   327         TUint iChannelMask;
       
   328         RArray<TFormat> iSupportedFormats;
       
   329         RArray<TTool> iSupportedTools;
       
   330         RArray<TTool> iControllableTools;
       
   331         TUint iSupportedMaxSampleRate;
       
   332         TUint iSupportedMaxChannelsIn;
       
   333         TUint iSupportedMaxBitrate;
       
   334         TTool iEnable;
       
   335         TTool iDisable;
       
   336 
       
   337 
       
   338         TBool iToolOutPut32Bit;
       
   339         TBool iToolDownMixToStereo;
       
   340         TBool iToolLostDataConcealment;
       
   341 
       
   342 
       
   343 		TFormat iCurrentFormat;
       
   344         TUint iCurrentBitsPerSample;
       
   345         TUint iCurrentNumChannelsIn;
       
   346         TUint iCurrentSamplesPerSec;
       
   347         TUint iCurrentAvgBytesPerSec;
       
   348         TUint iCurrentBlockAlign;
       
   349         TUint iCurrentEncodeOptions;
       
   350 		TUint iCurrentEncodeOptions1;
       
   351 		TUint iCurrentEncodeOptions2;
       
   352 
       
   353         TUint iCurrentChannelMask;
       
   354         RArray<TFormat>iCurrentSupportedFormats;
       
   355         RArray<TTool> iCurrentSupportedTools;
       
   356         RArray<TTool> iCurrentControllableTools;
       
   357         TUint iCurrentSupportedMaxSampleRate;
       
   358         TUint iCurrentSupportedMaxChannelsIn;
       
   359         TUint iCurrentSupportedMaxBitrate;
       
   360 
       
   361         TBool iCurrentToolOutPut32Bit;
       
   362         TBool iCurrentToolDownMixToStereo;
       
   363         TBool iCurrentToolLostDataConcealment;
       
   364 
       
   365         TTool iCurrentEnable;
       
   366         TTool iCurrentDisable;
       
   367 
       
   368 		// Flag indicating readiness of the data to be applied
       
   369 		TBool iHasBeenApplied;
       
   370         // returned status of function ApplyConfigL
       
   371         TInt iApplyConfStatus;
       
   372 
       
   373 
       
   374     public:     // Friend classes
       
   375     protected:  // Friend classes
       
   376     private:    // Friend classes
       
   377 
       
   378 
       
   379 	};
       
   380 
       
   381 #endif      // WMADECODERINTFCCIIMPL_H
       
   382 
       
   383 // End of File