Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(663)

Side by Side Diff: talk/app/webrtc/java/src/org/webrtc/PeerConnection.java

Issue 1312293003: Add option to enable ECDSA key for Java API. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Remove extra line Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 /** Java version of PeerConnectionInterface.BundlePolicy */ 118 /** Java version of PeerConnectionInterface.BundlePolicy */
119 public enum BundlePolicy { 119 public enum BundlePolicy {
120 BALANCED, MAXBUNDLE, MAXCOMPAT 120 BALANCED, MAXBUNDLE, MAXCOMPAT
121 }; 121 };
122 122
123 /** Java version of PeerConnectionInterface.RtcpMuxPolicy */ 123 /** Java version of PeerConnectionInterface.RtcpMuxPolicy */
124 public enum RtcpMuxPolicy { 124 public enum RtcpMuxPolicy {
125 NEGOTIATE, REQUIRE 125 NEGOTIATE, REQUIRE
126 }; 126 };
127
127 /** Java version of PeerConnectionInterface.TcpCandidatePolicy */ 128 /** Java version of PeerConnectionInterface.TcpCandidatePolicy */
128 public enum TcpCandidatePolicy { 129 public enum TcpCandidatePolicy {
129 ENABLED, DISABLED 130 ENABLED, DISABLED
130 }; 131 };
131 132
133 /** Java version of rtc::KeyType */
134 public enum KeyType {
135 RSA, ECDSA;
136 }
137
132 /** Java version of PeerConnectionInterface.RTCConfiguration */ 138 /** Java version of PeerConnectionInterface.RTCConfiguration */
133 public static class RTCConfiguration { 139 public static class RTCConfiguration {
134 public IceTransportsType iceTransportsType; 140 public IceTransportsType iceTransportsType;
135 public List<IceServer> iceServers; 141 public List<IceServer> iceServers;
136 public BundlePolicy bundlePolicy; 142 public BundlePolicy bundlePolicy;
137 public RtcpMuxPolicy rtcpMuxPolicy; 143 public RtcpMuxPolicy rtcpMuxPolicy;
138 public TcpCandidatePolicy tcpCandidatePolicy; 144 public TcpCandidatePolicy tcpCandidatePolicy;
139 public int audioJitterBufferMaxPackets; 145 public int audioJitterBufferMaxPackets;
140 public boolean audioJitterBufferFastAccelerate; 146 public boolean audioJitterBufferFastAccelerate;
147 public KeyType keyType;
141 148
142 public RTCConfiguration(List<IceServer> iceServers) { 149 public RTCConfiguration(List<IceServer> iceServers) {
143 iceTransportsType = IceTransportsType.ALL; 150 iceTransportsType = IceTransportsType.ALL;
144 bundlePolicy = BundlePolicy.BALANCED; 151 bundlePolicy = BundlePolicy.BALANCED;
145 rtcpMuxPolicy = RtcpMuxPolicy.NEGOTIATE; 152 rtcpMuxPolicy = RtcpMuxPolicy.NEGOTIATE;
146 tcpCandidatePolicy = TcpCandidatePolicy.ENABLED; 153 tcpCandidatePolicy = TcpCandidatePolicy.ENABLED;
147 this.iceServers = iceServers; 154 this.iceServers = iceServers;
148 audioJitterBufferMaxPackets = 50; 155 audioJitterBufferMaxPackets = 50;
149 audioJitterBufferFastAccelerate = false; 156 audioJitterBufferFastAccelerate = false;
157 keyType = KeyType.ECDSA;
150 } 158 }
151 }; 159 };
152 160
153 private final List<MediaStream> localStreams; 161 private final List<MediaStream> localStreams;
154 private final long nativePeerConnection; 162 private final long nativePeerConnection;
155 private final long nativeObserver; 163 private final long nativeObserver;
156 164
157 PeerConnection(long nativePeerConnection, long nativeObserver) { 165 PeerConnection(long nativePeerConnection, long nativeObserver) {
158 this.nativePeerConnection = nativePeerConnection; 166 this.nativePeerConnection = nativePeerConnection;
159 this.nativeObserver = nativeObserver; 167 this.nativeObserver = nativeObserver;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 private native boolean nativeAddIceCandidate( 244 private native boolean nativeAddIceCandidate(
237 String sdpMid, int sdpMLineIndex, String iceCandidateSdp); 245 String sdpMid, int sdpMLineIndex, String iceCandidateSdp);
238 246
239 private native boolean nativeAddLocalStream(long nativeStream); 247 private native boolean nativeAddLocalStream(long nativeStream);
240 248
241 private native void nativeRemoveLocalStream(long nativeStream); 249 private native void nativeRemoveLocalStream(long nativeStream);
242 250
243 private native boolean nativeGetStats( 251 private native boolean nativeGetStats(
244 StatsObserver observer, long nativeTrack); 252 StatsObserver observer, long nativeTrack);
245 } 253 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698