Reputation: 2648
After using the DJI Go 4 App I cannot access the video feed via the Mobile SDK from a Mavic 2 Pro without either power cycling the drone/remote or disconnecting and reconnecting the remote's usb cable from my iOS device.
This issue seems to be unique to the Mavic 2 (Pro). The issue does not happen with a Mavic Pro or a Phantom 4. I have tried resetting the DJICamera, DJIVideoFeed, DJIVideoFeedView and DJIVideoPreviewer(DJI Widget) instances but I cannot get the live video feed back. Has anyone experienced a similar issue?
UPDATE: Turns out that changing the aspect ratio, i.e. calling setPhotoAspectRatio:withCompletion
and passing it a different aspect ratio than the one currently set fixes the issue. Is there something else that may have the same effect rather than hackily toggling the aspect ratio?
Upvotes: 0
Views: 171
Reputation: 2648
After looking more closely at the DJI SDK Video Preview Adapter code here I realised I was not extending the DJIVideoPreviewerFrameControlDelegate methods parseDecodingAssistInfoWithBuffer, isNeedFitFrameWidth, syncDecoderStatus, decodingDidSucceedWithTimestamp and decodingDidFail which handle video decoding issues. Once I implemented the video adapter I was able to access the video feed regardless of which app had accessed it previously.
Upvotes: 0