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

Side by Side Diff: webrtc/api/java/android/org/webrtc/SurfaceViewRenderer.java

Issue 1817473002: Delete VideoRendererInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « talk/app/webrtc/objc/RTCVideoTrack.mm ('k') | webrtc/api/java/jni/peerconnection_jni.cc » ('j') | 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 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 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
(...skipping 13 matching lines...) Expand all
24 24
25 import java.util.concurrent.CountDownLatch; 25 import java.util.concurrent.CountDownLatch;
26 26
27 import javax.microedition.khronos.egl.EGLContext; 27 import javax.microedition.khronos.egl.EGLContext;
28 28
29 /** 29 /**
30 * Implements org.webrtc.VideoRenderer.Callbacks by displaying the video stream on a SurfaceView. 30 * Implements org.webrtc.VideoRenderer.Callbacks by displaying the video stream on a SurfaceView.
31 * renderFrame() is asynchronous to avoid blocking the calling thread. 31 * renderFrame() is asynchronous to avoid blocking the calling thread.
32 * This class is thread safe and handles access from potentially four different threads: 32 * This class is thread safe and handles access from potentially four different threads:
33 * Interaction from the main app in init, release, setMirror, and setScalingtype . 33 * Interaction from the main app in init, release, setMirror, and setScalingtype .
34 * Interaction from C++ webrtc::VideoRendererInterface in renderFrame and canApp lyRotation. 34 * Interaction from C++ rtc::VideoSinkInterface in renderFrame.
35 * Interaction from the Activity lifecycle in surfaceCreated, surfaceChanged, an d surfaceDestroyed. 35 * Interaction from the Activity lifecycle in surfaceCreated, surfaceChanged, an d surfaceDestroyed.
36 * Interaction with the layout framework in onMeasure and onSizeChanged. 36 * Interaction with the layout framework in onMeasure and onSizeChanged.
37 */ 37 */
38 public class SurfaceViewRenderer extends SurfaceView 38 public class SurfaceViewRenderer extends SurfaceView
39 implements SurfaceHolder.Callback, VideoRenderer.Callbacks { 39 implements SurfaceHolder.Callback, VideoRenderer.Callbacks {
40 private static final String TAG = "SurfaceViewRenderer"; 40 private static final String TAG = "SurfaceViewRenderer";
41 41
42 // Dedicated render thread. 42 // Dedicated render thread.
43 private HandlerThread renderThread; 43 private HandlerThread renderThread;
44 // |renderThreadHandler| is a handler for communicating with |renderThread|, a nd is synchronized 44 // |renderThreadHandler| is a handler for communicating with |renderThread|, a nd is synchronized
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 if (framesReceived > 0 && framesRendered > 0) { 554 if (framesReceived > 0 && framesRendered > 0) {
555 final long timeSinceFirstFrameNs = System.nanoTime() - firstFrameTimeNs; 555 final long timeSinceFirstFrameNs = System.nanoTime() - firstFrameTimeNs;
556 Logging.d(TAG, getResourceName() + "Duration: " + (int) (timeSinceFirstF rameNs / 1e6) + 556 Logging.d(TAG, getResourceName() + "Duration: " + (int) (timeSinceFirstF rameNs / 1e6) +
557 " ms. FPS: " + framesRendered * 1e9 / timeSinceFirstFrameNs); 557 " ms. FPS: " + framesRendered * 1e9 / timeSinceFirstFrameNs);
558 Logging.d(TAG, getResourceName() + "Average render time: " 558 Logging.d(TAG, getResourceName() + "Average render time: "
559 + (int) (renderTimeNs / (1000 * framesRendered)) + " us."); 559 + (int) (renderTimeNs / (1000 * framesRendered)) + " us.");
560 } 560 }
561 } 561 }
562 } 562 }
563 } 563 }
OLDNEW
« no previous file with comments | « talk/app/webrtc/objc/RTCVideoTrack.mm ('k') | webrtc/api/java/jni/peerconnection_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698