diff --git a/cameraview/build.gradle b/cameraview/build.gradle index 29bd2cad..3272c5db 100644 --- a/cameraview/build.gradle +++ b/cameraview/build.gradle @@ -145,7 +145,7 @@ task javadoc(type: Javadoc) { } exclude '**/BuildConfig.java' exclude '**/R.java' - exclude '**/internal/**' + exclude '**/internal/**' // This excludes our internal folder! } task javadocJar(type: Jar, dependsOn: javadoc) { diff --git a/cameraview/src/main/java/com/otaliastudios/cameraview/engine/CameraEngine.java b/cameraview/src/main/java/com/otaliastudios/cameraview/engine/CameraEngine.java index 17bbf096..f07e1048 100644 --- a/cameraview/src/main/java/com/otaliastudios/cameraview/engine/CameraEngine.java +++ b/cameraview/src/main/java/com/otaliastudios/cameraview/engine/CameraEngine.java @@ -1270,6 +1270,9 @@ public abstract class CameraEngine implements * * I could not find the same evidence for videos, but I would say that the same things should * apply, despite the capturing mechanism being different. + * + * @param reference the reference system + * @return the uncropped snapshot size */ @Nullable public final Size getUncroppedSnapshotSize(@NonNull Reference reference) { @@ -1299,6 +1302,8 @@ public abstract class CameraEngine implements * dimensions. * But when it does, the {@link CameraPreview.SurfaceCallback} should be called, * and this should be refreshed. + * + * @return the capture size */ @NonNull @SuppressWarnings("WeakerAccess") diff --git a/cameraview/src/main/java/com/otaliastudios/cameraview/frame/FrameManager.java b/cameraview/src/main/java/com/otaliastudios/cameraview/frame/FrameManager.java index d3f1bcc8..de1b8dd9 100644 --- a/cameraview/src/main/java/com/otaliastudios/cameraview/frame/FrameManager.java +++ b/cameraview/src/main/java/com/otaliastudios/cameraview/frame/FrameManager.java @@ -155,6 +155,11 @@ public class FrameManager { * * In Camera1, this is always respected thanks to its internals. * + * @param data data + * @param time timestamp + * @param rotation rotation + * @param previewSize preview size + * @param previewFormat format * @return a new frame */ @NonNull diff --git a/cameraview/src/main/java/com/otaliastudios/cameraview/picture/PictureRecorder.java b/cameraview/src/main/java/com/otaliastudios/cameraview/picture/PictureRecorder.java index 96fb4882..b296777a 100644 --- a/cameraview/src/main/java/com/otaliastudios/cameraview/picture/PictureRecorder.java +++ b/cameraview/src/main/java/com/otaliastudios/cameraview/picture/PictureRecorder.java @@ -27,7 +27,8 @@ public abstract class PictureRecorder { /** * Picture was taken or there was some error, if * the result is null. - * @param result the result or null if there was some error. + * @param result the result or null if there was some error + * @param error the error or null if there wasn't any */ void onPictureResult(@Nullable PictureResult.Stub result, @Nullable Exception error); } diff --git a/cameraview/src/main/java/com/otaliastudios/cameraview/preview/CameraPreview.java b/cameraview/src/main/java/com/otaliastudios/cameraview/preview/CameraPreview.java index 1f09c94c..fab49ca5 100644 --- a/cameraview/src/main/java/com/otaliastudios/cameraview/preview/CameraPreview.java +++ b/cameraview/src/main/java/com/otaliastudios/cameraview/preview/CameraPreview.java @@ -236,12 +236,14 @@ public abstract class CameraPreview { public void onDestroy() {} /** - * Here we must crop the visible part by applying a > 1 scale to one of our + * Here we must crop the visible part by applying a scale greater than 1 to one of our * dimensions. This way our internal aspect ratio (mOutputSurfaceWidth / mOutputSurfaceHeight) * will match the preview size aspect ratio (mInputStreamWidth / mInputStreamHeight). * * There might still be some absolute difference (e.g. same ratio but bigger / smaller). * However that should be already managed by the framework. + * + * @param op the op */ protected void crop(@NonNull Op op) { // The base implementation does not support cropping. diff --git a/cameraview/src/main/java/com/otaliastudios/cameraview/preview/GlCameraPreview.java b/cameraview/src/main/java/com/otaliastudios/cameraview/preview/GlCameraPreview.java index 5cad6af9..947114e0 100644 --- a/cameraview/src/main/java/com/otaliastudios/cameraview/preview/GlCameraPreview.java +++ b/cameraview/src/main/java/com/otaliastudios/cameraview/preview/GlCameraPreview.java @@ -51,7 +51,7 @@ import javax.microedition.khronos.opengles.GL10; * - The SurfaceTexture has buffers of data of mInputStreamSize * - The SurfaceView hosts a view (and a surface) of size mOutputSurfaceSize. * These are determined by the CameraView.onMeasure method. - * - We have a GL rich texture to be drawn (in the given method & thread). + * - We have a GL rich texture to be drawn (in the given method and thread). * * This class will provide rendering callbacks to anyone who registers a {@link RendererFrameCallback}. * Callbacks are guaranteed to be called on the renderer thread, which means that we can fetch diff --git a/cameraview/src/main/java/com/otaliastudios/cameraview/video/Full2VideoRecorder.java b/cameraview/src/main/java/com/otaliastudios/cameraview/video/Full2VideoRecorder.java index 7369a96e..060c56b0 100644 --- a/cameraview/src/main/java/com/otaliastudios/cameraview/video/Full2VideoRecorder.java +++ b/cameraview/src/main/java/com/otaliastudios/cameraview/video/Full2VideoRecorder.java @@ -65,6 +65,8 @@ public class Full2VideoRecorder extends FullVideoRecorder { /** * This method should be called just once. + * + * @param stub the video stub * @return a surface * @throws PrepareException if prepare went wrong */ diff --git a/cameraview/src/main/java/com/otaliastudios/cameraview/video/VideoRecorder.java b/cameraview/src/main/java/com/otaliastudios/cameraview/video/VideoRecorder.java index 43919e60..08f8870d 100644 --- a/cameraview/src/main/java/com/otaliastudios/cameraview/video/VideoRecorder.java +++ b/cameraview/src/main/java/com/otaliastudios/cameraview/video/VideoRecorder.java @@ -42,6 +42,8 @@ public abstract class VideoRecorder { /** * Starts recording a video. + * + * @param stub the video stub */ public final void start(@NonNull VideoResult.Stub stub) { mResult = stub; diff --git a/cameraview/src/main/java/com/otaliastudios/cameraview/video/encoding/MediaEncoder.java b/cameraview/src/main/java/com/otaliastudios/cameraview/video/encoding/MediaEncoder.java index 71176f3d..2fa7b0f0 100644 --- a/cameraview/src/main/java/com/otaliastudios/cameraview/video/encoding/MediaEncoder.java +++ b/cameraview/src/main/java/com/otaliastudios/cameraview/video/encoding/MediaEncoder.java @@ -196,6 +196,9 @@ abstract class MediaEncoder { /** * Returns a new input buffer and index, waiting at most {@link #INPUT_TIMEOUT_US} if none is available. * Callers should check the boolean result - true if the buffer was filled. + * + * @param holder the input buffer holder + * @return true if acquired */ @SuppressWarnings("WeakerAccess") protected boolean tryAcquireInputBuffer(@NonNull InputBuffer holder) { @@ -215,6 +218,8 @@ abstract class MediaEncoder { /** * Returns a new input buffer and index, waiting indefinitely if none is available. * The buffer should be written into, then the index should be passed to {@link #encodeInputBuffer(InputBuffer)}. + * + * @param holder the input buffer holder */ @SuppressWarnings({"StatementWithEmptyBody", "WeakerAccess"}) protected void acquireInputBuffer(@NonNull InputBuffer holder) { @@ -223,6 +228,8 @@ abstract class MediaEncoder { /** * Encode data into the {@link #mMediaCodec}. + * + * @param buffer the input buffer */ @SuppressWarnings("WeakerAccess") protected void encodeInputBuffer(InputBuffer buffer) { @@ -253,6 +260,8 @@ abstract class MediaEncoder { * If drainAll is not set, this returns after TIMEOUT_USEC if there is no more data to drain. * If drainAll is set, we wait until we see EOS on the output. * Calling this with drainAll set should be done once, right before stopping the muxer. + * + * @param drainAll whether to drain all */ @SuppressLint("LogNotTimber") @SuppressWarnings("WeakerAccess")