Android: Clean up JNI generated code
It's now possible to generate JNI code for constructors and enums correctly. This CL cleans that up. Bug: webrtc:8278,webrtc:8551,webrtc:8556 Change-Id: I2284a30139cbb186c80713eb6113eda5659c16ad Reviewed-on: https://webrtc-review.googlesource.com/25622 Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20860}
This commit is contained in:

committed by
Commit Bot

parent
aea1d1ad3f
commit
1f2a3e7058
@ -121,6 +121,7 @@ public class VideoFrame {
|
||||
private final int rotation;
|
||||
private final long timestampNs;
|
||||
|
||||
@CalledByNative
|
||||
public VideoFrame(Buffer buffer, int rotation, long timestampNs) {
|
||||
if (buffer == null) {
|
||||
throw new IllegalArgumentException("buffer not allowed to be null");
|
||||
@ -206,12 +207,6 @@ public class VideoFrame {
|
||||
return newBuffer;
|
||||
}
|
||||
|
||||
// TODO(bugs.webrtc.org/8278): Add a way to generate JNI code for constructors directly.
|
||||
@CalledByNative
|
||||
static VideoFrame create(Buffer buffer, int rotation, long timestampNs) {
|
||||
return new VideoFrame(buffer, rotation, timestampNs);
|
||||
}
|
||||
|
||||
private static native void cropAndScaleI420Native(ByteBuffer srcY, int srcStrideY,
|
||||
ByteBuffer srcU, int srcStrideU, ByteBuffer srcV, int srcStrideV, int cropX, int cropY,
|
||||
int cropWidth, int cropHeight, ByteBuffer dstY, int dstStrideY, ByteBuffer dstU,
|
||||
|
Reference in New Issue
Block a user