162 // |
144 // |
163 void UT_CMusEngLiveSession::Teardown() |
145 void UT_CMusEngLiveSession::Teardown() |
164 { |
146 { |
165 delete iLiveSession; |
147 delete iLiveSession; |
166 delete iRecordedLiveSession; |
148 delete iRecordedLiveSession; |
167 delete iObserver; |
149 delete iLcSessionObserver; |
168 |
150 delete iLcUiProvider; |
|
151 delete iAudioRoutingObserver; |
|
152 PropertyHelper::Close(); |
169 // Delete static data from CenRep stub |
153 // Delete static data from CenRep stub |
170 CRepository::iStaticWriteAvcKeysToStaticData = EFalse; |
154 CRepository::iStaticWriteAvcKeysToStaticData = EFalse; |
171 CRepository::DeleteStubAvcConfigKeys(); |
155 CRepository::DeleteStubAvcConfigKeys(); |
|
156 CRepository::ResetStubGlobal(); |
172 CRepository::iForceFailWithCode = KErrNone; |
157 CRepository::iForceFailWithCode = KErrNone; |
173 } |
158 } |
174 |
159 |
175 |
160 |
176 |
161 |
177 // TEST CASES |
162 // TEST CASES |
178 |
163 |
179 |
|
180 // ----------------------------------------------------------------------------- |
164 // ----------------------------------------------------------------------------- |
181 // |
165 // |
182 // ----------------------------------------------------------------------------- |
166 // ----------------------------------------------------------------------------- |
183 // |
167 // |
184 void UT_CMusEngLiveSession::UT_NewLL() |
168 void UT_CMusEngLiveSession::UT_NewLL() |
185 { |
169 { |
186 EUNIT_ASSERT( iLiveSession ); |
170 EUNIT_ASSERT( iLiveSession ) |
187 EUNIT_ASSERT( iLiveSession->iRecordedFile == KNullDesC() ); |
171 EUNIT_ASSERT( iRecordedLiveSession ) |
188 EUNIT_ASSERT( iRecordedLiveSession ); |
172 EUNIT_ASSERT( iLiveSession->iCameraHandler.iCameraUsage == MusSettingsKeys::EUseCameraSwapping ); |
189 EUNIT_ASSERT( iRecordedLiveSession->iRecordedFile == KTestVideoFileName() ); |
173 EUNIT_ASSERT( iLiveSession->iMceManagerUid == TUid::Uid( KMusUiUid ) ); |
190 } |
174 |
191 |
175 delete iLiveSession; |
192 |
176 iLiveSession = NULL; |
193 // ----------------------------------------------------------------------------- |
177 CRepository::SetStubGlobal( MusSettingsKeys::KCameraUsage, |
194 // |
178 MusSettingsKeys::EUseOnlySecondaryCamera ); |
195 // ----------------------------------------------------------------------------- |
179 |
196 // |
180 iLiveSession = CMusEngLiveSession::NewL(); |
197 void UT_CMusEngLiveSession::UT_CurrentZoomLL() |
181 |
198 { |
182 EUNIT_ASSERT_EQUALS( TInt( iLiveSession->iCameraHandler.iCameraUsage ), |
199 // Check that checking current zoom is not possible before invite |
183 TInt( MusSettingsKeys::EUseOnlySecondaryCamera ) ); |
200 TRAPD( error, iLiveSession->CurrentZoomL() ); |
184 |
201 MUS_TEST_FORWARD_ALLOC_FAILURE( error ); |
185 delete iLiveSession; |
202 EUNIT_ASSERT( error == KErrNotReady ); |
186 iLiveSession = NULL; |
203 |
187 CRepository::SetStubGlobal( MusSettingsKeys::KCameraUsage, |
204 // simulate session establishment |
188 MusSettingsKeys::EUseOnlyMainCamera ); |
205 ESTABLISH_OUT_SESSION( iLiveSession ); |
189 |
206 |
190 iLiveSession = CMusEngLiveSession::NewL(); |
207 CMceCameraSource* camera = |
191 |
208 MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) ); |
192 EUNIT_ASSERT_EQUALS( TInt( iLiveSession->iCameraHandler.iCameraUsage ), |
209 |
193 TInt( MusSettingsKeys::EUseOnlyMainCamera ) ); |
210 // Check that originally current and default zoom are the same |
194 } |
211 EUNIT_ASSERT( iLiveSession->iDefaultZoomFactor == |
|
212 iLiveSession->CurrentZoomL() ); |
|
213 |
|
214 // Zoom to maximum optical value |
|
215 while ( camera->iZoomFactor < iLiveSession->iCameraInfo.iMaxZoom ) |
|
216 { |
|
217 iLiveSession->ZoomInL(); |
|
218 } |
|
219 |
|
220 EUNIT_ASSERT( iLiveSession->iCameraInfo.iMaxZoom == |
|
221 iLiveSession->CurrentZoomL() ); |
|
222 |
|
223 // Zoom using digital zoom |
|
224 |
|
225 iLiveSession->ZoomInL(); |
|
226 |
|
227 EUNIT_ASSERT( iLiveSession->CurrentZoomL() == |
|
228 iLiveSession->iCameraInfo.iMaxZoom + |
|
229 camera->iDigitalZoomFactor ) |
|
230 |
|
231 } |
|
232 |
|
233 |
|
234 // ----------------------------------------------------------------------------- |
|
235 // |
|
236 // ----------------------------------------------------------------------------- |
|
237 // |
|
238 void UT_CMusEngLiveSession::UT_CMusEngLiveSession_SetZoomLL() |
|
239 { |
|
240 TRAPD( error, iLiveSession->SetZoomL(2) ); |
|
241 MUS_TEST_FORWARD_ALLOC_FAILURE( error ); |
|
242 EUNIT_ASSERT( error == KErrNotReady ); |
|
243 ESTABLISH_OUT_SESSION( iLiveSession ); |
|
244 CMceCameraSource* camera = |
|
245 MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) ); |
|
246 EUNIT_ASSERT( camera->iZoomFactor == 1 ); |
|
247 EUNIT_ASSERT( camera->iDigitalZoomFactor == 0 ); |
|
248 TRAPD( err, iLiveSession->SetZoomL(0) ); |
|
249 EUNIT_ASSERT( err == KErrArgument ); |
|
250 iLiveSession->SetZoomL(2); |
|
251 EUNIT_ASSERT( camera->iZoomFactor == 2 ); |
|
252 TRAPD( err1, iLiveSession->SetZoomL(14) ); |
|
253 EUNIT_ASSERT( err1 == KErrArgument ); |
|
254 iLiveSession->SetZoomL( 5 ); |
|
255 EUNIT_ASSERT( camera->iDigitalZoomFactor == 2 ); |
|
256 } |
|
257 void UT_CMusEngLiveSession::UT_MaxZoomLL() |
|
258 { |
|
259 // Check that checking maximum zoom is not possible before invite |
|
260 TRAPD( error, iLiveSession->MaxZoomL() ); |
|
261 MUS_TEST_FORWARD_ALLOC_FAILURE( error ); |
|
262 EUNIT_ASSERT( error == KErrNotReady ); |
|
263 |
|
264 // simulate session establishment |
|
265 ESTABLISH_OUT_SESSION( iLiveSession ); |
|
266 |
|
267 EUNIT_ASSERT( iLiveSession->MaxZoomL() == |
|
268 iLiveSession->iCameraInfo.iMaxZoom + |
|
269 iLiveSession->iCameraInfo.iMaxDigitalZoom ); |
|
270 } |
|
271 |
|
272 |
|
273 // ----------------------------------------------------------------------------- |
|
274 // |
|
275 // ----------------------------------------------------------------------------- |
|
276 // |
|
277 void UT_CMusEngLiveSession::UT_ZoomInLL() |
|
278 { |
|
279 // Check that zooming is not possible before invite |
|
280 TRAPD( error, iLiveSession->ZoomInL() ); |
|
281 MUS_TEST_FORWARD_ALLOC_FAILURE( error ); |
|
282 EUNIT_ASSERT( error == KErrNotReady ); |
|
283 |
|
284 // simulate session establishment |
|
285 ESTABLISH_OUT_SESSION( iLiveSession ); |
|
286 |
|
287 CMceCameraSource* camera = |
|
288 MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) ); |
|
289 |
|
290 // Check the default value |
|
291 EUNIT_ASSERT( iLiveSession->iDefaultZoomFactor == camera->iZoomFactor ); |
|
292 |
|
293 // Check that zoom factor can be increased |
|
294 USER_SLEEP; //insure that small step is used |
|
295 iLiveSession->ZoomInL(); |
|
296 EUNIT_ASSERT( camera->iZoomFactor == iLiveSession->iDefaultZoomFactor + |
|
297 iLiveSession->iSmallZoomStep ); |
|
298 |
|
299 //Check the "burst" mode (immediate second ZoomIn), big step should be used |
|
300 TInt nZoom = camera->iZoomFactor + camera->iDigitalZoomFactor; |
|
301 iLiveSession->ZoomInL(); |
|
302 TInt nStep = camera->iZoomFactor + camera->iDigitalZoomFactor - nZoom; |
|
303 EUNIT_ASSERT( nStep == iLiveSession->iBigZoomStep ); |
|
304 |
|
305 // Zoom to maximum optical value |
|
306 while ( camera->iZoomFactor < iLiveSession->iCameraInfo.iMaxZoom ) |
|
307 { |
|
308 iLiveSession->ZoomInL(); |
|
309 } |
|
310 |
|
311 TInt maxOpticalZoomFactor = camera->ZoomFactorL(); |
|
312 |
|
313 // Check that digital zoom is used instead of optical |
|
314 iLiveSession->ZoomInL(); |
|
315 EUNIT_ASSERT( camera->iZoomFactor == maxOpticalZoomFactor ); |
|
316 EUNIT_ASSERT( camera->iDigitalZoomFactor > 0 ); |
|
317 |
|
318 // Zoom to maximum digital value |
|
319 while ( camera->iDigitalZoomFactor < |
|
320 iLiveSession->iCameraInfo.iMaxDigitalZoom ) |
|
321 { |
|
322 iLiveSession->ZoomInL(); |
|
323 } |
|
324 |
|
325 TInt maxDigitalZoomFactor = camera->DigitalZoomFactorL(); |
|
326 |
|
327 // Check that further zooming is impossible |
|
328 iLiveSession->ZoomInL(); |
|
329 EUNIT_ASSERT( camera->iZoomFactor == maxOpticalZoomFactor ); |
|
330 EUNIT_ASSERT( camera->iDigitalZoomFactor == maxDigitalZoomFactor ); |
|
331 |
|
332 } |
|
333 |
|
334 |
|
335 // ----------------------------------------------------------------------------- |
|
336 // |
|
337 // ----------------------------------------------------------------------------- |
|
338 // |
|
339 void UT_CMusEngLiveSession::UT_ZoomOutLL() |
|
340 { |
|
341 // Check that zooming is not possible before invite |
|
342 TRAPD( error, iLiveSession->ZoomOutL() ); |
|
343 MUS_TEST_FORWARD_ALLOC_FAILURE( error ); |
|
344 EUNIT_ASSERT( error == KErrNotReady ); |
|
345 |
|
346 // simulate session establishment |
|
347 ESTABLISH_OUT_SESSION( iLiveSession ); |
|
348 |
|
349 CMceCameraSource* camera = |
|
350 MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) ); |
|
351 |
|
352 // Check the default value |
|
353 EUNIT_ASSERT( iLiveSession->iDefaultZoomFactor == camera->iZoomFactor ); |
|
354 |
|
355 // Simulate maximum zoom |
|
356 camera->iZoomFactor = iLiveSession->iCameraInfo.iMaxZoom; |
|
357 camera->iDigitalZoomFactor = iLiveSession->iCameraInfo.iMaxDigitalZoom; |
|
358 |
|
359 // Check that digital zoom factor can be decreased |
|
360 USER_SLEEP; //insure that small step is used |
|
361 iLiveSession->ZoomOutL(); |
|
362 EUNIT_ASSERT( camera->iZoomFactor == iLiveSession->iCameraInfo.iMaxZoom ); |
|
363 EUNIT_ASSERT( camera->iDigitalZoomFactor == |
|
364 iLiveSession->iCameraInfo.iMaxDigitalZoom - |
|
365 iLiveSession->iSmallZoomStep ); |
|
366 |
|
367 //Check the "burst" mode (immediate second ZoomOut), big step should be used |
|
368 TInt nZoom = camera->iZoomFactor + camera->iDigitalZoomFactor; |
|
369 iLiveSession->ZoomOutL(); |
|
370 TInt nStep; |
|
371 nStep = nZoom - (camera->iZoomFactor + camera->iDigitalZoomFactor ); |
|
372 EUNIT_ASSERT( nStep == iLiveSession->iBigZoomStep ); |
|
373 |
|
374 // Simulate maximum zoom again |
|
375 camera->iZoomFactor = iLiveSession->iCameraInfo.iMaxZoom; |
|
376 camera->iDigitalZoomFactor = iLiveSession->iCameraInfo.iMaxDigitalZoom; |
|
377 |
|
378 // Zoom to minimum digital zoom |
|
379 while ( camera->iDigitalZoomFactor > 0 ) |
|
380 { |
|
381 iLiveSession->ZoomOutL(); |
|
382 } |
|
383 |
|
384 EUNIT_ASSERT( camera->iZoomFactor == iLiveSession->iCameraInfo.iMaxZoom ); |
|
385 EUNIT_ASSERT( camera->iDigitalZoomFactor == 0 ); |
|
386 |
|
387 // Check that optical zoom is decreased instead of digital |
|
388 USER_SLEEP; //insure that step is the small one |
|
389 iLiveSession->ZoomOutL(); |
|
390 EUNIT_ASSERT( camera->iZoomFactor == |
|
391 iLiveSession->iCameraInfo.iMaxZoom - |
|
392 iLiveSession->iSmallZoomStep ); |
|
393 EUNIT_ASSERT( camera->iDigitalZoomFactor == 0 ); |
|
394 |
|
395 // Zoom to minimum optical zoom |
|
396 while ( camera->iZoomFactor > iLiveSession->iCameraInfo.iMinZoom ) |
|
397 { |
|
398 iLiveSession->ZoomOutL(); |
|
399 } |
|
400 |
|
401 // Check that further zooming is impossible |
|
402 iLiveSession->ZoomOutL(); |
|
403 EUNIT_ASSERT( camera->iZoomFactor == iLiveSession->iCameraInfo.iMinZoom ); |
|
404 EUNIT_ASSERT( camera->iDigitalZoomFactor == 0 ); |
|
405 } |
|
406 |
|
407 |
|
408 // ----------------------------------------------------------------------------- |
|
409 // |
|
410 // ----------------------------------------------------------------------------- |
|
411 // |
|
412 void UT_CMusEngLiveSession::UT_ZoomDefaultLL() |
|
413 { |
|
414 // Check that zooming is not possible before invite |
|
415 TRAPD( error, iLiveSession->ZoomDefaultL() ); |
|
416 MUS_TEST_FORWARD_ALLOC_FAILURE( error ); |
|
417 EUNIT_ASSERT( error == KErrNotReady ); |
|
418 |
|
419 // simulate session establishment |
|
420 ESTABLISH_OUT_SESSION( iLiveSession ); |
|
421 |
|
422 CMceCameraSource* camera = |
|
423 MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) ); |
|
424 |
|
425 // Check the default value |
|
426 EUNIT_ASSERT( iLiveSession->iDefaultZoomFactor == camera->iZoomFactor ); |
|
427 |
|
428 // increase zoom factor so much that optical zoom is in maximum value |
|
429 // and digital zoom is in use |
|
430 while ( camera->iDigitalZoomFactor == 0 ) |
|
431 { |
|
432 iLiveSession->ZoomInL(); |
|
433 } |
|
434 EUNIT_ASSERT( camera->iZoomFactor > iLiveSession->iDefaultZoomFactor ); |
|
435 EUNIT_ASSERT( camera->iDigitalZoomFactor > 0 ); |
|
436 |
|
437 // back to default |
|
438 iLiveSession->ZoomDefaultL(); |
|
439 EUNIT_ASSERT( camera->iZoomFactor == iLiveSession->iDefaultZoomFactor ); |
|
440 EUNIT_ASSERT( camera->iDigitalZoomFactor == 0 ); |
|
441 } |
|
442 |
|
443 |
|
444 // ----------------------------------------------------------------------------- |
|
445 // |
|
446 // ----------------------------------------------------------------------------- |
|
447 // |
|
448 void UT_CMusEngLiveSession::UT_SetBrightnessLL() |
|
449 { |
|
450 // Check that setting brightness is not possible before invite |
|
451 EUNIT_ASSERT_SPECIFIC_LEAVE( |
|
452 iLiveSession->SetBrightnessL( KTestSomeBrightness ), |
|
453 KErrNotReady ) |
|
454 |
|
455 // simulate session establishment |
|
456 ESTABLISH_OUT_SESSION( iLiveSession ); |
|
457 |
|
458 CMceCameraSource* camera = |
|
459 MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) ); |
|
460 |
|
461 camera->iCameraInfo.iOptionsSupported = |
|
462 camera->iCameraInfo.iOptionsSupported | TCameraInfo::EBrightnessSupported; |
|
463 |
|
464 // Check that originally current and default brightness are the same |
|
465 EUNIT_ASSERT_EQUALS( iLiveSession->iDefaultBrightness, |
|
466 iLiveSession->CurrentBrightnessL() ) |
|
467 |
|
468 // Test setting brightness |
|
469 iLiveSession->SetBrightnessL( KTestSomeBrightness ); |
|
470 |
|
471 EUNIT_ASSERT_EQUALS( KTestSomeBrightness, |
|
472 iLiveSession->CurrentBrightnessL() ) |
|
473 } |
|
474 |
|
475 |
|
476 |
|
477 // ----------------------------------------------------------------------------- |
|
478 // |
|
479 // ----------------------------------------------------------------------------- |
|
480 // |
|
481 void UT_CMusEngLiveSession::UT_CurrentBrightnessLL() |
|
482 { |
|
483 // Check that checking current brightness is not possible before invite |
|
484 EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->CurrentBrightnessL(), |
|
485 KErrNotReady ) |
|
486 |
|
487 // All the other stuff checked in tests of SetBrightnessL |
|
488 } |
|
489 |
|
490 // ----------------------------------------------------------------------------- |
|
491 // |
|
492 // ----------------------------------------------------------------------------- |
|
493 // |
|
494 void UT_CMusEngLiveSession::UT_MaxBrightnessLL() |
|
495 { |
|
496 // MaxBrightness should return a constant |
|
497 |
|
498 EUNIT_ASSERT_EQUALS( KTestMaxBrightness, iLiveSession->MaxBrightnessL() ) |
|
499 } |
|
500 |
|
501 // ----------------------------------------------------------------------------- |
|
502 // |
|
503 // ----------------------------------------------------------------------------- |
|
504 // |
|
505 void UT_CMusEngLiveSession::UT_MinBrightnessLL() |
|
506 { |
|
507 // MinBrightness should return a constant |
|
508 |
|
509 EUNIT_ASSERT_EQUALS( KTestMinBrightness, iLiveSession->MinBrightnessL() ) |
|
510 } |
|
511 |
|
512 // ----------------------------------------------------------------------------- |
|
513 // |
|
514 // ----------------------------------------------------------------------------- |
|
515 // |
|
516 void UT_CMusEngLiveSession::UT_IncreaseBrightnessLL() |
|
517 { |
|
518 // Check that increasing brightness is not possible before invite |
|
519 EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->IncreaseBrightnessL(), |
|
520 KErrNotReady ) |
|
521 |
|
522 // simulate session establishment |
|
523 ESTABLISH_OUT_SESSION( iLiveSession ); |
|
524 |
|
525 CMceCameraSource* camera = |
|
526 MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) ); |
|
527 |
|
528 camera->iCameraInfo.iOptionsSupported = |
|
529 camera->iCameraInfo.iOptionsSupported | TCameraInfo::EBrightnessSupported; |
|
530 |
|
531 // Check that originally current and default brightness are the same |
|
532 EUNIT_ASSERT_EQUALS( iLiveSession->iDefaultBrightness, |
|
533 iLiveSession->CurrentBrightnessL() ) |
|
534 |
|
535 // Check that brightness can be increased... |
|
536 iLiveSession->IncreaseBrightnessL(); |
|
537 |
|
538 EUNIT_ASSERT_EQUALS( iLiveSession->iDefaultBrightness + KTestBrightnessStepSize, |
|
539 iLiveSession->CurrentBrightnessL() ) |
|
540 |
|
541 // ... but only to maximum |
|
542 |
|
543 iLiveSession->SetBrightnessL( KTestMaxBrightness ); |
|
544 |
|
545 iLiveSession->IncreaseBrightnessL(); |
|
546 |
|
547 EUNIT_ASSERT_EQUALS( KTestMaxBrightness, |
|
548 iLiveSession->CurrentBrightnessL() ) |
|
549 } |
|
550 |
|
551 // ----------------------------------------------------------------------------- |
|
552 // |
|
553 // ----------------------------------------------------------------------------- |
|
554 // |
|
555 void UT_CMusEngLiveSession::UT_DecreaseBrightnessLL() |
|
556 { |
|
557 // Check that decreasing brightness is not possible before invite |
|
558 EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->DecreaseBrightnessL(), |
|
559 KErrNotReady ) |
|
560 |
|
561 // simulate session establishment |
|
562 ESTABLISH_OUT_SESSION( iLiveSession ); |
|
563 |
|
564 CMceCameraSource* camera = |
|
565 MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) ); |
|
566 |
|
567 camera->iCameraInfo.iOptionsSupported = |
|
568 camera->iCameraInfo.iOptionsSupported | TCameraInfo::EBrightnessSupported; |
|
569 |
|
570 // Check that originally current and default brightness are the same |
|
571 EUNIT_ASSERT_EQUALS( iLiveSession->iDefaultBrightness, |
|
572 iLiveSession->CurrentBrightnessL() ) |
|
573 |
|
574 // Check that brightness can be decreased... |
|
575 iLiveSession->DecreaseBrightnessL(); |
|
576 |
|
577 EUNIT_ASSERT_EQUALS( iLiveSession->iDefaultBrightness - KTestBrightnessStepSize, |
|
578 iLiveSession->CurrentBrightnessL() ) |
|
579 |
|
580 // ... but only to minimum |
|
581 |
|
582 iLiveSession->SetBrightnessL( KTestMinBrightness ); |
|
583 |
|
584 iLiveSession->DecreaseBrightnessL(); |
|
585 |
|
586 EUNIT_ASSERT_EQUALS( KTestMinBrightness, |
|
587 iLiveSession->CurrentBrightnessL() ) |
|
588 } |
|
589 |
|
590 // ----------------------------------------------------------------------------- |
|
591 // |
|
592 // ----------------------------------------------------------------------------- |
|
593 // |
|
594 void UT_CMusEngLiveSession::UT_BrightnessDefaultLL() |
|
595 { |
|
596 // Check that setting default brightness is not possible before invite |
|
597 EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->BrightnessDefaultL(), |
|
598 KErrNotReady ) |
|
599 |
|
600 // simulate session establishment |
|
601 ESTABLISH_OUT_SESSION( iLiveSession ); |
|
602 |
|
603 CMceCameraSource* camera = |
|
604 MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) ); |
|
605 |
|
606 camera->iCameraInfo.iOptionsSupported = |
|
607 camera->iCameraInfo.iOptionsSupported | TCameraInfo::EBrightnessSupported; |
|
608 |
|
609 // Check that originally current and default brightness are the same |
|
610 EUNIT_ASSERT_EQUALS( iLiveSession->iDefaultBrightness, |
|
611 iLiveSession->CurrentBrightnessL() ) |
|
612 |
|
613 // set brightness to max |
|
614 iLiveSession->SetBrightnessL( KTestMaxBrightness ); |
|
615 EUNIT_ASSERT_NOT_EQUALS( iLiveSession->iDefaultBrightness, |
|
616 iLiveSession->CurrentBrightnessL() ) |
|
617 |
|
618 // set brightness to default and check it |
|
619 iLiveSession->BrightnessDefaultL(); |
|
620 |
|
621 EUNIT_ASSERT_EQUALS( iLiveSession->iDefaultBrightness, |
|
622 iLiveSession->CurrentBrightnessL() ) |
|
623 } |
|
624 |
|
625 // ----------------------------------------------------------------------------- |
|
626 // |
|
627 // ----------------------------------------------------------------------------- |
|
628 // |
|
629 void UT_CMusEngLiveSession::UT_BrightnessAutoLL() |
|
630 { |
|
631 // Check that setting brightness to auto is not possible before invite |
|
632 EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->BrightnessAutoL(), |
|
633 KErrNotReady ); |
|
634 |
|
635 // simulate session establishment |
|
636 ESTABLISH_OUT_SESSION( iLiveSession ); |
|
637 |
|
638 CMceCameraSource* camera = |
|
639 MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) ); |
|
640 |
|
641 camera->iCameraInfo.iOptionsSupported = |
|
642 camera->iCameraInfo.iOptionsSupported | TCameraInfo::EBrightnessSupported; |
|
643 |
|
644 // Check that originally brightness is not auto |
|
645 EUNIT_ASSERT_NOT_EQUALS( CCamera::EBrightnessAuto, |
|
646 iLiveSession->CurrentBrightnessL() ) |
|
647 |
|
648 // check that brightness is set to auto |
|
649 iLiveSession->BrightnessAutoL(); |
|
650 EUNIT_ASSERT_EQUALS( CCamera::EBrightnessAuto, |
|
651 iLiveSession->CurrentBrightnessL() ) |
|
652 } |
|
653 |
|
654 |
|
655 // ----------------------------------------------------------------------------- |
|
656 // |
|
657 // ----------------------------------------------------------------------------- |
|
658 // |
|
659 void UT_CMusEngLiveSession::UT_RecordL_and_IsRecordingLL() |
|
660 { |
|
661 // Check that recording is not possible before invite |
|
662 EUNIT_ASSERT_SPECIFIC_LEAVE( iRecordedLiveSession->RecordL( ETrue ), |
|
663 KErrNotReady ) |
|
664 |
|
665 // simulate session establishment |
|
666 ESTABLISH_OUT_SESSION( iLiveSession ); |
|
667 ESTABLISH_OUT_SESSION( iRecordedLiveSession ); |
|
668 |
|
669 // Check that recording is off by default |
|
670 EUNIT_ASSERT( !iRecordedLiveSession->IsRecording() ); |
|
671 |
|
672 // Check that recording can be set on |
|
673 iRecordedLiveSession->RecordL( ETrue ); |
|
674 EUNIT_ASSERT( iRecordedLiveSession->IsRecording() ); |
|
675 |
|
676 // Check that recording cannot be set on if recording stream does not exist |
|
677 EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->RecordL( ETrue ), |
|
678 KErrNotReady ) |
|
679 |
|
680 // Check that setting on the recording twice does not harm |
|
681 iRecordedLiveSession->RecordL( ETrue ); |
|
682 EUNIT_ASSERT( iRecordedLiveSession->IsRecording() ); |
|
683 |
|
684 // Check that recording can be set off again |
|
685 iRecordedLiveSession->RecordL( EFalse ); |
|
686 EUNIT_ASSERT( !iRecordedLiveSession->IsRecording() ); |
|
687 |
|
688 // Check that setting off the recording twice does not harm |
|
689 iRecordedLiveSession->RecordL( EFalse ); |
|
690 EUNIT_ASSERT( !iRecordedLiveSession->IsRecording() ); |
|
691 } |
|
692 |
|
693 |
|
694 // ----------------------------------------------------------------------------- |
|
695 // |
|
696 // ----------------------------------------------------------------------------- |
|
697 // |
|
698 void UT_CMusEngLiveSession::UT_PlayLL() |
|
699 { |
|
700 // Check that resuming is not possible before invite |
|
701 TRAPD( error, iLiveSession->PlayL() ); |
|
702 MUS_TEST_FORWARD_ALLOC_FAILURE( error ); |
|
703 EUNIT_ASSERT( error == KErrNotReady ); |
|
704 |
|
705 ESTABLISH_OUT_SESSION( iLiveSession ); |
|
706 |
|
707 iLiveSession->PauseL(); |
|
708 |
|
709 CMceCameraSource* camera = |
|
710 MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) ); |
|
711 |
|
712 iLiveSession->PlayL(); |
|
713 |
|
714 EUNIT_ASSERT( camera->IsEnabled() ); |
|
715 |
|
716 // Try to enable camera again, request should be ignored |
|
717 |
|
718 iLiveSession->PlayL(); |
|
719 |
|
720 EUNIT_ASSERT( camera->IsEnabled() ); |
|
721 |
|
722 } |
|
723 |
|
724 |
|
725 // ----------------------------------------------------------------------------- |
|
726 // |
|
727 // ----------------------------------------------------------------------------- |
|
728 // |
|
729 void UT_CMusEngLiveSession::UT_PauseLL() |
|
730 { |
|
731 // Check that pausing is not possible before invite |
|
732 TRAPD( error, iLiveSession->PauseL() ); |
|
733 MUS_TEST_FORWARD_ALLOC_FAILURE( error ); |
|
734 EUNIT_ASSERT( error == KErrNotReady ); |
|
735 |
|
736 ESTABLISH_OUT_SESSION( iLiveSession ); |
|
737 |
|
738 iLiveSession->PlayL(); |
|
739 |
|
740 CMceCameraSource* camera = |
|
741 MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) ); |
|
742 |
|
743 iLiveSession->PauseL(); |
|
744 |
|
745 EUNIT_ASSERT( !camera->IsEnabled() ); |
|
746 |
|
747 // Try to disable camera again, request should be ignored |
|
748 |
|
749 iLiveSession->PauseL(); |
|
750 |
|
751 EUNIT_ASSERT( !camera->IsEnabled() ); |
|
752 |
|
753 } |
|
754 |
|
755 |
|
756 // ----------------------------------------------------------------------------- |
|
757 // |
|
758 // ----------------------------------------------------------------------------- |
|
759 // |
|
760 void UT_CMusEngLiveSession::UT_IsPlayingLL() |
|
761 { |
|
762 // Try without a session |
|
763 EUNIT_ASSERT_SPECIFIC_LEAVE( iLiveSession->IsPlayingL(), KErrNotReady ); |
|
764 |
|
765 // Normal cases |
|
766 ESTABLISH_OUT_SESSION( iLiveSession ); |
|
767 |
|
768 iLiveSession->PlayL(); |
|
769 EUNIT_ASSERT( iLiveSession->IsPlayingL() ) |
|
770 |
|
771 iLiveSession->PauseL(); |
|
772 EUNIT_ASSERT( !iLiveSession->IsPlayingL() ) |
|
773 } |
|
774 |
|
775 |
195 |
776 // ----------------------------------------------------------------------------- |
196 // ----------------------------------------------------------------------------- |
777 // |
197 // |
778 // ----------------------------------------------------------------------------- |
198 // ----------------------------------------------------------------------------- |
779 // |
199 // |
780 void UT_CMusEngLiveSession::UT_CompleteSessionStructureLL() |
200 void UT_CMusEngLiveSession::UT_CompleteSessionStructureLL() |
781 { |
201 { |
782 |
|
783 CMceStreamBundle* localBundle = |
202 CMceStreamBundle* localBundle = |
784 CMceStreamBundle::NewLC( CMceStreamBundle::ELS ); |
203 CMceStreamBundle::NewLC( CMceStreamBundle::ELS ); |
785 |
204 |
786 // Check that structure cannot be completed before creating the session |
205 // Check that structure cannot be completed before creating the session |
787 TRAPD( error, iLiveSession->CompleteSessionStructureL( *localBundle ) ); |
206 TRAPD( error, iLiveSession->CompleteSessionStructureL( *localBundle ) ); |
788 MUS_TEST_FORWARD_ALLOC_FAILURE( error ); |
207 MUS_TEST_FORWARD_ALLOC_FAILURE( error ); |
789 EUNIT_ASSERT( error == KErrNotReady ); |
208 EUNIT_ASSERT( error == KErrNotReady ); |
1007 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
404 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1008 *videoStream ); |
405 *videoStream ); |
1009 CleanupStack::PopAndDestroy( videoStream ); |
406 CleanupStack::PopAndDestroy( videoStream ); |
1010 |
407 |
1011 // Simulate sending invite |
408 // Simulate sending invite |
1012 iLiveSession->InviteL( KTestRecipientSipUri() ); |
409 iLiveSession->EstablishLcSessionL(); |
1013 |
410 |
1014 // Try all the stream states |
411 // Try all the stream states |
1015 CMceMediaStream* changedStream = iLiveSession->iSession->Streams()[0]; |
412 CMceMediaStream* changedStream = iLiveSession->iSession->Streams()[0]; |
1016 |
413 |
1017 // EUninitialized, stream is created, unexpected change, nothing happens |
414 // EUninitialized, stream is created, unexpected change, nothing happens |
1018 changedStream->iState = CMceMediaStream::EUninitialized; |
415 changedStream->iState = CMceMediaStream::EUninitialized; |
1019 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
416 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1020 *changedStream ); |
417 *changedStream ); |
1021 EUNIT_ASSERT( iObserver->IsReseted() ); |
418 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); |
1022 |
419 |
1023 // EInitialized, stream is initialized |
420 // EInitialized, stream is initialized |
1024 changedStream->iState = CMceMediaStream::EInitialized; |
421 changedStream->iState = CMceMediaStream::EInitialized; |
1025 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
422 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1026 *changedStream ); |
423 *changedStream ); |
1027 EUNIT_ASSERT( iObserver->IsReseted() ); |
424 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); |
1028 |
425 |
1029 // EBuffering, stream is buffering |
426 // EBuffering, stream is buffering |
1030 changedStream->iState = CMceMediaStream::EBuffering; |
427 changedStream->iState = CMceMediaStream::EBuffering; |
1031 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
428 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1032 *changedStream ); |
429 *changedStream ); |
1033 EUNIT_ASSERT( iObserver->IsReseted() ); |
430 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); |
1034 |
431 |
1035 // EIdle, stream is not receiving RTP |
432 // EIdle, stream is not receiving RTP |
1036 changedStream->iState = CMceMediaStream::EIdle; |
433 changedStream->iState = CMceMediaStream::EIdle; |
1037 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
434 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1038 *changedStream ); |
435 *changedStream ); |
1039 EUNIT_ASSERT( iObserver->iStreamIdleCalled ); |
436 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); |
1040 |
437 |
1041 // EStreaming, stream is streaming |
438 // EStreaming, stream is streaming |
1042 changedStream->iState = CMceMediaStream::EStreaming; |
439 changedStream->iState = CMceMediaStream::EStreaming; |
1043 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
440 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( *changedStream ); |
1044 *changedStream ); |
441 EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ), |
1045 EUNIT_ASSERT( iObserver->iStreamStreamingCalled ); |
442 TInt( CLcSessionObserverStub::EPlayerStateChanged ) ) |
1046 iObserver->Reset(); |
443 iLcSessionObserver->Reset(); |
1047 |
444 |
1048 // EDisabled, stream is explicitly disabled |
445 // EDisabled, stream is explicitly disabled |
1049 changedStream->iState = CMceMediaStream::EDisabled; |
446 changedStream->iState = CMceMediaStream::EDisabled; |
1050 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
447 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1051 *changedStream ); |
448 *changedStream ); |
1052 EUNIT_ASSERT( iObserver->IsReseted() ); |
449 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); |
1053 |
450 |
1054 // ENoResources, stream has no needed resources to stream |
451 // ENoResources, stream has no needed resources to stream |
1055 changedStream->iState = CMceMediaStream::ENoResources; |
452 changedStream->iState = CMceMediaStream::ENoResources; |
1056 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
453 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1057 *changedStream ); |
454 *changedStream ); |
1058 EUNIT_ASSERT( iObserver->IsReseted() ); |
455 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); |
1059 |
456 |
1060 // ETranscodingRequired, stream requires non-realtime transcoding |
457 // ETranscodingRequired, stream requires non-realtime transcoding |
1061 changedStream->iState = CMceMediaStream::ETranscodingRequired; |
458 changedStream->iState = CMceMediaStream::ETranscodingRequired; |
1062 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
459 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1063 *changedStream ); |
460 *changedStream ); |
1064 EUNIT_ASSERT( iObserver->IsReseted() ); |
461 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); |
1065 |
462 |
1066 // ETranscoding, stream is transcoding in non-realtime |
463 // ETranscoding, stream is transcoding in non-realtime |
1067 changedStream->iState = CMceMediaStream::ETranscoding; |
464 changedStream->iState = CMceMediaStream::ETranscoding; |
1068 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
465 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1069 *changedStream ); |
466 *changedStream ); |
1070 EUNIT_ASSERT( iObserver->IsReseted() ); |
467 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); |
1071 } |
468 } |
1072 |
|
1073 |
469 |
1074 // ----------------------------------------------------------------------------- |
470 // ----------------------------------------------------------------------------- |
1075 // Although all states are not meaningfull for LiveSession, all states are |
471 // Although all states are not meaningfull for LiveSession, all states are |
1076 // tested in order to force the updating of unit tests when behavior is changed |
472 // tested in order to force the updating of unit tests when behavior is changed |
1077 // ----------------------------------------------------------------------------- |
473 // ----------------------------------------------------------------------------- |
1085 *CMceCameraSource::NewLC( *iLiveSession->iManager ) ); |
481 *CMceCameraSource::NewLC( *iLiveSession->iManager ) ); |
1086 CleanupStack::PopAndDestroy(); // camera |
482 CleanupStack::PopAndDestroy(); // camera |
1087 CleanupStack::PopAndDestroy( videoStream ); |
483 CleanupStack::PopAndDestroy( videoStream ); |
1088 |
484 |
1089 // Simulate sending invite |
485 // Simulate sending invite |
1090 iLiveSession->InviteL( KTestRecipientSipUri() ); |
486 iLiveSession->EstablishLcSessionL(); |
1091 |
487 |
1092 // Try all the stream states |
488 // Try all the stream states |
1093 CMceMediaStream* changedStream = iLiveSession->iSession->Streams()[0]; |
489 CMceMediaStream* changedStream = iLiveSession->iSession->Streams()[0]; |
1094 CMceMediaSource* changedSource = changedStream->Source(); |
490 CMceMediaSource* changedSource = changedStream->Source(); |
1095 |
491 |
1096 // EUninitialized, stream is created, unexpected change, nothing happens |
492 // EUninitialized, stream is created, unexpected change, nothing happens |
1097 changedStream->iState = CMceMediaStream::EUninitialized; |
493 changedStream->iState = CMceMediaStream::EUninitialized; |
1098 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
494 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1099 *changedStream, *changedSource ); |
495 *changedStream, *changedSource ); |
1100 EUNIT_ASSERT( iObserver->IsReseted() ); |
496 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); |
1101 |
497 |
1102 // EInitialized, stream is initialized |
498 // EInitialized, stream is initialized |
1103 changedStream->iState = CMceMediaStream::EInitialized; |
499 changedStream->iState = CMceMediaStream::EInitialized; |
1104 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
500 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1105 *changedStream, *changedSource );; |
501 *changedStream, *changedSource );; |
1106 EUNIT_ASSERT( iObserver->IsReseted() ); |
502 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); |
1107 |
503 |
1108 // EBuffering, stream is buffering |
504 // EBuffering, stream is buffering |
1109 changedStream->iState = CMceMediaStream::EBuffering; |
505 changedStream->iState = CMceMediaStream::EBuffering; |
1110 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
506 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1111 *changedStream, *changedSource ); |
507 *changedStream, *changedSource ); |
1112 EUNIT_ASSERT( iObserver->IsReseted() ); |
508 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); |
1113 |
509 |
1114 // EIdle, stream is not receiving RTP |
510 // EIdle, stream is not receiving RTP |
1115 changedStream->iState = CMceMediaStream::EIdle; |
511 changedStream->iState = CMceMediaStream::EIdle; |
1116 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
512 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1117 *changedStream, *changedSource ); |
513 *changedStream, *changedSource ); |
1118 EUNIT_ASSERT( iObserver->iStreamIdleCalled ); |
514 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); |
1119 |
515 |
1120 // EStreaming, stream is streaming |
516 // EStreaming, stream is streaming |
1121 changedStream->iState = CMceMediaStream::EStreaming; |
517 changedStream->iState = CMceMediaStream::EStreaming; |
1122 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
518 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1123 *changedStream, *changedSource ); |
519 *changedStream, *changedSource ); |
1124 EUNIT_ASSERT( iObserver->iStreamStreamingCalled ); |
520 EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ), |
1125 iObserver->Reset(); |
521 TInt( CLcSessionObserverStub::EPlayerStateChanged ) ) |
|
522 iLcSessionObserver->Reset(); |
1126 |
523 |
1127 // EDisabled, stream is explicitly disabled |
524 // EDisabled, stream is explicitly disabled |
1128 changedStream->iState = CMceMediaStream::EDisabled; |
525 changedStream->iState = CMceMediaStream::EDisabled; |
1129 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
526 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1130 *changedStream, *changedSource ); |
527 *changedStream, *changedSource ); |
1131 EUNIT_ASSERT( iObserver->IsReseted() ); |
528 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); |
1132 |
529 |
1133 // ENoResources, stream has no needed resources to stream |
530 // ENoResources, stream has no needed resources to stream |
1134 changedStream->iState = CMceMediaStream::ENoResources; |
531 changedStream->iState = CMceMediaStream::ENoResources; |
1135 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
532 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1136 *changedStream, *changedSource ); |
533 *changedStream, *changedSource ); |
1137 EUNIT_ASSERT( iObserver->IsReseted() ); |
534 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); |
1138 |
535 |
1139 // ETranscodingRequired, stream requires non-realtime transcoding |
536 // ETranscodingRequired, stream requires non-realtime transcoding |
1140 changedStream->iState = CMceMediaStream::ETranscodingRequired; |
537 changedStream->iState = CMceMediaStream::ETranscodingRequired; |
1141 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
538 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1142 *changedStream, *changedSource ); |
539 *changedStream, *changedSource ); |
1143 EUNIT_ASSERT( iObserver->IsReseted() ); |
540 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); |
1144 |
541 |
1145 // ETranscoding, stream is transcoding in non-realtime |
542 // ETranscoding, stream is transcoding in non-realtime |
1146 changedStream->iState = CMceMediaStream::ETranscoding; |
543 changedStream->iState = CMceMediaStream::ETranscoding; |
1147 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
544 static_cast<MMceStreamObserver*>(iLiveSession)->StreamStateChanged( |
1148 *changedStream, *changedSource ); |
545 *changedStream, *changedSource ); |
1149 EUNIT_ASSERT( iObserver->IsReseted() ); |
546 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ); |
1150 } |
547 } |
1151 |
548 |
1152 |
|
1153 // ----------------------------------------------------------------------------- |
549 // ----------------------------------------------------------------------------- |
1154 // Although all states are not meaningfull for LiveSession, all states are |
550 // Although all states are not meaningfull for LiveSession, all states are |
1155 // tested in order to force the updating of unit tests when behavior is changed |
551 // tested in order to force the updating of unit tests when behavior is changed |
1156 // ----------------------------------------------------------------------------- |
552 // ----------------------------------------------------------------------------- |
1157 // |
553 // |
1210 recordingStream->Sinks()[0]->iIsEnabled = EFalse; |
609 recordingStream->Sinks()[0]->iIsEnabled = EFalse; |
1211 |
610 |
1212 iRecordedLiveSession->StreamStateChanged( *recordingStream, |
611 iRecordedLiveSession->StreamStateChanged( *recordingStream, |
1213 *recordingStream->Sinks()[0] ); |
612 *recordingStream->Sinks()[0] ); |
1214 |
613 |
1215 EUNIT_ASSERT( iObserver->iDiskFullCalled ) |
614 EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ), |
1216 iObserver->Reset(); |
615 TInt( CLcSessionObserverStub::ESessionFailed ) ) |
|
616 EUNIT_ASSERT_EQUALS( iLcSessionObserver->iError, |
|
617 TInt( MLcSession::EDiskFull ) ) |
|
618 iLcSessionObserver->Reset(); |
1217 |
619 |
1218 |
620 |
1219 // Test default stream state change behavior |
621 // Test default stream state change behavior |
1220 |
622 |
1221 CMceMediaStream* changedStream = iLiveSession->iSession->Streams()[0]; |
623 CMceMediaStream* changedStream = iLiveSession->iSession->Streams()[0]; |
1222 CMceMediaSink* changedSink = changedStream->Sinks()[0]; |
624 CMceMediaSink* changedSink = changedStream->Sinks()[0]; |
1223 |
625 |
1224 // EUninitialized, stream is created, unexpected change, nothing happens |
626 // EUninitialized, stream is created, unexpected change, nothing happens |
1225 changedStream->iState = CMceMediaStream::EUninitialized; |
627 changedStream->iState = CMceMediaStream::EUninitialized; |
1226 iLiveSession->StreamStateChanged( *changedStream, *changedSink ); |
628 iLiveSession->StreamStateChanged( *changedStream, *changedSink ); |
1227 EUNIT_ASSERT( iObserver->IsReseted() ); |
629 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ) |
1228 |
630 |
1229 // EInitialized, stream is initialized |
631 // EInitialized, stream is initialized |
1230 changedStream->iState = CMceMediaStream::EInitialized; |
632 changedStream->iState = CMceMediaStream::EInitialized; |
1231 iLiveSession->StreamStateChanged( *changedStream, *changedSink ); |
633 iLiveSession->StreamStateChanged( *changedStream, *changedSink ); |
1232 EUNIT_ASSERT( iObserver->IsReseted() ); |
634 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ) |
1233 |
635 |
1234 // EBuffering, stream is buffering |
636 // EBuffering, stream is buffering |
1235 changedStream->iState = CMceMediaStream::EBuffering; |
637 changedStream->iState = CMceMediaStream::EBuffering; |
1236 iLiveSession->StreamStateChanged( *changedStream, *changedSink ); |
638 iLiveSession->StreamStateChanged( *changedStream, *changedSink ); |
1237 EUNIT_ASSERT( iObserver->IsReseted() ); |
639 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ) |
1238 |
640 |
1239 // EIdle, stream is not receiving RTP |
641 // EIdle, stream is not receiving RTP |
1240 changedStream->iState = CMceMediaStream::EIdle; |
642 changedStream->iState = CMceMediaStream::EIdle; |
1241 iLiveSession->StreamStateChanged( *changedStream, *changedSink ); |
643 iLiveSession->StreamStateChanged( *changedStream, *changedSink ); |
1242 EUNIT_ASSERT( iObserver->iStreamIdleCalled ); |
644 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ) |
1243 |
645 |
1244 // EStreaming, stream is streaming |
646 // EStreaming, stream is streaming |
1245 changedStream->iState = CMceMediaStream::EStreaming; |
647 changedStream->iState = CMceMediaStream::EStreaming; |
1246 iLiveSession->StreamStateChanged( *changedStream, *changedSink ); |
648 iLiveSession->StreamStateChanged( *changedStream, *changedSink ); |
1247 EUNIT_ASSERT( iObserver->iStreamStreamingCalled ); |
649 EUNIT_ASSERT_EQUALS( TInt( iLcSessionObserver->iCalledFunction ), |
1248 iObserver->Reset(); |
650 TInt( CLcSessionObserverStub::EPlayerStateChanged ) ) |
|
651 iLcSessionObserver->Reset(); |
1249 |
652 |
1250 // EDisabled, stream is explicitly disabled |
653 // EDisabled, stream is explicitly disabled |
1251 changedStream->iState = CMceMediaStream::EDisabled; |
654 changedStream->iState = CMceMediaStream::EDisabled; |
1252 iLiveSession->StreamStateChanged( *changedStream, *changedSink ); |
655 iLiveSession->StreamStateChanged( *changedStream, *changedSink ); |
1253 EUNIT_ASSERT( iObserver->IsReseted() ); |
656 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ) |
1254 |
657 |
1255 // ENoResources, stream has no needed resources to stream |
658 // ENoResources, stream has no needed resources to stream |
1256 // This state has non-default meaning, tested before defaults |
659 // This state has non-default meaning, tested before defaults |
1257 |
660 |
1258 // ETranscodingRequired, stream requires non-realtime transcoding |
661 // ETranscodingRequired, stream requires non-realtime transcoding |
1259 changedStream->iState = CMceMediaStream::ETranscodingRequired; |
662 changedStream->iState = CMceMediaStream::ETranscodingRequired; |
1260 iLiveSession->StreamStateChanged( *changedStream, *changedSink ); |
663 iLiveSession->StreamStateChanged( *changedStream, *changedSink ); |
1261 EUNIT_ASSERT( iObserver->IsReseted() ); |
664 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ) |
1262 |
665 |
1263 // ETranscoding, stream is transcoding in non-realtime |
666 // ETranscoding, stream is transcoding in non-realtime |
1264 changedStream->iState = CMceMediaStream::ETranscoding; |
667 changedStream->iState = CMceMediaStream::ETranscoding; |
1265 iLiveSession->StreamStateChanged( *changedStream, *changedSink ); |
668 iLiveSession->StreamStateChanged( *changedStream, *changedSink ); |
1266 EUNIT_ASSERT( iObserver->IsReseted() ); |
669 EUNIT_ASSERT( iLcSessionObserver->IsReseted() ) |
1267 |
670 |
1268 } |
671 } |
1269 |
672 |
1270 |
673 |
1271 // ----------------------------------------------------------------------------- |
674 // ----------------------------------------------------------------------------- |
1272 // |
675 // |
1273 // ----------------------------------------------------------------------------- |
676 // ----------------------------------------------------------------------------- |
1274 // |
677 // |
1275 void UT_CMusEngLiveSession::UT_SetEncodingDeviceLL() |
678 void UT_CMusEngLiveSession::UT_EstablishLcSessionL() |
1276 { |
679 { |
1277 CMceAvcCodec* codec = CMceAvcCodec::NewLC( KMceSDPNameH264() ); |
680 iLiveSession->EstablishLcSessionL(); |
1278 |
681 EUNIT_ASSERT_EQUALS( TInt( CMceSession::EOffering ), |
1279 // Generic error in CenRep, leave expected |
682 TInt( iLiveSession->iSession->iState ) ) |
1280 CRepository::iForceFailWithCode = KErrNotReady; |
683 } |
1281 EUNIT_ASSERT_LEAVE( iLiveSession->SetEncodingDeviceL( *codec ) ) |
684 |
1282 EUNIT_ASSERT_EQUALS( codec->iEncodingDecodingDevice, TUid::Uid( 0 ) ) |
685 // ----------------------------------------------------------------------------- |
1283 |
686 // |
1284 // No entry in CenRep, default value expected |
687 // ----------------------------------------------------------------------------- |
1285 CRepository::iForceFailWithCode = KErrNotFound; |
688 // |
1286 const TUid KDefaultEncodingDevice( TUid::Uid( 0x20001C13 ) ); |
689 void UT_CMusEngLiveSession::UT_LocalVideoPlayerL() |
1287 iLiveSession->SetEncodingDeviceL( *codec ); |
690 { |
1288 EUNIT_ASSERT_EQUALS( codec->iEncodingDecodingDevice, |
691 EUNIT_ASSERT( iLiveSession->LocalVideoPlayer() == |
1289 KDefaultEncodingDevice ) |
692 iLiveSession->iLiveVideoPlayer ) |
1290 |
693 } |
1291 // Entry in CenRep |
|
1292 const TInt KSomeEncodingDevice( 0x20001C15 ); |
|
1293 CRepository::iStaticEncoderUid = KSomeEncodingDevice; |
|
1294 iLiveSession->SetEncodingDeviceL( *codec ); |
|
1295 EUNIT_ASSERT_EQUALS( codec->iEncodingDecodingDevice, |
|
1296 TUid::Uid( KSomeEncodingDevice ) ) |
|
1297 |
|
1298 CleanupStack::PopAndDestroy( codec ); |
|
1299 } |
|
1300 |
|
1301 |
|
1302 // ----------------------------------------------------------------------------- |
|
1303 // |
|
1304 // ----------------------------------------------------------------------------- |
|
1305 // |
|
1306 void UT_CMusEngLiveSession::UT_SetCodecConfigKeyLL() |
|
1307 { |
|
1308 CMceAvcCodec* codec = CMceAvcCodec::NewLC( KMceSDPNameH264() ); |
|
1309 codec->SetAllowedBitrates( KMceAvcBitrateLevel1b ); |
|
1310 |
|
1311 // Generic error in CenRep, leave expected |
|
1312 CRepository::iForceFailWithCode = KErrNotReady; |
|
1313 EUNIT_ASSERT_LEAVE( iLiveSession->SetCodecConfigKeyL( *codec ) ); |
|
1314 EUNIT_ASSERT( !codec->iConfigKey ) |
|
1315 EUNIT_ASSERT( !iLiveSession->iStoreEncoderConfigInfo ) |
|
1316 CRepository::iForceFailWithCode = KErrNone; |
|
1317 |
|
1318 // No entry in CenRep, nothing happens |
|
1319 iLiveSession->SetCodecConfigKeyL( *codec ); |
|
1320 EUNIT_ASSERT( !codec->iConfigKey ) |
|
1321 EUNIT_ASSERT( !iLiveSession->iStoreEncoderConfigInfo ) |
|
1322 |
|
1323 // Empty entry in CenRep |
|
1324 CRepository::SetStubAvcConfigKeysL( KNullDesC8() ); |
|
1325 iLiveSession->SetCodecConfigKeyL( *codec ); |
|
1326 EUNIT_ASSERT( !codec->iConfigKey ) |
|
1327 EUNIT_ASSERT( iLiveSession->iStoreEncoderConfigInfo ) |
|
1328 iLiveSession->iStoreEncoderConfigInfo = EFalse; // emulate original situation |
|
1329 |
|
1330 // Entry in CenRep |
|
1331 CRepository::SetStubAvcConfigKeysL( KMusAvcBitrateLevel_1b_ConfigKey ); |
|
1332 iLiveSession->SetCodecConfigKeyL( *codec ); |
|
1333 EUNIT_ASSERT( codec->iConfigKey ) |
|
1334 HBufC8* key = codec->ConfigKeyL(); |
|
1335 CleanupStack::PushL( key ); |
|
1336 EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1bTestText() ) |
|
1337 CleanupStack::PopAndDestroy( key ); |
|
1338 EUNIT_ASSERT( !iLiveSession->iStoreEncoderConfigInfo ) |
|
1339 |
|
1340 CleanupStack::PopAndDestroy( codec ); |
|
1341 } |
|
1342 |
|
1343 |
|
1344 // ----------------------------------------------------------------------------- |
|
1345 // |
|
1346 // ----------------------------------------------------------------------------- |
|
1347 // |
|
1348 void UT_CMusEngLiveSession::UT_ReadCodecConfigKeyLL() |
|
1349 { |
|
1350 HBufC8* key( NULL ); |
|
1351 |
|
1352 // Try with H263, leave expected |
|
1353 CMceVideoCodec* codecH263 = CMceH263Codec::NewLC( KMceSDPNameH263() ); |
|
1354 EUNIT_ASSERT_LEAVE( key = iLiveSession->ReadCodecConfigKeyL( *codecH263 ) ) |
|
1355 CleanupStack::PopAndDestroy( codecH263 ); |
|
1356 |
|
1357 // Try without an entry in CenRep, leave expected |
|
1358 CMceVideoCodec* codec = CMceAvcCodec::NewLC( KMceSDPNameH264() ); |
|
1359 codec->SetAllowedBitrates( 0 | KMceAvcBitrateLevel1 ); |
|
1360 EUNIT_ASSERT_LEAVE( key = iLiveSession->ReadCodecConfigKeyL( *codec ) ) |
|
1361 |
|
1362 // Create CenRep entry which does not include wanted bitrate, NULL value |
|
1363 // expected |
|
1364 CRepository::SetStubAvcConfigKeysL( KMusAvcBitrateLevel1bTestText() ); |
|
1365 key = iLiveSession->ReadCodecConfigKeyL( *codec ); |
|
1366 EUNIT_ASSERT( !key ) |
|
1367 |
|
1368 // Create entry with all AVC keys and try with all the values |
|
1369 CRepository::SetStubAvcConfigKeysL( KMusAvcAllLevelsConcatenation() ); |
|
1370 |
|
1371 // KMceAvcBitrateLevel1 |
|
1372 key = iLiveSession->ReadCodecConfigKeyL( *codec ); |
|
1373 EUNIT_ASSERT( key ); |
|
1374 CleanupStack::PushL( key ); |
|
1375 EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1TestText ); |
|
1376 CleanupStack::PopAndDestroy( key ); |
|
1377 |
|
1378 // KMceAvcBitrateLevel1b |
|
1379 codec->SetAllowedBitrates( KMceAvcBitrateLevel1b ); |
|
1380 key = iLiveSession->ReadCodecConfigKeyL( *codec ); |
|
1381 EUNIT_ASSERT( key ); |
|
1382 CleanupStack::PushL( key ); |
|
1383 EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1bTestText ); |
|
1384 CleanupStack::PopAndDestroy( key ); |
|
1385 |
|
1386 // KMceAvcBitrateLevel1_1 |
|
1387 codec->SetAllowedBitrates( KMceAvcBitrateLevel1_1 ); |
|
1388 key = iLiveSession->ReadCodecConfigKeyL( *codec ); |
|
1389 EUNIT_ASSERT( key ); |
|
1390 CleanupStack::PushL( key ); |
|
1391 EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1_1TestText ); |
|
1392 CleanupStack::PopAndDestroy( key ); |
|
1393 |
|
1394 // KMceAvcBitrateLevel1_2 |
|
1395 codec->SetAllowedBitrates( KMceAvcBitrateLevel1_2 ); |
|
1396 key = iLiveSession->ReadCodecConfigKeyL( *codec ); |
|
1397 EUNIT_ASSERT( key ); |
|
1398 CleanupStack::PushL( key ); |
|
1399 EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1_2TestText ); |
|
1400 CleanupStack::PopAndDestroy( key ); |
|
1401 |
|
1402 // KMceAvcBitrateLevel1_3 |
|
1403 codec->SetAllowedBitrates( KMceAvcBitrateLevel1_3 ); |
|
1404 key = iLiveSession->ReadCodecConfigKeyL( *codec ); |
|
1405 EUNIT_ASSERT( key ); |
|
1406 CleanupStack::PushL( key ); |
|
1407 EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel1_3TestText ); |
|
1408 CleanupStack::PopAndDestroy( key ); |
|
1409 |
|
1410 // KMceAvcBitrateLevel2 |
|
1411 codec->SetAllowedBitrates( KMceAvcBitrateLevel2 ); |
|
1412 key = iLiveSession->ReadCodecConfigKeyL( *codec ); |
|
1413 EUNIT_ASSERT( key ); |
|
1414 CleanupStack::PushL( key ); |
|
1415 EUNIT_ASSERT_EQUALS( *key, KMusAvcBitrateLevel2TestText ); |
|
1416 CleanupStack::PopAndDestroy( key ); |
|
1417 |
|
1418 CleanupStack::PopAndDestroy( codec ); |
|
1419 |
|
1420 } |
|
1421 |
|
1422 |
|
1423 // ----------------------------------------------------------------------------- |
|
1424 // |
|
1425 // ----------------------------------------------------------------------------- |
|
1426 // |
|
1427 void UT_CMusEngLiveSession::UT_StoreEncoderConfigInfoLL() |
|
1428 { |
|
1429 CRepository::iStaticWriteAvcKeysToStaticData = ETrue; |
|
1430 |
|
1431 // Try with clean CenRep |
|
1432 MultimediaSharingSettings::SetEncoderConfigInfoL( KNullDesC8() ); |
|
1433 |
|
1434 ESTABLISH_OUT_SESSION( iLiveSession ) // calls StoreEncoderConfigInfoL |
|
1435 // If StoreEncoderConfigInfoL leaves with KErrNoMemory, |
|
1436 // MMusEngSessionObserver::SessionFailed will be called. |
|
1437 __ASSERT_ALWAYS( !iObserver->iSessionFailedCalled, |
|
1438 User::Leave( KErrNoMemory ) ); |
|
1439 |
|
1440 HBufC8* keys = MultimediaSharingSettings::EncoderConfigInfoLC(); |
|
1441 EUNIT_ASSERT_EQUALS( *keys, KMusAvcBitrateLevel_1b_ConfigKey() ) |
|
1442 CleanupStack::PopAndDestroy( keys ); |
|
1443 |
|
1444 // Try without a clean CenRep |
|
1445 MultimediaSharingSettings::SetEncoderConfigInfoL( |
|
1446 KMusAvcBitrateLevel_1_1_ConfigKey() ); |
|
1447 |
|
1448 ESTABLISH_OUT_SESSION( iRecordedLiveSession ) |
|
1449 // If StoreEncoderConfigInfoL leaves with KErrNoMemory, |
|
1450 // MMusEngSessionObserver::SessionFailed will be called. |
|
1451 __ASSERT_ALWAYS( !iObserver->iSessionFailedCalled, |
|
1452 User::Leave( KErrNoMemory ) ); |
|
1453 |
|
1454 keys = MultimediaSharingSettings::EncoderConfigInfoLC(); |
|
1455 EUNIT_ASSERT_EQUALS( *keys, |
|
1456 KMusAvcBitrateLevels_1_1_And_1b_ConfigKeys() ) |
|
1457 CleanupStack::PopAndDestroy( keys ); |
|
1458 } |
|
1459 |
|
1460 // ----------------------------------------------------------------------------- |
|
1461 // |
|
1462 // ----------------------------------------------------------------------------- |
|
1463 // |
|
1464 void UT_CMusEngLiveSession::UT_InitializeZoomStepSizeL() |
|
1465 { |
|
1466 //Check that zooming steps have defualt values before session establishment |
|
1467 iLiveSession->InitializeZoomStepSize(); |
|
1468 EUNIT_ASSERT( iLiveSession->iSmallZoomStep == KZoomStepMinSize ); |
|
1469 EUNIT_ASSERT( iLiveSession->iBigZoomStep == KZoomStepMinSize ); |
|
1470 |
|
1471 // simulate session establishment |
|
1472 ESTABLISH_OUT_SESSION( iLiveSession ); |
|
1473 |
|
1474 CMceCameraSource* camera = |
|
1475 MusEngMceUtils::GetCameraL( *(iLiveSession->iSession) ); |
|
1476 |
|
1477 //Check that zooming step sizes have default value KZoomStepMinSize |
|
1478 //in case of zooming values range is smaller than KZoomBigStepCount |
|
1479 iLiveSession->iCameraInfo.iMinZoom = 0; |
|
1480 iLiveSession->iCameraInfo.iMaxZoom = 0; |
|
1481 iLiveSession->iCameraInfo.iMaxDigitalZoom = KZoomBigStepCount / 2; |
|
1482 iLiveSession->InitializeZoomStepSize(); |
|
1483 EUNIT_ASSERT( iLiveSession->iSmallZoomStep == KZoomStepMinSize ); |
|
1484 EUNIT_ASSERT( iLiveSession->iBigZoomStep == KZoomStepMinSize ); |
|
1485 |
|
1486 |
|
1487 //Check that zooming step sizes have default value KZoomStepMinSize |
|
1488 //in case of zooming values range is bigger than KZoomBigStepCount, |
|
1489 //but smaller than 2*KZoomBigStepCount (KZoomSmallStepCount) |
|
1490 iLiveSession->iCameraInfo.iMaxDigitalZoom = 2*KZoomBigStepCount - 1; |
|
1491 iLiveSession->InitializeZoomStepSize(); |
|
1492 EUNIT_ASSERT( iLiveSession->iSmallZoomStep == KZoomStepMinSize ); |
|
1493 EUNIT_ASSERT( iLiveSession->iBigZoomStep == KZoomStepMinSize ); |
|
1494 |
|
1495 |
|
1496 //Check zooming steps sizes in case of zooming values range is |
|
1497 //bigger than 2*KZoomBigStepCount and smaller than 2*KZoomSmallStepCount |
|
1498 iLiveSession->iCameraInfo.iMinZoom = - KZoomBigStepCount; |
|
1499 iLiveSession->iCameraInfo.iMaxZoom = KZoomBigStepCount; |
|
1500 iLiveSession->iCameraInfo.iMaxDigitalZoom = KZoomBigStepCount; |
|
1501 //zooming range is (-KZoomBigStepCount, 2*KZoomBigStepCount) |
|
1502 iLiveSession->InitializeZoomStepSize(); |
|
1503 EUNIT_ASSERT( iLiveSession->iSmallZoomStep == KZoomStepMinSize ); |
|
1504 EUNIT_ASSERT( iLiveSession->iBigZoomStep == 3 ); |
|
1505 |
|
1506 |
|
1507 //Check zooming steps sizes in case of zooming values range is |
|
1508 //bigger than 2*KZoomSmallStepCount |
|
1509 iLiveSession->iCameraInfo.iMaxZoom = KZoomSmallStepCount; |
|
1510 iLiveSession->iCameraInfo.iMaxDigitalZoom = KZoomSmallStepCount; |
|
1511 iLiveSession->iCameraInfo.iMinZoom = - KZoomSmallStepCount; |
|
1512 //zooming range is (-KZoomSmallStepCount, 2*KZoomSmallStepCount) |
|
1513 iLiveSession->InitializeZoomStepSize(); |
|
1514 EUNIT_ASSERT( iLiveSession->iSmallZoomStep == 3 ); |
|
1515 EUNIT_ASSERT( iLiveSession->iBigZoomStep == 6 ); |
|
1516 } |
|
1517 |
|
1518 |
694 |
1519 // TEST TABLE |
695 // TEST TABLE |
1520 |
|
1521 EUNIT_BEGIN_TEST_TABLE( |
696 EUNIT_BEGIN_TEST_TABLE( |
1522 UT_CMusEngLiveSession, |
697 UT_CMusEngLiveSession, |
1523 "UT_CMusEngLiveSesssion", |
698 "UT_CMusEngLiveSesssion", |
1524 "UNIT" ) |
699 "UNIT" ) |
1525 |
700 |
1529 "NewL", |
704 "NewL", |
1530 "FUNCTIONALITY", |
705 "FUNCTIONALITY", |
1531 SetupL, UT_NewLL, Teardown) |
706 SetupL, UT_NewLL, Teardown) |
1532 |
707 |
1533 EUNIT_TEST( |
708 EUNIT_TEST( |
1534 "CurrentZoomL - test ", |
|
1535 "CMusEngLiveSession", |
|
1536 "CurrentZoomL", |
|
1537 "FUNCTIONALITY", |
|
1538 SetupL, UT_CurrentZoomLL, Teardown) |
|
1539 |
|
1540 EUNIT_TEST( |
|
1541 "MaxZoomL - test ", |
|
1542 "CMusEngLiveSession", |
|
1543 "MaxZoomL", |
|
1544 "FUNCTIONALITY", |
|
1545 SetupL, UT_MaxZoomLL, Teardown) |
|
1546 |
|
1547 EUNIT_TEST( |
|
1548 "ZoomInL - test ", |
|
1549 "CMusEngLiveSession", |
|
1550 "ZoomInL", |
|
1551 "FUNCTIONALITY", |
|
1552 SetupL, UT_ZoomInLL, Teardown) |
|
1553 |
|
1554 EUNIT_TEST( |
|
1555 "ZoomOutL - test ", |
|
1556 "CMusEngLiveSession", |
|
1557 "ZoomOutL", |
|
1558 "FUNCTIONALITY", |
|
1559 SetupL, UT_ZoomOutLL, Teardown) |
|
1560 |
|
1561 EUNIT_TEST( |
|
1562 "ZoomDefaultL - test ", |
|
1563 "CMusEngLiveSession", |
|
1564 "ZoomDefaultL", |
|
1565 "FUNCTIONALITY", |
|
1566 SetupL, UT_ZoomDefaultLL, Teardown) |
|
1567 |
|
1568 EUNIT_TEST( |
|
1569 "SetBrightnessL - test ", |
|
1570 "CMusEngLiveSession", |
|
1571 "SetBrightnessL", |
|
1572 "FUNCTIONALITY", |
|
1573 SetupL, UT_SetBrightnessLL, Teardown) |
|
1574 |
|
1575 EUNIT_TEST( |
|
1576 "CurrentBrightnessL - test ", |
|
1577 "CMusEngLiveSession", |
|
1578 "CurrentBrightnessL", |
|
1579 "FUNCTIONALITY", |
|
1580 SetupL, UT_CurrentBrightnessLL, Teardown) |
|
1581 |
|
1582 EUNIT_TEST( |
|
1583 "MaxBrightnessL - test ", |
|
1584 "CMusEngLiveSession", |
|
1585 "MaxBrightnessL", |
|
1586 "FUNCTIONALITY", |
|
1587 SetupL, UT_MaxBrightnessLL, Teardown) |
|
1588 |
|
1589 EUNIT_TEST( |
|
1590 "MinBrightnessL - test ", |
|
1591 "CMusEngLiveSession", |
|
1592 "MinBrightnessL", |
|
1593 "FUNCTIONALITY", |
|
1594 SetupL, UT_MinBrightnessLL, Teardown) |
|
1595 |
|
1596 EUNIT_TEST( |
|
1597 "IncreaseBrightnessL - test ", |
|
1598 "CMusEngLiveSession", |
|
1599 "IncreaseBrightnessL", |
|
1600 "FUNCTIONALITY", |
|
1601 SetupL, UT_IncreaseBrightnessLL, Teardown) |
|
1602 |
|
1603 EUNIT_TEST( |
|
1604 "DecreaseBrightnessL - test ", |
|
1605 "CMusEngLiveSession", |
|
1606 "DecreaseBrightnessL", |
|
1607 "FUNCTIONALITY", |
|
1608 SetupL, UT_DecreaseBrightnessLL, Teardown) |
|
1609 |
|
1610 EUNIT_TEST( |
|
1611 "BrightnessDefaultL - test ", |
|
1612 "CMusEngLiveSession", |
|
1613 "BrightnessDefaultL", |
|
1614 "FUNCTIONALITY", |
|
1615 SetupL, UT_BrightnessDefaultLL, Teardown) |
|
1616 |
|
1617 EUNIT_TEST( |
|
1618 "BrightnessAutoL - test ", |
|
1619 "CMusEngLiveSession", |
|
1620 "BrightnessAutoL", |
|
1621 "FUNCTIONALITY", |
|
1622 SetupL, UT_BrightnessAutoLL, Teardown) |
|
1623 |
|
1624 EUNIT_TEST( |
|
1625 "RecordL_and_IsRecordingL - test ", |
|
1626 "CMusEngLiveSession", |
|
1627 "RecordL_and_IsRecordingL", |
|
1628 "FUNCTIONALITY", |
|
1629 SetupL, UT_RecordL_and_IsRecordingLL, Teardown) |
|
1630 |
|
1631 EUNIT_TEST( |
|
1632 "PlayL - test ", |
|
1633 "CMusEngLiveSession", |
|
1634 "PlayL", |
|
1635 "FUNCTIONALITY", |
|
1636 SetupL, UT_PlayLL, Teardown) |
|
1637 |
|
1638 EUNIT_TEST( |
|
1639 "PauseL - test ", |
|
1640 "CMusEngLiveSession", |
|
1641 "PauseL", |
|
1642 "FUNCTIONALITY", |
|
1643 SetupL, UT_PauseLL, Teardown) |
|
1644 |
|
1645 EUNIT_TEST( |
|
1646 "IsPlayingL - test ", |
|
1647 "CMusEngLiveSession", |
|
1648 "IsPlayingL", |
|
1649 "FUNCTIONALITY", |
|
1650 SetupL, UT_IsPlayingLL, Teardown) |
|
1651 |
|
1652 EUNIT_TEST( |
|
1653 "CompleteSessionStructureL - test ", |
709 "CompleteSessionStructureL - test ", |
1654 "CMusEngLiveSession", |
710 "CMusEngLiveSession", |
1655 "CompleteSessionStructureL", |
711 "CompleteSessionStructureL", |
1656 "FUNCTIONALITY", |
712 "FUNCTIONALITY", |
1657 SetupL, UT_CompleteSessionStructureLL, Teardown) |
713 SetupL, UT_CompleteSessionStructureLL, Teardown) |
1658 |
714 |
1659 EUNIT_TEST( |
715 EUNIT_TEST( |
1660 "HandleSessionStateChanged - test ", |
|
1661 "CMusEngLiveSession", |
|
1662 "HandleSessionStateChanged", |
|
1663 "FUNCTIONALITY", |
|
1664 SetupL, UT_HandleSessionStateChangedL, Teardown) |
|
1665 |
|
1666 EUNIT_TEST( |
|
1667 "AdjustVideoCodecL - test ", |
716 "AdjustVideoCodecL - test ", |
1668 "CMusEngLiveSession", |
717 "CMusEngLiveSession", |
1669 "AdjustVideoCodecL", |
718 "AdjustVideoCodecL", |
1670 "FUNCTIONALITY", |
719 "FUNCTIONALITY", |
1671 SetupL, UT_AdjustVideoCodecLL, Teardown) |
720 SetupL, UT_AdjustVideoCodecLL, Teardown) |