DJI Windows SDK Documentation

class MediaTask

class MediaTask
Declaration:DJI.WindowsSDK
Description:

MediaTask consist of task event and request. MediaTask should construct with MediaTaskRequest, Pass to MediaTaskManager to invoke the lifecycle event.

Class Members:
delegate OnTaskListReqResponseHandler
delegate void OnTaskListReqResponseHandler(MediaTask sender, List<MediaFile> files)
Declaration:DJI.WindowsSDK
Description:

Delegate of task complete file list request event.

delegate OnTaskListReqForwardHandler
delegate void OnTaskListReqForwardHandler(MediaTask sender, MediaFileListRequest? request, int offset, int count)
Declaration:DJI.WindowsSDK
Description:

Delegate of forward to next file list request event.

delegate OnTaskDataReqResponseHandler
delegate void OnTaskDataReqResponseHandler(MediaTask sender, MediaFileDownloadRequest? request, byte[] data, double bitSpeed)
Declaration:DJI.WindowsSDK
Description:

Delegate of download file data transfer event, you should calculate how many bytes already download here.

delegate OnTaskDataReqForwardHandler
delegate void OnTaskDataReqForwardHandler(MediaTask sender, MediaFileDownloadRequest? request, int offset, int count)
Declaration:DJI.WindowsSDK
Description:

Delegate of forward to next download file request event.

delegate OnRequestTearDownHandler
delegate void OnRequestTearDownHandler(MediaTask sender, SDKError retCode, MediaTaskResponse? response)
Declaration:DJI.WindowsSDK
Description:

Delegate of task execute finished, if requests all successed, task invoke this event at last. If any request get failure, the task fail and invoke this event immediately.

event OnListReqResponse
event OnTaskListReqResponseHandler OnListReqResponse
Declaration:DJI.WindowsSDK
Description:

MediaFileListRequest response event .See OnTaskListReqResponseHandler

event OnListReqForward
event OnTaskListReqForwardHandler OnListReqForward
Declaration:DJI.WindowsSDK
Description:

MediaFileListRequest forward event .See OnTaskListReqForwardHandler

event OnDataReqResponse
event OnTaskDataReqResponseHandler OnDataReqResponse
Declaration:DJI.WindowsSDK
Description:

MediaFileDownloadRequest response event .See OnTaskDataReqResponseHandler

event OnDataReqForward
event OnTaskDataReqForwardHandler OnDataReqForward
Declaration:DJI.WindowsSDK
Description:

MediaFileDownloadRequest forward event .See OnTaskDataReqForwardHandler

event OnRequestTearDown
event OnRequestTearDownHandler OnRequestTearDown
Declaration:DJI.WindowsSDK
Description:

MediaTask have finished all requests event or occur request failure.See OnRequestTearDownHandler

Construct

Methods
method
method MediaTask
MediaTask(MediaTaskRequest request)
Declaration:DJI.WindowsSDK
Description:

Construct a task with MediaTaskRequest.

Input Parameters:
MediaTaskRequest requestThe request taken by task. See MediaTaskRequest.
method FromRequest
static public MediaTask FromRequest(MediaFileListRequest request)
Declaration:DJI.WindowsSDK
Description:

A convenience construct method of task with MediaFileListRequest. MediaTaskRequest will use "FILE_LIST" type, "NONE" duplicateType, "BACK_TO_QUEUE" deferType, "DEFAULT" priority

Input Parameters:
MediaFileListRequest requestConvert to MediaTaskRequest with file list request. See MediaFileListRequest.
Return:
public MediaTaskAn instance of MediaTask
method FromRequest
static public MediaTask FromRequest(MediaFileDownloadRequest request)
Declaration:DJI.WindowsSDK
Description:

A convenience construct method of task with MediaFileDownloadRequest. MediaTaskRequest will use "FILE_LIST" type, "NONE" duplicateType, "BACK_TO_QUEUE" deferType, "DEFAULT" priority

Input Parameters:
MediaFileDownloadRequest requestConvert to MediaTaskRequest with download file request. See MediaFileDownloadRequest.
Return:
public MediaTaskAn instance of MediaTask


Field

property
property get
MediaTaskRequest Request { get => this.request; }
Declaration:DJI.WindowsSDK
Description:

Media task request passed by construct.

See Also:

MediaTaskRequest, get