Skip to content

Commit

Permalink
Preparing fro release 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
mariodivece committed Jul 1, 2019
1 parent 13788a2 commit 9634627
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop" ToolsVersion="Current">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.0</TargetFrameworks>
<TargetFrameworks>net472;net461;netcoreapp3.0</TargetFrameworks>
<OutputType>WinExe</OutputType>
<UseWpf>true</UseWpf>
<Title>FFME Reference Player</Title>
Expand Down
17 changes: 12 additions & 5 deletions Unosquare.FFME.Windows.Sample/ViewModels/ControllerViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,9 @@ internal override void OnApplicationLoaded()
m.WhenChanged(() => IsSpeedRatioEnabled = m.IsOpening == false, nameof(m.IsOpen), nameof(m.IsSeekable));
}

private (double Contrast, double Brightness, double Saturation) ParseVideoEqualizerFilter()
private EqualizerFilterValues ParseVideoEqualizerFilter()
{
var result = (contrast: 1d, brightness: 0d, saturation: 1d);
var result = new EqualizerFilterValues() { Contrast = 1d, Brightness = 0d, Saturation = 1d };

if (Root.MediaElement == null || Root.MediaElement.HasVideo == false) return result;

Expand All @@ -329,9 +329,9 @@ internal override void OnApplicationLoaded()
var bLiteral = currentFilter.Substring(bIx + VideoEqBrightness.Length, 6);
var sLiteral = currentFilter.Substring(sIx + VideoEqSaturation.Length, 6);

result.contrast = double.Parse(cLiteral, CultureInfo.InvariantCulture);
result.brightness = double.Parse(bLiteral, CultureInfo.InvariantCulture);
result.saturation = double.Parse(sLiteral, CultureInfo.InvariantCulture);
result.Contrast = double.Parse(cLiteral, CultureInfo.InvariantCulture);
result.Brightness = double.Parse(bLiteral, CultureInfo.InvariantCulture);
result.Saturation = double.Parse(sLiteral, CultureInfo.InvariantCulture);

return result;
}
Expand Down Expand Up @@ -373,5 +373,12 @@ private void ApplyVideoEqualizerFilter(double? contrast, double? brightness, dou
Root.NotificationMessage = $"Contrast: {contrast:+0.000;-0.000}\r\nBrightness: {brightness:+0.000;-0.000}\r\nSaturation: {saturation:+0.000;-0.000}";
}
}

private struct EqualizerFilterValues
{
public double Contrast;
public double Brightness;
public double Saturation;
}
}
}
2 changes: 1 addition & 1 deletion Unosquare.FFME.Windows/Unosquare.FFME.Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<PropertyGroup>
<!-- Assembly Properties -->
<TargetFrameworks>netcoreapp3.0</TargetFrameworks>
<TargetFrameworks>net472;net461;netcoreapp3.0</TargetFrameworks>
<RootNamespace>Unosquare.FFME</RootNamespace>
<LangVersion>latest</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down

0 comments on commit 9634627

Please sign in to comment.