# class MediaFile

    class MediaFile implements Serializable

Package: | dji.v5.manager.datacenter.media

##### Description:

Media file data class.
`Supported since MSDK 5.0.0`

##### Class Members:

method
getFileIndex

###### method getFileIndex

    int getFileIndex()

Package: | dji.v5.manager.datacenter.media

##### Description:

Get index of media file.
`Supported since MSDK 5.0.0`

##### Return:

int | Return index of media file.

method
getFileType

###### method getFileType

    MediaFileType getFileType()

Package: | dji.v5.manager.datacenter.media

##### Description:

Get type of media file.
`Supported since MSDK 5.0.0`

##### Return:

MediaFileType | Return type of media file.

method
getFileName

###### method getFileName

    String getFileName()

Package: | dji.v5.manager.datacenter.media

##### Description:

Get name of media file.
Notice:
Zenmuse P1 cannot obtain the extension name of the customized file. This is a legacy issue in the camera protocol design.
`Supported since MSDK 5.0.0`

##### Return:

String | Return name of media file.

method
getFileSize

###### method getFileSize

    long getFileSize()

Package: | dji.v5.manager.datacenter.media

##### Description:

Get size of media file. Unit: byte.
`Supported since MSDK 5.0.0`

##### Return:

long | Return size of media file.

method
getDate

###### method getDate

    DateTime getDate()

Package: | dji.v5.manager.datacenter.media

##### Description:

Get the generation time of media file.
`Supported since MSDK 5.0.0`

##### Return:

DateTime | Return the generation time of media file.

method
getDuration

###### method getDuration

    Long getDuration()

Package: | dji.v5.manager.datacenter.media

##### Description:

Get the duration of video play. Unit: second.
`Supported since MSDK 5.0.0`

##### Return:

Long | Return the duration of video play.

method
getFrameRate

###### method getFrameRate

    VideoFrameRate getFrameRate()

Package: | dji.v5.manager.datacenter.media

##### Description:

Get video framerate.
`Supported since MSDK 5.0.0`

##### Return:

VideoFrameRate | Return video framerate.

method
getResolution

###### method getResolution

    VideoResolution getResolution()

Package: | dji.v5.manager.datacenter.media

##### Description:

Get video resolution.
`Supported since MSDK 5.0.0`

##### Return:

VideoResolution | Return video resolution.

method
getPhotoRatio

###### method getPhotoRatio

    PhotoRatio getPhotoRatio()

Package: | dji.v5.manager.datacenter.media

##### Description:

Get photo ratio.
`Supported since MSDK 5.0.0`

##### Return:

PhotoRatio | Return photo ratio.

method
getThumbNail

###### method getThumbNail

    Bitmap getThumbNail()

Package: | dji.v5.manager.datacenter.media

##### Description:

Get media file thumbnail. Please call `pullThumbnailFromCamera` to pull the thumbnail from the camera first, and save to the memory.
`Supported since MSDK 5.0.0`

##### Return:

Bitmap | Return media file thumbnail.

method
pullThumbnailFromCamera

###### method pullThumbnailFromCamera

    void pullThumbnailFromCamera(CommonCallbacks.CompletionCallbackWithParam<Bitmap> callback)

Package: | dji.v5.manager.datacenter.media

##### Description:

Pull the thumbnail of media file from the camera. The pulled thumbnail will be returned to the developer in the callback method and will be saved to the memory at the same time. You can call `getThumbNail` to get thumbnail from the memory.
`Supported since MSDK 5.0.0`

##### Input Parameters:

CommonCallbacks.CompletionCallbackWithParam<Bitmap> callback | Return the execution result of callback.

method
pullPreviewFromCamera

###### method pullPreviewFromCamera

    void pullPreviewFromCamera(@NonNull CommonCallbacks.CompletionCallbackWithParam<Bitmap> callback)

Package: | dji.v5.manager.datacenter.media

##### Description:

Pull the preview of media file from the camera. The pulled preview will be returned to the developer in the callback method. MSDK will no save the preview in memory and you can save it as needed.
`Supported since MSDK 5.0.0`

##### Input Parameters:

@NonNull CommonCallbacks.CompletionCallbackWithParam<Bitmap> callback | Return the execution result of callback.

method
stopPullPreviewFromCamera

###### method stopPullPreviewFromCamera

    void stopPullPreviewFromCamera(@NonNull CommonCallbacks.CompletionCallback callback)

Package: | dji.v5.manager.datacenter.media

##### Description:

Stop pulling the preview of media file.
`Supported since MSDK 5.0.0`

##### Input Parameters:

@NonNull CommonCallbacks.CompletionCallback callback | Return the execution result of callback.

method
pullOriginalMediaFileFromCamera

###### method pullOriginalMediaFileFromCamera

    void pullOriginalMediaFileFromCamera(long offset, @NonNull MediaFileDownloadListener callback)

Package: | dji.v5.manager.datacenter.media

##### Description:

Pull the origin media file from the camera. The pulled media file will be returned to the developer in the callback method. MSDK will no save the origin media file in memory and you can save it as needed.
`Supported since MSDK 5.0.0`

##### Input Parameters:

long offset | Offset value of media file download. Unit:byte.
@NonNull MediaFileDownloadListener callback | Return the execution result of callback.

method
stopPullOriginalMediaFileFromCamera

###### method stopPullOriginalMediaFileFromCamera

    void stopPullOriginalMediaFileFromCamera(CommonCallbacks.CompletionCallback callback)

Package: | dji.v5.manager.datacenter.media

##### Description:

Stop pulling origin media file.
`Supported since MSDK 5.0.0`

##### Input Parameters:

CommonCallbacks.CompletionCallback callback | Return the execution result of callback.

method
pullXMPFileDataFromCamera

###### method pullXMPFileDataFromCamera

    void pullXMPFileDataFromCamera(CommonCallbacks.CompletionCallbackWithParam<String> callback)

Package: | dji.v5.manager.datacenter.media

##### Description:

Pull XMP information in photo file from the camera.
Notice:
Currently only supports Zenmuse H20 series cameras, Zenmuse L1 camera, and Zenmuse P1 camera.
`Supported since MSDK 5.7.0`

##### Input Parameters:

CommonCallbacks.CompletionCallbackWithParam<String> callback | Return the execution result of callback.

method
getXMPFileData

###### method getXMPFileData

    String getXMPFileData()

Package: | dji.v5.manager.datacenter.media

##### Description:

Synchronously obtain XMP information in photo file. If the return is empty, please call `pullXMPFileDataFromCamera` to pull XMP information from the camera.
Notice:
Currently only supports Zenmuse H20 series cameras, Zenmuse L1 camera, and Zenmuse P1 camera.
`Supported since MSDK 5.7.0`

##### Return:

String | Return XMP information in photo file.

method
pullXMPCustomInfoFromCamera

###### method pullXMPCustomInfoFromCamera

    void pullXMPCustomInfoFromCamera(CommonCallbacks.CompletionCallbackWithParam<String> callback)

Package: | dji.v5.manager.datacenter.media

##### Description:

Pull XMP custom information in photo file from the camera.
Notice:
Currently only supports Zenmuse H20 series cameras, Zenmuse L1 camera, and Zenmuse P1 camera.
`Supported since MSDK 5.7.0`

##### Input Parameters:

CommonCallbacks.CompletionCallbackWithParam<String> callback | Return the execution result of callback.

method
getXMPCustomInfo

###### method getXMPCustomInfo

    String getXMPCustomInfo()

Package: | dji.v5.manager.datacenter.media

##### Description:

Synchronously obtain XMP custom information in photo file. If the return is empty, please call `pullXMPFileDataFromCamera` to pull XMP information from the camera.
Notice:
Currently only supports Zenmuse H20 series cameras, Zenmuse L1 camera, and Zenmuse P1 camera.
`Supported since MSDK 5.7.0`

##### Return:

String | Return XMP custom information in photo file.

×

## Search Mobile SDK Document

{{searchCount}} Results

- ### {{{(item.highlights && item.highlights.title) || item.title}}}

  {{{(item.highlights && item.highlights.content[0]) || item.title}}}

Load More
Loading...
Not Found