|
Header: | DJIMediaFile.h |
Inherits From: | NSObject |
This class contains information about a multi-media file on the SD card. It also provides methods to retrieve the data in the file.
|
Header: | DJIMediaFile.h |
Returns the name of the media file in the SD Card.
|
Header: | DJIMediaFile.h |
YES
if the media file is still valid. If a media file is from the file list of the media manager, the file will become invalid after the file list is reset.
|
Header: | DJIMediaFile.h |
Get the file index used in the camera.
|
Header: | DJIMediaFile.h |
Returns the type of media file.
|
Header: | DJIMediaFile.h |
Returns the type of video media file.
|
Header: | DJIMediaFile.h |
Returns the type of QuickShot video media file. .
|
Header: | DJIMediaFile.h |
Returns the DJICameraShootPhotoMode
of a photo. Returns nil
if mediaType
is
DJIMediaTypeMOV
or DJIMediaTypeMP4
.
|
Header: | DJIMediaFile.h |
Returns the DJICameraPhotoPanoramaMode
of a photo. It is valid when shootPhotoMode
is DJICameraShootPhotoModePanorama
.
|
Header: | DJIMediaFile.h |
Returns the size, in bytes, of the media file.
|
Header: | DJIMediaFile.h |
Returns the time when the media file was created as a string in the format "yyyy-MM-dd kk:mm:ss".
|
Header: | DJIMediaFile.h |
If the media file is a video, this property returns the duration of the video in seconds. Will be 0s if the media file is a photo.
|
Header: | DJIMediaFile.h |
Frame rate when the media file is a video.
|
Header: | DJIMediaFile.h |
Camera resolution.
|
Header: | DJIMediaFile.h |
The orientation of the camera when the video file was first recorded. If the camera orientation changes during a video capture, this will report the initial orientation. Will be DJICameraOrientationLandscape
if the media file is a photo. Only Mavic Pro supports this property. Will be DJICameraOrientationLandscape
for other products.
|
Header: | DJIMediaFile.h |
Storage location of the media file.
|
Header: | DJIMediaFile.h |
Custom information can be stored in media file's XMP meta data using setMediaFileCustomInformation:withCompletion
This property contains the information that was written to this media file. If this property returns nil
, use fetchCustomInformationWithCompletion
to populate it. Only supported by Phantom 4 Pro, Phantom 4 Advanced and Inspire 2 with firmware versions from after May 23 2017.
|
Header: | DJIMediaFile.h |
Returns the thumbnail for this media. If this property returns nil, call fetchThumbnailWithCompletion
.
|
Header: | DJIMediaFile.h |
Fetches this media's thumbnail with a resolution (99 x 99) from the SD card. This method can be used to fetch either a photo or a video, where the first frame of the video is the thumbnail that is fetched. It is not available if the media type is Panorama.
Precondition:
The camera mode is MediaDownload mode.
Post Condition:
This method will start to download the media thumbnail in the SD card. The content can be videos or images.
DJICompletionBlock completion | The completion block with the returned execution result. |
|
Header: | DJIMediaFile.h |
Returns the preview image for this media. If this property returns nil
, call fetchPreviewWithCompletion
.
|
Header: | DJIMediaFile.h |
Free memory by setting cached thumbnail to nil
. This does not need to be called before fetchThumbnailWithCompletion
and is provided for convenience.
|
Header: | DJIMediaFile.h |
Fetch media's preview image. The preview image is a lower resolution (960 x 540) version of a photo. The DJIMediaType
of this media object should be DJIMediaTypeJPEG
or DJIMediaTypeTIFF
. The preview will be stored in preview
.
DJICompletionBlock completion | The completion block with the returned execution result. |
|
Header: | DJIMediaFile.h |
Free memory by setting cached preview image to nil
. This does not need to be called before fetchPreviewWithCompletion
and is provided for convenience.
|
Header: | DJIMediaFile.h |
Custom information can be stored in media file's XMP meta data using setMediaFileCustomInformation:withCompletion
. The information will be stored in customInformation
. Only supported by Phantom 4 Pro, Phantom 4 Advanced, Phantom 4 Pro V2.0, Zenmuse X4S, Zenmuse X5S, Zenmuse X7 and Mavic 2 Enterprise camera.
DJICompletionBlock completion | The completion block with the returned execution result. |
|
Header: | DJIMediaFile.h |
Fetches this media file's full resolution data from the SD card. The difference between fetching the media data and fetching the thumbnail is that fetching the thumbnail will return a low-resolution image of the actual picture, while fetching the media data will return all data for a video or image. If last download action is aborted, it will continue to download the data from where the file download has been aborted. Not supported by Phantom 4 RTK. Please use setHighQualityPreviewEnabled:withCompletion
to fetch high quality preview instead.
NSUInteger offset | Offset in bytes. Pass 0 to fetch all data from the beginning. Pass the already fetched bytes to continue the previous download. |
dispatch_queue_t queue | Queue to call the update block on. |
NSData *_Nullable data | A chunk of binary data of the file. |
BOOL isComplete | YES if the last byte of the file is returned and thus fetching is complete. |
NSError *_Nullable error | Error retrieving the value. |
void (^_Nonnull)(NSData *_Nullable data, BOOL isComplete, NSError *_Nullable error) updateBlock | Block to receive file data. It will be called multiple times and each time will return the data received since the last call. |
|
Header: | DJIMediaFile.h |
Stops a currently executing call of fetchFileDataWithOffset:updateQueue:updateBlock
.
DJICompletionBlock completion | The completion block with the returned execution result. |
|
Header: | DJIMediaFile.h |
Fetches the file data of the sub media files. It is available only when mediaType
is DJIMediaTypePanorama
or DJIMediaTypeShallowFocus
.
NSArray<NSData *> *_Nullable dataList | Sub media files' data. They are files are in JPEG format. |
NSError *_Nullable error | Error retrieving the value. |
void (^_Nonnull)(NSArray<NSData *> *_Nullable dataList, NSError *_Nullable error) completion | Completion block to receive the result. |
|
Header: | DJIMediaFile.h |
Media types.
|
Header: | DJIMediaFile.h |
Video file types. It is not supported by camera:didGenerateNewMediaFile
return DJIMediaFile
media file object.
DJIMediaVideoFileTypeNormal | The video file is recorded in normal mode. |
DJIMediaVideoFileTypeTimeLapse | The video file is recorded in time-lapse mode. |
DJIMediaVideoFileTypeSlowMotion | The video file is recorded as slow motion video. |
DJIMediaVideoFileTypeQuickShot | The video file is recorded during a QuickShot mission. Use DJIActiveTrackModeQuickShot to check the detail QuickShot mode of the video file. |
DJIMediaVideoFileTypeHyperlapse | The video is recorded when the aircraft is in hyper-lapse mode. It is only supported by Mavic 2 Zoom and Mavic 2 Pro. Hyper-lapse is only supported by DJI GO 4. |
DJIMediaVideoFileTypeUnknown | Unknown. |
|
Header: | DJIMediaFile.h |
The QuickShot modes of the video file when its type is DJIMediaVideoFileTypeQuickShot
.