Remove a few TODOs
This commit is contained in:
parent
dff8fc7178
commit
89a35812f7
@ -32,7 +32,7 @@ suspend fun CameraView.startRecording(options: ReadableMap, onRecordCallback: Ca
|
||||
override fun onVideoSaved(outputFileResults: VideoCapture.OutputFileResults) {
|
||||
val map = Arguments.createMap()
|
||||
map.putString("path", videoFile.absolutePath)
|
||||
// TODO: duration and size
|
||||
// TODO: duration and size - see https://github.com/cuvent/react-native-vision-camera/issues/77
|
||||
onRecordCallback(map, null)
|
||||
|
||||
// reset the torch mode
|
||||
|
@ -22,12 +22,6 @@ suspend fun CameraView.takePhoto(options: ReadableMap): WritableMap = coroutineS
|
||||
Log.d(CameraView.REACT_CLASS, "takePhoto() called")
|
||||
val imageCapture = imageCapture ?: throw CameraNotReadyError()
|
||||
|
||||
if (options.hasKey("photoCodec")) {
|
||||
// TODO photoCodec
|
||||
}
|
||||
if (options.hasKey("qualityPrioritization")) {
|
||||
// TODO qualityPrioritization
|
||||
}
|
||||
if (options.hasKey("flash")) {
|
||||
val flashMode = options.getString("flash")
|
||||
imageCapture.flashMode = when (flashMode) {
|
||||
@ -37,6 +31,13 @@ suspend fun CameraView.takePhoto(options: ReadableMap): WritableMap = coroutineS
|
||||
else -> throw InvalidTypeScriptUnionError("flash", flashMode ?: "(null)")
|
||||
}
|
||||
}
|
||||
// All those options are not yet implemented - see https://github.com/cuvent/react-native-vision-camera/issues/75
|
||||
if (options.hasKey("photoCodec")) {
|
||||
// TODO photoCodec
|
||||
}
|
||||
if (options.hasKey("qualityPrioritization")) {
|
||||
// TODO qualityPrioritization
|
||||
}
|
||||
if (options.hasKey("enableAutoRedEyeReduction")) {
|
||||
// TODO enableAutoRedEyeReduction
|
||||
}
|
||||
@ -56,7 +57,7 @@ suspend fun CameraView.takePhoto(options: ReadableMap): WritableMap = coroutineS
|
||||
|
||||
val camera2Info = Camera2CameraInfo.from(camera!!.cameraInfo)
|
||||
val lensFacing = camera2Info.getCameraCharacteristic(CameraCharacteristics.LENS_FACING)
|
||||
// TODO: Flip image if lens is front side
|
||||
// TODO: Flip image if lens is front side - see https://github.com/cuvent/react-native-vision-camera/issues/74
|
||||
|
||||
val results = awaitAll(
|
||||
async(coroutineContext) {
|
||||
|
@ -31,40 +31,25 @@ import java.util.concurrent.Executors
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
|
||||
// CaptureRequest.java
|
||||
// TODO: CONTROL_AE_ANTIBANDING_MODE (60Hz, 50Hz lights)
|
||||
// TODO: CONTROL_AE_MODE for RedEye reduction
|
||||
// TODO: CONTROL_AE_TARGET_FPS_RANGE if FPS changes
|
||||
// TODO: CONTROL_CAPTURE_INTENT for prioritization (Preview, Still Capture, Video recording)
|
||||
// TODO: CONTROL_EFFECT_MODE for color filters/effects
|
||||
// TODO: CONTROL_SCENE_MODE contains HDR, do I need that?
|
||||
// TODO: CONTROL_VIDEO_STABILIZATION_MODE and STATISTICS_OIS_DATA_MODE for stabilization techniques
|
||||
// TODO: CONTROL_ENABLE_ZSL for Zero Shutter Lag (speed prio)
|
||||
// TODO: EDGE_MODE not sure what that is
|
||||
// TODO: JPEG_xxx other JPEG options
|
||||
// TODO: NOISE_REDUCTION_MODE also maybe ZSL
|
||||
// TODO: SCALER_CROP_REGION for digital zoom
|
||||
// TODO: SENSOR_FRAME_DURATION for FPS
|
||||
|
||||
//
|
||||
// TODOs for the CameraView which are currently too hard to implement either because of CameraX' limitations, or my brain capacity.
|
||||
//
|
||||
// CameraView
|
||||
// TODO: Actually use correct sizes for video and photo (currently it's both the video size)
|
||||
// TODO: Configurable FPS higher than 30
|
||||
// TODO: High-speed video recordings (export in CameraViewModule::getAvailableVideoDevices(), and set in CameraView::configurePreview()) (120FPS+)
|
||||
// TODO: configureSession() Use format (photoWidth/photoHeight)
|
||||
// TODO: configureSession() enableDepthData
|
||||
// TODO: configureSession() enableHighResolutionCapture
|
||||
// TODO: configureSession() enablePortraitEffectsMatteDelivery
|
||||
// TODO: configureSession() scannableCodes | onCodeScanned
|
||||
// TODO: configureSession() colorSpace
|
||||
|
||||
// CameraView+RecordVideo
|
||||
// TODO: Better startRecording()/stopRecording() (promise + callback, wait for TurboModules/JSI)
|
||||
// TODO: videoStabilizationMode
|
||||
// TODO: Video HDR
|
||||
// TODO: Return Video size/duration
|
||||
|
||||
// CameraView+TakePhoto
|
||||
// TODO: Mirror selfie images
|
||||
// TODO: takePhoto() depth data
|
||||
// TODO: takePhoto() raw capture
|
||||
// TODO: takePhoto() photoCodec ("hevc" | "jpeg" | "raw")
|
||||
|
@ -99,7 +99,6 @@ class CameraViewManager : SimpleViewManager<CameraView>() {
|
||||
fun setTorch(view: CameraView, torch: String) {
|
||||
if (view.torch != torch)
|
||||
addChangedPropToTransaction(view, "torch")
|
||||
// TODO: why THE FUCK is this not being called?
|
||||
view.torch = torch
|
||||
}
|
||||
|
||||
@ -107,7 +106,6 @@ class CameraViewManager : SimpleViewManager<CameraView>() {
|
||||
fun setZoom(view: CameraView, zoom: Double) {
|
||||
if (view.zoom != zoom)
|
||||
addChangedPropToTransaction(view, "zoom")
|
||||
// TODO: why THE FUCK is this not being called?
|
||||
view.zoom = zoom
|
||||
}
|
||||
|
||||
|
@ -223,10 +223,10 @@ class CameraViewModule(reactContext: ReactApplicationContext) : ReactContextBase
|
||||
val colorSpaces = Arguments.createArray()
|
||||
colorSpaces.pushString("yuv")
|
||||
|
||||
// TODO Revisit getAvailableCameraDevices (more accurate video stabilization modes)
|
||||
val videoStabilizationModes = Arguments.createArray()
|
||||
if (stabilizationModes.contains(CameraCharacteristics.CONTROL_VIDEO_STABILIZATION_MODE_OFF))
|
||||
if (stabilizationModes.contains(CameraCharacteristics.CONTROL_VIDEO_STABILIZATION_MODE_OFF)) {
|
||||
videoStabilizationModes.pushString("off")
|
||||
}
|
||||
if (stabilizationModes.contains(CameraCharacteristics.CONTROL_VIDEO_STABILIZATION_MODE_ON)) {
|
||||
videoStabilizationModes.pushString("auto")
|
||||
videoStabilizationModes.pushString("standard")
|
||||
|
@ -15,9 +15,6 @@ import UIKit
|
||||
//
|
||||
// TODOs for the CameraView which are currently too hard to implement either because of AVFoundation's limitations, or my brain capacity
|
||||
//
|
||||
// CameraView
|
||||
// TODO: enableSmoothAutoFocus
|
||||
|
||||
// CameraView+RecordVideo
|
||||
// TODO: Better startRecording()/stopRecording() (promise + callback, wait for TurboModules/JSI)
|
||||
// TODO: videoStabilizationMode
|
||||
|
@ -138,12 +138,12 @@ export interface CameraProps extends ViewProps {
|
||||
|
||||
// TODO: Remove once frameProcessors land
|
||||
/**
|
||||
* Specify the code types this camera can scan.
|
||||
* Specify the code types this camera can scan. Will be removed with the addition of Frame Processors.
|
||||
*/
|
||||
scannableCodes?: CodeType[];
|
||||
// TODO: Remove once frameProcessors land
|
||||
/**
|
||||
* Called when one or multiple codes have been scanned.
|
||||
* Called when one or multiple codes have been scanned. Will be removed with the addition of Frame Processors.
|
||||
*/
|
||||
onCodeScanned?: (codes: Code[]) => void;
|
||||
//#endregion
|
||||
|
Loading…
Reference in New Issue
Block a user