os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevSoundTest/CIPlugins/src/g711decoderconfigtestdevice.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef G711DECODERCONFIGTESTDEVICE_H
    17 #define G711DECODERCONFIGTESTDEVICE_H
    18 
    19 #include <mmf/server/mmfswcodecwrapper.h>
    20 #include <mmf/server/devsoundstandardcustominterfaces.h>
    21 
    22 
    23 class CMMFG711DecoderConfig : public CBase,
    24 							  public MG711DecoderIntfc
    25 	{
    26 public:
    27 	//return Pointer to the CMMFG711DecoderConfig class
    28 	static CMMFG711DecoderConfig* NewL();
    29 
    30 	//Destructor
    31 	~CMMFG711DecoderConfig();
    32 
    33 	// from MG711DecoderConfig
    34 	TInt SetDecoderMode(TDecodeMode aDecodeMode);
    35 	TInt GetDecoderMode(TDecodeMode& aDecodeMode);
    36 	TInt SetComfortNoiseGeneration(TBool aCng);
    37 	TInt GetComfortNoiseGeneration(TBool& aCng);
    38 	TInt SetPacketLossConcealment(TBool aPlc);
    39 	TInt GetPacketLossConcealment(TBool& aPlc);
    40 
    41 private:
    42 	TDecodeMode iDecodeMode;
    43 	TBool iCng;
    44 	TBool iPlc;
    45 	};
    46 
    47 
    48 /*
    49 CAacDecoderConfigTestDevice
    50 
    51 Test hw device used by the
    52 TSU_MMF_DEVSOUND_CIU_SUITE unit test harness.
    53 */
    54 class CG711DecoderConfigTestDevice : public CMMFSwCodecWrapper,
    55 									 public MG711DecoderIntfc
    56 	{
    57 public:
    58 	static CMMFHwDevice* NewL();
    59 	virtual ~CG711DecoderConfigTestDevice();
    60 	virtual TInt Start(TDeviceFunc aFuncCmd, TDeviceFlow aFlowCmd);
    61 	virtual TInt Stop();
    62 	virtual TInt Pause();
    63 	virtual TInt Init(THwDeviceInitParams& aDevInfo);
    64 	virtual TAny* CustomInterface(TUid aInterfaceId);
    65 	virtual TInt ThisHwBufferFilled(CMMFBuffer& aFillBufferPtr);
    66 	virtual TInt ThisHwBufferEmptied(CMMFBuffer& aEmptyBufferPtr);
    67 	virtual TInt SetConfig(TTaskConfig& aConfig);
    68 	virtual TInt StopAndDeleteCodec();
    69 	virtual TInt DeleteCodec();
    70 
    71 	// from CMMFSwCodecWrapper
    72 	virtual CMMFSwCodec& Codec();
    73 
    74 	// MG711DecoderIntfc
    75 	TInt SetDecoderMode(TDecodeMode aDecodeMode);
    76 	TInt GetDecoderMode(TDecodeMode& aDecodeMode);
    77 	TInt SetComfortNoiseGeneration(TBool aCng);
    78 	TInt GetComfortNoiseGeneration(TBool& aCng);
    79 	TInt SetPacketLossConcealment(TBool aPlc);
    80 	TInt GetPacketLossConcealment(TBool& aPlc);
    81 
    82 private:
    83 	CG711DecoderConfigTestDevice();
    84 	void ConstructL();
    85 
    86 private:
    87 	CMMFG711DecoderConfig* iG711DecoderConfig;
    88 	};
    89 
    90 #endif