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

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

Issue 1457383002: Implement standalone event tracing in AppRTCDemo. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: readd jitter_buffer trace, rebase 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 side-by-side diff with in-line comments
Download patch
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 1bdbc3b6fc617b851af545ba626b3a2ceffbcdc1..37f371d6f8f2df9d700121733fca97c486e2e216 100644
--- a/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
@@ -128,6 +128,7 @@ public class PeerConnectionClient {
public static class PeerConnectionParameters {
public final boolean videoCallEnabled;
public final boolean loopback;
+ public final boolean tracing;
public final int videoWidth;
public final int videoHeight;
public final int videoFps;
@@ -141,13 +142,14 @@ public class PeerConnectionClient {
public final boolean useOpenSLES;
public PeerConnectionParameters(
- boolean videoCallEnabled, boolean loopback,
+ boolean videoCallEnabled, boolean loopback, boolean tracing,
int videoWidth, int videoHeight, int videoFps, int videoStartBitrate,
String videoCodec, boolean videoCodecHwAcceleration, boolean captureToTexture,
int audioStartBitrate, String audioCodec,
boolean noAudioProcessing, boolean useOpenSLES) {
this.videoCallEnabled = videoCallEnabled;
this.loopback = loopback;
+ this.tracing = tracing;
this.videoWidth = videoWidth;
this.videoHeight = videoHeight;
this.videoFps = videoFps;
@@ -285,6 +287,10 @@ public class PeerConnectionClient {
}
private void createPeerConnectionFactoryInternal(Context context) {
+ PeerConnectionFactory.initializeInternalTracer();
+ if (peerConnectionParameters.tracing) {
+ PeerConnectionFactory.startInternalTracingCapture("/mnt/sdcard/webrtc-trace.txt");
+ }
Log.d(TAG, "Create peer connection factory. Use video: " +
peerConnectionParameters.videoCallEnabled);
isError = false;
@@ -502,6 +508,8 @@ public class PeerConnectionClient {
options = null;
Log.d(TAG, "Closing peer connection done.");
events.onPeerConnectionClosed();
+ PeerConnectionFactory.stopInternalTracingCapture();
+ PeerConnectionFactory.shutdownInternalTracer();
}
public boolean isHDVideo() {

Powered by Google App Engine
This is Rietveld 408576698