shiyinghan / UVCAndroid

Apache License 2.0
172 stars 46 forks source link

Can Not StartPreview For Multi Camera On Android 14 #65

Open ego9x opened 1 month ago

ego9x commented 1 month ago

On Android 14, I can start the first camera, but the first camera preview was blocked when the second camera preview started. I have checked the function void UVCPreview: do_preview(uvc_stream_ctrl_t *ctrl) on 'UVCPreview.cpp' and I think that do_preview function can not run on multi thread. Please check it.

https://github.com/shiyinghan/UVCAndroid/blob/03f5ec9b0a0234f0086c27221d564cbb4e6f4b3d/libuvccamera/src/main/jni/UVCCamera/UVCPreview.cpp#L551-L619

P/S: Android version less than 14 still works normally.

ego9x commented 4 weeks ago

@shiyinghan s Can you check it ? plz