dji-sdk / Mobile-SDK-Android

DJI Mobile SDK for Android: http://developer.dji.com/mobile-sdk/
Other
980 stars 579 forks source link

M300 not receiving video #621

Open tobiasfriden opened 3 years ago

tobiasfriden commented 3 years ago

Hello,

I am developing an app for Matrice 300 RTK and have issues receiving the video stream. The app works flawlessly for Mavic 2 with regular remote and smart controller (I am getting yuvFrames from the DJICodecManager). However with the M300, around half of the times I just don't get any video output. I have also tried with the FPVWidget in ux-sdk and the same result. The only solution so far is restarting the drone and smart controller until it suddenly starts working.

Also, the times when it does work, it stops working in my own app if I open the DJI Pilot app. However, in the DJI Pilot app the video is always visible.

Any help is greatly appreciated!

dji-dev commented 3 years ago

Agent comment from William Wong in Zendesk ticket #39298:

Dear Client Thank you for contacting DJI.

Recently we have a fiwareware update for M300. It need one more line of additional code to display the video stream. You need to call assignSourceToPrimaryChannel function before getPrimaryVideoFeed.

Hopefully our solution can help you. Kindly Regards, DJI Developer Support
inline-31163691.png

yandong-111 commented 3 years ago

Hello, I have the same problem. Has your problem been solved? I tried to call assignSourceToPrimaryChannel function, but it didn't solve the problem。

tobiasfriden commented 3 years ago

Hello,

After implementing assignSourceToPrimaryChannel in the app we now see the following behaviour:

On some occasions, we still don't get any video at all. The problem can however be resolved by "force quitting" the app through the settings menu. We see this behaviour in both out app and in DJI pilot, i. e. sometimes we don't get any video in DJI pilot until force quitting the app (or restarting the remote).

Most of the times, however:

The behaviour is better than before (we have a much higher success rate of aquiring the video feed) but still somewhat buggy.

AndreasNeilJensen commented 3 years ago

It seems our two issues might be related except that my own app ALWAYS works after an initial boot of the DJI Pilot App... My issue.

tobiasfriden commented 3 years ago

It seems our two issues might be related except that my own app ALWAYS works after an initial boot of the DJI Pilot App... My issue.

Definitely related, however as mentioned I saw (on rare occasions) that it doesn't even work in the Pilot app. That required a reboot of the controller or force-stopping the app in order for it to start working.