Compare commits

..

2 Commits
0.2.4 ... 0.2.6

Author SHA1 Message Date
Frank Skare
6022809080 - 2019-03-08 22:51:34 +01:00
Frank Skare
714eb7c9fa 0.2.5 2019-02-27 21:18:12 +01:00
8 changed files with 99 additions and 71 deletions

View File

@@ -46,6 +46,12 @@ class Script
### Changes
### 0.2.5
- mpv lib updated to 2019-02-24
- UI glitch fixed the appeared when started in fullscreen mode
- fixed default video output mode which caused video playback to fail
### 0.2.4
- changed minimum runtime to .NET 4.7.2

View File

@@ -42,8 +42,8 @@
// MainForm
//
this.AllowDrop = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(20F, 48F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.Black;
this.ClientSize = new System.Drawing.Size(1553, 1000);
this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -52,6 +52,7 @@
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "mpv.net";
this.Load += new System.EventHandler(this.MainForm_Load);
this.ResumeLayout(false);
}

View File

@@ -24,28 +24,23 @@ namespace mpvnet
public MainForm()
{
InitializeComponent();
try
{
Application.ThreadException += Application_ThreadException;
InitializeComponent();
SetFormPosSize();
Instance = this;
Hwnd = Handle;
mpv.Init();
mpv.ObserveBoolProp("fullscreen", MpvChangeFullscreen);
mpv.AfterShutdown += Mpv_AfterShutdown;
mpv.VideoSizeChanged += Mpv_VideoSizeChanged;
mpv.PlaybackRestart += mpv_PlaybackRestart;
ToolStripManager.Renderer = new ToolStripRendererEx(ToolStripRenderModeEx.SystemDefault);
ChangeFullscreen((mpv.mpvConv.ContainsKey("fullscreen") && mpv.mpvConv["fullscreen"] == "yes") || (mpv.mpvConv.ContainsKey("fs") && mpv.mpvConv["fs"] == "yes"));
CMS = new ContextMenuStripEx(components);
CMS.Opened += CMS_Opened;
ContextMenuStrip = CMS;
BuildMenu();
}
catch (Exception e)
catch (Exception ex)
{
HandleException(e);
HandleException(ex);
}
}
@@ -298,5 +293,14 @@ namespace mpvnet
CursorHelp.Hide();
}
}
private void MainForm_Load(object sender, EventArgs ea)
{
mpv.Init();
mpv.ObserveBoolProp("fullscreen", MpvChangeFullscreen);
mpv.AfterShutdown += Mpv_AfterShutdown;
mpv.VideoSizeChanged += Mpv_VideoSizeChanged;
mpv.PlaybackRestart += mpv_PlaybackRestart;
}
}
}

View File

@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("mpv.net")]
[assembly: AssemblyCopyright("Copyright © 2017 stax76")]
[assembly: AssemblyCopyright("Copyright © 2019 stax76")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -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("0.2.4.0")]
[assembly: AssemblyFileVersion("0.2.4.0")]
[assembly: AssemblyVersion("0.2.6.0")]
[assembly: AssemblyFileVersion("0.2.6.0")]

View File

@@ -1,3 +1,4 @@
#this file defines the shortcut keys and the context menu
#key command key caption menu path/caption
@@ -12,22 +13,22 @@ F12 playlist-next #menu: F12 ; Navigate | Next
Ctrl++ add video-zoom 0.1 #menu: Ctrl++ ; Pan && Scan | Increase Size
Ctrl+- add video-zoom -0.1 #menu: Ctrl+- ; Pan && Scan | Decrease Size
Enter cycle fullscreen #menu: Enter ; Cycle Fullscreen
Enter cycle pause #menu: Enter ; Cycle Fullscreen
KP7 cycle audio #menu: Numpad 7 ; Cycle Audio
KP8 cycle sub #menu: Numpad 8 ; Cycle Subtitle
+ add volume 5 #menu: + ; Volume | Up
- add volume -5 #menu: - ; Volume | Down
Axis_Up add volume 5 # wheel up
Axis_Down add volume -5 # wheel down
+ add volume 10 #menu: + ; Volume | Up
- add volume -10 #menu: - ; Volume | Down
Axis_Up add volume 10 #wheel up
Axis_Down add volume -10 #wheel down
_ ignore #menu: _ ; Volume | -
m cycle mute #menu: M ; Volume | Mute
KP6 add audio-delay 0.100 #menu: Numpad 6 ; Audio | Delay +0.1
KP9 add audio-delay -0.100 #menu: Numpad 9 ; Audio | Delay -0.1
Right no-osd seek 10 #menu: Right ; Seek | 10 sec forward
Left no-osd seek -10 #menu: Left ; Seek | 10 sec backward
Right no-osd seek 7 #menu: Right ; Seek | 7 sec forward
Left no-osd seek -7 #menu: Left ; Seek | 7 sec backward
_ ignore #menu: _ ; Seek | -
Up no-osd seek 40 #menu: Up ; Seek | 1 min forward
Down no-osd seek -40 #menu: Down ; Seek | 1 min backward

View File

@@ -35,6 +35,29 @@ namespace mpvnet
public static string mpvConfPath = Folder.AppDataRoaming + "mpv\\mpv.conf";
public static StringPairList BindingList = new StringPairList();
private static Dictionary<string, string> _mpvConv;
public static Dictionary<string, string> mpvConv {
get {
if (_mpvConv == null)
{
_mpvConv = new Dictionary<string, string>();
if (File.Exists(mpvConfPath))
{
foreach (var i in File.ReadAllLines(mpvConfPath))
{
if (i.Contains("=") && ! i.StartsWith("#"))
{
_mpvConv[i.Left("=").Trim()] = i.Right("=").Trim();
}
}
}
}
return _mpvConv;
}
}
public static void Init()
{
LoadLibrary("mpv-1.dll");
@@ -42,14 +65,12 @@ namespace mpvnet
SetIntProp("input-ar-delay", 500);
SetIntProp("input-ar-rate", 20);
SetIntProp("volume", 50);
SetStringProp("hwdec", "auto");
SetStringProp("hwdec", "yes");
SetStringProp("vo", "direct3d");
SetStringProp("input-default-bindings", "yes");
SetStringProp("opengl-backend", "angle");
SetStringProp("osd-playing-msg", "'${filename}'");
SetStringProp("profile", "opengl-hq");
SetStringProp("screenshot-directory", "~~desktop/");
SetStringProp("vo", "opengl");
SetStringProp("keep-open", "always");
SetStringProp("keep-open", "yes");
SetStringProp("keep-open-pause", "no");
SetStringProp("osc", "yes");
SetStringProp("config", "yes");

View File

@@ -1,8 +1,8 @@
using namespace System.Diagnostics
$exePath = "C:\Users\frank\Desktop\Projekte\mpvnet\mpvnet\bin\Debug\mpvnet.exe"
$exePath = "C:\Users\frank\C-Daten\Projekte\VS\CS\mpvnet\mpvnet\bin\Debug\mpvnet.exe"
$version = [FileVersionInfo]::GetVersionInfo($exePath).FileVersion
$targetDir = "C:\Users\Frank\Desktop\mpv.net-" + $version
Copy-Item C:\Users\frank\Desktop\Projekte\mpvnet\mpvnet\bin\Debug $targetDir -recurse
Copy-Item C:\Users\frank\C-Daten\Projekte\VS\CS\mpvnet\mpvnet\bin\Debug $targetDir -recurse
$addonDir = $targetDir + "\Addons"
remove-item $addonDir -Recurse -Include *vbnet.pdb, *mpvnet.exe, *mpvnet.exe.config, *mpvnet.pdb, *vbnet.dll
D:\Projekte\VS\VB\util\bin\util.exe -pack $targetDir
C:\Users\frank\C-Daten\Projekte\VS\VB\util\bin\util.exe -pack $targetDir

View File

@@ -254,14 +254,9 @@ Namespace UI
MyBase.New(container)
End Sub
Protected Overrides Sub OnOpening(e As CancelEventArgs)
MyBase.OnOpening(e)
MenuHelp.SetRenderer(Me)
End Sub
Protected Overrides Sub OnHandleCreated(e As EventArgs)
MyBase.OnHandleCreated(e)
Font = New Font("Segoe UI", 9)
MenuHelp.SetRenderer(Me)
End Sub
<DefaultValue(GetType(Form), Nothing)>