No candidates in generated sdp on android

510 views
Skip to first unread message

Udit Agarwal

unread,
May 24, 2013, 7:51:50 AM5/24/13
to discuss...@googlegroups.com
Hello everyone,
I am trying to build an peerconnection application for android using the libjingle code base.
I first of all built the build for android and then writing a client for it.
I am trying to create a offer using the following steps:

sdpMediaConstraints = new MediaConstraints();

PeerConnectionFactory peer_connection_factory = new PeerConnectionFactory();
java.util.List<org.webrtc.PeerConnection.IceServer> iceServers = new ArrayList<PeerConnection.IceServer>();

org.webrtc.PeerConnection.IceServer server = new org.webrtc.PeerConnection.IceServer(getPeerConnectionString(),"");

iceServers.add(server);

pc = peer_connection_factory.createPeerConnection(iceServers, sdpMediaConstraints, pcObserver );
MediaStream lMS = peer_connection_factory.createLocalMediaStream("ARDAMS");
lMS.addTrack(peer_connection_factory.createAudioTrack("ARDAMSa0"));
pc.addStream(lMS, new MediaConstraints());
initiator = true;
pc.createOffer(sdpObserver, sdpMediaConstraints);

and then in OnSuccess callback of SdpObserver, i am getting the sdp created which is:
 v=0
        o=- 2531860918050167020 2 IN IP4 127.0.0.1
        s=-
        t=0 0
        a=group:BUNDLE audio
        a=msid-semantic: WMS ARDAMS
        m=audio 1 RTP/SAVPF 111 103 9 102 0 8 107 106 105 13 127 126
        c=IN IP4 0.0.0.0
        a=rtcp:1 IN IP4 0.0.0.0
        a=ice-ufrag:SpH1O3AETfbl/zl5
        a=ice-pwd:2FxfI6Cl8EBWDTtGOjYpj5Xq
        a=ice-options:google-ice
        a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
        a=sendrecv
        a=mid:audio
        a=rtcp-mux
        a=crypto:0 AES_CM_128_HMAC_SHA1_32 inline:2gdO0kG9lAH26jQ2Lj68zPj+JanIXZxM23Zf4I2V
        a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:cidheIUrq3oTJgMM9QmnDyq2Ra0LEQ49dlPRVBDD
        a=rtpmap:111 opus/48000/2
        a=fmtp:111 minptime=10
        a=rtpmap:103 ISAC/16000
        a=rtpmap:9 G722/16000
        a=rtpmap:102 ILBC/8000
        a=rtpmap:0 PCMU/8000
        a=rtpmap:8 PCMA/8000
        a=rtpmap:107 CN/48000
        a=rtpmap:106 CN/32000
        a=rtpmap:105 CN/16000
        a=rtpmap:13 CN/8000
        a=rtpmap:127 red/8000
        a=rtpmap:126 telephone-event/8000
        a=maxptime:60
        a=ssrc:2741300425 cname:RZLLprlyRCLS6Z0M
        a=ssrc:2741300425 msid:ARDAMS ARDAMSa0
        a=ssrc:2741300425 mslabel:ARDAMS
        a=ssrc:2741300425 label:ARDAMSa0

But the problem is:
In the received SDP, I dont have any candidates. Neither host nor server reflexive candidate are there.
Am I doing anything wrong?

--
Udit Agarwal
B.Tech. ( Information Technology ) , 8th Semester,
Indian Institute of Information Technology
Allahabad - 211012, India
Email : udit...@gmail.com
Mobile: +91-9411656264

Adam Fineberg

unread,
May 24, 2013, 12:09:43 PM5/24/13
to discuss...@googlegroups.com
Chrome uses trickle ICE so the candidates are collected async to the SDP offer/answer.  If you'd like to have all the candidates in the SDP, wait for ICE to complete (get OnIceCandidate callback with null candidate) and then get the SDP and it should have the candidates in it.

Adam
--
 
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

-- 
Regards,
Adam
Reply all
Reply to author
Forward
0 new messages