mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-21 13:08:08 +00:00
last retrofit from cvs
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@4 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
2b8200409c
commit
c2fb156eed
1 changed files with 2 additions and 43 deletions
|
|
@ -38,55 +38,14 @@ import org.zoolu.sdp.SessionDescriptor;
|
|||
import org.zoolu.sip.message.Message;
|
||||
|
||||
/**
|
||||
* rewrite SDP to insert an ICE aware rtp relay
|
||||
* rewrite SDP to insert a=relay-add
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class SdpProcessorImpl implements SdpProcessor {
|
||||
private final String CANDIDATE_RELAY_NAME="relay";
|
||||
|
||||
class CandidateAttributeParser {
|
||||
final private String mCandidateAttribute;
|
||||
|
||||
final private String mfoundation;
|
||||
final private String mComponentId;
|
||||
final private String mTransport;
|
||||
final private String mPriority;
|
||||
final private String mConnectionAddress;
|
||||
final private String mPort;
|
||||
final private String mType;
|
||||
|
||||
public CandidateAttributeParser(String aCandidateAttribute){
|
||||
mCandidateAttribute = aCandidateAttribute;
|
||||
StringTokenizer st = new StringTokenizer(mCandidateAttribute);
|
||||
mfoundation = st.nextToken();
|
||||
mComponentId = st.nextToken();
|
||||
mTransport = st.nextToken();
|
||||
mPriority = st.nextToken();
|
||||
mConnectionAddress = st.nextToken();
|
||||
mPort = st.nextToken();
|
||||
st.nextToken(); //skip typ
|
||||
mType = st.nextToken();;
|
||||
}
|
||||
public CandidateAttributeParser(InetSocketAddress aRelayAddress){
|
||||
mfoundation = "3";
|
||||
mComponentId = "1";
|
||||
mTransport = "UDP";
|
||||
mPriority = "0";
|
||||
mConnectionAddress = aRelayAddress.getAddress().getHostAddress();
|
||||
mPort = String.valueOf(aRelayAddress.getPort());
|
||||
mType = CANDIDATE_RELAY_NAME;
|
||||
mCandidateAttribute = toString();
|
||||
}
|
||||
|
||||
InetSocketAddress getAddress() {
|
||||
return new InetSocketAddress(mConnectionAddress,Integer.parseInt(mPort));
|
||||
}
|
||||
public String toString() {
|
||||
return mfoundation +" "+ mComponentId +" "+ mTransport +" "+ mPriority +" "+ mConnectionAddress +" "+ mPort +" typ " +mType;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private final static Logger mLog = Logger.getLogger(SdpProcessorImpl.class);
|
||||
private final Map<String,Registration> mRegistrationTab;
|
||||
private final P2pProxyRtpRelayManagement mP2pProxyRtpRelayManagement;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue