Fix javadocs

pull/495/head
Mattia Iavarone 6 years ago
parent ab90bf0f51
commit 9fb1bf6bc1
  1. 2
      cameraview/build.gradle
  2. 5
      cameraview/src/main/java/com/otaliastudios/cameraview/engine/CameraEngine.java
  3. 5
      cameraview/src/main/java/com/otaliastudios/cameraview/frame/FrameManager.java
  4. 3
      cameraview/src/main/java/com/otaliastudios/cameraview/picture/PictureRecorder.java
  5. 4
      cameraview/src/main/java/com/otaliastudios/cameraview/preview/CameraPreview.java
  6. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/preview/GlCameraPreview.java
  7. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/video/Full2VideoRecorder.java
  8. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/video/VideoRecorder.java
  9. 9
      cameraview/src/main/java/com/otaliastudios/cameraview/video/encoding/MediaEncoder.java

@ -145,7 +145,7 @@ task javadoc(type: Javadoc) {
} }
exclude '**/BuildConfig.java' exclude '**/BuildConfig.java'
exclude '**/R.java' exclude '**/R.java'
exclude '**/internal/**' exclude '**/internal/**' // This excludes our internal folder!
} }
task javadocJar(type: Jar, dependsOn: javadoc) { task javadocJar(type: Jar, dependsOn: javadoc) {

@ -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 * 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. * apply, despite the capturing mechanism being different.
*
* @param reference the reference system
* @return the uncropped snapshot size
*/ */
@Nullable @Nullable
public final Size getUncroppedSnapshotSize(@NonNull Reference reference) { public final Size getUncroppedSnapshotSize(@NonNull Reference reference) {
@ -1299,6 +1302,8 @@ public abstract class CameraEngine implements
* dimensions. * dimensions.
* But when it does, the {@link CameraPreview.SurfaceCallback} should be called, * But when it does, the {@link CameraPreview.SurfaceCallback} should be called,
* and this should be refreshed. * and this should be refreshed.
*
* @return the capture size
*/ */
@NonNull @NonNull
@SuppressWarnings("WeakerAccess") @SuppressWarnings("WeakerAccess")

@ -155,6 +155,11 @@ public class FrameManager {
* *
* In Camera1, this is always respected thanks to its internals. * 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 * @return a new frame
*/ */
@NonNull @NonNull

@ -27,7 +27,8 @@ public abstract class PictureRecorder {
/** /**
* Picture was taken or there was some error, if * Picture was taken or there was some error, if
* the result is null. * 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); void onPictureResult(@Nullable PictureResult.Stub result, @Nullable Exception error);
} }

@ -236,12 +236,14 @@ public abstract class CameraPreview<T extends View, Output> {
public void onDestroy() {} 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) * dimensions. This way our internal aspect ratio (mOutputSurfaceWidth / mOutputSurfaceHeight)
* will match the preview size aspect ratio (mInputStreamWidth / mInputStreamHeight). * will match the preview size aspect ratio (mInputStreamWidth / mInputStreamHeight).
* *
* There might still be some absolute difference (e.g. same ratio but bigger / smaller). * There might still be some absolute difference (e.g. same ratio but bigger / smaller).
* However that should be already managed by the framework. * However that should be already managed by the framework.
*
* @param op the op
*/ */
protected void crop(@NonNull Op<Void> op) { protected void crop(@NonNull Op<Void> op) {
// The base implementation does not support cropping. // The base implementation does not support cropping.

@ -51,7 +51,7 @@ import javax.microedition.khronos.opengles.GL10;
* - The SurfaceTexture has buffers of data of mInputStreamSize * - The SurfaceTexture has buffers of data of mInputStreamSize
* - The SurfaceView hosts a view (and a surface) of size mOutputSurfaceSize. * - The SurfaceView hosts a view (and a surface) of size mOutputSurfaceSize.
* These are determined by the CameraView.onMeasure method. * 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}. * 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 * Callbacks are guaranteed to be called on the renderer thread, which means that we can fetch

@ -65,6 +65,8 @@ public class Full2VideoRecorder extends FullVideoRecorder {
/** /**
* This method should be called just once. * This method should be called just once.
*
* @param stub the video stub
* @return a surface * @return a surface
* @throws PrepareException if prepare went wrong * @throws PrepareException if prepare went wrong
*/ */

@ -42,6 +42,8 @@ public abstract class VideoRecorder {
/** /**
* Starts recording a video. * Starts recording a video.
*
* @param stub the video stub
*/ */
public final void start(@NonNull VideoResult.Stub stub) { public final void start(@NonNull VideoResult.Stub stub) {
mResult = stub; mResult = stub;

@ -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. * 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. * Callers should check the boolean result - true if the buffer was filled.
*
* @param holder the input buffer holder
* @return true if acquired
*/ */
@SuppressWarnings("WeakerAccess") @SuppressWarnings("WeakerAccess")
protected boolean tryAcquireInputBuffer(@NonNull InputBuffer holder) { 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. * 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)}. * 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"}) @SuppressWarnings({"StatementWithEmptyBody", "WeakerAccess"})
protected void acquireInputBuffer(@NonNull InputBuffer holder) { protected void acquireInputBuffer(@NonNull InputBuffer holder) {
@ -223,6 +228,8 @@ abstract class MediaEncoder {
/** /**
* Encode data into the {@link #mMediaCodec}. * Encode data into the {@link #mMediaCodec}.
*
* @param buffer the input buffer
*/ */
@SuppressWarnings("WeakerAccess") @SuppressWarnings("WeakerAccess")
protected void encodeInputBuffer(InputBuffer buffer) { 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 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. * 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. * Calling this with drainAll set should be done once, right before stopping the muxer.
*
* @param drainAll whether to drain all
*/ */
@SuppressLint("LogNotTimber") @SuppressLint("LogNotTimber")
@SuppressWarnings("WeakerAccess") @SuppressWarnings("WeakerAccess")

Loading…
Cancel
Save