saki4510t / UVCCamera

library and sample to access to UVC web camera on non-rooted Android device
3.02k stars 1.21k forks source link

Repeatedly open UVC, can not open preview #183

Open fengbenpaao opened 7 years ago

fengbenpaao commented 7 years ago

hi, my proble is that:
1.when I open device to startPreview() and close app to stopPreview, everything is ok;

2.but when I repeatedly the app for 10 times; the preview cannot show on app; the log is that:

01-02 00:54:32.445 6997-3096/com.oneed.uvc E/BufferQueueProducer: unnamed-6997-7 connect(P): already connected (cur=1 req=1) 01-02 00:54:32.445 6997-3096/com.oneed.uvc E/libEGL: eglCreateWindowSurface: native_window_api_connect (win=0xe2fa6908) failed (0xffffffea) (already connected to another API?) 01-02 00:54:32.445 6997-3096/com.oneed.uvc E/libEGL: eglCreateWindowSurface:421 error 3003 (EGL_BAD_ALLOC) 01-02 00:54:32.445 6997-3096/com.oneed.uvc E/libEGL: eglQuerySurface:597 error 300d (EGL_BAD_SURFACE) 01-02 00:54:32.445 6997-3096/com.oneed.uvc E/libEGL: eglQuerySurface:597 error 300d (EGL_BAD_SURFACE)

3.when I pull out the usb line, and insert again; the preview is ok;

so I think, if when stop preview, the surfaceView can not been destroied completely;

4.my test: usbCameraTest0~usbCameraTest8 and android5.0 the issues are all appearing ; but when I use window tool AMCAP.EXE to test , the result is well done;

bingyanxueling commented 6 years ago

I faced the same problem, Have you solved it?