os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevSoundTest/CIPlugins/src/teststepciadvancedaacencodesettings.cpp
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #include "teststepciadvancedaacencodesettings.h"
19 /*****************************************************************************/
20 CTestStepCICreateAdvancedAacEncodeSettings::CTestStepCICreateAdvancedAacEncodeSettings()
22 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0006-HP");
25 /*****************************************************************************/
26 TVerdict CTestStepCICreateAdvancedAacEncodeSettings::DoTestStepL()
28 iTestStepResult = EFail;
30 INFO_PRINTF1(_L("Initializing test CI device"));
32 //Initialize - with the UID of our test HwDevice
33 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
34 TUid testUID = {KUidAdvancedAacEncodeSettingsTestDevice};
36 TFourCC testUID('T','0','0','5');
39 MMMFAdvancedAACEncodeSettings* interface = NULL;
40 interface = static_cast<MMMFAdvancedAACEncodeSettings*>(
41 InitializeAndInstantiateInterfaceL(testUID, KUidAdvancedAACEncoderSettings));
45 iTestStepResult = EPass;
46 INFO_PRINTF1(_L("Successfully retrieved the interface."));
50 iTestStepResult = EFail;
51 ERR_PRINTF1(_L("Failed to retrieve the interface"));
54 return iTestStepResult;
57 /*****************************************************************************/
58 CTestStepCIAdvancedAacEncodeSettings::CTestStepCIAdvancedAacEncodeSettings(TBool aIsGetTest)
59 : iIsGetTest(aIsGetTest)
63 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0099-HP");
67 iTestStepName = _L("MM-MMF-DEVSOUNDCI-U-0007-HP");
71 /*****************************************************************************/
72 TVerdict CTestStepCIAdvancedAacEncodeSettings::DoTestStepL()
74 iTestStepResult = EFail;
76 INFO_PRINTF1(_L("Initializing test CI device"));
78 //Initialize - with the UID of our test HwDevice
79 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
80 TUid testUID = {KUidAdvancedAacEncodeSettingsTestDevice};
82 TFourCC testUID('T','0','0','5');
85 MMMFAdvancedAACEncodeSettings* interface = NULL;
86 interface = static_cast<MMMFAdvancedAACEncodeSettings*>(
87 InitializeAndInstantiateInterfaceL(testUID, KUidAdvancedAACEncoderSettings));
91 MMMFAdvancedAACEncodeSettings::TAACBitrateMode bitrateMode = MMMFAdvancedAACEncodeSettings::EAACBitrateModeFixed;
92 INFO_PRINTF1(_L("Calling test CI method"));
93 TInt err = interface->SetAACEncodeBitrateMode(bitrateMode);
97 INFO_PRINTF1(_L("Testing GetAACEncodeBitrateMode"));
101 INFO_PRINTF1(_L("Testing SetAACEncodeBitrateMode"));
106 // Successfully set the mode
107 INFO_PRINTF1(_L("Set the mode successfully"));
109 MMMFAdvancedAACEncodeSettings::TAACBitrateMode testMode;
111 err = interface->GetAACEncodeBitrateMode(testMode);
113 iTestStepResult = EFail;
114 if ((err == KErrNone) && (testMode == bitrateMode))
116 INFO_PRINTF1(_L("Test CI method call was successful"));
117 iTestStepResult = EPass;
121 ERR_PRINTF4(_L("Test CI method failed, error: %d, expected value: %d, actual value: %d"), \
122 err, bitrateMode, testMode);
127 ERR_PRINTF2(_L("Test CI method failed, error"), err);
132 WARN_PRINTF1(_L("Failed to retrieve the custom interface."));
133 iTestStepResult = EInconclusive;
136 return iTestStepResult;