DJI Mobile SDK Documentation

      class DJIFetchMediaTask

      @interface DJIFetchMediaTask : NSObject
      Header:DJIFetchMediaTaskScheduler.h
      Inherits From:NSObject
      Description:

      Task to fetch contents of a media file. To make DJIFetchMediaTaskScheduler fetch the thumbnail, preview or custom information of a media file, a task should be created by using taskWithFile:content:andCompletion.

      Class Members:
      property
      property file
      @property (nonatomic, readonly, nonnull) DJIMediaFile *file
      Header:DJIFetchMediaTaskScheduler.h
      Description:

      Media file object to execute task on.

      See Also:

      DJIMediaFile

      property
      property content
      @property (nonatomic, readonly) DJIFetchMediaTaskContent content
      Header:DJIFetchMediaTaskScheduler.h
      Description:

      Content types to fetch. A task can fetch more than one content type by using the bitwise OR operator on different contents.

      See Also:

      DJIFetchMediaTaskContent

      class method taskWithFile:content:andCompletion
      +(instancetype)taskWithFile:(DJIMediaFile *)file
      content:(DJIFetchMediaTaskContent)content
      andCompletion:(DJIFetchMediaTaskCompletionBlock)completion
      Header:DJIFetchMediaTaskScheduler.h
      Description:

      Creates a task instance.

      Input Parameters:
      DJIMediaFile * fileMedia file to execute task on.
      DJIFetchMediaTaskContent contentContent to fetch.
      DJIFetchMediaTaskCompletionBlock completionThe completion block with the returned execution result.
      typedef block DJIFetchMediaTaskCompletionBlock
      typedef void(^DJIFetchMediaTaskCompletionBlock)(DJIMediaFile *file, DJIFetchMediaTaskContent content, NSError *_Nullable error)
      Header:DJIFetchMediaTaskScheduler.h
      Description:

      Completion block that is called when the scheduler finishes downloading content for a fetch media file task. If multiple content types are defined for a file, this completion block will be called at the completion of each content type being downloaded. The order content types will be downloaded in is first DJIFetchMediaTaskContentThumbnail, then DJIFetchMediaTaskContentPreview and lastly DJIFetchMediaTaskContentCustomInformation.

      Input Parameters:
      DJIMediaFile * fileThe media file that the content belongs to.
      DJIFetchMediaTaskContent contentAn enum value of DJIFetchMediaTaskContent.
      NSError *_Nullable errorOccurred error if there is any.
      NS_OPTIONS DJIFetchMediaTaskContent
      typedef NS_OPTIONS(NSUInteger, DJIFetchMediaTaskContent)
      Header:DJIFetchMediaTaskScheduler.h
      Description:

      The content to download in a fetch media file task.

      Members:
      DJIFetchMediaTaskContentNoneNone.
      DJIFetchMediaTaskContentThumbnailThe scheduler will download the thumbnail of the media file.
      DJIFetchMediaTaskContentPreviewThe scheduler will download the preview image of the media file.
      DJIFetchMediaTaskContentCustomInformationThe scheduler will download the custom information of the media file.