407 |
407 |
408 // Position has proceeded from beginning, rewinding to beginning info |
408 // Position has proceeded from beginning, rewinding to beginning info |
409 // is cleared. |
409 // is cleared. |
410 file->iPosition = 10000000; |
410 file->iPosition = 10000000; |
411 iClipSession->iFRWDStartTime = TTime( 0 ); |
411 iClipSession->iFRWDStartTime = TTime( 0 ); |
412 |
412 iClipSession->iRewindedToBeginning = EFalse; |
413 EUNIT_ASSERT( iClipSession->PositionL().Int() * 1000000 == 10000000 ) |
413 EUNIT_ASSERT( iClipSession->PositionL().Int() * 1000000 == 10000000 ) |
414 EUNIT_ASSERT( iClipSession->iRewindedToBeginning == EFalse ) |
414 EUNIT_ASSERT( iClipSession->iRewindedToBeginning == EFalse ) |
415 } |
415 } |
416 |
416 |
417 |
417 |
1452 EUNIT_ASSERT( codecs[0]->SdpName().FindF( KMceSDPNameH264() ) >= 0 ) |
1452 EUNIT_ASSERT( codecs[0]->SdpName().FindF( KMceSDPNameH264() ) >= 0 ) |
1453 |
1453 |
1454 } |
1454 } |
1455 } |
1455 } |
1456 |
1456 |
1457 EUNIT_ASSERT( !iObserver->iTranscodingNeededCalled ) |
1457 EUNIT_ASSERT( !iObserver->iTranscodingNeededCalled ) |
|
1458 EUNIT_ASSERT( !iClipSession->iTranscodingRequiredDueMissingOptions ) |
1458 |
1459 |
1459 /////// |
1460 /////// |
1460 // 2.Test the case when we don't know whether peer supports H264, |
1461 // 2.Test the case when we don't know whether peer supports H264, |
1461 // transcoding is needed, H264 codec has to be removed from the codec list |
1462 // transcoding is needed, H264 codec has to be removed from the codec list |
1462 |
1463 |
1481 EUNIT_ASSERT( codecs[0]->SdpName().FindF( KMceSDPNameH263() ) >= 0 ) |
1482 EUNIT_ASSERT( codecs[0]->SdpName().FindF( KMceSDPNameH263() ) >= 0 ) |
1482 } |
1483 } |
1483 } |
1484 } |
1484 |
1485 |
1485 EUNIT_ASSERT( iObserver->iTranscodingNeededCalled ) |
1486 EUNIT_ASSERT( iObserver->iTranscodingNeededCalled ) |
1486 |
1487 EUNIT_ASSERT( iObserver->iDueUnknowCapas ) |
|
1488 EUNIT_ASSERT( iClipSession->iTranscodingRequiredDueMissingOptions ) |
1487 |
1489 |
1488 /////// |
1490 /////// |
1489 // 3.Test that if peer doesn't supports H264, transcoding is needed |
1491 // 3. Establish behaves differently at second round in case clip is AVC |
|
1492 // and because remote party's capabilities were unknown. Use-case is such |
|
1493 // that AVC is tried to be transcoded first but if it fails, invite is retried |
|
1494 // by using AVC |
|
1495 iObserver->Reset(); |
|
1496 iClipSession->InviteL( KTestRecipientSipUri ); |
|
1497 const RPointerArray<CMceMediaStream>& testStreams = iClipSession->iSession->Streams(); |
|
1498 |
|
1499 for ( TInt i = 0; i < testStreams.Count(); ++i ) |
|
1500 { |
|
1501 if ( testStreams[i]->Type() == KMceVideo ) |
|
1502 { |
|
1503 CMceVideoStream* videoStream = static_cast<CMceVideoStream*>( testStreams[i] ); |
|
1504 const RPointerArray<CMceVideoCodec> codecs = videoStream->Codecs(); |
|
1505 EUNIT_ASSERT_EQUALS( codecs.Count(), 1 ) |
|
1506 EUNIT_ASSERT( codecs[0]->SdpName().FindF( KMceSDPNameH264() ) >= 0 ) |
|
1507 } |
|
1508 } |
|
1509 |
|
1510 EUNIT_ASSERT( !iObserver->iTranscodingNeededCalled ) |
|
1511 EUNIT_ASSERT( !iObserver->iDueUnknowCapas ) |
|
1512 |
|
1513 /////// |
|
1514 // 4.Test that if peer doesn't supports H264, transcoding is needed |
1490 // H264 codec has to be removed from the codec list |
1515 // H264 codec has to be removed from the codec list |
1491 |
1516 |
1492 iObserver->iTranscodingNeededCalled = EFalse; |
1517 iObserver->iTranscodingNeededCalled = EFalse; |
1493 |
1518 |
1494 delete iClipSession->iSession; |
1519 delete iClipSession->iSession; |
1501 |
1526 |
1502 const RPointerArray<CMceMediaStream>& streams3 = iClipSession->iSession->Streams(); |
1527 const RPointerArray<CMceMediaStream>& streams3 = iClipSession->iSession->Streams(); |
1503 |
1528 |
1504 for ( TInt i = 0; i < streams3.Count(); ++i ) |
1529 for ( TInt i = 0; i < streams3.Count(); ++i ) |
1505 { |
1530 { |
1506 if ( streams2[i]->Type() == KMceVideo ) |
1531 if ( streams3[i]->Type() == KMceVideo ) |
1507 { |
1532 { |
1508 CMceVideoStream* videoStream = static_cast<CMceVideoStream*>( streams3[i] ); |
1533 CMceVideoStream* videoStream = static_cast<CMceVideoStream*>( streams3[i] ); |
1509 const RPointerArray<CMceVideoCodec> codecs = videoStream->Codecs(); |
1534 const RPointerArray<CMceVideoCodec> codecs = videoStream->Codecs(); |
1510 EUNIT_ASSERT_EQUALS( codecs.Count(), 1 ) |
1535 EUNIT_ASSERT_EQUALS( codecs.Count(), 1 ) |
1511 EUNIT_ASSERT( codecs[0]->SdpName().FindF( KMceSDPNameH263() ) >= 0 ) |
1536 EUNIT_ASSERT( codecs[0]->SdpName().FindF( KMceSDPNameH263() ) >= 0 ) |
1512 } |
1537 } |
1513 } |
1538 } |
1514 |
1539 |
1515 EUNIT_ASSERT( iObserver->iTranscodingNeededCalled ) |
1540 EUNIT_ASSERT( iObserver->iTranscodingNeededCalled ) |
|
1541 EUNIT_ASSERT( !iObserver->iDueUnknowCapas ) |
1516 |
1542 |
1517 } |
1543 } |
1518 |
1544 |
1519 |
1545 |
1520 // TEST TABLE |
1546 // TEST TABLE |