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

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

Issue 3002783002: Android: Use injectable hardware video decoder in AppRTCMobile.
Patch Set: Rebase Created 3 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/sdk/android/src/jni/videoencoderwrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.");
}
« no previous file with comments | « no previous file | webrtc/sdk/android/src/jni/videoencoderwrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698