Remove internal/utils

egloo2
Mattia Iavarone 5 years ago
parent 8bad417cf2
commit b3a46ac9f5
  1. 3
      cameraview/src/androidTest/java/com/otaliastudios/cameraview/engine/CameraIntegrationTest.java
  2. 1
      cameraview/src/androidTest/java/com/otaliastudios/cameraview/internal/utils/CamcorderProfilesTest.java
  3. 1
      cameraview/src/androidTest/java/com/otaliastudios/cameraview/internal/utils/CropHelperTest.java
  4. 1
      cameraview/src/androidTest/java/com/otaliastudios/cameraview/internal/utils/OrientationHelperTest.java
  5. 1
      cameraview/src/androidTest/java/com/otaliastudios/cameraview/internal/utils/RotationHelperTest.java
  6. 1
      cameraview/src/androidTest/java/com/otaliastudios/cameraview/internal/utils/WorkerHandlerTest.java
  7. 15
      cameraview/src/main/java/com/otaliastudios/cameraview/CameraOptions.java
  8. 4
      cameraview/src/main/java/com/otaliastudios/cameraview/CameraUtils.java
  9. 4
      cameraview/src/main/java/com/otaliastudios/cameraview/CameraView.java
  10. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/engine/Camera1Engine.java
  11. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/engine/Camera2Engine.java
  12. 3
      cameraview/src/main/java/com/otaliastudios/cameraview/engine/CameraEngine.java
  13. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/engine/options/Camera1Options.java
  14. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/engine/options/Camera2Options.java
  15. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/engine/orchestrator/CameraOrchestrator.java
  16. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/internal/CamcorderProfiles.java
  17. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/internal/CropHelper.java
  18. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/internal/ExifHelper.java
  19. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/internal/OrientationHelper.java
  20. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/internal/Pool.java
  21. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/internal/RotationHelper.java
  22. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/internal/WorkerHandler.java
  23. 3
      cameraview/src/main/java/com/otaliastudios/cameraview/picture/Full1PictureRecorder.java
  24. 4
      cameraview/src/main/java/com/otaliastudios/cameraview/picture/Full2PictureRecorder.java
  25. 6
      cameraview/src/main/java/com/otaliastudios/cameraview/picture/Snapshot1PictureRecorder.java
  26. 4
      cameraview/src/main/java/com/otaliastudios/cameraview/picture/SnapshotGlPictureRecorder.java
  27. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/video/Full1VideoRecorder.java
  28. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/video/Full2VideoRecorder.java
  29. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/video/FullVideoRecorder.java
  30. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/video/encoding/ByteBufferPool.java
  31. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/video/encoding/InputBufferPool.java
  32. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/video/encoding/MediaEncoder.java
  33. 3
      cameraview/src/main/java/com/otaliastudios/cameraview/video/encoding/MediaEncoderEngine.java
  34. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/video/encoding/OutputBufferPool.java
  35. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/video/encoding/TextureMediaEncoder.java
  36. 2
      cameraview/src/test/java/com/otaliastudios/cameraview/internal/utils/ExifHelperTest.java
  37. 2
      cameraview/src/test/java/com/otaliastudios/cameraview/internal/utils/PoolTest.java

@ -31,7 +31,7 @@ import com.otaliastudios.cameraview.frame.FrameProcessor;
import com.otaliastudios.cameraview.size.SizeSelectors;
import com.otaliastudios.cameraview.tools.Emulator;
import com.otaliastudios.cameraview.tools.Op;
import com.otaliastudios.cameraview.internal.utils.WorkerHandler;
import com.otaliastudios.cameraview.internal.WorkerHandler;
import com.otaliastudios.cameraview.overlay.Overlay;
import com.otaliastudios.cameraview.size.Size;
import com.otaliastudios.cameraview.tools.Retry;
@ -45,7 +45,6 @@ import androidx.test.rule.GrantPermissionRule;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.mockito.ArgumentMatcher;

@ -8,6 +8,7 @@ import androidx.test.filters.SmallTest;
import com.otaliastudios.cameraview.BaseTest;
import com.otaliastudios.cameraview.CameraUtils;
import com.otaliastudios.cameraview.internal.CamcorderProfiles;
import com.otaliastudios.cameraview.tools.SdkExclude;
import com.otaliastudios.cameraview.size.Size;

@ -4,6 +4,7 @@ package com.otaliastudios.cameraview.internal.utils;
import android.graphics.Rect;
import com.otaliastudios.cameraview.BaseTest;
import com.otaliastudios.cameraview.internal.CropHelper;
import com.otaliastudios.cameraview.size.AspectRatio;
import com.otaliastudios.cameraview.size.Size;

@ -6,6 +6,7 @@ import androidx.test.filters.SmallTest;
import android.view.OrientationEventListener;
import com.otaliastudios.cameraview.BaseTest;
import com.otaliastudios.cameraview.internal.OrientationHelper;
import org.junit.After;
import org.junit.Before;

@ -8,6 +8,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
import com.otaliastudios.cameraview.BaseTest;
import com.otaliastudios.cameraview.internal.RotationHelper;
import com.otaliastudios.cameraview.size.Size;
import org.junit.Test;

@ -4,6 +4,7 @@ package com.otaliastudios.cameraview.internal.utils;
import com.google.android.gms.tasks.Task;
import com.google.android.gms.tasks.Tasks;
import com.otaliastudios.cameraview.BaseTest;
import com.otaliastudios.cameraview.internal.WorkerHandler;
import com.otaliastudios.cameraview.tools.Op;
import androidx.annotation.NonNull;

@ -2,16 +2,6 @@ package com.otaliastudios.cameraview;
import android.graphics.ImageFormat;
import android.hardware.Camera;
import android.hardware.camera2.CameraAccessException;
import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CameraManager;
import android.hardware.camera2.params.StreamConfigurationMap;
import android.media.CamcorderProfile;
import android.media.MediaRecorder;
import android.os.Build;
import android.util.Range;
import android.util.Rational;
import com.otaliastudios.cameraview.controls.Audio;
import com.otaliastudios.cameraview.controls.Control;
@ -20,26 +10,21 @@ import com.otaliastudios.cameraview.controls.Facing;
import com.otaliastudios.cameraview.controls.Flash;
import com.otaliastudios.cameraview.controls.PictureFormat;
import com.otaliastudios.cameraview.controls.Preview;
import com.otaliastudios.cameraview.engine.mappers.Camera1Mapper;
import com.otaliastudios.cameraview.engine.mappers.Camera2Mapper;
import com.otaliastudios.cameraview.gesture.GestureAction;
import com.otaliastudios.cameraview.controls.Grid;
import com.otaliastudios.cameraview.controls.Hdr;
import com.otaliastudios.cameraview.controls.Mode;
import com.otaliastudios.cameraview.controls.VideoCodec;
import com.otaliastudios.cameraview.controls.WhiteBalance;
import com.otaliastudios.cameraview.internal.utils.CamcorderProfiles;
import com.otaliastudios.cameraview.size.AspectRatio;
import com.otaliastudios.cameraview.size.Size;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**

@ -11,8 +11,8 @@ import android.os.Handler;
import com.otaliastudios.cameraview.controls.Facing;
import com.otaliastudios.cameraview.engine.mappers.Camera1Mapper;
import com.otaliastudios.cameraview.internal.utils.ExifHelper;
import com.otaliastudios.cameraview.internal.utils.WorkerHandler;
import com.otaliastudios.cameraview.internal.ExifHelper;
import com.otaliastudios.cameraview.internal.WorkerHandler;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

@ -66,8 +66,8 @@ import com.otaliastudios.cameraview.gesture.PinchGestureFinder;
import com.otaliastudios.cameraview.gesture.ScrollGestureFinder;
import com.otaliastudios.cameraview.gesture.TapGestureFinder;
import com.otaliastudios.cameraview.internal.GridLinesLayout;
import com.otaliastudios.cameraview.internal.utils.CropHelper;
import com.otaliastudios.cameraview.internal.utils.OrientationHelper;
import com.otaliastudios.cameraview.internal.CropHelper;
import com.otaliastudios.cameraview.internal.OrientationHelper;
import com.otaliastudios.cameraview.markers.AutoFocusMarker;
import com.otaliastudios.cameraview.markers.AutoFocusTrigger;
import com.otaliastudios.cameraview.markers.MarkerLayout;

@ -37,7 +37,7 @@ import com.otaliastudios.cameraview.gesture.Gesture;
import com.otaliastudios.cameraview.controls.Hdr;
import com.otaliastudios.cameraview.controls.Mode;
import com.otaliastudios.cameraview.controls.WhiteBalance;
import com.otaliastudios.cameraview.internal.utils.CropHelper;
import com.otaliastudios.cameraview.internal.CropHelper;
import com.otaliastudios.cameraview.metering.MeteringRegions;
import com.otaliastudios.cameraview.metering.MeteringTransform;
import com.otaliastudios.cameraview.picture.Full1PictureRecorder;

@ -60,7 +60,7 @@ import com.otaliastudios.cameraview.frame.Frame;
import com.otaliastudios.cameraview.frame.FrameManager;
import com.otaliastudios.cameraview.frame.ImageFrameManager;
import com.otaliastudios.cameraview.gesture.Gesture;
import com.otaliastudios.cameraview.internal.utils.CropHelper;
import com.otaliastudios.cameraview.internal.CropHelper;
import com.otaliastudios.cameraview.metering.MeteringRegions;
import com.otaliastudios.cameraview.picture.Full2PictureRecorder;
import com.otaliastudios.cameraview.picture.Snapshot2PictureRecorder;

@ -2,7 +2,6 @@ package com.otaliastudios.cameraview.engine;
import android.content.Context;
import android.graphics.PointF;
import android.graphics.RectF;
import android.location.Location;
@ -29,7 +28,7 @@ import com.otaliastudios.cameraview.engine.offset.Angles;
import com.otaliastudios.cameraview.engine.offset.Reference;
import com.otaliastudios.cameraview.frame.Frame;
import com.otaliastudios.cameraview.frame.FrameManager;
import com.otaliastudios.cameraview.internal.utils.WorkerHandler;
import com.otaliastudios.cameraview.internal.WorkerHandler;
import com.otaliastudios.cameraview.picture.PictureRecorder;
import com.otaliastudios.cameraview.preview.CameraPreview;
import com.otaliastudios.cameraview.controls.Audio;

@ -13,7 +13,7 @@ import com.otaliastudios.cameraview.controls.Hdr;
import com.otaliastudios.cameraview.controls.PictureFormat;
import com.otaliastudios.cameraview.controls.WhiteBalance;
import com.otaliastudios.cameraview.engine.mappers.Camera1Mapper;
import com.otaliastudios.cameraview.internal.utils.CamcorderProfiles;
import com.otaliastudios.cameraview.internal.CamcorderProfiles;
import com.otaliastudios.cameraview.size.AspectRatio;
import com.otaliastudios.cameraview.size.Size;

@ -21,7 +21,7 @@ import com.otaliastudios.cameraview.controls.Hdr;
import com.otaliastudios.cameraview.controls.PictureFormat;
import com.otaliastudios.cameraview.controls.WhiteBalance;
import com.otaliastudios.cameraview.engine.mappers.Camera2Mapper;
import com.otaliastudios.cameraview.internal.utils.CamcorderProfiles;
import com.otaliastudios.cameraview.internal.CamcorderProfiles;
import com.otaliastudios.cameraview.size.AspectRatio;
import com.otaliastudios.cameraview.size.Size;

@ -8,7 +8,7 @@ import com.google.android.gms.tasks.Task;
import com.google.android.gms.tasks.TaskCompletionSource;
import com.google.android.gms.tasks.Tasks;
import com.otaliastudios.cameraview.CameraLogger;
import com.otaliastudios.cameraview.internal.utils.WorkerHandler;
import com.otaliastudios.cameraview.internal.WorkerHandler;
import java.util.ArrayDeque;
import java.util.ArrayList;

@ -1,4 +1,4 @@
package com.otaliastudios.cameraview.internal.utils;
package com.otaliastudios.cameraview.internal;
import android.annotation.SuppressLint;
import android.media.CamcorderProfile;

@ -1,4 +1,4 @@
package com.otaliastudios.cameraview.internal.utils;
package com.otaliastudios.cameraview.internal;
import android.graphics.Rect;

@ -1,4 +1,4 @@
package com.otaliastudios.cameraview.internal.utils;
package com.otaliastudios.cameraview.internal;
import androidx.exifinterface.media.ExifInterface;

@ -1,4 +1,4 @@
package com.otaliastudios.cameraview.internal.utils;
package com.otaliastudios.cameraview.internal;
import android.content.Context;
import android.hardware.SensorManager;

@ -1,4 +1,4 @@
package com.otaliastudios.cameraview.internal.utils;
package com.otaliastudios.cameraview.internal;
import com.otaliastudios.cameraview.CameraLogger;

@ -1,4 +1,4 @@
package com.otaliastudios.cameraview.internal.utils;
package com.otaliastudios.cameraview.internal;
import com.otaliastudios.cameraview.size.Size;

@ -1,4 +1,4 @@
package com.otaliastudios.cameraview.internal.utils;
package com.otaliastudios.cameraview.internal;
import android.os.Handler;
import android.os.HandlerThread;

@ -4,10 +4,9 @@ import android.hardware.Camera;
import com.otaliastudios.cameraview.PictureResult;
import com.otaliastudios.cameraview.engine.Camera1Engine;
import com.otaliastudios.cameraview.internal.utils.ExifHelper;
import com.otaliastudios.cameraview.internal.ExifHelper;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.exifinterface.media.ExifInterface;
import java.io.ByteArrayInputStream;

@ -15,8 +15,8 @@ import com.otaliastudios.cameraview.engine.Camera2Engine;
import com.otaliastudios.cameraview.engine.action.Action;
import com.otaliastudios.cameraview.engine.action.ActionHolder;
import com.otaliastudios.cameraview.engine.action.BaseAction;
import com.otaliastudios.cameraview.internal.utils.ExifHelper;
import com.otaliastudios.cameraview.internal.utils.WorkerHandler;
import com.otaliastudios.cameraview.internal.ExifHelper;
import com.otaliastudios.cameraview.internal.WorkerHandler;
import java.io.BufferedOutputStream;
import java.io.ByteArrayInputStream;

@ -7,9 +7,9 @@ import android.hardware.Camera;
import com.otaliastudios.cameraview.PictureResult;
import com.otaliastudios.cameraview.engine.Camera1Engine;
import com.otaliastudios.cameraview.engine.offset.Reference;
import com.otaliastudios.cameraview.internal.utils.CropHelper;
import com.otaliastudios.cameraview.internal.utils.RotationHelper;
import com.otaliastudios.cameraview.internal.utils.WorkerHandler;
import com.otaliastudios.cameraview.internal.CropHelper;
import com.otaliastudios.cameraview.internal.RotationHelper;
import com.otaliastudios.cameraview.internal.WorkerHandler;
import com.otaliastudios.cameraview.size.AspectRatio;
import com.otaliastudios.cameraview.size.Size;

@ -19,8 +19,8 @@ import com.otaliastudios.cameraview.engine.offset.Reference;
import com.otaliastudios.cameraview.internal.egl.EglCore;
import com.otaliastudios.cameraview.internal.egl.EglViewport;
import com.otaliastudios.cameraview.internal.egl.EglWindowSurface;
import com.otaliastudios.cameraview.internal.utils.CropHelper;
import com.otaliastudios.cameraview.internal.utils.WorkerHandler;
import com.otaliastudios.cameraview.internal.CropHelper;
import com.otaliastudios.cameraview.internal.WorkerHandler;
import com.otaliastudios.cameraview.overlay.OverlayDrawer;
import com.otaliastudios.cameraview.preview.GlCameraPreview;
import com.otaliastudios.cameraview.preview.RendererFrameCallback;

@ -6,7 +6,7 @@ import android.media.MediaRecorder;
import com.otaliastudios.cameraview.VideoResult;
import com.otaliastudios.cameraview.engine.Camera1Engine;
import com.otaliastudios.cameraview.internal.utils.CamcorderProfiles;
import com.otaliastudios.cameraview.internal.CamcorderProfiles;
import com.otaliastudios.cameraview.size.Size;
import androidx.annotation.NonNull;

@ -12,7 +12,7 @@ import com.otaliastudios.cameraview.engine.action.Action;
import com.otaliastudios.cameraview.engine.action.ActionHolder;
import com.otaliastudios.cameraview.engine.action.BaseAction;
import com.otaliastudios.cameraview.engine.action.CompletionCallback;
import com.otaliastudios.cameraview.internal.utils.CamcorderProfiles;
import com.otaliastudios.cameraview.internal.CamcorderProfiles;
import com.otaliastudios.cameraview.size.Size;
import androidx.annotation.NonNull;

@ -8,7 +8,7 @@ import com.otaliastudios.cameraview.VideoResult;
import com.otaliastudios.cameraview.controls.Audio;
import com.otaliastudios.cameraview.controls.VideoCodec;
import com.otaliastudios.cameraview.internal.DeviceEncoders;
import com.otaliastudios.cameraview.internal.utils.CamcorderProfiles;
import com.otaliastudios.cameraview.internal.CamcorderProfiles;
import com.otaliastudios.cameraview.size.Size;
import androidx.annotation.NonNull;

@ -1,6 +1,6 @@
package com.otaliastudios.cameraview.video.encoding;
import com.otaliastudios.cameraview.internal.utils.Pool;
import com.otaliastudios.cameraview.internal.Pool;
import java.nio.ByteBuffer;

@ -1,6 +1,6 @@
package com.otaliastudios.cameraview.video.encoding;
import com.otaliastudios.cameraview.internal.utils.Pool;
import com.otaliastudios.cameraview.internal.Pool;
/**
* A simple {@link Pool(int, Factory)} implementation for input buffers.

@ -11,7 +11,7 @@ import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import com.otaliastudios.cameraview.CameraLogger;
import com.otaliastudios.cameraview.internal.utils.WorkerHandler;
import com.otaliastudios.cameraview.internal.WorkerHandler;
import java.nio.ByteBuffer;
import java.util.HashMap;

@ -4,10 +4,9 @@ import android.annotation.SuppressLint;
import android.media.MediaFormat;
import android.media.MediaMuxer;
import android.os.Build;
import android.text.format.DateFormat;
import com.otaliastudios.cameraview.CameraLogger;
import com.otaliastudios.cameraview.internal.utils.WorkerHandler;
import com.otaliastudios.cameraview.internal.WorkerHandler;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

@ -3,7 +3,7 @@ package com.otaliastudios.cameraview.video.encoding;
import android.media.MediaCodec;
import android.os.Build;
import com.otaliastudios.cameraview.internal.utils.Pool;
import com.otaliastudios.cameraview.internal.Pool;
import androidx.annotation.RequiresApi;

@ -13,7 +13,7 @@ import com.otaliastudios.cameraview.filter.Filter;
import com.otaliastudios.cameraview.internal.egl.EglCore;
import com.otaliastudios.cameraview.internal.egl.EglViewport;
import com.otaliastudios.cameraview.internal.egl.EglWindowSurface;
import com.otaliastudios.cameraview.internal.utils.Pool;
import com.otaliastudios.cameraview.internal.Pool;
/**
* Default implementation for video encoding.

@ -3,6 +3,8 @@ package com.otaliastudios.cameraview.internal.utils;
import androidx.exifinterface.media.ExifInterface;
import com.otaliastudios.cameraview.internal.ExifHelper;
import org.junit.Test;
import static junit.framework.Assert.assertNotNull;

@ -1,6 +1,8 @@
package com.otaliastudios.cameraview.internal.utils;
import com.otaliastudios.cameraview.internal.Pool;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

Loading…
Cancel
Save