Class CameraHelper

java.lang.Object
com.streamwide.smartms.lib.camera.utils.CameraHelper

public final class CameraHelper extends Object
  • Field Details

  • Method Details

    • getOutputMediaFile

      @Nullable public static File getOutputMediaFile(int mediaAction, @NonNull String directoryPath, @NonNull String mediaNamePattern)
    • getPictureSize

      @Nullable public static Size getPictureSize(@Nullable List<Size> choices, int mediaQuality)
    • closestPictureSize

      @Nullable public static Size closestPictureSize(@Nullable Size selectedSize, @Nullable List<Size> choices)
    • getPictureSizeList

      @Nullable public static List<Size> getPictureSizeList(@Nullable List<Size> choices)
    • getPictureSize

      @Nullable public static Size getPictureSize(@Nullable Size[] sizes, int mediaQuality)
    • getSizeWithClosestRatio

      @Nullable public static Size getSizeWithClosestRatio(@Nullable List<Size> sizes, int width, int height)
    • getOptimalPreviewSize

      @Nullable public static Size getOptimalPreviewSize(@Nullable Size[] sizes, int width, int height)
    • getSizeWithClosestRatio

      @Nullable public static Size getSizeWithClosestRatio(@Nullable Size[] sizes, int width, int height)
    • chooseOptimalSize

      @Nullable public static Size chooseOptimalSize(@NonNull Size[] choices, int width, int height, @NonNull Size aspectRatio)
    • calculateApproximateVideoDuration

      public static double calculateApproximateVideoDuration(@NonNull android.media.CamcorderProfile camcorderProfile, long maxFileSize)
    • getCamcorderProfile

      @Nullable public static android.media.CamcorderProfile getCamcorderProfile(@Nullable String cameraId, long maximumFileSize, int minimumDurationInSeconds)
    • getCamcorderProfile

      @NonNull public static android.media.CamcorderProfile getCamcorderProfile(int currentCameraId, long maximumFileSize, int minimumDurationInSeconds)
    • getCamcorderProfile

      @Nullable public static android.media.CamcorderProfile getCamcorderProfile(int mediaQuality, @Nullable String cameraId)
    • getCamcorderProfile

      @NonNull public static android.media.CamcorderProfile getCamcorderProfile(int mediaQuality, int cameraId)
    • getCamcorderProfiles

      @NonNull public static List<android.media.CamcorderProfile> getCamcorderProfiles(int cameraId)