mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-23 03:39:26 +01:00
Logging improvements
This commit is contained in:
@@ -27,7 +27,7 @@ namespace Flowframes
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (replaceLastLine)
|
if (!hidden && replaceLastLine)
|
||||||
{
|
{
|
||||||
textbox.Suspend();
|
textbox.Suspend();
|
||||||
string[] lines = textbox.Text.SplitIntoLines();
|
string[] lines = textbox.Text.SplitIntoLines();
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ namespace Flowframes
|
|||||||
|
|
||||||
bool hidden = currentLogMode == LogMode.Hidden;
|
bool hidden = currentLogMode == LogMode.Hidden;
|
||||||
|
|
||||||
if (line.MatchesWildcard("*can produce invalid output*")) // Don't print this kind of warning
|
if (HideMessage(line)) // Don't print certain warnings
|
||||||
hidden = true;
|
hidden = true;
|
||||||
|
|
||||||
bool replaceLastLine = currentLogMode == LogMode.OnlyLastLine;
|
bool replaceLastLine = currentLogMode == LogMode.OnlyLastLine;
|
||||||
@@ -127,6 +127,17 @@ namespace Flowframes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool HideMessage (string msg)
|
||||||
|
{
|
||||||
|
string[] hiddenMsgs = new string[] { "can produce invalid output", "deprecated pixel format" };
|
||||||
|
|
||||||
|
foreach (string str in hiddenMsgs)
|
||||||
|
if (msg.MatchesWildcard($"*{str}*"))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
static void FfmpegOutputHandlerSilent (object sendingProcess, DataReceivedEventArgs outLine)
|
static void FfmpegOutputHandlerSilent (object sendingProcess, DataReceivedEventArgs outLine)
|
||||||
{
|
{
|
||||||
timeSinceLastOutput.Restart();
|
timeSinceLastOutput.Restart();
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ namespace Flowframes.Media
|
|||||||
|
|
||||||
if (extension.Contains("jpg"))
|
if (extension.Contains("jpg"))
|
||||||
{
|
{
|
||||||
string pixFmt = "-pix_fmt yuvj420p";
|
string pixFmt = "-pix_fmt yuv420p";
|
||||||
return $"-q:v 1 {pixFmt}";
|
return $"-q:v 1 {pixFmt}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user