|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: EMC - Test App |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <e32svr.h> |
|
22 #include <StifParser.h> |
|
23 #include <Stiftestinterface.h> |
|
24 #include <DRMConfigIntfc.h> |
|
25 #include <DataBufferSource.h> |
|
26 |
|
27 #include <CommDbConnPref.h> |
|
28 #include <commdb.h> |
|
29 |
|
30 #include "EnhanMediaTestClass.h" |
|
31 #include "debug.h" |
|
32 |
|
33 using namespace multimedia; |
|
34 // EXTERNAL DATA STRUCTURES |
|
35 //extern ?external_data; |
|
36 |
|
37 // EXTERNAL FUNCTION PROTOTYPES |
|
38 //extern ?external_function( ?arg_type,?arg_type ); |
|
39 |
|
40 // CONSTANTS |
|
41 //const ?type ?constant_var = ?constant; |
|
42 |
|
43 // MACROS |
|
44 //#define ?macro ?macro_def |
|
45 |
|
46 // LOCAL CONSTANTS AND MACROS |
|
47 //const ?type ?constant_var = ?constant; |
|
48 //#define ?macro_name ?macro_def |
|
49 |
|
50 // MODULE DATA STRUCTURES |
|
51 //enum ?declaration |
|
52 //typedef ?declaration |
|
53 |
|
54 // LOCAL FUNCTION PROTOTYPES |
|
55 //?type ?function_name( ?arg_type, ?arg_type ); |
|
56 |
|
57 // FORWARD DECLARATIONS |
|
58 //class ?FORWARD_CLASSNAME; |
|
59 |
|
60 // ============================= LOCAL FUNCTIONS =============================== |
|
61 |
|
62 // ----------------------------------------------------------------------------- |
|
63 // ?function_name ?description. |
|
64 // ?description |
|
65 // Returns: ?value_1: ?description |
|
66 // ?value_n: ?description_line1 |
|
67 // ?description_line2 |
|
68 // ----------------------------------------------------------------------------- |
|
69 // |
|
70 /* |
|
71 ?type ?function_name( |
|
72 ?arg_type arg, // ?description |
|
73 ?arg_type arg) // ?description |
|
74 { |
|
75 |
|
76 ?code // ?comment |
|
77 |
|
78 // ?comment |
|
79 ?code |
|
80 } |
|
81 */ |
|
82 |
|
83 // ============================ MEMBER FUNCTIONS =============================== |
|
84 |
|
85 // ----------------------------------------------------------------------------- |
|
86 // CEnhanMediaTestClass::Delete |
|
87 // Delete here all resources allocated and opened from test methods. |
|
88 // Called from destructor. |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 void CEnhanMediaTestClass::Delete() |
|
92 { |
|
93 FTRACE(FPrint(_L("CEnhanMediaTestClass::Delete"))); |
|
94 |
|
95 |
|
96 iExpectedEvents.Reset(); |
|
97 iExpectedEvents.Close(); |
|
98 iFs.Close(); |
|
99 //iOcurredEvents.Close(); |
|
100 //iSupportedBitrates.Close(); |
|
101 |
|
102 |
|
103 iLog->Log(_L("Deleting test class CEnhanMediaTestClass...")); |
|
104 iLog->Log(_L("")); |
|
105 iLog->Log(_L("")); |
|
106 |
|
107 } |
|
108 |
|
109 // ----------------------------------------------------------------------------- |
|
110 // CEnhanMediaTestClass::RunMethodL |
|
111 // Run specified method. Contains also table of test mothods and their names. |
|
112 // ----------------------------------------------------------------------------- |
|
113 // |
|
114 TInt CEnhanMediaTestClass::RunMethodL( |
|
115 CStifItemParser& aItem ) |
|
116 { |
|
117 |
|
118 static TStifFunctionInfo const KFunctions[] = |
|
119 { |
|
120 // Copy this line for every implemented function. |
|
121 // First string is the function name used in TestScripter script file. |
|
122 // Second is the actual implementation member function. |
|
123 ENTRY( "CreateFactory", CEnhanMediaTestClass::CreateFactory ), |
|
124 ENTRY( "DeleteFactory", CEnhanMediaTestClass::DeleteFactory ), |
|
125 ENTRY( "AddObserver", CEnhanMediaTestClass::AddObserver ), |
|
126 ENTRY( "RemoveObserver", CEnhanMediaTestClass::RemoveObserver ), |
|
127 ENTRY( "CreateSource", CEnhanMediaTestClass::CreateSourceControl ), |
|
128 ENTRY( "StreamRemoveSource", CEnhanMediaTestClass::StreamRemoveSource ), |
|
129 ENTRY( "CloseSource", CEnhanMediaTestClass::CloseSource ), |
|
130 ENTRY( "DeleteSource", CEnhanMediaTestClass::DeleteSource ), |
|
131 ENTRY( "StreamAddSource", CEnhanMediaTestClass::StreamAddSource ), |
|
132 ENTRY( "CreateSink", CEnhanMediaTestClass::CreateSink), |
|
133 ENTRY( "DeleteSink", CEnhanMediaTestClass::DeleteSink), |
|
134 ENTRY( "StreamAddSink", CEnhanMediaTestClass::StreamAddSink), |
|
135 ENTRY( "StreamRemoveSink", CEnhanMediaTestClass::StreamRemoveSink), |
|
136 ENTRY( "CreateEffect", CEnhanMediaTestClass::CreateEffect ), |
|
137 ENTRY( "DeleteEffect", CEnhanMediaTestClass::DeleteEffect ), |
|
138 ENTRY( "RemoveEffect", CEnhanMediaTestClass::RemoveEffect ), |
|
139 ENTRY( "StreamAddEffect", CEnhanMediaTestClass::StreamAddEffect ), |
|
140 ENTRY( "CreateStream", CEnhanMediaTestClass::CreateStream ), |
|
141 ENTRY( "DeleteStream", CEnhanMediaTestClass::DeleteStream ), |
|
142 ENTRY( "FileSOpen", CEnhanMediaTestClass::FileSOpen ), |
|
143 ENTRY( "FileGenOpen", CEnhanMediaTestClass::FileGenOpen ), |
|
144 ENTRY( "DescSOpen", CEnhanMediaTestClass::DescSOpen ), |
|
145 ENTRY( "DBSOpen", CEnhanMediaTestClass::DBSOpen ), |
|
146 ENTRY( "DBSClose", CEnhanMediaTestClass::DBSClose ), |
|
147 ENTRY( "StreamOpen", CEnhanMediaTestClass::StreamOpen ), |
|
148 ENTRY( "StreamClose", CEnhanMediaTestClass::StreamClose ), |
|
149 ENTRY( "StreamPrime", CEnhanMediaTestClass::StreamPrime ), |
|
150 ENTRY( "EqualizerBandLevel", CEnhanMediaTestClass::EqualizerBandLevel ), |
|
151 ENTRY( "EqualizerNumBands", CEnhanMediaTestClass::EqualizerNumBands ), |
|
152 ENTRY( "EqualizerBandWidth", CEnhanMediaTestClass::EqualizerBandWidth ), |
|
153 ENTRY( "EqualizerCenterFrequency", CEnhanMediaTestClass::EqualizerCenterFrequency ), |
|
154 ENTRY( "EqualizerCrossoverFrequency", CEnhanMediaTestClass::EqualizerCrossoverFrequency ), |
|
155 ENTRY( "EqualizerDbLevelLimits", CEnhanMediaTestClass::EqualizerDbLevelLimits ), |
|
156 ENTRY( "EqualizerSetBandLevel", CEnhanMediaTestClass::EqualizerSetBandLevel ), |
|
157 ENTRY( "StreamStart", CEnhanMediaTestClass::StreamStart ), |
|
158 ENTRY( "StreamPause", CEnhanMediaTestClass::StreamPause ), |
|
159 ENTRY( "StreamStop", CEnhanMediaTestClass::StreamStop ), |
|
160 ENTRY( "StreamCustomInterface", CEnhanMediaTestClass::StreamCustomInterface ), |
|
161 ENTRY( "DescSGetBitRate", CEnhanMediaTestClass::DescSGetBitRate ), |
|
162 ENTRY( "CreateDataBuffer", CEnhanMediaTestClass::CreateDataBuffer ), |
|
163 ENTRY( "DBSSetSize", CEnhanMediaTestClass::DBSSetSize ), |
|
164 ENTRY( "DBSGetSize", CEnhanMediaTestClass::DBSGetSize ), |
|
165 ENTRY( "DBSMinBufSize", CEnhanMediaTestClass::DBSMinBufSize ), |
|
166 ENTRY( "WriteLoop", CEnhanMediaTestClass::WriteLoop ), |
|
167 ENTRY( "GetBuffConfig", CEnhanMediaTestClass::GetBuffConfig ), |
|
168 ENTRY( "DBSSetBuffConfig", CEnhanMediaTestClass::DBSSetBuffConfig ), |
|
169 ENTRY( "DBSGetBuffType", CEnhanMediaTestClass::DBSGetBuffType ), |
|
170 ENTRY( "DBSGetInterface", CEnhanMediaTestClass::DBSGetInterface ), |
|
171 ENTRY( "DBSGetBitRate", CEnhanMediaTestClass::DBSGetBitRate ), |
|
172 ENTRY( "DeleteDataBuffer", CEnhanMediaTestClass::DeleteDataBuffer ), |
|
173 |
|
174 ENTRY( "VolGetMinVolume", CEnhanMediaTestClass::VolGetMinVolume ), |
|
175 ENTRY( "VolGetMaxVolume", CEnhanMediaTestClass::VolGetMaxVolume ), |
|
176 ENTRY( "VolSetVolume", CEnhanMediaTestClass::VolSetVolume ), |
|
177 ENTRY( "VolGetVolume", CEnhanMediaTestClass::VolGetVolume ), |
|
178 ENTRY( "VolGetDefaultVolume", CEnhanMediaTestClass::VolGetDefaultVolume ), |
|
179 ENTRY( "BalGetBalance", CEnhanMediaTestClass::BalGetBalance ), |
|
180 ENTRY( "BalSetBalance", CEnhanMediaTestClass::BalSetBalance ), |
|
181 ENTRY( "EffectApply", CEnhanMediaTestClass::EffectApply ), |
|
182 ENTRY( "VolSetVolumeRamp", CEnhanMediaTestClass::VolSetVolumeRamp ), |
|
183 ENTRY( "FileSGetBitRate", CEnhanMediaTestClass::FileSGetBitRate ), |
|
184 ENTRY( "FileSGetSize", CEnhanMediaTestClass::FileSGetSize ), |
|
185 ENTRY( "Source_GetMimeType", CEnhanMediaTestClass::Source_GetMimeType ), |
|
186 ENTRY( "Source_GetSize", CEnhanMediaTestClass::Source_GetSize ), |
|
187 ENTRY( "Stream_GetDuration", CEnhanMediaTestClass::Stream_GetDuration ), |
|
188 ENTRY( "Stream_SetPriority", CEnhanMediaTestClass::Stream_SetPriority ), |
|
189 ENTRY( "StreamGetSSL", CEnhanMediaTestClass::StreamGetSSL ), |
|
190 ENTRY( "StreamGetRSSL", CEnhanMediaTestClass::StreamGetRSSL ), |
|
191 ENTRY( "StreamGetStateL", CEnhanMediaTestClass::StreamGetStateL ), |
|
192 ENTRY( "StreamGetCIL", CEnhanMediaTestClass::StreamGetCIL ), |
|
193 ENTRY( "StreamGetPositionL", CEnhanMediaTestClass::StreamGetPositionL ), |
|
194 ENTRY( "StreamSetPositionL", CEnhanMediaTestClass::StreamSetPositionL ), |
|
195 ENTRY( "ControlTypeL", CEnhanMediaTestClass::ControlTypeL ), |
|
196 ENTRY( "ControlControlTypeL", CEnhanMediaTestClass::ControlControlTypeL ), |
|
197 |
|
198 ENTRY( "DRMSetType", CEnhanMediaTestClass::DRMSetType ), |
|
199 ENTRY( "DRMGetType", CEnhanMediaTestClass::DRMGetType ), |
|
200 ENTRY( "DRMCommit", CEnhanMediaTestClass::DRMCommit ), |
|
201 ENTRY( "DRMGetAllowedODCount", CEnhanMediaTestClass::DRMGetAllowedOutputDeviceCount ), |
|
202 ENTRY( "DRMGetAllowedOutputDevice", CEnhanMediaTestClass::DRMGetAllowedOutputDevice ), |
|
203 ENTRY( "DRMAppendAllowedOutputDevice", CEnhanMediaTestClass::DRMAppendAllowedOutputDevice ), |
|
204 ENTRY( "DRMRemoveAllowedOutputDevice", CEnhanMediaTestClass::DRMRemoveAllowedOutputDevice ), |
|
205 ENTRY( "DRMReset", CEnhanMediaTestClass::DRMReset ), |
|
206 |
|
207 ENTRY( "DSGetSize", CEnhanMediaTestClass::DSGetSize ), |
|
208 |
|
209 ENTRY( "DSGetSize", CEnhanMediaTestClass::GeneralGen_StartProgDLL ), |
|
210 |
|
211 ENTRY( "Gen_StartProgDL",CEnhanMediaTestClass::GeneralGen_StartProgDLL ), |
|
212 ENTRY( "PDLSOpenL",CEnhanMediaTestClass::PDLSOpenL ), |
|
213 ENTRY( "PDLSGetCurFileSizeL",CEnhanMediaTestClass::PDLSGetCurFileSizeL ), |
|
214 ENTRY( "PDLSGetExpFileSizeL",CEnhanMediaTestClass::PDLSGetExpFileSizeL ), |
|
215 ENTRY( "PDLSGetDLStatusL",CEnhanMediaTestClass::PDLSGetDLStatusL ), |
|
216 ENTRY( "PDLSIsDLCompleteL",CEnhanMediaTestClass::PDLSIsDLCompleteL ), |
|
217 ENTRY( "PDLSGetPerDownloadedL",CEnhanMediaTestClass::PDLSGetPerDownloadedL ), |
|
218 ENTRY( "PDLSGetPerBufferedL",CEnhanMediaTestClass::PDLSGetPerBufferedL ), |
|
219 ENTRY( "PDLSGetDLRateL",CEnhanMediaTestClass::PDLSGetDLRateL ), |
|
220 ENTRY( "PDLSGetBitRateL",CEnhanMediaTestClass::PDLSGetBitRateL ), |
|
221 ENTRY( "PDLSResumeDownloadL",CEnhanMediaTestClass::PDLSResumeDownloadL ), |
|
222 ENTRY( "PDLSMoveFileL",CEnhanMediaTestClass::PDLSMoveFileL ), |
|
223 ENTRY( "PDLSCancelDownloadL",CEnhanMediaTestClass::PDLSCancelDownloadL ), |
|
224 ENTRY( "PDLSGetSize",CEnhanMediaTestClass::PDLSGetSize ), |
|
225 |
|
226 ENTRY( "AudioEffect_IsEnabled",CEnhanMediaTestClass::AudioEffectIsEnabled ), |
|
227 ENTRY( "AudioEffect_IsEnforced",CEnhanMediaTestClass::AudioEffectIsEnforced ), |
|
228 ENTRY( "AudioEffect_Uid",CEnhanMediaTestClass::AudioEffectUid ), |
|
229 ENTRY( "AudioEffect_HaveUpdateRights",CEnhanMediaTestClass::AudioEffectHaveUpdateRights ), |
|
230 ENTRY( "AudioEffect_Enforce",CEnhanMediaTestClass::AudioEffectEnforce ), |
|
231 |
|
232 ENTRY( "AudioEffect_Enable",CEnhanMediaTestClass::HandleAudioEffectEnableL ), |
|
233 ENTRY( "AudioEffect_Disable",CEnhanMediaTestClass::HandleAudioEffectDisableL ), |
|
234 |
|
235 ENTRY( "ER_DecayHFRatio",CEnhanMediaTestClass::HandleReverbDecayHFRatioL ), |
|
236 ENTRY( "ER_DecayHFRatioRange",CEnhanMediaTestClass::HandleReverbDecayHFRatioRangeL ), |
|
237 ENTRY( "ER_DecayTime",CEnhanMediaTestClass::HandleReverbDecayTimeL ), |
|
238 ENTRY( "ER_DecayTimeRange",CEnhanMediaTestClass::HandleReverbDecayTimeRangeL ), |
|
239 ENTRY( "ER_Density",CEnhanMediaTestClass::HandleReverbDensityL ), |
|
240 ENTRY( "ER_Diffusion",CEnhanMediaTestClass::HandleReverbDiffusionL ), |
|
241 ENTRY( "ER_ReflectionsDelay",CEnhanMediaTestClass::HandleReverbReflectionsDelayL ), |
|
242 ENTRY( "ER_ReflectionsDelayMax",CEnhanMediaTestClass::HandleReverbReflectionsDelayMaxL ), |
|
243 ENTRY( "ER_ReflectionsLevel",CEnhanMediaTestClass::HandleReverbReflectionsLevelL ), |
|
244 ENTRY( "ER_ReflectionLevelRange",CEnhanMediaTestClass::HandleReverbReflectionLevelRangeL ), |
|
245 ENTRY( "ER_ReverbDelay",CEnhanMediaTestClass::HandleReverbReverbDelayL ), |
|
246 ENTRY( "ER_ReverbDelayMax",CEnhanMediaTestClass::HandleReverbReverbDelayMaxL ), |
|
247 ENTRY( "ER_ReverbLevel",CEnhanMediaTestClass::HandleReverbReverbLevelL), |
|
248 ENTRY( "ER_ReverbLevelRange",CEnhanMediaTestClass::HandleReverbReverbLevelRangeL ), |
|
249 ENTRY( "ER_RoomHFLevel",CEnhanMediaTestClass::HandleReverbRoomHFLevelL ), |
|
250 ENTRY( "ER_RoomHFLevelRange",CEnhanMediaTestClass::HandleReverbRoomHFLevelRangeL ), |
|
251 ENTRY( "ER_RoomLevel",CEnhanMediaTestClass::HandleReverbRoomLevelL ), |
|
252 ENTRY( "ER_RoomLevelRange",CEnhanMediaTestClass::HandleReverbRoomLevelRangeL ), |
|
253 ENTRY( "ER_SetDecayHFRatio",CEnhanMediaTestClass::HandleReverbSetDecayHFRatioL ), |
|
254 ENTRY( "ER_SetDecayTime",CEnhanMediaTestClass::HandleReverbSetDecayTimeL ), |
|
255 ENTRY( "ER_SetDensity",CEnhanMediaTestClass::HandleReverbSetDensityL ), |
|
256 ENTRY( "ER_SetDiffusion",CEnhanMediaTestClass::HandleReverbSetDiffusionL ), |
|
257 ENTRY( "ER_SetReflectionsDelay",CEnhanMediaTestClass::HandleReverbSetReflectionsDelayL ), |
|
258 ENTRY( "ER_SetReflectionsLevel",CEnhanMediaTestClass::HandleReverbSetReflectionsLevelL ), |
|
259 ENTRY( "ER_SetReverbDelay",CEnhanMediaTestClass::HandleReverbSetReverbDelayL ), |
|
260 ENTRY( "ER_SetReverbLevel",CEnhanMediaTestClass::HandleReverbSetReverbLevelL ), |
|
261 ENTRY( "ER_SetRoomHFLevel",CEnhanMediaTestClass::HandleReverbSetRoomHFLevelL ), |
|
262 ENTRY( "ER_SetRoomLevel",CEnhanMediaTestClass::HandleReverbSetRoomLevelL ), |
|
263 ENTRY( "ER_DelayMax",CEnhanMediaTestClass::HandleReverbDelayMaxL ), |
|
264 |
|
265 ENTRY( "SW_IsContinuousLevelSupportedL",CEnhanMediaTestClass::HandleSWIsContinuousLevelSupportedL ), |
|
266 ENTRY( "SW_SetStereoWideningLevelL",CEnhanMediaTestClass::HandleSWSetStereoWideningLevelL ), |
|
267 ENTRY( "SW_StereoWideningLevelL",CEnhanMediaTestClass::HandleSWStereoWideningLevelL ), |
|
268 |
|
269 ENTRY( "RL_LevelRangeL",CEnhanMediaTestClass::HandleRLLevelRangeL ), |
|
270 ENTRY( "RL_SetRoomLevelL",CEnhanMediaTestClass::HandleRLSetRoomLevelL ), |
|
271 ENTRY( "RL_LevelL",CEnhanMediaTestClass::HandleRLLevelL ), |
|
272 |
|
273 ENTRY( "DA_DistanceAttenuationL",CEnhanMediaTestClass::HandleDADistanceAttenuationL ), |
|
274 ENTRY( "DA_RollOffFactorMaxL",CEnhanMediaTestClass::HandleDARollOffFactorMaxL ), |
|
275 ENTRY( "DA_RoomRollOffFactorMaxL",CEnhanMediaTestClass::HandleDARoomRollOffFactorMaxL ), |
|
276 |
|
277 |
|
278 ENTRY( "SL_LocationCartesianL",CEnhanMediaTestClass::HandleSLLocationCartesianL ), |
|
279 ENTRY( "SL_LocationSphericalL",CEnhanMediaTestClass::HandleSLLocationSphericalL ), |
|
280 ENTRY( "SL_SetLocationCartesianL",CEnhanMediaTestClass::HandleSLSetLocationCartesianL ), |
|
281 ENTRY( "SL_SetLocationSphericalL",CEnhanMediaTestClass::HandleSLSetLocationSphericalL ), |
|
282 ENTRY( "LO_OrientationL",CEnhanMediaTestClass::LO_OrientationL ), |
|
283 ENTRY( "LO_OrientationVectorsL",CEnhanMediaTestClass::LO_OrientationVectorsL ), |
|
284 |
|
285 |
|
286 ENTRY( "Control_Type",CEnhanMediaTestClass::HandleControlTypeL ), |
|
287 ENTRY( "Control_ControlType",CEnhanMediaTestClass::HandleControlControlTypeL ), |
|
288 |
|
289 ENTRY( "SD_SetFactorL",CEnhanMediaTestClass::HandleSDSetFactorL ), |
|
290 ENTRY( "SD_SetSphericalVelocityL",CEnhanMediaTestClass::HandleSDSetSphericalVelocityL ), |
|
291 ENTRY( "SD_SphericalVelocityL",CEnhanMediaTestClass::HandleSDSphericalVelocityL ), |
|
292 ENTRY( "SD_CartesianVelocityL",CEnhanMediaTestClass::HandleSDCartesianVelocityL ), |
|
293 ENTRY( "SD_FactorL",CEnhanMediaTestClass::HandleSDFactorL ), |
|
294 ENTRY( "SD_FactorMaxL",CEnhanMediaTestClass::HandleSDFactorMaxL ), |
|
295 ENTRY( "SD_SetCartesianVelocityL",CEnhanMediaTestClass::HandleSDSetCartesianVelocityL ), |
|
296 |
|
297 ENTRY( "AttachReverb",CEnhanMediaTestClass::AttachReverb ), |
|
298 ENTRY( "DetachReverb",CEnhanMediaTestClass::DetachReverb ), |
|
299 |
|
300 |
|
301 }; |
|
302 |
|
303 const TInt count = sizeof( KFunctions ) / |
|
304 sizeof( TStifFunctionInfo ); |
|
305 |
|
306 return RunInternalL( KFunctions, count, aItem ); |
|
307 |
|
308 } |
|
309 |
|
310 |
|
311 // ----------------------------------------------------------------------------- |
|
312 // CEnhanMediaTestClass::EventName |
|
313 // Return descriptor with the notification description |
|
314 // ----------------------------------------------------------------------------- |
|
315 TPtrC CEnhanMediaTestClass::EventName( TInt aKey ) |
|
316 { |
|
317 static TText* const badKeyword = (TText*)L"BadKeyword"; |
|
318 static TText* const keywords[] = |
|
319 { |
|
320 (TText*)L"EEDBSOpen", |
|
321 (TText*)L"EEStreamPause", |
|
322 (TText*)L"EEDeleteBuffer", |
|
323 (TText*)L"EEWriteToStream", |
|
324 (TText*)L"EEDataBuffer", |
|
325 (TText*)L"EEStreamClose", |
|
326 (TText*)L"EEStreamAddEffect", |
|
327 (TText*)L"EEStreamOpen", |
|
328 (TText*)L"EEStreamPrime", |
|
329 (TText*)L"EEStreamStart", |
|
330 (TText*)L"EEPDLSOpen", |
|
331 |
|
332 }; |
|
333 if( (TUint)aKey >= (sizeof( keywords )/sizeof(TText*)) ) |
|
334 { |
|
335 iLog->Log(_L("Keyword out of bounds")); |
|
336 TPtrC keyword( badKeyword ); |
|
337 return keyword; |
|
338 } |
|
339 else |
|
340 { |
|
341 TPtrC keyword( keywords[aKey] ); |
|
342 return keyword; |
|
343 } |
|
344 } |
|
345 |
|
346 // ----------------------------------------------------------------------------- |
|
347 // CEnhanMediaTestClass::AddExpectedEvent |
|
348 // Add an event to the expected events' list |
|
349 // ----------------------------------------------------------------------------- |
|
350 void CEnhanMediaTestClass::AddExpectedEvent(TAEnhsExpectedEvent event, TInt ms) |
|
351 { |
|
352 FTRACE(FPrint(_L("CEnhanMediaTestClass::AddExpectedEvent"))); |
|
353 iExpectedEvents.Append(event); |
|
354 TPtrC eventName = EventName(event); |
|
355 iLog->Log(_L("Adding expected event:(0x%02x)%S Total=%d"), event, &eventName, iExpectedEvents.Count() ); |
|
356 |
|
357 if ( iTimeoutController && !iTimeoutController->IsActive() ) |
|
358 { |
|
359 if (ms > 0) |
|
360 { |
|
361 iTimeoutController->Start( TTimeIntervalMicroSeconds(ms * 1000) ); |
|
362 } |
|
363 else |
|
364 { |
|
365 iLog->Log(_L("Timeout with default value (1s)")); |
|
366 iTimeoutController->Start( TTimeIntervalMicroSeconds(1000000) ); |
|
367 } |
|
368 } |
|
369 } |
|
370 |
|
371 // ----------------------------------------------------------------------------- |
|
372 // CEnhanMediaTestClass::RemoveExpectedEvent |
|
373 // Remove the indicated event from the expected events' list |
|
374 // ----------------------------------------------------------------------------- |
|
375 TBool CEnhanMediaTestClass::RemoveExpectedEvent(TAEnhsExpectedEvent aEvent) |
|
376 { |
|
377 FTRACE(FPrint(_L("CEnhanMediaTestClass::RemoveExpectedEvent"))); |
|
378 TBool match = EFalse; |
|
379 for (TUint i=0; i < iExpectedEvents.Count() ; i++) |
|
380 { |
|
381 if (iExpectedEvents[i] == aEvent) |
|
382 { |
|
383 iExpectedEvents.Remove(i); |
|
384 match = ETrue; |
|
385 break; |
|
386 } |
|
387 } |
|
388 |
|
389 return match; |
|
390 } |
|
391 |
|
392 |
|
393 // ----------------------------------------------------------------------------- |
|
394 // CEnhanMediaTestClass::RemoveAllExpectedEvents |
|
395 // Remove the indicated event from the expected events' list |
|
396 // ----------------------------------------------------------------------------- |
|
397 void CEnhanMediaTestClass::RemoveAllExpectedEvents() |
|
398 { |
|
399 FTRACE(FPrint(_L("CEnhanMediaTestClass::RemoveAllExpectedEvents"))); |
|
400 iLog->Log(_L("Removing all expected events")); |
|
401 |
|
402 iExpectedEvents.Reset(); |
|
403 //iOcurredEvents.Reset(); |
|
404 } |
|
405 |
|
406 |
|
407 // ----------------------------------------------------------------------------- |
|
408 // CEnhanMediaTestClass::ProcessEvent |
|
409 // ----------------------------------------------------------------------------- |
|
410 void CEnhanMediaTestClass::ProcessEvent(TAEnhsExpectedEvent aEvent, TInt aError) |
|
411 { |
|
412 FTRACE(FPrint(_L("CEnhanMediaTestClass::ProcessExpectedEvent"))); |
|
413 TPtrC nameEvent = EventName(aEvent); |
|
414 |
|
415 // Check for error |
|
416 if (aError == KErrNone) |
|
417 { |
|
418 // Remove the event |
|
419 if (RemoveExpectedEvent(aEvent)) |
|
420 { |
|
421 iLog->Log(_L("Expected Event: (0x%02x)%S has ocurred Total=%d"), aEvent, &nameEvent,iExpectedEvents.Count()); |
|
422 } |
|
423 else |
|
424 { |
|
425 iLog->Log(_L("Event: (0x%02x)%S has ocurred"), aEvent, &nameEvent); |
|
426 return; |
|
427 } |
|
428 // All expected events have ocurred |
|
429 if (iExpectedEvents.Count() == 0 ) |
|
430 { |
|
431 Signal(); |
|
432 iTimeoutController->Cancel(); |
|
433 } |
|
434 } |
|
435 else |
|
436 { |
|
437 iLog->Log(_L("[Error] Event: (0x%02x)%S return with error code=%d"), aEvent, &nameEvent, aError); |
|
438 if (iExpectedEvents.Count() != 0 ) |
|
439 { |
|
440 RemoveExpectedEvent(aEvent); |
|
441 } |
|
442 iTimeoutController->Cancel(); |
|
443 Signal(KErrCallbackErrorCode); |
|
444 } |
|
445 } |
|
446 |
|
447 // ----------------------------------------------------------------------------- |
|
448 // CEnhanMediaTestClass::HandleTimeout |
|
449 // Review if all the expected events have ocurred once the time is over |
|
450 // ----------------------------------------------------------------------------- |
|
451 |
|
452 void CEnhanMediaTestClass::HandleTimeout(TInt aError) |
|
453 { |
|
454 FTRACE(FPrint(_L("CEnhanMediaTestClass::HandleTimeout"))); |
|
455 // All expected events have ocurred |
|
456 if (aError != KErrNone) |
|
457 { |
|
458 if (iExpectedEvents.Count() == 0 ) |
|
459 { |
|
460 iLog->Log(_L("Timing out but events have ocurred")); |
|
461 Signal(); |
|
462 } |
|
463 else |
|
464 { |
|
465 RemoveAllExpectedEvents(); |
|
466 iLog->Log(_L("Timing out and events still pending")); |
|
467 Signal(KErrEventPending); |
|
468 } |
|
469 } |
|
470 else |
|
471 { |
|
472 iLog->Log(_L("Timing out return a error %d"), aError); |
|
473 Signal(aError); |
|
474 } |
|
475 } |
|
476 |
|
477 // ----------------------------------------------------------------------------- |
|
478 // CEnhanMediaTestClass::SetTimeout |
|
479 // Create a timer and set a timeout |
|
480 // When the timeout is reached the test case is marked as failed |
|
481 // It's used rather than the "timeout" keyword in the configuration file |
|
482 // because in this way the log continues |
|
483 // ----------------------------------------------------------------------------- |
|
484 TInt CEnhanMediaTestClass::SetTimeout( CStifItemParser& aItem ) |
|
485 { |
|
486 FTRACE(FPrint(_L("CEnhanMediaTestClass::SetTimeout"))); |
|
487 TInt timeout=0; |
|
488 TInt error = aItem.GetNextInt(timeout) ; |
|
489 if ( iTimeoutController ) |
|
490 { |
|
491 if ( timeout > 0 ) |
|
492 { |
|
493 iTimeoutController->Start( TTimeIntervalMicroSeconds(timeout*1000) ); |
|
494 } |
|
495 else |
|
496 { |
|
497 iTimeoutController->Start( TTimeIntervalMicroSeconds(1000000) ); |
|
498 } |
|
499 } |
|
500 else |
|
501 { |
|
502 iLog->Log(_L("Timeout Controller doesn't exist")); |
|
503 error = KErrTimeoutController; |
|
504 } |
|
505 return error; |
|
506 } |
|
507 |
|
508 |
|
509 // ----------------------------------------------------------------------------- |
|
510 // Uses the TestModuleBase API to allow a panic as exit reason for a test case |
|
511 // ----------------------------------------------------------------------------- |
|
512 TInt CEnhanMediaTestClass::SetAllowedPanic( CStifItemParser& aItem ) |
|
513 { |
|
514 FTRACE(FPrint(_L("CEnhanMediaTestClass::SetAllowedPanic"))); |
|
515 TInt error = KErrNone; |
|
516 TInt panicCode; |
|
517 TPtrC panicType; |
|
518 if ( ( KErrNone == aItem.GetNextString(panicType) ) && |
|
519 ( KErrNone == aItem.GetNextInt(panicCode) ) ) |
|
520 { |
|
521 iLog->Log(_L("Allowing panic: %S %d"), &panicType, panicCode); |
|
522 iTestModuleIf.SetExitReason( CTestModuleIf::EPanic, panicCode ); |
|
523 iNormalExitReason = EFalse; |
|
524 } |
|
525 else |
|
526 { |
|
527 iLog->Log(KMsgBadTestParameters); |
|
528 error = KErrBadTestParameter; |
|
529 } |
|
530 return error; |
|
531 } |
|
532 |
|
533 // ----------------------------------------------------------------------------- |
|
534 // CEnhanMediaTestClass::SetExpectedEvents() |
|
535 // ----------------------------------------------------------------------------- |
|
536 TInt CEnhanMediaTestClass::SetExpectedEvents( CStifItemParser& aItem ) |
|
537 { |
|
538 FTRACE(FPrint(_L("CEnhanMediaTestClass::SetExpectedEvents"))); |
|
539 TInt error = KErrNone; |
|
540 TInt event=0; |
|
541 while ( KErrNone == aItem.GetNextInt(event)) |
|
542 { |
|
543 AddExpectedEvent(static_cast<TAEnhsExpectedEvent>(event), 0); // Default timeout value |
|
544 } |
|
545 return error; |
|
546 } |
|
547 |
|
548 |
|
549 // ----------------------------------------------------------------------------- |
|
550 // CEnhanMediaTestClass::ExampleL |
|
551 // Example test method function. |
|
552 // (other items were commented in a header). |
|
553 // ----------------------------------------------------------------------------- |
|
554 // |
|
555 TInt CEnhanMediaTestClass::ExampleL( CStifItemParser& aItem ) |
|
556 { |
|
557 |
|
558 // Print to UI |
|
559 _LIT( KEnhanMediaTestClass, "EnhanMediaTestClass" ); |
|
560 _LIT( KExample, "In Example" ); |
|
561 TestModuleIf().Printf( 0, KEnhanMediaTestClass, KExample ); |
|
562 // Print to log file |
|
563 iLog->Log( KExample ); |
|
564 |
|
565 TInt i = 0; |
|
566 TPtrC string; |
|
567 _LIT( KParam, "Param[%i]: %S" ); |
|
568 while ( aItem.GetNextString ( string ) == KErrNone ) |
|
569 { |
|
570 TestModuleIf().Printf( i, KEnhanMediaTestClass, |
|
571 KParam, i, &string ); |
|
572 i++; |
|
573 } |
|
574 |
|
575 return KErrNone; |
|
576 |
|
577 } |
|
578 |
|
579 // ----------------------------------------------------------------------------- |
|
580 // CEnhanMediaTestClass::CreateRestrictedAO |
|
581 // Create RestrictedAO |
|
582 // ----------------------------------------------------------------------------- |
|
583 // |
|
584 TInt CEnhanMediaTestClass::CreateFactory( CStifItemParser& /*aItem*/ ) |
|
585 { |
|
586 //AddExpectedEvent(EECreateFactory,KShortTimeout); |
|
587 TInt error = KErrNone; |
|
588 TInt err = CMultimediaFactory::CreateFactory(iFactory); |
|
589 if(error == KErrNone) |
|
590 { |
|
591 iLog->Log(_L("CreateFactory OK")); |
|
592 } |
|
593 else |
|
594 { |
|
595 iLog->Log(_L("CreateFactory [%d]"),error); |
|
596 } |
|
597 //ProcessEvent(EECreateFactory, error); |
|
598 return error; |
|
599 } |
|
600 |
|
601 TInt CEnhanMediaTestClass::DeleteFactory( CStifItemParser& /*aItem*/ ) |
|
602 { |
|
603 TInt error = KErrNone; |
|
604 if(iMimeType) |
|
605 { |
|
606 delete iMimeType; |
|
607 iMimeType = NULL; |
|
608 } |
|
609 |
|
610 if(iFileName) |
|
611 { |
|
612 delete iFileName; |
|
613 iFileName = NULL; |
|
614 } |
|
615 |
|
616 if(iDescData) |
|
617 { |
|
618 delete iDescData; |
|
619 iDescData = NULL; |
|
620 } |
|
621 |
|
622 if (iDRMConfigIntfc) |
|
623 { |
|
624 delete iDRMConfigIntfc; |
|
625 iDRMConfigIntfc = NULL; |
|
626 } |
|
627 if(iUrlName) |
|
628 { |
|
629 delete iUrlName; |
|
630 } |
|
631 |
|
632 if(iAccessPtName) |
|
633 { |
|
634 delete iAccessPtName; |
|
635 } |
|
636 // ProcessEvent(EECreateFactory, error); |
|
637 /* for (TUint i =0; i < iExpectedEvents.Count() ; i++) |
|
638 { |
|
639 ProcessEvent(TAEnhsExpectedEvent(i),0); |
|
640 }*/ |
|
641 delete iFactory; |
|
642 iLog->Log(_L("Delete Factory OK")); |
|
643 return error; |
|
644 } |
|
645 |
|
646 TInt CEnhanMediaTestClass::CreateSourceControl( CStifItemParser& aItem ) |
|
647 { |
|
648 //AddExpectedEvent(EECreateSource,KShortTimeout); |
|
649 |
|
650 TInt object; |
|
651 TInt status = KErrNone; |
|
652 aItem.GetNextInt(object); |
|
653 switch(object) |
|
654 { |
|
655 case EFILESOURCE: |
|
656 { |
|
657 status = iFactory->CreateSourceControl( KFileSourceControl, iSourceControl ); |
|
658 if(status == KErrNone) |
|
659 { |
|
660 iMFileSource = static_cast<MFileSource*>(iSourceControl); |
|
661 } |
|
662 break; |
|
663 } |
|
664 case EDATABUFFERSOURCE: |
|
665 { |
|
666 status = iFactory->CreateSourceControl( KDataBufferSourceControl, iSourceControl ); |
|
667 if(status == KErrNone) |
|
668 { |
|
669 iMDataBufferSource = static_cast<MDataBufferSource*>(iSourceControl); |
|
670 } |
|
671 break; |
|
672 } |
|
673 case EDESCRIPTORSOURCE: |
|
674 { |
|
675 status = iFactory->CreateSourceControl( KDescriptorSourceControl, iSourceControl ); |
|
676 if(status == KErrNone) |
|
677 { |
|
678 iMDescriptorSource = static_cast<MDescriptorSource*>(iSourceControl); |
|
679 } |
|
680 break; |
|
681 } |
|
682 case EPDLSOURCE: |
|
683 { |
|
684 status = iFactory->CreateSourceControl( KProgDLSourceControl, iSourceControl ); |
|
685 if(status == KErrNone) |
|
686 { |
|
687 iMProgDLSource = static_cast<MProgDLSource*>(iSourceControl); |
|
688 } |
|
689 break; |
|
690 } |
|
691 default: |
|
692 { |
|
693 status = KErrNotSupported; |
|
694 break; |
|
695 } |
|
696 }; |
|
697 if(status == KErrNone) |
|
698 { |
|
699 // iMFileSource = static_cast<MFileSource*>(iSourceControl); |
|
700 iLog->Log(_L("CreateSourceControl OK")); |
|
701 |
|
702 } |
|
703 else |
|
704 { |
|
705 iLog->Log(_L("CreateSourceControl [%d]"),status); |
|
706 } |
|
707 return status; |
|
708 } |
|
709 |
|
710 TInt CEnhanMediaTestClass::DeleteSource(CStifItemParser& /*aItem*/) |
|
711 { |
|
712 iLog->Log(_L("DeleteSourceControl")); |
|
713 TInt status = KErrNone; |
|
714 if(iMDataBufferSource) |
|
715 { |
|
716 MSourceControl* objPtr = iMDataBufferSource; |
|
717 iFactory->DeleteSourceControl(objPtr); |
|
718 iMDataBufferSource = NULL; |
|
719 } |
|
720 |
|
721 if(iMDescriptorSource) |
|
722 { |
|
723 MSourceControl* objPtr = iMDescriptorSource; |
|
724 iFactory->DeleteSourceControl(objPtr); |
|
725 iMDescriptorSource = NULL; |
|
726 } |
|
727 |
|
728 if(iMFileSource) |
|
729 { |
|
730 MSourceControl* objPtr = iMFileSource; |
|
731 iFactory->DeleteSourceControl(objPtr); |
|
732 iMFileSource = NULL; |
|
733 } |
|
734 if(iMProgDLSource) |
|
735 { |
|
736 MSourceControl* objPtr = iMProgDLSource; |
|
737 iFactory->DeleteSourceControl(objPtr); |
|
738 iMProgDLSource = NULL; |
|
739 } |
|
740 iLog->Log(_L("DeleteSourceControl OK")); |
|
741 //ProcessEvent(EECreateSource, status); |
|
742 return status; |
|
743 } |
|
744 |
|
745 TInt CEnhanMediaTestClass::CloseSource(CStifItemParser& /*aItem*/) |
|
746 { |
|
747 TInt status = KErrNone; |
|
748 status = iSourceControl->Close(); |
|
749 if (status == KErrNone) |
|
750 { |
|
751 iLog->Log(_L("CloseSource OK")); |
|
752 } |
|
753 else |
|
754 { |
|
755 iLog->Log(_L("CloseSource FAILED [%d]"),status); |
|
756 } |
|
757 return status; |
|
758 } |
|
759 |
|
760 TInt CEnhanMediaTestClass::CreateSink(CStifItemParser& /*aItem*/) |
|
761 { |
|
762 //AddExpectedEvent(EECreateSink,KShortTimeout); |
|
763 TInt status(KErrNone); |
|
764 if ( iMAudioSink ) |
|
765 { |
|
766 status = KErrAlreadyExists; |
|
767 } |
|
768 else |
|
769 { |
|
770 status = iFactory->CreateSinkControl( KMMFAudioOutputSinkControl, iMAudioSink ); |
|
771 } |
|
772 if (status == KErrNone) |
|
773 { |
|
774 iLog->Log(_L("CreateSinkL OK")); |
|
775 } |
|
776 else |
|
777 { |
|
778 iLog->Log(_L("CreateSinkL FAILED [%d]"),status); |
|
779 } |
|
780 |
|
781 //ProcessEvent(ECreateSink, status); |
|
782 return status; |
|
783 } |
|
784 |
|
785 TInt CEnhanMediaTestClass::DeleteSink(CStifItemParser& /*aItem*/) |
|
786 { |
|
787 TInt status(KErrNone); |
|
788 if ( iMAudioSink ) |
|
789 { |
|
790 status = iFactory->DeleteSinkControl(iMAudioSink); |
|
791 iMAudioSink = NULL; |
|
792 } |
|
793 if (status == KErrNone) |
|
794 { |
|
795 iLog->Log(_L("DeleteSink OK")); |
|
796 } |
|
797 else |
|
798 { |
|
799 iLog->Log(_L("DeleteSink FAILED [%d]"),status); |
|
800 } |
|
801 |
|
802 //ProcessEvent(EECreateSink, status); |
|
803 |
|
804 return status; |
|
805 } |
|
806 TInt CEnhanMediaTestClass::CreateStream(CStifItemParser& /*aItem*/) |
|
807 { |
|
808 //AddExpectedEvent(EECreateStream,KShortTimeout); |
|
809 TInt status(KErrNone); |
|
810 if ( iMStreamControl ) |
|
811 { |
|
812 status = KErrAlreadyExists; |
|
813 } |
|
814 else |
|
815 { |
|
816 status = iFactory->CreateStreamControl( KStreamControl, iMStreamControl ); |
|
817 } |
|
818 //ProcessEvent(ECreateStream, status); |
|
819 if (status == KErrNone) |
|
820 { |
|
821 iLog->Log(_L("CreateStream OK")); |
|
822 } |
|
823 else |
|
824 { |
|
825 iLog->Log(_L("CreateStream FAILED [%d]"),status); |
|
826 } |
|
827 //AddExpectedEvent(EECreateStream,KShortTimeout); |
|
828 |
|
829 return status; |
|
830 } |
|
831 |
|
832 TInt CEnhanMediaTestClass::DeleteStream(CStifItemParser& /*aItem*/) |
|
833 { |
|
834 TInt status(KErrNone); |
|
835 |
|
836 if ( iMStreamControl ) |
|
837 { |
|
838 status = iFactory->DeleteStreamControl(iMStreamControl); |
|
839 iMStreamControl = NULL; |
|
840 } |
|
841 if (status == KErrNone) |
|
842 { |
|
843 iLog->Log(_L("DeleteStream OK")); |
|
844 } |
|
845 else |
|
846 { |
|
847 iLog->Log(_L("DeleteStream FAILED [%d]"),status); |
|
848 } |
|
849 //ProcessEvent(EECreateStream, status); |
|
850 return status; |
|
851 } |
|
852 |
|
853 TInt CEnhanMediaTestClass::RemoveEffect(CStifItemParser& aItem) |
|
854 { |
|
855 |
|
856 TInt object; |
|
857 TInt status(KErrNone); |
|
858 aItem.GetNextInt(object); |
|
859 iLog->Log(_L("RemoveEffect INIT [%d]"),object); |
|
860 switch(object) |
|
861 { |
|
862 case EVOLUMECONTROL: |
|
863 { |
|
864 iEffectControl = iMVolumeControl; |
|
865 } |
|
866 break; |
|
867 case EBALANCECONTROL: |
|
868 { |
|
869 iEffectControl = iMBalanceControl; |
|
870 } |
|
871 break; |
|
872 case EEQUALIZERCONTROL: |
|
873 { |
|
874 iEffectControl = iMEqualizerControl; |
|
875 } |
|
876 break; |
|
877 case EREVERBCONTROL: |
|
878 { |
|
879 iEffectControl = iMReverbControl; |
|
880 } |
|
881 break; |
|
882 case EBASSBOOSTCONTROL: |
|
883 { |
|
884 iEffectControl = iMBassBoostControl; |
|
885 } |
|
886 break; |
|
887 case ESTEREOWIDCONTROL: |
|
888 { |
|
889 iEffectControl = iMStereoWideningControl; |
|
890 } |
|
891 break; |
|
892 |
|
893 |
|
894 case ELOUDNESSCONTROL: |
|
895 { |
|
896 iEffectControl = iMLoudnessControl; |
|
897 } |
|
898 break; |
|
899 |
|
900 |
|
901 case EROOMLEVELCONTROL: |
|
902 { |
|
903 iEffectControl = iMRoomLevelControl; |
|
904 } |
|
905 break; |
|
906 |
|
907 |
|
908 case EDISTATTCONTROL: |
|
909 { |
|
910 iEffectControl = iMDistanceAttenuationControl; |
|
911 } |
|
912 break; |
|
913 |
|
914 |
|
915 case ELISTDOPPCONTROL: |
|
916 { |
|
917 iEffectControl = iMListenerDopplerControl; |
|
918 } |
|
919 break; |
|
920 |
|
921 |
|
922 case ESOURDOPPCONTROL: |
|
923 { |
|
924 iEffectControl = iMSourceDopplerControl; |
|
925 } |
|
926 break; |
|
927 |
|
928 |
|
929 case ELISTLOCCONTROL: |
|
930 { |
|
931 iEffectControl = iMListenerLocationControl; |
|
932 } |
|
933 break; |
|
934 |
|
935 |
|
936 case ESOURLOCCONTROL: |
|
937 { |
|
938 iEffectControl = iMSourceLocationControl; |
|
939 } |
|
940 break; |
|
941 |
|
942 |
|
943 case ELISTORIENTCONTROL: |
|
944 { |
|
945 iEffectControl = iMListenerOrientationControl; |
|
946 } |
|
947 break; |
|
948 |
|
949 |
|
950 case ESOURORIENTCONTROL: |
|
951 { |
|
952 iEffectControl = iMSourceOrientationControl; |
|
953 } |
|
954 break; |
|
955 |
|
956 } |
|
957 status = iMStreamControl->RemoveEffect(*iEffectControl); |
|
958 if (status == KErrNone) |
|
959 { |
|
960 iLog->Log(_L("RemoveEffect OK")); |
|
961 } |
|
962 else |
|
963 { |
|
964 iLog->Log(_L("RemoveEffect FAILED [%d]"),status); |
|
965 } |
|
966 ProcessEvent(EEStreamAddEffect, status); |
|
967 iLog->Log(_L("RemoveEffect END [%d]"),object); |
|
968 return status; |
|
969 } |
|
970 |
|
971 TInt CEnhanMediaTestClass::DeleteEffect(CStifItemParser& aItem) |
|
972 { |
|
973 |
|
974 TInt object; |
|
975 TInt status(KErrNone); |
|
976 MEffectControl* tempCtrl; |
|
977 aItem.GetNextInt(object); |
|
978 iLog->Log(_L("DeleteEffect INIT [%d]"),object); |
|
979 switch(object) |
|
980 { |
|
981 case EVOLUMECONTROL: |
|
982 { |
|
983 if ( iMVolumeControl ) |
|
984 { |
|
985 tempCtrl = iMVolumeControl; |
|
986 status = iFactory->DeleteEffectControl(tempCtrl); |
|
987 iMVolumeControl = NULL; |
|
988 } |
|
989 break; |
|
990 } |
|
991 case EBALANCECONTROL: |
|
992 { |
|
993 if ( iMBalanceControl ) |
|
994 { |
|
995 tempCtrl = iMBalanceControl; |
|
996 status = iFactory->DeleteEffectControl(tempCtrl); |
|
997 iMBalanceControl = NULL; |
|
998 } |
|
999 break; |
|
1000 } |
|
1001 case EEQUALIZERCONTROL: |
|
1002 { |
|
1003 if ( iMEqualizerControl ) |
|
1004 { |
|
1005 tempCtrl = iMEqualizerControl; |
|
1006 status = iFactory->DeleteEffectControl(tempCtrl); |
|
1007 iMEqualizerControl = NULL; |
|
1008 } |
|
1009 break; |
|
1010 } |
|
1011 case EREVERBCONTROL: |
|
1012 { |
|
1013 if ( iMReverbControl ) |
|
1014 { |
|
1015 tempCtrl = iMReverbControl; |
|
1016 status = iFactory->DeleteEffectControl(tempCtrl); |
|
1017 iMReverbControl = NULL; |
|
1018 } |
|
1019 break; |
|
1020 } |
|
1021 |
|
1022 case EBASSBOOSTCONTROL: |
|
1023 { |
|
1024 if ( iMBassBoostControl ) |
|
1025 { |
|
1026 tempCtrl = iMBassBoostControl; |
|
1027 status = iFactory->DeleteEffectControl(tempCtrl); |
|
1028 iMBassBoostControl = NULL; |
|
1029 } |
|
1030 break; |
|
1031 } |
|
1032 |
|
1033 case ESTEREOWIDCONTROL: |
|
1034 { |
|
1035 if ( iMStereoWideningControl ) |
|
1036 { |
|
1037 tempCtrl = iMStereoWideningControl; |
|
1038 status = iFactory->DeleteEffectControl(tempCtrl); |
|
1039 iMStereoWideningControl = NULL; |
|
1040 } |
|
1041 break; |
|
1042 } |
|
1043 case ELOUDNESSCONTROL: |
|
1044 { |
|
1045 if ( iMLoudnessControl ) |
|
1046 { |
|
1047 tempCtrl = iMLoudnessControl; |
|
1048 status = iFactory->DeleteEffectControl(tempCtrl); |
|
1049 iMLoudnessControl = NULL; |
|
1050 } |
|
1051 break; |
|
1052 } |
|
1053 case EROOMLEVELCONTROL: |
|
1054 { |
|
1055 if ( iMRoomLevelControl ) |
|
1056 { |
|
1057 tempCtrl = iMRoomLevelControl; |
|
1058 status = iFactory->DeleteEffectControl(tempCtrl); |
|
1059 iMRoomLevelControl = NULL; |
|
1060 } |
|
1061 break; |
|
1062 } |
|
1063 case EDISTATTCONTROL: |
|
1064 { |
|
1065 if ( iMDistanceAttenuationControl ) |
|
1066 { |
|
1067 tempCtrl = iMDistanceAttenuationControl; |
|
1068 status = iFactory->DeleteEffectControl(tempCtrl); |
|
1069 iMDistanceAttenuationControl = NULL; |
|
1070 } |
|
1071 break; |
|
1072 } |
|
1073 case ELISTDOPPCONTROL: |
|
1074 { |
|
1075 if ( iMListenerDopplerControl ) |
|
1076 { |
|
1077 tempCtrl = iMListenerDopplerControl; |
|
1078 status = iFactory->DeleteEffectControl(tempCtrl); |
|
1079 iMListenerDopplerControl = NULL; |
|
1080 } |
|
1081 break; |
|
1082 } |
|
1083 case ESOURDOPPCONTROL: |
|
1084 { |
|
1085 if ( iMSourceDopplerControl ) |
|
1086 { |
|
1087 tempCtrl = iMSourceDopplerControl; |
|
1088 status = iFactory->DeleteEffectControl(tempCtrl); |
|
1089 iMSourceDopplerControl = NULL; |
|
1090 } |
|
1091 break; |
|
1092 } |
|
1093 case ELISTLOCCONTROL: |
|
1094 { |
|
1095 if ( iMListenerLocationControl ) |
|
1096 { |
|
1097 tempCtrl = iMListenerLocationControl; |
|
1098 status = iFactory->DeleteEffectControl(tempCtrl); |
|
1099 iMListenerLocationControl = NULL; |
|
1100 } |
|
1101 break; |
|
1102 } |
|
1103 case ESOURLOCCONTROL: |
|
1104 { |
|
1105 if ( iMSourceLocationControl ) |
|
1106 { |
|
1107 tempCtrl = iMSourceLocationControl; |
|
1108 status = iFactory->DeleteEffectControl(tempCtrl); |
|
1109 iMSourceLocationControl = NULL; |
|
1110 } |
|
1111 break; |
|
1112 } |
|
1113 case ELISTORIENTCONTROL: |
|
1114 { |
|
1115 if ( iMListenerOrientationControl ) |
|
1116 { |
|
1117 tempCtrl = iMListenerOrientationControl; |
|
1118 status = iFactory->DeleteEffectControl(tempCtrl); |
|
1119 iMListenerOrientationControl = NULL; |
|
1120 } |
|
1121 break; |
|
1122 } |
|
1123 case ESOURORIENTCONTROL: |
|
1124 { |
|
1125 if ( iMSourceOrientationControl ) |
|
1126 { |
|
1127 tempCtrl = iMSourceOrientationControl; |
|
1128 status = iFactory->DeleteEffectControl(tempCtrl); |
|
1129 iMSourceOrientationControl = NULL; |
|
1130 } |
|
1131 break; |
|
1132 } |
|
1133 } |
|
1134 if (status == KErrNone) |
|
1135 { |
|
1136 iLog->Log(_L("DeleteEffectControl OK")); |
|
1137 } |
|
1138 else |
|
1139 { |
|
1140 iLog->Log(_L("DeleteEffectControl FAILED [%d]"),status); |
|
1141 } |
|
1142 iLog->Log(_L("DeleteEffect END[%d]"),object); |
|
1143 |
|
1144 return status; |
|
1145 } |
|
1146 |
|
1147 TInt CEnhanMediaTestClass::CreateEffect(CStifItemParser& aItem) |
|
1148 { |
|
1149 //AddExpectedEvent(EECreateEffect,KShortTimeout); |
|
1150 TInt object; |
|
1151 TInt status = KErrNone; |
|
1152 MEffectControl* tempCtrl; |
|
1153 aItem.GetNextInt(object); |
|
1154 iLog->Log(_L("CreateEffect INIT[%d]"),object); |
|
1155 |
|
1156 switch(object) |
|
1157 { |
|
1158 case EVOLUMECONTROL: |
|
1159 { |
|
1160 status = iFactory->CreateEffectControl( KVolumeEffectControl, tempCtrl ); |
|
1161 if(status == KErrNone) |
|
1162 { |
|
1163 iMVolumeControl = static_cast<MVolumeControl*> (tempCtrl); |
|
1164 } |
|
1165 break; |
|
1166 } |
|
1167 case EBALANCECONTROL: |
|
1168 { |
|
1169 status = iFactory->CreateEffectControl( KBalanceEffectControl, tempCtrl ); |
|
1170 if(status == KErrNone) |
|
1171 { |
|
1172 iMBalanceControl = static_cast<MBalanceControl*> (tempCtrl); |
|
1173 } |
|
1174 break; |
|
1175 } |
|
1176 case EEQUALIZERCONTROL: |
|
1177 { |
|
1178 status = iFactory->CreateEffectControl( KEqualizerEffectControl, tempCtrl ); |
|
1179 if(status == KErrNone) |
|
1180 { |
|
1181 iMEqualizerControl = static_cast<MEqualizerControl*> (tempCtrl); |
|
1182 } |
|
1183 break; |
|
1184 } |
|
1185 case EREVERBCONTROL: |
|
1186 { |
|
1187 status = iFactory->CreateEffectControl( KReverbEffectControl, tempCtrl ); |
|
1188 if(status == KErrNone) |
|
1189 { |
|
1190 iMReverbControl = static_cast<MReverbControl*> (tempCtrl); |
|
1191 } |
|
1192 break; |
|
1193 } |
|
1194 |
|
1195 case EBASSBOOSTCONTROL: |
|
1196 { |
|
1197 status = iFactory->CreateEffectControl( KBassBoostEffectControl, tempCtrl ); |
|
1198 if(status == KErrNone) |
|
1199 { |
|
1200 iMBassBoostControl = static_cast<MBassBoostControl*> (tempCtrl); |
|
1201 } |
|
1202 break; |
|
1203 } |
|
1204 |
|
1205 case ESTEREOWIDCONTROL: |
|
1206 { |
|
1207 status = iFactory->CreateEffectControl( KStereoWideningEffectControl, tempCtrl ); |
|
1208 if(status == KErrNone) |
|
1209 { |
|
1210 iMStereoWideningControl = static_cast<MStereoWideningControl*> (tempCtrl); |
|
1211 } |
|
1212 break; |
|
1213 } |
|
1214 |
|
1215 |
|
1216 case ELOUDNESSCONTROL: |
|
1217 { |
|
1218 status = iFactory->CreateEffectControl( KLoudnessEffectControl, tempCtrl ); |
|
1219 if(status == KErrNone) |
|
1220 { |
|
1221 iMLoudnessControl = static_cast<MLoudnessControl*> (tempCtrl); |
|
1222 } |
|
1223 break; |
|
1224 } |
|
1225 |
|
1226 |
|
1227 case EROOMLEVELCONTROL: |
|
1228 { |
|
1229 status = iFactory->CreateEffectControl( KRoomLevelEffectControl, tempCtrl ); |
|
1230 if(status == KErrNone) |
|
1231 { |
|
1232 iMRoomLevelControl = static_cast<MRoomLevelControl*> (tempCtrl); |
|
1233 } |
|
1234 break; |
|
1235 } |
|
1236 |
|
1237 |
|
1238 case EDISTATTCONTROL: |
|
1239 { |
|
1240 status = iFactory->CreateEffectControl( KDistanceAttenuationEffectControl, tempCtrl ); |
|
1241 if(status == KErrNone) |
|
1242 { |
|
1243 iMDistanceAttenuationControl = static_cast<MDistanceAttenuationControl*> (tempCtrl); |
|
1244 } |
|
1245 break; |
|
1246 } |
|
1247 |
|
1248 case ELISTDOPPCONTROL: |
|
1249 { |
|
1250 status = iFactory->CreateEffectControl( KListenerDopplerEffectControl, tempCtrl ); |
|
1251 if(status == KErrNone) |
|
1252 { |
|
1253 iMListenerDopplerControl = static_cast<MListenerDopplerControl*> (tempCtrl); |
|
1254 } |
|
1255 break; |
|
1256 } |
|
1257 |
|
1258 |
|
1259 case ESOURDOPPCONTROL: |
|
1260 { |
|
1261 status = iFactory->CreateEffectControl( KSourceDopplerEffectControl, tempCtrl ); |
|
1262 if(status == KErrNone) |
|
1263 { |
|
1264 iMSourceDopplerControl = static_cast<MSourceDopplerControl*> (tempCtrl); |
|
1265 } |
|
1266 break; |
|
1267 } |
|
1268 |
|
1269 |
|
1270 case ELISTLOCCONTROL: |
|
1271 { |
|
1272 status = iFactory->CreateEffectControl( KListenerLocationEffectControl, tempCtrl ); |
|
1273 if(status == KErrNone) |
|
1274 { |
|
1275 iMListenerLocationControl = static_cast<MListenerLocationControl*> (tempCtrl); |
|
1276 } |
|
1277 break; |
|
1278 } |
|
1279 |
|
1280 case ESOURLOCCONTROL: |
|
1281 { |
|
1282 status = iFactory->CreateEffectControl( KSourceLocationEffectControl, tempCtrl ); |
|
1283 if(status == KErrNone) |
|
1284 { |
|
1285 iMSourceLocationControl = static_cast<MSourceLocationControl*> (tempCtrl); |
|
1286 } |
|
1287 break; |
|
1288 } |
|
1289 |
|
1290 |
|
1291 case ELISTORIENTCONTROL: |
|
1292 { |
|
1293 status = iFactory->CreateEffectControl( KListenerOrientationEffectControl, tempCtrl ); |
|
1294 if(status == KErrNone) |
|
1295 { |
|
1296 iMListenerOrientationControl = static_cast<MListenerOrientationControl*> (tempCtrl); |
|
1297 } |
|
1298 break; |
|
1299 } |
|
1300 |
|
1301 |
|
1302 case ESOURORIENTCONTROL: |
|
1303 { |
|
1304 status = iFactory->CreateEffectControl( KSourceOrientationEffectControl, tempCtrl ); |
|
1305 if(status == KErrNone) |
|
1306 { |
|
1307 iMSourceOrientationControl = static_cast<MSourceOrientationControl*> (tempCtrl); |
|
1308 } |
|
1309 break; |
|
1310 } |
|
1311 default: |
|
1312 break; |
|
1313 }; |
|
1314 if (status == KErrNone) |
|
1315 { |
|
1316 iLog->Log(_L("CreateEffect OK")); |
|
1317 } |
|
1318 else |
|
1319 { |
|
1320 iLog->Log(_L("CreateEffect FAILED [%d]"),status); |
|
1321 } |
|
1322 |
|
1323 //ProcessEvent(ECreateEffect, error); |
|
1324 return status; |
|
1325 } |
|
1326 |
|
1327 TInt CEnhanMediaTestClass::StreamAddEffect(CStifItemParser& aItem) |
|
1328 { |
|
1329 AddExpectedEvent(EEStreamAddEffect,KShortTimeout); |
|
1330 TInt status(KErrNotReady); |
|
1331 TInt object; |
|
1332 aItem.GetNextInt(object); |
|
1333 iLog->Log(_L("StreamAddEffect INIT [%d]"),object); |
|
1334 |
|
1335 switch(object) |
|
1336 { |
|
1337 case EVOLUMECONTROL: |
|
1338 { |
|
1339 iEffectControl = iMVolumeControl; |
|
1340 } |
|
1341 break; |
|
1342 case EBALANCECONTROL: |
|
1343 { |
|
1344 iEffectControl = iMBalanceControl; |
|
1345 } |
|
1346 break; |
|
1347 case EEQUALIZERCONTROL: |
|
1348 { |
|
1349 iEffectControl = iMEqualizerControl; |
|
1350 } |
|
1351 break; |
|
1352 case EREVERBCONTROL: |
|
1353 { |
|
1354 iEffectControl = iMReverbControl; |
|
1355 } |
|
1356 break; |
|
1357 |
|
1358 case EBASSBOOSTCONTROL: |
|
1359 { |
|
1360 iEffectControl = iMBassBoostControl; |
|
1361 } |
|
1362 break; |
|
1363 |
|
1364 |
|
1365 case ESTEREOWIDCONTROL: |
|
1366 { |
|
1367 iEffectControl = iMStereoWideningControl; |
|
1368 } |
|
1369 break; |
|
1370 |
|
1371 |
|
1372 case ELOUDNESSCONTROL: |
|
1373 { |
|
1374 iEffectControl = iMLoudnessControl; |
|
1375 } |
|
1376 break; |
|
1377 |
|
1378 |
|
1379 case EROOMLEVELCONTROL: |
|
1380 { |
|
1381 iEffectControl = iMRoomLevelControl; |
|
1382 } |
|
1383 break; |
|
1384 |
|
1385 |
|
1386 case EDISTATTCONTROL: |
|
1387 { |
|
1388 iEffectControl = iMDistanceAttenuationControl; |
|
1389 } |
|
1390 break; |
|
1391 |
|
1392 |
|
1393 case ELISTDOPPCONTROL: |
|
1394 { |
|
1395 iEffectControl = iMListenerDopplerControl; |
|
1396 } |
|
1397 break; |
|
1398 |
|
1399 |
|
1400 case ESOURDOPPCONTROL: |
|
1401 { |
|
1402 iEffectControl = iMSourceDopplerControl; |
|
1403 } |
|
1404 break; |
|
1405 |
|
1406 |
|
1407 case ELISTLOCCONTROL: |
|
1408 { |
|
1409 iEffectControl = iMListenerLocationControl; |
|
1410 } |
|
1411 break; |
|
1412 |
|
1413 |
|
1414 case ESOURLOCCONTROL: |
|
1415 { |
|
1416 iEffectControl = iMSourceLocationControl; |
|
1417 } |
|
1418 break; |
|
1419 |
|
1420 |
|
1421 case ELISTORIENTCONTROL: |
|
1422 { |
|
1423 iEffectControl = iMListenerOrientationControl; |
|
1424 } |
|
1425 break; |
|
1426 |
|
1427 |
|
1428 case ESOURORIENTCONTROL: |
|
1429 { |
|
1430 iEffectControl = iMSourceOrientationControl; |
|
1431 } |
|
1432 break; |
|
1433 |
|
1434 } |
|
1435 status = iMStreamControl->AddEffect(*iEffectControl); |
|
1436 if (status == KErrNone) |
|
1437 { |
|
1438 iLog->Log(_L("AddEffect OK")); |
|
1439 } |
|
1440 else |
|
1441 { |
|
1442 iLog->Log(_L("AddEffect FAILED [%d]"),status); |
|
1443 } |
|
1444 iLog->Log(_L("StreamAddEffect END [%d]"),object); |
|
1445 |
|
1446 //ProcessEvent(EEStreamAddEffect, status); |
|
1447 return status; |
|
1448 } |
|
1449 |
|
1450 TInt CEnhanMediaTestClass::AttachReverb (CStifItemParser& /*aItem*/) |
|
1451 { |
|
1452 iLog->Log(_L("CEnhanMediaTestClass::AttachReverb BEGIN")); |
|
1453 TInt status(KErrNotReady); |
|
1454 |
|
1455 if (iMReverbControl && iMRoomLevelControl) |
|
1456 { |
|
1457 status = iMRoomLevelControl->AttachReverb ( *iMReverbControl ); |
|
1458 } |
|
1459 |
|
1460 if (status == KErrNone) |
|
1461 { |
|
1462 iLog->Log(_L("CEnhanMediaTestClass::AttachReverb OK")); |
|
1463 } |
|
1464 else |
|
1465 { |
|
1466 iLog->Log(_L("CEnhanMediaTestClass::AttachReverb FAILED [%d]"),status); |
|
1467 } |
|
1468 |
|
1469 iLog->Log(_L("CEnhanMediaTestClass::AttachReverb END")); |
|
1470 return status; |
|
1471 } |
|
1472 |
|
1473 TInt CEnhanMediaTestClass::DetachReverb(CStifItemParser& /*aItem*/) |
|
1474 { |
|
1475 iLog->Log(_L("CEnhanMediaTestClass::DetachReverb BEGIN")); |
|
1476 TInt status(KErrNotReady); |
|
1477 |
|
1478 if (iMReverbControl && iMRoomLevelControl) |
|
1479 { |
|
1480 status = iMRoomLevelControl->DetachReverb( *iMReverbControl ); |
|
1481 } |
|
1482 |
|
1483 if (status == KErrNone) |
|
1484 { |
|
1485 iLog->Log(_L("CEnhanMediaTestClass::DetachReverb OK")); |
|
1486 } |
|
1487 else |
|
1488 { |
|
1489 iLog->Log(_L("CEnhanMediaTestClass::DetachReverb FAILED [%d]"),status); |
|
1490 } |
|
1491 |
|
1492 iLog->Log(_L("CEnhanMediaTestClass::DetachReverb END ")); |
|
1493 return status; |
|
1494 } |
|
1495 |
|
1496 TInt CEnhanMediaTestClass::AddObserver(CStifItemParser& aItem) |
|
1497 { |
|
1498 //AddExpectedEvent(EEObserver,KMediumTimeout); |
|
1499 TInt object; |
|
1500 TInt status = KErrNone; |
|
1501 aItem.GetNextInt(object); |
|
1502 iLog->Log(_L(" AddObserver = [%d]"),object); |
|
1503 switch(object) |
|
1504 { |
|
1505 case EFILESOURCE: |
|
1506 { |
|
1507 if(iMFileSource) |
|
1508 { |
|
1509 iMFileSource->AddObserver(*this); |
|
1510 } |
|
1511 else |
|
1512 { |
|
1513 status = KErrNotFound; |
|
1514 } |
|
1515 break; |
|
1516 } |
|
1517 case EDATABUFFERSOURCE: |
|
1518 { |
|
1519 if(iMDataBufferSource) |
|
1520 { |
|
1521 iMDataBufferSource->AddObserver(*this); |
|
1522 } |
|
1523 else |
|
1524 { |
|
1525 status = KErrNotFound; |
|
1526 } |
|
1527 break; |
|
1528 } |
|
1529 case EDESCRIPTORSOURCE: |
|
1530 { |
|
1531 if(iMDescriptorSource) |
|
1532 { |
|
1533 iMDescriptorSource->AddObserver(*this); |
|
1534 } |
|
1535 else |
|
1536 { |
|
1537 status = KErrNotFound; |
|
1538 } |
|
1539 break; |
|
1540 } |
|
1541 case ESTREAMCONTROL: |
|
1542 { |
|
1543 if(iMStreamControl) |
|
1544 { |
|
1545 iMStreamControl->AddObserver(*this); |
|
1546 } |
|
1547 else |
|
1548 { |
|
1549 status = KErrNotFound; |
|
1550 } |
|
1551 break; |
|
1552 } |
|
1553 case EMMFAUDIOOUTPUTSINKCONTROL: |
|
1554 { |
|
1555 if(iMAudioSink) |
|
1556 { |
|
1557 iMAudioSink->AddObserver(*this); |
|
1558 } |
|
1559 else |
|
1560 { |
|
1561 status = KErrNotFound; |
|
1562 } |
|
1563 break; |
|
1564 } |
|
1565 case EPDLSOURCE: |
|
1566 { |
|
1567 if(iMProgDLSource) |
|
1568 { |
|
1569 iMProgDLSource->AddObserver(*this); |
|
1570 } |
|
1571 else |
|
1572 { |
|
1573 status = KErrNotFound; |
|
1574 } |
|
1575 break; |
|
1576 } |
|
1577 case EVOLUMECONTROL: |
|
1578 { |
|
1579 if(iMVolumeControl) |
|
1580 { |
|
1581 iMVolumeControl->AddObserver(*this); |
|
1582 } |
|
1583 else |
|
1584 { |
|
1585 status = KErrNotFound; |
|
1586 } |
|
1587 break; |
|
1588 } |
|
1589 case EBALANCECONTROL: |
|
1590 { |
|
1591 if(iMBalanceControl) |
|
1592 { |
|
1593 iMBalanceControl->AddObserver(*this); |
|
1594 } |
|
1595 else |
|
1596 { |
|
1597 status = KErrNotFound; |
|
1598 } |
|
1599 break; |
|
1600 } |
|
1601 case EEQUALIZERCONTROL: |
|
1602 { |
|
1603 if(iMEqualizerControl) |
|
1604 { |
|
1605 iMEqualizerControl->AddObserver(*this); |
|
1606 } |
|
1607 else |
|
1608 { |
|
1609 status = KErrNotFound; |
|
1610 } |
|
1611 break; |
|
1612 } |
|
1613 |
|
1614 case EREVERBCONTROL: |
|
1615 { |
|
1616 if(iMReverbControl) |
|
1617 { |
|
1618 iMReverbControl->AddObserver(*this); |
|
1619 } |
|
1620 else |
|
1621 { |
|
1622 status = KErrNotFound; |
|
1623 } |
|
1624 break; |
|
1625 } |
|
1626 |
|
1627 case EBASSBOOSTCONTROL: |
|
1628 { |
|
1629 if(iMBassBoostControl) |
|
1630 { |
|
1631 iMBassBoostControl->AddObserver(*this); |
|
1632 } |
|
1633 else |
|
1634 { |
|
1635 status = KErrNotFound; |
|
1636 } |
|
1637 break; |
|
1638 } |
|
1639 |
|
1640 case ESTEREOWIDCONTROL: |
|
1641 { |
|
1642 if(iMStereoWideningControl) |
|
1643 { |
|
1644 iMStereoWideningControl->AddObserver(*this); |
|
1645 } |
|
1646 else |
|
1647 { |
|
1648 status = KErrNotFound; |
|
1649 } |
|
1650 break; |
|
1651 } |
|
1652 |
|
1653 case ELOUDNESSCONTROL: |
|
1654 { |
|
1655 if(iMLoudnessControl) |
|
1656 { |
|
1657 iMLoudnessControl->AddObserver(*this); |
|
1658 } |
|
1659 else |
|
1660 { |
|
1661 status = KErrNotFound; |
|
1662 } |
|
1663 break; |
|
1664 } |
|
1665 |
|
1666 case EROOMLEVELCONTROL: |
|
1667 { |
|
1668 if(iMRoomLevelControl) |
|
1669 { |
|
1670 iMRoomLevelControl->AddObserver(*this); |
|
1671 } |
|
1672 else |
|
1673 { |
|
1674 status = KErrNotFound; |
|
1675 } |
|
1676 break; |
|
1677 } |
|
1678 |
|
1679 case EDISTATTCONTROL: |
|
1680 { |
|
1681 if(iMDistanceAttenuationControl) |
|
1682 { |
|
1683 iMDistanceAttenuationControl->AddObserver(*this); |
|
1684 } |
|
1685 else |
|
1686 { |
|
1687 status = KErrNotFound; |
|
1688 } |
|
1689 break; |
|
1690 } |
|
1691 |
|
1692 case ELISTDOPPCONTROL: |
|
1693 { |
|
1694 if(iMListenerDopplerControl) |
|
1695 { |
|
1696 iMListenerDopplerControl->AddObserver(*this); |
|
1697 } |
|
1698 else |
|
1699 { |
|
1700 status = KErrNotFound; |
|
1701 } |
|
1702 break; |
|
1703 } |
|
1704 |
|
1705 case ESOURDOPPCONTROL: |
|
1706 { |
|
1707 if(iMSourceDopplerControl) |
|
1708 { |
|
1709 iMSourceDopplerControl->AddObserver(*this); |
|
1710 } |
|
1711 else |
|
1712 { |
|
1713 status = KErrNotFound; |
|
1714 } |
|
1715 break; |
|
1716 } |
|
1717 case ELISTLOCCONTROL: |
|
1718 { |
|
1719 if(iMListenerLocationControl) |
|
1720 { |
|
1721 iMListenerLocationControl->AddObserver(*this); |
|
1722 } |
|
1723 else |
|
1724 { |
|
1725 status = KErrNotFound; |
|
1726 } |
|
1727 break; |
|
1728 } |
|
1729 |
|
1730 case ESOURLOCCONTROL: |
|
1731 { |
|
1732 if(iMSourceLocationControl) |
|
1733 { |
|
1734 iMSourceLocationControl->AddObserver(*this); |
|
1735 } |
|
1736 else |
|
1737 { |
|
1738 status = KErrNotFound; |
|
1739 } |
|
1740 break; |
|
1741 } |
|
1742 |
|
1743 case ELISTORIENTCONTROL: |
|
1744 { |
|
1745 if(iMListenerOrientationControl) |
|
1746 { |
|
1747 iMListenerOrientationControl->AddObserver(*this); |
|
1748 } |
|
1749 else |
|
1750 { |
|
1751 status = KErrNotFound; |
|
1752 } |
|
1753 break; |
|
1754 } |
|
1755 case ESOURORIENTCONTROL: |
|
1756 { |
|
1757 if(iMSourceOrientationControl) |
|
1758 { |
|
1759 iMSourceOrientationControl->AddObserver(*this); |
|
1760 } |
|
1761 else |
|
1762 { |
|
1763 status = KErrNotFound; |
|
1764 } |
|
1765 break; |
|
1766 } |
|
1767 default: |
|
1768 break; |
|
1769 }; |
|
1770 |
|
1771 iLog->Log(_L("AddObserver OK [%d]"),status); |
|
1772 return status; |
|
1773 } |
|
1774 |
|
1775 TInt CEnhanMediaTestClass::FileGenOpen(CStifItemParser& /*aItem*/) |
|
1776 { |
|
1777 //AddExpectedEvent(EEFileSOpen,KMediumTimeout); |
|
1778 TInt status(KErrNotReady); |
|
1779 TFileName fileName; |
|
1780 fileName.Copy(KTagFileTest); |
|
1781 if(iFileName) |
|
1782 { |
|
1783 delete iFileName; |
|
1784 iFileName = NULL; |
|
1785 } |
|
1786 iFileName = HBufC::NewL(fileName.Length()); |
|
1787 iFileName->Des().Copy(fileName); |
|
1788 |
|
1789 |
|
1790 iFs.Connect(); |
|
1791 iIsEOFReached = EFalse; |
|
1792 status = iFile.Open(iFs,*iFileName,EFileShareReadersOnly); |
|
1793 if (status == KErrNone) |
|
1794 { |
|
1795 iLog->Log(_L("CEnhanMediaTestClass::FileGenOpen = %d"), status); |
|
1796 } |
|
1797 else |
|
1798 { |
|
1799 iLog->Log(_L("CEnhanMediaTestClass::FileGenOpen ERROR = [%d]"), status); |
|
1800 } |
|
1801 //ProcessEvent(EEFileSOpen, status); |
|
1802 return status; |
|
1803 } |
|
1804 |
|
1805 TInt CEnhanMediaTestClass::DBSMinBufSize(CStifItemParser& /*aItem*/) |
|
1806 { |
|
1807 TInt status(KErrNotReady); |
|
1808 TUint bufferSize =0; |
|
1809 if(!iMDataBufferSource) |
|
1810 { |
|
1811 status = KErrNotReady; |
|
1812 } |
|
1813 else |
|
1814 { |
|
1815 status = iMDataBufferSource->GetMinimumBufferSize(bufferSize); |
|
1816 } |
|
1817 if (status == KErrNone) |
|
1818 { |
|
1819 iLog->Log(_L("iMDataBufferSource->GetMinimumBufferSize = [%d]"), bufferSize); |
|
1820 } |
|
1821 else |
|
1822 { |
|
1823 iLog->Log(_L("iMDataBufferSource->GetMinimumBufferSize ERROR = [%d]"), status); |
|
1824 } |
|
1825 return status; |
|
1826 } |
|
1827 |
|
1828 TInt CEnhanMediaTestClass::CreateDataBuffer(CStifItemParser& aItem) |
|
1829 { |
|
1830 AddExpectedEvent(EEDataBuffer,KMediumTimeout); |
|
1831 |
|
1832 TInt status(KErrNone); |
|
1833 TInt bufferSize = 0; |
|
1834 TInt numBuffers = 0; |
|
1835 |
|
1836 status = aItem.GetNextInt(bufferSize); |
|
1837 if ( status != KErrNone ) |
|
1838 { |
|
1839 iLog->Log(_L("CreateDataBuffer Missing Argument Buffer Size in config file ")); |
|
1840 return status; |
|
1841 } |
|
1842 status = aItem.GetNextInt(numBuffers); |
|
1843 |
|
1844 if ( status != KErrNone ) |
|
1845 { |
|
1846 iLog->Log(_L("CreateDataBuffer Missing Argument NumberOfBuffers in config file ")); |
|
1847 return status; |
|
1848 } |
|
1849 |
|
1850 MDataBuffer* buffer; |
|
1851 iBuffers.ResetAndDestroy(); |
|
1852 iAvailable.Reset(); |
|
1853 |
|
1854 for (int i = 0; i < numBuffers; i++ ) |
|
1855 { |
|
1856 status = iFactory->CreateDataBuffer(KDataBufferSourceControl,bufferSize,buffer); |
|
1857 if(status == KErrNone) |
|
1858 { |
|
1859 status = iBuffers.Append(buffer); |
|
1860 buffer = NULL; |
|
1861 iAvailable.AppendL(ETrue); |
|
1862 } |
|
1863 else |
|
1864 { |
|
1865 break; |
|
1866 } |
|
1867 } |
|
1868 return status; |
|
1869 } |
|
1870 |
|
1871 TInt CEnhanMediaTestClass::FileSOpen(CStifItemParser& /*aItem*/) |
|
1872 { |
|
1873 //AddExpectedEvent(EEFileSOpen,KMediumTimeout); |
|
1874 TInt status(KErrNotReady); |
|
1875 TFileName fileName; |
|
1876 TBuf8<256> mimeType; |
|
1877 |
|
1878 fileName.Copy(KTagFileTest); |
|
1879 mimeType.Copy(KTagMimeType); |
|
1880 |
|
1881 if(!iMFileSource) |
|
1882 { |
|
1883 return KErrNotReady; |
|
1884 } |
|
1885 if(iFileName) |
|
1886 { |
|
1887 delete iFileName; |
|
1888 iFileName = NULL; |
|
1889 } |
|
1890 iFileName = HBufC::NewL(fileName.Length()); |
|
1891 iFileName->Des().Copy(fileName); |
|
1892 iMimeType = HBufC8::NewL(mimeType.Length()); |
|
1893 iMimeType->Des().Copy(mimeType); |
|
1894 status = iMFileSource->Open(*iFileName,*iMimeType); |
|
1895 if (status == KErrNone) |
|
1896 { |
|
1897 iLog->Log(_L("CEnhanMediaTestClass::FileSOpen = %d"), status); |
|
1898 } |
|
1899 else |
|
1900 { |
|
1901 iLog->Log(_L("CEnhanMediaTestClass::FileSOpen ERROR = [%d]"), status); |
|
1902 } |
|
1903 //ProcessEvent(EEFileSOpen, status); |
|
1904 return status; |
|
1905 } |
|
1906 |
|
1907 TInt CEnhanMediaTestClass::DescSOpen(CStifItemParser& /*aItem*/) |
|
1908 { |
|
1909 //AddExpectedEvent(EEFileSOpen,KMediumTimeout); |
|
1910 TInt status(KErrNotReady); |
|
1911 TBuf8<256> mimeType; |
|
1912 mimeType.Copy(KTagMimeType); |
|
1913 if(!iMDescriptorSource) |
|
1914 { |
|
1915 status = KErrNotReady; |
|
1916 return status; |
|
1917 } |
|
1918 |
|
1919 if(iMimeType) |
|
1920 { |
|
1921 delete iMimeType; |
|
1922 iMimeType = NULL; |
|
1923 } |
|
1924 |
|
1925 iMimeType = HBufC8::NewL(mimeType.Length()); |
|
1926 iMimeType->Des().Copy(mimeType); |
|
1927 |
|
1928 TInt size = 0; |
|
1929 iFile.Size(size); |
|
1930 if(iDescData) |
|
1931 { |
|
1932 delete iDescData; |
|
1933 iDescData = NULL; |
|
1934 } |
|
1935 |
|
1936 iDescData = HBufC8::NewLC(size); |
|
1937 TPtr8 des = iDescData->Des(); |
|
1938 iFile.Read(des); |
|
1939 |
|
1940 status = iMDescriptorSource->Open(*iMimeType,*iDescData); |
|
1941 CleanupStack::Pop(iDescData); |
|
1942 |
|
1943 if (status == KErrNone) |
|
1944 { |
|
1945 iLog->Log(_L("CEnhanMediaTestClass::FileSOpenL = %d"), status); |
|
1946 } |
|
1947 else |
|
1948 { |
|
1949 iLog->Log(_L("CEnhanMediaTestClass::FileSOpenL ERROR = [%d]"), status); |
|
1950 } |
|
1951 //ProcessEvent(EEFileSOpen, status); |
|
1952 return status; |
|
1953 } |
|
1954 |
|
1955 TInt CEnhanMediaTestClass::DBSSetSize(CStifItemParser& aItem) |
|
1956 { |
|
1957 TInt status(KErrNone); |
|
1958 TInt size = 0; |
|
1959 status = aItem.GetNextInt(size); |
|
1960 if(!iMDataBufferSource) |
|
1961 { |
|
1962 status = KErrNotReady; |
|
1963 } |
|
1964 else |
|
1965 { |
|
1966 status = iMDataBufferSource->SetSize(size); |
|
1967 } |
|
1968 if (status == KErrNone) |
|
1969 { |
|
1970 iLog->Log(_L("DBSSetSize = %d"), status); |
|
1971 } |
|
1972 else |
|
1973 { |
|
1974 iLog->Log(_L("DBSSetSize ERROR = [%d]"), status); |
|
1975 } |
|
1976 return status; |
|
1977 } |
|
1978 |
|
1979 TInt CEnhanMediaTestClass::DBSOpen(CStifItemParser& aItem) |
|
1980 { |
|
1981 iLog->Log(_L(" CEnhanMediaTestClass::DBSOpen(")); |
|
1982 AddExpectedEvent(EEDBSOpen,KMediumTimeout); |
|
1983 TInt status(KErrNotReady); |
|
1984 TBuf8<256> mimeType; |
|
1985 TPtrC string; |
|
1986 //mimeType.Copy(KTagMimeType); |
|
1987 |
|
1988 |
|
1989 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
1990 status = aItem.GetNextString ( string ); |
|
1991 if ( status != KErrNone ) |
|
1992 { |
|
1993 iLog->Log(_L("CHelixSTIFClient:: MimeType missing in config file ")); |
|
1994 return status; |
|
1995 } |
|
1996 else |
|
1997 { |
|
1998 mimeType.Copy(string); |
|
1999 } |
|
2000 |
|
2001 |
|
2002 if(!iMDataBufferSource) |
|
2003 { |
|
2004 return status = KErrNotReady; |
|
2005 } |
|
2006 |
|
2007 |
|
2008 if(iMimeType) |
|
2009 { |
|
2010 delete iMimeType; |
|
2011 iMimeType = NULL; |
|
2012 } |
|
2013 |
|
2014 iMimeType = HBufC8::NewL(mimeType.Length()); |
|
2015 iMimeType->Des().Copy(mimeType); |
|
2016 |
|
2017 MDataBuffer* headerData(NULL); |
|
2018 status = iMDataBufferSource->Open(*iMimeType,*headerData); |
|
2019 |
|
2020 if (status == KErrNone) |
|
2021 { |
|
2022 iLog->Log(_L("CEnhanMediaTestClass::FileSOpenL = %d"), status); |
|
2023 } |
|
2024 else |
|
2025 { |
|
2026 iLog->Log(_L("CEnhanMediaTestClass::FileSOpenL ERROR = [%d]"), status); |
|
2027 } |
|
2028 //ProcessEvent(EEFileSOpen, status); |
|
2029 iLog->Log(_L(" CEnhanMediaTestClass::DBSOpen END")); |
|
2030 return status; |
|
2031 } |
|
2032 TInt CEnhanMediaTestClass::StreamRemoveSource(CStifItemParser& aItem) |
|
2033 { |
|
2034 //AddExpectedEvent(EEAddSource,KShortTimeout); |
|
2035 TInt status(KErrNone); |
|
2036 TInt controlType; |
|
2037 aItem.GetNextInt(controlType); |
|
2038 iLog->Log(_L(" CEnhanMediaTestClass::StreamRemoveSource INIT [%d]"),controlType); |
|
2039 switch(controlType) |
|
2040 { |
|
2041 case EFILESOURCE: |
|
2042 { |
|
2043 iSourceControl = iMFileSource; |
|
2044 } |
|
2045 break; |
|
2046 case EDATABUFFERSOURCE: |
|
2047 { |
|
2048 iSourceControl = iMDataBufferSource; |
|
2049 } |
|
2050 break; |
|
2051 case EDESCRIPTORSOURCE: |
|
2052 { |
|
2053 iSourceControl = iMDescriptorSource; |
|
2054 } |
|
2055 break; |
|
2056 case EPDLSOURCE: |
|
2057 { |
|
2058 iSourceControl = iMProgDLSource; |
|
2059 } |
|
2060 break; |
|
2061 } |
|
2062 |
|
2063 status = iMStreamControl->RemoveSource(*iSourceControl); |
|
2064 if (status == KErrNone) |
|
2065 { |
|
2066 iLog->Log(_L("RemoveSource = %d"), status); |
|
2067 } |
|
2068 else |
|
2069 { |
|
2070 iLog->Log(_L("StreamRemoveSource ERROR = [%d]"), status); |
|
2071 } |
|
2072 //ProcessEvent(EStreamAddSource, status); |
|
2073 iLog->Log(_L(" CEnhanMediaTestClass::StreamRemoveSource END [%d]"),controlType); |
|
2074 return status; |
|
2075 } |
|
2076 |
|
2077 TInt CEnhanMediaTestClass::StreamAddSource(CStifItemParser& aItem) |
|
2078 { |
|
2079 //AddExpectedEvent(EEAddSource,KShortTimeout); |
|
2080 TInt status(KErrNone); |
|
2081 TInt controlType; |
|
2082 aItem.GetNextInt(controlType); |
|
2083 iLog->Log(_L(" CEnhanMediaTestClass::StreamAddSource INIT [%d]"),controlType); |
|
2084 switch(controlType) |
|
2085 { |
|
2086 case EFILESOURCE: |
|
2087 { |
|
2088 iSourceControl = iMFileSource; |
|
2089 } |
|
2090 break; |
|
2091 case EDATABUFFERSOURCE: |
|
2092 { |
|
2093 iSourceControl = iMDataBufferSource; |
|
2094 } |
|
2095 break; |
|
2096 case EDESCRIPTORSOURCE: |
|
2097 { |
|
2098 iSourceControl = iMDescriptorSource; |
|
2099 } |
|
2100 break; |
|
2101 case EPDLSOURCE: |
|
2102 { |
|
2103 iSourceControl = iMProgDLSource; |
|
2104 } |
|
2105 break; |
|
2106 } |
|
2107 status = iMStreamControl->AddSource(*iSourceControl); |
|
2108 if (status == KErrNone) |
|
2109 { |
|
2110 iLog->Log(_L("AddSource = %d"), status); |
|
2111 } |
|
2112 else |
|
2113 { |
|
2114 iLog->Log(_L("AddSource ERROR = [%d]"), status); |
|
2115 } |
|
2116 //ProcessEvent(EStreamAddSource, status); |
|
2117 iLog->Log(_L(" CEnhanMediaTestClass::StreamAddSource END [%d]"),controlType); |
|
2118 return status; |
|
2119 } |
|
2120 TInt CEnhanMediaTestClass::StreamAddSink(CStifItemParser& /*aItem*/) |
|
2121 { |
|
2122 //AddExpectedEvent(EEStreamAddSink,KShortTimeout); |
|
2123 iLog->Log(_L(" CEnhanMediaTestClass::StreamAddSink INIT")); |
|
2124 TInt status(KErrNone); |
|
2125 status = iMStreamControl->AddSink(*iMAudioSink); |
|
2126 if (status == KErrNone) |
|
2127 { |
|
2128 iLog->Log(_L("AddSink = %d"), status); |
|
2129 } |
|
2130 else |
|
2131 { |
|
2132 iLog->Log(_L("AddSink ERROR = [%d]"), status); |
|
2133 } |
|
2134 //ProcessEvent(EStreamAddSink, status); |
|
2135 iLog->Log(_L(" CEnhanMediaTestClass::StreamAddSink END")); |
|
2136 |
|
2137 return status; |
|
2138 } |
|
2139 |
|
2140 TInt CEnhanMediaTestClass::StreamRemoveSink(CStifItemParser& /*aItem*/) |
|
2141 { |
|
2142 iLog->Log(_L(" CEnhanMediaTestClass::StreamRemoveSink INIT")); |
|
2143 TInt status(KErrNone); |
|
2144 status = iMStreamControl->RemoveSink(*iMAudioSink); |
|
2145 if (status == KErrNone) |
|
2146 { |
|
2147 iLog->Log(_L("RemoveSink = %d"), status); |
|
2148 } |
|
2149 else |
|
2150 { |
|
2151 iLog->Log(_L("RemoveSink ERROR = [%d]"), status); |
|
2152 } |
|
2153 //ProcessEvent(EStreamAddSink, status); |
|
2154 iLog->Log(_L(" CEnhanMediaTestClass::StreamRemoveSink END")); |
|
2155 |
|
2156 return status; |
|
2157 } |
|
2158 |
|
2159 TInt CEnhanMediaTestClass::StreamOpen(CStifItemParser& /*aItem*/) |
|
2160 { |
|
2161 |
|
2162 //RemoveAllExpectedEvents(); |
|
2163 TInt status(KErrNone); |
|
2164 AddExpectedEvent(EEStreamOpen,KMediumTimeout); |
|
2165 if ( !iMStreamControl ) |
|
2166 { |
|
2167 status = KErrNotReady; |
|
2168 iLog->Log(_L("CEnhanMediaTestClass::StreamOpenL = %d"), status); |
|
2169 } |
|
2170 |
|
2171 status = iMStreamControl->Open(); |
|
2172 if (status == KErrNone) |
|
2173 { |
|
2174 iLog->Log(_L("iMStreamControl->Open() = %d"), status); |
|
2175 } |
|
2176 else |
|
2177 { |
|
2178 iLog->Log(_L("iMStreamControl->Open() ERROR = [%d]"), status); |
|
2179 } |
|
2180 //ProcessEvent(EEStreamOpen, aEventType); |
|
2181 return status; |
|
2182 } |
|
2183 |
|
2184 TInt CEnhanMediaTestClass::StreamClose(CStifItemParser& /*aItem*/) |
|
2185 { |
|
2186 TInt status(KErrNotReady); |
|
2187 TInt state; |
|
2188 state=iMStreamControl->GetState(); |
|
2189 AddExpectedEvent(EEStreamClose,KMediumTimeout); |
|
2190 if ( !iMStreamControl ) |
|
2191 { |
|
2192 status = KErrNotReady; |
|
2193 } |
|
2194 else |
|
2195 { |
|
2196 iLog->Log(_L("iMStreamControl->GetState() = %d"), state); |
|
2197 if (iMProgDLSource) |
|
2198 { |
|
2199 status = iMProgDLSource->Close(); |
|
2200 } |
|
2201 status = iMStreamControl->Close(); |
|
2202 iLog->Log(_L("iMStreamControl->GetState() = %d"), iMStreamControl->GetState()); |
|
2203 |
|
2204 } |
|
2205 if (status == KErrNone) |
|
2206 { |
|
2207 iLog->Log(_L("iMStreamControl->Close = %d"), status); |
|
2208 } |
|
2209 else |
|
2210 { |
|
2211 iLog->Log(_L("iMStreamControl->Close ERROR = [%d]"), status); |
|
2212 } |
|
2213 return status; |
|
2214 } |
|
2215 |
|
2216 TInt CEnhanMediaTestClass::RemoveObserver(CStifItemParser& aItem) |
|
2217 { |
|
2218 TInt status(KErrNone); |
|
2219 TInt controlType; |
|
2220 aItem.GetNextInt(controlType); |
|
2221 iLog->Log(_L("RemoveObserver = [%d]"), controlType); |
|
2222 switch(controlType) |
|
2223 { |
|
2224 case EFILESOURCE: |
|
2225 { |
|
2226 if(iMFileSource) |
|
2227 { |
|
2228 iMFileSource->RemoveObserver(*this); |
|
2229 } |
|
2230 else |
|
2231 { |
|
2232 status = KErrNotFound; |
|
2233 } |
|
2234 break; |
|
2235 } |
|
2236 case EDATABUFFERSOURCE: |
|
2237 { |
|
2238 if(iMDataBufferSource) |
|
2239 { |
|
2240 iMDataBufferSource->RemoveObserver(*this); |
|
2241 } |
|
2242 else |
|
2243 { |
|
2244 status = KErrNotFound; |
|
2245 } |
|
2246 break; |
|
2247 } |
|
2248 case EDESCRIPTORSOURCE: |
|
2249 { |
|
2250 if(iMDescriptorSource) |
|
2251 { |
|
2252 iMDescriptorSource->RemoveObserver(*this); |
|
2253 } |
|
2254 else |
|
2255 { |
|
2256 status = KErrNotFound; |
|
2257 } |
|
2258 break; |
|
2259 } |
|
2260 case ESTREAMCONTROL: |
|
2261 { |
|
2262 if(iMStreamControl) |
|
2263 { |
|
2264 iMStreamControl->RemoveObserver(*this); |
|
2265 } |
|
2266 else |
|
2267 { |
|
2268 status = KErrNotFound; |
|
2269 } |
|
2270 break; |
|
2271 } |
|
2272 case EMMFAUDIOOUTPUTSINKCONTROL: |
|
2273 { |
|
2274 if(iMAudioSink) |
|
2275 { |
|
2276 iMAudioSink->RemoveObserver(*this); |
|
2277 } |
|
2278 else |
|
2279 { |
|
2280 status = KErrNotFound; |
|
2281 } |
|
2282 break; |
|
2283 } |
|
2284 case EPDLSOURCE: |
|
2285 { |
|
2286 if(iMProgDLSource) |
|
2287 { |
|
2288 iMProgDLSource->RemoveObserver(*this); |
|
2289 } |
|
2290 else |
|
2291 { |
|
2292 status = KErrNotFound; |
|
2293 } |
|
2294 break; |
|
2295 } |
|
2296 case EVOLUMECONTROL: |
|
2297 { |
|
2298 if(iMVolumeControl) |
|
2299 { |
|
2300 iMVolumeControl->RemoveObserver(*this); |
|
2301 } |
|
2302 else |
|
2303 { |
|
2304 status = KErrNotFound; |
|
2305 } |
|
2306 break; |
|
2307 } |
|
2308 case EBALANCECONTROL: |
|
2309 { |
|
2310 if(iMBalanceControl) |
|
2311 { |
|
2312 iMBalanceControl->RemoveObserver(*this); |
|
2313 } |
|
2314 else |
|
2315 { |
|
2316 status = KErrNotFound; |
|
2317 } |
|
2318 break; |
|
2319 } |
|
2320 case EEQUALIZERCONTROL: |
|
2321 { |
|
2322 if(iMEqualizerControl) |
|
2323 { |
|
2324 iMEqualizerControl->RemoveObserver(*this); |
|
2325 } |
|
2326 else |
|
2327 { |
|
2328 status = KErrNotFound; |
|
2329 } |
|
2330 break; |
|
2331 } |
|
2332 case EREVERBCONTROL: |
|
2333 { |
|
2334 if(iMReverbControl) |
|
2335 { |
|
2336 iMReverbControl->RemoveObserver(*this); |
|
2337 } |
|
2338 else |
|
2339 { |
|
2340 status = KErrNotFound; |
|
2341 } |
|
2342 break; |
|
2343 } |
|
2344 |
|
2345 case EBASSBOOSTCONTROL: |
|
2346 { |
|
2347 if(iMBassBoostControl) |
|
2348 { |
|
2349 iMBassBoostControl->RemoveObserver(*this); |
|
2350 } |
|
2351 else |
|
2352 { |
|
2353 status = KErrNotFound; |
|
2354 } |
|
2355 break; |
|
2356 } |
|
2357 |
|
2358 case ESTEREOWIDCONTROL: |
|
2359 { |
|
2360 if(iMStereoWideningControl) |
|
2361 { |
|
2362 iMStereoWideningControl->RemoveObserver(*this); |
|
2363 } |
|
2364 else |
|
2365 { |
|
2366 status = KErrNotFound; |
|
2367 } |
|
2368 break; |
|
2369 } |
|
2370 |
|
2371 case ELOUDNESSCONTROL: |
|
2372 { |
|
2373 if(iMLoudnessControl) |
|
2374 { |
|
2375 iMLoudnessControl->RemoveObserver(*this); |
|
2376 } |
|
2377 else |
|
2378 { |
|
2379 status = KErrNotFound; |
|
2380 } |
|
2381 break; |
|
2382 } |
|
2383 |
|
2384 case EROOMLEVELCONTROL: |
|
2385 { |
|
2386 if(iMRoomLevelControl) |
|
2387 { |
|
2388 iMRoomLevelControl->RemoveObserver(*this); |
|
2389 } |
|
2390 else |
|
2391 { |
|
2392 status = KErrNotFound; |
|
2393 } |
|
2394 break; |
|
2395 } |
|
2396 |
|
2397 case EDISTATTCONTROL: |
|
2398 { |
|
2399 if(iMDistanceAttenuationControl) |
|
2400 { |
|
2401 iMDistanceAttenuationControl->RemoveObserver(*this); |
|
2402 } |
|
2403 else |
|
2404 { |
|
2405 status = KErrNotFound; |
|
2406 } |
|
2407 break; |
|
2408 } |
|
2409 |
|
2410 case ELISTDOPPCONTROL: |
|
2411 { |
|
2412 if(iMListenerDopplerControl) |
|
2413 { |
|
2414 iMListenerDopplerControl->RemoveObserver(*this); |
|
2415 } |
|
2416 else |
|
2417 { |
|
2418 status = KErrNotFound; |
|
2419 } |
|
2420 break; |
|
2421 } |
|
2422 |
|
2423 case ESOURDOPPCONTROL: |
|
2424 { |
|
2425 if(iMSourceDopplerControl) |
|
2426 { |
|
2427 iMSourceDopplerControl->RemoveObserver(*this); |
|
2428 } |
|
2429 else |
|
2430 { |
|
2431 status = KErrNotFound; |
|
2432 } |
|
2433 break; |
|
2434 } |
|
2435 |
|
2436 case ELISTLOCCONTROL: |
|
2437 { |
|
2438 if(iMListenerLocationControl) |
|
2439 { |
|
2440 iMListenerLocationControl->RemoveObserver(*this); |
|
2441 } |
|
2442 else |
|
2443 { |
|
2444 status = KErrNotFound; |
|
2445 } |
|
2446 break; |
|
2447 } |
|
2448 |
|
2449 case ESOURLOCCONTROL: |
|
2450 { |
|
2451 if(iMSourceLocationControl) |
|
2452 { |
|
2453 iMSourceLocationControl->RemoveObserver(*this); |
|
2454 } |
|
2455 else |
|
2456 { |
|
2457 status = KErrNotFound; |
|
2458 } |
|
2459 break; |
|
2460 } |
|
2461 |
|
2462 |
|
2463 case ELISTORIENTCONTROL: |
|
2464 { |
|
2465 if(iMListenerOrientationControl) |
|
2466 { |
|
2467 iMListenerOrientationControl->RemoveObserver(*this); |
|
2468 } |
|
2469 else |
|
2470 { |
|
2471 status = KErrNotFound; |
|
2472 } |
|
2473 break; |
|
2474 } |
|
2475 |
|
2476 case ESOURORIENTCONTROL: |
|
2477 { |
|
2478 break; |
|
2479 } |
|
2480 |
|
2481 }; |
|
2482 if (status == KErrNone) |
|
2483 { |
|
2484 iLog->Log(_L("RemoveObserver = %d"), status); |
|
2485 } |
|
2486 else |
|
2487 { |
|
2488 iLog->Log(_L("RemoveObserver ERROR = [%d]"), status); |
|
2489 } |
|
2490 //ProcessEvent(EEObserver, status); |
|
2491 return status; |
|
2492 } |
|
2493 |
|
2494 TInt CEnhanMediaTestClass::StreamPrime(CStifItemParser& /*aItem*/) |
|
2495 { |
|
2496 TInt status(KErrNone); |
|
2497 AddExpectedEvent(EEStreamPrime,KMediumTimeout); |
|
2498 if ( !iMStreamControl ) |
|
2499 { |
|
2500 status = KErrNotReady; |
|
2501 iLog->Log(_L("CEnhanMediaTestClass::StreamOpenL = %d"), status); |
|
2502 } |
|
2503 status = iMStreamControl->Prime(); |
|
2504 if (status == KErrNone) |
|
2505 { |
|
2506 iLog->Log(_L("StreamPrime = %d"), status); |
|
2507 } |
|
2508 else |
|
2509 { |
|
2510 iLog->Log(_L("StreamPrime ERROR = [%d]"), status); |
|
2511 } |
|
2512 return status; |
|
2513 } |
|
2514 |
|
2515 TInt CEnhanMediaTestClass::StreamStart(CStifItemParser& /*aItem*/) |
|
2516 { |
|
2517 TInt status(KErrNone); |
|
2518 iLog->Log(_L("StreamStart ")); |
|
2519 AddExpectedEvent(EEStreamStart,KMediumTimeout); |
|
2520 if ( !iMStreamControl ) |
|
2521 { |
|
2522 status = KErrNotReady; |
|
2523 iLog->Log(_L("StreamStart = %d"), status); |
|
2524 } |
|
2525 status = iMStreamControl->Start(); |
|
2526 if (status == KErrNone) |
|
2527 { |
|
2528 iLog->Log(_L("StreamStart = %d"), status); |
|
2529 } |
|
2530 else |
|
2531 { |
|
2532 iLog->Log(_L("StreamStart ERROR = [%d]"), status); |
|
2533 } |
|
2534 iLog->Log(_L("StreamStart END")); |
|
2535 return status; |
|
2536 } |
|
2537 |
|
2538 TInt CEnhanMediaTestClass::StreamPause(CStifItemParser& /*aItem*/) |
|
2539 { |
|
2540 TInt status(KErrNone); |
|
2541 iLog->Log(_L("StreamPause *-*-*-*-*-*")); |
|
2542 AddExpectedEvent(EEStreamPause,KMediumTimeout); |
|
2543 if ( !iMStreamControl ) |
|
2544 { |
|
2545 status = KErrNotReady; |
|
2546 iLog->Log(_L("StreamPause = %d"), status); |
|
2547 } |
|
2548 status = iMStreamControl->Pause(); |
|
2549 if (status == KErrNone) |
|
2550 { |
|
2551 iLog->Log(_L("StreamPause = %d"), status); |
|
2552 } |
|
2553 else |
|
2554 { |
|
2555 iLog->Log(_L("StreamPause ERROR = [%d]"), status); |
|
2556 } |
|
2557 iLog->Log(_L("StreamPause END")); |
|
2558 return status; |
|
2559 } |
|
2560 |
|
2561 TInt CEnhanMediaTestClass::StreamStop(CStifItemParser& /*aItem*/) |
|
2562 { |
|
2563 TInt status(KErrNone); |
|
2564 //AddExpectedEvent(EEStreamPause,KMediumTimeout); |
|
2565 iLog->Log(_L("StreamStop ")); |
|
2566 if ( !iMStreamControl ) |
|
2567 { |
|
2568 status = KErrNotReady; |
|
2569 iLog->Log(_L("StreamStart = %d"), status); |
|
2570 } |
|
2571 status = iMStreamControl->Stop(); |
|
2572 if (status == KErrNone) |
|
2573 { |
|
2574 iLog->Log(_L("StreamStop = %d"), status); |
|
2575 } |
|
2576 else |
|
2577 { |
|
2578 iLog->Log(_L("StreamStop ERROR = [%d]"), status); |
|
2579 } |
|
2580 iLog->Log(_L("StreamStop END ")); |
|
2581 return status; |
|
2582 } |
|
2583 |
|
2584 |
|
2585 TInt CEnhanMediaTestClass::EqualizerBandLevel(CStifItemParser& aItem) |
|
2586 { |
|
2587 TInt status(KErrNone); |
|
2588 TInt band; |
|
2589 TInt bandlevel; |
|
2590 |
|
2591 status = aItem.GetNextInt(band); |
|
2592 if (status != KErrNone) |
|
2593 { |
|
2594 iLog->Log(_L("EqualizerBandLevel ERROR = [%d]"), status); |
|
2595 return status; |
|
2596 } |
|
2597 if(!iEffectControl) |
|
2598 { |
|
2599 status = KErrNotReady; |
|
2600 } |
|
2601 status = static_cast<MEqualizerControl*>(iEffectControl)->BandLevel(band,bandlevel); |
|
2602 if (status == KErrNone) |
|
2603 { |
|
2604 iLog->Log(_L("EqualizerBandLevel status = %d"), status); |
|
2605 } |
|
2606 else |
|
2607 { |
|
2608 iLog->Log(_L("EqualizerBandLevel ERROR = [%d]"), status); |
|
2609 } |
|
2610 return status; |
|
2611 } |
|
2612 TInt CEnhanMediaTestClass::EqualizerNumBands (CStifItemParser& /*aItem*/) |
|
2613 { |
|
2614 TInt status(KErrNone); |
|
2615 TInt bands; |
|
2616 |
|
2617 if(!iEffectControl) |
|
2618 { |
|
2619 status = KErrNotReady; |
|
2620 } |
|
2621 |
|
2622 status = static_cast<MEqualizerControl*>(iEffectControl)->NumberOfBands(bands); |
|
2623 |
|
2624 if (status == KErrNone) |
|
2625 { |
|
2626 iLog->Log(_L("EqualizerNumBands status = %d"), status); |
|
2627 } |
|
2628 else |
|
2629 { |
|
2630 iLog->Log(_L("EqualizerNumBands ERROR = [%d]"), status); |
|
2631 } |
|
2632 |
|
2633 return status; |
|
2634 } |
|
2635 |
|
2636 TInt CEnhanMediaTestClass::EqualizerBandWidth (CStifItemParser& aItem) |
|
2637 { |
|
2638 TInt status(KErrNone); |
|
2639 TInt band; |
|
2640 TInt bandwidth; |
|
2641 |
|
2642 status = aItem.GetNextInt(band); |
|
2643 if (status != KErrNone) |
|
2644 { |
|
2645 iLog->Log(_L("EqualizerBandWidth ERROR = [%d]"), status); |
|
2646 return status; |
|
2647 } |
|
2648 |
|
2649 if(!iEffectControl) |
|
2650 { |
|
2651 status = KErrNotReady; |
|
2652 } |
|
2653 |
|
2654 status = static_cast<MEqualizerControl*>(iEffectControl)->BandWidth(band,bandwidth); |
|
2655 |
|
2656 if (status == KErrNone) |
|
2657 { |
|
2658 iLog->Log(_L("EqualizerBandWidth status = %d"), status); |
|
2659 } |
|
2660 else |
|
2661 { |
|
2662 iLog->Log(_L("EqualizerBandWidth ERROR = [%d]"), status); |
|
2663 } |
|
2664 |
|
2665 return status; |
|
2666 } |
|
2667 |
|
2668 TInt CEnhanMediaTestClass::EqualizerCenterFrequency (CStifItemParser& aItem) |
|
2669 { |
|
2670 TInt status(KErrNone); |
|
2671 TInt band; |
|
2672 TInt freq; |
|
2673 |
|
2674 status = aItem.GetNextInt(band); |
|
2675 if (status != KErrNone) |
|
2676 { |
|
2677 iLog->Log(_L("EqualizerCenterFrequency ERROR = [%d]"), status); |
|
2678 return status; |
|
2679 } |
|
2680 |
|
2681 if(!iEffectControl) |
|
2682 { |
|
2683 status = KErrNotReady; |
|
2684 } |
|
2685 |
|
2686 status = static_cast<MEqualizerControl*>(iEffectControl)->CenterFrequency(band,freq); |
|
2687 |
|
2688 if (status == KErrNone) |
|
2689 { |
|
2690 iLog->Log(_L("EqualizerCenterFrequency status = %d"), status); |
|
2691 } |
|
2692 else |
|
2693 { |
|
2694 iLog->Log(_L("EqualizerCenterFrequency ERROR = [%d]"), status); |
|
2695 } |
|
2696 |
|
2697 return status; |
|
2698 } |
|
2699 |
|
2700 TInt CEnhanMediaTestClass::EqualizerCrossoverFrequency (CStifItemParser& aItem) |
|
2701 { |
|
2702 TInt status(KErrNone); |
|
2703 TInt band; |
|
2704 TInt freq; |
|
2705 |
|
2706 status = aItem.GetNextInt(band); |
|
2707 if (status != KErrNone) |
|
2708 { |
|
2709 iLog->Log(_L("EqualizerCrossoverFrequency ERROR = [%d]"), status); |
|
2710 return status; |
|
2711 } |
|
2712 |
|
2713 if(!iEffectControl) |
|
2714 { |
|
2715 status = KErrNotReady; |
|
2716 } |
|
2717 |
|
2718 status = static_cast<MEqualizerControl*>(iEffectControl)->CrossoverFrequency(band,freq); |
|
2719 |
|
2720 if (status == KErrNone) |
|
2721 { |
|
2722 iLog->Log(_L("EqualizerCrossoverFrequency status = %d"), status); |
|
2723 } |
|
2724 else |
|
2725 { |
|
2726 iLog->Log(_L("EqualizerCrossoverFrequency ERROR = [%d]"), status); |
|
2727 } |
|
2728 |
|
2729 return status; |
|
2730 } |
|
2731 |
|
2732 TInt CEnhanMediaTestClass::EqualizerDbLevelLimits (CStifItemParser& /*aItem*/) |
|
2733 { |
|
2734 TInt status(KErrNone); |
|
2735 TInt min, max; |
|
2736 |
|
2737 if(!iEffectControl) |
|
2738 { |
|
2739 status = KErrNotReady; |
|
2740 } |
|
2741 |
|
2742 status = static_cast<MEqualizerControl*>(iEffectControl)->DbLevelLimits(min,max); |
|
2743 |
|
2744 if (status == KErrNone) |
|
2745 { |
|
2746 iLog->Log(_L("EqualizerDbLevelLimits status = %d"), status); |
|
2747 } |
|
2748 else |
|
2749 { |
|
2750 iLog->Log(_L("EqualizerDbLevelLimits ERROR = [%d]"), status); |
|
2751 } |
|
2752 |
|
2753 return status; |
|
2754 } |
|
2755 |
|
2756 TInt CEnhanMediaTestClass::EqualizerSetBandLevel (CStifItemParser& aItem) |
|
2757 { |
|
2758 TInt status(KErrNone); |
|
2759 TInt band, bandlevel; |
|
2760 |
|
2761 status = aItem.GetNextInt(band); |
|
2762 if (status != KErrNone) |
|
2763 { |
|
2764 iLog->Log(_L("EqualizerSetBandLevel on band variable, ERROR = [%d]"), status); |
|
2765 return status; |
|
2766 } |
|
2767 |
|
2768 status = aItem.GetNextInt(bandlevel); |
|
2769 if (status != KErrNone) |
|
2770 { |
|
2771 iLog->Log(_L("EqualizerSetBandLevel on bandlevel variable, ERROR = [%d]"), status); |
|
2772 return status; |
|
2773 } |
|
2774 |
|
2775 if(!iEffectControl) |
|
2776 { |
|
2777 status = KErrNotReady; |
|
2778 } |
|
2779 |
|
2780 status = static_cast<MEqualizerControl*>(iEffectControl)->SetBandLevel(band, bandlevel); |
|
2781 |
|
2782 if (status == KErrNone) |
|
2783 { |
|
2784 iLog->Log(_L("EqualizerSetBandLevel status = %d"), status); |
|
2785 } |
|
2786 else |
|
2787 { |
|
2788 iLog->Log(_L("EqualizerSetBandLevel ERROR = [%d]"), status); |
|
2789 } |
|
2790 |
|
2791 return status; |
|
2792 } |
|
2793 |
|
2794 TInt CEnhanMediaTestClass::DescSGetBitRate(CStifItemParser& /*aItem*/) |
|
2795 { |
|
2796 TInt status(KErrNone); |
|
2797 TUint bitrate = 0; |
|
2798 |
|
2799 if(!iMDescriptorSource) |
|
2800 { |
|
2801 return status = KErrNotReady; |
|
2802 } |
|
2803 status = iMDescriptorSource->GetBitRate(bitrate); |
|
2804 if (status == KErrNone) |
|
2805 { |
|
2806 iLog->Log(_L("iMDescriptorSource->GetBitRate() = [%d]"), bitrate); |
|
2807 } |
|
2808 else |
|
2809 { |
|
2810 iLog->Log(_L("iMDescriptorSource->GetBitRate ERROR = [%d]"), status); |
|
2811 } |
|
2812 return status; |
|
2813 } |
|
2814 |
|
2815 void CEnhanMediaTestClass::WriteLoop(CStifItemParser& aItem) |
|
2816 { |
|
2817 AddExpectedEvent(EEWriteToStream,KMediumTimeout); |
|
2818 iLog->Log(_L("WriteLoop INIT")); |
|
2819 aItem.GetNextInt(iAutoWriteBuffer); |
|
2820 TInt index = iAvailable.Find(ETrue); |
|
2821 while ( (index != KErrNotFound ) && (!iIsEOFReached)) |
|
2822 { |
|
2823 User::LeaveIfError( ReadFromFileAndWriteToStream( index ) ); |
|
2824 // Exit the loop if file EOF. |
|
2825 if ( !iIsEOFReached ) |
|
2826 { |
|
2827 // Get the next free buffer |
|
2828 index = iAvailable.Find(ETrue); |
|
2829 } |
|
2830 } |
|
2831 iLog->Log(_L("WriteLoop END")); |
|
2832 } |
|
2833 |
|
2834 TInt CEnhanMediaTestClass::ReadFromFileAndWriteToStream(TInt aIndex) |
|
2835 { |
|
2836 iLog->Log(_L("ReadFromFileAndWriteToStream INIT")); |
|
2837 MDataBuffer* buffer = iBuffers[aIndex]; |
|
2838 // Read data into CAudioBuffer |
|
2839 iFile.Read( buffer->GetBufferPtr() ); |
|
2840 iBytesReadFromFile += buffer->GetBufferPtr().Length(); |
|
2841 |
|
2842 if ( buffer->GetBufferPtr().Length() < buffer->GetBufferPtr().MaxLength() ) |
|
2843 { |
|
2844 // Last buffer is reached, set the flag |
|
2845 buffer->SetLastBuffer( ETrue ); |
|
2846 iIsEOFReached = ETrue; |
|
2847 } |
|
2848 else |
|
2849 { |
|
2850 buffer->SetLastBuffer(EFalse); |
|
2851 } |
|
2852 |
|
2853 // Write data into iMDataBufferSource |
|
2854 #ifdef _DEBUG |
|
2855 RDebug::Print(_L("CEnhanMediaTestClass::ReadFromFileAndWriteToStream\ |
|
2856 [AudioBuffer[0x%x]FileSize[%d]BytesRead[%d]]") , buffer, iFileSizeInBytes, iBytesReadFromFile ); |
|
2857 #endif |
|
2858 TInt err(KErrNone); |
|
2859 err = iMDataBufferSource->WriteData( *buffer ); |
|
2860 |
|
2861 if (err == KErrNone) |
|
2862 { |
|
2863 iAvailable[aIndex] = EFalse; |
|
2864 } |
|
2865 else if ( err == KErrOverflow ) |
|
2866 { |
|
2867 // There isn't enough memory in the player to buffer the data. |
|
2868 // reset the file pos |
|
2869 TInt size = -(buffer->GetBufferPtr().Length()); |
|
2870 iFile.Seek( ESeekCurrent, size ); |
|
2871 iBytesReadFromFile -= size; |
|
2872 } |
|
2873 iLog->Log(_L("ReadFromFileAndWriteToStream END")); |
|
2874 |
|
2875 return err; |
|
2876 // iAutoWriteBuffer |
|
2877 } |
|
2878 |
|
2879 TInt CEnhanMediaTestClass::GetBuffConfig(CStifItemParser& /*aItem*/) |
|
2880 { |
|
2881 iLog->Log(_L("GetBuffConfig INIT")); |
|
2882 TInt status(KErrNone); |
|
2883 TInt buffer=0; |
|
2884 TPckgBuf<TBufferingConfig> pckg; |
|
2885 TIpcArgs args(&pckg); |
|
2886 |
|
2887 if(!iMDataBufferSource) |
|
2888 { |
|
2889 status = KErrNotReady; |
|
2890 } |
|
2891 else |
|
2892 { |
|
2893 status = iMDataBufferSource->GetBufferingConfig(pckg()); |
|
2894 } |
|
2895 if (status == KErrNone) |
|
2896 { |
|
2897 iLog->Log(_L("iMDataBufferSource->GetBufferingConfig = [%d]"), buffer); |
|
2898 } |
|
2899 else |
|
2900 { |
|
2901 iLog->Log(_L("iMDataBufferSource->GetBufferingConfig ERROR = [%d]"), status); |
|
2902 } |
|
2903 return status; |
|
2904 } |
|
2905 |
|
2906 TInt CEnhanMediaTestClass::DBSSetBuffConfig(CStifItemParser& aItem) |
|
2907 { |
|
2908 iLog->Log(_L("DBSSetBuffConfig ")); |
|
2909 TInt status(KErrNone); |
|
2910 TIpcArgs args; |
|
2911 TInt type=0; |
|
2912 TInt amount=0; |
|
2913 TPckgBuf<TBufferingConfig> pckg; |
|
2914 status = aItem.GetNextInt(type); |
|
2915 |
|
2916 if ( status != KErrNone ) |
|
2917 { |
|
2918 iLog->Log(_L("DBSSetBufConfig Missing Argument Type in config file ")); |
|
2919 return status; |
|
2920 } |
|
2921 else |
|
2922 { |
|
2923 pckg().iType = TBufferingConfig::TBufferingType(type); |
|
2924 } |
|
2925 |
|
2926 status = aItem.GetNextInt(amount); |
|
2927 if ( status != KErrNone ) |
|
2928 { |
|
2929 iLog->Log(_L("DBSSetBufConfigL Missing Argument Amount in config file ")); |
|
2930 return status; |
|
2931 } |
|
2932 else |
|
2933 { |
|
2934 pckg().iAmount = amount; |
|
2935 } |
|
2936 |
|
2937 if(!iMDataBufferSource) |
|
2938 { |
|
2939 status = KErrNotReady; |
|
2940 } |
|
2941 else |
|
2942 { |
|
2943 status = iMDataBufferSource->SetBufferingConfig(pckg()); |
|
2944 } |
|
2945 iLog->Log(_L("DBSSetBuffConfig END")); |
|
2946 |
|
2947 return status; |
|
2948 } |
|
2949 TInt CEnhanMediaTestClass::DBSGetBuffType(CStifItemParser& /*aItem*/) |
|
2950 { |
|
2951 iLog->Log(_L("CEnhanMediaTestClass::DBSGetBuffType ")); |
|
2952 TInt status(KErrNone); |
|
2953 RArray<TBufferingConfig::TBufferingType> aArray; |
|
2954 TArray<TBufferingConfig::TBufferingType> array = aArray.Array(); |
|
2955 |
|
2956 if(!iMDataBufferSource) |
|
2957 { |
|
2958 return status = KErrNotReady; |
|
2959 } |
|
2960 |
|
2961 status = iMDataBufferSource->GetBufferingTypesSupported(array); |
|
2962 aArray.Reset(); |
|
2963 aArray.Close(); |
|
2964 iLog->Log(_L("CEnhanMediaTestClass::DBSGetBuffType END [%d]"),status); |
|
2965 return status; |
|
2966 } |
|
2967 |
|
2968 TInt CEnhanMediaTestClass::DBSGetInterface(CStifItemParser& /*aItem*/) |
|
2969 { |
|
2970 TInt status(KErrNone); |
|
2971 iLog->Log(_L("CEnhanMediaTestClass::DBSGetInterface ")); |
|
2972 // For descriptor source set DRM Type and allowed output |
|
2973 if (iMDataBufferSource) |
|
2974 { |
|
2975 if (iDRMConfigIntfc) |
|
2976 { |
|
2977 delete iDRMConfigIntfc; |
|
2978 iDRMConfigIntfc = NULL; |
|
2979 } |
|
2980 TAny* intfc(NULL); |
|
2981 TVersion ver(KDRMConfigIntfcMajorVer1, KDRMConfigIntfcMinorVer1, KDRMConfigIntfcBuildVer1); |
|
2982 TInt status = iMDataBufferSource->GetInterface(KDRMConfigIntfc, |
|
2983 ver, |
|
2984 intfc); |
|
2985 if (status == KErrNone) |
|
2986 { |
|
2987 iDRMConfigIntfc = (CDRMConfigIntfc*)intfc; |
|
2988 } |
|
2989 } |
|
2990 AddExpectedEvent(EEDBSGetInterface,KShortTimeout); |
|
2991 iLog->Log(_L("CEnhanMediaTestClass::DBSGetInterface END")); |
|
2992 return status; |
|
2993 } |
|
2994 |
|
2995 TInt CEnhanMediaTestClass::DBSGetBitRate(CStifItemParser& /*aItem*/) |
|
2996 { |
|
2997 |
|
2998 iLog->Log(_L("CEnhanMediaTestClass::DBSGetBitRate ")); |
|
2999 TInt status(KErrNone); |
|
3000 TUint bitrate = 0; |
|
3001 if(!iMDataBufferSource) |
|
3002 { |
|
3003 status = KErrNotReady; |
|
3004 } |
|
3005 else |
|
3006 { |
|
3007 status = iMDataBufferSource->GetBitRate(bitrate); |
|
3008 } |
|
3009 iLog->Log(_L("CEnhanMediaTestClass::DBSGetBitRate ")); |
|
3010 |
|
3011 return status; |
|
3012 } |
|
3013 |
|
3014 TInt CEnhanMediaTestClass::DBSGetSize(CStifItemParser& /*aItem*/) |
|
3015 { |
|
3016 |
|
3017 iLog->Log(_L("CEnhanMediaTestClass::DBSGetSize ")); |
|
3018 TInt status(KErrNone); |
|
3019 TUint sizes = 0; |
|
3020 if(!iMDataBufferSource) |
|
3021 { |
|
3022 status = KErrNotReady; |
|
3023 } |
|
3024 else |
|
3025 { |
|
3026 status = iMDataBufferSource->GetSize(sizes); |
|
3027 } |
|
3028 iLog->Log(_L("CEnhanMediaTestClass::DBSGetSize [%d]"), status); |
|
3029 |
|
3030 return status; |
|
3031 } |
|
3032 |
|
3033 TInt CEnhanMediaTestClass::DBSClose(CStifItemParser& /*aItem*/) |
|
3034 { |
|
3035 |
|
3036 iLog->Log(_L("CEnhanMediaTestClass::DBSClose ")); |
|
3037 TInt status(KErrNone); |
|
3038 if(!iMDataBufferSource) |
|
3039 { |
|
3040 status = KErrNotReady; |
|
3041 } |
|
3042 else |
|
3043 { |
|
3044 iMDataBufferSource->EmptyBuffers(); |
|
3045 status = iMDataBufferSource->Close(); |
|
3046 } |
|
3047 iLog->Log(_L("CEnhanMediaTestClass::DBSClose [%d]"), status); |
|
3048 |
|
3049 return status; |
|
3050 } |
|
3051 |
|
3052 |
|
3053 TInt CEnhanMediaTestClass::DSGetSize(CStifItemParser& /*aItem*/) |
|
3054 { |
|
3055 |
|
3056 iLog->Log(_L("CEnhanMediaTestClass::DSGetSize ")); |
|
3057 TInt status(KErrNone); |
|
3058 TUint sizes = 0; |
|
3059 if(!iMDescriptorSource) |
|
3060 { |
|
3061 status = KErrNotReady; |
|
3062 } |
|
3063 else |
|
3064 { |
|
3065 status = iMDescriptorSource->GetSize(sizes); |
|
3066 } |
|
3067 iLog->Log(_L("CEnhanMediaTestClass::DSGetSize [%d]"), status); |
|
3068 |
|
3069 return status; |
|
3070 } |
|
3071 TInt CEnhanMediaTestClass::DeleteDataBuffer(CStifItemParser& /*aItem*/) |
|
3072 { |
|
3073 |
|
3074 iLog->Log(_L("CEnhanMediaTestClass::DeleteDataBuffer ")); |
|
3075 AddExpectedEvent(EEDeleteBuffer,KMediumTimeout); |
|
3076 TInt status(KErrNone); |
|
3077 MDataBuffer* temp ; |
|
3078 while(iBuffers.Count()) |
|
3079 { |
|
3080 temp = iBuffers[0]; |
|
3081 iBuffers.Remove(0); |
|
3082 status = iFactory->DeleteDataBuffer(temp); |
|
3083 } |
|
3084 iAvailable.Reset(); |
|
3085 iBuffers.ResetAndDestroy(); |
|
3086 iLog->Log(_L("CEnhanMediaTestClass::DeleteDataBuffer ")); |
|
3087 return status; |
|
3088 } |
|
3089 |
|
3090 TInt CEnhanMediaTestClass::VolGetMinVolume(CStifItemParser& /*aItem*/) |
|
3091 { |
|
3092 |
|
3093 iLog->Log(_L("CEnhanMediaTestClass::VolGetMinVolume ")); |
|
3094 TInt status(KErrNone); |
|
3095 |
|
3096 TInt volume=0; |
|
3097 if(!iMVolumeControl) |
|
3098 { |
|
3099 return status = KErrNotReady; |
|
3100 } |
|
3101 status = iMVolumeControl->GetMinVolume(volume); |
|
3102 iLog->Log(_L("CEnhanMediaTestClass::VolGetMinVolume [%d]"),volume); |
|
3103 return status; |
|
3104 } |
|
3105 |
|
3106 TInt CEnhanMediaTestClass::VolGetMaxVolume(CStifItemParser& /*aItem*/) |
|
3107 { |
|
3108 |
|
3109 iLog->Log(_L("CEnhanMediaTestClass::VolGetMaxVolume ")); |
|
3110 TInt status(KErrNone); |
|
3111 TInt volume=0; |
|
3112 if(!iMVolumeControl) |
|
3113 { |
|
3114 return status = KErrNotReady; |
|
3115 } |
|
3116 status = iMVolumeControl->GetMaxVolume(volume); |
|
3117 iLog->Log(_L("CEnhanMediaTestClass::VolGetMaxVolume [%d]"),volume); |
|
3118 return status; |
|
3119 } |
|
3120 |
|
3121 TInt CEnhanMediaTestClass::VolGetVolume(CStifItemParser& /*aItem*/) |
|
3122 { |
|
3123 |
|
3124 iLog->Log(_L("CEnhanMediaTestClass::VolGetVolume ")); |
|
3125 TInt status(KErrNone); |
|
3126 TInt volume=0; |
|
3127 if(!iMVolumeControl) |
|
3128 { |
|
3129 return status = KErrNotReady; |
|
3130 } |
|
3131 status = iMVolumeControl->GetVolume(volume); |
|
3132 iLog->Log(_L("CEnhanMediaTestClass::VolGetVolume [%d]"),volume); |
|
3133 return status; |
|
3134 } |
|
3135 |
|
3136 TInt CEnhanMediaTestClass::VolGetDefaultVolume(CStifItemParser& /*aItem*/) |
|
3137 { |
|
3138 |
|
3139 iLog->Log(_L("CEnhanMediaTestClass::VolGetDefaultVolume ")); |
|
3140 TInt status(KErrNone); |
|
3141 TInt volume=0; |
|
3142 if(!iMVolumeControl) |
|
3143 { |
|
3144 return status = KErrNotReady; |
|
3145 } |
|
3146 status = iMVolumeControl->GetDefaultVolume(volume); |
|
3147 iLog->Log(_L("CEnhanMediaTestClass::VolGetDefaultVolume [%d]"),volume); |
|
3148 return status; |
|
3149 } |
|
3150 |
|
3151 TInt CEnhanMediaTestClass::VolSetVolume(CStifItemParser& aItem) |
|
3152 { |
|
3153 TInt volume; |
|
3154 TInt status(KErrNone); |
|
3155 iLog->Log(_L("VolSetVolume INIT")); |
|
3156 aItem.GetNextInt(volume); |
|
3157 status = iMVolumeControl->SetVolume(volume); |
|
3158 if (status!=KErrNone) |
|
3159 { |
|
3160 iLog->Log(_L("VolSetVolume FAILED")); |
|
3161 } |
|
3162 else |
|
3163 { |
|
3164 iLog->Log(_L("VolSetVolume OK")); |
|
3165 } |
|
3166 return status; |
|
3167 } |
|
3168 |
|
3169 TInt CEnhanMediaTestClass::BalGetBalance(CStifItemParser& /*aItem*/) |
|
3170 { |
|
3171 |
|
3172 iLog->Log(_L("CEnhanMediaTestClass::BalGetBalance ")); |
|
3173 TInt status(KErrNone); |
|
3174 TInt balance=0; |
|
3175 if(!iMBalanceControl) |
|
3176 { |
|
3177 return status = KErrNotReady; |
|
3178 } |
|
3179 status = iMBalanceControl->GetBalance(balance); |
|
3180 iLog->Log(_L("CEnhanMediaTestClass::BalGetBalance [%d]"),balance); |
|
3181 return status; |
|
3182 } |
|
3183 |
|
3184 TInt CEnhanMediaTestClass::BalSetBalance(CStifItemParser& aItem) |
|
3185 { |
|
3186 TInt balance; |
|
3187 TInt status(KErrNone); |
|
3188 iLog->Log(_L("BalSetBalance INIT")); |
|
3189 aItem.GetNextInt(balance); |
|
3190 status = iMBalanceControl->SetBalance(balance); |
|
3191 if (status!=KErrNone) |
|
3192 { |
|
3193 iLog->Log(_L("BalSetBalance FAILED")); |
|
3194 } |
|
3195 else |
|
3196 { |
|
3197 iLog->Log(_L("BalSetBalance OK")); |
|
3198 } |
|
3199 return status; |
|
3200 } |
|
3201 |
|
3202 TInt CEnhanMediaTestClass::EffectApply(CStifItemParser& aItem) |
|
3203 { |
|
3204 TInt control; |
|
3205 TInt status(KErrNone); |
|
3206 iLog->Log(_L("EffectApply INIT")); |
|
3207 aItem.GetNextInt(control); |
|
3208 |
|
3209 switch(TControl(control)) |
|
3210 { |
|
3211 case EVOLUMECONTROL: |
|
3212 { |
|
3213 iEffectControl = iMVolumeControl; |
|
3214 } |
|
3215 break; |
|
3216 case EBALANCECONTROL: |
|
3217 { |
|
3218 iEffectControl = iMBalanceControl; |
|
3219 } |
|
3220 break; |
|
3221 case EEQUALIZERCONTROL: |
|
3222 { |
|
3223 iEffectControl = iMEqualizerControl; |
|
3224 } |
|
3225 break; |
|
3226 case EREVERBCONTROL: |
|
3227 { |
|
3228 iEffectControl = iMReverbControl; |
|
3229 } |
|
3230 break; |
|
3231 case EBASSBOOSTCONTROL: |
|
3232 { |
|
3233 iEffectControl = iMBassBoostControl; |
|
3234 } |
|
3235 break; |
|
3236 |
|
3237 case ESTEREOWIDCONTROL: |
|
3238 { |
|
3239 iEffectControl = iMStereoWideningControl; |
|
3240 } |
|
3241 break; |
|
3242 |
|
3243 |
|
3244 case ELOUDNESSCONTROL: |
|
3245 { |
|
3246 iEffectControl = iMLoudnessControl; |
|
3247 } |
|
3248 break; |
|
3249 |
|
3250 |
|
3251 case EROOMLEVELCONTROL: |
|
3252 { |
|
3253 iEffectControl = iMRoomLevelControl; |
|
3254 } |
|
3255 break; |
|
3256 |
|
3257 |
|
3258 case EDISTATTCONTROL: |
|
3259 { |
|
3260 iEffectControl = iMDistanceAttenuationControl; |
|
3261 } |
|
3262 break; |
|
3263 |
|
3264 |
|
3265 case ELISTDOPPCONTROL: |
|
3266 { |
|
3267 iEffectControl = iMListenerDopplerControl; |
|
3268 } |
|
3269 break; |
|
3270 |
|
3271 |
|
3272 case ESOURDOPPCONTROL: |
|
3273 { |
|
3274 iEffectControl = iMSourceDopplerControl; |
|
3275 } |
|
3276 break; |
|
3277 |
|
3278 |
|
3279 case ELISTLOCCONTROL: |
|
3280 { |
|
3281 iEffectControl = iMListenerLocationControl; |
|
3282 } |
|
3283 break; |
|
3284 |
|
3285 |
|
3286 case ESOURLOCCONTROL: |
|
3287 { |
|
3288 iEffectControl = iMSourceLocationControl; |
|
3289 } |
|
3290 break; |
|
3291 |
|
3292 |
|
3293 case ELISTORIENTCONTROL: |
|
3294 { |
|
3295 iEffectControl = iMListenerOrientationControl; |
|
3296 } |
|
3297 break; |
|
3298 |
|
3299 |
|
3300 case ESOURORIENTCONTROL: |
|
3301 { |
|
3302 iEffectControl = iMSourceOrientationControl; |
|
3303 } |
|
3304 break; |
|
3305 } |
|
3306 status = iEffectControl->Apply(); |
|
3307 if (status!=KErrNone) |
|
3308 { |
|
3309 iLog->Log(_L("EffectApply FAILED")); |
|
3310 } |
|
3311 else |
|
3312 { |
|
3313 iLog->Log(_L("EffectApply OK")); |
|
3314 } |
|
3315 return status; |
|
3316 } |
|
3317 |
|
3318 TInt CEnhanMediaTestClass::VolSetVolumeRamp(CStifItemParser& aItem) |
|
3319 { |
|
3320 TInt status(KErrNone); |
|
3321 TInt initialvolume; |
|
3322 TInt finalvolume; |
|
3323 TInt rampmodevolume; |
|
3324 TInt rampduration_par; |
|
3325 iLog->Log(_L("VolSetVolume INIT")); |
|
3326 |
|
3327 if(!iMVolumeControl) |
|
3328 { |
|
3329 status = KErrNotReady; |
|
3330 } |
|
3331 else |
|
3332 { |
|
3333 aItem.GetNextInt(initialvolume); |
|
3334 aItem.GetNextInt(finalvolume); |
|
3335 aItem.GetNextInt(rampduration_par); |
|
3336 TPckgBuf<TUint64> pckg; |
|
3337 pckg = rampduration_par; |
|
3338 aItem.GetNextInt(rampmodevolume); |
|
3339 TUint64 rampduration = pckg(); |
|
3340 MVolumeControl::TVolumeRampMode rampmode = MVolumeControl::TVolumeRampMode(rampmodevolume); |
|
3341 status = iMVolumeControl->SetVolumeRamp(initialvolume,finalvolume,rampduration,rampmode); |
|
3342 |
|
3343 if (status!=KErrNone) |
|
3344 { |
|
3345 iLog->Log(_L("VolSetVolume FAILED")); |
|
3346 } |
|
3347 else |
|
3348 { |
|
3349 iLog->Log(_L("VolSetVolume OK")); |
|
3350 } |
|
3351 } |
|
3352 return status; |
|
3353 } |
|
3354 |
|
3355 |
|
3356 TInt CEnhanMediaTestClass::FileSGetBitRate(CStifItemParser& /*aItem*/) |
|
3357 { |
|
3358 |
|
3359 iLog->Log(_L("CEnhanMediaTestClass::FileSGetBitRate ")); |
|
3360 TInt status(KErrNone); |
|
3361 TUint bitrate = 0; |
|
3362 if(!iMFileSource) |
|
3363 { |
|
3364 status = KErrNotReady; |
|
3365 } |
|
3366 else |
|
3367 { |
|
3368 status = iMFileSource->GetBitRate(bitrate); |
|
3369 } |
|
3370 iLog->Log(_L("CEnhanMediaTestClass::FileSGetBitRate [%d]"),bitrate); |
|
3371 return status; |
|
3372 } |
|
3373 |
|
3374 TInt CEnhanMediaTestClass::FileSGetSize(CStifItemParser& /*aItem*/) |
|
3375 { |
|
3376 |
|
3377 iLog->Log(_L("CEnhanMediaTestClass::FileSGetSize ")); |
|
3378 TInt status(KErrNone); |
|
3379 TUint sizes = 0; |
|
3380 if(!iMFileSource) |
|
3381 { |
|
3382 status = KErrNotReady; |
|
3383 } |
|
3384 else |
|
3385 { |
|
3386 status = iMFileSource->GetSize(sizes); |
|
3387 } |
|
3388 iLog->Log(_L("CEnhanMediaTestClass::FileSGetSize [%d]"),sizes); |
|
3389 return status; |
|
3390 } |
|
3391 |
|
3392 TInt CEnhanMediaTestClass::Source_GetMimeType(CStifItemParser& /*aItem*/) |
|
3393 { |
|
3394 iLog->Log(_L("CEnhanMediaTestClass::FileSGetBitRate ")); |
|
3395 TInt status(KErrNone); |
|
3396 TBuf8<256> mimeType; |
|
3397 mimeType.Copy(KTagMimeType); |
|
3398 |
|
3399 TInt mimeTypeSize = mimeType.Size(); |
|
3400 |
|
3401 if(iMimeType) |
|
3402 { |
|
3403 delete iMimeType; |
|
3404 iMimeType = NULL; |
|
3405 } |
|
3406 |
|
3407 iMimeType = HBufC8::NewL(mimeType.Size()); |
|
3408 TPtr8 des = iMimeType->Des(); |
|
3409 status = iSourceControl->GetMimeType(des); |
|
3410 if (status == KErrNone) |
|
3411 { |
|
3412 iLog->Log(_L("CEnhanMediaTestClass::Source_GetMimeType = %d"), status); |
|
3413 } |
|
3414 else |
|
3415 { |
|
3416 iLog->Log(_L("CEnhanMediaTestClass::Source_GetMimeType ERROR = [%d]"), status); |
|
3417 } |
|
3418 return status; |
|
3419 } |
|
3420 |
|
3421 TInt CEnhanMediaTestClass::Source_GetSize(CStifItemParser& /*aItem*/) |
|
3422 { |
|
3423 |
|
3424 iLog->Log(_L("CEnhanMediaTestClass::Source_GetSize ")); |
|
3425 TInt status(KErrNone); |
|
3426 TUint size = 0; |
|
3427 status = iSourceControl->GetSize(size); |
|
3428 iLog->Log(_L("CEnhanMediaTestClass::Source_GetSize [%d]"),size); |
|
3429 return status; |
|
3430 } |
|
3431 |
|
3432 TInt CEnhanMediaTestClass::Stream_GetDuration(CStifItemParser& /*aItem*/) |
|
3433 { |
|
3434 iLog->Log(_L("CEnhanMediaTestClass::Stream_GetDuration ")); |
|
3435 TInt status(KErrNone); |
|
3436 TInt64 dur=0; |
|
3437 status = iMStreamControl->GetDuration(dur); |
|
3438 iLog->Log(_L("CEnhanMediaTestClass::Stream_GetDuration [%d]"),dur); |
|
3439 return status; |
|
3440 } |
|
3441 |
|
3442 TInt CEnhanMediaTestClass::Stream_SetPriority(CStifItemParser& aItem) |
|
3443 { |
|
3444 iLog->Log(_L("CEnhanMediaTestClass::Stream_SetPriority ")); |
|
3445 TInt status(KErrNone); |
|
3446 if ( !iMStreamControl ) |
|
3447 { |
|
3448 status = KErrNotReady; |
|
3449 } |
|
3450 else |
|
3451 { |
|
3452 TInt priority; |
|
3453 TInt mdaprioritypref; |
|
3454 aItem.GetNextInt(priority); |
|
3455 aItem.GetNextInt(mdaprioritypref); |
|
3456 TMdaPriorityPreference pref = TMdaPriorityPreference(mdaprioritypref); |
|
3457 status = iMStreamControl->SetPriority(priority, pref ); |
|
3458 } |
|
3459 if (status == KErrNone) |
|
3460 { |
|
3461 iLog->Log(_L("CEnhanMediaTestClass::Stream_SetPriority = %d"), status); |
|
3462 } |
|
3463 else |
|
3464 { |
|
3465 iLog->Log(_L("CEnhanMediaTestClass::Stream_SetPriority ERROR = [%d]"), status); |
|
3466 } |
|
3467 return status; |
|
3468 } |
|
3469 |
|
3470 TInt CEnhanMediaTestClass::StreamGetSSL(CStifItemParser& /*aItem*/) |
|
3471 { |
|
3472 iLog->Log(_L("CEnhanMediaTestClass::StreamGetSSL ")); |
|
3473 TInt status(KErrNone); |
|
3474 TBool seekingSupported(EFalse); |
|
3475 status = iMStreamControl->GetSeekingSupport(seekingSupported); |
|
3476 iLog->Log(_L("CEnhanMediaTestClass::StreamGetSSL [%d]"),status); |
|
3477 status = KErrNone; |
|
3478 return status; |
|
3479 |
|
3480 } |
|
3481 TInt CEnhanMediaTestClass::StreamGetRSSL(CStifItemParser& /*aItem*/) |
|
3482 { |
|
3483 iLog->Log(_L("CEnhanMediaTestClass::StreamGetRSSL ")); |
|
3484 TInt status(KErrNone); |
|
3485 TBool seekingSupported(EFalse); |
|
3486 status = iMStreamControl->GetRandomSeekingSupport(seekingSupported); |
|
3487 iLog->Log(_L("CEnhanMediaTestClass::StreamGetRSSL [%d]"),status); |
|
3488 status = KErrNone; |
|
3489 return status; |
|
3490 } |
|
3491 TInt CEnhanMediaTestClass::StreamGetStateL(CStifItemParser& /*aItem*/) |
|
3492 { |
|
3493 iLog->Log(_L("CEnhanMediaTestClass::StreamGetStateL ")); |
|
3494 TInt status(KErrNone); |
|
3495 MStreamControl::TStreamState state = iMStreamControl->GetState(); |
|
3496 iLog->Log(_L("CEnhanMediaTestClass::StreamGetStateL [%d]"),status); |
|
3497 return status; |
|
3498 } |
|
3499 TInt CEnhanMediaTestClass::StreamGetCIL(CStifItemParser& /*aItem*/) |
|
3500 { |
|
3501 iLog->Log(_L("CEnhanMediaTestClass::StreamGetCIL ")); |
|
3502 TInt status(KErrNone); |
|
3503 |
|
3504 iLog->Log(_L("CEnhanMediaTestClass::StreamGetCIL [%d]"),status); |
|
3505 return status; |
|
3506 } |
|
3507 TInt CEnhanMediaTestClass::StreamGetPositionL(CStifItemParser& /*aItem*/) |
|
3508 { |
|
3509 iLog->Log(_L("CEnhanMediaTestClass::StreamGetStateL ")); |
|
3510 TInt status(KErrNone); |
|
3511 TInt64 pos=0; |
|
3512 status = iMStreamControl->GetPosition(pos); |
|
3513 iLog->Log(_L("CEnhanMediaTestClass::StreamGetStateL [%d]"),status); |
|
3514 return status; |
|
3515 } |
|
3516 TInt CEnhanMediaTestClass::StreamSetPositionL(CStifItemParser& aItem) |
|
3517 { |
|
3518 iLog->Log(_L("CEnhanMediaTestClass::StreamSetPositionL")); |
|
3519 TInt status(KErrNone); |
|
3520 if ( !iMStreamControl ) |
|
3521 { |
|
3522 status = KErrNotReady; |
|
3523 } |
|
3524 TInt data; |
|
3525 aItem.GetNextInt(data); |
|
3526 TPckgBuf<TInt64> pckg; |
|
3527 pckg = data; |
|
3528 status = iMStreamControl->SetPosition(pckg()); |
|
3529 iLog->Log(_L("CEnhanMediaTestClass::StreamSetPositionL [%d]"),status); |
|
3530 return status; |
|
3531 } |
|
3532 TInt CEnhanMediaTestClass::ControlTypeL(CStifItemParser& aItem) |
|
3533 { |
|
3534 iLog->Log(_L("CEnhanMediaTestClass::ControlTypeL INIT")); |
|
3535 TInt status(KErrNone); |
|
3536 TInt control; |
|
3537 aItem.GetNextInt(control); |
|
3538 TUid controlUid(TUid::Uid(0)); |
|
3539 |
|
3540 switch(TControl(control)) |
|
3541 { |
|
3542 case EFILESOURCE: |
|
3543 { |
|
3544 if(iMFileSource) |
|
3545 { |
|
3546 controlUid = iMFileSource->Type(); |
|
3547 } |
|
3548 else |
|
3549 { |
|
3550 status = KErrNotFound; |
|
3551 } |
|
3552 break; |
|
3553 } |
|
3554 case EDATABUFFERSOURCE: |
|
3555 { |
|
3556 if(iMDataBufferSource) |
|
3557 { |
|
3558 controlUid = iMDataBufferSource->Type(); |
|
3559 } |
|
3560 else |
|
3561 { |
|
3562 status = KErrNotFound; |
|
3563 } |
|
3564 break; |
|
3565 } |
|
3566 case EDESCRIPTORSOURCE: |
|
3567 { |
|
3568 if(iMDescriptorSource) |
|
3569 { |
|
3570 controlUid = iMDescriptorSource->Type(); |
|
3571 } |
|
3572 else |
|
3573 { |
|
3574 status = KErrNotFound; |
|
3575 } |
|
3576 break; |
|
3577 } |
|
3578 case ESTREAMCONTROL: |
|
3579 { |
|
3580 if(iMStreamControl) |
|
3581 { |
|
3582 controlUid = iMStreamControl->Type(); |
|
3583 } |
|
3584 else |
|
3585 { |
|
3586 status = KErrNotFound; |
|
3587 } |
|
3588 break; |
|
3589 } |
|
3590 case EMMFAUDIOOUTPUTSINKCONTROL: |
|
3591 { |
|
3592 if(iMAudioSink) |
|
3593 { |
|
3594 controlUid = iMAudioSink->Type(); |
|
3595 } |
|
3596 else |
|
3597 { |
|
3598 status = KErrNotFound; |
|
3599 } |
|
3600 break; |
|
3601 } |
|
3602 case EVOLUMECONTROL: |
|
3603 { |
|
3604 if(iMVolumeControl) |
|
3605 { |
|
3606 controlUid = iMVolumeControl->Type(); |
|
3607 } |
|
3608 else |
|
3609 { |
|
3610 status = KErrNotFound; |
|
3611 } |
|
3612 break; |
|
3613 } |
|
3614 case EBALANCECONTROL: |
|
3615 { |
|
3616 if(iMBalanceControl) |
|
3617 { |
|
3618 controlUid = iMBalanceControl->Type(); |
|
3619 } |
|
3620 else |
|
3621 { |
|
3622 status = KErrNotFound; |
|
3623 } |
|
3624 break; |
|
3625 } |
|
3626 case EPDLSOURCE: |
|
3627 { |
|
3628 if(iMProgDLSource) |
|
3629 { |
|
3630 controlUid = iMProgDLSource->Type(); |
|
3631 } |
|
3632 else |
|
3633 { |
|
3634 status = KErrNotFound; |
|
3635 } |
|
3636 break; |
|
3637 } |
|
3638 } |
|
3639 iLog->Log(_L("CEnhanMediaTestClass::ControlTypeL = [%d]"),control); |
|
3640 return status; |
|
3641 } |
|
3642 TInt CEnhanMediaTestClass::ControlControlTypeL(CStifItemParser& aItem) |
|
3643 { |
|
3644 iLog->Log(_L("CEnhanMediaTestClass::ControlControlTypeL INIT")); |
|
3645 TInt status(KErrNone); |
|
3646 TInt control; |
|
3647 aItem.GetNextInt(control); |
|
3648 TControlType controlType(TControlType(0)); |
|
3649 switch(TControl(control)) |
|
3650 { |
|
3651 case EFILESOURCE: |
|
3652 { |
|
3653 if(iMFileSource) |
|
3654 { |
|
3655 controlType = iMFileSource->ControlType(); |
|
3656 } |
|
3657 else |
|
3658 { |
|
3659 status = KErrNotFound; |
|
3660 } |
|
3661 break; |
|
3662 } |
|
3663 case EDATABUFFERSOURCE: |
|
3664 { |
|
3665 if(iMDataBufferSource) |
|
3666 { |
|
3667 controlType = iMDataBufferSource->ControlType(); |
|
3668 } |
|
3669 else |
|
3670 { |
|
3671 status = KErrNotFound; |
|
3672 } |
|
3673 break; |
|
3674 } |
|
3675 case EDESCRIPTORSOURCE: |
|
3676 { |
|
3677 if(iMDescriptorSource) |
|
3678 { |
|
3679 controlType = iMDescriptorSource->ControlType(); |
|
3680 } |
|
3681 else |
|
3682 { |
|
3683 status = KErrNotFound; |
|
3684 } |
|
3685 break; |
|
3686 } |
|
3687 case ESTREAMCONTROL: |
|
3688 { |
|
3689 if(iMStreamControl) |
|
3690 { |
|
3691 controlType = iMStreamControl->ControlType(); |
|
3692 } |
|
3693 else |
|
3694 { |
|
3695 status = KErrNotFound; |
|
3696 } |
|
3697 break; |
|
3698 } |
|
3699 case EMMFAUDIOOUTPUTSINKCONTROL: |
|
3700 { |
|
3701 if(iMAudioSink) |
|
3702 { |
|
3703 controlType = iMAudioSink->ControlType(); |
|
3704 } |
|
3705 else |
|
3706 { |
|
3707 status = KErrNotFound; |
|
3708 } |
|
3709 break; |
|
3710 } |
|
3711 case EVOLUMECONTROL: |
|
3712 { |
|
3713 if(iMVolumeControl) |
|
3714 { |
|
3715 controlType = iMVolumeControl->ControlType(); |
|
3716 } |
|
3717 else |
|
3718 { |
|
3719 status = KErrNotFound; |
|
3720 } |
|
3721 break; |
|
3722 } |
|
3723 case EBALANCECONTROL: |
|
3724 { |
|
3725 if(iMBalanceControl) |
|
3726 { |
|
3727 controlType = iMBalanceControl->ControlType(); |
|
3728 } |
|
3729 else |
|
3730 { |
|
3731 status = KErrNotFound; |
|
3732 } |
|
3733 break; |
|
3734 } |
|
3735 case EPDLSOURCE: |
|
3736 { |
|
3737 if(iMProgDLSource) |
|
3738 { |
|
3739 controlType = iMProgDLSource->ControlType(); |
|
3740 } |
|
3741 else |
|
3742 { |
|
3743 status = KErrNotFound; |
|
3744 } |
|
3745 break; |
|
3746 } |
|
3747 } |
|
3748 iLog->Log(_L("CEnhanMediaTestClass::ControlControlTypeL = [%d]"),control); |
|
3749 return status; |
|
3750 } |
|
3751 |
|
3752 TInt CEnhanMediaTestClass::DRMSetType(CStifItemParser& aItem) |
|
3753 { |
|
3754 TInt typedrm; |
|
3755 TInt status(KErrNone); |
|
3756 iLog->Log(_L("DRMSetType INIT")); |
|
3757 if (!iDRMConfigIntfc) |
|
3758 { |
|
3759 iLog->Log(_L("iDRMConfigIntfc Not ready")); |
|
3760 status = KErrNotReady; |
|
3761 } |
|
3762 else |
|
3763 { |
|
3764 status = aItem.GetNextInt(typedrm); |
|
3765 if (status != KErrNone) |
|
3766 { |
|
3767 iLog->Log(_L("Parameter was not set into config to set DRM type")); |
|
3768 status = KErrNotReady; |
|
3769 } |
|
3770 else |
|
3771 { |
|
3772 status = iDRMConfigIntfc->SetDRMType(TDRMType(typedrm)); |
|
3773 if (status!=KErrNone) |
|
3774 { |
|
3775 iLog->Log(_L("DRMSetType FAILED")); |
|
3776 } |
|
3777 else |
|
3778 { |
|
3779 iLog->Log(_L("DRMSetType OK")); |
|
3780 } |
|
3781 } |
|
3782 } |
|
3783 return status; |
|
3784 } |
|
3785 TInt CEnhanMediaTestClass::DRMGetType(CStifItemParser& /*aItem*/) |
|
3786 { |
|
3787 TInt status(KErrNone); |
|
3788 TDRMType typedrm; |
|
3789 iLog->Log(_L("DRMGetType INIT")); |
|
3790 if (!iDRMConfigIntfc) |
|
3791 { |
|
3792 iLog->Log(_L("iDRMConfigIntfc Not ready")); |
|
3793 status = KErrNotReady; |
|
3794 } |
|
3795 else |
|
3796 { |
|
3797 status = iDRMConfigIntfc->GetDRMType(typedrm); |
|
3798 if (status!=KErrNone) |
|
3799 { |
|
3800 iLog->Log(_L("DRMGetType FAILED")); |
|
3801 } |
|
3802 else |
|
3803 { |
|
3804 iLog->Log(_L("DRMGetType OK [%d]"),typedrm); |
|
3805 } |
|
3806 } |
|
3807 return status; |
|
3808 } |
|
3809 |
|
3810 TInt CEnhanMediaTestClass::DRMCommit(CStifItemParser& /*aItem*/) |
|
3811 { |
|
3812 TInt status(KErrNone); |
|
3813 iLog->Log(_L("DRMCommit INIT")); |
|
3814 if (!iDRMConfigIntfc) |
|
3815 { |
|
3816 iLog->Log(_L("iDRMConfigIntfc Not ready")); |
|
3817 status = KErrNotReady; |
|
3818 } |
|
3819 else |
|
3820 { |
|
3821 status = iDRMConfigIntfc->Commit(); |
|
3822 if (status!=KErrNone) |
|
3823 { |
|
3824 iLog->Log(_L("DRMCommit FAILED")); |
|
3825 } |
|
3826 else |
|
3827 { |
|
3828 iLog->Log(_L("DRMCommit OK")); |
|
3829 } |
|
3830 } |
|
3831 return status; |
|
3832 } |
|
3833 TInt CEnhanMediaTestClass::DRMGetAllowedOutputDeviceCount( CStifItemParser& /*aItem */) |
|
3834 { |
|
3835 TInt status(KErrNone); |
|
3836 iLog->Log(_L("DRMGetAllowedOutputDeviceCount INIT")); |
|
3837 if (!iDRMConfigIntfc) |
|
3838 { |
|
3839 iLog->Log(_L("iDRMConfigIntfc Not ready")); |
|
3840 status = KErrNotReady; |
|
3841 } |
|
3842 else |
|
3843 { |
|
3844 status = iDRMConfigIntfc->GetAllowedOutputDeviceCount(iAllowedDevice); |
|
3845 if (status!=KErrNone) |
|
3846 { |
|
3847 iLog->Log(_L("DRMGetAllowedOutputDeviceCount FAILED")); |
|
3848 } |
|
3849 else |
|
3850 { |
|
3851 iLog->Log(_L("DRMGetAllowedOutputDeviceCount = [%d]"),iAllowedDevice); |
|
3852 } |
|
3853 } |
|
3854 return status; |
|
3855 |
|
3856 } |
|
3857 TInt CEnhanMediaTestClass::DRMGetAllowedOutputDevice(CStifItemParser& aItem ) |
|
3858 { |
|
3859 TInt status(KErrNone); |
|
3860 TDRMAllowedOutputDevice output; |
|
3861 TInt index; |
|
3862 iLog->Log(_L("DRMGetAllowedOutputDevice INIT")); |
|
3863 if (!iDRMConfigIntfc) |
|
3864 { |
|
3865 iLog->Log(_L("iDRMConfigIntfc Not ready")); |
|
3866 status = KErrNotReady; |
|
3867 } |
|
3868 else |
|
3869 { |
|
3870 aItem.GetNextInt(index); |
|
3871 status = iDRMConfigIntfc->GetAllowedOutputDevice(index, output); |
|
3872 if (status!=KErrNone) |
|
3873 { |
|
3874 iLog->Log(_L("DRMGetAllowedOutputDevice FAILED [%d]"),status); |
|
3875 } |
|
3876 else |
|
3877 { |
|
3878 iLog->Log(_L("DRMGetAllowedOutputDevice = [%d]"),output); |
|
3879 } |
|
3880 } |
|
3881 return status; |
|
3882 } |
|
3883 |
|
3884 TInt CEnhanMediaTestClass::DRMAppendAllowedOutputDevice(CStifItemParser& aItem ) |
|
3885 { |
|
3886 TInt status(KErrNone); |
|
3887 TDRMAllowedOutputDevice output; |
|
3888 TInt index; |
|
3889 iLog->Log(_L("DRMAppendAllowedOutputDevice INIT")); |
|
3890 if (!iDRMConfigIntfc) |
|
3891 { |
|
3892 iLog->Log(_L("iDRMConfigIntfc Not ready")); |
|
3893 status = KErrNotReady; |
|
3894 } |
|
3895 else |
|
3896 { |
|
3897 aItem.GetNextInt(index); |
|
3898 output = TDRMAllowedOutputDevice(index); |
|
3899 status = iDRMConfigIntfc->AppendAllowedOutputDevice(output); |
|
3900 if (status!=KErrNone) |
|
3901 { |
|
3902 iLog->Log(_L("DRMAppendAllowedOutputDevice FAILED [%d]"),status); |
|
3903 } |
|
3904 else |
|
3905 { |
|
3906 iLog->Log(_L("DRMAppendAllowedOutputDevice = [%d]"),output); |
|
3907 } |
|
3908 } |
|
3909 return status; |
|
3910 } |
|
3911 |
|
3912 TInt CEnhanMediaTestClass::DRMRemoveAllowedOutputDevice(CStifItemParser& aItem ) |
|
3913 { |
|
3914 TInt status(KErrNone); |
|
3915 TDRMAllowedOutputDevice output; |
|
3916 TInt index; |
|
3917 iLog->Log(_L("DRMRemoveAllowedOutputDevice INIT")); |
|
3918 if (!iDRMConfigIntfc) |
|
3919 { |
|
3920 iLog->Log(_L("iDRMConfigIntfc Not ready")); |
|
3921 status = KErrNotReady; |
|
3922 } |
|
3923 else |
|
3924 { |
|
3925 aItem.GetNextInt(index); |
|
3926 output = TDRMAllowedOutputDevice(index); |
|
3927 status = iDRMConfigIntfc->RemoveAllowedOutputDevice(output); |
|
3928 if (status != KErrNone) |
|
3929 { |
|
3930 iLog->Log(_L("DRMRemoveAllowedOutputDevice ERROR = [%d]"),status); |
|
3931 } |
|
3932 else |
|
3933 { |
|
3934 iLog->Log(_L("DRMRemoveAllowedOutputDevice = [%d]"),output); |
|
3935 } |
|
3936 } |
|
3937 status = KErrNone; //remove after fixed |
|
3938 return status; |
|
3939 } |
|
3940 TInt CEnhanMediaTestClass::DRMReset() |
|
3941 { |
|
3942 TInt status(KErrNone); |
|
3943 iLog->Log(_L("DRMReset INIT")); |
|
3944 if (!iDRMConfigIntfc) |
|
3945 { |
|
3946 iLog->Log(_L("iDRMConfigIntfc Not ready")); |
|
3947 status = KErrNotReady; |
|
3948 } |
|
3949 else |
|
3950 { |
|
3951 status = iDRMConfigIntfc->Reset(); |
|
3952 if (status!=KErrNone) |
|
3953 { |
|
3954 iLog->Log(_L("DRMReset FAILED ")); |
|
3955 } |
|
3956 else |
|
3957 { |
|
3958 iLog->Log(_L("DRMReset OK")); |
|
3959 } |
|
3960 } |
|
3961 return status; |
|
3962 } |
|
3963 |
|
3964 TInt CEnhanMediaTestClass::CreateSeekableData(CStifItemParser& /*aItem*/) |
|
3965 { |
|
3966 TInt status(KErrNone); |
|
3967 iLog->Log(_L("CreateSeekableData INIT")); |
|
3968 if (!iMDataBufferSource) |
|
3969 { |
|
3970 status = KErrNotReady; |
|
3971 } |
|
3972 else |
|
3973 { |
|
3974 //iDataSourceConfigIntfcImpl = CDataSourceConfigIntfcImpl::NewL(); |
|
3975 if(status == KErrNone) |
|
3976 { |
|
3977 // iSourceControl = CCacheSource::NewL(*iSourceControl,iDataSourceConfigIntfcImpl); |
|
3978 |
|
3979 } |
|
3980 |
|
3981 } |
|
3982 return status; |
|
3983 } |
|
3984 |
|
3985 TInt CEnhanMediaTestClass::GeneralGen_StartProgDLL(CStifItemParser& aItem) |
|
3986 { |
|
3987 TInt status = KErrNone; |
|
3988 TPtrC string; |
|
3989 //AddExpectedEvent(EEStartDownload,KMediumTimeout); |
|
3990 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
3991 |
|
3992 status = aItem.GetNextString ( string ); |
|
3993 |
|
3994 if ( status != KErrNone ) |
|
3995 { |
|
3996 iLog->Log(_L("CHelixSTIFClient:: File name missing in config file ")); |
|
3997 return status; |
|
3998 } |
|
3999 else |
|
4000 { |
|
4001 if(iUrlName) |
|
4002 { |
|
4003 delete iUrlName; |
|
4004 iUrlName = NULL; |
|
4005 } |
|
4006 iUrlName = HBufC8::NewL(string.Length()); |
|
4007 TPtr8 des = iUrlName->Des(); |
|
4008 des.Copy(string); |
|
4009 } |
|
4010 |
|
4011 status = aItem.GetNextString ( string ); |
|
4012 |
|
4013 if ( status != KErrNone ) |
|
4014 { |
|
4015 iLog->Log(_L("CHelixSTIFClient:: File name missing in config file ")); |
|
4016 return status; |
|
4017 } |
|
4018 else |
|
4019 { |
|
4020 if(iAccessPtName) |
|
4021 { |
|
4022 delete iAccessPtName; |
|
4023 iAccessPtName = NULL; |
|
4024 } |
|
4025 iAccessPtName = HBufC::NewL(string.Length()); |
|
4026 TPtr des = iAccessPtName->Des(); |
|
4027 des.Copy(string); |
|
4028 } |
|
4029 |
|
4030 status = aItem.GetNextString ( string ); |
|
4031 |
|
4032 if ( status != KErrNone ) |
|
4033 { |
|
4034 iLog->Log(_L("CHelixSTIFClient:: File name missing in config file ")); |
|
4035 return status; |
|
4036 } |
|
4037 else |
|
4038 { |
|
4039 if(iFileName) |
|
4040 { |
|
4041 delete iFileName; |
|
4042 iFileName = NULL; |
|
4043 } |
|
4044 iFileName = HBufC::NewL(string.Length()); |
|
4045 TPtr des = iFileName->Des(); |
|
4046 des.Copy(string); |
|
4047 } |
|
4048 |
|
4049 if ( !iDMgrConnected ) |
|
4050 { |
|
4051 TRAP(status,iDownloadMgr.ConnectL( TUid::Uid(1), *this, EFalse )); |
|
4052 if(!status) |
|
4053 { |
|
4054 iDMgrConnected = ETrue; |
|
4055 } |
|
4056 else |
|
4057 { |
|
4058 iLog->Log(_L("CHelixSTIFClient::GeneralGen_StartProgDLL Connection failed to DlMgr ")); |
|
4059 return status; |
|
4060 } |
|
4061 } |
|
4062 |
|
4063 // Get IAP names and ids from the database |
|
4064 TInt res; |
|
4065 TBuf<40> name; |
|
4066 TUint32 id; |
|
4067 |
|
4068 CCommsDatabase* TheDb = CCommsDatabase::NewL(EDatabaseTypeIAP); |
|
4069 CleanupStack::PushL(TheDb); |
|
4070 |
|
4071 TheDb->ShowHiddenRecords(); |
|
4072 |
|
4073 CCommsDbTableView* view = TheDb->OpenTableLC(TPtrC(IAP)); |
|
4074 res = view->GotoFirstRecord(); |
|
4075 |
|
4076 while(res == KErrNone) |
|
4077 { |
|
4078 view->ReadTextL(TPtrC(COMMDB_NAME), name); |
|
4079 view->ReadUintL(TPtrC(COMMDB_ID), id); |
|
4080 |
|
4081 iLog->Log(_L("CHelixSTIFClient::GeneralGen_StartProgDLL Name[%s] ID[%d] "),&name,id); |
|
4082 if(!iAccessPtName->Des().Compare(name)) |
|
4083 { |
|
4084 break; |
|
4085 } |
|
4086 |
|
4087 res = view->GotoNextRecord(); |
|
4088 RDebug::Print(_L("IAP name, id: %S, %d"), &name, id); |
|
4089 } |
|
4090 |
|
4091 CleanupStack::PopAndDestroy(); // view |
|
4092 CleanupStack::PopAndDestroy(); // TheDb |
|
4093 |
|
4094 status = iDownloadMgr.SetIntAttribute( EDlMgrIap,id ); |
|
4095 if(status != KErrNone) |
|
4096 { |
|
4097 return status; |
|
4098 } |
|
4099 |
|
4100 status = iDownloadMgr.SetDefaultStringAttribute( EDlAttrDestFilename, *iFileName ) ; |
|
4101 |
|
4102 |
|
4103 TRAP(status,iDownload = &(iDownloadMgr.CreateDownloadL(*iUrlName))); |
|
4104 if(status != KErrNone) |
|
4105 { |
|
4106 return status; |
|
4107 } |
|
4108 |
|
4109 status = iDownload->Start(); |
|
4110 if(status != KErrNone) |
|
4111 { |
|
4112 iLog->Log(_L("CHelixSTIFClient::GeneralGen_StartProgDLL Download Start Failed ")); |
|
4113 return status; |
|
4114 } |
|
4115 status = iDownload->GetIntAttribute(EDlAttrId, iDownloadId); |
|
4116 if(status != KErrNone) |
|
4117 { |
|
4118 iLog->Log(_L("CHelixSTIFClient::GeneralGen_StartProgDLL Getting DLId failed ")); |
|
4119 return status; |
|
4120 } |
|
4121 |
|
4122 if(iActive) |
|
4123 { |
|
4124 delete iActive; |
|
4125 iActive = NULL; |
|
4126 } |
|
4127 |
|
4128 iActive = new CActiveSchedulerWait; |
|
4129 RDebug::Print(_L("Before")); |
|
4130 iLog->Log(_L("Before = %d"), status); |
|
4131 iActive->Start(); |
|
4132 iLog->Log(_L("After = %d"), status); |
|
4133 RDebug::Print(_L("AFter")); |
|
4134 iLog->Log(_L("CEnhanMediaTestClass::GeneralGen_StartProgDLL = %d"), status); |
|
4135 return status; |
|
4136 } |
|
4137 |
|
4138 |
|
4139 TInt CEnhanMediaTestClass::PDLSOpenL(CStifItemParser& /*aItem*/) |
|
4140 { |
|
4141 AddExpectedEvent(EEPDLSOpen,KMediumTimeout); |
|
4142 TInt status(KErrNone); |
|
4143 //TBool stateDL; |
|
4144 //TUint percent; |
|
4145 if(!iMProgDLSource) |
|
4146 { |
|
4147 return status = KErrNotReady; |
|
4148 } |
|
4149 status = iMProgDLSource->Open(*iFileName,iDownloadId); |
|
4150 // iMProgDLSource->GetPercentageDownloaded(percent); |
|
4151 return status; |
|
4152 } |
|
4153 |
|
4154 TInt CEnhanMediaTestClass::PDLSGetCurFileSizeL(CStifItemParser& /*aItem*/) |
|
4155 { |
|
4156 TInt status(KErrNone); |
|
4157 TUint fileSize; |
|
4158 if(!iMProgDLSource) |
|
4159 { |
|
4160 return status = KErrNotReady; |
|
4161 } |
|
4162 status = iMProgDLSource->GetCurrentFileSize(fileSize); |
|
4163 iLog->Log(_L("PDLSGetCurFileSizeL = %d"), fileSize); |
|
4164 return status; |
|
4165 } |
|
4166 |
|
4167 TInt CEnhanMediaTestClass::PDLSGetExpFileSizeL(CStifItemParser& /*aItem*/) |
|
4168 { |
|
4169 TInt status(KErrNone); |
|
4170 TUint fileSize; |
|
4171 if(!iMProgDLSource) |
|
4172 { |
|
4173 return status = KErrNotReady; |
|
4174 } |
|
4175 status = iMProgDLSource->GetExpectedFileSize(fileSize); |
|
4176 iLog->Log(_L("PDLSGetExpFileSizeL = %d"), fileSize); |
|
4177 |
|
4178 return status; |
|
4179 } |
|
4180 |
|
4181 TInt CEnhanMediaTestClass::PDLSGetDLStatusL(CStifItemParser& /*aItem*/) |
|
4182 { |
|
4183 TInt status(KErrNone); |
|
4184 MProgDLSource::TDownloadStatus dlStatus; |
|
4185 if(!iMProgDLSource) |
|
4186 { |
|
4187 return status = KErrNotReady; |
|
4188 } |
|
4189 |
|
4190 dlStatus = iMProgDLSource->GetDownloadStatus(); |
|
4191 iLog->Log(_L("PDLSGetDLStatusL = %d"), dlStatus); |
|
4192 |
|
4193 return status; |
|
4194 } |
|
4195 |
|
4196 |
|
4197 TInt CEnhanMediaTestClass::PDLSIsDLCompleteL(CStifItemParser& /*aItem*/) |
|
4198 { |
|
4199 TInt status(KErrNone); |
|
4200 TBool dlComplete; |
|
4201 if(!iMProgDLSource) |
|
4202 { |
|
4203 return status = KErrNotReady; |
|
4204 } |
|
4205 |
|
4206 status = iMProgDLSource->IsDownloadComplete(dlComplete); |
|
4207 iLog->Log(_L("PDLSIsDLCompleteL = %d"), dlComplete); |
|
4208 |
|
4209 return status; |
|
4210 } |
|
4211 |
|
4212 TInt CEnhanMediaTestClass::PDLSGetPerDownloadedL(CStifItemParser& /*aItem*/) |
|
4213 { |
|
4214 TInt status(KErrNone); |
|
4215 TUint perDl; |
|
4216 if(!iMProgDLSource) |
|
4217 { |
|
4218 return status = KErrNotReady; |
|
4219 } |
|
4220 |
|
4221 status = iMProgDLSource->GetPercentageDownloaded(perDl); |
|
4222 iLog->Log(_L("PDLSGetPerDownloadedL = %d"), perDl); |
|
4223 |
|
4224 return status; |
|
4225 } |
|
4226 |
|
4227 TInt CEnhanMediaTestClass::PDLSGetPerBufferedL(CStifItemParser& /*aItem*/) |
|
4228 { |
|
4229 TInt status(KErrNone); |
|
4230 TUint perBuf; |
|
4231 if(!iMProgDLSource) |
|
4232 { |
|
4233 return status = KErrNotReady; |
|
4234 } |
|
4235 |
|
4236 status = iMProgDLSource->GetPercentageBuffered(perBuf); |
|
4237 iLog->Log(_L("PDLSGetPerBufferedL = %d"), perBuf); |
|
4238 return status; |
|
4239 } |
|
4240 |
|
4241 TInt CEnhanMediaTestClass::PDLSGetDLRateL(CStifItemParser& /*aItem*/) |
|
4242 { |
|
4243 TInt status(KErrNone); |
|
4244 TUint dlRate; |
|
4245 if(!iMProgDLSource) |
|
4246 { |
|
4247 return status = KErrNotReady; |
|
4248 } |
|
4249 |
|
4250 status = iMProgDLSource->GetDownloadingRate(dlRate); |
|
4251 iLog->Log(_L("PDLSGetDLRateL = %d"), dlRate); |
|
4252 |
|
4253 return status; |
|
4254 } |
|
4255 |
|
4256 TInt CEnhanMediaTestClass::PDLSGetBitRateL(CStifItemParser& /*aItem*/) |
|
4257 { |
|
4258 TInt status(KErrNone); |
|
4259 TUint bitRate; |
|
4260 if(!iMProgDLSource) |
|
4261 { |
|
4262 return status = KErrNotReady; |
|
4263 } |
|
4264 |
|
4265 status = iMProgDLSource->GetBitRate(bitRate); |
|
4266 iLog->Log(_L("PDLSGetBitRateL = %d"), bitRate); |
|
4267 |
|
4268 return status; |
|
4269 } |
|
4270 |
|
4271 TInt CEnhanMediaTestClass::PDLSResumeDownloadL(CStifItemParser& /*aItem*/) |
|
4272 { |
|
4273 TInt status(KErrNone); |
|
4274 if(!iMProgDLSource) |
|
4275 { |
|
4276 return status = KErrNotReady; |
|
4277 } |
|
4278 |
|
4279 status = iMProgDLSource->ResumeDownload(); |
|
4280 iLog->Log(_L("PDLSResumeDownloadL = %d"), status); |
|
4281 |
|
4282 return status; |
|
4283 } |
|
4284 |
|
4285 TInt CEnhanMediaTestClass::PDLSMoveFileL(CStifItemParser& aItem) |
|
4286 { |
|
4287 TInt status(KErrNone); |
|
4288 TPtrC string; |
|
4289 TFileName fileName; |
|
4290 if(!iMProgDLSource) |
|
4291 { |
|
4292 return status = KErrNotReady; |
|
4293 } |
|
4294 status = aItem.GetNextString(string); |
|
4295 if ( status != KErrNone ) |
|
4296 { |
|
4297 iLog->Log(_L("CEnhanMediaTestClass:: File name missing in config file ")); |
|
4298 return status; |
|
4299 } |
|
4300 else |
|
4301 { |
|
4302 fileName.Copy(string); |
|
4303 } |
|
4304 if(iFileName) |
|
4305 { |
|
4306 delete iFileName; |
|
4307 iFileName = NULL; |
|
4308 } |
|
4309 iFileName = HBufC::NewL(fileName.Length()); |
|
4310 iFileName->Des().Copy(fileName); |
|
4311 |
|
4312 |
|
4313 status = iMProgDLSource->MoveFile(*iFileName); |
|
4314 iLog->Log(_L("PDLSMoveFileL = %d"), status); |
|
4315 |
|
4316 return status; |
|
4317 } |
|
4318 |
|
4319 TInt CEnhanMediaTestClass::PDLSGetSize(CStifItemParser& /*aItem*/) |
|
4320 { |
|
4321 |
|
4322 iLog->Log(_L("CEnhanMediaTestClass::PDLSGetSize ")); |
|
4323 TInt status(KErrNone); |
|
4324 TUint sizes = 0; |
|
4325 if(!iMProgDLSource) |
|
4326 { |
|
4327 status = KErrNotReady; |
|
4328 } |
|
4329 else |
|
4330 { |
|
4331 status = iMProgDLSource->GetSize(sizes); |
|
4332 } |
|
4333 iLog->Log(_L("CEnhanMediaTestClass::PDLSGetSize [%d]"), status); |
|
4334 |
|
4335 return status; |
|
4336 } |
|
4337 |
|
4338 TInt CEnhanMediaTestClass::PDLSCancelDownloadL(CStifItemParser& /*aItem*/) |
|
4339 { |
|
4340 TMediaId mediaId; |
|
4341 TFourCC dataType; |
|
4342 iLog->Log(_L("CEnhanMediaTestClass::PDLSCancelDownloadL ")); |
|
4343 TInt status(KErrNone); |
|
4344 if(!iMProgDLSource) |
|
4345 { |
|
4346 status = KErrNotReady; |
|
4347 } |
|
4348 else |
|
4349 { |
|
4350 status = iMProgDLSource->CancelDownload(); |
|
4351 } |
|
4352 iLog->Log(_L("CEnhanMediaTestClass::PDLSCancelDownloadL [%d]"), status); |
|
4353 |
|
4354 return status; |
|
4355 } |
|
4356 |
|
4357 TInt CEnhanMediaTestClass::StreamCustomInterface(CStifItemParser& /*aItem*/) |
|
4358 { |
|
4359 iLog->Log(_L("CEnhanMediaTestClass::StreamCustomInterface ")); |
|
4360 TInt status(KErrNone); |
|
4361 if(!iMStreamControl) |
|
4362 { |
|
4363 status = KErrNotReady; |
|
4364 } |
|
4365 else |
|
4366 { |
|
4367 TUid controlUid(TUid::Uid(0x101F7D8D)); |
|
4368 iMStreamControl->CustomInterface(controlUid); |
|
4369 controlUid = TUid::Uid(0x10207BA8); |
|
4370 iMStreamControl->CustomInterface(controlUid); |
|
4371 controlUid = TUid::Uid(0x10207BA9); |
|
4372 iMStreamControl->CustomInterface(controlUid); |
|
4373 } |
|
4374 iLog->Log(_L("CEnhanMediaTestClass::StreamCustomInterface")); |
|
4375 |
|
4376 return status; |
|
4377 } |
|
4378 TInt CEnhanMediaTestClass::AudioEffectIsEnabled (CStifItemParser& /*aItem*/) |
|
4379 { |
|
4380 TInt status(KErrNone); |
|
4381 TBool enabled; |
|
4382 |
|
4383 if(!iEffectControl) |
|
4384 { |
|
4385 status = KErrNotReady; |
|
4386 } |
|
4387 |
|
4388 status = static_cast<MAudioEffectControl*>(iEffectControl)->IsEnabled(enabled); |
|
4389 |
|
4390 if (status == KErrNone) |
|
4391 { |
|
4392 iLog->Log(_L("AudioEffectIsEnabled status = %d"), status); |
|
4393 } |
|
4394 else |
|
4395 { |
|
4396 iLog->Log(_L("AudioEffectIsEnabled ERROR = [%d]"), status); |
|
4397 } |
|
4398 |
|
4399 return status; |
|
4400 } |
|
4401 |
|
4402 TInt CEnhanMediaTestClass::AudioEffectIsEnforced (CStifItemParser& /*aItem*/) |
|
4403 { |
|
4404 TInt status(KErrNone); |
|
4405 TBool enforced; |
|
4406 |
|
4407 if(!iEffectControl) |
|
4408 { |
|
4409 status = KErrNotReady; |
|
4410 } |
|
4411 |
|
4412 status = static_cast<MAudioEffectControl*>(iEffectControl)->IsEnforced(enforced); |
|
4413 |
|
4414 if (status == KErrNone) |
|
4415 { |
|
4416 iLog->Log(_L("AudioEffectIsEnforced status = %d"), status); |
|
4417 } |
|
4418 else |
|
4419 { |
|
4420 iLog->Log(_L("AudioEffectIsEnforced ERROR = [%d]"), status); |
|
4421 } |
|
4422 |
|
4423 return status; |
|
4424 } |
|
4425 |
|
4426 TInt CEnhanMediaTestClass::AudioEffectUid (CStifItemParser& /*aItem*/) |
|
4427 { |
|
4428 TInt status(KErrNone); |
|
4429 TUid effectUid; |
|
4430 |
|
4431 if(!iEffectControl) |
|
4432 { |
|
4433 status = KErrNotReady; |
|
4434 } |
|
4435 |
|
4436 status = static_cast<MAudioEffectControl*>(iEffectControl)->Uid(effectUid); |
|
4437 |
|
4438 if (status == KErrNone) |
|
4439 { |
|
4440 iLog->Log(_L("AudioEffectUid status = %d"), status); |
|
4441 } |
|
4442 else |
|
4443 { |
|
4444 iLog->Log(_L("AudioEffectUid ERROR = [%d]"), status); |
|
4445 } |
|
4446 |
|
4447 return status; |
|
4448 } |
|
4449 |
|
4450 TInt CEnhanMediaTestClass::AudioEffectHaveUpdateRights (CStifItemParser& /*aItem*/) |
|
4451 { |
|
4452 TInt status(KErrNone); |
|
4453 TBool rights; |
|
4454 |
|
4455 if(!iEffectControl) |
|
4456 { |
|
4457 status = KErrNotReady; |
|
4458 } |
|
4459 |
|
4460 status = static_cast<MAudioEffectControl*>(iEffectControl)->HaveUpdateRights(rights); |
|
4461 |
|
4462 if (status == KErrNone) |
|
4463 { |
|
4464 iLog->Log(_L("AudioEffectHaveUpdateRights status = %d"), status); |
|
4465 } |
|
4466 else |
|
4467 { |
|
4468 iLog->Log(_L("AudioEffectHaveUpdateRights ERROR = [%d]"), status); |
|
4469 } |
|
4470 |
|
4471 return status; |
|
4472 } |
|
4473 |
|
4474 TInt CEnhanMediaTestClass::AudioEffectEnforce (CStifItemParser& aItem) |
|
4475 { |
|
4476 TInt status(KErrNone); |
|
4477 TBool enforce; |
|
4478 |
|
4479 status = aItem.GetNextInt(enforce); |
|
4480 if (status != KErrNone) |
|
4481 { |
|
4482 iLog->Log(_L("AudioEffectEnforce ERROR = [%d]"), status); |
|
4483 return status; |
|
4484 } |
|
4485 |
|
4486 if(!iEffectControl) |
|
4487 { |
|
4488 status = KErrNotReady; |
|
4489 } |
|
4490 |
|
4491 status = static_cast<MAudioEffectControl*>(iEffectControl)->Enforce(enforce); |
|
4492 |
|
4493 if (status == KErrNone) |
|
4494 { |
|
4495 iLog->Log(_L("AudioEffectEnforce status = %d"), status); |
|
4496 } |
|
4497 else |
|
4498 { |
|
4499 iLog->Log(_L("AudioEffectEnforce ERROR = [%d]"), status); |
|
4500 } |
|
4501 |
|
4502 return status; |
|
4503 } |
|
4504 |
|
4505 TInt CEnhanMediaTestClass::HandleAudioEffectEnableL(CStifItemParser& aItem) |
|
4506 { |
|
4507 iLog->Log(_L("CEnhanMediaTestClass::HandleAudioEffectEnableL")); |
|
4508 TInt status(KErrNone); |
|
4509 TInt control; |
|
4510 status = aItem.GetNextInt(control); |
|
4511 if (status != KErrNone) |
|
4512 { |
|
4513 iLog->Log(_L("AudioEffectEnable ERROR = [%d]"), status); |
|
4514 return status; |
|
4515 } |
|
4516 |
|
4517 TControl controlType = TControl(control); |
|
4518 |
|
4519 switch(controlType) |
|
4520 { |
|
4521 case EVOLUMECONTROL: |
|
4522 { |
|
4523 iEffectControl = iMVolumeControl; |
|
4524 } |
|
4525 break; |
|
4526 case EBALANCECONTROL: |
|
4527 { |
|
4528 iEffectControl = iMBalanceControl; |
|
4529 } |
|
4530 break; |
|
4531 case EEQUALIZERCONTROL: |
|
4532 { |
|
4533 iEffectControl = iMEqualizerControl; |
|
4534 } |
|
4535 break; |
|
4536 case EREVERBCONTROL: |
|
4537 { |
|
4538 iEffectControl = iMReverbControl; |
|
4539 } |
|
4540 break; |
|
4541 case EBASSBOOSTCONTROL: |
|
4542 { |
|
4543 iEffectControl = iMBassBoostControl; |
|
4544 } |
|
4545 break; |
|
4546 |
|
4547 case ESTEREOWIDCONTROL: |
|
4548 { |
|
4549 iEffectControl = iMStereoWideningControl; |
|
4550 } |
|
4551 break; |
|
4552 |
|
4553 |
|
4554 case ELOUDNESSCONTROL: |
|
4555 { |
|
4556 iEffectControl = iMLoudnessControl; |
|
4557 } |
|
4558 break; |
|
4559 |
|
4560 |
|
4561 case EROOMLEVELCONTROL: |
|
4562 { |
|
4563 iEffectControl = iMRoomLevelControl; |
|
4564 } |
|
4565 break; |
|
4566 |
|
4567 |
|
4568 case EDISTATTCONTROL: |
|
4569 { |
|
4570 iEffectControl = iMDistanceAttenuationControl; |
|
4571 } |
|
4572 break; |
|
4573 |
|
4574 |
|
4575 case ELISTDOPPCONTROL: |
|
4576 { |
|
4577 iEffectControl = iMListenerDopplerControl; |
|
4578 } |
|
4579 break; |
|
4580 |
|
4581 |
|
4582 case ESOURDOPPCONTROL: |
|
4583 { |
|
4584 iEffectControl = iMSourceDopplerControl; |
|
4585 } |
|
4586 break; |
|
4587 |
|
4588 |
|
4589 case ELISTLOCCONTROL: |
|
4590 { |
|
4591 iEffectControl = iMListenerLocationControl; |
|
4592 } |
|
4593 break; |
|
4594 |
|
4595 |
|
4596 case ESOURLOCCONTROL: |
|
4597 { |
|
4598 iEffectControl = iMSourceLocationControl; |
|
4599 } |
|
4600 break; |
|
4601 |
|
4602 |
|
4603 case ELISTORIENTCONTROL: |
|
4604 { |
|
4605 iEffectControl = iMListenerOrientationControl; |
|
4606 } |
|
4607 break; |
|
4608 |
|
4609 |
|
4610 case ESOURORIENTCONTROL: |
|
4611 { |
|
4612 iEffectControl = iMSourceOrientationControl; |
|
4613 } |
|
4614 break; |
|
4615 |
|
4616 } |
|
4617 status = static_cast<MAudioEffectControl*>(iEffectControl)->Enable(); |
|
4618 iLog->Log(_L("CEnhanMediaTestClass::HandleAudioEffectEnableL END")); |
|
4619 if (status == KErrNone) |
|
4620 { |
|
4621 iLog->Log(_L("AudioEffectEnable status = %d"), status); |
|
4622 } |
|
4623 else |
|
4624 { |
|
4625 iLog->Log(_L("AudioEffectEnable ERROR = [%d]"), status); |
|
4626 } |
|
4627 return status; |
|
4628 } |
|
4629 |
|
4630 TInt CEnhanMediaTestClass::HandleAudioEffectDisableL(CStifItemParser& aItem) |
|
4631 { |
|
4632 iLog->Log(_L("CEnhanMediaTestClass::HandleAudioEffectDisableL")); |
|
4633 TInt status(KErrNone); |
|
4634 TInt controltype = 0; |
|
4635 status = aItem.GetNextInt(controltype); |
|
4636 if (status != KErrNone) |
|
4637 { |
|
4638 iLog->Log(_L("AudioEffectDisable ERROR = [%d]"), status); |
|
4639 return status; |
|
4640 } |
|
4641 |
|
4642 switch(TControl(controltype)) |
|
4643 { |
|
4644 case EVOLUMECONTROL: |
|
4645 { |
|
4646 iEffectControl = iMVolumeControl; |
|
4647 } |
|
4648 break; |
|
4649 case EBALANCECONTROL: |
|
4650 { |
|
4651 iEffectControl = iMBalanceControl; |
|
4652 } |
|
4653 break; |
|
4654 case EEQUALIZERCONTROL: |
|
4655 { |
|
4656 iEffectControl = iMEqualizerControl; |
|
4657 } |
|
4658 break; |
|
4659 case EREVERBCONTROL: |
|
4660 { |
|
4661 iEffectControl = iMReverbControl; |
|
4662 } |
|
4663 break; |
|
4664 case EBASSBOOSTCONTROL: |
|
4665 { |
|
4666 iEffectControl = iMBassBoostControl; |
|
4667 } |
|
4668 break; |
|
4669 |
|
4670 case ESTEREOWIDCONTROL: |
|
4671 { |
|
4672 iEffectControl = iMStereoWideningControl; |
|
4673 } |
|
4674 break; |
|
4675 |
|
4676 |
|
4677 case ELOUDNESSCONTROL: |
|
4678 { |
|
4679 iEffectControl = iMLoudnessControl; |
|
4680 } |
|
4681 break; |
|
4682 |
|
4683 |
|
4684 case EROOMLEVELCONTROL: |
|
4685 { |
|
4686 iEffectControl = iMRoomLevelControl; |
|
4687 } |
|
4688 break; |
|
4689 |
|
4690 |
|
4691 case EDISTATTCONTROL: |
|
4692 { |
|
4693 iEffectControl = iMDistanceAttenuationControl; |
|
4694 } |
|
4695 break; |
|
4696 |
|
4697 |
|
4698 case ELISTDOPPCONTROL: |
|
4699 { |
|
4700 iEffectControl = iMListenerDopplerControl; |
|
4701 } |
|
4702 break; |
|
4703 |
|
4704 |
|
4705 case ESOURDOPPCONTROL: |
|
4706 { |
|
4707 iEffectControl = iMSourceDopplerControl; |
|
4708 } |
|
4709 break; |
|
4710 |
|
4711 |
|
4712 case ELISTLOCCONTROL: |
|
4713 { |
|
4714 iEffectControl = iMListenerLocationControl; |
|
4715 } |
|
4716 break; |
|
4717 |
|
4718 |
|
4719 case ESOURLOCCONTROL: |
|
4720 { |
|
4721 iEffectControl = iMSourceLocationControl; |
|
4722 } |
|
4723 break; |
|
4724 |
|
4725 |
|
4726 case ELISTORIENTCONTROL: |
|
4727 { |
|
4728 iEffectControl = iMListenerOrientationControl; |
|
4729 } |
|
4730 break; |
|
4731 |
|
4732 |
|
4733 case ESOURORIENTCONTROL: |
|
4734 { |
|
4735 iEffectControl = iMSourceOrientationControl; |
|
4736 } |
|
4737 break; |
|
4738 |
|
4739 } |
|
4740 status = static_cast<MAudioEffectControl*>(iEffectControl)->Disable(); |
|
4741 if (status == KErrNone) |
|
4742 { |
|
4743 iLog->Log(_L("AudioEffectDisable status = %d"), status); |
|
4744 } |
|
4745 else |
|
4746 { |
|
4747 iLog->Log(_L("AudioEffectDisable ERROR = [%d]"), status); |
|
4748 } |
|
4749 iLog->Log(_L("CEnhanMediaTestClass::HandleAudioEffectDisableL END")); |
|
4750 return status; |
|
4751 } |
|
4752 |
|
4753 |
|
4754 TInt CEnhanMediaTestClass::HandleReverbDecayHFRatioL(CStifItemParser& /*aItem*/) |
|
4755 { |
|
4756 TInt status(KErrNone); |
|
4757 TUint ratio; |
|
4758 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDecayHFRatioL")); |
|
4759 if(!iEffectControl) |
|
4760 { |
|
4761 return status = KErrNotReady; |
|
4762 } |
|
4763 status = static_cast<MReverbControl*>(iEffectControl)->DecayHFRatio(ratio); |
|
4764 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDecayHFRatioL END")); |
|
4765 |
|
4766 return status; |
|
4767 } |
|
4768 |
|
4769 TInt CEnhanMediaTestClass::HandleReverbDecayHFRatioRangeL(CStifItemParser& /*aItem*/) |
|
4770 { |
|
4771 |
|
4772 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDecayHFRatioRangeL")); |
|
4773 TInt status(KErrNone); |
|
4774 //status = aItem.GetNextInt(controltype); |
|
4775 TUint min,max; |
|
4776 if(!iEffectControl) |
|
4777 { |
|
4778 return status = KErrNotReady; |
|
4779 } |
|
4780 status = static_cast<MReverbControl*>(iEffectControl)->DecayHFRatioRange(min,max); |
|
4781 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDecayHFRatioRangeL min [%d] - max [%d]"),min,max); |
|
4782 return status; |
|
4783 } |
|
4784 |
|
4785 |
|
4786 TInt CEnhanMediaTestClass::HandleReverbDecayTimeL(CStifItemParser& /*aItem*/) |
|
4787 { |
|
4788 |
|
4789 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDecayTimeL")); |
|
4790 TInt status(KErrNone); |
|
4791 //status = aItem.GetNextInt(controltype); |
|
4792 TUint value; |
|
4793 if(!iEffectControl) |
|
4794 { |
|
4795 return status = KErrNotReady; |
|
4796 } |
|
4797 status = static_cast<MReverbControl*>(iEffectControl)->DecayTime(value); |
|
4798 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDecayTimeL [%d]"),value); |
|
4799 return status; |
|
4800 } |
|
4801 |
|
4802 TInt CEnhanMediaTestClass::HandleReverbDecayTimeRangeL(CStifItemParser& /*aItem*/) |
|
4803 { |
|
4804 |
|
4805 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDecayTimeL")); |
|
4806 TInt status(KErrNone); |
|
4807 //status = aItem.GetNextInt(controltype); |
|
4808 TUint max, min; |
|
4809 if(!iEffectControl) |
|
4810 { |
|
4811 return status = KErrNotReady; |
|
4812 } |
|
4813 status = static_cast<MReverbControl*>(iEffectControl)->DecayTimeRange(min,max); |
|
4814 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDecayTimeL min[%d] - max[%d]"),min,max); |
|
4815 return status; |
|
4816 } |
|
4817 |
|
4818 TInt CEnhanMediaTestClass::HandleReverbDensityL(CStifItemParser& /*aItem*/) |
|
4819 { |
|
4820 |
|
4821 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDecayTimeL")); |
|
4822 TInt status(KErrNone); |
|
4823 //status = aItem.GetNextInt(controltype); |
|
4824 TUint value; |
|
4825 if(!iEffectControl) |
|
4826 { |
|
4827 return status = KErrNotReady; |
|
4828 } |
|
4829 status = static_cast<MReverbControl*>(iEffectControl)->Density(value); |
|
4830 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDecayTimeL [%d]"),value); |
|
4831 return status; |
|
4832 } |
|
4833 |
|
4834 TInt CEnhanMediaTestClass::HandleReverbDiffusionL(CStifItemParser& /*aItem*/) |
|
4835 { |
|
4836 |
|
4837 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDecayTimeL")); |
|
4838 TInt status(KErrNone); |
|
4839 //status = aItem.GetNextInt(controltype); |
|
4840 TUint value; |
|
4841 if(!iEffectControl) |
|
4842 { |
|
4843 return status = KErrNotReady; |
|
4844 } |
|
4845 status = static_cast<MReverbControl*>(iEffectControl)->Diffusion(value); |
|
4846 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDecayTimeL value = [%d]"),value); |
|
4847 return status; |
|
4848 } |
|
4849 |
|
4850 TInt CEnhanMediaTestClass::HandleReverbReflectionsDelayL(CStifItemParser& /*aItem*/) |
|
4851 { |
|
4852 |
|
4853 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbReflectionsDelayL")); |
|
4854 TInt status(KErrNone); |
|
4855 //status = aItem.GetNextInt(controltype); |
|
4856 TUint value; |
|
4857 if(!iEffectControl) |
|
4858 { |
|
4859 return status = KErrNotReady; |
|
4860 } |
|
4861 status = static_cast<MReverbControl*>(iEffectControl)->ReflectionsDelay(value); |
|
4862 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbReflectionsDelayL value = [%d]"),value); |
|
4863 return status; |
|
4864 } |
|
4865 |
|
4866 TInt CEnhanMediaTestClass::HandleReverbReflectionsDelayMaxL(CStifItemParser& /*aItem*/) |
|
4867 { |
|
4868 |
|
4869 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbReflectionsDelayMaxL")); |
|
4870 TInt status(KErrNone); |
|
4871 //status = aItem.GetNextInt(controltype); |
|
4872 TUint value; |
|
4873 if(!iEffectControl) |
|
4874 { |
|
4875 return status = KErrNotReady; |
|
4876 } |
|
4877 status = static_cast<MReverbControl*>(iEffectControl)->ReflectionsDelayMax(value); |
|
4878 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbReflectionsDelayMaxL value = [%d]"),value); |
|
4879 return status; |
|
4880 } |
|
4881 |
|
4882 |
|
4883 TInt CEnhanMediaTestClass::HandleReverbReflectionsLevelL(CStifItemParser& /*aItem*/) |
|
4884 { |
|
4885 |
|
4886 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbReflectionsLevelL")); |
|
4887 TInt status(KErrNone); |
|
4888 //status = aItem.GetNextInt(controltype); |
|
4889 TInt value; |
|
4890 if(!iEffectControl) |
|
4891 { |
|
4892 return status = KErrNotReady; |
|
4893 } |
|
4894 status = static_cast<MReverbControl*>(iEffectControl)->ReflectionsLevel(value); |
|
4895 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbReflectionsLevelL value = [%d]"),value); |
|
4896 return status; |
|
4897 } |
|
4898 |
|
4899 TInt CEnhanMediaTestClass::HandleReverbReflectionLevelRangeL(CStifItemParser& /*aItem*/) |
|
4900 { |
|
4901 |
|
4902 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbReflectionLevelRangeL")); |
|
4903 TInt status(KErrNone); |
|
4904 //status = aItem.GetNextInt(controltype); |
|
4905 TInt min,max; |
|
4906 if(!iEffectControl) |
|
4907 { |
|
4908 return status = KErrNotReady; |
|
4909 } |
|
4910 status = static_cast<MReverbControl*>(iEffectControl)->ReflectionLevelRange(min,max); |
|
4911 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbReflectionLevelRangeL min = [%d]- max = [%d]"),min,max); |
|
4912 return status; |
|
4913 } |
|
4914 |
|
4915 TInt CEnhanMediaTestClass::HandleReverbReverbDelayL(CStifItemParser& /*aItem*/) |
|
4916 { |
|
4917 |
|
4918 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbReverbDelayL")); |
|
4919 TInt status(KErrNone); |
|
4920 //status = aItem.GetNextInt(controltype); |
|
4921 TUint value; |
|
4922 if(!iEffectControl) |
|
4923 { |
|
4924 return status = KErrNotReady; |
|
4925 } |
|
4926 status = static_cast<MReverbControl*>(iEffectControl)->ReverbDelay(value); |
|
4927 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbReverbDelayL value = [%d]"),value); |
|
4928 return status; |
|
4929 } |
|
4930 |
|
4931 TInt CEnhanMediaTestClass::HandleReverbReverbDelayMaxL(CStifItemParser& /*aItem*/) |
|
4932 { |
|
4933 |
|
4934 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbReverbDelayMaxL")); |
|
4935 TInt status(KErrNone); |
|
4936 //status = aItem.GetNextInt(controltype); |
|
4937 TUint value; |
|
4938 if(!iEffectControl) |
|
4939 { |
|
4940 return status = KErrNotReady; |
|
4941 } |
|
4942 status = static_cast<MReverbControl*>(iEffectControl)->ReverbDelayMax(value); |
|
4943 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbReverbDelayMaxL value = [%d]"),value); |
|
4944 return status; |
|
4945 } |
|
4946 |
|
4947 TInt CEnhanMediaTestClass::HandleReverbReverbLevelL(CStifItemParser& /*aItem*/) |
|
4948 { |
|
4949 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbReverbLevelL")); |
|
4950 TInt status(KErrNone); |
|
4951 //status = aItem.GetNextInt(controltype); |
|
4952 TInt value; |
|
4953 if(!iEffectControl) |
|
4954 { |
|
4955 return status = KErrNotReady; |
|
4956 } |
|
4957 status = static_cast<MReverbControl*>(iEffectControl)->ReverbLevel(value); |
|
4958 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbReverbLevelL value = [%d]"),value); |
|
4959 return status; |
|
4960 } |
|
4961 |
|
4962 TInt CEnhanMediaTestClass::HandleReverbReverbLevelRangeL(CStifItemParser& /*aItem*/) |
|
4963 { |
|
4964 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbReverbLevelRangeL")); |
|
4965 TInt status(KErrNone); |
|
4966 //status = aItem.GetNextInt(controltype); |
|
4967 TInt min,max; |
|
4968 if(!iEffectControl) |
|
4969 { |
|
4970 return status = KErrNotReady; |
|
4971 } |
|
4972 status = static_cast<MReverbControl*>(iEffectControl)->ReverbLevelRange(min,max); |
|
4973 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbReverbLevelRangeL min = [%d] - max = [%d]"),min,max); |
|
4974 return status; |
|
4975 } |
|
4976 |
|
4977 |
|
4978 |
|
4979 |
|
4980 |
|
4981 TInt CEnhanMediaTestClass::HandleReverbRoomHFLevelL(CStifItemParser& /*aItem*/) |
|
4982 { |
|
4983 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbRoomHFLevelL")); |
|
4984 TInt status(KErrNone); |
|
4985 //status = aItem.GetNextInt(controltype); |
|
4986 TInt value; |
|
4987 if(!iEffectControl) |
|
4988 { |
|
4989 return status = KErrNotReady; |
|
4990 } |
|
4991 status = static_cast<MReverbControl*>(iEffectControl)->RoomHFLevel(value); |
|
4992 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbRoomHFLevelL value = [%d]"),value); |
|
4993 return status; |
|
4994 } |
|
4995 |
|
4996 TInt CEnhanMediaTestClass::HandleReverbRoomHFLevelRangeL(CStifItemParser& /*aItem*/) |
|
4997 { |
|
4998 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbRoomHFLevelRangeL")); |
|
4999 TInt status(KErrNone); |
|
5000 //status = aItem.GetNextInt(controltype); |
|
5001 TInt min,max; |
|
5002 if(!iEffectControl) |
|
5003 { |
|
5004 return status = KErrNotReady; |
|
5005 } |
|
5006 status = static_cast<MReverbControl*>(iEffectControl)->RoomHFLevelRange(min,max); |
|
5007 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbRoomHFLevelRangeL min = [%d] - max = [%d]"),min,max); |
|
5008 return status; |
|
5009 } |
|
5010 |
|
5011 TInt CEnhanMediaTestClass::HandleReverbRoomLevelL(CStifItemParser& /*aItem*/) |
|
5012 { |
|
5013 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbRoomLevelL")); |
|
5014 TInt status(KErrNone); |
|
5015 TInt value; |
|
5016 if(!iEffectControl) |
|
5017 { |
|
5018 return status = KErrNotReady; |
|
5019 } |
|
5020 status = static_cast<MReverbControl*>(iEffectControl)->RoomLevel(value); |
|
5021 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbRoomLevelL value = [%d]"),value); |
|
5022 return status; |
|
5023 } |
|
5024 |
|
5025 TInt CEnhanMediaTestClass::HandleReverbRoomLevelRangeL(CStifItemParser& /*aItem*/) |
|
5026 { |
|
5027 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbRoomLevelRangeL")); |
|
5028 TInt status(KErrNone); |
|
5029 //status = aItem.GetNextInt(controltype); |
|
5030 TInt min,max; |
|
5031 if(!iEffectControl) |
|
5032 { |
|
5033 return status = KErrNotReady; |
|
5034 } |
|
5035 status = static_cast<MReverbControl*>(iEffectControl)->RoomLevelRange(min,max); |
|
5036 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbRoomLevelRangeL min = [%d] - max = [%d]"),min,max); |
|
5037 return status; |
|
5038 } |
|
5039 |
|
5040 TInt CEnhanMediaTestClass::HandleReverbSetDecayHFRatioL(CStifItemParser& aItem) |
|
5041 { |
|
5042 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetDecayHFRatioL")); |
|
5043 TInt status(KErrNone); |
|
5044 TInt value; |
|
5045 status = aItem.GetNextInt(value); |
|
5046 if(!iEffectControl) |
|
5047 { |
|
5048 return status = KErrNotReady; |
|
5049 } |
|
5050 status = static_cast<MReverbControl*>(iEffectControl)->SetDecayHFRatio(value); |
|
5051 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetDecayHFRatioL value = [%d]"),value); |
|
5052 return status; |
|
5053 } |
|
5054 |
|
5055 TInt CEnhanMediaTestClass::HandleReverbSetDecayTimeL(CStifItemParser& aItem) |
|
5056 { |
|
5057 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetDecayTimeL")); |
|
5058 TInt status(KErrNone); |
|
5059 TInt value; |
|
5060 status = aItem.GetNextInt(value); |
|
5061 if(!iEffectControl) |
|
5062 { |
|
5063 return status = KErrNotReady; |
|
5064 } |
|
5065 status = static_cast<MReverbControl*>(iEffectControl)->SetDecayTime(value); |
|
5066 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetDecayTimeL value = [%d]"),value); |
|
5067 return status; |
|
5068 } |
|
5069 |
|
5070 TInt CEnhanMediaTestClass::HandleReverbSetDensityL(CStifItemParser& aItem) |
|
5071 { |
|
5072 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetDensityL")); |
|
5073 TInt status(KErrNone); |
|
5074 TInt value; |
|
5075 status = aItem.GetNextInt(value); |
|
5076 if(!iEffectControl) |
|
5077 { |
|
5078 return status = KErrNotReady; |
|
5079 } |
|
5080 status = static_cast<MReverbControl*>(iEffectControl)->SetDensity(value); |
|
5081 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetDensityL value = [%d]"),value); |
|
5082 return status; |
|
5083 } |
|
5084 |
|
5085 TInt CEnhanMediaTestClass::HandleReverbSetDiffusionL(CStifItemParser& aItem) |
|
5086 { |
|
5087 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetDiffusionL")); |
|
5088 TInt status(KErrNone); |
|
5089 TInt value; |
|
5090 status = aItem.GetNextInt(value); |
|
5091 if(!iEffectControl) |
|
5092 { |
|
5093 return status = KErrNotReady; |
|
5094 } |
|
5095 status = static_cast<MReverbControl*>(iEffectControl)->SetDiffusion(value); |
|
5096 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetDiffusionL value = [%d]"),value); |
|
5097 return status; |
|
5098 } |
|
5099 |
|
5100 TInt CEnhanMediaTestClass::HandleReverbSetReflectionsDelayL(CStifItemParser& aItem) |
|
5101 { |
|
5102 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetReflectionsDelayL")); |
|
5103 TInt status(KErrNone); |
|
5104 TInt value; |
|
5105 status = aItem.GetNextInt(value); |
|
5106 if(!iEffectControl) |
|
5107 { |
|
5108 return status = KErrNotReady; |
|
5109 } |
|
5110 status = static_cast<MReverbControl*>(iEffectControl)->SetReflectionsDelay(value); |
|
5111 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetReflectionsDelayL value = [%d]"),value); |
|
5112 return status; |
|
5113 } |
|
5114 |
|
5115 TInt CEnhanMediaTestClass::HandleReverbSetReflectionsLevelL(CStifItemParser& aItem) |
|
5116 { |
|
5117 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetReflectionsLevelL")); |
|
5118 TInt status(KErrNone); |
|
5119 TInt value; |
|
5120 status = aItem.GetNextInt(value); |
|
5121 if(!iEffectControl) |
|
5122 { |
|
5123 return status = KErrNotReady; |
|
5124 } |
|
5125 status = static_cast<MReverbControl*>(iEffectControl)->SetReflectionsLevel(value); |
|
5126 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetReflectionsLevelL value = [%d]"),value); |
|
5127 return status; |
|
5128 } |
|
5129 |
|
5130 TInt CEnhanMediaTestClass::HandleReverbSetReverbDelayL(CStifItemParser& aItem) |
|
5131 { |
|
5132 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetReverbDelayL")); |
|
5133 TInt status(KErrNone); |
|
5134 TInt value; |
|
5135 status = aItem.GetNextInt(value); |
|
5136 if(!iEffectControl) |
|
5137 { |
|
5138 return status = KErrNotReady; |
|
5139 } |
|
5140 status = static_cast<MReverbControl*>(iEffectControl)->SetReverbDelay(value); |
|
5141 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetReverbDelayL value = [%d]"),value); |
|
5142 return status; |
|
5143 } |
|
5144 |
|
5145 TInt CEnhanMediaTestClass::HandleReverbSetReverbLevelL(CStifItemParser& aItem) |
|
5146 { |
|
5147 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetReverbLevelL")); |
|
5148 TInt status(KErrNone); |
|
5149 TInt value; |
|
5150 status = aItem.GetNextInt(value); |
|
5151 if(!iEffectControl) |
|
5152 { |
|
5153 return status = KErrNotReady; |
|
5154 } |
|
5155 status = static_cast<MReverbControl*>(iEffectControl)->SetReverbLevel(value); |
|
5156 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetReverbLevelL value = [%d]"),value); |
|
5157 return status; |
|
5158 } |
|
5159 |
|
5160 TInt CEnhanMediaTestClass::HandleReverbSetRoomHFLevelL(CStifItemParser& aItem) |
|
5161 { |
|
5162 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetRoomHFLevelL")); |
|
5163 TInt status(KErrNone); |
|
5164 TInt value; |
|
5165 status = aItem.GetNextInt(value); |
|
5166 if(!iEffectControl) |
|
5167 { |
|
5168 return status = KErrNotReady; |
|
5169 } |
|
5170 status = static_cast<MReverbControl*>(iEffectControl)->SetRoomHFLevel(value); |
|
5171 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetRoomHFLevelL value = [%d]"),value); |
|
5172 return status; |
|
5173 } |
|
5174 |
|
5175 TInt CEnhanMediaTestClass::HandleReverbSetRoomLevelL(CStifItemParser& aItem) |
|
5176 { |
|
5177 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetRoomLevelL")); |
|
5178 TInt status(KErrNone); |
|
5179 TInt value; |
|
5180 status = aItem.GetNextInt(value); |
|
5181 if(!iEffectControl) |
|
5182 { |
|
5183 return status = KErrNotReady; |
|
5184 } |
|
5185 status = static_cast<MReverbControl*>(iEffectControl)->SetRoomLevel(value); |
|
5186 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbSetRoomLevelL value = [%d]"),value); |
|
5187 return status; |
|
5188 } |
|
5189 |
|
5190 TInt CEnhanMediaTestClass::HandleReverbDelayMaxL(CStifItemParser& /*aItem*/) |
|
5191 { |
|
5192 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDelayMaxL")); |
|
5193 TInt status(KErrNone); |
|
5194 //status = aItem.GetNextInt(controltype); |
|
5195 TUint value; |
|
5196 if(!iEffectControl) |
|
5197 { |
|
5198 return status = KErrNotReady; |
|
5199 } |
|
5200 status = static_cast<MReverbControl*>(iEffectControl)->ReverbDelayMax(value); |
|
5201 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDelayMaxL value = [%d]"),value); |
|
5202 return status; |
|
5203 } |
|
5204 |
|
5205 TInt CEnhanMediaTestClass::HandleSWIsContinuousLevelSupportedL(CStifItemParser& /*aItem*/) |
|
5206 { |
|
5207 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDelayMaxL")); |
|
5208 TInt status(KErrNone); |
|
5209 //status = aItem.GetNextInt(controltype); |
|
5210 TInt value; |
|
5211 if(!iEffectControl) |
|
5212 { |
|
5213 return status = KErrNotReady; |
|
5214 } |
|
5215 status = static_cast<MStereoWideningControl*>(iEffectControl)->IsContinuousLevelSupported(value); |
|
5216 iLog->Log(_L("CEnhanMediaTestClass::HandleReverbDelayMaxL value = [%d]"),value); |
|
5217 return status; |
|
5218 } |
|
5219 |
|
5220 TInt CEnhanMediaTestClass::HandleSWSetStereoWideningLevelL(CStifItemParser& aItem) |
|
5221 { |
|
5222 iLog->Log(_L("CEnhanMediaTestClass::HandleSWSetStereoWideningLevelL")); |
|
5223 TInt status(KErrNone); |
|
5224 TUint value; |
|
5225 status = aItem.GetNextInt(value); |
|
5226 if(!iEffectControl) |
|
5227 { |
|
5228 return status = KErrNotReady; |
|
5229 } |
|
5230 status = static_cast<MStereoWideningControl*>(iEffectControl)->SetStereoWideningLevel(value); |
|
5231 iLog->Log(_L("CEnhanMediaTestClass::HandleSWSetStereoWideningLevelL value = [%d]"),value); |
|
5232 return status; |
|
5233 } |
|
5234 TInt CEnhanMediaTestClass::HandleSWStereoWideningLevelL(CStifItemParser& /*aItem*/) |
|
5235 { |
|
5236 iLog->Log(_L("CEnhanMediaTestClass::HandleSWStereoWideningLevelL")); |
|
5237 TInt status(KErrNone); |
|
5238 //status = aItem.GetNextInt(controltype); |
|
5239 TInt value; |
|
5240 if(!iEffectControl) |
|
5241 { |
|
5242 return status = KErrNotReady; |
|
5243 } |
|
5244 status = static_cast<MStereoWideningControl*>(iEffectControl)->StereoWideningLevel(value); |
|
5245 iLog->Log(_L("CEnhanMediaTestClass::HandleSWStereoWideningLevelL value = [%d]"),value); |
|
5246 return status; |
|
5247 } |
|
5248 |
|
5249 TInt CEnhanMediaTestClass::LO_OrientationL (CStifItemParser& aItem) |
|
5250 { |
|
5251 TInt status(KErrNone); |
|
5252 |
|
5253 if(!iEffectControl) |
|
5254 { |
|
5255 status = KErrNotReady; |
|
5256 return status; |
|
5257 } |
|
5258 |
|
5259 TInt a,b,c; |
|
5260 |
|
5261 |
|
5262 TInt control = 0; |
|
5263 status = aItem.GetNextInt(control); |
|
5264 |
|
5265 if (TControl(control) == ELISTORIENTCONTROL) |
|
5266 { |
|
5267 status = static_cast<MListenerOrientationControl*>(iEffectControl)->Orientation(a,b,c); |
|
5268 } |
|
5269 else if (TControl(control) == ESOURORIENTCONTROL) |
|
5270 { |
|
5271 status = static_cast<MSourceOrientationControl*>(iEffectControl)->Orientation(a,b,c); |
|
5272 } |
|
5273 |
|
5274 if (status == KErrNone) |
|
5275 { |
|
5276 iLog->Log(_L("LO_OrientationL status = %d"), status); |
|
5277 } |
|
5278 else |
|
5279 { |
|
5280 iLog->Log(_L("LO_OrientationL ERROR = [%d]"), status); |
|
5281 } |
|
5282 |
|
5283 return status; |
|
5284 } |
|
5285 |
|
5286 TInt CEnhanMediaTestClass::LO_OrientationVectorsL (CStifItemParser& aItem) |
|
5287 { |
|
5288 TInt status(KErrNone); |
|
5289 |
|
5290 if(!iEffectControl) |
|
5291 { |
|
5292 status = KErrNotReady; |
|
5293 return status; |
|
5294 } |
|
5295 |
|
5296 TInt a,b,c,d,e,f; |
|
5297 TInt control = 0; |
|
5298 status = aItem.GetNextInt(control); |
|
5299 if (TControl(control) == ELISTORIENTCONTROL) |
|
5300 { |
|
5301 status = static_cast<MListenerOrientationControl*>(iEffectControl)->OrientationVectors(a,b,c,d,e,f); |
|
5302 } |
|
5303 else if (TControl(control) == ESOURORIENTCONTROL) |
|
5304 { |
|
5305 status = static_cast<MSourceOrientationControl*>(iEffectControl)->OrientationVectors(a,b,c,d,e,f); |
|
5306 } |
|
5307 |
|
5308 |
|
5309 if (status == KErrNone) |
|
5310 { |
|
5311 iLog->Log(_L("LO_OrientationVectorsL status = %d"), status); |
|
5312 } |
|
5313 else |
|
5314 { |
|
5315 iLog->Log(_L("LO_OrientationVectorsL ERROR = [%d]"), status); |
|
5316 } |
|
5317 |
|
5318 return status; |
|
5319 } |
|
5320 |
|
5321 |
|
5322 |
|
5323 TInt CEnhanMediaTestClass::HandleRLLevelRangeL(CStifItemParser& /*aItem*/) |
|
5324 { |
|
5325 iLog->Log(_L("CEnhanMediaTestClass::HandleRLLevelRangeL")); |
|
5326 TInt status(KErrNone); |
|
5327 //status = aItem.GetNextInt(controltype); |
|
5328 TInt value1,value2; |
|
5329 if(!iEffectControl) |
|
5330 { |
|
5331 return status = KErrNotReady; |
|
5332 } |
|
5333 status = static_cast<MRoomLevelControl*>(iEffectControl)->LevelRange(value1,value2); |
|
5334 iLog->Log(_L("CEnhanMediaTestClass::HandleRLLevelRangeL value = [%d] - [%d]"),value1,value2); |
|
5335 return status; |
|
5336 } |
|
5337 |
|
5338 TInt CEnhanMediaTestClass::HandleRLSetRoomLevelL(CStifItemParser& aItem) |
|
5339 { |
|
5340 iLog->Log(_L("CEnhanMediaTestClass::HandleRLSetRoomLevelL")); |
|
5341 TInt status(KErrNone); |
|
5342 TInt value; |
|
5343 status = aItem.GetNextInt(value); |
|
5344 if(!iEffectControl) |
|
5345 { |
|
5346 return status = KErrNotReady; |
|
5347 } |
|
5348 status = static_cast<MRoomLevelControl*>(iEffectControl)->SetRoomLevel(value); |
|
5349 iLog->Log(_L("CEnhanMediaTestClass::HandleRLSetRoomLevelL value = [%d]"),value); |
|
5350 return status; |
|
5351 } |
|
5352 |
|
5353 TInt CEnhanMediaTestClass::HandleRLLevelL(CStifItemParser& /*aItem*/) |
|
5354 { |
|
5355 iLog->Log(_L("CEnhanMediaTestClass::HandleRLLevelL")); |
|
5356 TInt status(KErrNone); |
|
5357 //status = aItem.GetNextInt(controltype); |
|
5358 TInt value; |
|
5359 if(!iEffectControl) |
|
5360 { |
|
5361 return status = KErrNotReady; |
|
5362 } |
|
5363 status = static_cast<MRoomLevelControl*>(iEffectControl)->Level(value); |
|
5364 iLog->Log(_L("CEnhanMediaTestClass::HandleRLLevelL value = [%d]"),value); |
|
5365 return status; |
|
5366 } |
|
5367 |
|
5368 TInt CEnhanMediaTestClass::HandleDADistanceAttenuationL(CStifItemParser& /*aItem*/) |
|
5369 { |
|
5370 iLog->Log(_L("CEnhanMediaTestClass::HandleDADistanceAttenuationL")); |
|
5371 TInt status(KErrNone); |
|
5372 if(!iEffectControl) |
|
5373 { |
|
5374 return status = KErrNotReady; |
|
5375 } |
|
5376 TInt a,b,c; |
|
5377 TUint d,e; |
|
5378 status = static_cast<MDistanceAttenuationControl*>(iEffectControl)->DistanceAttenuation(a,b,c,d,e); |
|
5379 iLog->Log(_L("CEnhanMediaTestClass::HandleDADistanceAttenuationL a = [%d] - b = [%d] - c = [%d] - d = [%d]- e = [%d]"),a,b,c,d,e); |
|
5380 return status; |
|
5381 } |
|
5382 TInt CEnhanMediaTestClass::HandleDARollOffFactorMaxL(CStifItemParser& /*aItem*/) |
|
5383 { |
|
5384 iLog->Log(_L("CEnhanMediaTestClass::HandleDARollOffFactorMaxL")); |
|
5385 TInt status(KErrNone); |
|
5386 if(!iEffectControl) |
|
5387 { |
|
5388 return status = KErrNotReady; |
|
5389 } |
|
5390 TUint value; |
|
5391 status = static_cast<MDistanceAttenuationControl*>(iEffectControl)->RollOffFactorMax(value); |
|
5392 iLog->Log(_L("CEnhanMediaTestClass::HandleDARollOffFactorMaxL value = [%d]"),value); |
|
5393 return status; |
|
5394 } |
|
5395 TInt CEnhanMediaTestClass::HandleDARoomRollOffFactorMaxL(CStifItemParser& /*aItem*/) |
|
5396 { |
|
5397 iLog->Log(_L("CEnhanMediaTestClass::HandleDARoomRollOffFactorMaxL")); |
|
5398 TInt status(KErrNone); |
|
5399 if(!iEffectControl) |
|
5400 { |
|
5401 return status = KErrNotReady; |
|
5402 } |
|
5403 TUint value; |
|
5404 status = static_cast<MDistanceAttenuationControl*>(iEffectControl)->RoomRollOffFactorMax(value); |
|
5405 iLog->Log(_L("CEnhanMediaTestClass::HandleDARoomRollOffFactorMaxL value = [%d]"),value); |
|
5406 return status; |
|
5407 } |
|
5408 |
|
5409 TInt CEnhanMediaTestClass::HandleSLLocationCartesianL(CStifItemParser& aItem) |
|
5410 { |
|
5411 iLog->Log(_L("CEnhanMediaTestClass::HandleSLLocationCartesianL")); |
|
5412 TInt status(KErrNone); |
|
5413 if(!iEffectControl) |
|
5414 { |
|
5415 return status = KErrNotReady; |
|
5416 } |
|
5417 TInt a,b,c; |
|
5418 TInt control = 0; |
|
5419 status = aItem.GetNextInt(control); |
|
5420 |
|
5421 if (TControl(control) == ESOURLOCCONTROL) |
|
5422 { |
|
5423 status = static_cast<MSourceLocationControl*>(iEffectControl)->LocationCartesian(a,b,c); |
|
5424 } |
|
5425 else if (TControl(control) == ELISTLOCCONTROL) |
|
5426 { |
|
5427 status = static_cast<MSourceLocationControl*>(iEffectControl)->LocationCartesian(a,b,c); |
|
5428 } |
|
5429 iLog->Log(_L("CEnhanMediaTestClass::HandleSLLocationCartesianL status = [%d]"),status); |
|
5430 return status; |
|
5431 } |
|
5432 |
|
5433 TInt CEnhanMediaTestClass::HandleSLLocationSphericalL(CStifItemParser& aItem) |
|
5434 { |
|
5435 iLog->Log(_L("CEnhanMediaTestClass::HandleSLLocationSphericalL")); |
|
5436 TInt status(KErrNone); |
|
5437 if(!iEffectControl) |
|
5438 { |
|
5439 return status = KErrNotReady; |
|
5440 } |
|
5441 TInt a,b,c; |
|
5442 TInt control = 0; |
|
5443 status = aItem.GetNextInt(control); |
|
5444 |
|
5445 if (TControl(control) == ESOURLOCCONTROL) |
|
5446 { |
|
5447 status = static_cast<MSourceLocationControl*>(iEffectControl)->LocationSpherical(a,b,c); |
|
5448 } |
|
5449 else if (TControl(control) == ELISTLOCCONTROL) |
|
5450 { |
|
5451 status = static_cast<MListenerLocationControl*>(iEffectControl)->LocationSpherical(a,b,c); |
|
5452 } |
|
5453 iLog->Log(_L("CEnhanMediaTestClass::HandleSLLocationSphericalL status = [%d]"),status); |
|
5454 return status; |
|
5455 } |
|
5456 |
|
5457 TInt CEnhanMediaTestClass::HandleSLSetLocationCartesianL(CStifItemParser& aItem) |
|
5458 { |
|
5459 iLog->Log(_L("CEnhanMediaTestClass::HandleSLSetLocationCartesianL")); |
|
5460 TInt status(KErrNone); |
|
5461 if(!iEffectControl) |
|
5462 { |
|
5463 return status = KErrNotReady; |
|
5464 } |
|
5465 TInt control = 0; |
|
5466 status = aItem.GetNextInt(control); |
|
5467 TInt a,b,c; |
|
5468 status = aItem.GetNextInt(a); |
|
5469 status = aItem.GetNextInt(b); |
|
5470 status = aItem.GetNextInt(c); |
|
5471 |
|
5472 if (TControl(control) == ESOURLOCCONTROL) |
|
5473 { |
|
5474 status = static_cast<MSourceLocationControl*>(iEffectControl)->SetLocationCartesian(a,b,c); |
|
5475 } |
|
5476 else if (TControl(control) == ELISTLOCCONTROL) |
|
5477 { |
|
5478 status = static_cast<MListenerLocationControl*>(iEffectControl)->SetLocationCartesian(a,b,c); |
|
5479 } |
|
5480 iLog->Log(_L("CEnhanMediaTestClass::HandleSLSetLocationCartesianL status = [%d]"),status); |
|
5481 return status; |
|
5482 } |
|
5483 TInt CEnhanMediaTestClass::HandleSLSetLocationSphericalL(CStifItemParser& aItem) |
|
5484 { |
|
5485 iLog->Log(_L("CEnhanMediaTestClass::HandleSLSetLocationSphericalL")); |
|
5486 TInt status(KErrNone); |
|
5487 if(!iEffectControl) |
|
5488 { |
|
5489 return status = KErrNotReady; |
|
5490 } |
|
5491 TInt control = 0; |
|
5492 status = aItem.GetNextInt(control); |
|
5493 TInt a,b,c; |
|
5494 status = aItem.GetNextInt(a); |
|
5495 status = aItem.GetNextInt(b); |
|
5496 status = aItem.GetNextInt(c); |
|
5497 if (TControl(control) == ESOURLOCCONTROL) |
|
5498 { |
|
5499 status = static_cast<MSourceLocationControl*>(iEffectControl)->SetLocationSpherical(a,b,c); |
|
5500 } |
|
5501 else if (TControl(control) == ELISTLOCCONTROL) |
|
5502 { |
|
5503 status = static_cast<MListenerLocationControl*>(iEffectControl)->SetLocationSpherical(a,b,c); |
|
5504 } |
|
5505 |
|
5506 iLog->Log(_L("CEnhanMediaTestClass::HandleSLSetLocationSphericalL status = [%d]"),status); |
|
5507 return status; |
|
5508 } |
|
5509 |
|
5510 |
|
5511 TInt CEnhanMediaTestClass::HandleControlTypeL(CStifItemParser& aItem) |
|
5512 { |
|
5513 iLog->Log(_L("CEnhanMediaTestClass::HandleControlTypeL")); |
|
5514 TInt status(KErrNone); |
|
5515 TInt control = 0; |
|
5516 status = aItem.GetNextInt(control); |
|
5517 TUid controlUid(TUid::Uid(0)); |
|
5518 switch(TControl(control)) |
|
5519 { |
|
5520 case EFILESOURCE: |
|
5521 { |
|
5522 if(iMFileSource) |
|
5523 { |
|
5524 controlUid = iMFileSource->Type(); |
|
5525 } |
|
5526 else |
|
5527 { |
|
5528 status = KErrNotFound; |
|
5529 } |
|
5530 break; |
|
5531 } |
|
5532 case EDATABUFFERSOURCE: |
|
5533 { |
|
5534 if(iMDataBufferSource) |
|
5535 { |
|
5536 controlUid = iMDataBufferSource->Type(); |
|
5537 } |
|
5538 else |
|
5539 { |
|
5540 status = KErrNotFound; |
|
5541 } |
|
5542 break; |
|
5543 } |
|
5544 case EDESCRIPTORSOURCE: |
|
5545 { |
|
5546 if(iMDescriptorSource) |
|
5547 { |
|
5548 controlUid = iMDescriptorSource->Type(); |
|
5549 } |
|
5550 else |
|
5551 { |
|
5552 status = KErrNotFound; |
|
5553 } |
|
5554 break; |
|
5555 } |
|
5556 case ESTREAMCONTROL: |
|
5557 { |
|
5558 if(iMStreamControl) |
|
5559 { |
|
5560 controlUid = iMStreamControl->Type(); |
|
5561 } |
|
5562 else |
|
5563 { |
|
5564 status = KErrNotFound; |
|
5565 } |
|
5566 break; |
|
5567 } |
|
5568 case EMMFAUDIOOUTPUTSINKCONTROL: |
|
5569 { |
|
5570 if(iMAudioSink) |
|
5571 { |
|
5572 controlUid = iMAudioSink->Type(); |
|
5573 } |
|
5574 else |
|
5575 { |
|
5576 status = KErrNotFound; |
|
5577 } |
|
5578 break; |
|
5579 } |
|
5580 case EPDLSOURCE: |
|
5581 { |
|
5582 if(iMProgDLSource) |
|
5583 { |
|
5584 controlUid = iMProgDLSource->Type(); |
|
5585 } |
|
5586 else |
|
5587 { |
|
5588 status = KErrNotFound; |
|
5589 } |
|
5590 break; |
|
5591 } |
|
5592 |
|
5593 case EVOLUMECONTROL: |
|
5594 { |
|
5595 if(iMVolumeControl) |
|
5596 { |
|
5597 controlUid = iMVolumeControl->Type(); |
|
5598 } |
|
5599 else |
|
5600 { |
|
5601 status = KErrNotFound; |
|
5602 } |
|
5603 break; |
|
5604 } |
|
5605 case EBALANCECONTROL: |
|
5606 { |
|
5607 if(iMBalanceControl) |
|
5608 { |
|
5609 controlUid = iMBalanceControl->Type(); |
|
5610 } |
|
5611 else |
|
5612 { |
|
5613 status = KErrNotFound; |
|
5614 } |
|
5615 break; |
|
5616 } |
|
5617 case EEQUALIZERCONTROL: |
|
5618 { |
|
5619 if(iMEqualizerControl) |
|
5620 { |
|
5621 controlUid = iMEqualizerControl->Type(); |
|
5622 } |
|
5623 else |
|
5624 { |
|
5625 status = KErrNotFound; |
|
5626 } |
|
5627 break; |
|
5628 } |
|
5629 case EREVERBCONTROL: |
|
5630 { |
|
5631 if(iMReverbControl) |
|
5632 { |
|
5633 controlUid = iMReverbControl->Type(); |
|
5634 } |
|
5635 else |
|
5636 { |
|
5637 status = KErrNotFound; |
|
5638 } |
|
5639 break; |
|
5640 } |
|
5641 |
|
5642 case EBASSBOOSTCONTROL: |
|
5643 { |
|
5644 if(iMBassBoostControl) |
|
5645 { |
|
5646 controlUid = iMBassBoostControl->Type(); |
|
5647 } |
|
5648 else |
|
5649 { |
|
5650 status = KErrNotFound; |
|
5651 } |
|
5652 break; |
|
5653 } |
|
5654 |
|
5655 case ESTEREOWIDCONTROL: |
|
5656 { |
|
5657 if(iMStereoWideningControl) |
|
5658 { |
|
5659 controlUid = iMStereoWideningControl->Type(); |
|
5660 } |
|
5661 else |
|
5662 { |
|
5663 status = KErrNotFound; |
|
5664 } |
|
5665 break; |
|
5666 } |
|
5667 |
|
5668 case ELOUDNESSCONTROL: |
|
5669 { |
|
5670 if(iMLoudnessControl) |
|
5671 { |
|
5672 controlUid = iMLoudnessControl->Type(); |
|
5673 } |
|
5674 else |
|
5675 { |
|
5676 status = KErrNotFound; |
|
5677 } |
|
5678 break; |
|
5679 } |
|
5680 |
|
5681 case EROOMLEVELCONTROL: |
|
5682 { |
|
5683 if(iMRoomLevelControl) |
|
5684 { |
|
5685 controlUid = iMRoomLevelControl->Type(); |
|
5686 } |
|
5687 else |
|
5688 { |
|
5689 status = KErrNotFound; |
|
5690 } |
|
5691 break; |
|
5692 } |
|
5693 |
|
5694 case EDISTATTCONTROL: |
|
5695 { |
|
5696 if(iMDistanceAttenuationControl) |
|
5697 { |
|
5698 controlUid = iMDistanceAttenuationControl->Type(); |
|
5699 } |
|
5700 else |
|
5701 { |
|
5702 status = KErrNotFound; |
|
5703 } |
|
5704 break; |
|
5705 } |
|
5706 |
|
5707 case ELISTDOPPCONTROL: |
|
5708 { |
|
5709 if(iMListenerDopplerControl) |
|
5710 { |
|
5711 controlUid = iMListenerDopplerControl->Type(); |
|
5712 } |
|
5713 else |
|
5714 { |
|
5715 status = KErrNotFound; |
|
5716 } |
|
5717 break; |
|
5718 } |
|
5719 |
|
5720 case ESOURDOPPCONTROL: |
|
5721 { |
|
5722 if(iMSourceDopplerControl) |
|
5723 { |
|
5724 controlUid = iMSourceDopplerControl->Type(); |
|
5725 } |
|
5726 else |
|
5727 { |
|
5728 status = KErrNotFound; |
|
5729 } |
|
5730 break; |
|
5731 } |
|
5732 |
|
5733 case ELISTLOCCONTROL: |
|
5734 { |
|
5735 if(iMListenerLocationControl) |
|
5736 { |
|
5737 controlUid = iMListenerLocationControl->Type(); |
|
5738 } |
|
5739 else |
|
5740 { |
|
5741 status = KErrNotFound; |
|
5742 } |
|
5743 break; |
|
5744 } |
|
5745 |
|
5746 case ESOURLOCCONTROL: |
|
5747 { |
|
5748 if(iMSourceLocationControl) |
|
5749 { |
|
5750 controlUid = iMSourceLocationControl->Type(); |
|
5751 } |
|
5752 else |
|
5753 { |
|
5754 status = KErrNotFound; |
|
5755 } |
|
5756 break; |
|
5757 } |
|
5758 |
|
5759 |
|
5760 case ELISTORIENTCONTROL: |
|
5761 { |
|
5762 if(iMListenerOrientationControl) |
|
5763 { |
|
5764 controlUid = iMListenerOrientationControl->Type(); |
|
5765 } |
|
5766 else |
|
5767 { |
|
5768 status = KErrNotFound; |
|
5769 } |
|
5770 break; |
|
5771 } |
|
5772 |
|
5773 case ESOURORIENTCONTROL: |
|
5774 { |
|
5775 if(iMSourceOrientationControl) |
|
5776 { |
|
5777 controlUid = iMSourceOrientationControl->Type(); |
|
5778 } |
|
5779 else |
|
5780 { |
|
5781 status = KErrNotFound; |
|
5782 } |
|
5783 break; |
|
5784 } |
|
5785 } |
|
5786 |
|
5787 iLog->Log(_L("CEnhanMediaTestClass::HandleControlTypeL status = [%d]"),status); |
|
5788 return status; |
|
5789 } |
|
5790 |
|
5791 TInt CEnhanMediaTestClass::HandleControlControlTypeL(CStifItemParser& aItem) |
|
5792 { |
|
5793 iLog->Log(_L("CEnhanMediaTestClass::HandleControlControlTypeL")); |
|
5794 TInt status(KErrNone); |
|
5795 |
|
5796 TInt control = 0; |
|
5797 status = aItem.GetNextInt(control); |
|
5798 TControlType controlType(TControlType(0)); |
|
5799 switch(TControl(control)) |
|
5800 { |
|
5801 case EFILESOURCE: |
|
5802 { |
|
5803 if(iMFileSource) |
|
5804 { |
|
5805 controlType = iMFileSource->ControlType(); |
|
5806 } |
|
5807 else |
|
5808 { |
|
5809 status = KErrNotFound; |
|
5810 } |
|
5811 break; |
|
5812 } |
|
5813 case EDATABUFFERSOURCE: |
|
5814 { |
|
5815 if(iMDataBufferSource) |
|
5816 { |
|
5817 controlType = iMDataBufferSource->ControlType(); |
|
5818 } |
|
5819 else |
|
5820 { |
|
5821 status = KErrNotFound; |
|
5822 } |
|
5823 break; |
|
5824 } |
|
5825 case EDESCRIPTORSOURCE: |
|
5826 { |
|
5827 if(iMDescriptorSource) |
|
5828 { |
|
5829 controlType = iMDescriptorSource->ControlType(); |
|
5830 } |
|
5831 else |
|
5832 { |
|
5833 status = KErrNotFound; |
|
5834 } |
|
5835 break; |
|
5836 } |
|
5837 case ESTREAMCONTROL: |
|
5838 { |
|
5839 if(iMStreamControl) |
|
5840 { |
|
5841 controlType = iMStreamControl->ControlType(); |
|
5842 } |
|
5843 else |
|
5844 { |
|
5845 status = KErrNotFound; |
|
5846 } |
|
5847 break; |
|
5848 } |
|
5849 case EMMFAUDIOOUTPUTSINKCONTROL: |
|
5850 { |
|
5851 if(iMAudioSink) |
|
5852 { |
|
5853 controlType = iMAudioSink->ControlType(); |
|
5854 } |
|
5855 else |
|
5856 { |
|
5857 status = KErrNotFound; |
|
5858 } |
|
5859 break; |
|
5860 } |
|
5861 case EPDLSOURCE: |
|
5862 { |
|
5863 if(iMProgDLSource) |
|
5864 { |
|
5865 controlType = iMProgDLSource->ControlType(); |
|
5866 } |
|
5867 else |
|
5868 { |
|
5869 status = KErrNotFound; |
|
5870 } |
|
5871 break; |
|
5872 } |
|
5873 |
|
5874 case EVOLUMECONTROL: |
|
5875 { |
|
5876 if(iMVolumeControl) |
|
5877 { |
|
5878 controlType = iMVolumeControl->ControlType(); |
|
5879 } |
|
5880 else |
|
5881 { |
|
5882 status = KErrNotFound; |
|
5883 } |
|
5884 break; |
|
5885 } |
|
5886 case EBALANCECONTROL: |
|
5887 { |
|
5888 if(iMBalanceControl) |
|
5889 { |
|
5890 controlType = iMBalanceControl->ControlType(); |
|
5891 } |
|
5892 else |
|
5893 { |
|
5894 status = KErrNotFound; |
|
5895 } |
|
5896 break; |
|
5897 } |
|
5898 case EEQUALIZERCONTROL: |
|
5899 { |
|
5900 if(iMEqualizerControl) |
|
5901 { |
|
5902 controlType = iMEqualizerControl->ControlType(); |
|
5903 } |
|
5904 else |
|
5905 { |
|
5906 status = KErrNotFound; |
|
5907 } |
|
5908 break; |
|
5909 } |
|
5910 case EREVERBCONTROL: |
|
5911 { |
|
5912 if(iMReverbControl) |
|
5913 { |
|
5914 controlType = iMReverbControl->ControlType(); |
|
5915 } |
|
5916 else |
|
5917 { |
|
5918 status = KErrNotFound; |
|
5919 } |
|
5920 break; |
|
5921 } |
|
5922 |
|
5923 case EBASSBOOSTCONTROL: |
|
5924 { |
|
5925 if(iMBassBoostControl) |
|
5926 { |
|
5927 controlType = iMBassBoostControl->ControlType(); |
|
5928 } |
|
5929 else |
|
5930 { |
|
5931 status = KErrNotFound; |
|
5932 } |
|
5933 break; |
|
5934 } |
|
5935 |
|
5936 case ESTEREOWIDCONTROL: |
|
5937 { |
|
5938 if(iMStereoWideningControl) |
|
5939 { |
|
5940 controlType = iMStereoWideningControl->ControlType(); |
|
5941 } |
|
5942 else |
|
5943 { |
|
5944 status = KErrNotFound; |
|
5945 } |
|
5946 break; |
|
5947 } |
|
5948 |
|
5949 case ELOUDNESSCONTROL: |
|
5950 { |
|
5951 if(iMLoudnessControl) |
|
5952 { |
|
5953 controlType = iMLoudnessControl->ControlType(); |
|
5954 } |
|
5955 else |
|
5956 { |
|
5957 status = KErrNotFound; |
|
5958 } |
|
5959 break; |
|
5960 } |
|
5961 |
|
5962 case EROOMLEVELCONTROL: |
|
5963 { |
|
5964 if(iMRoomLevelControl) |
|
5965 { |
|
5966 controlType = iMRoomLevelControl->ControlType(); |
|
5967 } |
|
5968 else |
|
5969 { |
|
5970 status = KErrNotFound; |
|
5971 } |
|
5972 break; |
|
5973 } |
|
5974 |
|
5975 case EDISTATTCONTROL: |
|
5976 { |
|
5977 if(iMDistanceAttenuationControl) |
|
5978 { |
|
5979 controlType = iMDistanceAttenuationControl->ControlType(); |
|
5980 } |
|
5981 else |
|
5982 { |
|
5983 status = KErrNotFound; |
|
5984 } |
|
5985 break; |
|
5986 } |
|
5987 |
|
5988 case ELISTDOPPCONTROL: |
|
5989 { |
|
5990 if(iMListenerDopplerControl) |
|
5991 { |
|
5992 controlType = iMListenerDopplerControl->ControlType(); |
|
5993 } |
|
5994 else |
|
5995 { |
|
5996 status = KErrNotFound; |
|
5997 } |
|
5998 break; |
|
5999 } |
|
6000 |
|
6001 case ESOURDOPPCONTROL: |
|
6002 { |
|
6003 if(iMSourceDopplerControl) |
|
6004 { |
|
6005 controlType = iMSourceDopplerControl->ControlType(); |
|
6006 } |
|
6007 else |
|
6008 { |
|
6009 status = KErrNotFound; |
|
6010 } |
|
6011 break; |
|
6012 } |
|
6013 |
|
6014 case ELISTLOCCONTROL: |
|
6015 { |
|
6016 if(iMListenerLocationControl) |
|
6017 { |
|
6018 controlType = iMListenerLocationControl->ControlType(); |
|
6019 } |
|
6020 else |
|
6021 { |
|
6022 status = KErrNotFound; |
|
6023 } |
|
6024 break; |
|
6025 } |
|
6026 |
|
6027 case ESOURLOCCONTROL: |
|
6028 { |
|
6029 if(iMSourceLocationControl) |
|
6030 { |
|
6031 controlType = iMSourceLocationControl->ControlType(); |
|
6032 } |
|
6033 else |
|
6034 { |
|
6035 status = KErrNotFound; |
|
6036 } |
|
6037 break; |
|
6038 } |
|
6039 |
|
6040 |
|
6041 case ELISTORIENTCONTROL: |
|
6042 { |
|
6043 if(iMListenerOrientationControl) |
|
6044 { |
|
6045 controlType = iMListenerOrientationControl->ControlType(); |
|
6046 } |
|
6047 else |
|
6048 { |
|
6049 status = KErrNotFound; |
|
6050 } |
|
6051 break; |
|
6052 } |
|
6053 |
|
6054 case ESOURORIENTCONTROL: |
|
6055 { |
|
6056 if(iMSourceOrientationControl) |
|
6057 { |
|
6058 controlType = iMSourceOrientationControl->ControlType(); |
|
6059 } |
|
6060 else |
|
6061 { |
|
6062 status = KErrNotFound; |
|
6063 } |
|
6064 break; |
|
6065 } |
|
6066 |
|
6067 |
|
6068 } |
|
6069 |
|
6070 iLog->Log(_L("CEnhanMediaTestClass::HandleControlControlTypeL status = [%d]"),status); |
|
6071 return status; |
|
6072 } |
|
6073 |
|
6074 |
|
6075 |
|
6076 |
|
6077 |
|
6078 |
|
6079 TInt CEnhanMediaTestClass::HandleSDSetFactorL(CStifItemParser& aItem) |
|
6080 { |
|
6081 iLog->Log(_L("CEnhanMediaTestClass::HandleLDSetFactorL")); |
|
6082 TInt status(KErrNone); |
|
6083 if(!iEffectControl) |
|
6084 { |
|
6085 return KErrNotReady; |
|
6086 } |
|
6087 TInt control = 0; |
|
6088 status = aItem.GetNextInt(control); |
|
6089 TUint value = 0; |
|
6090 aItem.GetNextInt(value); |
|
6091 |
|
6092 if (TControl(control) == ELISTDOPPCONTROL) |
|
6093 { |
|
6094 status = static_cast<MListenerDopplerControl*>(iEffectControl)->SetFactor(value); |
|
6095 } |
|
6096 if (TControl(control) == ESOURDOPPCONTROL) |
|
6097 { |
|
6098 status = static_cast<MSourceDopplerControl*>(iEffectControl)->SetFactor(value); |
|
6099 } |
|
6100 iLog->Log(_L("CEnhanMediaTestClass::HandleLDSetFactorL END")); |
|
6101 return status; |
|
6102 } |
|
6103 |
|
6104 TInt CEnhanMediaTestClass::HandleSDSetSphericalVelocityL(CStifItemParser& aItem) |
|
6105 { |
|
6106 iLog->Log(_L("CEnhanMediaTestClass::HandleSDSetSphericalVelocityL")); |
|
6107 TInt status(KErrNone); |
|
6108 if(!iEffectControl) |
|
6109 { |
|
6110 return status = KErrNotReady; |
|
6111 } |
|
6112 TInt control = 0; |
|
6113 status = aItem.GetNextInt(control); |
|
6114 TInt a,b,c; |
|
6115 status = aItem.GetNextInt(a); |
|
6116 status = aItem.GetNextInt(b); |
|
6117 status = aItem.GetNextInt(c); |
|
6118 |
|
6119 if (TControl(control) == ELISTDOPPCONTROL) |
|
6120 { |
|
6121 status = static_cast<MListenerDopplerControl*>(iEffectControl)->SetCartesianVelocity(a,b,c); |
|
6122 } |
|
6123 if (TControl(control) == ESOURDOPPCONTROL) |
|
6124 { |
|
6125 status = static_cast<MSourceDopplerControl*>(iEffectControl)->SetCartesianVelocity(a,b,c); |
|
6126 } |
|
6127 iLog->Log(_L("CEnhanMediaTestClass::HandleSDSetSphericalVelocityL END")); |
|
6128 return status; |
|
6129 } |
|
6130 |
|
6131 TInt CEnhanMediaTestClass::HandleSDSphericalVelocityL(CStifItemParser& aItem) |
|
6132 { |
|
6133 iLog->Log(_L("CEnhanMediaTestClass::HandleSDSphericalVelocityL")); |
|
6134 TInt status(KErrNone); |
|
6135 if(!iEffectControl) |
|
6136 { |
|
6137 return status = KErrNotReady; |
|
6138 } |
|
6139 TInt control = 0; |
|
6140 status = aItem.GetNextInt(control); |
|
6141 TInt a,b,c; |
|
6142 |
|
6143 if (TControl(control) == ELISTDOPPCONTROL) |
|
6144 { |
|
6145 status = static_cast<MListenerDopplerControl*>(iEffectControl)->SphericalVelocity(a,b,c); |
|
6146 } |
|
6147 if (TControl(control) == ESOURDOPPCONTROL) |
|
6148 { |
|
6149 status = static_cast<MSourceDopplerControl*>(iEffectControl)->SphericalVelocity(a,b,c); |
|
6150 } |
|
6151 iLog->Log(_L("CEnhanMediaTestClass::HandleSDSphericalVelocityL END")); |
|
6152 return status; |
|
6153 } |
|
6154 |
|
6155 TInt CEnhanMediaTestClass::HandleSDCartesianVelocityL(CStifItemParser& aItem) |
|
6156 { |
|
6157 TInt status(KErrNone); |
|
6158 iLog->Log(_L("CEnhanMediaTestClass::HandleSDCartesianVelocityL")); |
|
6159 if(!iEffectControl) |
|
6160 { |
|
6161 return status = KErrNotReady; |
|
6162 } |
|
6163 TInt control = 0; |
|
6164 status = aItem.GetNextInt(control); |
|
6165 TInt a,b,c; |
|
6166 |
|
6167 if (TControl(control) == ELISTDOPPCONTROL) |
|
6168 { |
|
6169 status = static_cast<MListenerDopplerControl*>(iEffectControl)->CartesianVelocity(a,b,c); |
|
6170 } |
|
6171 if (TControl(control) == ESOURDOPPCONTROL) |
|
6172 { |
|
6173 status = static_cast<MSourceDopplerControl*>(iEffectControl)->CartesianVelocity(a,b,c); |
|
6174 } |
|
6175 iLog->Log(_L("CEnhanMediaTestClass::HandleSDCartesianVelocityL END")); |
|
6176 return status; |
|
6177 } |
|
6178 |
|
6179 TInt CEnhanMediaTestClass::HandleSDFactorL(CStifItemParser& aItem) |
|
6180 { |
|
6181 TInt status(KErrNone); |
|
6182 iLog->Log(_L("CEnhanMediaTestClass::HandleSDFactorL")); |
|
6183 if(!iEffectControl) |
|
6184 { |
|
6185 return status = KErrNotReady; |
|
6186 } |
|
6187 TInt control = 0; |
|
6188 status = aItem.GetNextInt(control); |
|
6189 TUint value; |
|
6190 |
|
6191 if (TControl(control) == ELISTDOPPCONTROL) |
|
6192 { |
|
6193 status = static_cast<MListenerDopplerControl*>(iEffectControl)->Factor(value); |
|
6194 } |
|
6195 if (TControl(control) == ESOURDOPPCONTROL) |
|
6196 { |
|
6197 status = static_cast<MSourceDopplerControl*>(iEffectControl)->Factor(value); |
|
6198 } |
|
6199 iLog->Log(_L("CEnhanMediaTestClass::HandleSDFactorL END")); |
|
6200 return status; |
|
6201 } |
|
6202 |
|
6203 TInt CEnhanMediaTestClass::HandleSDFactorMaxL(CStifItemParser& aItem) |
|
6204 { |
|
6205 iLog->Log(_L("CEnhanMediaTestClass::HandleLDSetFactorL")); |
|
6206 TInt status(KErrNone); |
|
6207 if(!iEffectControl) |
|
6208 { |
|
6209 return KErrNotReady; |
|
6210 } |
|
6211 TInt control = 0; |
|
6212 status = aItem.GetNextInt(control); |
|
6213 TUint value; |
|
6214 |
|
6215 if (TControl(control) == ELISTDOPPCONTROL) |
|
6216 { |
|
6217 status = static_cast<MListenerDopplerControl*>(iEffectControl)->FactorMax(value); |
|
6218 } |
|
6219 if (TControl(control) == ESOURDOPPCONTROL) |
|
6220 { |
|
6221 status = static_cast<MSourceDopplerControl*>(iEffectControl)->FactorMax(value); |
|
6222 } |
|
6223 iLog->Log(_L("CEnhanMediaTestClass::HandleLDSetFactorL END")); |
|
6224 return status; |
|
6225 } |
|
6226 |
|
6227 TInt CEnhanMediaTestClass::HandleSDSetCartesianVelocityL(CStifItemParser& aItem) |
|
6228 { |
|
6229 TInt status(KErrNone); |
|
6230 iLog->Log(_L("CEnhanMediaTestClass::HandleSDSetCartesianVelocityL")); |
|
6231 if(!iEffectControl) |
|
6232 { |
|
6233 return status = KErrNotReady; |
|
6234 } |
|
6235 TInt control = 0; |
|
6236 status = aItem.GetNextInt(control); |
|
6237 TInt a,b,c; |
|
6238 status = aItem.GetNextInt(a); |
|
6239 status = aItem.GetNextInt(b); |
|
6240 status = aItem.GetNextInt(c); |
|
6241 |
|
6242 if (TControl(control) == ELISTDOPPCONTROL) |
|
6243 { |
|
6244 status = static_cast<MListenerDopplerControl*>(iEffectControl)->SetCartesianVelocity(a,b,c); |
|
6245 } |
|
6246 if (TControl(control) == ESOURDOPPCONTROL) |
|
6247 { |
|
6248 status = static_cast<MSourceDopplerControl*>(iEffectControl)->SetCartesianVelocity(a,b,c); |
|
6249 } |
|
6250 iLog->Log(_L("CEnhanMediaTestClass::HandleSDSetCartesianVelocityL END")); |
|
6251 return status; |
|
6252 } |
|
6253 |
|
6254 // End of File |