feat: Complete iOS Codebase rewrite (#1647)
* Make Frame Processors an extra subspec * Update VisionCamera.podspec * Make optional * Make VisionCamera compile without Skia * Fix * Add skia again * Update VisionCamera.podspec * Make VisionCamera build without Frame Processors * Rename error to `system/frame-processors-unavailable` * Fix Frame Processor returning early * Remove `preset`, FP partial rewrite * Only warn on frame drop * Fix wrong queue * fix: Run on CameraQueue again * Update CameraView.swift * fix: Activate audio session asynchronously on audio queue * Update CameraView+RecordVideo.swift * Update PreviewView.h * Cleanups * Cleanup * fix cast * feat: Add LiDAR Depth Camera support * Upgrade Ruby * Add vector icons type * Update Gemfile.lock * fix: Stop queues on deinit * Also load `builtInTrueDepthCamera` * Update CameraViewManager.swift * Update SkImageHelpers.mm * Extract FrameProcessorCallback to FrameProcessor Holds more context now :) * Rename to .m * fix: Add `RCTLog` import * Create SkiaFrameProcessor * Update CameraBridge.h * Call Frame Processor * Fix defines * fix: Allow deleting callback funcs * fix Skia build * batch * Just call `setSkiaFrameProcessor` * Rewrite in Swift * Pass `SkiaRenderer` * Fix Import * Move `PreviewView` to Swift * Fix Layer * Set Skia Canvas to Frame Host Object * Make `DrawableFrameHostObject` subclass * Fix TS types * Use same MTLDevice and apply scale * Make getter * Extract `setTorch` and `Preview` * fix: Fix nil metal device * Don't wait for session stop in deinit * Use main pixel ratio * Use unique_ptr for Render Contexts * fix: Fix SkiaPreviewDisplayLink broken after deinit * inline `getTextureCache` * Update CameraPage.tsx * chore: Format iOS * perf: Allow MTLLayer to be optimized for only frame buffers * Add RN Video types * fix: Fix Frame Processors if guard * Find nodeModules recursively * Create `Frame.isDrawable` * Add `cocoapods-check` dependency
This commit is contained in:
@@ -1,55 +0,0 @@
|
||||
//
|
||||
// AVCaptureSession.Preset+descriptor.swift
|
||||
// mrousavy
|
||||
//
|
||||
// Created by Marc Rousavy on 15.12.20.
|
||||
// Copyright © 2020 mrousavy. All rights reserved.
|
||||
//
|
||||
|
||||
import AVFoundation
|
||||
import Foundation
|
||||
|
||||
extension AVCaptureSession.Preset {
|
||||
init(withString string: String) throws {
|
||||
switch string {
|
||||
case "cif-352x288":
|
||||
self = .cif352x288
|
||||
return
|
||||
case "hd-1280x720":
|
||||
self = .hd1280x720
|
||||
return
|
||||
case "hd-1920x1080":
|
||||
self = .hd1920x1080
|
||||
return
|
||||
case "hd-3840x2160":
|
||||
self = .hd4K3840x2160
|
||||
return
|
||||
case "high":
|
||||
self = .high
|
||||
return
|
||||
case "iframe-1280x720":
|
||||
self = .iFrame1280x720
|
||||
return
|
||||
case "iframe-960x540":
|
||||
self = .iFrame960x540
|
||||
return
|
||||
case "input-priority":
|
||||
self = .inputPriority
|
||||
return
|
||||
case "low":
|
||||
self = .low
|
||||
return
|
||||
case "medium":
|
||||
self = .medium
|
||||
return
|
||||
case "photo":
|
||||
self = .photo
|
||||
return
|
||||
case "vga-640x480":
|
||||
self = .vga640x480
|
||||
return
|
||||
default:
|
||||
throw EnumParserError.invalidValue
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user