os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevSoundTest/CIPlugins/src/sbcencodertestdevice.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200 (2012-06-15)
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
#ifndef SBCENCODERTESTDEVICE_H
sl@0
    17
#define SBCENCODERTESTDEVICE_H
sl@0
    18
sl@0
    19
#include <mmf/server/mmfswcodecwrapper.h>
sl@0
    20
#include <mmf/server/devsoundstandardcustominterfaces.h>
sl@0
    21
sl@0
    22
sl@0
    23
/**
sl@0
    24
*
sl@0
    25
* CSbcEncoderTestDevice
sl@0
    26
*
sl@0
    27
* Test hw device used by the
sl@0
    28
* TSU_MMF_DEVSOUND_CIU_SUITE unit test harness.
sl@0
    29
*/
sl@0
    30
class CSbcEncoderTestDevice : public CMMFSwCodecWrapper, public MSbcEncoderIntfc
sl@0
    31
	{
sl@0
    32
public:
sl@0
    33
	static CMMFHwDevice* NewL();
sl@0
    34
	virtual ~CSbcEncoderTestDevice();
sl@0
    35
	virtual TInt Start(TDeviceFunc aFuncCmd, TDeviceFlow aFlowCmd);
sl@0
    36
	virtual TInt Stop();
sl@0
    37
	virtual TInt Pause();
sl@0
    38
	virtual TInt Init(THwDeviceInitParams& aDevInfo);
sl@0
    39
	virtual TAny* CustomInterface(TUid aInterfaceId);
sl@0
    40
	virtual TInt ThisHwBufferFilled(CMMFBuffer& aFillBufferPtr);
sl@0
    41
	virtual TInt ThisHwBufferEmptied(CMMFBuffer& aEmptyBufferPtr);
sl@0
    42
	virtual TInt SetConfig(TTaskConfig& aConfig);
sl@0
    43
	virtual TInt StopAndDeleteCodec();
sl@0
    44
	virtual TInt DeleteCodec();
sl@0
    45
sl@0
    46
	// from CMMFSwCodecWrapper
sl@0
    47
	virtual CMMFSwCodec& Codec();
sl@0
    48
sl@0
    49
	// from MSbcEncoderIntfc
sl@0
    50
	virtual TInt GetSupportedSamplingFrequencies ( RArray<TUint>& aSamplingFrequencies );
sl@0
    51
	virtual TInt GetSupportedChannelModes ( RArray<TSbcChannelMode>& aChannelModes );
sl@0
    52
	virtual TInt GetSupportedNumOfSubbands ( RArray<TUint>& aNumOfSubbands ); 
sl@0
    53
	virtual TInt GetSupportedAllocationMethods ( RArray<TSbcAllocationMethod>& aAllocationMethods );
sl@0
    54
	virtual TInt GetSupportedNumOfBlocks ( RArray<TUint>& aNumOfBlocks );
sl@0
    55
	
sl@0
    56
	virtual TInt GetSupportedBitpoolRange (TUint& aMinSupportedBitpoolSize, TUint& aMaxSupportedBitpoolSize);
sl@0
    57
	virtual void SetSamplingFrequency ( TUint aSamplingFrequency );
sl@0
    58
	virtual void SetChannelMode (TSbcChannelMode aChannelMode );
sl@0
    59
	virtual void SetNumOfSubbands ( TUint aNumOfSubbands );
sl@0
    60
	virtual void SetNumOfBlocks ( TUint aNumOfBlocks );
sl@0
    61
	virtual void SetAllocationMethod (TSbcAllocationMethod aAllocationMethod );
sl@0
    62
	virtual void SetBitpoolSize (TUint aBitpoolSize );
sl@0
    63
	virtual TInt ApplyConfig();
sl@0
    64
	virtual TInt GetSamplingFrequency ( TUint& aSamplingFrequency );
sl@0
    65
	virtual TInt GetChannelMode (TSbcChannelMode& aChannelMode );
sl@0
    66
	virtual TInt GetNumOfSubbands ( TUint& aNumOfSubbands );
sl@0
    67
	virtual TInt GetNumOfBlocks ( TUint& aNumOfBlocks );
sl@0
    68
	virtual TInt GetAllocationMethod (TSbcAllocationMethod& aAllocationMethod );
sl@0
    69
	virtual TInt GetBitpoolSize (TUint& aBitpoolSize );
sl@0
    70
	
sl@0
    71
private:
sl@0
    72
	CSbcEncoderTestDevice();
sl@0
    73
	void ConstructL();
sl@0
    74
private:
sl@0
    75
	TUint iSamplingFrequency;
sl@0
    76
	TSbcChannelMode iChannelMode;
sl@0
    77
	TUint iNumOfSubbands;
sl@0
    78
	TUint iNumOfBlocks;
sl@0
    79
	TSbcAllocationMethod iAllocMethod;
sl@0
    80
	TUint iBitpoolSize;
sl@0
    81
	TBool iApplyConfig;
sl@0
    82
	};
sl@0
    83
sl@0
    84
#endif