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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 import org.webrtc.VideoFileRenderer; | 57 import org.webrtc.VideoFileRenderer; |
58 import org.webrtc.VideoRenderer; | 58 import org.webrtc.VideoRenderer; |
59 | 59 |
60 /** | 60 /** |
61 * Activity for peer connection call setup, call waiting | 61 * Activity for peer connection call setup, call waiting |
62 * and call view. | 62 * and call view. |
63 */ | 63 */ |
64 public class CallActivity extends Activity implements AppRTCClient.SignalingEven
ts, | 64 public class CallActivity extends Activity implements AppRTCClient.SignalingEven
ts, |
65 PeerConnectionClient.PeerC
onnectionEvents, | 65 PeerConnectionClient.PeerC
onnectionEvents, |
66 CallFragment.OnCallEvents
{ | 66 CallFragment.OnCallEvents
{ |
| 67 private static final String TAG = "CallRTCClient"; |
| 68 |
67 // Fix for devices running old Android versions not finding the libraries. | 69 // Fix for devices running old Android versions not finding the libraries. |
68 // https://bugs.chromium.org/p/webrtc/issues/detail?id=6751 | 70 // https://bugs.chromium.org/p/webrtc/issues/detail?id=6751 |
69 static { | 71 static { |
70 System.loadLibrary("c++_shared"); | 72 try { |
71 System.loadLibrary("boringssl.cr"); | 73 System.loadLibrary("c++_shared"); |
72 System.loadLibrary("protobuf_lite.cr"); | 74 System.loadLibrary("boringssl.cr"); |
| 75 System.loadLibrary("protobuf_lite.cr"); |
| 76 } catch (UnsatisfiedLinkError e) { |
| 77 Logging.w(TAG, "Failed to load native dependencies: ", e); |
| 78 } |
73 } | 79 } |
74 | 80 |
75 public static final String EXTRA_ROOMID = "org.appspot.apprtc.ROOMID"; | 81 public static final String EXTRA_ROOMID = "org.appspot.apprtc.ROOMID"; |
76 public static final String EXTRA_LOOPBACK = "org.appspot.apprtc.LOOPBACK"; | 82 public static final String EXTRA_LOOPBACK = "org.appspot.apprtc.LOOPBACK"; |
77 public static final String EXTRA_VIDEO_CALL = "org.appspot.apprtc.VIDEO_CALL"; | 83 public static final String EXTRA_VIDEO_CALL = "org.appspot.apprtc.VIDEO_CALL"; |
78 public static final String EXTRA_SCREENCAPTURE = "org.appspot.apprtc.SCREENCAP
TURE"; | 84 public static final String EXTRA_SCREENCAPTURE = "org.appspot.apprtc.SCREENCAP
TURE"; |
79 public static final String EXTRA_CAMERA2 = "org.appspot.apprtc.CAMERA2"; | 85 public static final String EXTRA_CAMERA2 = "org.appspot.apprtc.CAMERA2"; |
80 public static final String EXTRA_VIDEO_WIDTH = "org.appspot.apprtc.VIDEO_WIDTH
"; | 86 public static final String EXTRA_VIDEO_WIDTH = "org.appspot.apprtc.VIDEO_WIDTH
"; |
81 public static final String EXTRA_VIDEO_HEIGHT = "org.appspot.apprtc.VIDEO_HEIG
HT"; | 87 public static final String EXTRA_VIDEO_HEIGHT = "org.appspot.apprtc.VIDEO_HEIG
HT"; |
82 public static final String EXTRA_VIDEO_FPS = "org.appspot.apprtc.VIDEO_FPS"; | 88 public static final String EXTRA_VIDEO_FPS = "org.appspot.apprtc.VIDEO_FPS"; |
(...skipping 28 matching lines...) Expand all Loading... |
111 public static final String EXTRA_USE_VALUES_FROM_INTENT = | 117 public static final String EXTRA_USE_VALUES_FROM_INTENT = |
112 "org.appspot.apprtc.USE_VALUES_FROM_INTENT"; | 118 "org.appspot.apprtc.USE_VALUES_FROM_INTENT"; |
113 public static final String EXTRA_DATA_CHANNEL_ENABLED = "org.appspot.apprtc.DA
TA_CHANNEL_ENABLED"; | 119 public static final String EXTRA_DATA_CHANNEL_ENABLED = "org.appspot.apprtc.DA
TA_CHANNEL_ENABLED"; |
114 public static final String EXTRA_ORDERED = "org.appspot.apprtc.ORDERED"; | 120 public static final String EXTRA_ORDERED = "org.appspot.apprtc.ORDERED"; |
115 public static final String EXTRA_MAX_RETRANSMITS_MS = "org.appspot.apprtc.MAX_
RETRANSMITS_MS"; | 121 public static final String EXTRA_MAX_RETRANSMITS_MS = "org.appspot.apprtc.MAX_
RETRANSMITS_MS"; |
116 public static final String EXTRA_MAX_RETRANSMITS = "org.appspot.apprtc.MAX_RET
RANSMITS"; | 122 public static final String EXTRA_MAX_RETRANSMITS = "org.appspot.apprtc.MAX_RET
RANSMITS"; |
117 public static final String EXTRA_PROTOCOL = "org.appspot.apprtc.PROTOCOL"; | 123 public static final String EXTRA_PROTOCOL = "org.appspot.apprtc.PROTOCOL"; |
118 public static final String EXTRA_NEGOTIATED = "org.appspot.apprtc.NEGOTIATED"; | 124 public static final String EXTRA_NEGOTIATED = "org.appspot.apprtc.NEGOTIATED"; |
119 public static final String EXTRA_ID = "org.appspot.apprtc.ID"; | 125 public static final String EXTRA_ID = "org.appspot.apprtc.ID"; |
120 | 126 |
121 private static final String TAG = "CallRTCClient"; | |
122 private static final int CAPTURE_PERMISSION_REQUEST_CODE = 1; | 127 private static final int CAPTURE_PERMISSION_REQUEST_CODE = 1; |
123 | 128 |
124 // List of mandatory application permissions. | 129 // List of mandatory application permissions. |
125 private static final String[] MANDATORY_PERMISSIONS = {"android.permission.MOD
IFY_AUDIO_SETTINGS", | 130 private static final String[] MANDATORY_PERMISSIONS = {"android.permission.MOD
IFY_AUDIO_SETTINGS", |
126 "android.permission.RECORD_AUDIO", "android.permission.INTERNET"}; | 131 "android.permission.RECORD_AUDIO", "android.permission.INTERNET"}; |
127 | 132 |
128 // Peer connection statistics callback period in ms. | 133 // Peer connection statistics callback period in ms. |
129 private static final int STAT_CALLBACK_PERIOD = 1000; | 134 private static final int STAT_CALLBACK_PERIOD = 1000; |
130 // Local preview screen position before call is connected. | 135 // Local preview screen position before call is connected. |
131 private static final int LOCAL_X_CONNECTING = 0; | 136 private static final int LOCAL_X_CONNECTING = 0; |
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 } | 903 } |
899 } | 904 } |
900 }); | 905 }); |
901 } | 906 } |
902 | 907 |
903 @Override | 908 @Override |
904 public void onPeerConnectionError(final String description) { | 909 public void onPeerConnectionError(final String description) { |
905 reportError(description); | 910 reportError(description); |
906 } | 911 } |
907 } | 912 } |
OLD | NEW |