Parse AVPro video errors

This commit is contained in:
Natsumi
2024-08-02 09:45:29 +12:00
parent 749153021f
commit 29d3f85a08
+25 -2
View File
@@ -588,9 +588,11 @@ namespace VRCX
// 2021.04.08 06:37:45 Error - [Video Playback] ERROR: Video unavailable // 2021.04.08 06:37:45 Error - [Video Playback] ERROR: Video unavailable
// 2021.04.08 06:40:07 Error - [Video Playback] ERROR: Private video // 2021.04.08 06:40:07 Error - [Video Playback] ERROR: Private video
if (string.Compare(line, offset, "[Video Playback] ERROR: ", 0, 24, StringComparison.Ordinal) != 0) // 2024.07.31 22:28:47 Error - [AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources.
return false; // 2024.07.31 23:04:15 Error - [AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources.
if (line.Contains("[Video Playback] ERROR: "))
{
var data = line.Substring(offset + 24); var data = line.Substring(offset + 24);
if (data == logContext.LastVideoError) if (data == logContext.LastVideoError)
return true; return true;
@@ -607,6 +609,27 @@ namespace VRCX
return true; return true;
} }
if (line.Contains("[AVProVideo] Error: "))
{
var data = line.Substring(offset + 20);
if (data == logContext.LastVideoError)
return true;
logContext.LastVideoError = data;
AppendLog(new[]
{
fileInfo.Name,
ConvertLogTimeToISO8601(line),
"event",
"VideoError: " + data
});
return true;
}
return false;
}
private bool ParseLogWorldVRCX(FileInfo fileInfo, LogContext logContext, string line, int offset) private bool ParseLogWorldVRCX(FileInfo fileInfo, LogContext logContext, string line, int offset)
{ {
// [VRCX] VideoPlay(PyPyDance) "https://jd.pypy.moe/api/v1/videos/-Q3pdlsQxOk.mp4",0.5338666,260.6938,"1339 : Le Freak (Random)" // [VRCX] VideoPlay(PyPyDance) "https://jd.pypy.moe/api/v1/videos/-Q3pdlsQxOk.mp4",0.5338666,260.6938,"1339 : Le Freak (Random)"