Code example for PixelFormat

    private Camera camera;
    private AndroidVideoCaptureDevice currentDevice = null;
    public ReentrantLock previewBufferLock = new ReentrantLock();
    private int PIXEL_FORMAT = ImageFormat.NV21;
    PixelFormat pixelFormat = new PixelFormat();
    // True when the C++ layer has ordered the camera to be started. 
    private boolean isRunning=false;
    private final int numCaptureBuffers = 3;
    private int expectedFrameSize = 0;
    private int orientation = 0;
    private int id = 0;
    // C++ callback context variable. 
    private long context = 0;
    private SurfaceHolder localPreview = null;
    // True if this class owns the preview video buffers. 
    private boolean ownsBuffers = false;
    // Set this to 2 for VERBOSE logging. 1 for DEBUG 
Contextual code suggestions in your IDE  Get Codota for Java