|
发表于 2016-12-8 12:55:35
只看该作者
61#
我测试的时候logcat下面这段信息:
V/UvcService( 1376): setUvcBusy cameraId=0
V/Uvc ( 1376): createDev mUvcId=0
V/Uvc ( 1376): valid mUvcDevice=0x0
V/UvcService( 1376): setUvcFree cameraId=0
D/UvcJNI ( 1383): valid
D/UvcClient( 1383): valid
D/IUvc ( 1376): VALID
V/Uvc ( 1376): valid mUvcDevice=0x0
D/UvcJNI ( 1383): release 0xb7c33570
D/UvcClient( 1383): disconnect
D/IUvc ( 1376): DISCONNECT
V/Uvc ( 1376): disconnect
V/Uvc ( 1376): destroyDev mUvcDevice=0x0
V/Uvc ( 1376): stopPreview
D/Uvc ( 1376): start FAIL : camera source invalid
D/UvcClient( 1383): setCallback 0x0
D/UvcClient( 1383): release
D/IUvc ( 1376): RELEASE
V/Uvc ( 1376): disconnect
V/Uvc ( 1376): destroyDev mUvcDevice=0x0
V/Uvc ( 1376): stopPreview
D/Uvc ( 1376): start FAIL : camera source invalid
V/Uvc ( 1376): ----destructor ----
V/Uvc ( 1376): -------------------
V/UvcService( 1376): Delete uvc base
D/UvcJNI ( 1383): JniTachographCallback destruct
楼主请问这个是什么原因啊?我 对着源码看了,好像是在下面这个函数有问题
JNIEXPORT void JNICALL Java_com_bunchen_uvc_Uvc_release
(JNIEnv *env, jobject obj)
{
sp<UvcClient> uvc = setUvcClient(env,obj,NULL);
ALOGD("release %p",uvc.get());
if(uvc.get()){
uvc->disconnect();
uvc->setCallback(NULL);
uvc->release();
}
sp<JniTachographCallback> callback = setJniTachographCallback(env,obj,NULL);
if(callback.get()){
callback.clear();
}
} |
|