How to display drone camera footage on the main screen

Completed

Comments

1 comment

  • DJI Developer Support
    The process for displaying the camera feed in MSDK V4 is outlined as follows: 1. Complete the SDK registration to activate the SDK's functionality. 2. For M300 and M350, allocate the video source channels using the assignSourceToPrimaryChannel interface. 3. Obtain the VideoFeeder object through VideoFeeder.getInstance. 4. Retrieve the corresponding video feed for the primary channel using getPrimaryVideoFeed/getSecondaryVideoFeed. 5. Use videofeed.addVideoDataListener to access the video stream data. The callback continuously pushes video frame data. If you need to perform your own encoding and decoding, this is where you achieve that. 6. Create an instance of DJICodecManager to bind the user's display View instance. 7. Set the corresponding channel through DJICodecManager.switchSource. You can also set the channel when creating the DJICodecManager instance. 8. Pass the frame data pushed by VideoDataListener as a parameter to sendDataToDecoder. This completes the rendering of the camera feed on the specified view. Here is the sample code: https://github.com/dji-sdk/Mobile-SDK-Android/blob/master/Sample%20Code/app/src/main/java/com/dji/sdk/sample/demo/camera/VideoFeederView.java
    0
    Comment actions Permalink

Please sign in to leave a comment.