如何在AVFoundation Framework中获取视频输出和完整照片分辨率图像 [英] How to get both the video output and full photo resolution image in AVFoundation Framework

查看:90
本文介绍了如何在AVFoundation Framework中获取视频输出和完整照片分辨率图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用捕获会话来协调数据流,如Apple开发者文档所述。
我想获取视频数据以验证图像是否足够好。
如果符合条件,我想立即拍摄全分辨率照片。

I use a capture session to coordinate data flow as the apple developer document described. I want to get the video data to verify if the image is good enough to take. If the condition is met, I want to immediately take the Full resolution photo.

但视频输出不支持完整的照片分辨率。
因此我必须将AVCapture sessionPreset设置为AVCaptureSessionPresetLow以捕获视频图像数据,
然后在满足条件时将sessionPreset重新配置为AVCaptureSessionPresetPhoto。
但重新配置大约需要两到三秒,并且不符合实时要求。

However full photo resolution is not supported for video output. So I have to set the AVCapture sessionPreset to AVCaptureSessionPresetLow to capture video image data, then reconfigure the sessionPreset to AVCaptureSessionPresetPhoto when the condition is met. But the reconfiguration takes about two to three seconds, and does not meet the real-time requirements.

如果我使用两个AVCaptureSessions,一个用于视频捕获,另一个用于捕捉静止图像,
然后它似乎不起作用。

If I use two AVCaptureSessions, one for the video capture, the other for the capture the still image, then it seemed not work.

有没有人有更多想法?
谢谢。

Does anybody have more ideas? Thank you.

推荐答案

自己动手 - https://stackoverflow.com/questions/3513722/avcapturesession-commitconfiguration-stuck

(当你从这个问题可以看出,这种方式还有更多的困难)

(As you can see from the question, there are more hardships to come this way)

正如我在那个问题中写的那样 - 没有官方支持的方法。我能找到的大多数参考文献都在Apple开发者论坛中,所以我不会在这里提及它们,但相信我 - 很多人想要你想要的东西,而且目前还不支持。

As I wrote in that question - There's no official supported method for this. Most references I could find were inside Apple Developer Forums, so I won't mention them here, but trust me - Many want what you want and it's currently not supported.

对不起老兄,

Oded。

这篇关于如何在AVFoundation Framework中获取视频输出和完整照片分辨率图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆