diff --git a/README.md b/README.md index 49b518ff..1583a407 100644 --- a/README.md +++ b/README.md @@ -450,6 +450,8 @@ cameraView.addFrameProcessor(new FrameProcessor() { byte[] data = frame.getData(); int rotation = frame.getRotation(); long time = frame.getTime(); + Size size = frame.getSize(); + int format = frame.getFormat(); // Process... } } @@ -469,7 +471,7 @@ apply new data to it. So: |`frame.getTime()`|`long`|The preview timestamp, in `System.currentTimeMillis()` reference.| |`frame.getRotation()`|`int`|The rotation that should be applied to the byte array in order to see what the user sees.| |`frame.getSize()`|`Size`|The frame size, before any rotation is applied, to access data.| -|`frame.getFormat()`|`int`|The frame `ImageFormat`. This will always be `ImageFormat.NV_21` for now.| +|`frame.getFormat()`|`int`|The frame `ImageFormat`. This will always be `ImageFormat.NV21` for now.| |`frame.freeze()`|`Frame`|Clones this frame and makes it immutable. Can be expensive because requires copying the byte array.| |`frame.release()`|`-`|Disposes the content of this frame. Should be used on frozen frames to release memory.| diff --git a/cameraview/src/main/java/com/otaliastudios/cameraview/Frame.java b/cameraview/src/main/java/com/otaliastudios/cameraview/Frame.java index 53542f26..f7bc677c 100644 --- a/cameraview/src/main/java/com/otaliastudios/cameraview/Frame.java +++ b/cameraview/src/main/java/com/otaliastudios/cameraview/Frame.java @@ -95,6 +95,7 @@ public class Frame { /** * Returns the data format, in one of the * {@link android.graphics.ImageFormat} constants. + * This will always be {@link android.graphics.ImageFormat#NV21} for now. * * @return the data format * @see android.graphics.ImageFormat