os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevSoundTest/CIPlugins/src/bufferframesconfigtestdevice.h
First public contribution.
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 BUFFERFRAMESCONFIGTESTDEVICE_H
17 #define BUFFERFRAMESCONFIGTESTDEVICE_H
19 #include <mmf/server/mmfswcodecwrapper.h>
20 #include <mmf/server/devsoundstandardcustominterfaces.h>
25 * CBufferFramesConfigTestDevice
27 * Test hw device used by the
28 * TSU_MMF_DEVSOUND_CIU_SUITE unit test harness.
30 class CBufferFramesConfigTestDevice : public CMMFSwCodecWrapper, public MMMFBufferFramesConfig
33 static CMMFHwDevice* NewL();
34 virtual ~CBufferFramesConfigTestDevice();
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 MMMFBufferFramesConfig
50 virtual TInt MmbfcSetNumberOfFramesPerInputBuffer(TInt aFrameCount, TInt aSamplesPerFrame);
51 virtual TInt MmbfcSetNumberOfFramesPerOutputBuffer(TInt aFrameCount, TInt aSamplesPerFrame);
54 CBufferFramesConfigTestDevice();
56 void DoWriteToFileL(TInt aFrameCount, TInt aSamplesPerFrame);