DJI::OSDK::CameraManager Class Reference

The manager of camera module. More...

#include <dji_camera_manager.hpp>

Public Member Functions

 CameraManager (Vehicle *vehiclePtr)
 
ErrorCode::ErrorCodeType initCameraModule (PayloadIndexType index, const char *name)
 init the camera module More...
 
ErrorCode::ErrorCodeType deinitCameraModule (PayloadIndexType index)
 Deinit the camera module. It is a opposite operation to initCameraModule. It means this camera will disable. In the deinit, the camera module will set name to be defaultCameraName and set enable to be false. More...
 
void deinitAllCameraModule (void)
 deinit all the camera modules More...
 
ErrorCode::ErrorCodeType getCameraModuleName (PayloadIndexType index, std::string &name)
 get the name of camera module, searched by index More...
 
ErrorCode::ErrorCodeType getCameraModuleIndex (const char *name, uint8_t &index)
 get the index of camera module, searched by name More...
 
ErrorCode::ErrorCodeType getCameraModuleEnable (PayloadIndexType index, bool &enable)
 get the enable status of camera module, searched by index More...
 
std::string getCameraVersion (PayloadIndexType index)
 
std::string getFirmwareVersion (PayloadIndexType index)
 
void startShootPhotoAsync (PayloadIndexType index, CameraModule::ShootPhotoMode mode, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 start to shoot photo, non-blocking calls More...
 
ErrorCode::ErrorCodeType startShootPhotoSync (PayloadIndexType index, CameraModule::ShootPhotoMode mode, int timeout)
 start to shoot photo, blocking calls More...
 
void stopShootPhotoAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 stop to shoot photo, non-blocking calls More...
 
ErrorCode::ErrorCodeType stopShootPhotoSync (PayloadIndexType index, int timeout)
 stop to shoot photo, blocking calls More...
 
void setShootPhotoModeAsync (PayloadIndexType index, CameraModule::ShootPhotoMode takePhotoMode, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 set the shoot photo mode, non-blocking calls More...
 
ErrorCode::ErrorCodeType setShootPhotoModeSync (PayloadIndexType index, CameraModule::ShootPhotoMode takePhotoMode, int timeout)
 set the shoot photo mode, blocking calls More...
 
void getShootPhotoModeAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, CameraModule::ShootPhotoMode takePhotoMode, UserData userData), UserData userData)
 get the shoot photo mode, non-blocking calls More...
 
ErrorCode::ErrorCodeType getShootPhotoModeSync (PayloadIndexType index, CameraModule::ShootPhotoMode &takePhotoMode, int timeout)
 get the shoot photo mode, blocking calls More...
 
void setPhotoBurstCountAsync (PayloadIndexType index, CameraModule::PhotoBurstCount count, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 set the burst count in the Burst take-photo mode, non-blocking calls More...
 
ErrorCode::ErrorCodeType setPhotoBurstCountSync (PayloadIndexType index, CameraModule::PhotoBurstCount count, int timeout)
 set the burst count in the Burst take-photo mode, blocking calls More...
 
void getPhotoBurstCountAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, CameraModule::PhotoBurstCount count, UserData userData), UserData userData)
 
ErrorCode::ErrorCodeType getPhotoBurstCountSync (PayloadIndexType index, CameraModule::PhotoBurstCount &count, int timeout)
 get the burst count in the Burst take-photo mode, blocking calls More...
 
void setPhotoAEBCountAsync (PayloadIndexType index, CameraModule::PhotoAEBCount count, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 set the burst count in the AEB take-photo mode, non-blocking calls More...
 
ErrorCode::ErrorCodeType setPhotoAEBCountSync (PayloadIndexType index, CameraModule::PhotoAEBCount count, int timeout)
 set the burst count in the AEB take-photo mode, blocking calls More...
 
void getPhotoAEBCountAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, CameraModule::PhotoAEBCount count, UserData userData), UserData userData)
 
ErrorCode::ErrorCodeType getPhotoAEBCountSync (PayloadIndexType index, CameraModule::PhotoAEBCount &count, int timeout)
 get the burst count in the AEB take-photo mode, blocking calls More...
 
void setPhotoTimeIntervalSettingsAsync (PayloadIndexType index, CameraModule::PhotoIntervalData intervalSetting, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 set the parameters in the INTERVAL take-photo mode, non-blocking calls More...
 
ErrorCode::ErrorCodeType setPhotoTimeIntervalSettingsSync (PayloadIndexType index, CameraModule::PhotoIntervalData intervalSetting, int timeout)
 set the parameters in the INTERVAL take-photo mode, blocking calls More...
 
void getPhotoIntervalDatasAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, CameraModule::PhotoIntervalData intervalSetting, UserData userData), UserData userData)
 get the parameters in the INTERVAL take-photo mode, non-blocking calls More...
 
ErrorCode::ErrorCodeType getPhotoIntervalDatasSync (PayloadIndexType index, CameraModule::PhotoIntervalData &intervalSetting, int timeout)
 get the parameters in the INTERVAL take-photo mode, blocking calls More...
 
void startRecordVideoAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 start to take video, non-blocking calls More...
 
ErrorCode::ErrorCodeType startRecordVideoSync (PayloadIndexType index, int timeout)
 start to take video, blocking calls More...
 
void stopRecordVideoAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 stop to take video, non-blocking calls More...
 
ErrorCode::ErrorCodeType stopRecordVideoSync (PayloadIndexType index, int timeout)
 stop to take video, blocking calls More...
 
void setModeAsync (PayloadIndexType index, CameraModule::WorkMode mode, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 set camera working mode, non-blocking calls More...
 
ErrorCode::ErrorCodeType setModeSync (PayloadIndexType index, CameraModule::WorkMode mode, int timeout)
 set camera working mode, blocking calls More...
 
void getModeAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, CameraModule::WorkMode workingMode, UserData userData), UserData userData)
 get camera working mode, non-blocking calls More...
 
ErrorCode::ErrorCodeType getModeSync (PayloadIndexType index, CameraModule::WorkMode &workingMode, int timeout)
 get camera working mode, blocking calls More...
 
void setFocusModeAsync (PayloadIndexType index, CameraModule::FocusMode mode, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 set camera focus mode, non-blocking calls More...
 
ErrorCode::ErrorCodeType setFocusModeSync (PayloadIndexType index, CameraModule::FocusMode mode, int timeout)
 get camera focus mode, blocking calls More...
 
void getFocusModeAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, CameraModule::FocusMode focusMode, UserData userData), UserData userData)
 get camera focus mode, non-blocking calls More...
 
ErrorCode::ErrorCodeType getFocusModeSync (PayloadIndexType index, CameraModule::FocusMode &focusMode, int timeout)
 get camera focus mode, blocking calls More...
 
void setFocusTargetAsync (PayloadIndexType index, CameraModule::TapFocusPosData tapFocusPos, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 set camera tap focus target point, non-blocking calls More...
 
ErrorCode::ErrorCodeType setFocusTargetSync (PayloadIndexType index, CameraModule::TapFocusPosData tapFocusPos, int timeout)
 set camera focus point, blocking calls More...
 
void getFocusTargetAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType, CameraModule::TapFocusPosData tapFocusPos, UserData userData), UserData userData)
 get camera tap focus target point, non-blocking calls More...
 
ErrorCode::ErrorCodeType getFocusTargetSync (PayloadIndexType index, CameraModule::TapFocusPosData &tapFocusPos, int timeout)
 get camera focus point, blocking calls More...
 
void startContinuousOpticalZoomAsync (PayloadIndexType index, CameraModule::zoomDirectionData zoomDirection, CameraModule::zoomSpeedData zoomSpeed, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 start camera optical zooming, non-blocking calls More...
 
ErrorCode::ErrorCodeType startContinuousOpticalZoomSync (PayloadIndexType index, CameraModule::zoomDirectionData zoomDirection, CameraModule::zoomSpeedData zoomSpeed, int timeout)
 start camera optical zooming, blocking calls More...
 
ErrorCode::ErrorCodeType setOpticalZoomFactorSync (PayloadIndexType index, float factor, int timeout)
 set parameters for camera optical zooming, blocking calls More...
 
ErrorCode::ErrorCodeType getOpticalZoomFactorSync (PayloadIndexType index, float &factor, int timeout)
 get parameters of camera optical zooming, blocking calls More...
 
void stopContinuousOpticalZoomAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 stop camera optical zooming, non-blocking calls More...
 
ErrorCode::ErrorCodeType stopContinuousOpticalZoomSync (PayloadIndexType index, int timeout)
 stop camera optical zooming, blocking calls More...
 
void setTapZoomEnabledAsync (PayloadIndexType index, bool param, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 set camera tap zoom function parameters, non-blocking calls More...
 
ErrorCode::ErrorCodeType setTapZoomEnabledSync (PayloadIndexType index, bool param, int timeout)
 set camera tap zoom parameters, blocking calls More...
 
void getTapZoomEnabledAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, bool param, UserData userData), UserData userData)
 get camera tap zoom function parameters, non-blocking calls More...
 
ErrorCode::ErrorCodeType getTapZoomEnabledSync (PayloadIndexType index, bool &param, int timeout)
 get camera tap zoom parameters, blocking calls More...
 
void setTapZoomMultiplierAsync (PayloadIndexType index, CameraModule::TapZoomMultiplierData param, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 set camera tap zoom function parameters, non-blocking calls More...
 
ErrorCode::ErrorCodeType setTapZoomMultiplierSync (PayloadIndexType index, CameraModule::TapZoomMultiplierData param, int timeout)
 set camera tap zoom parameters, blocking calls More...
 
void getTapZoomMultiplierAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, CameraModule::TapZoomMultiplierData param, UserData userData), UserData userData)
 get camera tap zoom function parameters, non-blocking calls More...
 
ErrorCode::ErrorCodeType getTapZoomMultiplierSync (PayloadIndexType index, CameraModule::TapZoomMultiplierData &param, int timeout)
 get camera tap zoom parameters, blocking calls More...
 
void tapZoomAtTargetAsync (PayloadIndexType index, CameraModule::TapZoomPosData tapZoomPos, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 set camera tap zoom point, non-blocking calls More...
 
ErrorCode::ErrorCodeType tapZoomAtTargetSync (PayloadIndexType index, CameraModule::TapZoomPosData tapZoomPos, int timeout)
 set camera tap zoom point, blocking calls More...
 
void setExposureModeAsync (PayloadIndexType index, CameraModule::ExposureMode mode, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 set camera exposure mode, non-blocking calls More...
 
ErrorCode::ErrorCodeType setExposureModeSync (PayloadIndexType index, CameraModule::ExposureMode mode, int timeout)
 set camera exposure mode, blocking calls More...
 
void getExposureModeAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, CameraModule::ExposureMode mode, UserData userData), UserData userData)
 get camera exposure mode, non-blocking calls More...
 
ErrorCode::ErrorCodeType getExposureModeSync (PayloadIndexType index, CameraModule::ExposureMode &mode, int timeout)
 get camera exposure mode, blocking calls More...
 
void setISOAsync (PayloadIndexType index, CameraModule::ISO iso, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 set camera iso value, non-blocking calls More...
 
ErrorCode::ErrorCodeType setISOSync (PayloadIndexType index, CameraModule::ISO iso, int timeout)
 set camera iso value, blocking calls More...
 
void getISOAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType, CameraModule::ISO iso, UserData userData), UserData userData)
 get camera iso value, non-blocking calls More...
 
ErrorCode::ErrorCodeType getISOSync (PayloadIndexType index, CameraModule::ISO &iso, int timeout)
 get camera iso value, blocking calls More...
 
void setApertureAsync (PayloadIndexType index, CameraModule::Aperture aperture, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 set camera aperture size value, non-blocking calls More...
 
ErrorCode::ErrorCodeType setApertureSync (PayloadIndexType index, CameraModule::Aperture aperture, int timeout)
 set camera aperture size value, blocking calls More...
 
void getApertureAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType, CameraModule::Aperture aperture, UserData userData), UserData userData)
 get camera aperture size value, non-blocking calls More...
 
ErrorCode::ErrorCodeType getApertureSync (PayloadIndexType index, CameraModule::Aperture &aperture, int timeout)
 get camera aperture size value, blocking calls More...
 
void setShutterSpeedAsync (PayloadIndexType index, CameraModule::ShutterSpeed shutterSpeed, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 set camera shutter value, non-blocking calls More...
 
ErrorCode::ErrorCodeType setShutterSpeedSync (PayloadIndexType index, CameraModule::ShutterSpeed shutterSpeed, int timeout)
 set camera shutter value, blocking calls More...
 
void getShutterSpeedAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, CameraModule::ShutterSpeed shutterSpeed, UserData userData), UserData userData)
 get camera shutter value, non-blocking calls More...
 
ErrorCode::ErrorCodeType getShutterSpeedSync (PayloadIndexType index, CameraModule::ShutterSpeed &shutterSpeed, int timeout)
 get camera shutter value, blocking calls More...
 
void setExposureCompensationAsync (PayloadIndexType index, CameraModule::ExposureCompensation ev, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 set camera EV value, non-blocking calls More...
 
ErrorCode::ErrorCodeType setExposureCompensationSync (PayloadIndexType index, CameraModule::ExposureCompensation ev, int timeout)
 set camera EV value, blocking calls More...
 
void getExposureCompensationAsync (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, CameraModule::ExposureCompensation ev, UserData userData), UserData userData)
 get camera EV value, non-blocking calls More...
 
ErrorCode::ErrorCodeType getExposureCompensationSync (PayloadIndexType index, CameraModule::ExposureCompensation &ev, int timeout)
 get camera EV value, blocking calls More...
 
ErrorCode::ErrorCodeType obtainDownloadRightSync (PayloadIndexType index, bool enable, int timeout)
 obtain the download right from camera, blocking calls More...
 
ErrorCode::ErrorCodeType startReqFileList (PayloadIndexType index, FileMgr::FileListReqCBType cb, void *userData)
 start to requeset the filelist data of camera, non-blocking calls More...
 
ErrorCode::ErrorCodeType startReqFileData (PayloadIndexType index, int fileIndex, std::string localPath, FileMgr::FileDataReqCBType cb, void *userData)
 start to requeset the files of camera, non-blocking calls More...
 

Detailed Description

The manager of camera module.

Member Function Documentation

◆ deinitAllCameraModule()

void CameraManager::deinitAllCameraModule ( void  )

deinit all the camera modules

Supported Platforms : M210V2, M300

◆ deinitCameraModule()

ErrorCode::ErrorCodeType CameraManager::deinitCameraModule ( PayloadIndexType  index)

Deinit the camera module. It is a opposite operation to initCameraModule. It means this camera will disable. In the deinit, the camera module will set name to be defaultCameraName and set enable to be false.

Supported Platforms : M210V2, M300
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
Returns
ErrorCode::ErrorCodeType error code

◆ getApertureAsync()

void CameraManager::getApertureAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType, CameraModule::Aperture aperture, UserData userData)  UserCallBack,
UserData  userData 
)

get camera aperture size value, non-blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • size used as an input param, camera aperture size, input limit see enum DJI::OSDK::CameraModule::ApertureSize
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ getApertureSync()

ErrorCode::ErrorCodeType CameraManager::getApertureSync ( PayloadIndexType  index,
CameraModule::Aperture aperture,
int  timeout 
)

get camera aperture size value, blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
apertureused as an output param, camera aperture size, input limit see enum DJI::OSDK::CameraModule::ApertureSize
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ getCameraModuleEnable()

ErrorCode::ErrorCodeType CameraManager::getCameraModuleEnable ( PayloadIndexType  index,
bool &  enable 
)

get the enable status of camera module, searched by index

Supported Platforms : M210V2, M300
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
enableget the enable status of CameraModule. If get fail, this parameter will not do any assignment
Returns
ErrorCode::ErrorCodeType error code

◆ getCameraModuleIndex()

ErrorCode::ErrorCodeType CameraManager::getCameraModuleIndex ( const char *  name,
uint8_t &  index 
)

get the index of camera module, searched by name

Supported Platforms : M210V2, M300
Parameters
namename of camera module
indexcamera module index, see enum DJI::OSDK::PayloadIndexType. If get fail, this parameter will not do any assignment
Returns
ErrorCode::ErrorCodeType error code

◆ getCameraModuleName()

ErrorCode::ErrorCodeType CameraManager::getCameraModuleName ( PayloadIndexType  index,
std::string &  name 
)

get the name of camera module, searched by index

Supported Platforms : M210V2, M300
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
namename of the camera module, it's a output parameter. If get fail, this parameter will not do any assignment
Returns
ErrorCode::ErrorCodeType error code

◆ getExposureCompensationAsync()

void CameraManager::getExposureCompensationAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, CameraModule::ExposureCompensation ev, UserData userData)  UserCallBack,
UserData  userData 
)

get camera EV value, non-blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • ev used as an input param, ev parameter value of camera, input limit see enum DJI::OSDK::CameraModule::EVParameter
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ getExposureCompensationSync()

ErrorCode::ErrorCodeType CameraManager::getExposureCompensationSync ( PayloadIndexType  index,
CameraModule::ExposureCompensation ev,
int  timeout 
)

get camera EV value, blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
evused as an output param, ev parameter value of camera, input limit see enum DJI::OSDK::CameraModule::EVParameter
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ getExposureModeAsync()

void CameraManager::getExposureModeAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, CameraModule::ExposureMode mode, UserData userData)  UserCallBack,
UserData  userData 
)

get camera exposure mode, non-blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
UserCallBackcallback function defined by user
userDatawhen UserCallBack is called, used in UserCallBack

◆ getExposureModeSync()

ErrorCode::ErrorCodeType CameraManager::getExposureModeSync ( PayloadIndexType  index,
CameraModule::ExposureMode mode,
int  timeout 
)

get camera exposure mode, blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
modeused as an output param,exposure mode, input limit see enum DJI::OSDK::CameraModule::ExposureMode
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ getFocusModeAsync()

void CameraManager::getFocusModeAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, CameraModule::FocusMode focusMode, UserData userData)  UserCallBack,
UserData  userData 
)

get camera focus mode, non-blocking calls

Supported Platforms : M210V2, M300
Note
Gets the lens focus mode. Please check FocusMode. Supported only by the X5, X5R, Z3 cameras, Mavic Pro camera, Z30, Phantom 4 Pro camera, X4S, X5S, Mavic 2 Pro, Mavic 2 Zoom Camera and Mavic 2 Enterprise Camera.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
UserCallBackcallback function defined by user
userDatawhen UserCallBack is called, used in UserCallBack

◆ getFocusModeSync()

ErrorCode::ErrorCodeType CameraManager::getFocusModeSync ( PayloadIndexType  index,
CameraModule::FocusMode focusMode,
int  timeout 
)

get camera focus mode, blocking calls

Supported Platforms : M210V2, M300
Note
Gets the lens focus mode. Please check FocusMode. Supported only by the X5, X5R, Z3 cameras, Mavic Pro camera, Z30, Phantom 4 Pro camera, X4S, X5S, Mavic 2 Pro, Mavic 2 Zoom Camera and Mavic 2 Enterprise Camera.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
focusModeused as an output param, camera focus mode, input limit see enum DJI::OSDK::CameraModule::FocusMode
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ getFocusTargetAsync()

void CameraManager::getFocusTargetAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType, CameraModule::TapFocusPosData tapFocusPos, UserData userData)  UserCallBack,
UserData  userData 
)

get camera tap focus target point, non-blocking calls

Supported Platforms : M210V2, M300
Note
Gets the lens focus target point. Supported only by the X5, X5R, Z3 cameras, Mavic Pro camera and Phantom 4 Pro camera, X4S, X5S, Mavic 2 Pro, Mavic 2 Zoom Camera and Mavic 2 Enterprise Camera.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • tapFocusPos used as an input param, the param of tap focus, including x,y value
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ getFocusTargetSync()

ErrorCode::ErrorCodeType CameraManager::getFocusTargetSync ( PayloadIndexType  index,
CameraModule::TapFocusPosData tapFocusPos,
int  timeout 
)

get camera focus point, blocking calls

Supported Platforms : M210V2, M300
Note
Gets the lens focus target point. Supported only by the X5, X5R, Z3 cameras, Mavic Pro camera and Phantom 4 Pro camera, X4S, X5S, Mavic 2 Pro, Mavic 2 Zoom Camera and Mavic 2 Enterprise Camera.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
tapFocusPosused as an output param, the param of tap focus, including x,y value
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ getISOAsync()

void CameraManager::getISOAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType, CameraModule::ISO iso, UserData userData)  UserCallBack,
UserData  userData 
)

get camera iso value, non-blocking calls

Supported Platforms : M210V2, M300
Note
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • iso used as an input param, camera iso, input limit see enum DJI::OSDK::CameraModule::ISOParameter
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ getISOSync()

ErrorCode::ErrorCodeType CameraManager::getISOSync ( PayloadIndexType  index,
CameraModule::ISO iso,
int  timeout 
)

get camera iso value, blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
isoused as an output param, camera iso, input limit see enum DJI::OSDK::CameraModule::ISOParameter
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ getModeAsync()

void CameraManager::getModeAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, CameraModule::WorkMode workingMode, UserData userData)  UserCallBack,
UserData  userData 
)

get camera working mode, non-blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
UserCallBackcallback function defined by user
userDatawhen UserCallBack is called, used in UserCallBack

◆ getModeSync()

ErrorCode::ErrorCodeType CameraManager::getModeSync ( PayloadIndexType  index,
CameraModule::WorkMode workingMode,
int  timeout 
)

get camera working mode, blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
workingModeused as an output param, camera working mode, input limit see enum DJI::OSDK::CameraModule::WorkMode
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ getOpticalZoomFactorSync()

ErrorCode::ErrorCodeType CameraManager::getOpticalZoomFactorSync ( PayloadIndexType  index,
float &  factor,
int  timeout 
)

get parameters of camera optical zooming, blocking calls

Supported Platforms : M210V2, M300
Note
It is only supported by X5, X5R and X5S camera on Osmo with lens Olympus M.Zuiko ED 14-42mm f/3.5-5.6 EZ, Z3 camera, Z30 camera.
In this interface, the zoom will set the zoom factor as the your target value.
Parameters
indexpayload node index, input limit see enum DJI::OSDK::PayloadIndexType
factortarget zoom factor
Returns
ErrorCode::ErrorCodeType error code

◆ getPhotoAEBCountAsync()

void CameraManager::getPhotoAEBCountAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, CameraModule::PhotoAEBCount count, UserData userData)  UserCallBack,
UserData  userData 
)

get the burst count in the AEB take-photo mode, non-blocking calls

Supported Platforms : M210V2, M300
Note
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
UserCallBackcallback function defined by user
userDatawhen UserCallBack is called, used in UserCallBack

◆ getPhotoAEBCountSync()

ErrorCode::ErrorCodeType CameraManager::getPhotoAEBCountSync ( PayloadIndexType  index,
CameraModule::PhotoAEBCount count,
int  timeout 
)

get the burst count in the AEB take-photo mode, blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
countburst photos count in the each AEB photo taking DJI::OSDK::CameraModule::PhotoAEBCount
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ getPhotoBurstCountAsync()

void CameraManager::getPhotoBurstCountAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, CameraModule::PhotoBurstCount count, UserData userData)  UserCallBack,
UserData  userData 
)

get the burst count in the Burst take-photo mode, non-blocking calls

Supported Platforms : M210V2, M300
Note
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
UserCallBackcallback function defined by user
userDatawhen UserCallBack is called, used in UserCallBack

◆ getPhotoBurstCountSync()

ErrorCode::ErrorCodeType CameraManager::getPhotoBurstCountSync ( PayloadIndexType  index,
CameraModule::PhotoBurstCount count,
int  timeout 
)

get the burst count in the Burst take-photo mode, blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
countburst photos count in the each burst photo taking DJI::OSDK::CameraModule::PhotoBurstCount
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ getPhotoIntervalDatasAsync()

void CameraManager::getPhotoIntervalDatasAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, CameraModule::PhotoIntervalData intervalSetting, UserData userData)  UserCallBack,
UserData  userData 
)

get the parameters in the INTERVAL take-photo mode, non-blocking calls

Supported Platforms : M210V2, M300
Note
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • intervalSetting parameters in the INTERVAL take-photo mode, including photo number and time interval
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ getPhotoIntervalDatasSync()

ErrorCode::ErrorCodeType CameraManager::getPhotoIntervalDatasSync ( PayloadIndexType  index,
CameraModule::PhotoIntervalData intervalSetting,
int  timeout 
)

get the parameters in the INTERVAL take-photo mode, blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
intervalSettingparameters in the INTERVAL take-photo mode, including photo number and time interval
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ getShootPhotoModeAsync()

void CameraManager::getShootPhotoModeAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, CameraModule::ShootPhotoMode takePhotoMode, UserData userData)  UserCallBack,
UserData  userData 
)

get the shoot photo mode, non-blocking calls

Supported Platforms : M210V2, M300
Note
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
UserCallBackcallback function defined by user
userDatawhen UserCallBack is called, used in UserCallBack

◆ getShootPhotoModeSync()

ErrorCode::ErrorCodeType CameraManager::getShootPhotoModeSync ( PayloadIndexType  index,
CameraModule::ShootPhotoMode takePhotoMode,
int  timeout 
)

get the shoot photo mode, blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
takePhotoModetake photo mode, input limit see enum DJI::OSDK::CameraModule::ShootPhotoMode
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ getShutterSpeedAsync()

void CameraManager::getShutterSpeedAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, CameraModule::ShutterSpeed shutterSpeed, UserData userData)  UserCallBack,
UserData  userData 
)

get camera shutter value, non-blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
UserCallBackcallback function defined by user
userDatawhen UserCallBack is called, used in UserCallBack

◆ getShutterSpeedSync()

ErrorCode::ErrorCodeType CameraManager::getShutterSpeedSync ( PayloadIndexType  index,
CameraModule::ShutterSpeed shutterSpeed,
int  timeout 
)

get camera shutter value, blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
shutterused as an output param, the shutter mode and param of camera, input limit see enum DJI::OSDK::CameraModule::ShutterMode
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ getTapZoomEnabledAsync()

void CameraManager::getTapZoomEnabledAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, bool param, UserData userData)  UserCallBack,
UserData  userData 
)

get camera tap zoom function parameters, non-blocking calls

Supported Platforms : M210V2, M300
Note
Determines whether TapZoom is enabled. It is only supported by Z30 camera.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • param used as an input param, tap zoom enable data.
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ getTapZoomEnabledSync()

ErrorCode::ErrorCodeType CameraManager::getTapZoomEnabledSync ( PayloadIndexType  index,
bool &  param,
int  timeout 
)

get camera tap zoom parameters, blocking calls

Supported Platforms : M210V2, M300
Note
Determines whether TapZoom is enabled. It is only supported by Z30 camera.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
paramused as an output param, tap zoom enable data.
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ getTapZoomMultiplierAsync()

void CameraManager::getTapZoomMultiplierAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, CameraModule::TapZoomMultiplierData param, UserData userData)  UserCallBack,
UserData  userData 
)

get camera tap zoom function parameters, non-blocking calls

Supported Platforms : M210V2, M300
Note
Gets the multiplier for TapZoom. It is only supported by Z30 camera.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • param used as an input param, tap zoom multiplier data
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ getTapZoomMultiplierSync()

ErrorCode::ErrorCodeType CameraManager::getTapZoomMultiplierSync ( PayloadIndexType  index,
CameraModule::TapZoomMultiplierData param,
int  timeout 
)

get camera tap zoom parameters, blocking calls

Supported Platforms : M210V2, M300
Note
Gets the multiplier for TapZoom. It is only supported by Z30 camera.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
paramused as an output param, tap zoom multiplier data
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ initCameraModule()

ErrorCode::ErrorCodeType CameraManager::initCameraModule ( PayloadIndexType  index,
const char *  name 
)

init the camera module

Supported Platforms : M210V2, M300
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
namecamera module name used in initialization
Returns
ErrorCode::ErrorCodeType error code

◆ obtainDownloadRightSync()

ErrorCode::ErrorCodeType CameraManager::obtainDownloadRightSync ( PayloadIndexType  index,
bool  enable,
int  timeout 
)

obtain the download right from camera, blocking calls

Supported Platforms : M300
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
enableenable or disable the right of download
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ setApertureAsync()

void CameraManager::setApertureAsync ( PayloadIndexType  index,
CameraModule::Aperture  aperture,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

set camera aperture size value, non-blocking calls

Supported Platforms : M210V2, M300
Note
The exposure mode ExposureMode must be in MANUAL or APERTURE_PRIORITY. Supported only by the X5, X5R, X4S, X5S camera and Mavic 2 Pro.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
aperturecamera aperture size, input limit see enum DJI::OSDK::CameraModule::ApertureSize
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ setApertureSync()

ErrorCode::ErrorCodeType CameraManager::setApertureSync ( PayloadIndexType  index,
CameraModule::Aperture  aperture,
int  timeout 
)

set camera aperture size value, blocking calls

Supported Platforms : M210V2, M300
Note
The exposure mode ExposureMode must be in MANUAL or APERTURE_PRIORITY. Supported only by the X5, X5R, X4S, X5S camera and Mavic 2 Pro.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
aperturecamera aperture size, input limit see enum DJI::OSDK::CameraModule::ApertureSize
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ setExposureCompensationAsync()

void CameraManager::setExposureCompensationAsync ( PayloadIndexType  index,
CameraModule::ExposureCompensation  ev,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

set camera EV value, non-blocking calls

Supported Platforms : M210V2, M300
Note
Sets the camera's exposure compensation. In order to use this function, set the camera exposure mode to shutter, program or aperture.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
evev parameter value of camera, input limit see enum DJI::OSDK::CameraModule::EVParameter
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ setExposureCompensationSync()

ErrorCode::ErrorCodeType CameraManager::setExposureCompensationSync ( PayloadIndexType  index,
CameraModule::ExposureCompensation  ev,
int  timeout 
)

set camera EV value, blocking calls

Supported Platforms : M210V2, M300
Note
Sets the camera's exposure compensation. In order to use this function, set the camera exposure mode to shutter, program or aperture.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
evev parameter value of camera, input limit see enum DJI::OSDK::CameraModule::EVParameter
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ setExposureModeAsync()

void CameraManager::setExposureModeAsync ( PayloadIndexType  index,
CameraModule::ExposureMode  mode,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

set camera exposure mode, non-blocking calls

Supported Platforms : M210V2, M300
Note
The different exposure modes define whether Aperture, Shutter Speed, ISO can be set automatically or manually. Exposure compensation can be changed in all modes except Manual mode where it is not settable. X5, X5R, Phantom 4 Pro camera, X4S and X5S: Program Mode: Shutter: Auto Aperture: Auto ISO: Manual or Auto Shutter Priority: Shutter: Manual Aperture: Auto ISO: Manual or Auto Aperture Priority: Shutter: Auto Aperture: Manual ISO: Manual or Auto Manual Mode: Shutter: Manual Aperture: Manual ISO: Manual All other cameras: Program Mode: Shutter: Auto Aperture: Fixed ISO: Auto Shutter Priority: Shutter: Manual Aperture: Fixed ISO: Auto Aperture Priority: NA Manual Mode: Shutter: Manual Aperture: Manual ISO: Manual
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
modeexposure mode, input limit see enum DJI::OSDK::CameraModule::ExposureMode
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ setExposureModeSync()

ErrorCode::ErrorCodeType CameraManager::setExposureModeSync ( PayloadIndexType  index,
CameraModule::ExposureMode  mode,
int  timeout 
)

set camera exposure mode, blocking calls

Supported Platforms : M210V2, M300
Note
The different exposure modes define whether Aperture, Shutter Speed, ISO can be set automatically or manually. Exposure compensation can be changed in all modes except Manual mode where it is not settable. X5, X5R, Phantom 4 Pro camera, X4S and X5S: Program Mode: Shutter: Auto Aperture: Auto ISO: Manual or Auto Shutter Priority: Shutter: Manual Aperture: Auto ISO: Manual or Auto Aperture Priority: Shutter: Auto Aperture: Manual ISO: Manual or Auto Manual Mode: Shutter: Manual Aperture: Manual ISO: Manual All other cameras: Program Mode: Shutter: Auto Aperture: Fixed ISO: Auto Shutter Priority: Shutter: Manual Aperture: Fixed ISO: Auto Aperture Priority: NA Manual Mode: Shutter: Manual Aperture: Manual ISO: Manual
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
modeexposure mode, input limit see enum DJI::OSDK::CameraModule::ExposureMode
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ setFocusModeAsync()

void CameraManager::setFocusModeAsync ( PayloadIndexType  index,
CameraModule::FocusMode  mode,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

set camera focus mode, non-blocking calls

Supported Platforms : M210V2, M300
Note
Sets the lens focus mode. When the focus mode is auto, the target point is the focal point. When the focus mode is manual, the target point is the zoom out area if the focus assistant is enabled for the manual mode. Supported only by the X5, X5R, Z3 cameras, Mavic Pro camera, Phantom 4 Pro camera, Mavic 2 Pro, Mavic 2 Zoom Camera, Mavic 2 Enterprise Camera, X5S. It's should be attention that X4S will keep focus point as (0.5,0.5) all the time, the setting of focus point to X4S will quickly replaced by (0.5, 0.5).
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
modecamera focus mode, input limit see enum DJI::OSDK::CameraModule::FocusMode
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ setFocusModeSync()

ErrorCode::ErrorCodeType CameraManager::setFocusModeSync ( PayloadIndexType  index,
CameraModule::FocusMode  mode,
int  timeout 
)

get camera focus mode, blocking calls

Supported Platforms : M210V2, M300
Note
Sets the lens focus mode. When the focus mode is auto, the target point is the focal point. When the focus mode is manual, the target point is the zoom out area if the focus assistant is enabled for the manual mode. Supported only by the X5, X5R, Z3 cameras, Mavic Pro camera, Phantom 4 Pro camera, Mavic 2 Pro, Mavic 2 Zoom Camera, Mavic 2 Enterprise Camera, X5S. It's should be attention that X4S will keep focus point as (0.5,0.5) all the time, the setting of focus point to X4S will quickly replaced by (0.5, 0.5).
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
modecamera focus mode, input limit see enum DJI::OSDK::CameraModule::FocusMode
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ setFocusTargetAsync()

void CameraManager::setFocusTargetAsync ( PayloadIndexType  index,
CameraModule::TapFocusPosData  tapFocusPos,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

set camera tap focus target point, non-blocking calls

Supported Platforms : M210V2, M300
Note
Sets the lens focus target point. When the focus mode is auto, the target point is the focal point. When the focus mode is manual, the target point is the zoom out area if the focus assistant is enabled for the manual mode. Supported only by the X5, X5R, Z3 cameras, Mavic Pro camera, Phantom 4 Pro camera, Mavic 2 Pro, Mavic 2 Zoom Camera, Mavic 2 Enterprise Camera, X4S and X5S. camera, X4S and X5S.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
tapFocusPosthe param of tap focus, including x,y value
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ setFocusTargetSync()

ErrorCode::ErrorCodeType CameraManager::setFocusTargetSync ( PayloadIndexType  index,
CameraModule::TapFocusPosData  tapFocusPos,
int  timeout 
)

set camera focus point, blocking calls

Supported Platforms : M210V2, M300
Note
Sets the lens focus target point. When the focus mode is auto, the target point is the focal point. When the focus mode is manual, the target point is the zoom out area if the focus assistant is enabled for the manual mode. Supported only by the X5, X5R, Z3 cameras, Mavic Pro camera, Phantom 4 Pro camera, Mavic 2 Pro, Mavic 2 Zoom Camera, Mavic 2 Enterprise Camera, X4S and X5S. camera, X4S and X5S.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
tapFocusPosthe param of tap focus, including x,y value
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ setISOAsync()

void CameraManager::setISOAsync ( PayloadIndexType  index,
CameraModule::ISO  iso,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

set camera iso value, non-blocking calls

Supported Platforms : M210V2, M300
Note
Sets the camera's ISO value. For the X5, X5R, Phantom 4 Pro camera, X4S and X5S, the ISO value can be set for all modes. For the other cameras, the ISO value can only be set when the camera exposure mode is in Manual mode. For Mavic 2 Enterprise Dual, the ISO value is always AUTO.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
isocamera iso, input limit see enum DJI::OSDK::CameraModule::ISOParameter
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ setISOSync()

ErrorCode::ErrorCodeType CameraManager::setISOSync ( PayloadIndexType  index,
CameraModule::ISO  iso,
int  timeout 
)

set camera iso value, blocking calls

Supported Platforms : M210V2, M300
Note
Sets the camera's ISO value. For the X5, X5R, Phantom 4 Pro camera, X4S and X5S, the ISO value can be set for all modes. For the other cameras, the ISO value can only be set when the camera exposure mode is in Manual mode. For Mavic 2 Enterprise Dual, the ISO value is always AUTO.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
isocamera iso, input limit see enum DJI::OSDK::CameraModule::ISOParameter
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ setModeAsync()

void CameraManager::setModeAsync ( PayloadIndexType  index,
CameraModule::WorkMode  mode,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

set camera working mode, non-blocking calls

Supported Platforms : M210V2, M300
Note
Sets the camera's work mode to taking pictures, video, playback or download. Please note that you cannot change the mode when a certain task is executing, such as taking photo(s), recording video, or downloading and saving files. Also supported by thermal imaging camera.
In Onboard SDK, only taking pictures and video are supported. Change work mode need about 2 seconds.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
modecamera working mode, input limit see enum DJI::OSDK::CameraModule::WorkMode
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ setModeSync()

ErrorCode::ErrorCodeType CameraManager::setModeSync ( PayloadIndexType  index,
CameraModule::WorkMode  mode,
int  timeout 
)

set camera working mode, blocking calls

Supported Platforms : M210V2, M300
Note
Sets the camera's work mode to taking pictures, video, playback or download. Please note that you cannot change the mode when a certain task is executing, such as taking photo(s), recording video, or downloading and saving files. Also supported by thermal imaging camera.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
In Onboard SDK, only taking pictures and video are supported. Change work mode need about 2 seconds.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
modecamera working mode, input limit see enum DJI::OSDK::CameraModule::WorkMode
timeoutblocking timeout in seconds, here the timeout value should be >= 2
Returns
ErrorCode::ErrorCodeType error code

◆ setOpticalZoomFactorSync()

ErrorCode::ErrorCodeType CameraManager::setOpticalZoomFactorSync ( PayloadIndexType  index,
float  factor,
int  timeout 
)

set parameters for camera optical zooming, blocking calls

Supported Platforms : M210V2, M300
Note
It is only supported by X5, X5R and X5S camera on Osmo with lens Olympus M.Zuiko ED 14-42mm f/3.5-5.6 EZ, Z3 camera, Z30 camera.
In this interface, the zoom will set the zoom factor as the your target value.
Parameters
indexpayload node index, input limit see enum DJI::OSDK::PayloadIndexType
factortarget zoom factor
Returns
ErrorCode::ErrorCodeType error code

◆ setPhotoAEBCountAsync()

void CameraManager::setPhotoAEBCountAsync ( PayloadIndexType  index,
CameraModule::PhotoAEBCount  count,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

set the burst count in the AEB take-photo mode, non-blocking calls

Supported Platforms : M210V2, M300
Note
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
countburst photos count in the each AEB photo taking DJI::OSDK::CameraModule::PhotoAEBCount
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ setPhotoAEBCountSync()

ErrorCode::ErrorCodeType CameraManager::setPhotoAEBCountSync ( PayloadIndexType  index,
CameraModule::PhotoAEBCount  count,
int  timeout 
)

set the burst count in the AEB take-photo mode, blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
countburst photos count in the each AEB photo taking DJI::OSDK::CameraModule::PhotoAEBCount
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ setPhotoBurstCountAsync()

void CameraManager::setPhotoBurstCountAsync ( PayloadIndexType  index,
CameraModule::PhotoBurstCount  count,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

set the burst count in the Burst take-photo mode, non-blocking calls

Supported Platforms : M210V2, M300
Note
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
countburst photos count in the each burst photo taking DJI::OSDK::CameraModule::PhotoBurstCount
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ setPhotoBurstCountSync()

ErrorCode::ErrorCodeType CameraManager::setPhotoBurstCountSync ( PayloadIndexType  index,
CameraModule::PhotoBurstCount  count,
int  timeout 
)

set the burst count in the Burst take-photo mode, blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
countburst photos count in the each burst photo taking DJI::OSDK::CameraModule::PhotoBurstCount
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ setPhotoTimeIntervalSettingsAsync()

void CameraManager::setPhotoTimeIntervalSettingsAsync ( PayloadIndexType  index,
CameraModule::PhotoIntervalData  intervalSetting,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

set the parameters in the INTERVAL take-photo mode, non-blocking calls

Supported Platforms : M210V2, M300
Note
When in this shoot-photo mode, The camera will capture a photo, wait a specified interval of time, take another photo, and continue in this manner until it has taken the required number of photos. Also supported by thermal imaging camera.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
intervalSettingparameters in the INTERVAL take-photo mode, including photo number and time interval
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ setPhotoTimeIntervalSettingsSync()

ErrorCode::ErrorCodeType CameraManager::setPhotoTimeIntervalSettingsSync ( PayloadIndexType  index,
CameraModule::PhotoIntervalData  intervalSetting,
int  timeout 
)

set the parameters in the INTERVAL take-photo mode, blocking calls

Supported Platforms : M210V2, M300
Note
When in this shoot-photo mode, The camera will capture a photo, wait a specified interval of time, take another photo, and continue in this manner until it has taken the required number of photos. Also supported by thermal imaging camera.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
intervalSettingparameters in the INTERVAL take-photo mode, including photo number and time interval
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ setShootPhotoModeAsync()

void CameraManager::setShootPhotoModeAsync ( PayloadIndexType  index,
CameraModule::ShootPhotoMode  takePhotoMode,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

set the shoot photo mode, non-blocking calls

Supported Platforms : M210V2, M300
Note
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
takePhotoModetake photo mode, input limit see enum DJI::OSDK::CameraModule::ShootPhotoMode
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ setShootPhotoModeSync()

ErrorCode::ErrorCodeType CameraManager::setShootPhotoModeSync ( PayloadIndexType  index,
CameraModule::ShootPhotoMode  takePhotoMode,
int  timeout 
)

set the shoot photo mode, blocking calls

Supported Platforms : M210V2, M300
Note
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
takePhotoModetake photo mode, input limit see enum DJI::OSDK::CameraModule::ShootPhotoMode
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ setShutterSpeedAsync()

void CameraManager::setShutterSpeedAsync ( PayloadIndexType  index,
CameraModule::ShutterSpeed  shutterSpeed,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

set camera shutter value, non-blocking calls

Supported Platforms : M210V2, M300
Note
Sets the camera shutter speed. The shutter speed should not be set slower than the video frame rate when the camera's mode is RECORD_VIDEO. For example, if the video frame rate is 30fps, the shutterSpeed must be <= 1/30. Precondition: The shutter speed can be set only when the camera exposure mode is Shutter mode or Manual mode.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
shutterthe shutter mode and param of camera, input limit see enum DJI::OSDK::CameraModule::ShutterMode
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ setShutterSpeedSync()

ErrorCode::ErrorCodeType CameraManager::setShutterSpeedSync ( PayloadIndexType  index,
CameraModule::ShutterSpeed  shutterSpeed,
int  timeout 
)

set camera shutter value, blocking calls

Supported Platforms : M210V2, M300
Note
Sets the camera shutter speed. The shutter speed should not be set slower than the video frame rate when the camera's mode is RECORD_VIDEO. For example, if the video frame rate is 30fps, the shutterSpeed must be <= 1/30. Precondition: The shutter speed can be set only when the camera exposure mode is Shutter mode or Manual mode.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
shutterthe shutter mode and param of camera, input limit see enum DJI::OSDK::CameraModule::ShutterMode
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ setTapZoomEnabledAsync()

void CameraManager::setTapZoomEnabledAsync ( PayloadIndexType  index,
bool  param,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

set camera tap zoom function parameters, non-blocking calls

Supported Platforms : M210V2, M300
Note
Enable/disable TapZoom. tapZoomAtTarget can only be called when TapZoom is enabled. It is only supported Z30 camera or H20/H20T zoom mode.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
paramtap zoom enable data.
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

It should be paid attention that, tap zoom have not getter API

◆ setTapZoomEnabledSync()

ErrorCode::ErrorCodeType CameraManager::setTapZoomEnabledSync ( PayloadIndexType  index,
bool  param,
int  timeout 
)

set camera tap zoom parameters, blocking calls

Supported Platforms : M210V2, M300
Note
Enable/disable TapZoom. tapZoomAtTarget can only be called when TapZoom is enabled. It is only supported Z30 camera or H20/H20T zoom mode.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
paramtap zoom enable data.
timeoutblocking timeout in seconds

It should be paid attention that, tap zoom have not getter API

Returns
ErrorCode::ErrorCodeType error code

◆ setTapZoomMultiplierAsync()

void CameraManager::setTapZoomMultiplierAsync ( PayloadIndexType  index,
CameraModule::TapZoomMultiplierData  param,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

set camera tap zoom function parameters, non-blocking calls

Supported Platforms : M210V2, M300
Note
TapZoom uses a multiplier to change the zoom scale when called. The final zoom scale for a TapZoom will be: Current Zoom Scale x Multiplier. The multiplier range is [1,5]. A multiplier of 1 will not change the zoom. When the multiplier is 1, the zoom scale will not change during TapZoom. It is only supported by Z30 camera.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
paramtap zoom multiplier data
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

It should be paid attention that, tap zoom have not getter API

◆ setTapZoomMultiplierSync()

ErrorCode::ErrorCodeType CameraManager::setTapZoomMultiplierSync ( PayloadIndexType  index,
CameraModule::TapZoomMultiplierData  param,
int  timeout 
)

set camera tap zoom parameters, blocking calls

Supported Platforms : M210V2, M300
Note
TapZoom uses a multiplier to change the zoom scale when called. The final zoom scale for a TapZoom will be: Current Zoom Scale x Multiplier. The multiplier range is [1,5]. A multiplier of 1 will not change the zoom. When the multiplier is 1, the zoom scale will not change during TapZoom. It is only supported by Z30 camera.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
paramtap multiplier multiplier data
timeoutblocking timeout in seconds

It should be paid attention that, tap zoom have not getter API

Returns
ErrorCode::ErrorCodeType error code

◆ startContinuousOpticalZoomAsync()

void CameraManager::startContinuousOpticalZoomAsync ( PayloadIndexType  index,
CameraModule::zoomDirectionData  zoomDirection,
CameraModule::zoomSpeedData  zoomSpeed,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

start camera optical zooming, non-blocking calls

Supported Platforms : M210V2, M300
Note
Start changing the focal length of the lens in specified direction with specified speed. Focal length change (zooming) will halt when maximum or minimum focal lengths are reached, or stopContinuousOpticalZoom* is called. It is only supported by X5, X5R and X5S camera on Osmo with lens Olympus M.Zuiko ED 14-42mm f/3.5-5.6 EZ, Z3 camera, Z30 camera, Mavic 2 Zoom Camera and Mavic 2 Enterprise Camera.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
zoomDirectionoptical zoom direction, ref to DJI::OSDK::CameraModule::ZoomDirection
zoomSpeedoptical zoom direction, ref to DJI::OSDK::CameraModule::ZoomSpeed
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ startContinuousOpticalZoomSync()

ErrorCode::ErrorCodeType CameraManager::startContinuousOpticalZoomSync ( PayloadIndexType  index,
CameraModule::zoomDirectionData  zoomDirection,
CameraModule::zoomSpeedData  zoomSpeed,
int  timeout 
)

start camera optical zooming, blocking calls

Supported Platforms : M210V2, M300
Note
Start changing the focal length of the lens in specified direction with specified speed. Focal length change (zooming) will halt when maximum or minimum focal lengths are reached, or stopContinuousOpticalZoom* is called. It is only supported by X5, X5R and X5S camera on Osmo with lens Olympus M.Zuiko ED 14-42mm f/3.5-5.6 EZ, Z3 camera, Z30 camera, Mavic 2 Zoom Camera and Mavic 2 Enterprise Camera.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
zoomDirectionoptical zoom direction, ref to DJI::OSDK::CameraModule::ZoomDirection
zoomSpeedoptical zoom direction, ref to DJI::OSDK::CameraModule::ZoomSpeed
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ startRecordVideoAsync()

void CameraManager::startRecordVideoAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

start to take video, non-blocking calls

Supported Platforms : M210V2, M300
Note
Camera must be in RECORD_VIDEO mode. For thermal imaging camera, user can take Single photo when recording video.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ startRecordVideoSync()

ErrorCode::ErrorCodeType CameraManager::startRecordVideoSync ( PayloadIndexType  index,
int  timeout 
)

start to take video, blocking calls

Supported Platforms : M210V2, M300
Note
Camera must be in RECORD_VIDEO mode. For thermal imaging camera, user can take Single photo when recording video.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ startReqFileData()

ErrorCode::ErrorCodeType CameraManager::startReqFileData ( PayloadIndexType  index,
int  fileIndex,
std::string  localPath,
FileMgr::FileDataReqCBType  cb,
void *  userData 
)

start to requeset the files of camera, non-blocking calls

Supported Platforms : M300
Parameters
indexCamera module index, input limit see enum DJI::OSDK::PayloadIndexType
fileIndexThe file index of the target file. The file index can be got from the file list.
localPathThe target path to save the file to be downloaded.
cbThe download result will be called by this cb. The detail of the callback ref to the DJI::OSDK::FileMgr::FileDataReqCBType
userDataThe parameter to pass user data into the cb
Returns
ErrorCode::ErrorCodeType error code

◆ startReqFileList()

ErrorCode::ErrorCodeType CameraManager::startReqFileList ( PayloadIndexType  index,
FileMgr::FileListReqCBType  cb,
void *  userData 
)

start to requeset the filelist data of camera, non-blocking calls

Supported Platforms : M300
Parameters
indexCamera module index, input limit see enum DJI::OSDK::PayloadIndexType
cbThe download result will be called by this cb. The detail of the callback ref to the DJI::OSDK::FileMgr::FileListReqCBType
userDataThe parameter to pass user data into the cb
Returns
ErrorCode::ErrorCodeType error code

◆ startShootPhotoAsync()

void CameraManager::startShootPhotoAsync ( PayloadIndexType  index,
CameraModule::ShootPhotoMode  mode,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

start to shoot photo, non-blocking calls

Supported Platforms : M210V2, M300
Note
Camera must be in ShootPhoto mode. For thermal imaging camera, Single photo can be taken while recording video. The SD card state should be checked before this method is used to ensure sufficient space exists.
Starting to shoot photo need about 2 seconds.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
It should be paid attention that if request is timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
modetake photo mode, input limit see enum DJI::OSDK::CameraModule::TakePhotoMode
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ startShootPhotoSync()

ErrorCode::ErrorCodeType CameraManager::startShootPhotoSync ( PayloadIndexType  index,
CameraModule::ShootPhotoMode  mode,
int  timeout 
)

start to shoot photo, blocking calls

Supported Platforms : M210V2, M300
Note
Camera must be in ShootPhoto mode. For thermal imaging camera, Single photo can be taken while recording video. The SD card state should be checked before this method is used to ensure sufficient space exists.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
modetake photo mode, input limit see enum DJI::OSDK::CameraModule::TakePhotoMode
timeoutblocking timeout in seconds. Starting to shoot photo need about 2 seconds.
Returns
ErrorCode::ErrorCodeType error code

◆ stopContinuousOpticalZoomAsync()

void CameraManager::stopContinuousOpticalZoomAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

stop camera optical zooming, non-blocking calls

Supported Platforms : M210V2, M300
Note
Called to stop focal length changing, when it currently is from calling startContinuousOpticalZoom*. It is only supported by X5, X5R and X5S camera on Osmo with lens Olympus M.Zuiko ED 14-42mm f/3.5-5.6 EZ, Z3 camera, Z30 camera, Mavic 2 Zoom Camera and Mavic 2 Enterprise camera.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ stopContinuousOpticalZoomSync()

ErrorCode::ErrorCodeType CameraManager::stopContinuousOpticalZoomSync ( PayloadIndexType  index,
int  timeout 
)

stop camera optical zooming, blocking calls

Supported Platforms : M210V2, M300
Note
Called to stop focal length changing, when it currently is from calling startContinuousOpticalZoom*. It is only supported by X5, X5R and X5S camera on Osmo with lens Olympus M.Zuiko ED 14-42mm f/3.5-5.6 EZ, Z3 camera, Z30 camera, Mavic 2 Zoom Camera and Mavic 2 Enterprise camera.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ stopRecordVideoAsync()

void CameraManager::stopRecordVideoAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

stop to take video, non-blocking calls

Supported Platforms : M210V2, M300
Note
Precondition: The camera is recording currently.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ stopRecordVideoSync()

ErrorCode::ErrorCodeType CameraManager::stopRecordVideoSync ( PayloadIndexType  index,
int  timeout 
)

stop to take video, blocking calls

Supported Platforms : M210V2, M300
Note
Precondition: The camera is recording currently.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ stopShootPhotoAsync()

void CameraManager::stopShootPhotoAsync ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

stop to shoot photo, non-blocking calls

Supported Platforms : M210V2, M300
Note
startShootPhoto has been invoked and the shoot mode is either Interval or Time-lapse. If the capture mode is set to Single, the camera will automatically stop taking the photo once the individual photo is taken.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ stopShootPhotoSync()

ErrorCode::ErrorCodeType CameraManager::stopShootPhotoSync ( PayloadIndexType  index,
int  timeout 
)

stop to shoot photo, blocking calls

Supported Platforms : M210V2, M300
Note
startShootPhoto has been invoked and the shoot mode is either Interval or Time-lapse. If the capture mode is set to Single, the camera will automatically stop taking the photo once the individual photo is taken.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

◆ tapZoomAtTargetAsync()

void CameraManager::tapZoomAtTargetAsync ( PayloadIndexType  index,
CameraModule::TapZoomPosData  tapZoomPos,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

set camera tap zoom point, non-blocking calls

Supported Platforms : M210V2, M300
Note
TapZoom at the target. It can be called only when TapZoom is enabled. When a new target is set, the gimbal will rotate and locate the target in the center of the screen. At the same time, the camera will zoom by multiplying the TapZoom multiplier. It is only supported Z30 camera or H20/H20T zoom mode.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
It should be paid attention that if timeout, the callback will not be called. This issue will be fixed in the future.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
tapZoomPosthe param of tap zoom, including x,y value
UserCallBackcallback function defined by user
  • retCode is the ErrorCode::ErrorCodeType error code
  • userData the interface to pass userData in when the callback is called
userDatawhen UserCallBack is called, used in UserCallBack

◆ tapZoomAtTargetSync()

ErrorCode::ErrorCodeType CameraManager::tapZoomAtTargetSync ( PayloadIndexType  index,
CameraModule::TapZoomPosData  tapZoomPos,
int  timeout 
)

set camera tap zoom point, blocking calls

Supported Platforms : M210V2, M300
Note
TapZoom at the target. It can be called only when TapZoom is enabled. When a new target is set, the gimbal will rotate and locate the target in the center of the screen. At the same time, the camera will zoom by multiplying the TapZoom multiplier. It is only supported Z30 camera or H20/H20T zoom mode.
All the APIs whose name ending with sync or async in this class have a restriction on calling. All these API should not be called until the previous request receives ack or timeout.
Parameters
indexcamera module index, input limit see enum DJI::OSDK::PayloadIndexType
tapZoomPosthe param of tap zoom, including x,y value
timeoutblocking timeout in seconds
Returns
ErrorCode::ErrorCodeType error code

The documentation for this class was generated from the following files: