# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1272880361 -10800 # Node ID b25d6a5c0a632e4b161aff35ce2c3290f1410500 # Parent 861e78e4e84c6de84b0d08373d53e2c3c25b25a2 Revision: 201015 Kit: 201018 diff -r 861e78e4e84c -r b25d6a5c0a63 multimediacommscontroller/mmcccontroller/src/mccresourceitem.cpp --- a/multimediacommscontroller/mmcccontroller/src/mccresourceitem.cpp Fri Apr 16 15:21:04 2010 +0300 +++ b/multimediacommscontroller/mmcccontroller/src/mccresourceitem.cpp Mon May 03 12:52:41 2010 +0300 @@ -253,6 +253,10 @@ { needsCamera = aCameraHandler.IsViewFinderEnabled(); } + else if ( iState == MMccResources::EResourcePaused ) + { + needsCamera = aCameraHandler.IsViewFinderEnabled(); + } else { // NOP diff -r 861e78e4e84c -r b25d6a5c0a63 multimediacommscontroller/mmcccontroller/tsrc/ut_controller/src/UT_CMccResourceItem.cpp --- a/multimediacommscontroller/mmcccontroller/tsrc/ut_controller/src/UT_CMccResourceItem.cpp Fri Apr 16 15:21:04 2010 +0300 +++ b/multimediacommscontroller/mmcccontroller/tsrc/ut_controller/src/UT_CMccResourceItem.cpp Mon May 03 12:52:41 2010 +0300 @@ -350,6 +350,14 @@ camera->iViewFinderEnabled = ETrue; camera->iViewFinderSettings.iSize = TSize( 100, 100 ); EUNIT_ASSERT( iItem->NeedsCamera( *camera ) ) + + // In paused state camera is needed only when viewfinder is enabled + camera->iViewFinderEnabled = EFalse; + iItem->iState = MMccResources::EResourcePaused; + EUNIT_ASSERT( !iItem->NeedsCamera( *camera ) ) + camera->iViewFinderEnabled = ETrue; + camera->iViewFinderSettings.iSize = TSize( 100, 100 ); + EUNIT_ASSERT( iItem->NeedsCamera( *camera ) ) CleanupStack::PopAndDestroy( camera ); CleanupStack::PopAndDestroy( pool ); diff -r 861e78e4e84c -r b25d6a5c0a63 multimediacommscontroller/mmccinterface/src/mmcccodecdtmf.cpp --- a/multimediacommscontroller/mmccinterface/src/mmcccodecdtmf.cpp Fri Apr 16 15:21:04 2010 +0300 +++ b/multimediacommscontroller/mmccinterface/src/mmcccodecdtmf.cpp Mon May 03 12:52:41 2010 +0300 @@ -36,6 +36,7 @@ const TText8 KCharComma = ','; const TText8 KCharHyphen = '-'; const TText8 KCharSpace = ' '; +const TText8 KCharSemicolon = ';'; @@ -384,13 +385,20 @@ if ( aFmtp.Length() > 0 ) { + //the firt, process semicolon and get its left data + TBufC8<256> value(aFmtp); + TInt match = value.Locate( KCharSemicolon ); + if( KErrNotFound != match ) + { + value = value.Left( match ); + } // white space is not allowed - if ( aFmtp.Locate( KCharSpace ) >= 0 ) + if ( value.Locate( KCharSpace ) >= 0 ) { User::Leave( KErrArgument ); } - CPtrC8Array* tokens = TokenizeL( aFmtp, KCharComma ); + CPtrC8Array* tokens = TokenizeL( value, KCharComma ); CleanupStack::PushL( tokens ); // Mask will be updated while parsing diff -r 861e78e4e84c -r b25d6a5c0a63 multimediacommscontroller/mmccinterface/tsrc/ut_interface/src/UT_CMccCodecDTMF.cpp --- a/multimediacommscontroller/mmccinterface/tsrc/ut_interface/src/UT_CMccCodecDTMF.cpp Fri Apr 16 15:21:04 2010 +0300 +++ b/multimediacommscontroller/mmccinterface/tsrc/ut_interface/src/UT_CMccCodecDTMF.cpp Mon May 03 12:52:41 2010 +0300 @@ -610,6 +610,12 @@ EUNIT_ASSERT( iCodec->iBitrateMask == 0 ); iCodec->iBitrateMask = 0; + // multiple fmtp + retValue = EFalse; + MCC_EUNIT_ASSERT_SPECIFIC_LEAVE( retValue = iCodec->ParseFmtpAttrL(_L8("0-15;0-15")), KErrArgument); + EUNIT_ASSERT( !retValue ); + EUNIT_ASSERT( iCodec->iBitrateMask == 0 ); + iCodec->iBitrateMask = 0; } void UT_CMccCodecDTMF::UT_CMccCodecDTMF_GetFmtpL() diff -r 861e78e4e84c -r b25d6a5c0a63 multimediacommsengine/mmcesrv/mmcemediamanager/src/mcemediasdpcodec.cpp --- a/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcemediasdpcodec.cpp Fri Apr 16 15:21:04 2010 +0300 +++ b/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcemediasdpcodec.cpp Mon May 03 12:52:41 2010 +0300 @@ -1121,17 +1121,31 @@ // did we try old school hold? if ( oldSchool ) { - if ( !isNullAddress ) - { - // ignore that other party didn't understand us - // and full cancel of old school process - sSession.iOOldSchool = 0; - sSession.iOOldSchoolProceeding = 0; - sSession.iOOldSchoolCompleted = 0; - } + if ( loc_direction == SdpCodecStringConstants::EAttributeSendrecv ) + { + if ( !isNullAddress ) + { + rmt_direction = SdpCodecStringConstants::EAttributeSendrecv; + } + else + { + rmt_direction = SdpCodecStringConstants::EAttributeRecvonly; + } + } + else + { + if ( !isNullAddress ) + { + // ignore that other party didn't understand us + // and full cancel of old school process + sSession.iOOldSchool = 0; + sSession.iOOldSchoolProceeding = 0; + sSession.iOOldSchoolCompleted = 0; + } - rmt_direction = SdpCodecStringConstants::EAttributeRecvonly; - oldSchool = 0; + rmt_direction = SdpCodecStringConstants::EAttributeRecvonly; + } + oldSchool = 0; } else // didn't try old school yet { diff -r 861e78e4e84c -r b25d6a5c0a63 multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesrvstream.cpp --- a/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesrvstream.cpp Fri Apr 16 15:21:04 2010 +0300 +++ b/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesrvstream.cpp Mon May 03 12:52:41 2010 +0300 @@ -898,20 +898,24 @@ MCEMM_DEBUG("CMceSrvStream::RequireSignalling(): codec requires signalling"); action = KMceRequiresSignalling; } - else if ( LocalMediaPort() != aCurrent.LocalMediaPort() || - Data().RemoteMediaPortChanged( aCurrent.Data().RemoteMediaPort() ) ) + else if ( LocalMediaPort() != aCurrent.LocalMediaPort() ) //local port has changed => needs new media session & signaling { MCEMM_DEBUG("CMceSrvStream::RequireSignalling(): local port changed. requires signalling"); action = KMceRequiresSignalling; } + else if ( Data().RemoteMediaPortChanged( aCurrent.Data().RemoteMediaPort() ) ) + { + MCEMM_DEBUG("CMceSrvStream::RequireSignalling(): Remote port changed. requires signalling"); + action = KMceRequiresSipSignallingOnly; + } else if ( Data().RemoteRTCPAddressChanged(aCurrent.Data().iRemoteRtcpPort, aCurrent.Data().iRemoteRtcpAddress)) { MCEMM_DEBUG("CMceSrvStream::RequireSignalling(): Remote Rtcp Port changed, requires signalling"); - action = KMceRequiresSignalling; + action = KMceRequiresSipSignallingOnly; } else if ( Data().iIsEnabled != aCurrent.Data().iIsEnabled ) diff -r 861e78e4e84c -r b25d6a5c0a63 multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/inc/UT_CMCEMediaManager.h --- a/multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/inc/UT_CMCEMediaManager.h Fri Apr 16 15:21:04 2010 +0300 +++ b/multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/inc/UT_CMCEMediaManager.h Mon May 03 12:52:41 2010 +0300 @@ -506,6 +506,7 @@ void UT_CMceMediaManager_SetCNameLL(); void UT_CMceMediaManager_SetRemoteAddressLL(); void UT_CMceMediaManager_UpdateConfigKeyLL(); + void UT_CMceMediaManager_ForceEnableSinkStateL(); /** * Tests diff -r 861e78e4e84c -r b25d6a5c0a63 multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/src/UT_cmcemediasdpcodec.cpp --- a/multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/src/UT_cmcemediasdpcodec.cpp Fri Apr 16 15:21:04 2010 +0300 +++ b/multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/src/UT_cmcemediasdpcodec.cpp Mon May 03 12:52:41 2010 +0300 @@ -1433,9 +1433,26 @@ // Ensure old school to be used next EUNIT_ASSERT( iSession->SdpSession().iOOldSchool == 1 ); - - CleanupStack::PopAndDestroy( sdp ); - + + CleanupStack::PopAndDestroy( sdp ); + + sdp = CSdpDocument::DecodeL( KMceTestSdpAMRWithOutDirection ); + CleanupStack::PushL( sdp ); + iSession->SdpSession().iOOldSchool = 1; // OldSchool Tried Already + audioLine = sdp->MediaFields()[ 0 ]; + mediaStream = iSession->Streams()[ 0 ]; + mediaStream->SetDirection( SdpCodecStringConstants::EAttributeSendrecv ); + + aRole = EMceRoleOfferer; + + // Check if we offer Sendrecv to unhold the call and the other party + // is just only accept oldschool hold. + iSdpCodec->DecodeDirectionL(*audioLine, *mediaStream, *sdp, aRole ); + + EUNIT_ASSERT( iSession->SdpSession().iOOldSchool == 1 ); + EUNIT_ASSERT( mediaStream->Direction() == SdpCodecStringConstants::EAttributeSendrecv ); + CleanupStack::PopAndDestroy( sdp ); + } diff -r 861e78e4e84c -r b25d6a5c0a63 multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/src/UT_cmcesrvstream.cpp --- a/multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/src/UT_cmcesrvstream.cpp Fri Apr 16 15:21:04 2010 +0300 +++ b/multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/src/UT_cmcesrvstream.cpp Mon May 03 12:52:41 2010 +0300 @@ -641,7 +641,7 @@ iMcc->iRequireSignalling = EFalse; iStream->Data().SetLocalMediaPort( stream->LocalMediaPort() ); iStream->Data().SetRemoteMediaPort( 10 ); - EUNIT_ASSERT( iStream->RequireSignalling( *stream, *current, *update ) ); + EUNIT_ASSERT( iStream->RequireSignalling( *stream, *current, *update ) == KMceRequiresSipSignallingOnly ); iMcc->iRequireSignalling = EFalse; iStream->Data().SetLocalMediaPort( stream->LocalMediaPort() ); diff -r 861e78e4e84c -r b25d6a5c0a63 multimediacommsengine/mmcesrv/mmceserver/src/mcenatstatewait.cpp --- a/multimediacommsengine/mmcesrv/mmceserver/src/mcenatstatewait.cpp Fri Apr 16 15:21:04 2010 +0300 +++ b/multimediacommsengine/mmcesrv/mmceserver/src/mcenatstatewait.cpp Mon May 03 12:52:41 2010 +0300 @@ -52,6 +52,7 @@ EMceProvisionalResponse == aEvent.Code() ) && MceSip::HasContent( aEvent.Session().Response() ) ) || EMceNatError == aEvent.NatCode() || + EMceNatUpdated == aEvent.NatCode() || ( EMceAck == aEvent.Code() && MceSip::HasContent( aEvent.Session().Request())) || EMceNatICMPError == aEvent.NatCode()) @@ -135,6 +136,7 @@ void CMceNatStateWait::ExitDefaultL( TMceNatStateTransitionEvent& aEvent ) { CMceSipSession& session = aEvent.Session(); + TMceStateIndex sipState = aEvent.Session().CurrentState().Id(); if ( EMceAck == aEvent.Code() && MceSip::HasContent( aEvent.Session().Request())) @@ -143,6 +145,11 @@ aEvent.NatActions().UpdateL(); aEvent.NatActions().StateChangedL( aEvent, KMceNatStateDecodeAnswer ); } + else if( EMceNatUpdated == aEvent.NatCode() && + KMceStateOffering == sipState ) //for prack + { + aEvent.NatActions().StateChangedL( aEvent, KMceNatStateCreateOffer ); + } else { User::LeaveIfError( session.Actions().CreateSDP( session.Response() ) ); diff -r 861e78e4e84c -r b25d6a5c0a63 multimediacommsengine/mmcesrv/mmceserver/tsrc/ut_server/src/UT_CMceNatStateWait.cpp --- a/multimediacommsengine/mmcesrv/mmceserver/tsrc/ut_server/src/UT_CMceNatStateWait.cpp Fri Apr 16 15:21:04 2010 +0300 +++ b/multimediacommsengine/mmcesrv/mmceserver/tsrc/ut_server/src/UT_CMceNatStateWait.cpp Mon May 03 12:52:41 2010 +0300 @@ -142,13 +142,13 @@ EUNIT_ASSERT( DoesAccept( EMceNatError ) ); EUNIT_ASSERT( DoesAccept( EMceNatICMPError ) ); + EUNIT_ASSERT( DoesAccept( EMceNatUpdated ) ); EUNIT_ASSERT( !DoesAccept( EMceNatHandleSIP ) ); EUNIT_ASSERT( !DoesAccept( EMceNatInitialized ) ); EUNIT_ASSERT( !DoesAccept( EMceNatOffer ) ); EUNIT_ASSERT( !DoesAccept( EMceNatAnswer ) ); EUNIT_ASSERT( !DoesAccept( EMceNatUpdateSdp ) ); - EUNIT_ASSERT( !DoesAccept( EMceNatUpdated ) ); EUNIT_ASSERT( !DoesAccept( EMceNatSync ) ); } @@ -193,6 +193,12 @@ *iNatSession, EMceInvite ); EUNIT_ASSERT_LEAVE( iState->TransitionHandler().ExitL( event2 )); + iNatSession->iNatDisabled = EFalse; + eventcode = EMceNatUpdated; + iNatSession->NextState( KMceStateOffering ); + TMceNatStateTransitionEvent event3( NULL, *iNatSession,eventcode, + *iNatSession, EMcePrack ); + EUNIT_ASSERT_NO_LEAVE( iState->TransitionHandler().ExitL( event3 )); } TBool diff -r 861e78e4e84c -r b25d6a5c0a63 natplugins/natpcliprovisioningnatfwadapter/group/wpnatfwtraversaladapter.mmp --- a/natplugins/natpcliprovisioningnatfwadapter/group/wpnatfwtraversaladapter.mmp Fri Apr 16 15:21:04 2010 +0300 +++ b/natplugins/natpcliprovisioningnatfwadapter/group/wpnatfwtraversaladapter.mmp Mon May 03 12:52:41 2010 +0300 @@ -58,8 +58,6 @@ LIBRARY ProvisioningEngine.lib LIBRARY centralrepository.lib LIBRARY charconv.lib -LIBRARY apengine.lib -LIBRARY commdb.lib LIBRARY cmmanager.lib PAGED