OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2017 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 25 matching lines...) Expand all Loading... |
36 nativeSource, data, data.length, width, height, rotation, timeStamp); | 36 nativeSource, data, data.length, width, height, rotation, timeStamp); |
37 } | 37 } |
38 | 38 |
39 @Override | 39 @Override |
40 public void onTextureFrameCaptured(int width, int height, int oesTextureId, | 40 public void onTextureFrameCaptured(int width, int height, int oesTextureId, |
41 float[] transformMatrix, int rotation, long timestamp) { | 41 float[] transformMatrix, int rotation, long timestamp) { |
42 nativeOnTextureFrameCaptured( | 42 nativeOnTextureFrameCaptured( |
43 nativeSource, width, height, oesTextureId, transformMatrix, rotation, ti
mestamp); | 43 nativeSource, width, height, oesTextureId, transformMatrix, rotation, ti
mestamp); |
44 } | 44 } |
45 | 45 |
| 46 @Override |
| 47 public void onFrameCaptured(VideoFrame frame) { |
| 48 nativeOnFrameCaptured(nativeSource, frame.getBuffer().getWidth(), frame.getB
uffer().getHeight(), |
| 49 frame.getRotation(), frame.getTimestampNs(), frame.getBuffer()); |
| 50 } |
| 51 |
46 private native void nativeCapturerStarted(long nativeSource, boolean success); | 52 private native void nativeCapturerStarted(long nativeSource, boolean success); |
47 private native void nativeCapturerStopped(long nativeSource); | 53 private native void nativeCapturerStopped(long nativeSource); |
48 private native void nativeOnByteBufferFrameCaptured(long nativeSource, byte[]
data, int length, | 54 private native void nativeOnByteBufferFrameCaptured(long nativeSource, byte[]
data, int length, |
49 int width, int height, int rotation, long timeStamp); | 55 int width, int height, int rotation, long timeStamp); |
50 private native void nativeOnTextureFrameCaptured(long nativeSource, int width,
int height, | 56 private native void nativeOnTextureFrameCaptured(long nativeSource, int width,
int height, |
51 int oesTextureId, float[] transformMatrix, int rotation, long timestamp); | 57 int oesTextureId, float[] transformMatrix, int rotation, long timestamp); |
| 58 private native void nativeOnFrameCaptured(long nativeSource, int width, int he
ight, int rotation, |
| 59 long timestampNs, VideoFrame.Buffer frame); |
52 } | 60 } |
OLD | NEW |