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

Side by Side Diff: webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java

Issue 1461083002: Use EGL14 if supported on Android (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Changed VideoRendererGui to return an EglBase.Context. Created 5 years 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
« no previous file with comments | « talk/libjingle.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 package org.appspot.apprtc; 11 package org.appspot.apprtc;
12 12
13 import android.content.Context; 13 import android.content.Context;
14 import android.util.Log; 14 import android.util.Log;
15 15
16 import org.appspot.apprtc.AppRTCClient.SignalingParameters; 16 import org.appspot.apprtc.AppRTCClient.SignalingParameters;
17 import org.appspot.apprtc.util.LooperExecutor; 17 import org.appspot.apprtc.util.LooperExecutor;
18 import org.webrtc.CameraEnumerationAndroid; 18 import org.webrtc.CameraEnumerationAndroid;
19 import org.webrtc.DataChannel; 19 import org.webrtc.DataChannel;
20 import org.webrtc.EglBase;
20 import org.webrtc.IceCandidate; 21 import org.webrtc.IceCandidate;
21 import org.webrtc.Logging; 22 import org.webrtc.Logging;
22 import org.webrtc.MediaCodecVideoEncoder; 23 import org.webrtc.MediaCodecVideoEncoder;
23 import org.webrtc.MediaConstraints; 24 import org.webrtc.MediaConstraints;
24 import org.webrtc.MediaConstraints.KeyValuePair; 25 import org.webrtc.MediaConstraints.KeyValuePair;
25 import org.webrtc.MediaStream; 26 import org.webrtc.MediaStream;
26 import org.webrtc.PeerConnection; 27 import org.webrtc.PeerConnection;
27 import org.webrtc.PeerConnection.IceConnectionState; 28 import org.webrtc.PeerConnection.IceConnectionState;
28 import org.webrtc.PeerConnectionFactory; 29 import org.webrtc.PeerConnectionFactory;
29 import org.webrtc.SdpObserver; 30 import org.webrtc.SdpObserver;
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 mediaStream = factory.createLocalMediaStream("ARDAMS"); 459 mediaStream = factory.createLocalMediaStream("ARDAMS");
459 if (videoCallEnabled) { 460 if (videoCallEnabled) {
460 String cameraDeviceName = CameraEnumerationAndroid.getDeviceName(0); 461 String cameraDeviceName = CameraEnumerationAndroid.getDeviceName(0);
461 String frontCameraDeviceName = 462 String frontCameraDeviceName =
462 CameraEnumerationAndroid.getNameOfFrontFacingDevice(); 463 CameraEnumerationAndroid.getNameOfFrontFacingDevice();
463 if (numberOfCameras > 1 && frontCameraDeviceName != null) { 464 if (numberOfCameras > 1 && frontCameraDeviceName != null) {
464 cameraDeviceName = frontCameraDeviceName; 465 cameraDeviceName = frontCameraDeviceName;
465 } 466 }
466 Log.d(TAG, "Opening camera: " + cameraDeviceName); 467 Log.d(TAG, "Opening camera: " + cameraDeviceName);
467 videoCapturer = VideoCapturerAndroid.create(cameraDeviceName, null, 468 videoCapturer = VideoCapturerAndroid.create(cameraDeviceName, null,
468 peerConnectionParameters.captureToTexture ? renderEGLContext : null ); 469 peerConnectionParameters.captureToTexture ? new EglBase.Context(render EGLContext) : null);
469 if (videoCapturer == null) { 470 if (videoCapturer == null) {
470 reportError("Failed to open camera"); 471 reportError("Failed to open camera");
471 return; 472 return;
472 } 473 }
473 mediaStream.addTrack(createVideoTrack(videoCapturer)); 474 mediaStream.addTrack(createVideoTrack(videoCapturer));
474 } 475 }
475 476
476 mediaStream.addTrack(factory.createAudioTrack( 477 mediaStream.addTrack(factory.createAudioTrack(
477 AUDIO_TRACK_ID, 478 AUDIO_TRACK_ID,
478 factory.createAudioSource(audioConstraints))); 479 factory.createAudioSource(audioConstraints)));
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 public void onCreateFailure(final String error) { 1046 public void onCreateFailure(final String error) {
1046 reportError("createSDP error: " + error); 1047 reportError("createSDP error: " + error);
1047 } 1048 }
1048 1049
1049 @Override 1050 @Override
1050 public void onSetFailure(final String error) { 1051 public void onSetFailure(final String error) {
1051 reportError("setSDP error: " + error); 1052 reportError("setSDP error: " + error);
1052 } 1053 }
1053 } 1054 }
1054 } 1055 }
OLDNEW
« no previous file with comments | « talk/libjingle.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698