DJICamera

@interface DJICamera : DJIBaseComponent

This class contains the media manager and playback manager to manage the Camera’s media content. It provides methods to change camera settings and perform camera actions.

  • Delegate that recevies the information sent by the camera.

    Declaration

    Objective-C

    @property (readwrite, nonatomic) id<DJICameraDelegate> _Nullable delegate;
  • String that represents name of the camera.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *_Nonnull displayName;
  • Media Manager is used for interaction when camera is in DJICameraModeMediaDownload. The user can only access the manager when isMediaDownloadModeSupported returns YES.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DJIMediaManager *_Nullable mediaManager;
  • Playback Manager is used for interaction when camera is in DJICameraModePlayback. User can only access to the manager when isPlaybackSupported returns YES.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DJIPlaybackManager *_Nullable playbackManager;
  • Sets the camera’s work mode to taking pictures, video, playback or download (see DJICameraMode) for details on camera work modes. 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.

    Declaration

    Objective-C

    - (void)setCameraMode:(DJICameraMode)mode
           withCompletion:(DJICompletionBlock)block;

    Parameters

    mode

    Camera work mode.

    block

    Remote execution result error block.

  • Gets the camera’s current work mode. Also supported by thermal imaging camera.

    Declaration

    Objective-C

    - (void)getCameraModeWithCompletion:(void (^_Nonnull)(DJICameraMode,
                                                          NSError *_Nullable))block;

    Parameters

    block

    Remote execution result callback block.

  • Check if the current device supports time-lapse shoot mode. Supported only on the Osmo camera.

    Declaration

    Objective-C

    - (BOOL)isTimeLapseSupported;
  • Camera starts to take photo with one of the camera capture modes (shoot photo modes).

    Preconditions:

    1. Camera must be in ShootPhoto mode.
    2. The SD card state should be checked before this method is used to ensure sufficient space exists.

    Note that if the capture mode is Interval or Time-lapse, calling stopShootPhoto may be required for the camera to stop taking photos. Also supported by thermal imaging camera.

    Declaration

    Objective-C

    - (void)startShootPhoto:(DJICameraShootPhotoMode)shootMode
             withCompletion:(DJICompletionBlock)block;

    Parameters

    shootMode

    Shoot photo mode with which the camera can start taking photos. See CameraShootPhotoMode to view all possible camera shoot modes.

    block

    The execution callback with the returned execution result.

  • Camera stops taking photos.

    Preconditions:

    1. startShootPhoto:withCompletion: has been invoked and the shoot mode is either Interval or Time-lapse.
    2. The shoot photo operation is still executing.

    Also supported by thermal imaging camera.

    Declaration

    Objective-C

    - (void)stopShootPhotoWithCompletion:(DJICompletionBlock)block;

    Parameters

    block

    The execution callback with the returned execution result.

  • YES if current device supports Slow Motion video recording. Currently Slow Motion is supported by the Osmo X3/Z3 camera, the Phantom 4 camera and the Mavic Pro camera. Note, while P4P, X4S and X5S can record at high frame-rates, the video playback will be in realtime. There are two ways to enter Slow Motion mode:

    1. Call setVideoSlowMotionEnabled:withCompletion: with YES.
    2. Call setVideoResolution:andFrameRate:withCompletion: with DJICameraVideoResolution1920x1080 and DJICameraVideoFrameRate120FPS for the X3 camera or the Phantom 4 camera. Call setVideoResolution:andFrameRate:withCompletion: with DJICameraVideoResolution1920x1080 and DJICameraVideoFrameRate96FPS or DJICameraVideoResolution1280x720 and DJICameraVideoFrameRate120FPS for the Mavic Pro camera.

    Declaration

    Objective-C

    - (BOOL)isSlowMotionSupported;
  • Enables/Disables Slow Motion video recording. When it is enabled, the frame rate will change to 120fps. When it is disabled, the resolution and frame rate will revert to the previous setting for Osmo, while for the Phantom 4 camera or the Mavic Pro camera, the resolution will remain at DJICameraVideoResolution1920x1080 and the frame rate will change to DJICameraVideoFrameRate47dot950FPS.

    Declaration

    Objective-C

    - (void)setVideoSlowMotionEnabled:(BOOL)enabled
                       withCompletion:(DJICompletionBlock)block;

    Parameters

    enabled

    Enable or disable Slow Motion video.

    block

    The execution callback with the returned execution result.

  • Determines whether Slow Motion mode is enabled. Supported only by the Osmo camera.

    Declaration

    Objective-C

    - (void)getVideoSlowMotionEnabledWithCompletion:
        (void (^_Nonnull)(BOOL, NSError *_Nullable))block;

    Parameters

    block

    The execution callback with the returned value(s).

  • Starts recording video. The camera must be in DJICameraModeRecordVideo work mode. Also supported by thermal imaging camera.

    Declaration

    Objective-C

    - (void)startRecordVideoWithCompletion:(DJICompletionBlock)block;
  • Stops recording video. Also supported by thermal imaging camera.

    Declaration

    Objective-C

    - (void)stopRecordVideoWithCompletion:(DJICompletionBlock)block;