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:
Magnus Jedvert
2017-11-23 16:56:44 +01:00
committed by Commit Bot
parent aea1d1ad3f
commit 1f2a3e7058
14 changed files with 23 additions and 68 deletions

View File

@ -11,7 +11,6 @@
package org.webrtc;
// Explicit imports necessary for JNI generation.
import org.webrtc.EncodedImage;
import org.webrtc.VideoEncoder;
import java.nio.ByteBuffer;
@ -19,23 +18,6 @@ import java.nio.ByteBuffer;
* This class contains the Java glue code for JNI generation of VideoEncoder.
*/
class VideoEncoderWrapper {
@CalledByNative
static VideoEncoder.Settings createSettings(int numberOfCores, int width, int height,
int startBitrate, int maxFramerate, boolean automaticResizeOn) {
return new VideoEncoder.Settings(
numberOfCores, width, height, startBitrate, maxFramerate, automaticResizeOn);
}
@CalledByNative
static VideoEncoder.EncodeInfo createEncodeInfo(EncodedImage.FrameType[] frameTypes) {
return new VideoEncoder.EncodeInfo(frameTypes);
}
@CalledByNative
static VideoEncoder.BitrateAllocation createBitrateAllocation(int[][] bitratesBbs) {
return new VideoEncoder.BitrateAllocation(bitratesBbs);
}
@CalledByNative
static boolean getScalingSettingsOn(VideoEncoder.ScalingSettings scalingSettings) {
return scalingSettings.on;