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

Side by Side Diff: webrtc/api/android/java/src/org/webrtc/SurfaceTextureHelper.java

Issue 2544563002: Make SurfaceTextureHelper and I420Frame public in Java. (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/api/android/java/src/org/webrtc/VideoRenderer.java » ('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 15 matching lines...) Expand all
26 /** 26 /**
27 * Helper class to create and synchronize access to a SurfaceTexture. The caller will get notified 27 * Helper class to create and synchronize access to a SurfaceTexture. The caller will get notified
28 * of new frames in onTextureFrameAvailable(), and should call returnTextureFram e() when done with 28 * of new frames in onTextureFrameAvailable(), and should call returnTextureFram e() when done with
29 * the frame. Only one texture frame can be in flight at once, so returnTextureF rame() must be 29 * the frame. Only one texture frame can be in flight at once, so returnTextureF rame() must be
30 * called in order to receive a new frame. Call stopListening() to stop receivei ng new frames. Call 30 * called in order to receive a new frame. Call stopListening() to stop receivei ng new frames. Call
31 * dispose to release all resources once the texture frame is returned. 31 * dispose to release all resources once the texture frame is returned.
32 * Note that there is a C++ counter part of this class that optionally can be us ed. It is used for 32 * Note that there is a C++ counter part of this class that optionally can be us ed. It is used for
33 * wrapping texture frames into webrtc::VideoFrames and also handles calling ret urnTextureFrame() 33 * wrapping texture frames into webrtc::VideoFrames and also handles calling ret urnTextureFrame()
34 * when the webrtc::VideoFrame is no longer used. 34 * when the webrtc::VideoFrame is no longer used.
35 */ 35 */
36 class SurfaceTextureHelper { 36 public class SurfaceTextureHelper {
37 private static final String TAG = "SurfaceTextureHelper"; 37 private static final String TAG = "SurfaceTextureHelper";
38 /** 38 /**
39 * Callback interface for being notified that a new texture frame is available . The calls will be 39 * Callback interface for being notified that a new texture frame is available . The calls will be
40 * made on a dedicated thread with a bound EGLContext. The thread will be the same throughout the 40 * made on a dedicated thread with a bound EGLContext. The thread will be the same throughout the
41 * lifetime of the SurfaceTextureHelper instance, but different from the threa d calling the 41 * lifetime of the SurfaceTextureHelper instance, but different from the threa d calling the
42 * SurfaceTextureHelper constructor. The callee is not allowed to make another EGLContext current 42 * SurfaceTextureHelper constructor. The callee is not allowed to make another EGLContext current
43 * on the calling thread. 43 * on the calling thread.
44 */ 44 */
45 public interface OnTextureFrameAvailableListener { 45 public interface OnTextureFrameAvailableListener {
46 abstract void onTextureFrameAvailable( 46 abstract void onTextureFrameAvailable(
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 } 274 }
275 if (yuvConverter != null) { 275 if (yuvConverter != null) {
276 yuvConverter.release(); 276 yuvConverter.release();
277 } 277 }
278 GLES20.glDeleteTextures(1, new int[] {oesTextureId}, 0); 278 GLES20.glDeleteTextures(1, new int[] {oesTextureId}, 0);
279 surfaceTexture.release(); 279 surfaceTexture.release();
280 eglBase.release(); 280 eglBase.release();
281 handler.getLooper().quit(); 281 handler.getLooper().quit();
282 } 282 }
283 } 283 }
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/android/java/src/org/webrtc/VideoRenderer.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698