1538 void CSVPSessionBase::HandleStreamStateChange( CMceMediaStream& aStream, |
1538 void CSVPSessionBase::HandleStreamStateChange( CMceMediaStream& aStream, |
1539 CMceMediaSink& aSink ) |
1539 CMceMediaSink& aSink ) |
1540 { |
1540 { |
1541 SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange(aStream,aSink) In" ) |
1541 SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange(aStream,aSink) In" ) |
1542 |
1542 |
|
1543 CMceSession::TState sessionState = CMceSession::ETerminated; |
|
1544 |
1543 if ( &aStream ) |
1545 if ( &aStream ) |
1544 { |
1546 { |
1545 SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSink) stream state=%d", |
1547 SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSink) stream state=%d", |
1546 aStream.State() ) |
1548 aStream.State() ) |
1547 SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSink) stream type=%d", |
1549 SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSink) stream type=%d", |
1548 aStream.Type() ) |
1550 aStream.Type() ) |
1549 } |
1551 } |
1550 |
1552 |
1551 if ( &aStream && aStream.Session() ) |
1553 if ( &aStream && aStream.Session() ) |
1552 { |
1554 { |
1553 SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSink) session state=%d", |
1555 sessionState = aStream.Session()->State(); |
1554 aStream.Session()->State() ) |
1556 SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSink) session state=%d", sessionState ) |
1555 } |
1557 } |
1556 |
1558 |
1557 if ( &aSink ) |
1559 if ( &aSink ) |
1558 { |
1560 { |
1559 SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSink) is sink enabled=%d", |
1561 SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSink) is sink enabled=%d", |
1560 aSink.IsEnabled() ) |
1562 aSink.IsEnabled() ) |
1561 |
1563 |
1562 if ( HasHoldController() && ESVPConnected == HoldController().HoldState() && |
1564 if ( HasHoldController() && ESVPConnected == HoldController().HoldState() && |
1563 !aSink.IsEnabled() && CMceSession::EEstablished == aStream.Session()->State() ) |
1565 !aSink.IsEnabled() && CMceSession::EEstablished == sessionState ) |
1564 { |
1566 { |
1565 // Hold state is connected but sink is disabled -> try enable after a while |
1567 // Hold state is connected but sink is disabled -> try enable after a while |
1566 SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange - Resume ICMP, Sink" ) |
1568 SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange - Resume ICMP, Sink" ) |
1567 TRAP_IGNORE( StartTimerL( KSVPSinkResumeICMPErrorTime, KSVPSinkResumeICMPErrorTimerExpired ) ) |
1569 TRAP_IGNORE( StartTimerL( KSVPSinkResumeICMPErrorTime, KSVPSinkResumeICMPErrorTimerExpired ) ) |
1568 } |
1570 } |
1577 // |
1579 // |
1578 void CSVPSessionBase::HandleStreamStateChange( CMceMediaStream& aStream, |
1580 void CSVPSessionBase::HandleStreamStateChange( CMceMediaStream& aStream, |
1579 CMceMediaSource& aSource ) |
1581 CMceMediaSource& aSource ) |
1580 { |
1582 { |
1581 SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange(aStream,aSource) In" ) |
1583 SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange(aStream,aSource) In" ) |
|
1584 |
|
1585 CMceSession::TState sessionState = CMceSession::ETerminated; |
1582 |
1586 |
1583 if ( &aStream ) |
1587 if ( &aStream ) |
1584 { |
1588 { |
1585 SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSource) stream state=%d", |
1589 SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSource) stream state=%d", |
1586 aStream.State() ) |
1590 aStream.State() ) |
1588 aStream.Type() ) |
1592 aStream.Type() ) |
1589 } |
1593 } |
1590 |
1594 |
1591 if ( &aStream && aStream.Session() ) |
1595 if ( &aStream && aStream.Session() ) |
1592 { |
1596 { |
1593 SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSource) session state=%d", |
1597 sessionState = aStream.Session()->State(); |
1594 aStream.Session()->State() ) |
1598 SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSource) session state=%d", sessionState ) |
1595 } |
1599 } |
1596 |
1600 |
1597 if ( &aSource ) |
1601 if ( &aSource ) |
1598 { |
1602 { |
1599 SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSource) is source enabled=%d", |
1603 SVPDEBUG2( "CSVPSessionBase::HandleStreamStateChange(aStream,aSource) is source enabled=%d", |
1600 aSource.IsEnabled() ) |
1604 aSource.IsEnabled() ) |
1601 |
1605 |
1602 if ( HasHoldController() && ESVPConnected == HoldController().HoldState() && |
1606 if ( HasHoldController() && ESVPConnected == HoldController().HoldState() && |
1603 !aSource.IsEnabled() && CMceSession::EEstablished == aStream.Session()->State() ) |
1607 !aSource.IsEnabled() && CMceSession::EEstablished == sessionState ) |
1604 { |
1608 { |
1605 // Hold state is connected but source is disabled -> try enable after a while |
1609 // Hold state is connected but source is disabled -> try enable after a while |
1606 SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange - Resume ICMP, Source" ) |
1610 SVPDEBUG1( "CSVPSessionBase::HandleStreamStateChange - Resume ICMP, Source" ) |
1607 TRAP_IGNORE( StartTimerL( KSVPSourceResumeICMPErrorTime, KSVPSourceResumeICMPErrorTimerExpired ) ) |
1611 TRAP_IGNORE( StartTimerL( KSVPSourceResumeICMPErrorTime, KSVPSourceResumeICMPErrorTimerExpired ) ) |
1608 } |
1612 } |