26 #include "mcertpsource.h" |
26 #include "mcertpsource.h" |
27 #include "mcertpsink.h" |
27 #include "mcertpsink.h" |
28 #include "mcecomcodec.h" |
28 #include "mcecomcodec.h" |
29 #include "cleanupresetanddestroy.h" |
29 #include "cleanupresetanddestroy.h" |
30 #include "mceclient.pan" |
30 #include "mceclient.pan" |
|
31 #include "mcemsrpsource.h" |
|
32 #include "mcemsrpsink.h" |
|
33 #include "mcemsrpsource.h" |
|
34 #include "mceclilogs.h" |
31 |
35 |
32 #ifdef MCE_COMMON_SERVER_SIDE |
36 #ifdef MCE_COMMON_SERVER_SIDE |
33 |
37 |
34 #include <sdpcodecstringconstants.h> |
38 #include <sdpcodecstringconstants.h> |
35 #include "mcesrvstream.h" |
39 #include "mcesrvstream.h" |
399 iSource( NULL ), |
403 iSource( NULL ), |
400 iSdpIndex( KErrNotFound ), |
404 iSdpIndex( KErrNotFound ), |
401 iLinkId( KMceNotAssigned ), |
405 iLinkId( KMceNotAssigned ), |
402 iDowngradedEnpoints( EFalse ) |
406 iDowngradedEnpoints( EFalse ) |
403 { |
407 { |
|
408 iRemoteMsrpPath.Zero(); |
404 } |
409 } |
405 |
410 |
406 |
411 |
407 // ----------------------------------------------------------------------------- |
412 // ----------------------------------------------------------------------------- |
408 // CMceComMediaStream::ConstructL |
413 // CMceComMediaStream::ConstructL |
628 } |
633 } |
629 |
634 |
630 if ( iSource ) |
635 if ( iSource ) |
631 { |
636 { |
632 iSource->InitializeL( *this ); |
637 iSource->InitializeL( *this ); |
633 if ( iSource->iType == KMceRTPSource ) |
638 if ( iSource->iType == KMceRTPSource || iSource->iType == KMceMSRPSource) |
634 { |
639 { |
635 iStreamType = BoundStream() ? EReceiveStream : EReceiveOnlyStream; |
640 iStreamType = BoundStream() ? EReceiveStream : EReceiveOnlyStream; |
636 } |
641 } |
637 } |
642 } |
638 |
643 |
639 |
644 |
640 for( int i = 0; i < iSinks.Count();i++) |
645 for( int i = 0; i < iSinks.Count();i++) |
641 { |
646 { |
642 iSinks[i]->InitializeL( *this ); |
647 iSinks[i]->InitializeL( *this ); |
643 if ( iStreamType == ELocalStream && |
648 if ( iStreamType == ELocalStream && |
644 iSinks[i]->iType == KMceRTPSink ) |
649 (iSinks[i]->iType == KMceRTPSink || iSinks[i]->iType == KMceMSRPSink) ) |
645 { |
650 { |
646 iStreamType = BoundStream() ? ESendStream : ESendOnlyStream; |
651 iStreamType = BoundStream() ? ESendStream : ESendOnlyStream; |
647 } |
652 } |
648 } |
653 } |
649 |
654 |
678 iRemoteMediaPort = aPort; |
683 iRemoteMediaPort = aPort; |
679 |
684 |
680 if ( BoundStream() ) |
685 if ( BoundStream() ) |
681 { |
686 { |
682 iLinkedStream->iRemoteMediaPort = aPort; |
687 iLinkedStream->iRemoteMediaPort = aPort; |
|
688 } |
|
689 |
|
690 } |
|
691 |
|
692 // ----------------------------------------------------------------------------- |
|
693 // CMceComMediaStream::SetRemoteMsrpPath |
|
694 // ----------------------------------------------------------------------------- |
|
695 // |
|
696 void CMceComMediaStream::SetRemoteMsrpPath(TDes8 &aremoteMsrpPath, TDes8 &aConnStatus) |
|
697 { |
|
698 |
|
699 iRemoteMsrpPath = aremoteMsrpPath; |
|
700 iConnStatus = aConnStatus; |
|
701 |
|
702 if ( BoundStream() ) |
|
703 { |
|
704 iLinkedStream->iRemoteMsrpPath = aremoteMsrpPath; |
|
705 iLinkedStream->iConnStatus = aConnStatus; |
683 } |
706 } |
684 |
707 |
685 } |
708 } |
686 |
709 |
687 // ----------------------------------------------------------------------------- |
710 // ----------------------------------------------------------------------------- |
1294 aEvent.iItcEvent = EMceItcInProgress; |
1317 aEvent.iItcEvent = EMceItcInProgress; |
1295 aEvent.iItcData = iState; |
1318 aEvent.iItcData = iState; |
1296 session->MediaObserver().EventReceived( aEvent ); |
1319 session->MediaObserver().EventReceived( aEvent ); |
1297 break; |
1320 break; |
1298 } |
1321 } |
|
1322 // file tranfer events |
|
1323 case KMccFileSendCompleted: |
|
1324 { |
|
1325 aEvent.iItcEvent =EMceItcFileSendCompleted; |
|
1326 aEvent.iItcData = iState; |
|
1327 session->MediaObserver().EventReceived( aEvent ); |
|
1328 break; |
|
1329 } |
|
1330 case KMccFileSendProgressNotification: |
|
1331 { |
|
1332 aEvent.iItcEvent =EMceFileSendInProgress; |
|
1333 aEvent.iItcData = iState; |
|
1334 session->MediaObserver().EventReceived( aEvent ); |
|
1335 break; |
|
1336 } |
|
1337 case KMccFileReceiveCompleted: |
|
1338 { |
|
1339 aEvent.iItcEvent =EMceItcFileReceiveCompleted; |
|
1340 aEvent.iItcData = iState; |
|
1341 session->MediaObserver().EventReceived( aEvent ); |
|
1342 break; |
|
1343 } |
|
1344 case KMccFileReceiveProgressNotification: |
|
1345 { |
|
1346 aEvent.iItcEvent = EMceFileReceiveInProgress; |
|
1347 aEvent.iItcData = iState; |
|
1348 session->MediaObserver().EventReceived( aEvent ); |
|
1349 break; |
|
1350 } |
1299 case KMccLinkCreated: |
1351 case KMccLinkCreated: |
1300 { |
1352 { |
1301 aEvent.iItcEvent = EMceItcLinkCreated; |
1353 aEvent.iItcEvent = EMceItcLinkCreated; |
1302 aEvent.iItcData = LocalMediaPort(); |
1354 aEvent.iItcData = LocalMediaPort(); |
1303 session->MediaObserver().EventReceived( aEvent ); |
1355 session->MediaObserver().EventReceived( aEvent ); |
1340 case KMccStreamStarted: |
1392 case KMccStreamStarted: |
1341 { |
1393 { |
1342 iState = CMceMediaStream::EStreaming; |
1394 iState = CMceMediaStream::EStreaming; |
1343 break; |
1395 break; |
1344 } |
1396 } |
|
1397 // For file transfer use cases |
|
1398 case KMccFileSendProgressNotification: |
|
1399 iState = CMceMediaStream::EFileSendInProgress; |
|
1400 break; |
|
1401 // For file transfer use cases |
|
1402 case KMccFileReceiveProgressNotification: |
|
1403 iState = CMceMediaStream::EFileReceiveInProgress; |
|
1404 break; |
|
1405 |
|
1406 case KMccFileSendCompleted: |
|
1407 case KMccFileReceiveCompleted: |
|
1408 iState = CMceMediaStream::EFileTransferCompleted; |
|
1409 break; |
|
1410 |
1345 case KMccStreamBuffering: |
1411 case KMccStreamBuffering: |
1346 { |
1412 { |
1347 iState = CMceMediaStream::EBuffering; |
1413 iState = CMceMediaStream::EBuffering; |
1348 break; |
1414 break; |
1349 } |
1415 } |
1416 iLinkId = aLinkId; |
1482 iLinkId = aLinkId; |
1417 |
1483 |
1418 if ( BoundStream() ) |
1484 if ( BoundStream() ) |
1419 { |
1485 { |
1420 iLinkedStream->iLinkId = aLinkId; |
1486 iLinkedStream->iLinkId = aLinkId; |
|
1487 } |
|
1488 |
|
1489 } |
|
1490 |
|
1491 |
|
1492 // ----------------------------------------------------------------------------- |
|
1493 // CMceComMediaStream::SetLocalMsrpPath |
|
1494 // ----------------------------------------------------------------------------- |
|
1495 // |
|
1496 void CMceComMediaStream::SetLocalMsrpPath(TDesC8& aLocalMsrpPath) |
|
1497 { |
|
1498 |
|
1499 iLocalMsrpPath = aLocalMsrpPath; |
|
1500 |
|
1501 if ( BoundStream() ) |
|
1502 { |
|
1503 iLinkedStream->iLocalMsrpPath = aLocalMsrpPath; |
1421 } |
1504 } |
1422 |
1505 |
1423 } |
1506 } |
1424 |
1507 |
1425 // ----------------------------------------------------------------------------- |
1508 // ----------------------------------------------------------------------------- |