OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 131 |
132 /** Java version of PeerConnectionInterface.RTCConfiguration */ | 132 /** Java version of PeerConnectionInterface.RTCConfiguration */ |
133 public static class RTCConfiguration { | 133 public static class RTCConfiguration { |
134 public IceTransportsType iceTransportsType; | 134 public IceTransportsType iceTransportsType; |
135 public List<IceServer> iceServers; | 135 public List<IceServer> iceServers; |
136 public BundlePolicy bundlePolicy; | 136 public BundlePolicy bundlePolicy; |
137 public RtcpMuxPolicy rtcpMuxPolicy; | 137 public RtcpMuxPolicy rtcpMuxPolicy; |
138 public TcpCandidatePolicy tcpCandidatePolicy; | 138 public TcpCandidatePolicy tcpCandidatePolicy; |
139 public int audioJitterBufferMaxPackets; | 139 public int audioJitterBufferMaxPackets; |
140 public boolean audioJitterBufferFastAccelerate; | 140 public boolean audioJitterBufferFastAccelerate; |
| 141 public int iceConnectionReceivingTimeout; |
141 | 142 |
142 public RTCConfiguration(List<IceServer> iceServers) { | 143 public RTCConfiguration(List<IceServer> iceServers) { |
143 iceTransportsType = IceTransportsType.ALL; | 144 iceTransportsType = IceTransportsType.ALL; |
144 bundlePolicy = BundlePolicy.BALANCED; | 145 bundlePolicy = BundlePolicy.BALANCED; |
145 rtcpMuxPolicy = RtcpMuxPolicy.NEGOTIATE; | 146 rtcpMuxPolicy = RtcpMuxPolicy.NEGOTIATE; |
146 tcpCandidatePolicy = TcpCandidatePolicy.ENABLED; | 147 tcpCandidatePolicy = TcpCandidatePolicy.ENABLED; |
147 this.iceServers = iceServers; | 148 this.iceServers = iceServers; |
148 audioJitterBufferMaxPackets = 50; | 149 audioJitterBufferMaxPackets = 50; |
149 audioJitterBufferFastAccelerate = false; | 150 audioJitterBufferFastAccelerate = false; |
| 151 iceConnectionReceivingTimeout = -1; |
150 } | 152 } |
151 }; | 153 }; |
152 | 154 |
153 private final List<MediaStream> localStreams; | 155 private final List<MediaStream> localStreams; |
154 private final long nativePeerConnection; | 156 private final long nativePeerConnection; |
155 private final long nativeObserver; | 157 private final long nativeObserver; |
156 | 158 |
157 PeerConnection(long nativePeerConnection, long nativeObserver) { | 159 PeerConnection(long nativePeerConnection, long nativeObserver) { |
158 this.nativePeerConnection = nativePeerConnection; | 160 this.nativePeerConnection = nativePeerConnection; |
159 this.nativeObserver = nativeObserver; | 161 this.nativeObserver = nativeObserver; |
(...skipping 13 matching lines...) Expand all Loading... |
173 | 175 |
174 public native void createAnswer( | 176 public native void createAnswer( |
175 SdpObserver observer, MediaConstraints constraints); | 177 SdpObserver observer, MediaConstraints constraints); |
176 | 178 |
177 public native void setLocalDescription( | 179 public native void setLocalDescription( |
178 SdpObserver observer, SessionDescription sdp); | 180 SdpObserver observer, SessionDescription sdp); |
179 | 181 |
180 public native void setRemoteDescription( | 182 public native void setRemoteDescription( |
181 SdpObserver observer, SessionDescription sdp); | 183 SdpObserver observer, SessionDescription sdp); |
182 | 184 |
183 public native void setIceConnectionReceivingTimeout(int timeoutMs); | |
184 | |
185 public native boolean updateIce( | 185 public native boolean updateIce( |
186 List<IceServer> iceServers, MediaConstraints constraints); | 186 List<IceServer> iceServers, MediaConstraints constraints); |
187 | 187 |
188 public boolean addIceCandidate(IceCandidate candidate) { | 188 public boolean addIceCandidate(IceCandidate candidate) { |
189 return nativeAddIceCandidate( | 189 return nativeAddIceCandidate( |
190 candidate.sdpMid, candidate.sdpMLineIndex, candidate.sdp); | 190 candidate.sdpMid, candidate.sdpMLineIndex, candidate.sdp); |
191 } | 191 } |
192 | 192 |
193 public boolean addStream(MediaStream stream) { | 193 public boolean addStream(MediaStream stream) { |
194 boolean ret = nativeAddLocalStream(stream.nativeStream); | 194 boolean ret = nativeAddLocalStream(stream.nativeStream); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 private native boolean nativeAddIceCandidate( | 236 private native boolean nativeAddIceCandidate( |
237 String sdpMid, int sdpMLineIndex, String iceCandidateSdp); | 237 String sdpMid, int sdpMLineIndex, String iceCandidateSdp); |
238 | 238 |
239 private native boolean nativeAddLocalStream(long nativeStream); | 239 private native boolean nativeAddLocalStream(long nativeStream); |
240 | 240 |
241 private native void nativeRemoveLocalStream(long nativeStream); | 241 private native void nativeRemoveLocalStream(long nativeStream); |
242 | 242 |
243 private native boolean nativeGetStats( | 243 private native boolean nativeGetStats( |
244 StatsObserver observer, long nativeTrack); | 244 StatsObserver observer, long nativeTrack); |
245 } | 245 } |
OLD | NEW |