Skip to content

Commit

Permalink
Updates to v3.6.5 (FlyleafLib) / v1.2.3 (FlyleafME)
Browse files Browse the repository at this point in the history
Player: Improves performance by replacing DateTime with StopWatch for elapsed time calculation
Player.Activity: Hides mouse cursor only when FlyleafHost is focused
Renderer: Fixes an issue with Aces/Hable HDRtoSDR method when luminance was less than 1
Renderer: Fixes a critical issue with the new WndProc subclass (not properly setting the IntPtr during SetWindowSubclass/RemoveWindowSubclass which could cause FailFast exceptions when multiple add/remove subclass for the same Handle)
FlyleafHost.WinForms: Fixes an issue with Activity Mode (it wouldn't refresh on MouseMove)
FlyleafHost.Wpf: Proper way to set the Overlay Content and Template through OverlayTemplate DP which fixes performance, design and binding issues during transfer
FlyleafHost.Wpf: Fixes stability and disposal issues with Surface/Overlay windows (Player will not be disposed only the swap chain which means that the application must manually dispose it)
FlyleafHost.Wpf: Fixes an issue when Owner window has TopMost=true
  • Loading branch information
SuRGeoNix committed Dec 16, 2022
1 parent 2e67ce0 commit bc7cb82
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
5 changes: 1 addition & 4 deletions FlyleafLib.Controls.WPF/FlyleafLib.Controls.WPF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net7.0-windows;net6.0-windows;net472</TargetFrameworks>
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<Version>1.2.2</Version>
<Version>1.2.3</Version>
<Authors>SuRGeoNix</Authors>
<Copyright>SuRGeoNix © 2022</Copyright>
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>
Expand All @@ -14,9 +14,6 @@
<PackageTags>flyleaf flyleaflib flyleafme video audio wpf media player element control</PackageTags>
<Description>FlyleafME: A WPF Media Element Control (based on FlyleafLib)</Description>
<PackageReleaseNotes>
Adds Porfile Mismatch to Video Settings
Adds Rotation and Porfile Mismatch on Debug
Adds .NET 7 support and drops .NET 5
Updates FlyleafLib
</PackageReleaseNotes>
</PropertyGroup>
Expand Down
6 changes: 4 additions & 2 deletions FlyleafLib/Controls/WPF/FlyleafHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ IsStandAlone [ReadOnly]
public bool Disposed { get; private set; }

static int idGenerator;
bool surfaceClosed, overlayClosed;
bool surfaceClosed, surfaceClosing, overlayClosed;
static bool isDesginMode;
int panPrevX, panPrevY;
bool ownedRestoreToMaximize;
Expand Down Expand Up @@ -1129,10 +1129,11 @@ private void Surface_Closed(object sender, EventArgs e)
surfaceClosed = true;
Dispose();
}
private void Surface_Closing(object sender, CancelEventArgs e) => surfaceClosing = true;
private void Overlay_Closed(object sender, EventArgs e)
{
overlayClosed = true;
if (!surfaceClosed)
if (!surfaceClosing)
Surface?.Close();
}

Expand Down Expand Up @@ -1355,6 +1356,7 @@ public virtual void SetSurface()
SurfaceHandle = new WindowInteropHelper(Surface).EnsureHandle();

Surface.Closed += Surface_Closed;
Surface.Closing += Surface_Closing;
Surface.KeyDown += Surface_KeyDown;
Surface.KeyUp += Surface_KeyUp;
Surface.Drop += Surface_Drop;
Expand Down
15 changes: 9 additions & 6 deletions FlyleafLib/FlyleafLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PackageIconUrl />
<RepositoryUrl></RepositoryUrl>
<Description>Media Player .NET Library for WPF/WinForms (based on FFmpeg/DirectX)</Description>
<Version>3.6.4</Version>
<Version>3.6.5</Version>
<Authors>SuRGeoNix</Authors>
<Copyright>SuRGeoNix © 2022</Copyright>
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>
Expand All @@ -17,11 +17,14 @@
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageReleaseNotes>
Decoder: Fixes frame stepping and reverse playback to the very beginning of the stream
Renderer: Implements a safer WndProc subclass
Player: Fixes a possible NPE on dispose
Player.KeyBindings: Fixes an issue while adding a new embedded action
FlyleafHost.Wpf: Fixes a crashing issue during restore from minimize with multiple flyleafhosts if not shown yet
Player: Improves performance by replacing DateTime with StopWatch for elapsed time calculation
Player.Activity: Hides mouse cursor only when FlyleafHost is focused
Renderer: Fixes an issue with Aces/Hable HDRtoSDR method when luminance was less than 1
Renderer: Fixes a critical issue with the new WndProc subclass (not properly setting the IntPtr during SetWindowSubclass/RemoveWindowSubclass which could cause FailFast exceptions when multiple add/remove subclass for the same Handle)
FlyleafHost.WinForms: Fixes an issue with Activity Mode (it wouldn't refresh on MouseMove)
FlyleafHost.Wpf: Proper way to set the Overlay Content and Template through OverlayTemplate DP which fixes performance, design and binding issues during transfer
FlyleafHost.Wpf: Fixes stability and disposal issues with Surface/Overlay windows (Player will not be disposed only the swap chain which means that the application must manually dispose it)
FlyleafHost.Wpf: Fixes an issue when Owner window has TopMost=true
</PackageReleaseNotes>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion Tests/WpfFlyleafHost/HostOverlayWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@

<Grid Background="Black">
<!--Providing the Overlay Window to FlyleafHost-->
<fl:FlyleafHost Overlay="{StaticResource OverlayWindow}"/>
<fl:FlyleafHost d:Overlay="{x:Null}" Overlay="{StaticResource OverlayWindow}"/>
</Grid>
</Window>

0 comments on commit bc7cb82

Please sign in to comment.