在 Xamarin.iOS 中实现 AVCapturePhotoCaptureDelegate
Implementing AVCapturePhotoCaptureDelegate in Xamarin.iOS
我试图在 Xamarin.iOS 中实现 AVCapturePhotoCaptureDelegate
目标 iOS 11,但我还没有找到一个有效的例子。
大多数示例使用缓冲区实现已弃用的方法,但目前唯一支持的方法是:
void DidFinishProcessingPhoto(AVCapturePhotoOutput output,
AVCapturePhoto photo, Foundation.NSError error);
我找到了一些 iOS 11 的更新教程,但他们通常建议使用 AVCapturePhoto.fileDataRepresentation
method,但由于某些原因,Xamarin 似乎不提供。
你能告诉我如何在 Xamarin 中从 AVCapturePhoto
检索 JPEG 和 RAW 数据吗?
更新
我检查过 Apple documentation for AVCapturePhoto
and it seems the Xamarin.iOS class 缺少许多其他成员,如 bracketSettings
,但实际上只有 imageRepresentation
相关方法在代码中不可用。
我将非常感谢对此原因的解释,因为如果没有数据表示方法,似乎没有任何方便的方法从 AVCapturePhoto
中检索 UIImage
使用已弃用的委托方法。
它是 bug/issue 预定 Xcode 9.3 support/milestone:
!missing-selector! +AVCapturePhotoBracketSettings::photoBracketSettingsWithRawPixelFormatType:rawFileType:processedFormat:processedFileType:bracketedSettings: not bound
!missing-selector! AVCapturePhoto::fileDataRepresentationWithReplacementMetadata:replacementEmbeddedThumbnailPhotoFormat:replacementEmbeddedThumbnailPixelBuffer:replacementDepthData: not bound
!missing-selector! AVCapturePhotoOutput::availableLivePhotoVideoCodecTypes not bound
!missing-selector! AVCapturePhotoOutput::isCameraCalibrationDataDeliverySupported not bound
!missing-selector! AVCapturePhotoOutput::isDualCameraDualPhotoDeliveryEnabled not bound
!missing-selector! AVCapturePhotoOutput::isDualCameraDualPhotoDeliverySupported not bound
!missing-selector! AVCapturePhotoOutput::setDualCameraDualPhotoDeliveryEnabled: not bound
!missing-selector! AVCaptureResolvedPhotoSettings::embeddedThumbnailDimensions not bound
!missing-selector! AVCaptureResolvedPhotoSettings::expectedPhotoCount not bound
我试图在 Xamarin.iOS 中实现 AVCapturePhotoCaptureDelegate
目标 iOS 11,但我还没有找到一个有效的例子。
大多数示例使用缓冲区实现已弃用的方法,但目前唯一支持的方法是:
void DidFinishProcessingPhoto(AVCapturePhotoOutput output,
AVCapturePhoto photo, Foundation.NSError error);
我找到了一些 iOS 11 的更新教程,但他们通常建议使用 AVCapturePhoto.fileDataRepresentation
method,但由于某些原因,Xamarin 似乎不提供。
你能告诉我如何在 Xamarin 中从 AVCapturePhoto
检索 JPEG 和 RAW 数据吗?
更新
我检查过 Apple documentation for AVCapturePhoto
and it seems the Xamarin.iOS class 缺少许多其他成员,如 bracketSettings
,但实际上只有 imageRepresentation
相关方法在代码中不可用。
我将非常感谢对此原因的解释,因为如果没有数据表示方法,似乎没有任何方便的方法从 AVCapturePhoto
中检索 UIImage
使用已弃用的委托方法。
它是 bug/issue 预定 Xcode 9.3 support/milestone:
!missing-selector! +AVCapturePhotoBracketSettings::photoBracketSettingsWithRawPixelFormatType:rawFileType:processedFormat:processedFileType:bracketedSettings: not bound
!missing-selector! AVCapturePhoto::fileDataRepresentationWithReplacementMetadata:replacementEmbeddedThumbnailPhotoFormat:replacementEmbeddedThumbnailPixelBuffer:replacementDepthData: not bound
!missing-selector! AVCapturePhotoOutput::availableLivePhotoVideoCodecTypes not bound
!missing-selector! AVCapturePhotoOutput::isCameraCalibrationDataDeliverySupported not bound
!missing-selector! AVCapturePhotoOutput::isDualCameraDualPhotoDeliveryEnabled not bound
!missing-selector! AVCapturePhotoOutput::isDualCameraDualPhotoDeliverySupported not bound
!missing-selector! AVCapturePhotoOutput::setDualCameraDualPhotoDeliveryEnabled: not bound
!missing-selector! AVCaptureResolvedPhotoSettings::embeddedThumbnailDimensions not bound
!missing-selector! AVCaptureResolvedPhotoSettings::expectedPhotoCount not bound