dji-sdk / Mobile-SDK-Android

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

Process frame by frame with DJI SDK 4.16.4, Mini2 and Android 13 #1237

Closed MilivojeKuc closed 1 year ago

MilivojeKuc commented 1 year ago

Hi everyone,

I just started working on a project and I have to fetch frames from the camera, process them and print some output.

I tried quite a few approaches that I found. I even tried to do something by myself but with no success.

The last code I tried (which was promising) is https://github.com/DJI-Mobile-SDK-Tutorials/Android-VideoStreamDecodingSample/tree/master but only works for older versions of Android because the djvideojni library is not supported for newer androids.

Does anyone know if is this feasible? Any help is welcome.

dji-dev commented 1 year ago

Agent comment from yating.liao in Zendesk ticket #86684:

Currently, MSDK V4 has not been adapted for Android 13. Therefore, we cannot guarantee stable usage of the SDK on Android 13.

Could you please confirm if the Mobile-SDK-Android is functioning properly on your device? The VideoFeeder is the page where the video display is shown.

°°°

MilivojeKuc commented 1 year ago

Yes. I successfully built and ran the Mobile-SDK-Android application on Android 13 phone. The live stream and virtual joysticks work well. I only checked them because I only need them (getting frames and sending controls to the drone).

dji-dev commented 1 year ago

Agent comment from yating.liao in Zendesk ticket #86684:

t appears that you are now able to obtain the desired data on MSDK V4. However, I would like to inquire if your issue is still related to the lack of support for Android 13 on MSDK V4.

We have already planned to provide support for Android 13 and anticipate its release within the next two versions.

°°°

MilivojeKuc commented 1 year ago

This is basically more of a question is there any way to fetch frames from the camera without much latency. This is not related to some issues with MSDK support, but I was hoping I could get some help here.

dji-dev commented 1 year ago

Agent comment from yating.liao in Zendesk ticket #86684:

Do you mean it takes a long time to get I-frames? There is an article available that discusses various methods which you might find useful:How to solve the video stream decoding failure obtained by StreamDataListener?

°°°

MilivojeKuc commented 1 year ago

I modified a code from the link I shared above and it somehow works for my use case. Anyway, thank you for your support.