iOS AVFoundation - 4K 视频
iOS AVFoundation - 4K video
好的,有一个相机应用程序,已经能够像这样有条件地预先设置分辨率:
if ([_captureSession canSetSessionPreset:AVCaptureSessionPreset1920x1080]) {
_captureSession.sessionPreset = AVCaptureSessionPreset1920x1080;
} else if ([_captureSession canSetSessionPreset:AVCaptureSessionPreset1280x720]) {
_captureSession.sessionPreset = AVCaptureSessionPreset1280x720;
} else {
_captureSession.sessionPreset = AVCaptureSessionPresetPhoto;
}
感谢iPhone 6S,我知道我们可以获得4K视频。但是,似乎不是该分辨率的预设。 AVCaptureSessionPresetPhoto
else 语句会默认为那个,还是有一个我可以为该分辨率设置的常量?
您想使用 AVCaptureSessionPreset3840x2160
它是新的 4K AVCaptureSessionPreset,似乎尚未在线记录,但如果您是 运行 最新的 Xcode 测试版,它将显示在您的自动完成中。
好的,有一个相机应用程序,已经能够像这样有条件地预先设置分辨率:
if ([_captureSession canSetSessionPreset:AVCaptureSessionPreset1920x1080]) {
_captureSession.sessionPreset = AVCaptureSessionPreset1920x1080;
} else if ([_captureSession canSetSessionPreset:AVCaptureSessionPreset1280x720]) {
_captureSession.sessionPreset = AVCaptureSessionPreset1280x720;
} else {
_captureSession.sessionPreset = AVCaptureSessionPresetPhoto;
}
感谢iPhone 6S,我知道我们可以获得4K视频。但是,似乎不是该分辨率的预设。 AVCaptureSessionPresetPhoto
else 语句会默认为那个,还是有一个我可以为该分辨率设置的常量?
您想使用 AVCaptureSessionPreset3840x2160
它是新的 4K AVCaptureSessionPreset,似乎尚未在线记录,但如果您是 运行 最新的 Xcode 测试版,它将显示在您的自动完成中。