interface IMediaManager |
Package: | dji.v5.manager.interfaces |
Media file management class, which providing functions such as media file list download, media file preview, download and video playback. Supported since MSDK 5.0.0
void enable(CommonCallbacks.CompletionCallback callback) |
Package: | dji.v5.manager.interfaces |
Enter the media file management module. Calling this interface, camera will enter media file management module. In this mode, you can pull media file list and playback the video in camera. At this time , camera will no be able to take photo and record, image transmission can not be display normally. It is suggested that you call this interface when you enter the album. Supported since MSDK 5.0.0
CommonCallbacks.CompletionCallback callback | Return the execution result of callback. |
void disable(CommonCallbacks.CompletionCallback callback) |
Package: | dji.v5.manager.interfaces |
Exit the media file management module. Calling this interface, camera will exit media file management module. Camera can take photo and record normally and the image transmission will diaplay normally. It is suggested that you call this interface when you exit the album. Supported since MSDK 5.0.0
CommonCallbacks.CompletionCallback callback | Return the execution result of callback. |
void addMediaFileListStateListener(MediaFileListStateListener listener) |
Package: | dji.v5.manager.interfaces |
Set media file list status listener. Through this listener, the status of media file list can be monitored. Supported since MSDK 5.0.0
MediaFileListStateListener listener | Listener of media file list status. |
void removeMediaFileListStateListener(MediaFileListStateListener listener) |
Package: | dji.v5.manager.interfaces |
Remove the listener of media file list status. Supported since MSDK 5.0.0
MediaFileListStateListener listener | Listener of media file list status. |
void removeAllMediaFileListStateListener() |
Package: | dji.v5.manager.interfaces |
Remove all the listeners of media file list status. Supported since MSDK 5.0.0
MediaFileListState getMediaFileListState() |
Package: | dji.v5.manager.interfaces |
Get the media file list status. This is an synchronous interface. Supported since MSDK 5.0.0
MediaFileListState | Return the media file list status. |
void setMediaFileDataSource(MediaFileListDataSource source) |
Package: | dji.v5.manager.interfaces |
Set the data source of media file that needed. You can choose media file from selected storage location and selected loads. Supported since MSDK 5.0.0
MediaFileListDataSource source | Data source of media file. |
void pullMediaFileListFromCamera(@NonNull PullMediaFileListParam param, CommonCallbacks.CompletionCallback callback) |
Package: | dji.v5.manager.interfaces |
Pull the media file list from camera. When the media file list status MediaFileListState
is IDLE
, this method should be called to pull full data. When new media files are generated, MSDK will automatically pull the latest media file list from the camera. When the media file list status MediaFileListState
changes to UP_TO_DATE
, it means that the process of pulling media file list is finished. Please call the getMediaFileListData
to get media file list data.
Notice:
Zenmuse P1 and Zenmuse L1 only support pulling the full multimedia file list, and setting mediaFileIndex and count is invalid. Supported since MSDK 5.0.0
@NonNull PullMediaFileListParam param | Parameters of media file list. Zenmuse P1 and Zenmuse L1 only support pulling the full multimedia file list, and setting mediaFileIndex and count is invalid. |
CommonCallbacks.CompletionCallback callback | Return the execution result of callback. |
void stopPullMediaFileListFromCamera() |
Package: | dji.v5.manager.interfaces |
Stop pulling the media file list from camera. Supported since MSDK 5.0.0
MediaFileListData getMediaFileListData() |
Package: | dji.v5.manager.interfaces |
Get parameters of media file list. When the media file list status MediaFileListState
is monitored to change to UP_TO_DATE
, it means media file list have updated. This interface should be called again to update the media file list data. Supported since MSDK 5.0.0
MediaFileListData | Return parameters of media file list. |
void deleteMediaFiles(List<MediaFile> files, CommonCallbacks.CompletionCallback callback) |
Package: | dji.v5.manager.interfaces |
Delete the media file in camera. After calling this interface, media file list status MediaFileListState
will change to UPDATING
. After the deletion, the media file list status MediaFileListState
is UP_TO_DATE
, please call getMediaFileListData
to update media file list data. Supported since MSDK 5.0.0
List<MediaFile> files | Media file list that needs to be deleted. |
CommonCallbacks.CompletionCallback callback | Return the execution result of callback. |
void setMediaFileXMPCustomInfo(@NonNull String information, CommonCallbacks.CompletionCallback callback) |
Package: | dji.v5.manager.interfaces |
Set the XMP custom information. After the setting is successful, each time a photo file is generated, the XMP custom information will be stored in the XMP metadata of the photo file. You can call the pullXMPCustomInfoFromCamera
in the MdeiaFile class to pull the XMP custom information of the specified photo file from the camera.
Notice:
1. One setting is valid for multiple times. After the camera is reboot, the custom information will be cleared, and it needs to be set again.
2. Currently only supports Zenmuse H20 series cameras, Zenmuse L1 camera, and Zenmuse P1 camera. Supported since MSDK 5.7.0
@NonNull String information | XMP custom information that needs to be set. Use UTF-8 encoding and be less than or equal to 31 characters in length. |
CommonCallbacks.CompletionCallback callback | Return the execution result of callback. |
void getMediaFileXMPCustomInfo(@NonNull final CommonCallbacks.CompletionCallbackWithParam<String> callback) |
Package: | dji.v5.manager.interfaces |
Get the XMP custom information.
Notice:
Currently only supports Zenmuse H20 series cameras, Zenmuse L1 camera, and Zenmuse P1 camera. Supported since MSDK 5.7.0
@NonNull final CommonCallbacks.CompletionCallbackWithParam<String> callback | Return the execution result of callback. |
|
Package: | dji.v5.manager.interfaces |
Start to play the set media file. Media file data can be obtained by callback method. IVideoFrame
obtained from callback.IVideoDecoder
provided by DJI to decode video. Using EXTENDED_STREAM_CHANNEL
to init IVideoDecoder
, and then call setMediaFile
to set the media file into the decoder. Finally, call queueInFrame
to send the video frame data IVideoFrame
to decode.
Note:
This interface is deprecated starting from MSDK 5.8.0. Please call playVideoToSurface
to play media file.
Supported since MSDK 5.0.0
MediaFile mediaFile | Media file list that needs to playback. |
CommonCallbacks.CompletionCallbackWithParam<IVideoFrame> callback | Return the execution result of callback. |
void playVideoToSurface(MediaFile mediaFile, |
Package: | dji.v5.manager.interfaces |
Start playing the set media file. Media file data can be obtained by callback method.
Note:
If you want to decode to display the video by yourself, you can call custom decoder to decode the video through the video stream data from the listener.
Supported since MSDK 5.0.0
MediaFile mediaFile | Media file list that needs to playback. |
Surface surface | The surface that needs to be displayed. |
int surfaceWidth | The width of surface that needs to be displayed. |
int surfaceHeight | The height of surface that needs to be displayed. |
ICameraStreamManager.ScaleType scaleType | Set the scale type required for video stream display. |
MediaFrameListener listener | Return the execution result of callback. |
void seekVideo(int position, CommonCallbacks.CompletionCallback callback) |
Package: | dji.v5.manager.interfaces |
Jump to play media file. You can set a new position to play. Supported since MSDK 5.0.0
int position | The location where you need to jump to play. Unit:second. |
CommonCallbacks.CompletionCallback callback | Return the execution result of callback. |
void pauseVideo(CommonCallbacks.CompletionCallback callback) |
Package: | dji.v5.manager.interfaces |
Pause playing the media file. Supported since MSDK 5.0.0
CommonCallbacks.CompletionCallback callback | Return the execution result of callback. |
void resumeVideo(CommonCallbacks.CompletionCallback callback) |
Package: | dji.v5.manager.interfaces |
Resume to play the media file. Supported since MSDK 5.0.0
CommonCallbacks.CompletionCallback callback | Return the execution result of callback. |
void stopVideo(CommonCallbacks.CompletionCallback callback) |
Package: | dji.v5.manager.interfaces |
Stop playing the media file. Supported since MSDK 5.0.0
CommonCallbacks.CompletionCallback callback | Return the execution result of callback. |
void addVideoPlayStateListener(VideoPlayStateListener listener) |
Package: | dji.v5.manager.interfaces |
Set the listener of media file playing status. Through this listener, status of media file playing can be monitored. Supported since MSDK 5.0.0
VideoPlayStateListener listener | Listener of media file playing status. |
void removeVideoPlayStateListener(VideoPlayStateListener listener) |
Package: | dji.v5.manager.interfaces |
Remove listener of media file playing status. Supported since MSDK 5.0.0
VideoPlayStateListener listener | Listener of media file playing status. |
void removeAllVideoPlayStateListener() |
Package: | dji.v5.manager.interfaces |
Remove listeners of media file playing status. Supported since MSDK 5.0.0
void release() |
Package: | dji.v5.manager.interfaces |
Resource release. Calling this interface will cancel the media file data downloading, clear the thumbnail cache and clear the media file list data. It is recommended that you call it when the system memory is insufficient. Supported since MSDK 5.0.0
enum MediaFileFilter |
Package: | dji.v5.manager.datacenter.media |
Pulling media file list filter setting class. Supported since MSDK 5.0.0
VIDEO | Video. |
PHOTO | Photo. |
ALL | All media files. |
enum MediaFileListState |
Package: | dji.v5.manager.datacenter.media |
Media file list status. Supported since MSDK 5.0.0
IDLE | IDLE status. When the media file list is in IDLE status, pullMediaFileListFromCamera should be called to pull full data. |
UP_TO_DATE | Updated status. When the media file list is in updated status, getMediaFileListData should be called to update the media file list data. |
UPDATING | Updating status. When the media file list is in updating status, it means that the MSDK is synchronizing with date in camera. After the synchronization, the status will change to UP_TO_DATE , getMediaFileListData should be called to update the media file list data. |
enum VideoPlayState |
Package: | dji.v5.manager.datacenter.media |
Enum type of media file playing status. Supported since MSDK 5.0.0
IDLE | IDEL status. The media file play function is not enabled. playVideo can be called to play media file. |
PLAYING | Playing. |
ENDED | Play is ended. |
STOPPED | Play is stopped. When stopVideo is called successfully to stop playing media file, this status will be called back. |