dji-sdk / Mobile-SDK-Android

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

getPrimaryVideoFeed / provideTranscodedVideoFeed listeners don't return data #1226

Closed lmarz closed 1 year ago

lmarz commented 1 year ago

After connecting to the M2EA drone, I call:

VideoFeeder.getInstance().getPrimaryVideoFeed().addVideoDataListener((data, size) -> {
    Log.i("video feed", "received " + String.valueOf(size) + " bytes of data");
    ...
});

but this callback never gets called. I don't do anything else with the camera or the video feed. Is there any setup I have to do, before I can receive the video feed?

DJI-William commented 1 year ago

For Mavic 2 series, you need to use provideTranscodedVideoFeed instead of the getPrimaryVideoFeed.

lmarz commented 1 year ago

Thanks for the quick reply. Sadly, provideTranscodedVideoFeed doesn't give me anything either

DJI-William commented 1 year ago

Could you try the sample on this github? What is the result?

lmarz commented 1 year ago

The sample app gives blackscreens in the live feed view. The Video Feed from the Pilot App works. I've tried to create the most minimal test app here: https://github.com/lmarz/streamtest The relevant code is in MainActivity

brien-crean commented 1 year ago

I wonder if this is related to the Android device you are running? Some other users have had issues with some newer Android devices - Google Pixel 5A, Pixel 6A, Pixel 7(Not Pro), Samsung Tab S7 FE, Samsung A53 and Samsung S22.

What Android are you using @lmarz?

@dji-dev @DJI-William is there a planned release date for a new msdk v4 for Android to resolve the black screen issue.

Thanks

lmarz commented 1 year ago

It's running directly on the remote controller, the rm500 (Android 7.1)

dji-dev commented 1 year ago

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

Can you record a video using this demo to give us further insight into this issue? You can upload the video to this link:https://pan-sec.djicorp.com/s/St7Zz3PMGoY5nkY

°°°

lmarz commented 1 year ago

I have uploaded the video. I also included the log of me opening the LiveFeedView

dji-dev commented 1 year ago

Agent comment from ekho.feng in Zendesk ticket #81348:

The reason why getPrimaryVideoFeed is not calling the onReceive callback is Listener that is called when video data is received, but if isLensDistortionCalibrationNeeded return true, the callback will never be called. onReceive

°°°

lmarz commented 1 year ago

Found the issue. I just wasn't including the anti distortion library

dji-dev commented 1 year ago

Agent comment from ekho.feng in Zendesk ticket #81348:

The problem is already solved, right?

°°°

lmarz commented 1 year ago

It is. Thank you very much

dji-dev commented 1 year ago

Agent comment from ekho.feng in Zendesk ticket #81348:

You're welcome

°°°