Hello Adrien,
webrtcendpoint is an element that allows connecting a gstreamer pipeline with another peer using WebRTC standar. As its own name says, it must be located at the end and at the beginning of the media chain and it sends/receives audio and video to/from another WebRTC peer (that can be a browser or another webrtcendpoint).
Imagine that you want to connect two webrcendpoints. One of them (A) sends video to the other one (B). So you will have two simple pipelines connected through WebRTC:
videotestsrcA -> webrtcendpointA ----> WebRTC standar ----> webrtcendpointB -> autovideosinkB
This example is this:
https://github.com/Kurento/gst-kurento-plugins/blob/develop/tests/check/element/webrtcendpoint.c#L98
The "connection" between webrtcendpointA and webrtcendpointB is done performing the SDP negotiation. This must be managed in the next way:
1) Each webrtcendpoint has a SDP pattern to generate offers and answers. This pattern basically indicates the media capabilities that the webrtcendpoint will have (audio and video codecs, direction of the media flow as sendonly, recvonly and sendrecv, etc.). To set it:
g_object_set (sender, "pattern-sdp", pattern_sdp, NULL);
Also, you can add info about STUN server using stun-server and stun-server-port properties.
2) Supposing that A starts the SDP negotiation, it generates an offer. The offer has the media info and connection info of A (ICE candidates)
g_signal_emit_by_name (sender, "generate-offer", &offer);
3) The offer is sent to B in a any way (this is named signaling).
4) Using the offer, B generates a SDP answer. In this step webrtcendpoint B is configured and it is ready to receive video. The answer has the media info and connection info of B (ICE candidates)
g_signal_emit_by_name (receiver, "process-offer", offer, &answer);
5) The answer is sent to A using the signaling layer.
5) A processes the SDP answer. In this step webrtcendpoint A is configured and it starts sending video to B
g_signal_emit_by_name (sender, "process-answer", answer);
6) Video flows from A to B
This is a short and schematic explanation. But it is interesting that you know more about SDP.
A good point to start is wikipedia:
http://en.wikipedia.org/wiki/Session_Description_Protocol
For the complete info see the RFC:
http://tools.ietf.org/html/rfc2327Understanding Kurento terminology can help you to know better the webrtcendpoint:
http://www.kurento.org/kurento-media-element-toolbox
I have also attached the gst-inspect doc of webrtcendpoint.
I hope this helps you ;).
Best.