Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
966f96a02b | ||
|
|
954c014708 | ||
|
|
ad30dc5ae2 | ||
|
|
3f74344b99 | ||
|
|
96d8d88d09 |
16
Changelog.md
16
Changelog.md
@@ -1,3 +1,17 @@
|
|||||||
|
### 5.2
|
||||||
|
|
||||||
|
- bug fix for single-instance not working with unicode filenames
|
||||||
|
- bug fix for logo not shown on start
|
||||||
|
- osd-visibility.js script was removed because the OSC uses too much memory
|
||||||
|
- youtube-dl was updated
|
||||||
|
- libmpv was updated to shinchiro 2019-08-04
|
||||||
|
- in case mpv.net was started from a terminal it sets now the mpv property input-terminal to yes,
|
||||||
|
this means mpv.net will now receive and handle input keys from the terminal
|
||||||
|
- certain command line properties didn't work (input-terminal, terminal, input-file,
|
||||||
|
config, config-dir, input-conf, load-scripts, script, scripts, player-operation-mode)
|
||||||
|
- the about dialog shows now the mpv version and build date
|
||||||
|
- the dialog that asks for a config folder has now a cancel option
|
||||||
|
|
||||||
### 5.1
|
### 5.1
|
||||||
|
|
||||||
- 'Tools > Execute mpv command' was replaced with [mpv-repl](https://github.com/rossy/mpv-repl)
|
- 'Tools > Execute mpv command' was replaced with [mpv-repl](https://github.com/rossy/mpv-repl)
|
||||||
@@ -12,7 +26,7 @@
|
|||||||
- 'Tools > Manage File Associations' was replaced by 'Tools > OS Setup',
|
- 'Tools > Manage File Associations' was replaced by 'Tools > OS Setup',
|
||||||
it has now a feature to add and remove mpv.net to and from the Path
|
it has now a feature to add and remove mpv.net to and from the Path
|
||||||
environment variable and the OS default apps settings can be opened (Win 10 only)
|
environment variable and the OS default apps settings can be opened (Win 10 only)
|
||||||
- startup folder and config folder beeing identical was causing a critical issue
|
- startup folder and config folder being identical was causing a critical issue
|
||||||
as mpv.net was loading extensions twice and scripts four times, now identical
|
as mpv.net was loading extensions twice and scripts four times, now identical
|
||||||
folders are no longer permitted
|
folders are no longer permitted
|
||||||
- error messages are shown when unknown scripts and extensions are found in the startup folder
|
- error messages are shown when unknown scripts and extensions are found in the startup folder
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ Table of contents
|
|||||||
- On Screen Controler (OSC, play control buttons)
|
- On Screen Controler (OSC, play control buttons)
|
||||||
- [Command Line Interface](https://mpv.io/manual/master/#options)
|
- [Command Line Interface](https://mpv.io/manual/master/#options)
|
||||||
- If started from a PowerShell terminal mpv.net will attach to the terminal and print status and debug output
|
- If started from a PowerShell terminal mpv.net will attach to the terminal and print status and debug output
|
||||||
|
- [OSD REPL](https://github.com/rossy/mpv-repl)
|
||||||
- DXVA2 video decoding acceleration
|
- DXVA2 video decoding acceleration
|
||||||
- OpenGL based video output capable of features loved by videophiles, such as video scaling with popular high quality algorithms, color management, frame timing, interpolation, HDR, and more
|
- OpenGL based video output capable of features loved by videophiles, such as video scaling with popular high quality algorithms, color management, frame timing, interpolation, HDR, and more
|
||||||
- Search feature powered by [Everything](https://www.voidtools.com) to find and play media ([Screenshot](#media-search-screenshot))
|
- Search feature powered by [Everything](https://www.voidtools.com) to find and play media ([Screenshot](#media-search-screenshot))
|
||||||
@@ -100,6 +101,12 @@ A searchable config editor as alternative to edit the mpv.conf file manually.
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
#### Terminal and REPL Screenshot
|
||||||
|
|
||||||
|
mpv.net attached to a PowerShell terminal showing the [OSD REPL](https://github.com/rossy/mpv-repl).
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
#### Input Editor Screenshot
|
#### Input Editor Screenshot
|
||||||
|
|
||||||
A searchable key and mouse binding editor.
|
A searchable key and mouse binding editor.
|
||||||
|
|||||||
BIN
img/Avatar.png
BIN
img/Avatar.png
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
BIN
img/Terminal.png
Normal file
BIN
img/Terminal.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
@@ -18,6 +18,8 @@ namespace mpvnet
|
|||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
|
||||||
|
if (mp.ConfigFolder == "") return;
|
||||||
|
|
||||||
string[] args = Environment.GetCommandLineArgs().Skip(1).ToArray();
|
string[] args = Environment.GetCommandLineArgs().Skip(1).ToArray();
|
||||||
|
|
||||||
if (args.Length == 2 && args[0] == "--reg-file-assoc")
|
if (args.Length == 2 && args[0] == "--reg-file-assoc")
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
public IntPtr dwData;
|
public IntPtr dwData;
|
||||||
public int cbData;
|
public int cbData;
|
||||||
[MarshalAs(UnmanagedType.LPStr)]
|
[MarshalAs(UnmanagedType.LPTStr)]
|
||||||
public string lpData;
|
public string lpData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ public class TaskDialog<T> : TaskDialogNative, IDisposable
|
|||||||
public void AddCommandLink(string text, T value)
|
public void AddCommandLink(string text, T value)
|
||||||
{
|
{
|
||||||
int n = 1000 + IdValueDic.Count + 1;
|
int n = 1000 + IdValueDic.Count + 1;
|
||||||
IdValueDic[n] = value == null ? (T)(object)text : value;
|
IdValueDic[n] = value;
|
||||||
IdTextDic[n] = text;
|
IdTextDic[n] = text;
|
||||||
Buttons.Add(new TaskDialogNative.TASKDIALOG_BUTTON(n, text));
|
Buttons.Add(new TaskDialogNative.TASKDIALOG_BUTTON(n, text));
|
||||||
Config.dwFlags |= TaskDialogNative.TASKDIALOG_FLAGS.TDF_USE_COMMAND_LINKS;
|
Config.dwFlags |= TaskDialogNative.TASKDIALOG_FLAGS.TDF_USE_COMMAND_LINKS;
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("5.1.0.0")]
|
[assembly: AssemblyVersion("5.2.0.0")]
|
||||||
[assembly: AssemblyFileVersion("5.1.0.0")]
|
[assembly: AssemblyFileVersion("5.2.0.0")]
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ options = [{ name = "no", help = "always use software decoding" },
|
|||||||
name = "gpu-api"
|
name = "gpu-api"
|
||||||
default = "auto"
|
default = "auto"
|
||||||
filter = "Video"
|
filter = "Video"
|
||||||
help = "Controls which type of graphics APIs will be accepted."
|
help = "Controls which type of graphics APIs will be accepted. Auto uses d3d11, it should only be changed in case of problems."
|
||||||
options = [{ name = "auto", help = "Use any available API" },
|
options = [{ name = "auto", help = "Use any available API" },
|
||||||
{ name = "opengl", help = "Allow only OpenGL (requires OpenGL 2.1+ or GLES 2.0+)" },
|
{ name = "opengl", help = "Allow only OpenGL (requires OpenGL 2.1+ or GLES 2.0+)" },
|
||||||
{ name = "vulkan", help = "Allow only Vulkan (requires a valid/working spirv-compiler)" },
|
{ name = "vulkan", help = "Allow only Vulkan (requires a valid/working spirv-compiler)" },
|
||||||
|
|||||||
@@ -4,13 +4,14 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="About mpv.net" Height="230" Width="420" FontSize="16" ShowInTaskbar="False"
|
Title="About mpv.net" Height="230" Width="500" FontSize="16" ShowInTaskbar="False"
|
||||||
WindowStartupLocation="CenterOwner" ResizeMode="NoResize">
|
WindowStartupLocation="CenterOwner" ResizeMode="NoResize">
|
||||||
<Grid>
|
<Grid>
|
||||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||||
<TextBlock FontSize="48" HorizontalAlignment="Center" Margin="0,0,0,10">mpv.net</TextBlock>
|
<TextBlock FontSize="48" HorizontalAlignment="Center" Margin="0,0,0,10">mpv.net</TextBlock>
|
||||||
<TextBlock HorizontalAlignment="Center">Copyright (c) 2017-2019 Frank Skare (stax76)</TextBlock>
|
<TextBlock HorizontalAlignment="Center">Copyright (c) 2017-2019 Frank Skare (stax76)</TextBlock>
|
||||||
<TextBlock Name="Version" HorizontalAlignment="Center" />
|
<TextBlock Name="Version" HorizontalAlignment="Center" />
|
||||||
|
<TextBlock Name="mpvVersion" HorizontalAlignment="Center" />
|
||||||
<TextBlock HorizontalAlignment="Center" Margin="0,0,0,20">MIT License</TextBlock>
|
<TextBlock HorizontalAlignment="Center" Margin="0,0,0,20">MIT License</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Windows;
|
using System.IO;
|
||||||
|
using System.Windows;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|
||||||
@@ -9,7 +10,8 @@ namespace mpvnet
|
|||||||
public AboutWindow()
|
public AboutWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Version.Text = $"Version {System.Windows.Forms.Application.ProductVersion}";
|
Version.Text = $"mpv.net Version {System.Windows.Forms.Application.ProductVersion}";
|
||||||
|
mpvVersion.Text = $"{mp.get_property_string("mpv-version")} ({File.GetLastWriteTime(PathHelp.StartupPath + "mpv-1.dll").ToShortDateString()})";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnPreviewKeyDown(KeyEventArgs e) => Close();
|
protected override void OnPreviewKeyDown(KeyEventArgs e) => Close();
|
||||||
|
|||||||
@@ -507,10 +507,16 @@ namespace mpvnet
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnLoad(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnLoad(e);
|
||||||
|
if (mp.get_property_int("playlist-count") == 0) mp.ShowLogo();
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnShown(EventArgs e)
|
protected override void OnShown(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnShown(e);
|
base.OnShown(e);
|
||||||
if (mp.GPUAPI == "vulkan") mp.ProcessCommandLine();
|
if (mp.GPUAPI == "vulkan") mp.ProcessCommandLine(false);
|
||||||
var wpfColor = WPF.WPF.ThemeColor;
|
var wpfColor = WPF.WPF.ThemeColor;
|
||||||
Color color = Color.FromArgb(wpfColor.A, wpfColor.R, wpfColor.G, wpfColor.B);
|
Color color = Color.FromArgb(wpfColor.A, wpfColor.R, wpfColor.G, wpfColor.B);
|
||||||
ToolStripRendererEx.InitColors(color, App.IsDarkMode, App.ThemedMenu);
|
ToolStripRendererEx.InitColors(color, App.IsDarkMode, App.ThemedMenu);
|
||||||
@@ -603,8 +609,8 @@ namespace mpvnet
|
|||||||
|
|
||||||
foreach (string url in App.UrlWhitelist)
|
foreach (string url in App.UrlWhitelist)
|
||||||
{
|
{
|
||||||
if (clipboard.Contains("://") && ! clipboard.Contains("\n") &&
|
if (clipboard.Contains("://") && !clipboard.Contains("\n") &&
|
||||||
! clipboard.Contains(" ") && clipboard.Contains(url.ToLower().Trim()) &&
|
!clipboard.Contains(" ") && clipboard.Contains(url.ToLower().Trim()) &&
|
||||||
RegHelp.GetString(App.RegPath, "LastURL") != clipboard && Visible)
|
RegHelp.GetString(App.RegPath, "LastURL") != clipboard && Visible)
|
||||||
{
|
{
|
||||||
RegHelp.SetObject(App.RegPath, "LastURL", clipboard);
|
RegHelp.SetObject(App.RegPath, "LastURL", clipboard);
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ namespace mpvnet
|
|||||||
if (App.IsStartedFromTerminal)
|
if (App.IsStartedFromTerminal)
|
||||||
{
|
{
|
||||||
set_property_string("terminal", "yes");
|
set_property_string("terminal", "yes");
|
||||||
|
set_property_string("input-terminal", "yes");
|
||||||
set_property_string("msg-level", "osd/libass=fatal");
|
set_property_string("msg-level", "osd/libass=fatal");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,11 +109,11 @@ namespace mpvnet
|
|||||||
set_property_string("config-dir", ConfigFolder);
|
set_property_string("config-dir", ConfigFolder);
|
||||||
set_property_string("config", "yes");
|
set_property_string("config", "yes");
|
||||||
|
|
||||||
|
ProcessCommandLine(true);
|
||||||
mpv_initialize(Handle);
|
mpv_initialize(Handle);
|
||||||
Initialized?.Invoke();
|
Initialized?.Invoke();
|
||||||
ShowLogo();
|
|
||||||
LoadMpvScripts();
|
LoadMpvScripts();
|
||||||
if (GPUAPI != "vulkan") ProcessCommandLine();
|
if (GPUAPI != "vulkan") ProcessCommandLine(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ProcessProperty(string name, string value)
|
public static void ProcessProperty(string name, string value)
|
||||||
@@ -165,10 +166,15 @@ namespace mpvnet
|
|||||||
td.AddCommandLink(@"AppData\Roaming\mpv", appdataFolderMpv, appdataFolderMpv);
|
td.AddCommandLink(@"AppData\Roaming\mpv", appdataFolderMpv, appdataFolderMpv);
|
||||||
td.AddCommandLink("<startup>\\portable_config", portableFolder, portableFolder);
|
td.AddCommandLink("<startup>\\portable_config", portableFolder, portableFolder);
|
||||||
td.AddCommandLink("Choose custom folder", "custom");
|
td.AddCommandLink("Choose custom folder", "custom");
|
||||||
td.AllowCancel = false;
|
|
||||||
_ConfigFolder = td.Show();
|
_ConfigFolder = td.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_ConfigFolder == null)
|
||||||
|
{
|
||||||
|
_ConfigFolder = "";
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
if (_ConfigFolder == "custom")
|
if (_ConfigFolder == "custom")
|
||||||
{
|
{
|
||||||
using (var d = new WinForms.FolderBrowserDialog())
|
using (var d = new WinForms.FolderBrowserDialog())
|
||||||
@@ -565,40 +571,40 @@ namespace mpvnet
|
|||||||
StringPropChangeActions.Add(new KeyValuePair<string, Action<string>>(name, action));
|
StringPropChangeActions.Add(new KeyValuePair<string, Action<string>>(name, action));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ProcessCommandLine()
|
public static void ProcessCommandLine(bool preInit)
|
||||||
{
|
{
|
||||||
var args = Environment.GetCommandLineArgs().Skip(1);
|
var args = Environment.GetCommandLineArgs().Skip(1);
|
||||||
List<string> files = new List<string>();
|
|
||||||
|
//Msg.Show(string.Join("\n", args));
|
||||||
|
|
||||||
|
string[] preInitProperties = { "input-terminal", "terminal", "input-file", "config", "config-dir", "input-conf", "load-scripts", "scripts", "player-operation-mode" };
|
||||||
|
|
||||||
foreach (string i in args)
|
foreach (string i in args)
|
||||||
{
|
{
|
||||||
if (!i.StartsWith("--") && (i == "-" || i.Contains("://") || File.Exists(i)))
|
string arg = i;
|
||||||
{
|
|
||||||
files.Add(i);
|
|
||||||
if (i.Contains("://")) RegHelp.SetObject(App.RegPath, "LastURL", i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (string i in args)
|
if (arg.StartsWith("--"))
|
||||||
{
|
|
||||||
if (i.StartsWith("--"))
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (i.Contains("="))
|
if (!arg.Contains("=")) arg += "=yes";
|
||||||
|
|
||||||
|
string left = arg.Substring(2, arg.IndexOf("=") - 2);
|
||||||
|
string right = arg.Substring(left.Length + 3);
|
||||||
|
|
||||||
|
if (left == "script") left = "scripts";
|
||||||
|
|
||||||
|
if (preInit && preInitProperties.Contains(left))
|
||||||
{
|
{
|
||||||
string left = i.Substring(2, i.IndexOf("=") - 2);
|
|
||||||
string right = i.Substring(left.Length + 3);
|
|
||||||
mp.ProcessProperty(left, right);
|
mp.ProcessProperty(left, right);
|
||||||
if (!App.ProcessProperty(left, right))
|
if (!App.ProcessProperty(left, right))
|
||||||
set_property_string(left, right, true);
|
set_property_string(left, right, true);
|
||||||
}
|
}
|
||||||
else
|
else if (!preInit && !preInitProperties.Contains(left))
|
||||||
{
|
{
|
||||||
string name = i.Substring(2);
|
mp.ProcessProperty(left, right);
|
||||||
mp.ProcessProperty(name, "yes");
|
if (!App.ProcessProperty(left, right))
|
||||||
if (!App.ProcessProperty(name, "yes"))
|
set_property_string(left, right, true);
|
||||||
set_property_string(name, "yes", true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
@@ -608,12 +614,26 @@ namespace mpvnet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Load(files.ToArray(), App.ProcessInstance != "queue", Control.ModifierKeys.HasFlag(Keys.Control));
|
if (!preInit)
|
||||||
|
|
||||||
if (files.Count == 0 || files[0].Contains("://"))
|
|
||||||
{
|
{
|
||||||
VideoSizeAutoResetEvent.Set();
|
List<string> files = new List<string>();
|
||||||
VideoSizeChanged?.Invoke();
|
|
||||||
|
foreach (string i in args)
|
||||||
|
{
|
||||||
|
if (!i.StartsWith("--") && (i == "-" || i.Contains("://") || File.Exists(i)))
|
||||||
|
{
|
||||||
|
files.Add(i);
|
||||||
|
if (i.Contains("://")) RegHelp.SetObject(App.RegPath, "LastURL", i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Load(files.ToArray(), App.ProcessInstance != "queue", Control.ModifierKeys.HasFlag(Keys.Control));
|
||||||
|
|
||||||
|
if (files.Count == 0 || files[0].Contains("://"))
|
||||||
|
{
|
||||||
|
VideoSizeAutoResetEvent.Set();
|
||||||
|
VideoSizeChanged?.Invoke();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user