Revert "Add option to print peer connection factory Java stack traces."

This reverts commit b68c5995d1ac84866da45a4ecbb180d8c704ad90.

Reason for reverting: It breaks some Android32 bots.

TBR=glaznev@google.com

Review URL: https://codereview.webrtc.org/1399473003 .

Cr-Commit-Position: refs/heads/master@{#10239}
This commit is contained in:
Alejandro Luebs
2015-10-09 15:46:09 -07:00
parent b68c5995d1
commit 69ddaefbb3
5 changed files with 22 additions and 89 deletions

View File

@ -35,6 +35,7 @@ import android.opengl.EGLContext;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.SystemClock;
import android.text.StaticLayout;
import android.view.Surface;
import android.view.WindowManager;
@ -216,18 +217,6 @@ public class VideoCapturerAndroid extends VideoCapturer implements PreviewCallba
return capturer;
}
public void printStackTrace() {
if (cameraThread != null) {
StackTraceElement[] cameraStackTraces = cameraThread.getStackTrace();
if (cameraStackTraces.length > 0) {
Logging.d(TAG, "VideoCapturerAndroid stacks trace:");
for (StackTraceElement stackTrace : cameraStackTraces) {
Logging.d(TAG, stackTrace.toString());
}
}
}
}
// Switch camera to the next valid camera id. This can only be called while
// the camera is running.
public void switchCamera(final CameraSwitchHandler handler) {

View File

@ -36,10 +36,12 @@ import javax.microedition.khronos.opengles.GL10;
import android.annotation.SuppressLint;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.SurfaceTexture;
import android.opengl.EGL14;
import android.opengl.EGLContext;
import android.opengl.GLES20;
import android.opengl.GLSurfaceView;
import android.opengl.Matrix;
import org.webrtc.Logging;
import org.webrtc.VideoRenderer.I420Frame;
@ -75,9 +77,6 @@ public class VideoRendererGui implements GLSurfaceView.Renderer {
// Current SDK version.
private static final int CURRENT_SDK_VERSION =
android.os.Build.VERSION.SDK_INT;
// Render and draw threads.
private static Thread renderFrameThread;
private static Thread drawThread;
private VideoRendererGui(GLSurfaceView surface) {
this.surface = surface;
@ -373,9 +372,6 @@ public class VideoRendererGui implements GLSurfaceView.Renderer {
VideoRenderer.renderFrameDone(frame);
return;
}
if (renderFrameThread == null) {
renderFrameThread = Thread.currentThread();
}
if (!seenFrame && rendererEvents != null) {
Logging.d(TAG, "ID: " + id + ". Reporting first rendered frame.");
rendererEvents.onFirstFrameRendered();
@ -398,7 +394,6 @@ public class VideoRendererGui implements GLSurfaceView.Renderer {
// Skip rendering of this frame if previous frame was not rendered yet.
framesDropped++;
VideoRenderer.renderFrameDone(frame);
seenFrame = true;
return;
}
pendingFrame = frame;
@ -435,8 +430,6 @@ public class VideoRendererGui implements GLSurfaceView.Renderer {
}
instance.yuvImageRenderers.clear();
}
renderFrameThread = null;
drawThread = null;
instance.surface = null;
eglContext = null;
eglContextReady = null;
@ -572,26 +565,6 @@ public class VideoRendererGui implements GLSurfaceView.Renderer {
}
}
private static void printStackTrace(Thread thread, String threadName) {
if (thread != null) {
StackTraceElement[] stackTraces = thread.getStackTrace();
if (stackTraces.length > 0) {
Logging.d(TAG, threadName + " stacks trace:");
for (StackTraceElement stackTrace : stackTraces) {
Logging.d(TAG, stackTrace.toString());
}
}
}
}
public static synchronized void printStackTraces() {
if (instance == null) {
return;
}
printStackTrace(renderFrameThread, "Render frame thread");
printStackTrace(drawThread, "Draw thread");
}
@SuppressLint("NewApi")
@Override
public void onSurfaceCreated(GL10 unused, EGLConfig config) {
@ -640,9 +613,6 @@ public class VideoRendererGui implements GLSurfaceView.Renderer {
@Override
public void onDrawFrame(GL10 unused) {
if (drawThread == null) {
drawThread = Thread.currentThread();
}
GLES20.glViewport(0, 0, screenWidth, screenHeight);
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
synchronized (yuvImageRenderers) {