gpt4 book ai didi

iphone - iPhone 5s摄像头LED灯单独接入

转载 作者:技术小花猫 更新时间:2023-10-29 10:09:48 25 4
gpt4 key购买 nike

我正在为 iPhone 5s 编写代码,现在它的后置摄像头有两个 LED 灯。我不知道官方的 LED 颜色名称,但一个 LED 是白色的,另一个 LED 是淡黄色的。 Apple 将其称为“True Tone”。

我正在尝试单独访问这些相机 LED 灯。

我相信这是可能的,因为当我访问 iOS7 的控制中心(从底部向上滑动)并按下内置闪光灯时,只有白色 LED 亮起。

这与下面应用手电筒灯代码不同。当我执行下面的代码时,两个 LED 灯都亮了。

AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];

if ([device hasTorch] && [device isTorchAvailable] && [device isTorchModeSupported:AVCaptureTorchModeOn]) {

[device lockForConfiguration:nil];
[device setTorchMode: onOff ? AVCaptureTorchModeOn : AVCaptureTorchModeOff];
[device unlockForConfiguration];
}

我一直在搜索 AVCaptureDevice 类引用资料,但没有看到任何关于单独访问两个 LED 灯的具体信息。我的意思是,只打开白色 LED 或只打开黄色 LED。不能同时使用两个 LED。

我假设两个灯都是 LED。

关于如何做到这一点有什么想法吗?

非常感谢您提供这方面的任何信息。

最佳答案

我针对 iPhone 5s 的相机 LED 灯的单独访问向 Apple 开发人员支持发起了技术支持事件 (TSI)。

我今天收到了他们的回复。他们是这样说的。

Hello Jim,

Thank you for contacting Apple Developer Technical Support (DTS). Our engineers have reviewed your request and have concluded that there is no supported way to achieve the desired functionality given the currently shipping system configurations.

If you would like for Apple to consider adding support to access the camera LED lights individually on the device, please submit an enhancement request via the Bug Reporter tool at http://bugreport.apple.com.

While you were initially charged a technical support incident for this support request, we have assigned a replacement incident back to your account.

Thank you for taking the time to file this report. We truly appreciate your help in discovering and isolating issues.

Apple Developer Support Worldwide Developer Relations

我确实按照他们的建议通过他们的 Bug Reporter 工具打开了增强请求。如果有任何结果,那么我会在这里发布。干杯!

关于iphone - iPhone 5s摄像头LED灯单独接入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19275929/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com