Skip to content

Commit

Permalink
Updates to v3.7.52 (FlyleafLib) / v1.3.12 (FlyleafME) / v1.0.31 (Flyl…
Browse files Browse the repository at this point in the history
…eafHost.WinUI)

* Renderer: Alpha blend improvements
* Renderer: Introduces Config.Video.PresentFlags which allows to configure waitable / non-waitable swap chains
* Renderer: Removes HLG define for pixel shader (currently works better without it)
* Renderer: Exposing Config.Video.MaxFrameLatency to manually set it if required
* Renderer: Adds support for big-endian pixel formats through SwsScale
* AudioDecoder: Minor filter graph improvements
* VideoStream: Fixes an issue with fps (mainly for broken formats)
* Subtitles: Adds Bitmap support with alpha blend (mainly for dvd/blu-ray)
* Player: Fixes an issue with the duration reported as one frame duration less
* Player: Latency improvements
* Updates MaterialDesignThemes and System.Text.Json packages

[Breaking Changes]

Changing the swap chain to non-waitable by default which should reduce player's re-buffering during GPU overload (e.g. when user interacts with the UI and decodes a 4K/8K video or using multiple swap chains/players).
This also reduces the latency as the decoder does not require to wait for 10ms (sleep). You can use the previous behaviour by setting PresentFlags back to None.
  • Loading branch information
SuRGeoNix committed Jul 23, 2024
1 parent 501159a commit 3cc9b47
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
4 changes: 2 additions & 2 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>net8.0-windows;net6.0-windows;net472</TargetFrameworks>
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<Version>1.3.11</Version>
<Version>1.3.12</Version>
<Authors>SuRGeoNix</Authors>
<Copyright>SuRGeoNix © 2024</Copyright>
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>
Expand All @@ -14,7 +14,7 @@
<PackageTags>flyleaf flyleaflib flyleafme video audio wpf media player element control</PackageTags>
<Description>FlyleafME: A WPF Media Element Control (based on FlyleafLib)</Description>
<PackageReleaseNotes>
- Fixes an issue that it wouldn't properly initialize with the overlay's template (no popups / settings)
Updates FlyleafLib
</PackageReleaseNotes>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion FlyleafLib.Controls.WinUI/FlyleafLib.Controls.WinUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<UseWinUI>true</UseWinUI>
<Nullable>enable</Nullable>
<Authors>SuRGeoNix</Authors>
<Version>1.0.30</Version>
<Version>1.0.31</Version>
<Copyright>SuRGeoNix © 2024</Copyright>
<PackageProjectUrl>https://github.com/SuRGeoNix/Flyleaf</PackageProjectUrl>
<PackageIcon>Flyleaf.png</PackageIcon>
Expand Down
19 changes: 17 additions & 2 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 WinUI 3/WPF/WinForms (based on FFmpeg/DirectX)</Description>
<Version>3.7.51</Version>
<Version>3.7.52</Version>
<Authors>SuRGeoNix</Authors>
<Copyright>SuRGeoNix © 2024</Copyright>
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>
Expand All @@ -17,7 +17,22 @@
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageReleaseNotes>
- FlyleafHost.Wpf: Fixes an issue with overlay's template (ensure it will be set before showing the window)
* Renderer: Alpha blend improvements
* Renderer: Introduces Config.Video.PresentFlags which allows to configure waitable / non-waitable swap chains
* Renderer: Removes HLG define for pixel shader (currently works better without it)
* Renderer: Exposing Config.Video.MaxFrameLatency to manually set it if required
* Renderer: Adds support for big-endian pixel formats through SwsScale
* AudioDecoder: Minor filter graph improvements
* VideoStream: Fixes an issue with fps (mainly for broken formats)
* Subtitles: Adds Bitmap support with alpha blend (mainly for dvd/blu-ray)
* Player: Fixes an issue with the duration reported as one frame duration less
* Player: Latency improvements
* Updates MaterialDesignThemes and System.Text.Json packages

[Breaking Changes]

Changing the swap chain to non-waitable by default which should reduce player's re-buffering during GPU overload (e.g. when user interacts with the UI and decodes a 4K/8K video or using multiple swap chains/players).
This also reduces the latency as the decoder does not require to wait for 10ms (sleep). You can use the previous behaviour by setting PresentFlags back to None.
</PackageReleaseNotes>
</PropertyGroup>

Expand Down
5 changes: 2 additions & 3 deletions Plugins/SubtitlesConverter/SubtitlesConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public override void OnOpenExternalSubtitles()

using (var stream = new FileStream(Selected.ExternalSubtitlesStream.Url, FileMode.Open))
{
int buflen = (int)Math.Min(stream.Length, 10 * 1024);
int buflen = (int)Math.Min(stream.Length, 20 * 1024);
byte[] buf = new byte[buflen];
stream.Read(buf, 0, buflen);
detector.Feed(buf, 0, buf.Length);
Expand All @@ -50,7 +50,6 @@ public override void OnOpenExternalSubtitles()

try
{
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
subsEnc = Encoding.GetEncoding(ansi);
foundFrom = "System Default 1";
}
Expand Down Expand Up @@ -99,7 +98,7 @@ public override void OnOpenExternalSubtitles()

if (subsEnc != Encoding.UTF8)
{
Log.Info($"Converting from {subsEnc} | Path: {filename} | Detector: {foundFrom}");
Log.Info($"Converting from {subsEnc.BodyName} | Path: {filename} | Detector: {foundFrom}");
Convert(Selected.ExternalSubtitlesStream.Url, newUrl, subsEnc, new UTF8Encoding(false));

if (isTemp)
Expand Down

0 comments on commit 3cc9b47

Please sign in to comment.