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

Side by Side Diff: talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java

Issue 1460703002: Implement AndroidTextureBuffer::NativeToI420. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix comment nits. 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 public static VideoCapturerAndroid create(String name, 234 public static VideoCapturerAndroid create(String name,
235 CameraEventsHandler eventsHandler, EglBase.Context sharedEglContext) { 235 CameraEventsHandler eventsHandler, EglBase.Context sharedEglContext) {
236 final int cameraId = lookupDeviceName(name); 236 final int cameraId = lookupDeviceName(name);
237 if (cameraId == -1) { 237 if (cameraId == -1) {
238 return null; 238 return null;
239 } 239 }
240 240
241 final VideoCapturerAndroid capturer = new VideoCapturerAndroid(cameraId, eve ntsHandler, 241 final VideoCapturerAndroid capturer = new VideoCapturerAndroid(cameraId, eve ntsHandler,
242 sharedEglContext); 242 sharedEglContext);
243 capturer.setNativeCapturer(nativeCreateVideoCapturer(capturer)); 243 capturer.setNativeCapturer(
244 nativeCreateVideoCapturer(capturer, capturer.surfaceHelper));
244 return capturer; 245 return capturer;
245 } 246 }
246 247
247 public void printStackTrace() { 248 public void printStackTrace() {
248 if (cameraThread != null) { 249 if (cameraThread != null) {
249 StackTraceElement[] cameraStackTraces = cameraThread.getStackTrace(); 250 StackTraceElement[] cameraStackTraces = cameraThread.getStackTrace();
250 if (cameraStackTraces.length > 0) { 251 if (cameraStackTraces.length > 0) {
251 Logging.d(TAG, "VideoCapturerAndroid stacks trace:"); 252 Logging.d(TAG, "VideoCapturerAndroid stacks trace:");
252 for (StackTraceElement stackTrace : cameraStackTraces) { 253 for (StackTraceElement stackTrace : cameraStackTraces) {
253 Logging.d(TAG, stackTrace.toString()); 254 Logging.d(TAG, stackTrace.toString());
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 private native void nativeCapturerStarted(long nativeCapturer, 935 private native void nativeCapturerStarted(long nativeCapturer,
935 boolean success); 936 boolean success);
936 private native void nativeOnByteBufferFrameCaptured(long nativeCapturer, 937 private native void nativeOnByteBufferFrameCaptured(long nativeCapturer,
937 byte[] data, int length, int width, int height, int rotation, long timeS tamp); 938 byte[] data, int length, int width, int height, int rotation, long timeS tamp);
938 private native void nativeOnTextureFrameCaptured(long nativeCapturer, int wi dth, int height, 939 private native void nativeOnTextureFrameCaptured(long nativeCapturer, int wi dth, int height,
939 int oesTextureId, float[] transformMatrix, long timestamp); 940 int oesTextureId, float[] transformMatrix, long timestamp);
940 private native void nativeOnOutputFormatRequest(long nativeCapturer, 941 private native void nativeOnOutputFormatRequest(long nativeCapturer,
941 int width, int height, int framerate); 942 int width, int height, int framerate);
942 } 943 }
943 944
944 private static native long nativeCreateVideoCapturer(VideoCapturerAndroid vide oCapturer); 945 private static native long nativeCreateVideoCapturer(
946 VideoCapturerAndroid videoCapturer,
947 SurfaceTextureHelper surfaceHelper);
945 } 948 }
OLDNEW
« no previous file with comments | « talk/app/webrtc/java/android/org/webrtc/SurfaceTextureHelper.java ('k') | talk/app/webrtc/java/jni/androidvideocapturer_jni.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698