|
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 SPEECHENCODERCONFIGTESTDEVICE_H |
|
17 #define SPEECHENCODERCONFIGTESTDEVICE_H |
|
18 |
|
19 #include <mmf/server/mmfswcodecwrapper.h> |
|
20 #include <mmf/server/devsoundstandardcustominterfaces.h> |
|
21 |
|
22 |
|
23 class CMMFSpeechEncoderConfig : public CBase, |
|
24 public MSpeechEncoderConfig |
|
25 { |
|
26 public: |
|
27 //return Pointer to the CMMFSpeechEncoderConfig class |
|
28 static CMMFSpeechEncoderConfig* NewL(); |
|
29 |
|
30 //Destructor |
|
31 ~CMMFSpeechEncoderConfig(); |
|
32 |
|
33 // from mirror MSpeechEncoderConfig method. |
|
34 TInt SetBitrate (TUint aBitrate); |
|
35 TInt GetBitrate (TUint& aBitrate); |
|
36 TInt GetSupportedBitrates (RArray<TUint>& aSupportedBitrates ); |
|
37 TInt SetVadMode (TBool aVadModeOn ); |
|
38 TInt GetVadMode (TBool& aVadModeOn ); |
|
39 |
|
40 private: |
|
41 TUint iBitrate; |
|
42 TBool iVadModeOn; |
|
43 }; |
|
44 |
|
45 |
|
46 /* |
|
47 CSpeechEncoderConfigTestDevice |
|
48 |
|
49 Test hw device used by the |
|
50 TSU_MMF_DEVSOUND_CIU_SUITE unit test harness. |
|
51 */ |
|
52 class CSpeechEncoderConfigTestDevice : public CMMFSwCodecWrapper, |
|
53 public MSpeechEncoderConfig |
|
54 { |
|
55 public: |
|
56 static CMMFHwDevice* NewL(); |
|
57 virtual ~CSpeechEncoderConfigTestDevice(); |
|
58 virtual TInt Start(TDeviceFunc aFuncCmd, TDeviceFlow aFlowCmd); |
|
59 virtual TInt Stop(); |
|
60 virtual TInt Pause(); |
|
61 virtual TInt Init(THwDeviceInitParams& aDevInfo); |
|
62 virtual TAny* CustomInterface(TUid aInterfaceId); |
|
63 virtual TInt ThisHwBufferFilled(CMMFBuffer& aFillBufferPtr); |
|
64 virtual TInt ThisHwBufferEmptied(CMMFBuffer& aEmptyBufferPtr); |
|
65 virtual TInt SetConfig(TTaskConfig& aConfig); |
|
66 virtual TInt StopAndDeleteCodec(); |
|
67 virtual TInt DeleteCodec(); |
|
68 |
|
69 // from CMMFSwCodecWrapper |
|
70 virtual CMMFSwCodec& Codec(); |
|
71 |
|
72 // from mirror MSpeechEncoderConfig method. |
|
73 TInt SetBitrate ( TUint aBitrate ); |
|
74 TInt GetBitrate (TUint& aBitrate ); |
|
75 TInt GetSupportedBitrates (RArray<TUint>& aSupportedBitrates ); |
|
76 TInt SetVadMode (TBool aVadModeOn ); |
|
77 TInt GetVadMode (TBool& aVadModeOn ); |
|
78 |
|
79 private: |
|
80 CSpeechEncoderConfigTestDevice(); |
|
81 void ConstructL(); |
|
82 |
|
83 private: |
|
84 CMMFSpeechEncoderConfig* iSpeechEncoderConfig; |
|
85 }; |
|
86 |
|
87 #endif |