sdk5.6,addYuvDataListener回调的data是空是怎么回事?M350rtk
Completed-
我這裏按照你給到我的相同方法測試是可以拿到data的,下面是我在FPVWidget裏的代碼和结果: override fun surfaceCreated(holder: SurfaceHolder) { LogUtils.i(logTag, "surfaceCreated", videoChannelType, videoDecoder == null) if (videoDecoder == null) { videoDecoder = VideoDecoder( context, videoChannelType, DecoderOutputMode.SURFACE_MODE, fpvSurfaceView.holder, fpvSurfaceView.width, fpvSurfaceView.height, true ) } else if (videoDecoder?.decoderStatus == DecoderState.PAUSED) { videoDecoder?.onResume() }}override fun surfaceChanged(holder: SurfaceHolder, format: Int, width: Int, height: Int) { if (videoDecoder == null) { videoDecoder = VideoDecoder( context, videoChannelType, DecoderOutputMode.SURFACE_MODE, fpvSurfaceView.holder, fpvSurfaceView.width, fpvSurfaceView.height, true ) } else if (videoDecoder?.decoderStatus == DecoderState.PAUSED) { videoDecoder?.onResume() } LogUtils.i(logTag, "surfaceChanged", videoChannelType, videoDecoder?.videoWidth, videoDecoder?.videoHeight)}结果:2023-11-01 21:07:12.153 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 31129602023-11-01 21:07:12.191 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 31129602023-11-01 21:07:12.199 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 23347202023-11-01 21:07:12.225 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 23347202023-11-01 21:07:12.233 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 31129602023-11-01 21:07:12.249 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 23347202023-11-01 21:07:12.254 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 31129602023-11-01 21:07:12.281 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 23347202023-11-01 21:07:12.292 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 31129602023-11-01 21:07:12.316 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 23347202023-11-01 21:07:12.320 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 31129602023-11-01 21:07:12.353 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 23347202023-11-01 21:07:12.353 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 31129602023-11-01 21:07:12.389 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 31129602023-11-01 21:07:12.391 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 23347202023-11-01 21:07:12.418 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 23347202023-11-01 21:07:12.425 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 31129602023-11-01 21:07:12.450 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 23347202023-11-01 21:07:12.460 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 31129602023-11-01 21:07:12.483 16255-16708/com.dji.sampleV5.aircraft D/FPVWidget: surfaceCreated: data.size: 2334720
Please sign in to leave a comment.
Comments
7 comments