Silence-GitHub / BBMetalImage

A high performance Swift library for GPU-accelerated image/video processing based on Metal.
MIT License
989 stars 126 forks source link

Telephoto and Ultra wide angle camera suddenly stop working view is freezes #97

Open piyu2468 opened 2 years ago

piyu2468 commented 2 years ago

Hello i m using this library it's awesome but suddenly when i change Avacpture device type wideangel to telephoto BBMetal view is freeze earlier it's work properly please help to what is and issue and if you change and implement new settings which is required for above functionality please tell us Thanks

Silence-GitHub commented 2 years ago

I don't have any device supporting telephoto camera. I tested builtInUltraWideCamera and it worked well.

Ensure your camera is running, call start() function after creating a new camera.

The problem may be cause by filter chain. If one of the image sources dose not transmit texture, the metal view freezes. For example, see the code below. The imageSource should transmit texture each time before or after camera transmitting. If the imageSource stops transmitting, the filter will not transmit texture, so the metalView freezes.

camera.add(consumer: filter)
imageSource.add(consumer: filter)
filter.add(consumer: metalView)