SHA256
Set Specific Version of FFmpeg to Download
This commit is contained in:
2 files changed
+29
-8
No files matched your search
+24
-8
@@ -25,8 +25,8 @@ namespace ADOFAIRenderer.UI
|
||||
private bool _isDownloading;
|
||||
private string DownloadUrl => Application.platform switch
|
||||
{
|
||||
RuntimePlatform.WindowsPlayer => "https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl-shared.zip",
|
||||
_ => "https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl-shared.tar.xz"
|
||||
RuntimePlatform.WindowsPlayer => "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2026-05-31-13-22/ffmpeg-N-124714-g49a77d37be-win64-gpl-shared.zip",
|
||||
_ => "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2026-05-31-13-22/ffmpeg-N-124714-g49a77d37be-linux64-gpl-shared.tar.xz"
|
||||
};
|
||||
|
||||
private System.Threading.CancellationTokenSource? _cts;
|
||||
@@ -37,15 +37,31 @@ namespace ADOFAIRenderer.UI
|
||||
var userLibs = MelonEnvironment.UserLibsDirectory;
|
||||
if (!Directory.Exists(userLibs)) return false;
|
||||
|
||||
var searchPattern = Application.platform switch
|
||||
string[] searchPatterns = Application.platform switch
|
||||
{
|
||||
RuntimePlatform.WindowsPlayer => "avcodec-*.dll",
|
||||
RuntimePlatform.OSXPlayer => "libavcodec.*.dylib",
|
||||
_ => "libavcodec.so*"
|
||||
RuntimePlatform.WindowsPlayer => new[]
|
||||
{
|
||||
"avcodec-*.dll", "avformat-*.dll", "avutil-*.dll", "swscale-*.dll", "swresample-*.dll"
|
||||
},
|
||||
RuntimePlatform.OSXPlayer => new[]
|
||||
{
|
||||
"libavcodec.*.dylib", "libavformat.*.dylib", "libavutil.*.dylib", "libswscale.*.dylib", "libswresample.*.dylib"
|
||||
},
|
||||
_ => new[]
|
||||
{
|
||||
"libavcodec.so*", "libavformat.so*", "libavutil.so*", "libswscale.so*", "libswresample.so*"
|
||||
}
|
||||
};
|
||||
|
||||
var files = Directory.GetFiles(userLibs, searchPattern);
|
||||
return files.Length > 0;
|
||||
foreach (var pattern in searchPatterns)
|
||||
{
|
||||
if (Directory.GetFiles(userLibs, pattern).Length == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void ShowDownloadUI()
|
||||
|
||||
@@ -789,6 +789,11 @@ namespace ADOFAIRenderer.Util.FFmpeg
|
||||
_isInitialized = true;
|
||||
_loggedConversionMode = false;
|
||||
}
|
||||
catch (NotSupportedException ex)
|
||||
{
|
||||
Dispose();
|
||||
throw new Exception("FFmpeg 네이티브 라이브러리(DLL)를 로드할 수 없습니다. UserLibs 폴더의 FFmpeg DLL 파일(avcodec, avformat 등)이 누락되었거나 손상되었는지 확인하고, UserLibs 폴더의 FFmpeg DLL 파일들을 삭제한 후 게임을 재시작하세요.", ex);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// 초기화 도중 실패 시 부분 할당된 리소스를 모두 정리합니다.
|
||||
|
||||
Reference in new issue
Block a user