Index: webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java |
diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java |
index c9c9a51011f1df32d169fcec25d830f30db06e45..13ea8e0dcb59c9072846c4385a0bef97112097c9 100644 |
--- a/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java |
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java |
@@ -36,6 +36,8 @@ import org.webrtc.AudioTrack; |
import org.webrtc.CameraVideoCapturer; |
import org.webrtc.DataChannel; |
import org.webrtc.EglBase; |
+import org.webrtc.HardwareVideoDecoderFactory; |
+import org.webrtc.HardwareVideoEncoderFactory; |
import org.webrtc.IceCandidate; |
import org.webrtc.Logging; |
import org.webrtc.MediaConstraints; |
@@ -338,6 +340,7 @@ public class PeerConnectionClient { |
createPeerConnection( |
localRender, Collections.singletonList(remoteRender), videoCapturer, signalingParameters); |
} |
+ |
public void createPeerConnection(final VideoRenderer.Callbacks localRender, |
final List<VideoRenderer.Callbacks> remoteRenders, final VideoCapturer videoCapturer, |
final SignalingParameters signalingParameters) { |
@@ -508,7 +511,12 @@ public class PeerConnectionClient { |
if (options != null) { |
Log.d(TAG, "Factory networkIgnoreMask option: " + options.networkIgnoreMask); |
} |
- factory = new PeerConnectionFactory(options); |
+ final boolean enableH264HighProfile = |
+ peerConnectionParameters.videoCodec.equals(VIDEO_CODEC_H264_HIGH); |
+ factory = new PeerConnectionFactory(options, |
+ new HardwareVideoEncoderFactory(rootEglBase.getEglBaseContext(), |
+ true /* enableIntelVp8Encoder */, enableH264HighProfile), |
+ new HardwareVideoDecoderFactory(rootEglBase.getEglBaseContext())); |
Log.d(TAG, "Peer connection factory created."); |
} |