WebRTC fundamentals (with native C++ API)

835 views
Skip to first unread message

tsel...@gmail.com

unread,
Apr 25, 2014, 7:20:51 AM4/25/14
to discuss...@googlegroups.com

Hi all!

I want to develop the simplest WebRTC client transmitting an audio stream in C++ using native API and have some blocking issues. If I'm right then I need to specify at least one ICE (STUN/TURN) server in CreatePeerConnection(...). This is now stun:stun.l.google.com:19302. The purpose of this server is to find the path between my peer and the destination peer. But I simply don't know how to set the destination peer? Having executed CreateOffer(...) and SetLocalDescription(...), it provides with me via callback functions a lot of ICE candidates, but I don't see why it is sending me 'paths' to the intended client if I haven't set the destination peer. Or is it assuming not only the ICE server, but the destination peer is also stun.l.google.com:19302?

Could you please help me understand the fundamentals?

Thanks


tsel...@gmail.com

unread,
Apr 25, 2014, 9:25:29 AM4/25/14
to discuss...@googlegroups.com

It's getting clear.

  1. I need to use a signaling service which is used by all peers that want to participate in the WebRTC session. Such a service can be e.g. XMPP or anything else, e.g. a custom signaling server/gateway;
  2. In a situation in which one peer is a native C/C++ application and another peer is a browser application an appropriate signaling service must be used which is supported by all peers. Now Websockets seems to be adequate to me, since it's rather easy to implement it in C/C++;
  3. Once we have the signaling service, we can begin with the WebRTC negotiation, which incorporates SDP messages, like ICE candidates, offers and answers;
  4. ICE tells the caller (peer) the possible paths it can be reached from other peers, therefore it's important to pass the ICE candidates to the remote peer (using signaling service) so it knows which peer to connect to, and how to connect;

Am I right?

Reply all
Reply to author
Forward
0 new messages