| 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 17 matching lines...) Expand all Loading... |
| 28 import android.view.Window; | 28 import android.view.Window; |
| 29 import android.view.WindowManager; | 29 import android.view.WindowManager; |
| 30 import android.view.WindowManager.LayoutParams; | 30 import android.view.WindowManager.LayoutParams; |
| 31 import android.widget.Toast; | 31 import android.widget.Toast; |
| 32 import java.io.IOException; | 32 import java.io.IOException; |
| 33 import java.lang.RuntimeException; | 33 import java.lang.RuntimeException; |
| 34 import java.util.ArrayList; | 34 import java.util.ArrayList; |
| 35 import java.util.List; | 35 import java.util.List; |
| 36 import org.appspot.apprtc.AppRTCClient.RoomConnectionParameters; | 36 import org.appspot.apprtc.AppRTCClient.RoomConnectionParameters; |
| 37 import org.appspot.apprtc.AppRTCClient.SignalingParameters; | 37 import org.appspot.apprtc.AppRTCClient.SignalingParameters; |
| 38 import org.appspot.apprtc.PeerConnectionClient.DataChannelParameters; |
| 38 import org.appspot.apprtc.PeerConnectionClient.PeerConnectionParameters; | 39 import org.appspot.apprtc.PeerConnectionClient.PeerConnectionParameters; |
| 39 import org.appspot.apprtc.PeerConnectionClient.DataChannelParameters; | |
| 40 import org.webrtc.Camera1Enumerator; | 40 import org.webrtc.Camera1Enumerator; |
| 41 import org.webrtc.Camera2Enumerator; | 41 import org.webrtc.Camera2Enumerator; |
| 42 import org.webrtc.CameraEnumerator; | 42 import org.webrtc.CameraEnumerator; |
| 43 import org.webrtc.EglBase; | 43 import org.webrtc.EglBase; |
| 44 import org.webrtc.FileVideoCapturer; | 44 import org.webrtc.FileVideoCapturer; |
| 45 import org.webrtc.IceCandidate; | 45 import org.webrtc.IceCandidate; |
| 46 import org.webrtc.Logging; | 46 import org.webrtc.Logging; |
| 47 import org.webrtc.PeerConnectionFactory; | 47 import org.webrtc.PeerConnectionFactory; |
| 48 import org.webrtc.RendererCommon.ScalingType; | 48 import org.webrtc.RendererCommon.ScalingType; |
| 49 import org.webrtc.ScreenCapturerAndroid; | 49 import org.webrtc.ScreenCapturerAndroid; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 saveRemoteVideoToFile, videoOutWidth, videoOutHeight, rootEglBase.ge
tEglBaseContext()); | 218 saveRemoteVideoToFile, videoOutWidth, videoOutHeight, rootEglBase.ge
tEglBaseContext()); |
| 219 remoteRenderers.add(videoFileRenderer); | 219 remoteRenderers.add(videoFileRenderer); |
| 220 } catch (IOException e) { | 220 } catch (IOException e) { |
| 221 throw new RuntimeException( | 221 throw new RuntimeException( |
| 222 "Failed to open video file for output: " + saveRemoteVideoToFile, e)
; | 222 "Failed to open video file for output: " + saveRemoteVideoToFile, e)
; |
| 223 } | 223 } |
| 224 } | 224 } |
| 225 remoteRenderScreen.init(rootEglBase.getEglBaseContext(), null); | 225 remoteRenderScreen.init(rootEglBase.getEglBaseContext(), null); |
| 226 | 226 |
| 227 localRender.setZOrderMediaOverlay(true); | 227 localRender.setZOrderMediaOverlay(true); |
| 228 localRender.setEnableHardwareScaler(true /* enabled */); |
| 229 remoteRenderScreen.setEnableHardwareScaler(true /* enabled */); |
| 228 updateVideoView(); | 230 updateVideoView(); |
| 229 | 231 |
| 230 // Check for mandatory permissions. | 232 // Check for mandatory permissions. |
| 231 for (String permission : MANDATORY_PERMISSIONS) { | 233 for (String permission : MANDATORY_PERMISSIONS) { |
| 232 if (checkCallingOrSelfPermission(permission) != PackageManager.PERMISSION_
GRANTED) { | 234 if (checkCallingOrSelfPermission(permission) != PackageManager.PERMISSION_
GRANTED) { |
| 233 logAndToast("Permission " + permission + " is not granted"); | 235 logAndToast("Permission " + permission + " is not granted"); |
| 234 setResult(RESULT_CANCELED); | 236 setResult(RESULT_CANCELED); |
| 235 finish(); | 237 finish(); |
| 236 return; | 238 return; |
| 237 } | 239 } |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 877 } | 879 } |
| 878 } | 880 } |
| 879 }); | 881 }); |
| 880 } | 882 } |
| 881 | 883 |
| 882 @Override | 884 @Override |
| 883 public void onPeerConnectionError(final String description) { | 885 public void onPeerConnectionError(final String description) { |
| 884 reportError(description); | 886 reportError(description); |
| 885 } | 887 } |
| 886 } | 888 } |
| OLD | NEW |