This commit is contained in:
tangchao0503
2023-08-18 10:50:41 +08:00
parent b2f2c17b7a
commit 4343500d70

View File

@ -93,11 +93,11 @@ bool DjiMediaFile_IsSupported(const char *filePath)
T_DjiReturnCode DjiMediaFile_CreateHandle(const char *filePath, T_DjiMediaFileHandle *pMediaFileHandle)
{
int optIndex;
int optIndex;//这个指数 指明了 filePath中的文件格式 处于数组s_mediaFileOpt中的哪一个元素
T_DjiOsalHandler *osalHandler = DjiPlatform_GetOsalHandler();
for (optIndex = 0; optIndex < s_mediaFileOptCount; optIndex++) {
if (s_mediaFileOpt[optIndex].isSupportedFunc(filePath) == true) {
if (s_mediaFileOpt[optIndex].isSupportedFunc(filePath) == true) {//查看filePath的格式是否 存在于 所有支持的格式中
break;
}
}
@ -116,7 +116,7 @@ T_DjiReturnCode DjiMediaFile_CreateHandle(const char *filePath, T_DjiMediaFileHa
return DJI_ERROR_SYSTEM_MODULE_CODE_MEMORY_ALLOC_FAILED;
}
(*pMediaFileHandle)->mediaFileOptItem = s_mediaFileOpt[optIndex];
(*pMediaFileHandle)->mediaFileOptItem = s_mediaFileOpt[optIndex];//为pMediaFileHandle(媒体文件句柄)添加处理函数
(*pMediaFileHandle)->mediaFileThm.privThm = NULL;
(*pMediaFileHandle)->mediaFileScr.privScr = NULL;