Skip to main content

相机功能

PSDK 相机相关功能的头文件为uav_payload_camera.h,本文档描述了uav_payload_camera.h 文件中结构体和函数原型的关键信息和使用方法。

宏定义、枚举与结构体

E_UAVCameraMode

相机类负载设备的模式

typedef enum {
/*!
- Capture mode. In this mode, the user can capture pictures.
*/
UAV_CAMERA_MODE_SHOOT_PHOTO = 0,
/*!
- Record mode. In this mode, the user can record videos.
*/
UAV_CAMERA_MODE_RECORD_VIDEO = 1,
/*!
- Media playback work mode.
*/
UAV_CAMERA_MODE_PLAYBACK = 2,
/*!
* The camera work mode is unknown.
*/
UAV_CAMERA_MODE_WORK_MODE_UNKNOWN = 0xFF,
} E_UAVCameraMode;

E_UAVCameraShootPhotoMode

相机类负载设备的拍照模式

typedef enum {
/*!
- Sets the camera to take a single photo.
*/
UAV_CAMERA_SHOOT_PHOTO_MODE_SINGLE = 0x01,
/*!
- Sets the camera to take an HDR photo. X5 camera, X5R camera, XT camera,
Z30 camera, Phantom 4 Pro camera, X4S camera and X5S camera do not support
HDR mode.
*/
UAV_CAMERA_SHOOT_PHOTO_MODE_HDR = 0x02,
/*!
- Set the camera to take multiple photos at once. XT camera does not
support Burst mode.
*/
UAV_CAMERA_SHOOT_PHOTO_MODE_BURST = 0x04,
/*!
- Automatic Exposure Bracketing (AEB) capture. In this mode you can quickly
take multiple shots (the default is 3) at different exposures without
having to manually change any settings between frames. XT camera and Z30
camera does not support AEB mode.
*/
UAV_CAMERA_SHOOT_PHOTO_MODE_AEB = 0x05,
/*!
- Sets the camera to take a picture (or multiple pictures) continuously at
a set time interval. The minimum interval for JPEG format of any quality is
2s. For all cameras except X4S, X5S and Phantom 4 Pro camera: The minimum
interval for RAW or RAW+JPEG format is 10s. For the X4S, X5S and Phantom 4
Pro cameras the minimum interval for RAW or RAW+JPEG dformat is 5s.
*/
UAV_CAMERA_SHOOT_PHOTO_MODE_INTERVAL = 0x06,
/*!
- The shoot photo mode is unknown.
*/
UAV_CAMERA_SHOOT_PHOTO_MODE_UNKNOWN = 0xFF,
} E_UAVCameraShootPhotoMode;

E_UAVCameraShootingState

相机类负载设备拍照时的状态

typedef enum {
UAV_CAMERA_SHOOTING_PHOTO_IDLE = 0, /*!< Photographing in idle state. */
UAV_CAMERA_SHOOTING_SINGLE_PHOTO = 1, /*!< Photographing in single photograph state . */
UAV_CAMERA_SHOOTING_BURST_PHOTO = 2, /*!< Photographing in burst photograph state. */
UAV_CAMERA_SHOOTING_INTERVAL_PHOTO = 6, /*!< Photographing in interval photograph state. */
} E_UAVCameraShootingState;

E_UAVCameraMeteringMode

相机类负载设备拍照时的状态

typedef enum {
UAV_CAMERA_METERING_MODE_CENTER = 0, /*!< Center metering mode. */
UAV_CAMERA_METERING_MODE_AVERAGE = 1, /*!< Average metering mode. */
UAV_CAMERA_METERING_MODE_SPOT = 2, /*!< Spot metering mode. */
} E_UAVCameraMeteringMode;

E_UAVCameraFocusMode

相机类负载设备拍照时的状态

typedef enum {
/*!
- The camera's focus mode is set to manual. In this mode, user sets the
focus ring value to adjust the focal distance.
*/
UAV_CAMERA_FOCUS_MODE_MANUAL = 0,
/*!
- The camera's focus mode is set to auto. For the Z30 camera, the focus is
calculated completely automatically. For all other cameras, a focus target
can be set by the user, which is used to calculate focus automatically.
*/
UAV_CAMERA_FOCUS_MODE_AUTO = 1,
/*!
- The camera's focus mode is set to Continuous AF. It is only supported by
Mavic Pro with firmware version V01.03.0000 or above, X4S camera, Mavic 2
Zoom camera and Mavic 2 Pro camera.
*/
UAV_CAMERA_FOCUS_MODE_AFC = 2,
/*!
- The camera's focus mode is unknown.
*/
UAV_CAMERA_FOCUS_MODE_UNKNOWN = 0xFF,
} E_UAVCameraFocusMode;

E_UAVCameraMediaFileType

媒体文件的类型

typedef enum {
UAV_CAMERA_FILE_TYPE_JPEG = 0, /*!< Media file JPEG type. */
UAV_CAMERA_FILE_TYPE_DNG = 1, /*!< Media file DNG type. */
UAV_CAMERA_FILE_TYPE_MOV = 2, /*!< Media file MOV type. */
UAV_CAMERA_FILE_TYPE_MP4 = 3, /*!< Media file MP4 type. */
UAV_CAMERA_FILE_TYPE_TIFF = 5, /*!< Media file TIFF type. */
UAV_CAMERA_FILE_TYPE_PCD = 24, /*!< Media file point cloud type. */
UAV_CAMERA_FILE_TYPE_UNKNOWN = 255, /*!< Media file unknown type. */
} E_UAVCameraMediaFileType;

E_UAVCameraPlaybackMode

相机类负载设备的回放时的回放模式

typedef enum {
UAV_CAMERA_PLAYBACK_MODE_PLAY = 2, /*!< Play playbacking mode. */
UAV_CAMERA_PLAYBACK_MODE_PAUSE = 3, /*!< Pause playbacking mode. */
UAV_CAMERA_PLAYBACK_MODE_STOP = 7, /*!< Stop playbacking mode. */
} E_UAVCameraPlaybackMode;

E_UAVCameraVideoFrameRate

相机类负载设备的回放时的回放模式

typedef enum {
UAV_CAMERA_VIDEO_FRAME_RATE_24_FPS = 13, /*!< The camera's video frame rate is 24fps (frames per second) */
UAV_CAMERA_VIDEO_FRAME_RATE_25_FPS = 2, /*!< The camera's video frame rate is 25fps (frames per second) */
UAV_CAMERA_VIDEO_FRAME_RATE_30_FPS = 14, /*!< The camera's video frame rate is 30fps (frames per second) */
UAV_CAMERA_VIDEO_FRAME_RATE_UNKNOWN = 0, /*!< The camera's video frame rate is unknown (frames per second) */
} E_UAVCameraVideoFrameRate;

E_UAVCameraVideoResolution

相机类负载设备执行视频回放时支持的分辨率

typedef enum {
UAV_CAMERA_VIDEO_RESOLUTION_640x480 = 0, /*!< /The camera's video resolution is 640x480. */
UAV_CAMERA_VIDEO_RESOLUTION_1280x720 = 4, /*!< /The camera's video resolution is 1280x720. */
UAV_CAMERA_VIDEO_RESOLUTION_1920x1080 = 10, /*!< /The camera's video resolution is 1920x1080. */
UAV_CAMERA_VIDEO_RESOLUTION_2048x1080 = 37, /*!< /The camera's video resolution is 2048x1080. */
UAV_CAMERA_VIDEO_RESOLUTION_3840x2160 = 41, /*!< /The camera's video resolution is 3840x2160. */
UAV_CAMERA_VIDEO_RESOLUTION_UNKNOWN = 255, /*!< /The camera's video resolution is unknown. */
} E_UAVCameraVideoResolution;

T_UAVCameraSDCardState

相机类负载设备中SD 卡的状态

typedef struct {
bool isInserted; /*!< Specifies if the SD card is inserted in the camera. This parameter is boolean type. */
bool isVerified; /*!< Specifies if the SD card is verified as genuine. This parameter is boolean type. */
bool isInitializing; /*!< Specifies if the SD card is initializing. This parameter is boolean type. */
bool isReadOnly; /*!< Specifies if the SD card is read only type. This parameter is boolean type. */
bool isFormatting; /*!< Specifies if the SD card is in formatting process. This parameter is boolean type. */
bool isFull; /*!< Specifies if the SD card's capacity is full. This parameter is boolean type. */
bool isInvalidFormat;/*!< Specifies if the SD card is invalid formatted. This parameter is boolean type. */
bool hasError; /*!< Specifies if the SD card has error. This parameter is boolean type. */
uint32_t totalSpaceInMB; /*!< SD card total capacity, unit: MB. */
uint32_t remainSpaceInMB; /*!< SD card remaining capacity, unit: MB. */
uint32_t availableCaptureCount; /*!< Available capture photo count. */
uint32_t availableRecordingTimeInSeconds; /*!< Available video recording second time, unit: s. */
} T_UAVCameraSDCardState;

T_UAVCameraSpotMeteringTarget

指定相机类负载设备在点测光模式下的对象

typedef struct {
float meteringX; /*!< Specifies horizontal zone coordinate. This parameter is between 0 and 1.
The point [0.0, 0.0] represents the top-left angle of the screen.*/
float meteringY; /*!< Specifies vertical zone coordinate. This parameter is between 0 and 1. */

} T_UAVCameraSpotMeteringTarget;

T_UAVCameraSystemState

相机类负载设备的状态

typedef struct {
E_UAVCameraMode cameraMode; /*!< Specifies the camera current work mode, #E_UAVCameraMode. */
E_UAVCameraShootingState shootingState; /*!< Specifies the camera state of shooting, #E_UAVCameraShootingState. */
bool isStoring;/*!< Specifies if the camera is in storing status. This parameter is boolean type. */
bool isShootingIntervalStart; /*!< Specifies if the camera is in interval shooting start status. This parameter is boolean type. */
uint16_t currentPhotoShootingIntervalTimeInSeconds; /*!< Specifies the current interval shoot countdown time, the value is decreasing,
* when the value equals to zero trigger the interval take photo, uint:s. */
uint16_t currentPhotoShootingIntervalCount; /*!< Specifies the current interval photo count, the value is decreasing step by one from
* the setted count when interval taking photo */
bool isRecording; /*!< Specifies if the camera is in recording status. This parameter is boolean type. */
uint16_t currentVideoRecordingTimeInSeconds; /*!< Specifies the current recording process time, uint:s. */
bool isOverheating; /*!< Specifies if the camera is in overheating status. This parameter is boolean type. */
bool hasError; /*!< Specifies if the camera in error status. This parameter is boolean type. */
} T_UAVCameraSystemState;

T_UAVCameraCommonHandler

控制相机类负载设备执行基础动作,请根据本结构体中的函数构造相机类负载设备执行基础功能的回调函数,其中包括:

  • 获取相机类负载设备的当前状态
  • 设置相机类负载设备的工作模式
  • 获取相机类负载设备当前的工作模式
  • 控制相机类负载设备开始录像
  • 控制相机类负载设备停止录像
  • 控制相机类负载设备开始拍摄照片
  • 控制相机类负载设备停止拍摄照片
  • 设置相机类负载设备的拍照模式
  • 获取相机类负载设备当前的拍照模式
  • 设置相机类负载设备在连拍模式下的连拍张数
  • 获取相机类负载设备当前的连拍张数
  • 设置相机类负载设备在定时拍照模式下的拍照间隔
  • 获取相机类负载设备在定时拍照模式下的拍照间隔
  • 获取相机类负载设备中当前SD 卡状态
  • 控制相机类负载设备格式化SD 卡

说明:

  • 为防止该函数阻塞PSDK 的主线程,导致出现程序响应缓慢、相机类负载设备断连及死循环等问题,请勿以阻塞的方式在回调函数中执行该函数。
  • 使用控制相机类负载设备执行基础动作的功能时,请根据如下函数原型开发相机类负载设备的基础功能。
typedef struct {
/**
* @brief Prototype of callback function used to get camera system state.
* @param systemState: pointer to memory space used to store camera system state.
* @return Execution result.
*/
T_UAVReturnCode (*GetSystemState)(T_UAVCameraSystemState &systemState);

/**
* @brief Prototype of callback function used to set camera work mode.
* @note Sets the camera's work mode to taking pictures, video, playback. Please note that you cannot change the mode
* when a certain taskHandle is executing, such as taking photo(s), recording video, or downloading and saving files. Also
* supported by thermal imaging camera.
* @param mode: camera work mode.
* @return Execution result.
*/
T_UAVReturnCode (*SetMode)(E_UAVCameraMode mode);

/**
* @brief Prototype of callback function used to get camera current work mode.
* @param mode: pointer to memory space used to store camera work mode.
* @return Execution result.
*/
T_UAVReturnCode (*GetMode)(E_UAVCameraMode &mode);

/**
* @brief Prototype of callback function used to start record video.
* @return Execution result.
*/
T_UAVReturnCode (*StartRecordVideo)(void);

/**
* @brief Prototype of callback function used to stop record video.
* @return Execution result.
*/
T_UAVReturnCode (*StopRecordVideo)(void);

/**
* @brief Prototype of callback function used to start shoot photo.
* @return Execution result.
*/
T_UAVReturnCode (*StartShootPhoto)(void);

/**
* @brief Prototype of callback function used to stop shoot photo.
* @return Execution result.
*/
T_UAVReturnCode (*StopShootPhoto)(void);

/**
* @brief Prototype of callback function used to set camera shoot photo mode.
* @param mode: camera shoot photo mode.
* @return Execution result.
*/
T_UAVReturnCode (*SetShootPhotoMode)(E_UAVCameraShootPhotoMode mode);

/**
* @brief Prototype of callback function used to get camera current shoot photo mode.
* @param mode: pointer to memory space used to store camera shoot photo mode.
* @return Execution result.
*/
T_UAVReturnCode (*GetShootPhotoMode)(E_UAVCameraShootPhotoMode &mode);

/**
* @brief Prototype of callback function used to set camera shoot burst count.
* @param burstCount: camera shoot burst count.
* @return Execution result.
*/
T_UAVReturnCode (*SetPhotoBurstCount)(E_UAVCameraBurstCount burstCount);

/**
* @brief Prototype of callback function used to get camera current burst count.
* @param burstCount: pointer to memory space used to store camera shoot burst count.
* @return Execution result.
*/
T_UAVReturnCode (*GetPhotoBurstCount)(E_UAVCameraBurstCount &burstCount);

/**
* @brief Prototype of callback function used to set camera shoot time interval settings.
* @note The value range of interval photograph count is [2, 255]. If 255 is selected, then the camera will continue
* to take pictures until StopShootPhoto is called.
* @param settings: camera shoot time interval settings.
* @return Execution result.
*/
T_UAVReturnCode (*SetPhotoTimeIntervalSettings)(uint32_t timeIntervalSeconds);

/**
* @brief Prototype of callback function used to get camera shoot time interval settings.
* @param settings: pointer to memory space used to store camera shoot time interval settings.
* @return Execution result.
*/
T_UAVReturnCode (*GetPhotoTimeIntervalSettings)(uint32_t &timeIntervalSeconds);

/**
* @brief Prototype of callback function used to get camera current SDCard state.
* @param sdCardState: pointer to memory space used to store camera SDCard state.
* @return Execution result.
*/
T_UAVReturnCode (*GetSDCardState)(T_UAVCameraSDCardState &sdCardState);

/**
* @brief Prototype of callback function used to format the SDCard inserted.
* @return Execution result.
*/
T_UAVReturnCode (*FormatSDCard)(void);
} T_UAVCameraCommonHandler;

T_UAVCameraExposureMeteringHandler

控制相机类负载设备执行测光功能,请根据本结构体中的函数构造控制相机类负载设备执行测光相关功能的回调函数,其中包括:

  • 设置相机类负载设备的测光模式
  • 获取相机类负载设备当前的测光模式
  • 设置相机类负载设备在点测光模式下的测光对象
  • 获取相机类负载设备在点测光模式下的测光对象

说明:

  • 为防止该函数阻塞PSDK 的主线程,导致出现程序响应缓慢、相机类负载设备断连及死循环等问题,请勿以阻塞的方式在回调函数中执行该函数。
  • 使用控制相机类负载设备执行测光的功能时,请根据如下函数原型开发相机类负载设备的测光功能。
typedef struct {
/**
* @brief Prototype of callback function used to set camera metering mode.
* @param mode: camera metering mode.
* @return Execution result.
*/
T_UAVReturnCode (*SetMeteringMode)(E_UAVCameraMeteringMode mode);

/**
* @brief Prototype of callback function used to get camera current metering mode.
* @param mode: pointer to memory space used to store camera metering mode.
* @return Execution result.
*/
T_UAVReturnCode (*GetMeteringMode)(E_UAVCameraMeteringMode &mode);

/**
* @brief Prototype of callback function used to set camera spot metering target area.
* @param target: camera spot metering target area.
* @return Execution result.
*/
T_UAVReturnCode (*SetSpotMeteringTarget)(T_UAVCameraPointInScreen target);

/**
* @brief Prototype of callback function used to get camera spot metering target area.
* @param target: pointer to memory space used to store camera spot metering target area.
* @return Execution result.
*/
T_UAVReturnCode (*GetSpotMeteringTarget)(T_UAVCameraPointInScreen &target);
} T_UAVCameraExposureMeteringHandler;

T_UAVCameraFocusHandler

控制相机类负载设备执行对焦功能,请根据本结构体中的函数构造控制相机类负载设备执行对焦相关功能的回调函数,其中包括:

  • 设置相机类负载设备的对焦模式
  • 获取相机类负载设备当前的对焦模式
  • 设置相机类负载设备的对焦区域
  • 获取相机类负载设备的对焦区域
  • 设置相机类负载设备的对焦助手
  • 获取相机类负载设备对焦助手的状态
  • 设置相机类负载设备对焦环的值
  • 获取相机类负载设备对焦环的值
  • 获取相机类负载设备对焦环上限的值

说明:

  • 为防止该函数阻塞PSDK 的主线程,导致出现程序响应缓慢、相机类负载设备断连及死循环等问题,请勿以阻塞的方式在回调函数中执行该函数。
  • 使用控制相机类负载设备执行光学变焦的功能时,请根据如下函数原型开发相机类负载设备的光学变焦功能。
typedef struct {
/**
* @brief Prototype of callback function used to set camera focus mode.
* @param mode: camera focus mode.
* @return Execution result.
*/
T_UAVReturnCode (*SetFocusMode)(E_UAVCameraFocusMode mode);

/**
* @brief Prototype of callback function used to get camera current focus mode.
* @param mode: pointer to memory space used to store camera focus mode.
* @return Execution result.
*/
T_UAVReturnCode (*GetFocusMode)(E_UAVCameraFocusMode &mode);

/**
* @brief Prototype of callback function used to set camera focus target area.
* @param target: camera focus target area.
* @return Execution result.
*/
T_UAVReturnCode (*SetFocusTarget)(T_UAVCameraPointInScreen target);

/**
* @brief Prototype of callback function used to get camera focus target area.
* @param target: pointer to memory space used to store camera focus target area.
* @return Execution result.
*/
T_UAVReturnCode (*GetFocusTarget)(T_UAVCameraPointInScreen &target);

/**
* @brief Prototype of callback function used to set camera focus assistant settings.
* @param settings: camera focus assistant settings.
* @return Execution result.
*/
T_UAVReturnCode (*SetFocusAssistantSettings)(T_UAVCameraFocusAssistantSettings settings);

/**
* @brief Prototype of callback function used to get camera focus assistant settings.
* @param settings: pointer to memory space used to store camera focus assistant settings.
* @return Execution result.
*/
T_UAVReturnCode (*GetFocusAssistantSettings)(T_UAVCameraFocusAssistantSettings &settings);

/**
* @brief Prototype of callback function used to set camera focus ring value.
* @param value: camera focus ring value.
* @return Execution result.
*/
T_UAVReturnCode (*SetFocusRingValue)(uint32_t value);

/**
* @brief Prototype of callback function used to get camera focus ring value.
* @param value: pointer to memory space used to store camera focus ring value.
* @return Execution result.
*/
T_UAVReturnCode (*GetFocusRingValue)(uint32_t &value);

/**
* @brief Prototype of callback function used to get camera focus upper bound ring value.
* @param value: pointer to memory space used to store camera focus upper bound value.
* @return Execution result.
*/
T_UAVReturnCode (*GetFocusRingValueUpperBound)(uint32_t &value);
} T_UAVCameraFocusHandler;

T_UAVCameraDigitalZoomHandler

控制相机类负载设备执行对焦功能,请根据本结构体中的函数构造控制相机类负载设备执行对焦相关功能的回调函数,其中包括:

  • 设置相机类负载设备数字变焦倍数的回调函数
  • 获取相机类负载设备数字变焦倍数的回调函数

说明:

  • 为防止该函数阻塞PSDK 的主线程,导致出现程序响应缓慢、相机类负载设备断连及死循环等问题,请勿以阻塞的方式在回调函数中执行该函数。
  • 使用控制相机类负载设备执行数字变焦的功能时,请根据如下函数原型开发相机类负载设备的数字变焦功能。
typedef struct {
/**
* @brief Prototype of callback function used to set camera digital zoom factor.
* @param factor: camera digital zoom factor.
* @return Execution result.
*/
T_UAVReturnCode (*SetDigitalZoomFactor)(autel_f32_t factor);

/**
* @brief Prototype of callback function used to get camera current digital zoom factor.
* @param factor: pointer to memory space used to store camera current digital zoom factor.
* @return Execution result.
*/
T_UAVReturnCode (*GetDigitalZoomFactor)(autel_f32_t &factor);
} T_UAVCameraDigitalZoomHandler;

T_UAVCameraOpticalZoomHandler

控制相机类负载设备执行光学变焦功能,请根据本结构体中的函数构造控制相机类负载设备执行光学变焦相关功能的回调函数,其中包括:

  • 设置相机类负载设备光学变焦的焦距
  • 获取相机类负载设备光学变焦的焦距
  • 获取相机类负载设备光学变焦的倍数
  • 获取相机类负载设备当前光学变焦的倍数
  • 控制相机类负载设备开始连续光学变焦
  • 控制相机类负载设备停止连续光学变焦

说明:

  • 为防止该函数阻塞PSDK 的主线程,导致出现程序响应缓慢、相机类负载设备断连及死循环等问题,请勿以阻塞的方式在回调函数中执行该函数。
  • 使用控制相机类负载设备执行光学变焦的功能时,请根据如下函数原型开发相机类负载设备的光学变焦功能。
typedef struct {
/**
* @brief Prototype of callback function used to set camera optical zoom focal length.
* @param focalLength: camera optical zoom focal length.
* @return Execution result.
*/
T_UAVReturnCode (*SetOpticalZoomFocalLength)(uint32_t focalLength);

/**
* @brief Prototype of callback function used to get camera optical zoom focal length.
* @param focalLength: pointer to memory space used to store camera optical zoom focal length.
* @return Execution result.
*/
T_UAVReturnCode (*GetOpticalZoomFocalLength)(uint32_t &focalLength);

/**
* @brief Prototype of callback function used to get camera optical zoom factor.
* @param factor: pointer to memory space used to store camera optical zoom factor.
* @return Execution result.
*/
T_UAVReturnCode (*GetOpticalZoomFactor)(autel_f32_t &factor);

/**
* @brief Prototype of callback function used to get camera optical zoom specifies.
* @param spec: pointer to memory space used to store camera optical zoom specifies.
* @return Execution result.
*/
T_UAVReturnCode (*GetOpticalZoomSpec)(T_UAVCameraOpticalZoomSpec &spec);

/**
* @brief Prototype of callback function used to start continuous optical zoom.
* @param direction: camera zoom direction.
* @param speed: camera zoom speed.
* @return Execution result.
*/
T_UAVReturnCode (*StartContinuousOpticalZoom)(E_UAVCameraZoomDirection direction, E_UAVCameraZoomSpeed speed);

/**
* @brief Prototype of callback function used to stop continuous optical zoom.
* @return Execution result.
*/
T_UAVReturnCode (*StopContinuousOpticalZoom)(void);
} T_UAVCameraOpticalZoomHandler;

函数原型

UAVPayloadCamera_Init

功能:相机模块初始化

使用相机类功能前,请先调用本接口初始化相机模块;

T_UAVReturnCode UAVPayloadCamera_Init(void);

UAVPayloadCamera_RegCommonHandler

功能:注册相机类负载设备的基础功能

注册相机类负载设备基础功能接口的句柄。

T_UAVReturnCode UAVPayloadCamera_RegCommonHandler(const T_UAVCameraCommonHandler *cameraCommonHandler);

UAVPayloadCamera_RegExposureMeteringHandler

功能:注册相机类负载设备曝光和测光的功能

注册相机类负载设备执行曝光和测光功能接口的句柄。

T_UAVReturnCode UAVPayloadCamera_RegExposureMeteringHandler(const T_UAVCameraExposureMeteringHandler *cameraExposureMeteringHandler);

UAVPayloadCamera_RegFocusHandler

功能:注册相机类负载设备曝光和测光的功能

注册相机类负载设备执行对焦功能接口的句柄。

T_UAVReturnCode UAVPayloadCamera_RegFocusHandler(const T_UAVCameraFocusHandler *cameraFocusHandler);

UAVPayloadCamera_RegDigitalZoomHandler

功能:注册相机类负载设备的数字变焦功能

注册相机类负载设备执行数字变焦功能接口的句柄。

T_UAVReturnCode UAVPayloadCamera_RegDigitalZoomHandler(const T_UAVCameraDigitalZoomHandler
*cameraDigitalZoomHandler);

UAVPayloadCamera_RegOpticalZoomHandler

功能:注册相机类负载设备的光学变焦功能

注册相机类负载设备执行光学变焦功能接口的句柄。

T_UAVReturnCode UAVPayloadCamera_RegOpticalZoomHandler(const T_UAVCameraOpticalZoomHandler
*cameraOpticalZoomHandler);

UAVPayloadCamera_GetVideoStreamRemoteAddress

功能:获取发送视频流的目标地址

用户可以获取视频流传输的目标地址,在异构系统中通过其他子系统独立发送视频流数据。

T_UAVReturnCode UAVPayloadCamera_GetVideoStreamRemoteAddress(char *ipAddr, uint16_t *port);

UAVPayloadCamera_SendVideoStream

功能:通过数据通道的视频流将视频发送到移动端

通过数据通道的视频流将视频发送到移动端。 该函数存在且只能在 Linux 中使用。

T_UAVReturnCode UAVPayloadCamera_SendVideoStream(const uint8_t *data, uint16_t len);

UAVPayloadCamera_GetVideoStreamState

功能:获取“videoStream”通道的数据传输状态

获取“videoStream”通道的数据传输状态。 用户可以使用状态作为控制视频流数据传输的基础。 该函数存在且只能在Linux操作系统中使用。

T_UAVReturnCode UAVPayloadCamera_GetVideoStreamState(T_UAVDataChannelState *state);

UAVPayloadCamera_GetCameraTypeOfPayload

功能:获取安装在飞机上的其他相机类负载的类型

T_UAVReturnCode UAVPayloadCamera_GetCameraTypeOfPayload(E_UAVMountPosition payloadPosition,  E_UAVCameraType *cameraType);

UAVPayloadCamera_GetCameraHybridZoomFocalLengthOfPayload

功能:获取安装在飞机上的其他相机有效载荷的混合变焦焦距

T_UAVReturnCode UAVPayloadCamera_GetCameraHybridZoomFocalLengthOfPayload(E_UAVMountPosition payloadPosition, uint16_t *focalLength);