OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2015 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 try { | 74 try { |
75 System.loadLibrary("c++_shared"); | 75 System.loadLibrary("c++_shared"); |
76 System.loadLibrary("boringssl.cr"); | 76 System.loadLibrary("boringssl.cr"); |
77 System.loadLibrary("protobuf_lite.cr"); | 77 System.loadLibrary("protobuf_lite.cr"); |
78 } catch (UnsatisfiedLinkError e) { | 78 } catch (UnsatisfiedLinkError e) { |
79 Logging.w(TAG, "Failed to load native dependencies: ", e); | 79 Logging.w(TAG, "Failed to load native dependencies: ", e); |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 public static final String EXTRA_ROOMID = "org.appspot.apprtc.ROOMID"; | 83 public static final String EXTRA_ROOMID = "org.appspot.apprtc.ROOMID"; |
| 84 public static final String EXTRA_COLLIDERURL = "org.appspot.apprtc.COLLIDERURL
"; |
84 public static final String EXTRA_LOOPBACK = "org.appspot.apprtc.LOOPBACK"; | 85 public static final String EXTRA_LOOPBACK = "org.appspot.apprtc.LOOPBACK"; |
85 public static final String EXTRA_VIDEO_CALL = "org.appspot.apprtc.VIDEO_CALL"; | 86 public static final String EXTRA_VIDEO_CALL = "org.appspot.apprtc.VIDEO_CALL"; |
86 public static final String EXTRA_SCREENCAPTURE = "org.appspot.apprtc.SCREENCAP
TURE"; | 87 public static final String EXTRA_SCREENCAPTURE = "org.appspot.apprtc.SCREENCAP
TURE"; |
87 public static final String EXTRA_CAMERA2 = "org.appspot.apprtc.CAMERA2"; | 88 public static final String EXTRA_CAMERA2 = "org.appspot.apprtc.CAMERA2"; |
88 public static final String EXTRA_VIDEO_WIDTH = "org.appspot.apprtc.VIDEO_WIDTH
"; | 89 public static final String EXTRA_VIDEO_WIDTH = "org.appspot.apprtc.VIDEO_WIDTH
"; |
89 public static final String EXTRA_VIDEO_HEIGHT = "org.appspot.apprtc.VIDEO_HEIG
HT"; | 90 public static final String EXTRA_VIDEO_HEIGHT = "org.appspot.apprtc.VIDEO_HEIG
HT"; |
90 public static final String EXTRA_VIDEO_FPS = "org.appspot.apprtc.VIDEO_FPS"; | 91 public static final String EXTRA_VIDEO_FPS = "org.appspot.apprtc.VIDEO_FPS"; |
91 public static final String EXTRA_VIDEO_CAPTUREQUALITYSLIDER_ENABLED = | 92 public static final String EXTRA_VIDEO_CAPTUREQUALITYSLIDER_ENABLED = |
92 "org.appsopt.apprtc.VIDEO_CAPTUREQUALITYSLIDER"; | 93 "org.appsopt.apprtc.VIDEO_CAPTUREQUALITYSLIDER"; |
93 public static final String EXTRA_VIDEO_BITRATE = "org.appspot.apprtc.VIDEO_BIT
RATE"; | 94 public static final String EXTRA_VIDEO_BITRATE = "org.appspot.apprtc.VIDEO_BIT
RATE"; |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 | 331 |
331 // Create connection client. Use DirectRTCClient if room name is an IP other
wise use the | 332 // Create connection client. Use DirectRTCClient if room name is an IP other
wise use the |
332 // standard WebSocketRTCClient. | 333 // standard WebSocketRTCClient. |
333 if (loopback || !DirectRTCClient.IP_PATTERN.matcher(roomId).matches()) { | 334 if (loopback || !DirectRTCClient.IP_PATTERN.matcher(roomId).matches()) { |
334 appRtcClient = new WebSocketRTCClient(this); | 335 appRtcClient = new WebSocketRTCClient(this); |
335 } else { | 336 } else { |
336 Log.i(TAG, "Using DirectRTCClient because room name looks like an IP."); | 337 Log.i(TAG, "Using DirectRTCClient because room name looks like an IP."); |
337 appRtcClient = new DirectRTCClient(this); | 338 appRtcClient = new DirectRTCClient(this); |
338 } | 339 } |
339 // Create connection parameters. | 340 // Create connection parameters. |
340 roomConnectionParameters = new RoomConnectionParameters(roomUri.toString(),
roomId, loopback); | 341 String colliderUrl = intent.getStringExtra(EXTRA_COLLIDERURL); |
| 342 roomConnectionParameters = |
| 343 new RoomConnectionParameters(roomUri.toString(), roomId, loopback, colli
derUrl); |
341 | 344 |
342 // Create CPU monitor | 345 // Create CPU monitor |
343 cpuMonitor = new CpuMonitor(this); | 346 cpuMonitor = new CpuMonitor(this); |
344 hudFragment.setCpuMonitor(cpuMonitor); | 347 hudFragment.setCpuMonitor(cpuMonitor); |
345 | 348 |
346 // Send intent arguments to fragments. | 349 // Send intent arguments to fragments. |
347 callFragment.setArguments(intent.getExtras()); | 350 callFragment.setArguments(intent.getExtras()); |
348 hudFragment.setArguments(intent.getExtras()); | 351 hudFragment.setArguments(intent.getExtras()); |
349 // Activate call and HUD fragments and start the call. | 352 // Activate call and HUD fragments and start the call. |
350 FragmentTransaction ft = getFragmentManager().beginTransaction(); | 353 FragmentTransaction ft = getFragmentManager().beginTransaction(); |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 } | 933 } |
931 } | 934 } |
932 }); | 935 }); |
933 } | 936 } |
934 | 937 |
935 @Override | 938 @Override |
936 public void onPeerConnectionError(final String description) { | 939 public void onPeerConnectionError(final String description) { |
937 reportError(description); | 940 reportError(description); |
938 } | 941 } |
939 } | 942 } |
OLD | NEW |