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

DJICodecManager.enabledYuvData(true) makes the preview stuck #29

Open mizhoux opened 6 years ago

mizhoux commented 6 years ago

I want to receive the YUV data and do something with it. Then I followed the document and wrote such code:

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

while the MainAcitivity implements DJICodecManager.YuvDataCallback, and when clicking a button the code above would be executed.

But now as long as I click the button, the preview of the TextureView will be stuck. Even if I commented the code mCodecManager.setYuvDataCallback(this), the code mCodecManager.enabledYuvData(true) would still make the preview stuck when I click the button.

So how to deal with the problem and receive the YUV data correctly?

My devices' information: UAV: Phantom 4 Pro DJI SDK version: 4.5.1 Android System version: 7.0 AS version: 3.1

neilyoung commented 5 years ago

@mizhoux You will receive the yuv, even if the texture view is muted. Having the same issue. Seems to be by design. You would probably have to find a way to display the yuv.

I'm pretty depressed, that this issue is open since May 2018. In other words: It will never be fixed.

See also here: https://github.com/DJI-Mobile-SDK-Tutorials/Android-FPVDemo/issues/38