diff --git a/app/build.gradle b/app/build.gradle index e73aa42c0..d45534faf 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -60,8 +60,8 @@ dependencies { implementation "com.tencent.bugly:nativecrashreport:$bugly_native_version" // For debug online -// implementation project(':libausbc') + implementation project(':libausbc') // demo - implementation 'com.github.jiangdongguo.AndroidUSBCamera:libausbc:3.1.7' +// implementation 'com.github.jiangdongguo.AndroidUSBCamera:libausbc:3.1.7' } diff --git a/libuvc/src/main/jni/UVCCamera/UVCPreview.cpp b/libuvc/src/main/jni/UVCCamera/UVCPreview.cpp index f2b0feedb..8cbfccee3 100644 --- a/libuvc/src/main/jni/UVCCamera/UVCPreview.cpp +++ b/libuvc/src/main/jni/UVCCamera/UVCPreview.cpp @@ -721,6 +721,9 @@ void UVCPreview::addCaptureFrame(uvc_frame_t *frame) { } captureQueu = frame; pthread_cond_broadcast(&capture_sync); + } else { + // Add this can solve native leak + recycle_frame(frame); } pthread_mutex_unlock(&capture_mutex); } diff --git a/libuvc/src/main/libs/arm64-v8a/libUVCCamera.so b/libuvc/src/main/libs/arm64-v8a/libUVCCamera.so index b435a5855..3c55def90 100644 Binary files a/libuvc/src/main/libs/arm64-v8a/libUVCCamera.so and b/libuvc/src/main/libs/arm64-v8a/libUVCCamera.so differ diff --git a/libuvc/src/main/libs/arm64-v8a/libjpeg-turbo1500.so b/libuvc/src/main/libs/arm64-v8a/libjpeg-turbo1500.so index 232631604..293377b4b 100644 Binary files a/libuvc/src/main/libs/arm64-v8a/libjpeg-turbo1500.so and b/libuvc/src/main/libs/arm64-v8a/libjpeg-turbo1500.so differ diff --git a/libuvc/src/main/libs/arm64-v8a/libusb100.so b/libuvc/src/main/libs/arm64-v8a/libusb100.so index e07934e74..efbf143ed 100644 Binary files a/libuvc/src/main/libs/arm64-v8a/libusb100.so and b/libuvc/src/main/libs/arm64-v8a/libusb100.so differ diff --git a/libuvc/src/main/libs/arm64-v8a/libuvc.so b/libuvc/src/main/libs/arm64-v8a/libuvc.so index e29b8461d..a86924120 100644 Binary files a/libuvc/src/main/libs/arm64-v8a/libuvc.so and b/libuvc/src/main/libs/arm64-v8a/libuvc.so differ diff --git a/libuvc/src/main/libs/armeabi-v7a/libUVCCamera.so b/libuvc/src/main/libs/armeabi-v7a/libUVCCamera.so index 861a4606b..4c75922f4 100644 Binary files a/libuvc/src/main/libs/armeabi-v7a/libUVCCamera.so and b/libuvc/src/main/libs/armeabi-v7a/libUVCCamera.so differ diff --git a/libuvc/src/main/libs/armeabi-v7a/libjpeg-turbo1500.so b/libuvc/src/main/libs/armeabi-v7a/libjpeg-turbo1500.so index 2e812e921..c9777ddb4 100644 Binary files a/libuvc/src/main/libs/armeabi-v7a/libjpeg-turbo1500.so and b/libuvc/src/main/libs/armeabi-v7a/libjpeg-turbo1500.so differ diff --git a/libuvc/src/main/libs/armeabi-v7a/libusb100.so b/libuvc/src/main/libs/armeabi-v7a/libusb100.so index cda0e0492..7b5c5b255 100644 Binary files a/libuvc/src/main/libs/armeabi-v7a/libusb100.so and b/libuvc/src/main/libs/armeabi-v7a/libusb100.so differ diff --git a/libuvc/src/main/libs/armeabi-v7a/libuvc.so b/libuvc/src/main/libs/armeabi-v7a/libuvc.so index 7f00f0a39..8b7b26b38 100644 Binary files a/libuvc/src/main/libs/armeabi-v7a/libuvc.so and b/libuvc/src/main/libs/armeabi-v7a/libuvc.so differ diff --git a/settings.gradle b/settings.gradle index fa7133e78..ccd1174f3 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,8 +1,8 @@ include ':app' // For debug online -//include ':libausbc' -//include ':libuvc' -//include ':libpush' -//include ':libnative' -//include ':libuvccommon' \ No newline at end of file +include ':libausbc' +include ':libuvc' +include ':libpush' +include ':libnative' +include ':libuvccommon' \ No newline at end of file