perf: Improve pixelFormat
and add CameraDevice.sensorOrientation
(#1729)
* feat: Orientation * fix orientation value in manifest * Update AndroidManifest.xml * Style * fix: Set MAX_IMAGES to 3 * Pass `isMirrored` to `VideoPipeline` * Update docs about Skia FPs * Options * Add iPad target * Remove UIDevice onOrientationChanged listener * Update CameraView+AVCaptureSession.swift * Update CameraView+AVCaptureSession.swift * Update CameraView+AVCaptureSession.swift * Get available pixelFormats on iOS * format * Update CameraSession.kt * Expose `CameraDevice.sensorOrientation` * Lock orientation again
This commit is contained in:
@@ -36,10 +36,10 @@ extension AVCaptureDevice.Format {
|
||||
}
|
||||
|
||||
func toDictionary() -> [String: Any] {
|
||||
let mediaSubType = CMFormatDescriptionGetMediaSubType(formatDescription)
|
||||
let pixelFormat = PixelFormat(mediaSubType: mediaSubType)
|
||||
let availablePixelFormats = AVCaptureVideoDataOutput().availableVideoPixelFormatTypes
|
||||
let pixelFormats = availablePixelFormats.map { format in PixelFormat(mediaSubType: format) }
|
||||
|
||||
var dict: [String: Any] = [
|
||||
return [
|
||||
"videoStabilizationModes": videoStabilizationModes.map(\.descriptor),
|
||||
"autoFocusSystem": autoFocusSystem.descriptor,
|
||||
"photoHeight": highResolutionStillImageDimensions.height,
|
||||
@@ -54,9 +54,7 @@ extension AVCaptureDevice.Format {
|
||||
"supportsPhotoHDR": false,
|
||||
"minFps": minFrameRate,
|
||||
"maxFps": maxFrameRate,
|
||||
"pixelFormats": [pixelFormat.unionValue],
|
||||
"pixelFormats": pixelFormats.map(\.unionValue),
|
||||
]
|
||||
|
||||
return dict
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user