os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevSoundTest/CIPlugins/src/audiobufferprefilltestdevice.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevSoundTest/CIPlugins/src/audiobufferprefilltestdevice.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,93 @@
1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef AUDIOBUFFERFILLTESTDEVICE_H
1.20 +#define AUDIOBUFFERFILLTESTDEVICE_H
1.21 +
1.22 +#include <mmf/server/mmfswcodecwrapper.h>
1.23 +#include <mmf/server/devsoundstandardcustominterfaces.h>
1.24 +
1.25 +
1.26 +class CMMFSampleBuffering : public CActive,
1.27 + public MMMFSampleBuffering
1.28 + {
1.29 +public:
1.30 + //return Pointer to the CMMFSampleBuffering class
1.31 + static CMMFSampleBuffering* NewL();
1.32 +
1.33 + //Destructor
1.34 + ~CMMFSampleBuffering();
1.35 +
1.36 + // from MMMFSampleBuffering
1.37 + TInt MmsbEnableSampleBufferingBeforePlayback();
1.38 + TInt MmsbDisableSampleBufferingBeforePlayback();
1.39 + void MmsbNotifyPlayStarted(TRequestStatus& aStatus);
1.40 + void MmsbCancelNotifyPlayStarted();
1.41 +
1.42 + // from CActive
1.43 + void RunL();
1.44 + void DoCancel();
1.45 +
1.46 +private:
1.47 + CMMFSampleBuffering();
1.48 + void ConstructL();
1.49 +
1.50 +private:
1.51 + RTimer iTimer;
1.52 + TRequestStatus* iClientStatus;
1.53 + };
1.54 +
1.55 +
1.56 +/*
1.57 +CSampleBufferingTestDevice
1.58 +
1.59 +Test hw device used by the
1.60 +TSU_MMF_DEVSOUND_CIU_SUITE unit test harness.
1.61 +*/
1.62 +class CSampleBufferingTestDevice : public CMMFSwCodecWrapper,
1.63 + public MMMFSampleBuffering
1.64 + {
1.65 +public:
1.66 + static CMMFHwDevice* NewL();
1.67 + virtual ~CSampleBufferingTestDevice();
1.68 + virtual TInt Start(TDeviceFunc aFuncCmd, TDeviceFlow aFlowCmd);
1.69 + virtual TInt Stop();
1.70 + virtual TInt Pause();
1.71 + virtual TInt Init(THwDeviceInitParams& aDevInfo);
1.72 + virtual TAny* CustomInterface(TUid aInterfaceId);
1.73 + virtual TInt ThisHwBufferFilled(CMMFBuffer& aFillBufferPtr);
1.74 + virtual TInt ThisHwBufferEmptied(CMMFBuffer& aEmptyBufferPtr);
1.75 + virtual TInt SetConfig(TTaskConfig& aConfig);
1.76 + virtual TInt StopAndDeleteCodec();
1.77 + virtual TInt DeleteCodec();
1.78 +
1.79 + // from CMMFSwCodecWrapper
1.80 + virtual CMMFSwCodec& Codec();
1.81 +
1.82 + // MMMFSampleBuffering
1.83 + TInt MmsbEnableSampleBufferingBeforePlayback();
1.84 + TInt MmsbDisableSampleBufferingBeforePlayback();
1.85 + void MmsbNotifyPlayStarted(TRequestStatus& aStatus);
1.86 + void MmsbCancelNotifyPlayStarted();
1.87 +
1.88 +private:
1.89 + CSampleBufferingTestDevice();
1.90 + void ConstructL();
1.91 +
1.92 +private:
1.93 + CMMFSampleBuffering* iSampleBuffering;
1.94 + };
1.95 +
1.96 +#endif