DJI Onboard SDK  4.0
Public Member Functions | List of all members
CameraManagerAsyncSample Class Reference

camera manager async sample More...

#include <camera_manager_async_sample.hpp>

Public Member Functions

 CameraManagerAsyncSample (Vehicle *vehiclePtr)
 
void setExposureModeAsyncSample (PayloadIndexType index, CameraModule::ExposureMode dataTarget, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 Sample to set exposure mode for camera, using async api. More...
 
void setISOAsyncSample (PayloadIndexType index, CameraModule::ISO dataTarget, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 Sample to set ISO value for camera, using async api. More...
 
void setShutterSpeedAsyncSample (PayloadIndexType index, CameraModule::ShutterSpeed dataTarget, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 Sample to set shutter speed for camera, using async api. More...
 
void setApertureAsyncSample (PayloadIndexType index, CameraModule::Aperture dataTarget, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 Sample to set shutter aperture value for camera, using async api. More...
 
void setEVAsyncSample (PayloadIndexType index, CameraModule::ExposureCompensation dataTarget, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 Sample to set exposure compensation value for camera, using async api. More...
 
void setFocusPointAsyncSample (PayloadIndexType index, float x, float y, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 Sample to set focus point for camera, using async api. More...
 
void setTapZoomPointAsyncSample (PayloadIndexType index, uint8_t multiplier, float x, float y, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 Sample to set tap-zoom point for camera, using async api. More...
 
void startZoomAsyncSample (PayloadIndexType index, CameraModule::zoomDirectionData direction, CameraModule::zoomSpeedData speed, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 Sample to execute continuous zoom on camera, using async api. More...
 
void stopZoomAsyncSample (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 Sample to stop continuous zoom on camera, using async api. More...
 
void startRecordVideoAsyncSample (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 Sample to start record video, using async api. More...
 
void stopRecordVideoAsyncSample (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 Sample to stop record video, using async api. More...
 
void startShootSinglePhotoAsyncSample (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 Sample to shoot single photo, using async api. More...
 
void startShootBurstPhotoAsyncSample (PayloadIndexType index, CameraModule::PhotoBurstCount count, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 Sample to shoot burst photo, using async api. More...
 
void startShootAEBPhotoAsyncSample (PayloadIndexType index, CameraModule::PhotoAEBCount count, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 Sample to shoot AEB photo, using async api. More...
 
void startShootIntervalPhotoAsyncSample (PayloadIndexType index, CameraModule::PhotoIntervalData intervalData, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 Sample to start shooting interval photo, using async api. More...
 
void stopShootPhotoAsyncSample (PayloadIndexType index, void(*UserCallBack)(ErrorCode::ErrorCodeType retCode, UserData userData), UserData userData)
 Sample to stop shooting, using async api. More...
 

Detailed Description

camera manager async sample

Member Function Documentation

◆ setApertureAsyncSample()

void CameraManagerAsyncSample::setApertureAsyncSample ( PayloadIndexType  index,
CameraModule::Aperture  dataTarget,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

Sample to set shutter aperture value for camera, using async api.

Note
In this interface, aperture value will be got then be set.
Parameters
indexpayload node index, input limit see enum DJI::OSDK::PayloadIndexType
dataTargetthe target aperture 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

◆ setEVAsyncSample()

void CameraManagerAsyncSample::setEVAsyncSample ( PayloadIndexType  index,
CameraModule::ExposureCompensation  dataTarget,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

Sample to set exposure compensation value for camera, using async api.

Note
In this interface, exposure compensation value will be got then be set.
Parameters
indexpayload node index, input limit see enum DJI::OSDK::PayloadIndexType
dataTargetthe target exposure compensation 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

◆ setExposureModeAsyncSample()

void CameraManagerAsyncSample::setExposureModeAsyncSample ( PayloadIndexType  index,
CameraModule::ExposureMode  dataTarget,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

Sample to set exposure mode for camera, using async api.

Note
In this interface, exposure will be got then be set.
Parameters
indexpayload node index, input limit see enum DJI::OSDK::PayloadIndexType
dataTargetthe target exposure mode
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

◆ setFocusPointAsyncSample()

void CameraManagerAsyncSample::setFocusPointAsyncSample ( PayloadIndexType  index,
float  x,
float  y,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

Sample to set focus point for camera, using async api.

Note
In this interface, focus mode will be set to be AUTO. Then the focus point will be set to be (x, y)
Parameters
indexpayload node index, input limit see enum DJI::OSDK::PayloadIndexType
xthe x value of target focus point, 0~1
ythe y value of target focus point, 0~1
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

◆ setISOAsyncSample()

void CameraManagerAsyncSample::setISOAsyncSample ( PayloadIndexType  index,
CameraModule::ISO  dataTarget,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

Sample to set ISO value for camera, using async api.

Note
In this interface, ISO will be got then be set.
Parameters
indexpayload node index, input limit see enum DJI::OSDK::PayloadIndexType
dataTargetthe target ISO 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

◆ setShutterSpeedAsyncSample()

void CameraManagerAsyncSample::setShutterSpeedAsyncSample ( PayloadIndexType  index,
CameraModule::ShutterSpeed  dataTarget,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

Sample to set shutter speed for camera, using async api.

Note
In this interface, shutter speed will be got then be set.
Parameters
indexpayload node index, input limit see enum DJI::OSDK::PayloadIndexType
dataTargetthe target shutter speed
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

◆ setTapZoomPointAsyncSample()

void CameraManagerAsyncSample::setTapZoomPointAsyncSample ( PayloadIndexType  index,
uint8_t  multiplier,
float  x,
float  y,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

Sample to set tap-zoom point for camera, using async api.

Note
In this interface, tap-zoom function will be enable and the multiplier will be set. Then the tap-zoom function will start with the target tap-zoom point (x, y)
Parameters
indexpayload node index, input limit see enum DJI::OSDK::PayloadIndexType
multiplierthe zoom multiplier of each tap zoom
xthe x value of target tap-zoom point, 0~1
ythe y value of target tap-zoom point, 0~1
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

◆ startRecordVideoAsyncSample()

void CameraManagerAsyncSample::startRecordVideoAsyncSample ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

Sample to start record video, using async api.

Note
In this interface, camera will be set to be the RECORD_VIDEO mode then start to record video.
Parameters
indexpayload node 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

◆ startShootAEBPhotoAsyncSample()

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

Sample to shoot AEB photo, using async api.

Note
In this interface, camera will be set to be the SHOOT_PHOTO mode then start to shoot a AEB photo.
Parameters
indexpayload node index, input limit see enum DJI::OSDK::PayloadIndexType
photoNumThe number of pictures in each AEB shooting
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

◆ startShootBurstPhotoAsyncSample()

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

Sample to shoot burst photo, using async api.

Note
In this interface, camera will be set to be the SHOOT_PHOTO mode then start to shoot a burst photo.
Parameters
indexpayload node index, input limit see enum DJI::OSDK::PayloadIndexType
countThe number of pictures in each burst shooting
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

◆ startShootIntervalPhotoAsyncSample()

void CameraManagerAsyncSample::startShootIntervalPhotoAsyncSample ( PayloadIndexType  index,
CameraModule::PhotoIntervalData  intervalData,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

Sample to start shooting interval photo, using async api.

Note
In this interface, camera will be set to be the SHOOT_PHOTO mode then start to shoot a interval photo.
Parameters
indexpayload node index, input limit see enum DJI::OSDK::PayloadIndexType
intervalDatathe parameter of interval shooting
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

◆ startShootSinglePhotoAsyncSample()

void CameraManagerAsyncSample::startShootSinglePhotoAsyncSample ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

Sample to shoot single photo, using async api.

Note
In this interface, camera will be set to be the SHOOT_PHOTO mode then start to shoot a single photo.
Parameters
indexpayload node 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

◆ startZoomAsyncSample()

void CameraManagerAsyncSample::startZoomAsyncSample ( PayloadIndexType  index,
CameraModule::zoomDirectionData  direction,
CameraModule::zoomSpeedData  speed,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

Sample to execute continuous zoom on camera, using async api.

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 start with the designated direction and speed, and will stop after zoomTimeInSecond second(s).
Parameters
indexpayload node index, input limit see enum DJI::OSDK::PayloadIndexType
directionthe choice of zoom out or zoom in
speedzooming speed
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

◆ stopRecordVideoAsyncSample()

void CameraManagerAsyncSample::stopRecordVideoAsyncSample ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

Sample to stop record video, using async api.

Note
In this interface, camera will be set to be the RECORD_VIDEO mode then stop recording video.
Parameters
indexpayload node 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

◆ stopShootPhotoAsyncSample()

void CameraManagerAsyncSample::stopShootPhotoAsyncSample ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

Sample to stop shooting, using async api.

Note
In this interface, camera will stop all the shooting action
Parameters
indexpayload node 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

◆ stopZoomAsyncSample()

void CameraManagerAsyncSample::stopZoomAsyncSample ( PayloadIndexType  index,
void(*)(ErrorCode::ErrorCodeType retCode, UserData userData)  UserCallBack,
UserData  userData 
)

Sample to stop continuous zoom on camera, using async api.

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 start with the designated direction and speed, and will stop after zoomTimeInSecond second(s).
Parameters
indexpayload node 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

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