OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 if (peerConnectionParameters == null) { | 279 if (peerConnectionParameters == null) { |
280 Log.e(TAG, "Creating peer connection without initializing factory."); | 280 Log.e(TAG, "Creating peer connection without initializing factory."); |
281 return; | 281 return; |
282 } | 282 } |
283 this.localRender = localRender; | 283 this.localRender = localRender; |
284 this.remoteRender = remoteRender; | 284 this.remoteRender = remoteRender; |
285 this.signalingParameters = signalingParameters; | 285 this.signalingParameters = signalingParameters; |
286 executor.execute(new Runnable() { | 286 executor.execute(new Runnable() { |
287 @Override | 287 @Override |
288 public void run() { | 288 public void run() { |
289 createMediaConstraintsInternal(); | 289 try { |
290 createPeerConnectionInternal(renderEGLContext); | 290 createMediaConstraintsInternal(); |
| 291 createPeerConnectionInternal(renderEGLContext); |
| 292 } catch (Exception e) { |
| 293 reportError("Failed to create peer connection: " + e.getMessage()); |
| 294 throw e; |
| 295 } |
291 } | 296 } |
292 }); | 297 }); |
293 } | 298 } |
294 | 299 |
295 public void close() { | 300 public void close() { |
296 executor.execute(new Runnable() { | 301 executor.execute(new Runnable() { |
297 @Override | 302 @Override |
298 public void run() { | 303 public void run() { |
299 closeInternal(); | 304 closeInternal(); |
300 } | 305 } |
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 public void onCreateFailure(final String error) { | 1141 public void onCreateFailure(final String error) { |
1137 reportError("createSDP error: " + error); | 1142 reportError("createSDP error: " + error); |
1138 } | 1143 } |
1139 | 1144 |
1140 @Override | 1145 @Override |
1141 public void onSetFailure(final String error) { | 1146 public void onSetFailure(final String error) { |
1142 reportError("setSDP error: " + error); | 1147 reportError("setSDP error: " + error); |
1143 } | 1148 } |
1144 } | 1149 } |
1145 } | 1150 } |
OLD | NEW |