OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |