This source file includes following definitions.
- allocNativeYuvBufferT
- freeNativeYuvBufferT
- rotateNativeYuvBufferT180
- lockSurface
- allocNativeYuvBufferTFromSurfaceHandle
- unlockSurface
package com.example.helloandroidcamera2;
import android.graphics.ImageFormat;
import android.media.Image;
import android.media.Image.Plane;
import android.view.Surface;
import java.nio.ByteBuffer;
public class AndroidBufferUtilities {
private static final String TAG = "AndroidBufferUtilities";
static {
System.loadLibrary("HelloAndroidCamera2");
}
public static native long allocNativeYuvBufferT(int width, int height, ByteBuffer luma,
int lumaRowStride, ByteBuffer chromaU,
ByteBuffer chromaV,
int chromaElementStride,
int chromaRowStride);
public static native boolean freeNativeYuvBufferT(long handle);
public static native boolean rotateNativeYuvBufferT180(long handle);
public static native long lockSurface(Surface surface);
public static native long allocNativeYuvBufferTFromSurfaceHandle(long surfaceHandle);
public static native boolean unlockSurface(long handle);
}