ios - Using AVCaptureDevice as SCNScene background content -


during scenekit: what's new presentation @ wwcd2017 (44:19) stated can use avcapturedevice background content scnscene.

snippet presentation:

let capturedevice: avcapturedevice = ... scene.background.contents = capturedevice 

however following code

let capturedevice = avcapturedevice.default(.builtinwideanglecamera, for: .video, position: .back)! scene.background.contents = capturedevice 

produces error:

[scenekit] error: cannot pixel buffer (cvpixelbufferref) 

i tried create , start avcapturesession , use device, gives same result.

what might issue here?

this appears bug in scenekit.

if works workaround use arscnview. gives access scenekit apis, , automatically draws video feed scene's background.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -