Liveview

2024-05-11
No Rating

Catalog

Enum

E_DjiLiveViewCameraPosition
E_DjiLiveViewCameraSource
DjiLiveview_H264Callback

Function

DjiLiveview_Init
DjiLiveview_Deinit
DjiLiveview_StartH264Stream
DjiLiveview_StopH264Stream
DjiLiveview_RequestIntraframeFrameData

Definition, Enum and Struct

Enum E_DjiLiveViewCameraPosition

Liveview camera mount position.

typedef enum {
DJI_LIVEVIEW_CAMERA_POSITION_NO_1 = DJI_MOUNT_POSITION_PAYLOAD_PORT_NO1,
DJI_LIVEVIEW_CAMERA_POSITION_NO_2 = DJI_MOUNT_POSITION_PAYLOAD_PORT_NO2,
DJI_LIVEVIEW_CAMERA_POSITION_NO_3 = DJI_MOUNT_POSITION_PAYLOAD_PORT_NO3,
DJI_LIVEVIEW_CAMERA_POSITION_FPV = 7
} E_DjiLiveViewCameraPosition;

Enum E_DjiLiveViewCameraSource

Liveview camera stream source.

typedef enum {
DJI_LIVEVIEW_CAMERA_SOURCE_DEFAULT = 0,
DJI_LIVEVIEW_CAMERA_SOURCE_H20_WIDE = 1,
DJI_LIVEVIEW_CAMERA_SOURCE_H20_ZOOM = 2,
DJI_LIVEVIEW_CAMERA_SOURCE_H20T_WIDE = 1,
DJI_LIVEVIEW_CAMERA_SOURCE_H20T_ZOOM = 2,
DJI_LIVEVIEW_CAMERA_SOURCE_H20T_IR = 3,
DJI_LIVEVIEW_CAMERA_SOURCE_H20N_WIDE = 1,
DJI_LIVEVIEW_CAMERA_SOURCE_H20N_ZOOM = 2,
DJI_LIVEVIEW_CAMERA_SOURCE_H20N_IR = 3,
DJI_LIVEVIEW_CAMERA_SOURCE_M30_ZOOM = 1,
DJI_LIVEVIEW_CAMERA_SOURCE_M30_WIDE = 2,
DJI_LIVEVIEW_CAMERA_SOURCE_M30T_ZOOM = 1,
DJI_LIVEVIEW_CAMERA_SOURCE_M30T_WIDE = 2,
DJI_LIVEVIEW_CAMERA_SOURCE_M30T_IR = 3,
DJI_LIVEVIEW_CAMERA_SOURCE_M3E_VIS = 1,
DJI_LIVEVIEW_CAMERA_SOURCE_M3T_VIS = 1,
DJI_LIVEVIEW_CAMERA_SOURCE_M3T_IR = 2,
DJI_LIVEVIEW_CAMERA_SOURCE_M3D_VIS = 1,
DJI_LIVEVIEW_CAMERA_SOURCE_M3TD_VIS = 1,
DJI_LIVEVIEW_CAMERA_SOURCE_M3TD_IR = 2,
} E_DjiLiveViewCameraSource;

typedef function DjiLiveview_H264Callback

typedef void (*DjiLiveview_H264Callback)(E_DjiLiveViewCameraPosition position, const uint8_t *buf, uint32_t len);

Function

Function DjiLiveview_Init

Initialize the liveview module.

Note: Must be called after DjiCore_Init.

T_DjiReturnCode DjiLiveview_Init(void);
Parameter
Return
The details for the return code please refer to: DjiErrorCode

Function DjiLiveview_Deinit

Deinitialize the liveview module.

T_DjiReturnCode DjiLiveview_Deinit(void);
Parameter
Return
The details for the return code please refer to: DjiErrorCode

Function DjiLiveview_StartH264Stream

Start the FPV or camera H264 stream from the specified position.

T_DjiReturnCode DjiLiveview_StartH264Stream(E_DjiLiveViewCameraPosition position, E_DjiLiveViewCameraSource source, DjiLiveview_H264Callback callback);
Parameter
position:Camera position for the H264 stream output.
source:sub-camera source for the H264 stream output.
callback:Callback function in a callback thread when a new h264 frame is received
Return
The details for the return code please refer to: DjiErrorCode

Function DjiLiveview_StopH264Stream

Stop the FPV or Camera H264 Stream from the specified position.

T_DjiReturnCode DjiLiveview_StopH264Stream(E_DjiLiveViewCameraPosition position, E_DjiLiveViewCameraSource source);
Parameter
position:Camera position for the H264 stream output.
source:sub-camera source for the H264 stream output.
Return
The details for the return code please refer to: DjiErrorCode

Function DjiLiveview_RequestIntraframeFrameData

Request the intraframe Frame of camera H264 stream from the specified position.

T_DjiReturnCode DjiLiveview_RequestIntraframeFrameData(E_DjiLiveViewCameraPosition position, E_DjiLiveViewCameraSource source);
Parameter
position:Camera position for the H264 stream output.
source:sub-camera source for the H264 stream output.
Return
The details for the return code please refer to: DjiErrorCode

If you have any comments or confusion about our documentation, you can click here to give feedback and we will get back to you as soon as possible.