code: public synchronized SdpEndpoint createEndpoint(CountDownLatch endpointLatch) {
  		SdpEndpoint old = this.getEndpoint();
  		if (old == null) {
  			internalEndpointInitialization(endpointLatch);
  		} else {
  			endpointLatch.countDown();
  		}
  		if (this.isWeb()) {
  			while (!candidates.isEmpty()) {
  				internalAddIceCandidate(candidates.removeFirst());
  			}
  		}
  		return old;
  	}
docs: If this object doesn't have a {@link WebRtcEndpoint}, it is created in a
  thread-safe way using the internal {@link MediaPipeline}. Otherwise no
  actions are taken. It also registers an error listener for the endpoint and
  for any additional media elements.
  
  @param endpointLatch latch whose countdown is performed when the asynchronous
  call to build the {@link WebRtcEndpoint} returns
  
  @return the existing endpoint, if any