Skip to content

Commit

Permalink
Merge pull request from dev branch.
Browse files Browse the repository at this point in the history
 - Fix can't stop in statechanged event.
  • Loading branch information
devkanro committed Apr 4, 2016
2 parents b985a94 + 78511c5 commit e935afe
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion xZune.Vlc.Wpf.Sample/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Version: 20160109

<Grid x:Name="LayoutParent">

<wpf:VlcPlayer x:Name="Player" EndBehavior="Repeat"/>
<wpf:VlcPlayer x:Name="Player" EndBehavior="Nothing" Stretch="Fill"/>
<!-- can comment this if adding the player dynamically -->

<StackPanel Opacity="0.8">
Expand Down
2 changes: 1 addition & 1 deletion xZune.Vlc.Wpf.Sample/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Project: xZune.Vlc (https://github.com/higankanshi/xZune.Vlc)
// Filename: MainWindow.xaml.cs
// Version: 20160312
// Version: 20160404

using System;
using System.ComponentModel;
Expand Down
6 changes: 3 additions & 3 deletions xZune.Vlc.Wpf/Themes/Generic.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
Project: xZune.Vlc (https://github.com/higankanshi/xZune.Vlc)
Filename: Themes/Generic.xaml
Version: 20160327
Version: 20160404
-->

<ResourceDictionary
Expand All @@ -10,7 +10,7 @@ Version: 20160327
xmlns:local="clr-namespace:xZune.Vlc.Wpf">

<Style TargetType="{x:Type local:VlcPlayer}">

<Setter Property="Background" Value="Transparent"/>
<Setter Property="Stretch" Value="Uniform" />
<Setter Property="StretchDirection" Value="Both" />

Expand All @@ -24,7 +24,7 @@ Version: 20160327
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<local:ThreadSeparatedImage x:Name="Image" />
<local:ThreadSeparatedImage x:Name="Image"/>
</Border>
</ControlTemplate>
</Setter.Value>
Expand Down
9 changes: 6 additions & 3 deletions xZune.Vlc.Wpf/VlcPlayer.Events.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Project: xZune.Vlc (https://github.com/higankanshi/xZune.Vlc)
// Filename: VlcPlayer.Events.cs
// Version: 20160327
// Version: 20160404

using System;
using System.Diagnostics;
Expand Down Expand Up @@ -213,8 +213,11 @@ private void MediaStateChanged(object sender, ObjectEventArgs<Interop.Core.Event

Debug.WriteLine(String.Format("StateChanged : {0}", e.Value.NewState));

if (StateChanged != null)
StateChanged(this, new ObjectEventArgs<MediaState>(e.Value.NewState));
Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
{
if (StateChanged != null)
StateChanged(this, new ObjectEventArgs<MediaState>(e.Value.NewState));
}));
}

#endregion VlcMediaPlayer event handlers
Expand Down
2 changes: 1 addition & 1 deletion xZune.Vlc.Wpf/xZune.Vlc.Wpf - .Net 3.5.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>higan.pfx</AssemblyOriginatorKeyFile>
Expand Down
2 changes: 1 addition & 1 deletion xZune.Vlc.Wpf/xZune.Vlc.Wpf - .Net 4.0.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>higan.pfx</AssemblyOriginatorKeyFile>
Expand Down
2 changes: 1 addition & 1 deletion xZune.Vlc.Wpf/xZune.Vlc.Wpf - .Net 4.5.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>higan.pfx</AssemblyOriginatorKeyFile>
Expand Down
2 changes: 1 addition & 1 deletion xZune.Vlc/xZune.Vlc - .Net 2.0.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>higan.pfx</AssemblyOriginatorKeyFile>
Expand Down
2 changes: 1 addition & 1 deletion xZune.Vlc/xZune.Vlc - .Net 3.0.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>higan.pfx</AssemblyOriginatorKeyFile>
Expand Down
2 changes: 1 addition & 1 deletion xZune.Vlc/xZune.Vlc - .Net 3.5.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>higan.pfx</AssemblyOriginatorKeyFile>
Expand Down
2 changes: 1 addition & 1 deletion xZune.Vlc/xZune.Vlc - .Net 4.0.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>higan.pfx</AssemblyOriginatorKeyFile>
Expand Down
2 changes: 1 addition & 1 deletion xZune.Vlc/xZune.Vlc - .Net 4.5.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>higan.pfx</AssemblyOriginatorKeyFile>
Expand Down

0 comments on commit e935afe

Please sign in to comment.