Compare commits

..

6 Commits

Author SHA1 Message Date
Frank Skare
407b49b3ad 5.4.7.0 2020-05-06 18:51:38 +02:00
Frank Skare
0e92d4ec0c 5.4.7.0 2020-05-06 18:43:20 +02:00
Frank Skare
4f96835e19 support avisynth portable 2020-05-06 11:11:09 +02:00
Frank Skare
56d954d94e manual 2020-05-04 16:30:39 +02:00
Frank Skare
a8aeb1e3e9 manual 2020-05-04 16:28:59 +02:00
Frank Skare
415fd266a2 log error fix 2020-05-04 15:15:40 +02:00
8 changed files with 49 additions and 21 deletions

View File

@@ -1,10 +1,19 @@
5.4.5.2 Beta (not yet released)
5.4.7.1 Beta (not yet released)
============
5.4.7.0
=======
- log error fix
- workaround to support AviSynth portable (ffmpeg blocks loading AviSynth from path env var)
- attempt to fix not reproducible volume input issue
- attempt to fix exception caused by powershell being not available on Win 7
5.4.6.0
=======

View File

@@ -174,9 +174,9 @@ Support
Before making a support request, please try a newer [beta version](#beta) first.
[Support thread in VideoHelp forum](https://forum.videohelp.com/threads/392514-mpv-net-a-extendable-media-player-for-windows)
Bugs and feature requests can be made on the github [issue tracker](https://github.com/stax76/mpv.net/issues), feel free to use for anything mpv.net related.
[Issue tracker](https://github.com/stax76/mpv.net/issues), feel free to use for anything mpv.net related.
Or use the [support thread](https://forum.videohelp.com/threads/392514-mpv-net-a-extendable-media-player-for-windows) in the VideoHelp forum.
Settings

View File

@@ -89,13 +89,6 @@ namespace mpvnet
core.Shutdown += Shutdown;
core.Initialized += Initialized;
core.LogMessage += ShowFatalError;
}
static void ShowFatalError(mpv_log_level level, string msg)
{
if (!App.IsStartedFromTerminal && level == mpv_log_level.MPV_LOG_LEVEL_FATAL)
Msg.ShowError(msg);
}
public static void RunAction(Action action)

View File

@@ -233,6 +233,12 @@ namespace mpvnet
var error = sender as PSDataCollection<ErrorRecord>;
ConsoleHelp.WriteError(error[e.Index], Module);
}
public static void Shutdown()
{
foreach (PowerShell ps in Instances)
ps.Runspace.Dispose();
}
}
public class PowerShellException : Exception

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.6.0")]
[assembly: AssemblyFileVersion("5.4.6.0")]
[assembly: AssemblyVersion("5.4.7.0")]
[assembly: AssemblyFileVersion("5.4.7.0")]

View File

@@ -520,6 +520,9 @@ namespace mpvnet
case 0x319: // WM_APPCOMMAND
if (core.WindowHandle != IntPtr.Zero)
m.Result = WinAPI.SendMessage(core.WindowHandle, m.Msg, m.WParam, m.LParam);
if (m.Msg == 0x319) // WM_APPCOMMAND
return;
break;
case 0x0200: // WM_MOUSEMOVE
if (Environment.TickCount - LastCycleFullscreen > 500)
@@ -793,10 +796,7 @@ namespace mpvnet
if (!core.ShutdownAutoResetEvent.WaitOne(10000))
Msg.ShowError("Shutdown thread failed to complete within 10 seconds.");
try { // PowerShell 5.1 might not be available
foreach (PowerShell ps in PowerShell.Instances)
ps.Runspace.Dispose();
} catch {}
PowerShell.Shutdown();
}
protected override void OnMouseDown(MouseEventArgs e)

View File

@@ -396,10 +396,18 @@ namespace mpvnet
case mpv_event_id.MPV_EVENT_LOG_MESSAGE:
{
var data = (mpv_event_log_message)Marshal.PtrToStructure(evt.data, typeof(mpv_event_log_message));
mpv_log_level level = data.log_level;
if (LogMessage != null || LogMessageAsync != null ||
data.log_level == mpv_log_level.MPV_LOG_LEVEL_FATAL)
{
string msg = $"[{ConvertFromUtf8(data.prefix)}] {ConvertFromUtf8(data.text)}";
InvokeAsync<mpv_log_level, string>(LogMessageAsync, level, msg);
LogMessage?.Invoke(level, msg);
if (data.log_level == mpv_log_level.MPV_LOG_LEVEL_FATAL)
App.RunAction(() => App.ShowError("Fatal Error", msg));
InvokeAsync<mpv_log_level, string>(LogMessageAsync, data.log_level, msg);
LogMessage?.Invoke(data.log_level, msg);
}
}
break;
case mpv_event_id.MPV_EVENT_CLIENT_MESSAGE:
@@ -966,6 +974,7 @@ namespace mpvnet
for (int i = 0; i < files.Length; i++)
{
string file = files[i];
LoadLibrary(file.ShortExt());
if (App.SubtitleTypes.Contains(file.ShortExt()))
commandv("sub-add", file);
@@ -1012,6 +1021,17 @@ namespace mpvnet
commandv("playlist-move", "0", (index + 1).ToString());
}
bool wasAviSynthLoaded;
void LoadLibrary(string ext)
{
if (!wasAviSynthLoaded && ext == "avs")
{
WinAPI.LoadLibrary("AviSynth.dll");
wasAviSynthLoaded = true;
}
}
string LastHistoryPath;
DateTime LastHistoryStartDateTime;