Return code of pullMediaFileListFromCamera
已完成I have a question about the specifications of pullMediaFileListFromCamera.
1. What does it mean when this function returns -3 or -7 Errorcode?
I am thinking that -3 probably means timeout, but I don't understand about -7.
2. When there are more than 1000 data in the SD card, I cannot get a list of all data with pullMediaFileListFromCamera(-1, -1), I can only get about 400 data. Why is this?
Also, is there a way to get only the list of shooting folders, not the list of files?
Best Regards
-
1. What does it mean when this function returns -3 or -7 Errorcode? -->-3 indicates timeout. -7 is a non-specific error, can you provide details about the error scenario? 2. When there are more than 1000 data in the SD card, I cannot get a list of all data with pullMediaFileListFromCamera(-1, -1), I can only get about 400 data. Why is this? --》 What type of aircraft are you using? In fact, drones may not support obtaining too many files at once. You can try setting the number of files to be obtained for this time using PullMediaFileListParam.Count, and then retrieve them multiple times. Also, is there a way to get only the list of shooting folders, not the list of files? -->You can configure the PullMediaFileListParam to only retrieve photos. Thank you. -
Sorry for the late reply.
I have tried PullMediaFileListParam and it does not work.
I have also found a few additional things.1. in the V5.8.0 sample app with pullMediaFileListFromCamera.The larger the MediaFileIndex, the more likely it is to time out. Also, specifying filter(MediaFileFilter.PHOTO) in PullMediaFileListParam did not improve the problem.
2. There is a bug in the album function of DJI Pilot2, when there are more than 3000 images in a folder, it is not displayed.
From the above, am I right in understanding that DJI SDK is not designed to handle a large amount of data? If so, how many images are guaranteed to work? -
Could you please provide a detailed description of your testing method? Currently, I am using PullMediaFileListParam on the Mavic 3 Enterprise series without any issues. Retrieving 3000 photos at once is a relatively large quantity, and paging through them helps avoid retrieval failures caused by a large amount of data. Below is an example. //mediaFileIndex -- MediaFile.index//count -- Number of photos pulled this timeMediaDataCenter.getInstance().mediaManager.pullMediaFileListFromCamera( PullMediaFileListParam.Builder().mediaFileIndex(mediaFileIndex).count(count).build(), object : CommonCallbacks.CompletionCallback { override fun onSuccess() { ToastUtils.showToast("Spend time:${(System.currentTimeMillis() - currentTime) / 1000}s") LogUtils.i(logTag, "fetch success") } override fun onFailure(error: IDJIError) { LogUtils.e(logTag, "fetch failed$error") } }) Suppose your camera only stores 4 photos, so there are four MediaFiles storing their information, and their index attributes are 111, 222, 333, 444 respectively. Generally, the later generated photos will have larger indexes, and internally the SDK arranges them in descending order, so the storage order of these four photos in the MediaFileList is 444, 333, 222, 111. If I want to retrieve the two photos starting from 333, then I need to set the mediaFileIndex to 333 and count to 3. Thank you.
请先登录再写评论。
评论
7 条评论