码迷,mamicode.com
首页 > 其他好文 > 详细

异常 lock buffer failed for format 0x23

时间:2020-02-12 16:19:58      阅读:97      评论:0      收藏:0      [点我收藏+]

标签:form   shared   cep   one   exti   looper   sources   war   image   

 

02-11 21:21:45.669625 14804 14815 W Monkey  : // java.lang.RuntimeException: lock buffer failed for format 0x23
02-11 21:21:45.669625 14804 14815 W Monkey  : // 	at android.media.ImageReader$SurfaceImage.nativeCreatePlanes(Native Method)
02-11 21:21:45.669625 14804 14815 W Monkey  : // 	at android.media.ImageReader$SurfaceImage.getPlanes(ImageReader.java:896)
02-11 21:21:45.669625 14804 14815 W Monkey  : // 	at com.android.camera.one.v2.camera2proxy.AndroidImageProxy.<init>(AndroidImageProxy.java:112)
02-11 21:21:45.669625 14804 14815 W Monkey  : // 	at com.android.camera.one.v2.camera2proxy.AndroidImageReaderProxy.acquireNextImage(AndroidImageReaderProxy.java:135)
02-11 21:21:45.669625 14804 14815 W Monkey  : // 	at com.android.camera.one.v2.camera2proxy.ForwardingImageReader.acquireNextImage(ForwardingImageReader.java:67)
02-11 21:21:45.669625 14804 14815 W Monkey  : // 	at com.android.camera.one.v2.LoggingImageReader.acquireNextImage(LoggingImageReader.java:61)
02-11 21:21:45.669625 14804 14815 W Monkey  : // 	at com.android.camera.one.v2.camera2proxy.ForwardingImageReader.acquireNextImage(ForwardingImageReader.java:67)
02-11 21:21:45.669625 14804 14815 W Monkey  : // 	at com.android.camera.one.v2.CloseWhenDoneImageReader.acquireNextImage(CloseWhenDoneImageReader.java:86)
02-11 21:21:45.669625 14804 14815 W Monkey  : // 	at com.android.camera.one.v2.sharedimagereader.imagedistributor.ImageDistributorOnImageAvailableListener.onImageAvailable(ImageDistributorOnImageAvailableListener.java:46)
02-11 21:21:45.669625 14804 14815 W Monkey  : // 	at com.android.camera.one.v2.camera2proxy.AndroidImageReaderProxy$1.onImageAvailable(AndroidImageReaderProxy.java:149)
02-11 21:21:45.669625 14804 14815 W Monkey  : // 	at android.media.ImageReader$ListenerHandler.handleMessage(ImageReader.java:800)
02-11 21:21:45.669625 14804 14815 W Monkey  : // 	at android.os.Handler.dispatchMessage(Handler.java:106)
02-11 21:21:45.669625 14804 14815 W Monkey  : // 	at android.os.Looper.loop(Looper.java:193)
02-11 21:21:45.669625 14804 14815 W Monkey  : // 	at android.os.HandlerThread.run(HandlerThread.java:65)

  

 

 

/home/lipn/Android/Sdk/sources/android-29/android/media/ImageReader.java
getPlanes---->nativeCreatePlanes

/android_mtk_p0_mp1/frameworks/base/media/jni/android_media_ImageReader.cpp
{"nativeCreatePlanes", "(II)[Landroid/media/ImageReader$SurfaceImage$SurfacePlane;", (void*)Image_createSurfacePlanes },
Image_createSurfacePlanes------>Image_getLockedImage------->lockImageFromBuffer
// jniThrowExceptionFmt(env, "java/lang/RuntimeException", "lock buffer failed for format 0x%x",buffer->mGraphicBuffer->getPixelFormat());

/android_mtk_p0_mp1/frameworks/base/media/jni/android_media_Utils.cpp
lockImageFromBuffer----->lockAsync
// ALOGE("Lock buffer failed!");

/android_mtk_p0_mp1/frameworks/native/libs/ui/GraphicBufferMapper.cpp
lockAsync------>mMapper->lock
// ALOGW_IF(error != Gralloc2::Error::NONE, "lock(%p, ...) failed: %d", handle, error);

 

02-11 21:21:45.640455 20126 25973 W GraphicBufferMapper: lock(0x634cee80, ...) failed: 3
02-11 21:21:45.640587 20126 25973 E AndroidMediaUtils: Lock buffer failed!
02-11 21:21:45.640661 20126 25973 E AndroidMediaUtils: lockImageFromBuffer: lock graphic buffer failed

 

YCbCr模型来源于yuv模型。
lock buffer failed for format 0x23 // 0x23是HAL_PIXEL_FORMAT_YCbCr_420_888;

lockAsyncYCbCr for YUV is unsuccessful. // YCbCr和YUV异步转换锁定失败

nativeCreatePlanes(ImageReader.this.mNumPlanes, ImageReader.this.mFormat); // mNumPlanes = 3; mFormat = 0x23

异常 lock buffer failed for format 0x23

标签:form   shared   cep   one   exti   looper   sources   war   image   

原文地址:https://www.cnblogs.com/lipeineng/p/12299300.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!