Skip to content

Commit 24e070c

Browse files
author
kohgylw
committed
update to v1.2.0 进一步完善了在线解码功能
1 parent 1d912ec commit 24e070c

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

‎TODO.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,6 @@ test.auth.xxx=ucd
215215
【已完成】进一步优化了图形界面下的“文��”功能:现在可以通过点击表头对文件列表进行排序了。
216216
【已完成】进一步优化了图形界面下的“文件”功能:现在双击文件列表中的文件可以快速预览它了。
217217
【已完成】进一步优化了命令模式下的“文件”功能:现在可以通过“ls -l”显示所有项目的详细信息了。
218-
【已完成】进一步优化了在线解码功能:当没有找到与操作系统匹配的ffmpeg解码引擎时,在线解码功能将自动禁用
218+
【已完成】修复了当ffmpeg解码引擎因某些原因无法完成初始化时服务器不能正常启动的问题
219219
【已完成】修复了几处在执行文件导入导出操作时可能导致死锁的问题。
220220
【已完成】进一步完善了断点续传功能。

‎src/main/java/kohgylw/kiftd/server/util/KiftdFFMPEGLocator.java‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import java.nio.file.Paths;
88
import java.nio.file.StandardCopyOption;
99

10-
import javax.annotation.Resource;
11-
1210
import org.springframework.stereotype.Component;
1311

1412
import kohgylw.kiftd.printer.Printer;
@@ -20,9 +18,6 @@
2018
@Component
2119
public class KiftdFFMPEGLocator implements ProcessLocator {
2220

23-
@Resource
24-
private LogUtil lu;
25-
2621
private boolean enableFFmpeg;
2722

2823
private String suffix;
@@ -87,8 +82,8 @@ private String initFFMPEGExecutablePath() {
8782
try {
8883
Files.copy(customFFMPEGexef.toPath(), ffmpegFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
8984
} catch (IOException e) {
85+
Printer.instance.print(e.toString());
9086
Printer.instance.print("警告:自定义的ffmpeg引擎可执行文件无法读取,视频播放的在线解码功能将不可用。");
91-
lu.writeException(e);
9287
enableFFmpeg = false;
9388
return null;
9489
}
@@ -115,7 +110,8 @@ private String initFFMPEGExecutablePath() {
115110
Runtime.getRuntime().exec(new String[] { "/bin/chmod", "755", ffmpegFile.getAbsolutePath() });
116111
} catch (IOException e) {
117112
// 授予权限失败的话……好像也没啥好办法
118-
lu.writeException(e);
113+
Printer.instance.print(e.toString());
114+
Printer.instance.print("警告:ffmpeg引擎初始化失败,视频播放的在线解码功能将不可用。");
119115
enableFFmpeg = false;
120116
return null;
121117
}
@@ -146,7 +142,8 @@ private boolean copyFile(String path, File dest) {
146142
is.close();
147143
return copyResult;
148144
} catch (IOException ioex) {
149-
lu.writeException(ioex);
145+
Printer.instance.print(ioex.toString());
146+
Printer.instance.print("警告:ffmpeg引擎初始化失败,视频播放的在线解码功能将不可用。");
150147
}
151148
}
152149
return false;

‎target/classes/META-INF/maven/kohgylw/kiftd/pom.properties‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Generated by Maven Integration for Eclipse
2-
#Sat Jan 13 17:49:51 CST 2024
2+
#Sun Jan 14 12:39:30 CST 2024
33
m2e.projectLocation=/Users/kohgylw/Programs/java_workspace/kiftd
44
m2e.projectName=kiftd
55
groupId=kohgylw
-68 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)