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 |
#include "teststepcig729decoderconfig.h"
|
sl@0
|
17 |
|
sl@0
|
18 |
|
sl@0
|
19 |
TVerdict CTestStepCIG729DecoderConfig::DoTestStepL()
|
sl@0
|
20 |
{
|
sl@0
|
21 |
iTestStepResult = ETestSuiteError;
|
sl@0
|
22 |
|
sl@0
|
23 |
INFO_PRINTF1(_L("Initializing test CI device"));
|
sl@0
|
24 |
|
sl@0
|
25 |
if (iTestStepName.Compare(_L("MM-MMF-DEVSOUNDCI-U-0049-HP")) == 0)
|
sl@0
|
26 |
{
|
sl@0
|
27 |
iTestStepResult = DoTestStep0049L();
|
sl@0
|
28 |
}
|
sl@0
|
29 |
else if (iTestStepName.Compare(_L("MM-MMF-DEVSOUNDCI-U-0050-HP")) == 0)
|
sl@0
|
30 |
{
|
sl@0
|
31 |
iTestStepResult = DoTestStep0050L();
|
sl@0
|
32 |
}
|
sl@0
|
33 |
|
sl@0
|
34 |
return iTestStepResult;
|
sl@0
|
35 |
}
|
sl@0
|
36 |
|
sl@0
|
37 |
|
sl@0
|
38 |
TVerdict CTestStepCIG729DecoderConfig::DoTestStep0049L()
|
sl@0
|
39 |
{
|
sl@0
|
40 |
iTestStepResult = EFail;
|
sl@0
|
41 |
|
sl@0
|
42 |
INFO_PRINTF1(_L("G729DecoderIntfc - Instantiating"));
|
sl@0
|
43 |
|
sl@0
|
44 |
//Initialize - with the UID of our test HwDevice
|
sl@0
|
45 |
#ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
|
sl@0
|
46 |
TUid testUID = {KUidG729DecoderConfigTestDevice};
|
sl@0
|
47 |
#else
|
sl@0
|
48 |
TFourCC testUID('T','0','0','9');
|
sl@0
|
49 |
#endif
|
sl@0
|
50 |
|
sl@0
|
51 |
iTestStepResult = TestInitialize(testUID, EMMFStatePlaying);
|
sl@0
|
52 |
|
sl@0
|
53 |
if (iTestStepResult != EPass)
|
sl@0
|
54 |
{
|
sl@0
|
55 |
INFO_PRINTF1(_L("DevSound failed to instantiate test device"));
|
sl@0
|
56 |
return EInconclusive;
|
sl@0
|
57 |
}
|
sl@0
|
58 |
|
sl@0
|
59 |
// reset the value as previous test is pass
|
sl@0
|
60 |
iTestStepResult = EFail;
|
sl@0
|
61 |
|
sl@0
|
62 |
// KUidG729DecoderIntfc
|
sl@0
|
63 |
MG729DecoderIntfc* ptr = static_cast <MG729DecoderIntfc*> (iMMFDevSound->CustomInterface(KUidG729DecoderIntfc));
|
sl@0
|
64 |
|
sl@0
|
65 |
if (ptr)
|
sl@0
|
66 |
{
|
sl@0
|
67 |
INFO_PRINTF1(_L("MG729DecoderIntfc instantiated successfully"));
|
sl@0
|
68 |
|
sl@0
|
69 |
iTestStepResult = EPass;
|
sl@0
|
70 |
}
|
sl@0
|
71 |
else
|
sl@0
|
72 |
{
|
sl@0
|
73 |
INFO_PRINTF1(_L("MG729DecoderIntfc failed to retrieve the interface"));
|
sl@0
|
74 |
iTestStepResult = EInconclusive;
|
sl@0
|
75 |
}
|
sl@0
|
76 |
|
sl@0
|
77 |
return iTestStepResult;
|
sl@0
|
78 |
}
|
sl@0
|
79 |
|
sl@0
|
80 |
|
sl@0
|
81 |
TVerdict CTestStepCIG729DecoderConfig::DoTestStep0050L()
|
sl@0
|
82 |
{
|
sl@0
|
83 |
iTestStepResult = EFail;
|
sl@0
|
84 |
TInt result = KErrGeneral;
|
sl@0
|
85 |
|
sl@0
|
86 |
INFO_PRINTF1(_L("G729DecoderIntfc - BadLsfNextBuffer"));
|
sl@0
|
87 |
|
sl@0
|
88 |
//Initialize - with the UID of our test HwDevice
|
sl@0
|
89 |
#ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
|
sl@0
|
90 |
TUid testUID = {KUidG729DecoderConfigTestDevice};
|
sl@0
|
91 |
#else
|
sl@0
|
92 |
TFourCC testUID('T','0','0','9');
|
sl@0
|
93 |
#endif
|
sl@0
|
94 |
|
sl@0
|
95 |
iTestStepResult = TestInitialize(testUID, EMMFStatePlaying);
|
sl@0
|
96 |
|
sl@0
|
97 |
if (iTestStepResult != EPass)
|
sl@0
|
98 |
{
|
sl@0
|
99 |
INFO_PRINTF1(_L("DevSound failed to instantiate test device"));
|
sl@0
|
100 |
return EInconclusive;
|
sl@0
|
101 |
}
|
sl@0
|
102 |
|
sl@0
|
103 |
// reset the value as previous test is pass
|
sl@0
|
104 |
iTestStepResult = EFail;
|
sl@0
|
105 |
|
sl@0
|
106 |
// KUidG729DecoderIntfc
|
sl@0
|
107 |
MG729DecoderIntfc* ptr = static_cast <MG729DecoderIntfc*> (iMMFDevSound->CustomInterface(KUidG729DecoderIntfc));
|
sl@0
|
108 |
|
sl@0
|
109 |
if (ptr)
|
sl@0
|
110 |
{
|
sl@0
|
111 |
result = ptr->BadLsfNextBuffer(); // call method
|
sl@0
|
112 |
|
sl@0
|
113 |
if (result == KErrNone)
|
sl@0
|
114 |
{
|
sl@0
|
115 |
INFO_PRINTF1(_L("MG729DecoderIntfc::BadLsfNextBuffer finished successfully"));
|
sl@0
|
116 |
|
sl@0
|
117 |
iTestStepResult = EPass;
|
sl@0
|
118 |
}
|
sl@0
|
119 |
else
|
sl@0
|
120 |
{
|
sl@0
|
121 |
ERR_PRINTF2(_L("MG729DecoderIntfc::BadLsfNextBuffer failed with result %d"), result);
|
sl@0
|
122 |
}
|
sl@0
|
123 |
}
|
sl@0
|
124 |
else
|
sl@0
|
125 |
{
|
sl@0
|
126 |
INFO_PRINTF1(_L("MG729DecoderIntfc failed to retrieve the interface"));
|
sl@0
|
127 |
iTestStepResult = EInconclusive;
|
sl@0
|
128 |
}
|
sl@0
|
129 |
|
sl@0
|
130 |
return iTestStepResult;
|
sl@0
|
131 |
}
|