0
更改设备有一个简单的方法来改变在QTCaptureSession比enumarating在从设备阵列之外的音频/视频设备......有一种简单的方式QTCaptureSession
[captureSession inputs];
检查看看无论设备是QTMediaTypeSound还是QTMediaTypeVideo并删除它们?
更改设备有一个简单的方法来改变在QTCaptureSession比enumarating在从设备阵列之外的音频/视频设备......有一种简单的方式QTCaptureSession
[captureSession inputs];
检查看看无论设备是QTMediaTypeSound还是QTMediaTypeVideo并删除它们?
这取决于你“易”的意思。
从我的头顶,有下列选项:
filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"device.mediaType == \"%@\"", type]
来查询从-[QTCaptureSession inputs]
返回的数组。indexesOfObjectsPassingTest:
来确定要删除的输入。但是有没有办法(至少没有,我知道的)说removeInputsWithMediaType:
。
HTH
丹尼尔