sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef SBCENCODERTESTDEVICE_H sl@0: #define SBCENCODERTESTDEVICE_H sl@0: sl@0: #include sl@0: #include sl@0: sl@0: sl@0: /** sl@0: * sl@0: * CSbcEncoderTestDevice sl@0: * sl@0: * Test hw device used by the sl@0: * TSU_MMF_DEVSOUND_CIU_SUITE unit test harness. sl@0: */ sl@0: class CSbcEncoderTestDevice : public CMMFSwCodecWrapper, public MSbcEncoderIntfc sl@0: { sl@0: public: sl@0: static CMMFHwDevice* NewL(); sl@0: virtual ~CSbcEncoderTestDevice(); sl@0: virtual TInt Start(TDeviceFunc aFuncCmd, TDeviceFlow aFlowCmd); sl@0: virtual TInt Stop(); sl@0: virtual TInt Pause(); sl@0: virtual TInt Init(THwDeviceInitParams& aDevInfo); sl@0: virtual TAny* CustomInterface(TUid aInterfaceId); sl@0: virtual TInt ThisHwBufferFilled(CMMFBuffer& aFillBufferPtr); sl@0: virtual TInt ThisHwBufferEmptied(CMMFBuffer& aEmptyBufferPtr); sl@0: virtual TInt SetConfig(TTaskConfig& aConfig); sl@0: virtual TInt StopAndDeleteCodec(); sl@0: virtual TInt DeleteCodec(); sl@0: sl@0: // from CMMFSwCodecWrapper sl@0: virtual CMMFSwCodec& Codec(); sl@0: sl@0: // from MSbcEncoderIntfc sl@0: virtual TInt GetSupportedSamplingFrequencies ( RArray& aSamplingFrequencies ); sl@0: virtual TInt GetSupportedChannelModes ( RArray& aChannelModes ); sl@0: virtual TInt GetSupportedNumOfSubbands ( RArray& aNumOfSubbands ); sl@0: virtual TInt GetSupportedAllocationMethods ( RArray& aAllocationMethods ); sl@0: virtual TInt GetSupportedNumOfBlocks ( RArray& aNumOfBlocks ); sl@0: sl@0: virtual TInt GetSupportedBitpoolRange (TUint& aMinSupportedBitpoolSize, TUint& aMaxSupportedBitpoolSize); sl@0: virtual void SetSamplingFrequency ( TUint aSamplingFrequency ); sl@0: virtual void SetChannelMode (TSbcChannelMode aChannelMode ); sl@0: virtual void SetNumOfSubbands ( TUint aNumOfSubbands ); sl@0: virtual void SetNumOfBlocks ( TUint aNumOfBlocks ); sl@0: virtual void SetAllocationMethod (TSbcAllocationMethod aAllocationMethod ); sl@0: virtual void SetBitpoolSize (TUint aBitpoolSize ); sl@0: virtual TInt ApplyConfig(); sl@0: virtual TInt GetSamplingFrequency ( TUint& aSamplingFrequency ); sl@0: virtual TInt GetChannelMode (TSbcChannelMode& aChannelMode ); sl@0: virtual TInt GetNumOfSubbands ( TUint& aNumOfSubbands ); sl@0: virtual TInt GetNumOfBlocks ( TUint& aNumOfBlocks ); sl@0: virtual TInt GetAllocationMethod (TSbcAllocationMethod& aAllocationMethod ); sl@0: virtual TInt GetBitpoolSize (TUint& aBitpoolSize ); sl@0: sl@0: private: sl@0: CSbcEncoderTestDevice(); sl@0: void ConstructL(); sl@0: private: sl@0: TUint iSamplingFrequency; sl@0: TSbcChannelMode iChannelMode; sl@0: TUint iNumOfSubbands; sl@0: TUint iNumOfBlocks; sl@0: TSbcAllocationMethod iAllocMethod; sl@0: TUint iBitpoolSize; sl@0: TBool iApplyConfig; sl@0: }; sl@0: sl@0: #endif