BradLarson / GPUImage2

GPUImage 2 is a BSD-licensed Swift framework for GPU-accelerated video and image processing.
BSD 3-Clause "New" or "Revised" License
4.86k stars 609 forks source link

camera.swift fatal error #81

Open sarko-92 opened 7 years ago

sarko-92 commented 7 years ago

i get fatal error when using SimpleVideoFilter example in camera.swift exactly on self.videoOutput.setSampleBufferDelegate(nil, queue:nil)
fatal error: unexpectedly found nil while unwrapping an Optional value please help..

deinit { sharedImageProcessingContext.runOperationSynchronously{ self.stopCapture() self.videoOutput.setSampleBufferDelegate(nil, queue:nil)
self.audioOutput?.setSampleBufferDelegate(nil, queue:nil) }

zubco commented 7 years ago

The majority of iOS example apps won't work on the simulator (because you don't have a camera there, you know...). Try the example on real iOS device ;) gl

sarko-92 commented 7 years ago

i know..also on an ios device its crashing :/

dd-ios commented 7 years ago

Hi. On iOS 10 you can have issues because of new permission policy. As far as i understand this repo have no updates in info.plist. Zubco's repo has it so you can try his fork

zubco commented 7 years ago

@dvma04 I have opened a PR 3 days ago, waiting for @BradLarson review.

dd-ios commented 7 years ago

@zubco i know this. i've left you a comment on yours PR, cause you missed microphone permissions in info.plist. Please review if it make sense. Maybe you need to update it.

zubco commented 7 years ago

@dvma04 updated

sarko-92 commented 7 years ago

@dvma04 i tried that.also same error

dd-ios commented 7 years ago

@sarko-92 looks like your issue is almost the same as this one https://github.com/BradLarson/GPUImage2/pull/52/files/97d778ad6afde5152901284386d7cc8a5eaea93a..0ac2f88fcf25dcccaa3d124be538c9c23083fd63. Please try it.

sarko-92 commented 7 years ago

@dvma04 thank u for ur response...i tried that also the same error... :/