919 TPtrC8 remoteRtcpAddrTxt = value.Mid( addr_offset ); |
919 TPtrC8 remoteRtcpAddrTxt = value.Mid( addr_offset ); |
920 |
920 |
921 const TUint8 KPortOffsetFromIP = 1; |
921 const TUint8 KPortOffsetFromIP = 1; |
922 TInt port_offset = |
922 TInt port_offset = |
923 value.Match( KMatchIN ) - KPortOffsetFromIP; |
923 value.Match( KMatchIN ) - KPortOffsetFromIP; |
924 TPtrC8 remoteRtcpPort = value.Left( port_offset ); |
924 HBufC8* dataRemoteRtcpPort = value.Left( port_offset ).AllocLC(); |
925 |
925 TPtr8 remoteRtcpPort( dataRemoteRtcpPort->Des() ); |
|
926 remoteRtcpPort.TrimAll(); |
926 TLex8 lexPT( remoteRtcpPort ); |
927 TLex8 lexPT( remoteRtcpPort ); |
927 User::LeaveIfError( lexPT.Val( rtcpPort, EDecimal ) ); |
928 User::LeaveIfError( lexPT.Val( rtcpPort, EDecimal ) ); |
928 // copy the address into correct format |
929 // copy the address into correct format |
929 TBuf16 <KMaxAddressLength> input; |
930 TBuf16 <KMaxAddressLength> input; |
930 input.Copy( remoteRtcpAddrTxt ); |
931 input.Copy( remoteRtcpAddrTxt ); |
931 |
932 input.TrimAll(); |
932 MCEMM_DEBUG_SVALUE( "Found RTCP address", input ) |
933 MCEMM_DEBUG_SVALUE( "Found RTCP address", input ) |
933 |
934 |
934 TInetAddr remoteRtcpAddr; |
935 TInetAddr remoteRtcpAddr; |
935 User::LeaveIfError( remoteRtcpAddr.Input( input ) ); |
936 User::LeaveIfError( remoteRtcpAddr.Input( input ) ); |
936 TInetAddr localIpAddr( aStream.Session()->iLocalIpAddress ); |
937 TInetAddr localIpAddr( aStream.Session()->iLocalIpAddress ); |
939 MCEMM_DEBUG_DVALUE( "Remote RTCP addr valid:", validRemoteRtcpAddr ) |
940 MCEMM_DEBUG_DVALUE( "Remote RTCP addr valid:", validRemoteRtcpAddr ) |
940 if ( validRemoteRtcpAddr ) |
941 if ( validRemoteRtcpAddr ) |
941 { |
942 { |
942 aStream.SetRemoteRtcpMediaAddrL( input ); |
943 aStream.SetRemoteRtcpMediaAddrL( input ); |
943 } |
944 } |
|
945 CleanupStack::PopAndDestroy( dataRemoteRtcpPort ); |
944 } |
946 } |
945 else |
947 else |
946 { |
948 { |
947 // only port present |
949 // only port present |
948 TLex8 lexPT( value ); |
950 HBufC8* dataRemoteRtcpPort = value.AllocLC(); |
|
951 TPtr8 remoteRtcpPort( dataRemoteRtcpPort->Des() ); |
|
952 remoteRtcpPort.TrimAll(); |
|
953 TLex8 lexPT( remoteRtcpPort ); |
949 User::LeaveIfError ( lexPT.Val( rtcpPort, EDecimal ) ); |
954 User::LeaveIfError ( lexPT.Val( rtcpPort, EDecimal ) ); |
|
955 CleanupStack::PopAndDestroy( dataRemoteRtcpPort ); |
950 } |
956 } |
951 |
957 |
952 aStream.SetRemoteRtcpMediaPort( rtcpPort ); |
958 aStream.SetRemoteRtcpMediaPort( rtcpPort ); |
953 |
959 |
954 MCEMM_DEBUG_DVALUE( "RTCP Port", rtcpPort ) |
960 MCEMM_DEBUG_DVALUE( "RTCP Port", rtcpPort ) |