os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevSoundTest/CIPlugins/src/sbcencodertestdevice.h
Update contrib.
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef SBCENCODERTESTDEVICE_H
17 #define SBCENCODERTESTDEVICE_H
19 #include <mmf/server/mmfswcodecwrapper.h>
20 #include <mmf/server/devsoundstandardcustominterfaces.h>
25 * CSbcEncoderTestDevice
27 * Test hw device used by the
28 * TSU_MMF_DEVSOUND_CIU_SUITE unit test harness.
30 class CSbcEncoderTestDevice : public CMMFSwCodecWrapper, public MSbcEncoderIntfc
33 static CMMFHwDevice* NewL();
34 virtual ~CSbcEncoderTestDevice();
35 virtual TInt Start(TDeviceFunc aFuncCmd, TDeviceFlow aFlowCmd);
38 virtual TInt Init(THwDeviceInitParams& aDevInfo);
39 virtual TAny* CustomInterface(TUid aInterfaceId);
40 virtual TInt ThisHwBufferFilled(CMMFBuffer& aFillBufferPtr);
41 virtual TInt ThisHwBufferEmptied(CMMFBuffer& aEmptyBufferPtr);
42 virtual TInt SetConfig(TTaskConfig& aConfig);
43 virtual TInt StopAndDeleteCodec();
44 virtual TInt DeleteCodec();
46 // from CMMFSwCodecWrapper
47 virtual CMMFSwCodec& Codec();
49 // from MSbcEncoderIntfc
50 virtual TInt GetSupportedSamplingFrequencies ( RArray<TUint>& aSamplingFrequencies );
51 virtual TInt GetSupportedChannelModes ( RArray<TSbcChannelMode>& aChannelModes );
52 virtual TInt GetSupportedNumOfSubbands ( RArray<TUint>& aNumOfSubbands );
53 virtual TInt GetSupportedAllocationMethods ( RArray<TSbcAllocationMethod>& aAllocationMethods );
54 virtual TInt GetSupportedNumOfBlocks ( RArray<TUint>& aNumOfBlocks );
56 virtual TInt GetSupportedBitpoolRange (TUint& aMinSupportedBitpoolSize, TUint& aMaxSupportedBitpoolSize);
57 virtual void SetSamplingFrequency ( TUint aSamplingFrequency );
58 virtual void SetChannelMode (TSbcChannelMode aChannelMode );
59 virtual void SetNumOfSubbands ( TUint aNumOfSubbands );
60 virtual void SetNumOfBlocks ( TUint aNumOfBlocks );
61 virtual void SetAllocationMethod (TSbcAllocationMethod aAllocationMethod );
62 virtual void SetBitpoolSize (TUint aBitpoolSize );
63 virtual TInt ApplyConfig();
64 virtual TInt GetSamplingFrequency ( TUint& aSamplingFrequency );
65 virtual TInt GetChannelMode (TSbcChannelMode& aChannelMode );
66 virtual TInt GetNumOfSubbands ( TUint& aNumOfSubbands );
67 virtual TInt GetNumOfBlocks ( TUint& aNumOfBlocks );
68 virtual TInt GetAllocationMethod (TSbcAllocationMethod& aAllocationMethod );
69 virtual TInt GetBitpoolSize (TUint& aBitpoolSize );
72 CSbcEncoderTestDevice();
75 TUint iSamplingFrequency;
76 TSbcChannelMode iChannelMode;
79 TSbcAllocationMethod iAllocMethod;