DJI-Mobile-SDK-Tutorials / Android-FPVDemo

This demo shows how to create a simple FPV view and how to take photo and record video using DJI Mobile SDK.
MIT License
62 stars 81 forks source link

Q: yuv decoding and preview - mutually exclusive? #38

Open neilyoung opened 5 years ago

neilyoung commented 5 years ago

Not a but, just a question: I played a bit with the DJIVideoStreamDecoding example. I noticed, that whenever yuv decoding is switched on

 mCodecManager.enabledYuvData(true);
 mCodecManager.setYuvDataCallback(this);

neither of the views (texture, surface) is updated anymore.

This observation is backed up by this series of traces after the switch above:

D/SurfaceUtils: disconnecting from surface 0x7d6e1a6010, reason disconnectFromSurface
D/DJIDecodeServer: releaseDecoder() end
E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
E/GLContextMgr17: OpenGL destoryed
E/GLYUVSurface: OpenGL destoryed
E/Lightbridge: startStream videoCtlobjet == NULL
D/DJIVideoDecoder: stopVideoDecoder()

Does that mean I can't video preview and yuv decode at the same time? Then I'm wondering, how I could flight if I just want to obtain the video for post processing purposes.