Comments

7 comments

  • zarca

    修改的v5usdk的FPVWidget的类,新加

    YUV_MODE

    类型的解码器,添加

    addYuvDataListener获取到的data数据为空
    0
    Comment actions Permalink
  • zarca

    0
    Comment actions Permalink
  • DJI Developer Support
    能了解一下这个时候相机画面是正常显示的吗?
    0
    Comment actions Permalink
  • zarca

    是的,都是正常显示的

     

    0
    Comment actions Permalink
  • DJI Developer Support
    我這裏按照你給到我的相同方法測試是可以拿到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
    0
    Comment actions Permalink
  • zarca

    收到,感谢,我今天用M300进行测试,发现是可以拿到数据的,然后再次拿M350进行测试发现可以拿到数据了,一样的代码,具体是哪里出问题我也不清楚,很奇怪

    0
    Comment actions Permalink
  • DJI Developer Support
    您可以再观察看看什么情况会导致YUV数据为空。因为同一个通道的渲染和YUV解码器使用的数据源是相同的,因此正常来说表现应该一样,即有则都有,没有则都没有。如果您找到了稳定出现YUV解码器不工作的方法,也希望您可以反馈给我们,我们将会对这个问题进行确认,推进问题的修复。
    0
    Comment actions Permalink

Please sign in to leave a comment.