Skip to content

Commit 5c3a198

Browse files
committed
Updating to 3.4.5 / 1.1.19
-= D3D11 Video Processor Support & Media Renderer Improvements =- Extends the current embedded video processor (FLVP pixel shaders) with the D3D11VP to support more filters, alternative color conversions, basic bob deinterlace and preparing others including HDR native. Use Config.Video.VideoProcessor to choose which one to use. By default "Auto" is recommended to allow the library to switch when it requires. * FLVP supports HDR to SDR, D3D11 does not * FLVP supports Pan Move/Zoom, D3D11 does not * D3D11 possible performs better with color conversion and filters, FLVP supports only brightness/contrast filters * D3D11 supports deinterlace (bob) * D3D11 currently performs only with video accelerated (hardware) frames Adds Config.Video.Deinterlace to enable/disable deinterlace Adds Config.Video.Filters to set filters (ensure that is actually available and supported by the VPs) Adds Player.LastError to keep track of open/playback/buffering errors in the UI Renderer: Code clean up and improvements Renderer: TakeSnapshot now works more efficiently Audio: Fixes a critical backwards compatibility issue with XAudio by updating Vortice libraries Renderer: Possible brings back the broken backwards compatibility (Win7/Win8) from the previous 3.4.4 (not tested) VideoDecoder: Fixes few performance issues with the new get_format / hardware frames allocation Updates Vortice (you might need to update System.Runtime.CompilerServices.Unsafe to Version>=6.0.0.0) Controls.WPF: Updates Settings with Filters/Deinterlace Extractor: Adds support also to the new D3D11VP
1 parent 2eb2305 commit 5c3a198

5 files changed

Lines changed: 39 additions & 30 deletions

File tree

FlyleafLib.Controls.WPF/FlyleafLib.Controls.WPF.csproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFrameworks>net6.0-windows;net5.0-windows;net472</TargetFrameworks>
55
<UseWindowsForms>true</UseWindowsForms>
66
<UseWPF>true</UseWPF>
7-
<Version>1.1.18</Version>
7+
<Version>1.1.19</Version>
88
<Authors>SuRGeoNix</Authors>
99
<Copyright>SuRGeoNix © 2022</Copyright>
1010
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>
@@ -14,9 +14,7 @@
1414
<PackageTags>flyleaf flyleaflib video audio media player element control</PackageTags>
1515
<Description>WPF Media Player Control/Element (based on FlyleafLib)</Description>
1616
<PackageReleaseNotes>
17-
* Adds PlayerDebug with all Player's properties
18-
* Adds ZeroCopy to Video Settings
19-
* Removes GPU Usage
17+
* Updates Settings with Filters/Deinterlace and Speed x8
2018
* Updates FlyleafLib and MaterialDesign
2119
</PackageReleaseNotes>
2220
</PropertyGroup>

FlyleafLib/FlyleafLib.csproj

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<PackageIconUrl />
99
<RepositoryUrl></RepositoryUrl>
1010
<Description>Media Player .NET Library for WPF/WinForms (based on FFmpeg/DirectX)</Description>
11-
<Version>3.4.4</Version>
11+
<Version>3.4.5</Version>
1212
<Authors>SuRGeoNix</Authors>
1313
<Copyright>SuRGeoNix © 2022</Copyright>
1414
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>
@@ -17,24 +17,28 @@
1717
<IncludeSymbols>true</IncludeSymbols>
1818
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
1919
<PackageReleaseNotes>
20-
-= Video Acceleration, Disposal and Swaping Improvements =-
20+
-= D3D11 Video Processor Support &amp; Media Renderer Improvements =-
2121

22-
* Re-designs and improves Video Acceleration with custom hardware frame pool allocation, zero-copy, proper width/height alignments
23-
* Re-designs and improves VideoDecoder's and MediaRenderer's disposal which resolves major memory leaks
24-
* Re-designs of player's swap implementation with better perfomance (Uses the new static Player.SwapPlayers from now on for both WPF/WinForms)
25-
* Renderer: Changes from Discard to FlipDiscard and from single backbuffer to two (for better performance and avoid memory leaks)
26-
* Adds Master.RegisterPlugins to allow different path for plugins than default
22+
Extends the current embedded video processor (FLVP pixel shaders) with the D3D11VP to support more filters, alternative color conversions, basic bob deinterlace and preparing others including HDR native.
23+
Use Config.Video.VideoProcessor to choose which one to use. By default "Auto" is recommended to allow the library to switch when it requires.
24+
* FLVP supports HDR to SDR, D3D11 does not
25+
* FLVP supports Pan Move/Zoom, D3D11 does not
26+
* D3D11 possible performs better with color conversion and filters, FLVP supports only brightness/contrast filters
27+
* D3D11 supports deinterlace (bob)
28+
* D3D11 currently performs only with video accelerated (hardware) frames
2729

28-
[Issues]
30+
Adds Config.Video.Deinterlace to enable/disable deinterlace
31+
Adds Config.Video.Filters to set filters (ensure that is actually available and supported by the VPs)
32+
Adds Player.LastError to keep track of open/playback/buffering errors in the UI
2933

30-
* Fixes memory leaks caused by FFmpeg and VA by reseting the renderer on every new input
31-
* Fixes an issue with Volume/Mute
32-
* Fixes an issue with Enable/Disable Streams
34+
Renderer: Code clean up and improvements
35+
Renderer: TakeSnapshot now works more efficiently
3336

34-
[Important/Breaking Changes]
37+
Audio: Fixes a critical backwards compatibility issue with XAudio by updating Vortice libraries
38+
Renderer: Possible brings back the broken backwards compatibility (Win7/Win8) from the previous 3.4.4 (not tested)
39+
VideoDecoder: Fixes few performance issues with the new get_format / hardware frames allocation
3540

36-
* ZeroCopy automatically detects padding and will be disabled (changes Config.Decoder.ZeroCopy from bool to enum with Auto/Enabled/Disabled)
37-
* FlipDiscard with two backbufffers can cause issues with win7/8
41+
Updates Vortice (you might need to update System.Runtime.CompilerServices.Unsafe to Version&gt;=6.0.0.0)
3842
</PackageReleaseNotes>
3943
</PropertyGroup>
4044

FlyleafLib/MediaFramework/MediaRenderer/Renderer.VideoProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,10 @@ internal void InitializeFilters()
245245
continue;
246246

247247
var cfgFilter = Config.Video.Filters[filter.Filter];
248+
cfgFilter.Available = true;
248249

249250
if (!configLoadedChecked && !Config.Loaded)
250251
{
251-
cfgFilter.Available = true;
252252
cfgFilter.Minimum = filter.Minimum;
253253
cfgFilter.Maximum = filter.Maximum;
254254
cfgFilter.Value = filter.Value;

Samples/FlyleafPlayer (WPF Control) (WPF)/MainWindow.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99
xmlns:flwpf="clr-namespace:FlyleafLib.Controls.WPF;assembly=FlyleafLib.Controls.WPF"
1010

1111
mc:Ignorable="d"
12-
Title="Flyleaf v3.4.4" Height="450" Width="800" Background="Black" Loaded="Window_Loaded" Icon="/Flyleaf.ico">
12+
Title="Flyleaf v3.4.5" Height="450" Width="800" Background="Black" Loaded="Window_Loaded" Icon="/Flyleaf.ico">
1313
<Grid>
1414
<fl:VideoView Player="{Binding Player}">
1515
<Grid>
1616
<flwpf:Flyleaf x:Name="flyleafControl"/>
1717
<StackPanel>
1818
<StackPanel Orientation="Horizontal">
19-
<TextBox Margin="10" FontSize="16" IsReadOnly="True" BorderThickness="0" Text="{Binding Player.LastError}" Foreground="Red" Background="#AA000000" TextWrapping="Wrap" MaxWidth="1000">
19+
<TextBox d:Text="Error" Margin="10" FontSize="16" IsReadOnly="True" BorderThickness="0" Text="{Binding Player.LastError}" Foreground="Red" Background="#AA000000" TextWrapping="Wrap" MaxWidth="1000">
2020
<TextBox.Style>
2121
<Style TargetType="{x:Type TextBox}">
2222
<Setter Property="Visibility" Value="Visible"/>
2323
<Style.Triggers>
24-
<DataTrigger Binding="{Binding Player.LastError}" Value="{x:Null}" >
24+
<DataTrigger Binding="{Binding Player.LastError}" Value="{x:Null}" d:Value="notnull">
2525
<Setter Property="Visibility" Value="Collapsed"/>
2626
</DataTrigger>
2727
</Style.Triggers>

Samples/FlyleafPlayer (WPF Control) (WPF)/MainWindow.xaml.cs

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,9 @@ public MainWindow()
4040
Config = new Config();
4141

4242
#if RELEASE
43+
// Loads the configuration file before initializing the player (if exists)
4344
if (File.Exists("Flyleaf.Config.xml"))
44-
Config = Config.Load("Flyleaf.Config.xml");
45-
else
46-
{
47-
Utils.AddFirewallRule();
48-
Config.Player.KeyBindings.LoadDefault();
49-
Config.Save("Flyleaf.Config.xml");
50-
}
45+
try { Config = Config.Load("Flyleaf.Config.xml"); } catch { }
5146
#endif
5247

5348
// Initializes the Player
@@ -77,8 +72,20 @@ public MainWindow()
7772

7873
private void Window_Loaded(object sender, RoutedEventArgs e)
7974
{
80-
// Giving access to keyboard events on start up
75+
// Gives access to keyboard events on start up
8176
Player.VideoView.WinFormsHost.Focus();
77+
78+
#if RELEASE
79+
// Ensures that the Control's handle has been created and the renderer has been fully initialized (so we can save also the filters parsed by the library)
80+
if (!Config.Loaded)
81+
{
82+
try
83+
{
84+
Utils.AddFirewallRule();
85+
Config.Save("Flyleaf.Config.xml");
86+
} catch { }
87+
}
88+
#endif
8289
}
8390

8491
#region Dark Theme

0 commit comments

Comments
 (0)