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

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

Issue 1471333003: Add support for scaling textures in AndroidVideoCapturer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixed 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
« no previous file with comments | « talk/app/webrtc/androidvideocapturer.cc ('k') | talk/app/webrtc/java/jni/native_handle_impl.h » ('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 * 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 if (handler != null) { 293 if (handler != null) {
294 handler.onCameraSwitchDone( 294 handler.onCameraSwitchDone(
295 info.facing == android.hardware.Camera.CameraInfo.CAMERA_FACING_FR ONT); 295 info.facing == android.hardware.Camera.CameraInfo.CAMERA_FACING_FR ONT);
296 } 296 }
297 } 297 }
298 }); 298 });
299 } 299 }
300 300
301 // Requests a new output format from the video capturer. Captured frames 301 // Requests a new output format from the video capturer. Captured frames
302 // by the camera will be scaled/or dropped by the video capturer. 302 // by the camera will be scaled/or dropped by the video capturer.
303 // It does not matter if width and height are flipped. I.E, |width| = 640, |he ight| = 480 produce
304 // the same result as |width| = 480, |height| = 640.
303 // TODO(magjed/perkj): Document what this function does. Change name? 305 // TODO(magjed/perkj): Document what this function does. Change name?
304 public void onOutputFormatRequest(final int width, final int height, final int framerate) { 306 public void onOutputFormatRequest(final int width, final int height, final int framerate) {
305 cameraThreadHandler.post(new Runnable() { 307 cameraThreadHandler.post(new Runnable() {
306 @Override public void run() { 308 @Override public void run() {
307 onOutputFormatRequestOnCameraThread(width, height, framerate); 309 onOutputFormatRequestOnCameraThread(width, height, framerate);
308 } 310 }
309 }); 311 });
310 } 312 }
311 313
312 // Reconfigure the camera to capture in a new format. This should only be call ed while the camera 314 // Reconfigure the camera to capture in a new format. This should only be call ed while the camera
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 private native void nativeOnByteBufferFrameCaptured(long nativeCapturer, 940 private native void nativeOnByteBufferFrameCaptured(long nativeCapturer,
939 byte[] data, int length, int width, int height, int rotation, long timeS tamp); 941 byte[] data, int length, int width, int height, int rotation, long timeS tamp);
940 private native void nativeOnTextureFrameCaptured(long nativeCapturer, int wi dth, int height, 942 private native void nativeOnTextureFrameCaptured(long nativeCapturer, int wi dth, int height,
941 int oesTextureId, float[] transformMatrix, long timestamp); 943 int oesTextureId, float[] transformMatrix, long timestamp);
942 private native void nativeOnOutputFormatRequest(long nativeCapturer, 944 private native void nativeOnOutputFormatRequest(long nativeCapturer,
943 int width, int height, int framerate); 945 int width, int height, int framerate);
944 } 946 }
945 947
946 private static native long nativeCreateVideoCapturer(VideoCapturerAndroid vide oCapturer); 948 private static native long nativeCreateVideoCapturer(VideoCapturerAndroid vide oCapturer);
947 } 949 }
OLDNEW
« no previous file with comments | « talk/app/webrtc/androidvideocapturer.cc ('k') | talk/app/webrtc/java/jni/native_handle_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698