corrected rtp (Arne)

This commit is contained in:
12aw 2022-04-29 01:50:56 +02:00
parent b7a6831501
commit 5c6156c488
4 changed files with 1615 additions and 689 deletions

View file

@ -4,6 +4,7 @@ public enum RtpEndUserState {
INCOMING_CALL, //received a 'propose' message
CONNECTING, //session-initiate or session-accepted but no webrtc peer connection yet
CONNECTED, //session-accepted and webrtc peer connection is connected
RECONNECTING, //session-accepted and webrtc peer connection was connected once but is currently disconnected or failed
FINDING_DEVICE, //'propose' has been sent out; no 184 ack yet
RINGING, //'propose' has been sent out and it has been 184 acked
ACCEPTING_CALL, //'proceed' message has been sent; but no session-initiate has been received
@ -15,4 +16,4 @@ public enum RtpEndUserState {
RETRACTED, //user pressed home or power button during 'ringing' - shows retry button
APPLICATION_ERROR, //something rather bad happened; libwebrtc failed or we got in IQ-error
SECURITY_ERROR //problem with DTLS (missing) or verification
}
}

View file

@ -311,7 +311,7 @@ public class WebRTCWrapper {
rtcConfig.continualGatheringPolicy = PeerConnection.ContinualGatheringPolicy.GATHER_CONTINUALLY;
rtcConfig.sdpSemantics = PeerConnection.SdpSemantics.UNIFIED_PLAN;
rtcConfig.rtcpMuxPolicy = PeerConnection.RtcpMuxPolicy.NEGOTIATE;
//rtcConfig.enableImplicitRollback = true;
rtcConfig.enableImplicitRollback = true;
return rtcConfig;
}
@ -320,7 +320,7 @@ public class WebRTCWrapper {
}
void restartIce() {
executorService.execute(() -> requirePeerConnection());
executorService.execute(() -> requirePeerConnection().restartIce());
}
public void setIsReadyToReceiveIceCandidates(final boolean ready) {
@ -447,7 +447,20 @@ public class WebRTCWrapper {
synchronized ListenableFuture<SessionDescription> setLocalDescription() {
return Futures.transformAsync(getPeerConnectionFuture(), peerConnection -> {
final SettableFuture<SessionDescription> future = SettableFuture.create();
peerConnection.setLocalDescription(new SetSdpObserver() {
@Override
public void onSetSuccess() {
final SessionDescription description = peerConnection.getLocalDescription();
Log.d(EXTENDED_LOGGING_TAG, "set local description:");
logDescription(description);
future.set(description);
}
@Override
public void onSetFailure(final String message) {
future.setException(new FailureToSetDescriptionException(message));
}
});
return future;
}, MoreExecutors.directExecutor());
}