29 #ifndef ONBOARDSDK_DJI_LIVEVIEW_IMPL_H 30 #define ONBOARDSDK_DJI_LIVEVIEW_IMPL_H 35 #include "dji_linker.hpp" 45 LiveViewImpl(Vehicle *vehiclePtr);
49 LiveView::LiveViewErrCode startH264Stream(LiveView::LiveViewCameraPosition pos, H264Callback cb,
void *userData);
51 LiveView::LiveViewErrCode stopH264Stream(LiveView::LiveViewCameraPosition pos);
53 LiveView::LiveViewErrCode changeH264Source(LiveView::LiveViewCameraPosition pos, LiveView::LiveViewCameraSource source);
55 typedef struct H264CallbackHandler {
58 } H264CallbackHandler;
62 typedef enum E_OSDKCameraType {
63 OSDK_CAMERA_TYPE_PSDK = 31,
64 OSDK_CAMERA_TYPE_FPV = 39,
65 OSDK_CAMERA_TYPE_H20_DOUBLE_CAM = 42,
66 OSDK_CAMERA_TYPE_H20_TIRPLE_CAM = 43,
67 OSDK_CAMERA_TYPE_UNKNOWN = 0xFF
71 UUID_MAJOR_TYPE_CAMERA = 0,
72 UUID_MAJOR_TYPE_RADAR = 1,
73 UUID_MAJOR_TYPE_PSDK = 2,
74 UUID_MAJOR_TYPE_UNKNOWN = 255
84 } __attribute__((packed)) T_SubscribeData;
88 } __attribute__((packed)) T_HeartBeatData;
93 } __attribute__((packed)) T_LiveViewHeader;
101 } __attribute__((packed)) T_LiveViewMiniChannelItem;
112 uint8_t codecStrategy;
114 uint8_t adaptiveResolutionEnable;
117 } __attribute__((packed)) T_LiveViewChannelItem;
124 uint8_t devicePos : 3;
125 uint8_t reserved : 2;
126 } __attribute__((packed)) T_LiveViewUuid;
135 } __attribute__((packed)) T_LiveViewSingleSourceItem;
145 float blendingOffsetX;
146 float blendingOffsetY;
148 float blendingHeight;
149 } __attribute__((packed)) T_LiveViewMultiSourceItem;
152 T_LiveViewHeader header;
153 T_LiveViewChannelItem channel;
154 T_LiveViewSingleSourceItem source;
155 } __attribute__((packed)) T_LiveViewSubscribeItem;
158 T_LiveViewHeader header;
159 T_LiveViewMiniChannelItem channel;
160 } __attribute__((packed)) T_LiveViewUnsubscribeItem;
162 typedef struct CameraListType
164 E_OSDKCameraType cameraType[3];
171 static std::map<LiveView::LiveViewCameraPosition, H264CallbackHandler> h264CbHandlerMap;
172 static T_RecvCmdItem bulkCmdList[];
173 static E_OsdkStat RecordStreamHandler(
struct _CommandHandle *cmdHandle,
174 const T_CmdInfo *cmdInfo,
175 const uint8_t *cmdData,
177 static E_OsdkStat getCameraPushing(
struct _CommandHandle *cmdHandle,
178 const T_CmdInfo *cmdInfo,
179 const uint8_t *cmdData,
void *userData);
181 CameraListType getCameraList();
182 int subscribeLiveViewData(E_OSDKCameraType type, LiveView::LiveViewCameraPosition pos);
183 int unsubscribeLiveViewData(LiveView::LiveViewCameraPosition pos);
185 T_OsdkTaskHandle h264TaskHandle;
186 static void *heartBeatTask(
void *p);
187 E_OsdkStat startHeartBeatTask();
188 E_OsdkStat stopHeartBeatTask();
194 #endif //ONBOARDSDK_DJI_LIVEVIEW_IMPL_H Camera liveview API of OSDK.
Data type and Data Structure definitions for use throughout DJI OSDK.
Definition: dji_ack.cpp:38
Vehicle API for DJI onboardSDK library.