diff --git a/README.md b/README.md index 53c2b1ee..c605167c 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ For now, you must clone the repo and add it to your project. To use CameraView engine, simply add a `CameraView` to your layout: ```xml - ``` @@ -202,7 +202,7 @@ This means that the whole preview is visible, and the image output matches what You can emulate a **center crop** behavior by setting both dimensions to fixed values or to `MATCH_PARENT`. The camera view will fill the rect. If your dimensions don't match the aspect ratio of the internal preview surface, the surface will be cropped to fill the view, just like `android:scaleType="centerCrop"` on an `ImageView`. ```xml - ``` @@ -212,7 +212,7 @@ This means that part of the preview is hidden, and the image output will contain ## XML Attributes ```xml - + package="com.otaliastudios.cameraview"> diff --git a/camerakit/src/main/java/com/flurgle/camerakit/AspectRatio.java b/camerakit/src/main/java/com/otaliastudios/cameraview/AspectRatio.java similarity index 98% rename from camerakit/src/main/java/com/flurgle/camerakit/AspectRatio.java rename to camerakit/src/main/java/com/otaliastudios/cameraview/AspectRatio.java index 21883458..0a1a176f 100644 --- a/camerakit/src/main/java/com/flurgle/camerakit/AspectRatio.java +++ b/camerakit/src/main/java/com/otaliastudios/cameraview/AspectRatio.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.os.Parcel; import android.os.Parcelable; diff --git a/camerakit/src/main/java/com/flurgle/camerakit/Camera1.java b/camerakit/src/main/java/com/otaliastudios/cameraview/Camera1.java similarity index 98% rename from camerakit/src/main/java/com/flurgle/camerakit/Camera1.java rename to camerakit/src/main/java/com/otaliastudios/cameraview/Camera1.java index dabdeeff..b0883904 100644 --- a/camerakit/src/main/java/com/flurgle/camerakit/Camera1.java +++ b/camerakit/src/main/java/com/otaliastudios/cameraview/Camera1.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.graphics.Rect; import android.graphics.YuvImage; @@ -18,12 +18,12 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import static com.flurgle.camerakit.CameraConstants.FOCUS_CONTINUOUS; -import static com.flurgle.camerakit.CameraConstants.FOCUS_FIXED; -import static com.flurgle.camerakit.CameraConstants.FOCUS_TAP; -import static com.flurgle.camerakit.CameraConstants.FOCUS_TAP_WITH_MARKER; -import static com.flurgle.camerakit.CameraConstants.SESSION_TYPE_PICTURE; -import static com.flurgle.camerakit.CameraConstants.SESSION_TYPE_VIDEO; +import static com.otaliastudios.cameraview.CameraConstants.FOCUS_CONTINUOUS; +import static com.otaliastudios.cameraview.CameraConstants.FOCUS_FIXED; +import static com.otaliastudios.cameraview.CameraConstants.FOCUS_TAP; +import static com.otaliastudios.cameraview.CameraConstants.FOCUS_TAP_WITH_MARKER; +import static com.otaliastudios.cameraview.CameraConstants.SESSION_TYPE_PICTURE; +import static com.otaliastudios.cameraview.CameraConstants.SESSION_TYPE_VIDEO; @SuppressWarnings("deprecation") class Camera1 extends CameraController { diff --git a/camerakit/src/main/java/com/flurgle/camerakit/Camera2.java b/camerakit/src/main/java/com/otaliastudios/cameraview/Camera2.java similarity index 99% rename from camerakit/src/main/java/com/flurgle/camerakit/Camera2.java rename to camerakit/src/main/java/com/otaliastudios/cameraview/Camera2.java index 7000cd25..e071adcd 100644 --- a/camerakit/src/main/java/com/flurgle/camerakit/Camera2.java +++ b/camerakit/src/main/java/com/otaliastudios/cameraview/Camera2.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.annotation.TargetApi; import android.content.Context; diff --git a/camerakit/src/main/java/com/flurgle/camerakit/CameraConstants.java b/camerakit/src/main/java/com/otaliastudios/cameraview/CameraConstants.java similarity index 98% rename from camerakit/src/main/java/com/flurgle/camerakit/CameraConstants.java rename to camerakit/src/main/java/com/otaliastudios/cameraview/CameraConstants.java index 2e29967f..1bd0c909 100644 --- a/camerakit/src/main/java/com/flurgle/camerakit/CameraConstants.java +++ b/camerakit/src/main/java/com/otaliastudios/cameraview/CameraConstants.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; /** * Created by Mattia on 06/08/17. diff --git a/camerakit/src/main/java/com/flurgle/camerakit/CameraController.java b/camerakit/src/main/java/com/otaliastudios/cameraview/CameraController.java similarity index 98% rename from camerakit/src/main/java/com/flurgle/camerakit/CameraController.java rename to camerakit/src/main/java/com/otaliastudios/cameraview/CameraController.java index cd591b1b..a0a74eca 100644 --- a/camerakit/src/main/java/com/flurgle/camerakit/CameraController.java +++ b/camerakit/src/main/java/com/otaliastudios/cameraview/CameraController.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.support.annotation.NonNull; import android.support.annotation.Nullable; diff --git a/camerakit/src/main/java/com/flurgle/camerakit/CameraListener.java b/camerakit/src/main/java/com/otaliastudios/cameraview/CameraListener.java similarity index 97% rename from camerakit/src/main/java/com/flurgle/camerakit/CameraListener.java rename to camerakit/src/main/java/com/otaliastudios/cameraview/CameraListener.java index 4f00f3ed..0a35248e 100644 --- a/camerakit/src/main/java/com/flurgle/camerakit/CameraListener.java +++ b/camerakit/src/main/java/com/otaliastudios/cameraview/CameraListener.java @@ -1,7 +1,6 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.graphics.PointF; -import android.graphics.YuvImage; import java.io.File; diff --git a/camerakit/src/main/java/com/flurgle/camerakit/CameraOptions.java b/camerakit/src/main/java/com/otaliastudios/cameraview/CameraOptions.java similarity index 98% rename from camerakit/src/main/java/com/flurgle/camerakit/CameraOptions.java rename to camerakit/src/main/java/com/otaliastudios/cameraview/CameraOptions.java index 9f8f3e38..dc49771a 100644 --- a/camerakit/src/main/java/com/flurgle/camerakit/CameraOptions.java +++ b/camerakit/src/main/java/com/otaliastudios/cameraview/CameraOptions.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.annotation.TargetApi; @@ -6,7 +6,6 @@ import android.hardware.Camera; import android.hardware.camera2.CameraCharacteristics; import android.support.annotation.NonNull; -import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; diff --git a/camerakit/src/main/java/com/flurgle/camerakit/CameraView.java b/camerakit/src/main/java/com/otaliastudios/cameraview/CameraView.java similarity index 98% rename from camerakit/src/main/java/com/flurgle/camerakit/CameraView.java rename to camerakit/src/main/java/com/otaliastudios/cameraview/CameraView.java index 035a3ed0..67757872 100644 --- a/camerakit/src/main/java/com/flurgle/camerakit/CameraView.java +++ b/camerakit/src/main/java/com/otaliastudios/cameraview/CameraView.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.Manifest; import android.annotation.TargetApi; @@ -33,14 +33,14 @@ import java.io.File; import java.util.ArrayList; import java.util.List; -import static com.flurgle.camerakit.CameraConstants.FACING_BACK; -import static com.flurgle.camerakit.CameraConstants.FACING_FRONT; -import static com.flurgle.camerakit.CameraConstants.FLASH_AUTO; -import static com.flurgle.camerakit.CameraConstants.FLASH_OFF; -import static com.flurgle.camerakit.CameraConstants.FLASH_ON; -import static com.flurgle.camerakit.CameraConstants.FLASH_TORCH; -import static com.flurgle.camerakit.CameraConstants.SESSION_TYPE_PICTURE; -import static com.flurgle.camerakit.CameraConstants.SESSION_TYPE_VIDEO; +import static com.otaliastudios.cameraview.CameraConstants.FACING_BACK; +import static com.otaliastudios.cameraview.CameraConstants.FACING_FRONT; +import static com.otaliastudios.cameraview.CameraConstants.FLASH_AUTO; +import static com.otaliastudios.cameraview.CameraConstants.FLASH_OFF; +import static com.otaliastudios.cameraview.CameraConstants.FLASH_ON; +import static com.otaliastudios.cameraview.CameraConstants.FLASH_TORCH; +import static com.otaliastudios.cameraview.CameraConstants.SESSION_TYPE_PICTURE; +import static com.otaliastudios.cameraview.CameraConstants.SESSION_TYPE_VIDEO; import static android.view.View.MeasureSpec.AT_MOST; import static android.view.View.MeasureSpec.EXACTLY; diff --git a/camerakit/src/main/java/com/flurgle/camerakit/ExtraProperties.java b/camerakit/src/main/java/com/otaliastudios/cameraview/ExtraProperties.java similarity index 96% rename from camerakit/src/main/java/com/flurgle/camerakit/ExtraProperties.java rename to camerakit/src/main/java/com/otaliastudios/cameraview/ExtraProperties.java index 1750a2bd..6aac20c7 100644 --- a/camerakit/src/main/java/com/flurgle/camerakit/ExtraProperties.java +++ b/camerakit/src/main/java/com/otaliastudios/cameraview/ExtraProperties.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.annotation.TargetApi; diff --git a/camerakit/src/main/java/com/flurgle/camerakit/Mapper.java b/camerakit/src/main/java/com/otaliastudios/cameraview/Mapper.java similarity index 99% rename from camerakit/src/main/java/com/flurgle/camerakit/Mapper.java rename to camerakit/src/main/java/com/otaliastudios/cameraview/Mapper.java index b8ac3b76..ab5f93a7 100644 --- a/camerakit/src/main/java/com/flurgle/camerakit/Mapper.java +++ b/camerakit/src/main/java/com/otaliastudios/cameraview/Mapper.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.hardware.Camera; import android.util.SparseArray; diff --git a/camerakit/src/main/java/com/flurgle/camerakit/Size.java b/camerakit/src/main/java/com/otaliastudios/cameraview/Size.java similarity index 96% rename from camerakit/src/main/java/com/flurgle/camerakit/Size.java rename to camerakit/src/main/java/com/otaliastudios/cameraview/Size.java index 08e54a8f..b6d33548 100644 --- a/camerakit/src/main/java/com/flurgle/camerakit/Size.java +++ b/camerakit/src/main/java/com/otaliastudios/cameraview/Size.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.support.annotation.NonNull; diff --git a/camerakit/src/main/options/com/flurgle/camerakit/Flash.java b/camerakit/src/main/options/com/flurgle/camerakit/Flash.java deleted file mode 100644 index ce2a3120..00000000 --- a/camerakit/src/main/options/com/flurgle/camerakit/Flash.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.flurgle.camerakit; - -import android.support.annotation.IntDef; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -import static com.flurgle.camerakit.CameraConstants.FLASH_AUTO; -import static com.flurgle.camerakit.CameraConstants.FLASH_OFF; -import static com.flurgle.camerakit.CameraConstants.FLASH_ON; -import static com.flurgle.camerakit.CameraConstants.FLASH_TORCH; - -@Retention(RetentionPolicy.SOURCE) -@IntDef({FLASH_OFF, FLASH_ON, FLASH_AUTO, FLASH_TORCH}) -public @interface Flash { -} \ No newline at end of file diff --git a/camerakit/src/main/options/com/flurgle/camerakit/Focus.java b/camerakit/src/main/options/com/flurgle/camerakit/Focus.java deleted file mode 100644 index 5e387d40..00000000 --- a/camerakit/src/main/options/com/flurgle/camerakit/Focus.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.flurgle.camerakit; - -import android.support.annotation.IntDef; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -import static com.flurgle.camerakit.CameraConstants.FOCUS_TAP; -import static com.flurgle.camerakit.CameraConstants.FOCUS_FIXED; -import static com.flurgle.camerakit.CameraConstants.FOCUS_CONTINUOUS; -import static com.flurgle.camerakit.CameraConstants.FOCUS_TAP_WITH_MARKER; - -@Retention(RetentionPolicy.SOURCE) -@IntDef({FOCUS_CONTINUOUS, FOCUS_TAP, FOCUS_FIXED, FOCUS_TAP_WITH_MARKER}) -public @interface Focus { -} \ No newline at end of file diff --git a/camerakit/src/main/options/com/flurgle/camerakit/Grid.java b/camerakit/src/main/options/com/flurgle/camerakit/Grid.java deleted file mode 100644 index 0961fde1..00000000 --- a/camerakit/src/main/options/com/flurgle/camerakit/Grid.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.flurgle.camerakit; - -import android.support.annotation.IntDef; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -import static com.flurgle.camerakit.CameraConstants.GRID_OFF; -import static com.flurgle.camerakit.CameraConstants.GRID_3X3; -import static com.flurgle.camerakit.CameraConstants.GRID_4X4; -import static com.flurgle.camerakit.CameraConstants.GRID_PHI; - -@IntDef({GRID_OFF, GRID_3X3, GRID_4X4, GRID_PHI}) -@Retention(RetentionPolicy.SOURCE) -public @interface Grid { -} \ No newline at end of file diff --git a/camerakit/src/main/options/com/flurgle/camerakit/VideoQuality.java b/camerakit/src/main/options/com/flurgle/camerakit/VideoQuality.java deleted file mode 100644 index 3974de1e..00000000 --- a/camerakit/src/main/options/com/flurgle/camerakit/VideoQuality.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.flurgle.camerakit; - -import android.support.annotation.IntDef; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -import static com.flurgle.camerakit.CameraConstants.VIDEO_QUALITY_1080P; -import static com.flurgle.camerakit.CameraConstants.VIDEO_QUALITY_2160P; -import static com.flurgle.camerakit.CameraConstants.VIDEO_QUALITY_480P; -import static com.flurgle.camerakit.CameraConstants.VIDEO_QUALITY_720P; -import static com.flurgle.camerakit.CameraConstants.VIDEO_QUALITY_HIGHEST; -import static com.flurgle.camerakit.CameraConstants.VIDEO_QUALITY_LOWEST; -import static com.flurgle.camerakit.CameraConstants.VIDEO_QUALITY_QVGA; - -@Retention(RetentionPolicy.SOURCE) -@IntDef({VIDEO_QUALITY_QVGA, VIDEO_QUALITY_480P, VIDEO_QUALITY_720P, VIDEO_QUALITY_1080P, VIDEO_QUALITY_2160P, VIDEO_QUALITY_HIGHEST, VIDEO_QUALITY_LOWEST}) -public @interface VideoQuality { -} diff --git a/camerakit/src/main/options/com/flurgle/camerakit/WhiteBalance.java b/camerakit/src/main/options/com/flurgle/camerakit/WhiteBalance.java deleted file mode 100644 index ebb39c1a..00000000 --- a/camerakit/src/main/options/com/flurgle/camerakit/WhiteBalance.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.flurgle.camerakit; - -import android.support.annotation.IntDef; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -import static com.flurgle.camerakit.CameraConstants.WHITE_BALANCE_AUTO; -import static com.flurgle.camerakit.CameraConstants.WHITE_BALANCE_INCANDESCENT; -import static com.flurgle.camerakit.CameraConstants.WHITE_BALANCE_FLUORESCENT; -import static com.flurgle.camerakit.CameraConstants.WHITE_BALANCE_DAYLIGHT; -import static com.flurgle.camerakit.CameraConstants.WHITE_BALANCE_CLOUDY; - -@Retention(RetentionPolicy.SOURCE) -@IntDef({WHITE_BALANCE_AUTO, WHITE_BALANCE_INCANDESCENT, WHITE_BALANCE_FLUORESCENT, - WHITE_BALANCE_DAYLIGHT, WHITE_BALANCE_CLOUDY}) -public @interface WhiteBalance { -} \ No newline at end of file diff --git a/camerakit/src/main/options/com/flurgle/camerakit/Facing.java b/camerakit/src/main/options/com/otaliastudios/cameraview/Facing.java similarity index 55% rename from camerakit/src/main/options/com/flurgle/camerakit/Facing.java rename to camerakit/src/main/options/com/otaliastudios/cameraview/Facing.java index 3abc71de..093b9d54 100644 --- a/camerakit/src/main/options/com/flurgle/camerakit/Facing.java +++ b/camerakit/src/main/options/com/otaliastudios/cameraview/Facing.java @@ -1,12 +1,12 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.support.annotation.IntDef; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; -import static com.flurgle.camerakit.CameraConstants.FACING_BACK; -import static com.flurgle.camerakit.CameraConstants.FACING_FRONT; +import static com.otaliastudios.cameraview.CameraConstants.FACING_BACK; +import static com.otaliastudios.cameraview.CameraConstants.FACING_FRONT; @IntDef({FACING_BACK, FACING_FRONT}) @Retention(RetentionPolicy.SOURCE) diff --git a/camerakit/src/main/options/com/otaliastudios/cameraview/Flash.java b/camerakit/src/main/options/com/otaliastudios/cameraview/Flash.java new file mode 100644 index 00000000..71733ffa --- /dev/null +++ b/camerakit/src/main/options/com/otaliastudios/cameraview/Flash.java @@ -0,0 +1,16 @@ +package com.otaliastudios.cameraview; + +import android.support.annotation.IntDef; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import static com.otaliastudios.cameraview.CameraConstants.FLASH_AUTO; +import static com.otaliastudios.cameraview.CameraConstants.FLASH_OFF; +import static com.otaliastudios.cameraview.CameraConstants.FLASH_ON; +import static com.otaliastudios.cameraview.CameraConstants.FLASH_TORCH; + +@Retention(RetentionPolicy.SOURCE) +@IntDef({FLASH_OFF, FLASH_ON, FLASH_AUTO, FLASH_TORCH}) +public @interface Flash { +} \ No newline at end of file diff --git a/camerakit/src/main/options/com/otaliastudios/cameraview/Focus.java b/camerakit/src/main/options/com/otaliastudios/cameraview/Focus.java new file mode 100644 index 00000000..820c5d3d --- /dev/null +++ b/camerakit/src/main/options/com/otaliastudios/cameraview/Focus.java @@ -0,0 +1,16 @@ +package com.otaliastudios.cameraview; + +import android.support.annotation.IntDef; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import static com.otaliastudios.cameraview.CameraConstants.FOCUS_TAP; +import static com.otaliastudios.cameraview.CameraConstants.FOCUS_FIXED; +import static com.otaliastudios.cameraview.CameraConstants.FOCUS_CONTINUOUS; +import static com.otaliastudios.cameraview.CameraConstants.FOCUS_TAP_WITH_MARKER; + +@Retention(RetentionPolicy.SOURCE) +@IntDef({FOCUS_CONTINUOUS, FOCUS_TAP, FOCUS_FIXED, FOCUS_TAP_WITH_MARKER}) +public @interface Focus { +} \ No newline at end of file diff --git a/camerakit/src/main/options/com/otaliastudios/cameraview/Grid.java b/camerakit/src/main/options/com/otaliastudios/cameraview/Grid.java new file mode 100644 index 00000000..415a2ccc --- /dev/null +++ b/camerakit/src/main/options/com/otaliastudios/cameraview/Grid.java @@ -0,0 +1,16 @@ +package com.otaliastudios.cameraview; + +import android.support.annotation.IntDef; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import static com.otaliastudios.cameraview.CameraConstants.GRID_OFF; +import static com.otaliastudios.cameraview.CameraConstants.GRID_3X3; +import static com.otaliastudios.cameraview.CameraConstants.GRID_4X4; +import static com.otaliastudios.cameraview.CameraConstants.GRID_PHI; + +@IntDef({GRID_OFF, GRID_3X3, GRID_4X4, GRID_PHI}) +@Retention(RetentionPolicy.SOURCE) +public @interface Grid { +} \ No newline at end of file diff --git a/camerakit/src/main/options/com/flurgle/camerakit/Method.java b/camerakit/src/main/options/com/otaliastudios/cameraview/Method.java similarity index 56% rename from camerakit/src/main/options/com/flurgle/camerakit/Method.java rename to camerakit/src/main/options/com/otaliastudios/cameraview/Method.java index b9af1f04..1822a7be 100644 --- a/camerakit/src/main/options/com/flurgle/camerakit/Method.java +++ b/camerakit/src/main/options/com/otaliastudios/cameraview/Method.java @@ -1,12 +1,12 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.support.annotation.IntDef; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; -import static com.flurgle.camerakit.CameraConstants.CAPTURE_METHOD_STANDARD; -import static com.flurgle.camerakit.CameraConstants.CAPTURE_METHOD_FRAME; +import static com.otaliastudios.cameraview.CameraConstants.CAPTURE_METHOD_STANDARD; +import static com.otaliastudios.cameraview.CameraConstants.CAPTURE_METHOD_FRAME; @Deprecated @Retention(RetentionPolicy.SOURCE) diff --git a/camerakit/src/main/options/com/flurgle/camerakit/Permissions.java b/camerakit/src/main/options/com/otaliastudios/cameraview/Permissions.java similarity index 57% rename from camerakit/src/main/options/com/flurgle/camerakit/Permissions.java rename to camerakit/src/main/options/com/otaliastudios/cameraview/Permissions.java index 6b4e4ee5..6fb8cb7d 100644 --- a/camerakit/src/main/options/com/flurgle/camerakit/Permissions.java +++ b/camerakit/src/main/options/com/otaliastudios/cameraview/Permissions.java @@ -1,12 +1,12 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.support.annotation.IntDef; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; -import static com.flurgle.camerakit.CameraConstants.PERMISSIONS_PICTURE; -import static com.flurgle.camerakit.CameraConstants.PERMISSIONS_VIDEO; +import static com.otaliastudios.cameraview.CameraConstants.PERMISSIONS_PICTURE; +import static com.otaliastudios.cameraview.CameraConstants.PERMISSIONS_VIDEO; @Deprecated @Retention(RetentionPolicy.SOURCE) diff --git a/camerakit/src/main/options/com/flurgle/camerakit/SessionType.java b/camerakit/src/main/options/com/otaliastudios/cameraview/SessionType.java similarity index 55% rename from camerakit/src/main/options/com/flurgle/camerakit/SessionType.java rename to camerakit/src/main/options/com/otaliastudios/cameraview/SessionType.java index b5a84ed7..ea7c9938 100644 --- a/camerakit/src/main/options/com/flurgle/camerakit/SessionType.java +++ b/camerakit/src/main/options/com/otaliastudios/cameraview/SessionType.java @@ -1,12 +1,12 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.support.annotation.IntDef; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; -import static com.flurgle.camerakit.CameraConstants.SESSION_TYPE_PICTURE; -import static com.flurgle.camerakit.CameraConstants.SESSION_TYPE_VIDEO; +import static com.otaliastudios.cameraview.CameraConstants.SESSION_TYPE_PICTURE; +import static com.otaliastudios.cameraview.CameraConstants.SESSION_TYPE_VIDEO; @Retention(RetentionPolicy.SOURCE) @IntDef({SESSION_TYPE_PICTURE, SESSION_TYPE_VIDEO}) diff --git a/camerakit/src/main/options/com/otaliastudios/cameraview/VideoQuality.java b/camerakit/src/main/options/com/otaliastudios/cameraview/VideoQuality.java new file mode 100644 index 00000000..ad99464e --- /dev/null +++ b/camerakit/src/main/options/com/otaliastudios/cameraview/VideoQuality.java @@ -0,0 +1,19 @@ +package com.otaliastudios.cameraview; + +import android.support.annotation.IntDef; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import static com.otaliastudios.cameraview.CameraConstants.VIDEO_QUALITY_1080P; +import static com.otaliastudios.cameraview.CameraConstants.VIDEO_QUALITY_2160P; +import static com.otaliastudios.cameraview.CameraConstants.VIDEO_QUALITY_480P; +import static com.otaliastudios.cameraview.CameraConstants.VIDEO_QUALITY_720P; +import static com.otaliastudios.cameraview.CameraConstants.VIDEO_QUALITY_HIGHEST; +import static com.otaliastudios.cameraview.CameraConstants.VIDEO_QUALITY_LOWEST; +import static com.otaliastudios.cameraview.CameraConstants.VIDEO_QUALITY_QVGA; + +@Retention(RetentionPolicy.SOURCE) +@IntDef({VIDEO_QUALITY_QVGA, VIDEO_QUALITY_480P, VIDEO_QUALITY_720P, VIDEO_QUALITY_1080P, VIDEO_QUALITY_2160P, VIDEO_QUALITY_HIGHEST, VIDEO_QUALITY_LOWEST}) +public @interface VideoQuality { +} diff --git a/camerakit/src/main/options/com/otaliastudios/cameraview/WhiteBalance.java b/camerakit/src/main/options/com/otaliastudios/cameraview/WhiteBalance.java new file mode 100644 index 00000000..ce5c05cc --- /dev/null +++ b/camerakit/src/main/options/com/otaliastudios/cameraview/WhiteBalance.java @@ -0,0 +1,18 @@ +package com.otaliastudios.cameraview; + +import android.support.annotation.IntDef; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import static com.otaliastudios.cameraview.CameraConstants.WHITE_BALANCE_AUTO; +import static com.otaliastudios.cameraview.CameraConstants.WHITE_BALANCE_INCANDESCENT; +import static com.otaliastudios.cameraview.CameraConstants.WHITE_BALANCE_FLUORESCENT; +import static com.otaliastudios.cameraview.CameraConstants.WHITE_BALANCE_DAYLIGHT; +import static com.otaliastudios.cameraview.CameraConstants.WHITE_BALANCE_CLOUDY; + +@Retention(RetentionPolicy.SOURCE) +@IntDef({WHITE_BALANCE_AUTO, WHITE_BALANCE_INCANDESCENT, WHITE_BALANCE_FLUORESCENT, + WHITE_BALANCE_DAYLIGHT, WHITE_BALANCE_CLOUDY}) +public @interface WhiteBalance { +} \ No newline at end of file diff --git a/camerakit/src/main/options/com/flurgle/camerakit/ZoomMode.java b/camerakit/src/main/options/com/otaliastudios/cameraview/ZoomMode.java similarity index 56% rename from camerakit/src/main/options/com/flurgle/camerakit/ZoomMode.java rename to camerakit/src/main/options/com/otaliastudios/cameraview/ZoomMode.java index a3749dab..d51eb207 100644 --- a/camerakit/src/main/options/com/flurgle/camerakit/ZoomMode.java +++ b/camerakit/src/main/options/com/otaliastudios/cameraview/ZoomMode.java @@ -1,12 +1,12 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.support.annotation.IntDef; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; -import static com.flurgle.camerakit.CameraConstants.ZOOM_OFF; -import static com.flurgle.camerakit.CameraConstants.ZOOM_PINCH; +import static com.otaliastudios.cameraview.CameraConstants.ZOOM_OFF; +import static com.otaliastudios.cameraview.CameraConstants.ZOOM_PINCH; @Retention(RetentionPolicy.SOURCE) @IntDef({ZOOM_OFF, ZOOM_PINCH}) diff --git a/camerakit/src/main/utils/com/flurgle/camerakit/CameraUtils.java b/camerakit/src/main/utils/com/otaliastudios/cameraview/CameraUtils.java similarity index 99% rename from camerakit/src/main/utils/com/flurgle/camerakit/CameraUtils.java rename to camerakit/src/main/utils/com/otaliastudios/cameraview/CameraUtils.java index 23a29c29..313e22bf 100644 --- a/camerakit/src/main/utils/com/flurgle/camerakit/CameraUtils.java +++ b/camerakit/src/main/utils/com/otaliastudios/cameraview/CameraUtils.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.content.Context; import android.content.pm.PackageManager; diff --git a/camerakit/src/main/utils/com/flurgle/camerakit/CropHelper.java b/camerakit/src/main/utils/com/otaliastudios/cameraview/CropHelper.java similarity index 93% rename from camerakit/src/main/utils/com/flurgle/camerakit/CropHelper.java rename to camerakit/src/main/utils/com/otaliastudios/cameraview/CropHelper.java index 2b324b5a..ea6f904c 100644 --- a/camerakit/src/main/utils/com/flurgle/camerakit/CropHelper.java +++ b/camerakit/src/main/utils/com/otaliastudios/cameraview/CropHelper.java @@ -1,13 +1,10 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.graphics.Bitmap; -import android.graphics.BitmapRegionDecoder; import android.graphics.Rect; import android.graphics.YuvImage; -import android.util.Log; import java.io.ByteArrayOutputStream; -import java.io.IOException; public class CropHelper { diff --git a/camerakit/src/main/utils/com/flurgle/camerakit/ExifUtils.java b/camerakit/src/main/utils/com/otaliastudios/cameraview/ExifUtils.java similarity index 95% rename from camerakit/src/main/utils/com/flurgle/camerakit/ExifUtils.java rename to camerakit/src/main/utils/com/otaliastudios/cameraview/ExifUtils.java index 7fd06a2e..4e4e7818 100644 --- a/camerakit/src/main/utils/com/flurgle/camerakit/ExifUtils.java +++ b/camerakit/src/main/utils/com/otaliastudios/cameraview/ExifUtils.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.support.media.ExifInterface; diff --git a/camerakit/src/main/utils/com/flurgle/camerakit/OrientationHelper.java b/camerakit/src/main/utils/com/otaliastudios/cameraview/OrientationHelper.java similarity index 97% rename from camerakit/src/main/utils/com/flurgle/camerakit/OrientationHelper.java rename to camerakit/src/main/utils/com/otaliastudios/cameraview/OrientationHelper.java index b0eb969f..5b89f479 100644 --- a/camerakit/src/main/utils/com/flurgle/camerakit/OrientationHelper.java +++ b/camerakit/src/main/utils/com/otaliastudios/cameraview/OrientationHelper.java @@ -1,8 +1,7 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.content.Context; import android.hardware.SensorManager; -import android.media.ExifInterface; import android.util.SparseIntArray; import android.view.Display; import android.view.OrientationEventListener; diff --git a/camerakit/src/main/utils/com/flurgle/camerakit/RotationHelper.java b/camerakit/src/main/utils/com/otaliastudios/cameraview/RotationHelper.java similarity index 97% rename from camerakit/src/main/utils/com/flurgle/camerakit/RotationHelper.java rename to camerakit/src/main/utils/com/otaliastudios/cameraview/RotationHelper.java index dd9522d1..9657c177 100644 --- a/camerakit/src/main/utils/com/flurgle/camerakit/RotationHelper.java +++ b/camerakit/src/main/utils/com/otaliastudios/cameraview/RotationHelper.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; class RotationHelper { diff --git a/camerakit/src/main/views/com/flurgle/camerakit/FocusMarkerLayout.java b/camerakit/src/main/views/com/otaliastudios/cameraview/FocusMarkerLayout.java similarity index 98% rename from camerakit/src/main/views/com/flurgle/camerakit/FocusMarkerLayout.java rename to camerakit/src/main/views/com/otaliastudios/cameraview/FocusMarkerLayout.java index ebff53eb..207f0af9 100644 --- a/camerakit/src/main/views/com/flurgle/camerakit/FocusMarkerLayout.java +++ b/camerakit/src/main/views/com/otaliastudios/cameraview/FocusMarkerLayout.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; @@ -8,7 +8,6 @@ import android.support.annotation.Nullable; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.MotionEvent; -import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; diff --git a/camerakit/src/main/views/com/flurgle/camerakit/GridLinesLayout.java b/camerakit/src/main/views/com/otaliastudios/cameraview/GridLinesLayout.java similarity index 98% rename from camerakit/src/main/views/com/flurgle/camerakit/GridLinesLayout.java rename to camerakit/src/main/views/com/otaliastudios/cameraview/GridLinesLayout.java index 0e31f5f7..b5a8bde3 100644 --- a/camerakit/src/main/views/com/flurgle/camerakit/GridLinesLayout.java +++ b/camerakit/src/main/views/com/otaliastudios/cameraview/GridLinesLayout.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.content.Context; import android.graphics.Canvas; diff --git a/camerakit/src/main/views/com/flurgle/camerakit/PinchToZoomLayout.java b/camerakit/src/main/views/com/otaliastudios/cameraview/PinchToZoomLayout.java similarity index 98% rename from camerakit/src/main/views/com/flurgle/camerakit/PinchToZoomLayout.java rename to camerakit/src/main/views/com/otaliastudios/cameraview/PinchToZoomLayout.java index 8af3bb82..a3bbb1b1 100644 --- a/camerakit/src/main/views/com/flurgle/camerakit/PinchToZoomLayout.java +++ b/camerakit/src/main/views/com/otaliastudios/cameraview/PinchToZoomLayout.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.content.Context; import android.graphics.PointF; diff --git a/camerakit/src/main/views/com/flurgle/camerakit/Preview.java b/camerakit/src/main/views/com/otaliastudios/cameraview/Preview.java similarity index 99% rename from camerakit/src/main/views/com/flurgle/camerakit/Preview.java rename to camerakit/src/main/views/com/otaliastudios/cameraview/Preview.java index bce15a07..d671c3f4 100644 --- a/camerakit/src/main/views/com/flurgle/camerakit/Preview.java +++ b/camerakit/src/main/views/com/otaliastudios/cameraview/Preview.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.content.Context; import android.graphics.SurfaceTexture; diff --git a/camerakit/src/main/views/com/flurgle/camerakit/SurfaceViewPreview.java b/camerakit/src/main/views/com/otaliastudios/cameraview/SurfaceViewPreview.java similarity index 97% rename from camerakit/src/main/views/com/flurgle/camerakit/SurfaceViewPreview.java rename to camerakit/src/main/views/com/otaliastudios/cameraview/SurfaceViewPreview.java index 81d3ab36..808934ba 100644 --- a/camerakit/src/main/views/com/flurgle/camerakit/SurfaceViewPreview.java +++ b/camerakit/src/main/views/com/otaliastudios/cameraview/SurfaceViewPreview.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.content.Context; import android.view.Surface; diff --git a/camerakit/src/main/views/com/flurgle/camerakit/TextureViewPreview.java b/camerakit/src/main/views/com/otaliastudios/cameraview/TextureViewPreview.java similarity index 98% rename from camerakit/src/main/views/com/flurgle/camerakit/TextureViewPreview.java rename to camerakit/src/main/views/com/otaliastudios/cameraview/TextureViewPreview.java index 702eadc2..77fd90b0 100644 --- a/camerakit/src/main/views/com/flurgle/camerakit/TextureViewPreview.java +++ b/camerakit/src/main/views/com/otaliastudios/cameraview/TextureViewPreview.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit; +package com.otaliastudios.cameraview; import android.annotation.TargetApi; import android.content.Context; diff --git a/demo/build.gradle b/demo/build.gradle index 333d851f..da5bc6e0 100644 --- a/demo/build.gradle +++ b/demo/build.gradle @@ -4,7 +4,7 @@ android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { - applicationId "com.flurgle.camerakit.demo" + applicationId "com.otaliastudios.cameraview.demo" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 4 diff --git a/demo/src/main/AndroidManifest.xml b/demo/src/main/AndroidManifest.xml index 9791980c..5822d98c 100644 --- a/demo/src/main/AndroidManifest.xml +++ b/demo/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="com.otaliastudios.cameraview.demo"> @@ -13,7 +13,7 @@ android:theme="@style/AppTheme"> @@ -22,9 +22,9 @@ + android:name="com.otaliastudios.cameraview.demo.PicturePreviewActivity" /> - + diff --git a/demo/src/main/java/com/flurgle/camerakit/demo/AutoUnfocusEditText.java b/demo/src/main/java/com/otaliastudios/cameraview/demo/AutoUnfocusEditText.java similarity index 96% rename from demo/src/main/java/com/flurgle/camerakit/demo/AutoUnfocusEditText.java rename to demo/src/main/java/com/otaliastudios/cameraview/demo/AutoUnfocusEditText.java index 3def38bd..59c651b6 100644 --- a/demo/src/main/java/com/flurgle/camerakit/demo/AutoUnfocusEditText.java +++ b/demo/src/main/java/com/otaliastudios/cameraview/demo/AutoUnfocusEditText.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit.demo; +package com.otaliastudios.cameraview.demo; import android.content.Context; import android.support.v7.widget.AppCompatEditText; diff --git a/demo/src/main/java/com/flurgle/camerakit/demo/MainActivity.java b/demo/src/main/java/com/otaliastudios/cameraview/demo/MainActivity.java similarity index 98% rename from demo/src/main/java/com/flurgle/camerakit/demo/MainActivity.java rename to demo/src/main/java/com/otaliastudios/cameraview/demo/MainActivity.java index 9c4c89fd..dd5b60a4 100644 --- a/demo/src/main/java/com/flurgle/camerakit/demo/MainActivity.java +++ b/demo/src/main/java/com/otaliastudios/cameraview/demo/MainActivity.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit.demo; +package com.otaliastudios.cameraview.demo; import android.content.Intent; import android.net.Uri; @@ -13,10 +13,10 @@ import android.widget.RadioGroup; import android.widget.TextView; import android.widget.Toast; -import com.flurgle.camerakit.CameraConstants; -import com.flurgle.camerakit.CameraListener; -import com.flurgle.camerakit.CameraView; -import com.flurgle.camerakit.Size; +import com.otaliastudios.cameraview.CameraConstants; +import com.otaliastudios.cameraview.CameraListener; +import com.otaliastudios.cameraview.CameraView; +import com.otaliastudios.cameraview.Size; import java.io.File; diff --git a/demo/src/main/java/com/flurgle/camerakit/demo/PicturePreviewActivity.java b/demo/src/main/java/com/otaliastudios/cameraview/demo/PicturePreviewActivity.java similarity index 94% rename from demo/src/main/java/com/flurgle/camerakit/demo/PicturePreviewActivity.java rename to demo/src/main/java/com/otaliastudios/cameraview/demo/PicturePreviewActivity.java index c12df14c..0426be27 100644 --- a/demo/src/main/java/com/flurgle/camerakit/demo/PicturePreviewActivity.java +++ b/demo/src/main/java/com/otaliastudios/cameraview/demo/PicturePreviewActivity.java @@ -1,4 +1,4 @@ -package com.flurgle.camerakit.demo; +package com.otaliastudios.cameraview.demo; import android.app.Activity; import android.graphics.Bitmap; @@ -7,9 +7,8 @@ import android.support.annotation.Nullable; import android.widget.ImageView; import android.widget.TextView; -import com.flurgle.camerakit.AspectRatio; -import com.flurgle.camerakit.CameraUtils; -import com.flurgle.camerakit.Size; +import com.otaliastudios.cameraview.AspectRatio; +import com.otaliastudios.cameraview.CameraUtils; import java.lang.ref.WeakReference; diff --git a/demo/src/main/java/com/flurgle/camerakit/demo/VideoPreviewActivity.java b/demo/src/main/java/com/otaliastudios/cameraview/demo/VideoPreviewActivity.java similarity index 90% rename from demo/src/main/java/com/flurgle/camerakit/demo/VideoPreviewActivity.java rename to demo/src/main/java/com/otaliastudios/cameraview/demo/VideoPreviewActivity.java index 9841f933..23bfced9 100644 --- a/demo/src/main/java/com/flurgle/camerakit/demo/VideoPreviewActivity.java +++ b/demo/src/main/java/com/otaliastudios/cameraview/demo/VideoPreviewActivity.java @@ -1,21 +1,15 @@ -package com.flurgle.camerakit.demo; +package com.otaliastudios.cameraview.demo; import android.app.Activity; -import android.graphics.Bitmap; import android.media.MediaPlayer; import android.net.Uri; import android.os.Bundle; import android.support.annotation.Nullable; -import android.view.View; import android.view.ViewGroup; -import android.widget.ImageView; import android.widget.MediaController; import android.widget.TextView; import android.widget.VideoView; -import com.flurgle.camerakit.AspectRatio; -import com.flurgle.camerakit.Size; - import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; diff --git a/demo/src/main/res/layout/activity_main.xml b/demo/src/main/res/layout/activity_main.xml index dada4f89..3f5b4ba2 100644 --- a/demo/src/main/res/layout/activity_main.xml +++ b/demo/src/main/res/layout/activity_main.xml @@ -19,20 +19,20 @@ - + - -