mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-05-08 03:06:29 +08:00
remove VLC, use DirectShow and LAV instead
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:vlc="clr-namespace:Meta.Vlc.Wpf;assembly=Meta.Vlc.Wpf"
|
||||
xmlns:local="clr-namespace:QuickLook.Plugin.VideoViewer"
|
||||
xmlns:mediakit="clr-namespace:WPFMediaKit.DirectShow.Controls;assembly=WPFMediaKit"
|
||||
xmlns:glassLayer="clr-namespace:QuickLook.Controls.GlassLayer;assembly=QuickLook"
|
||||
mc:Ignorable="d"
|
||||
x:Name="viewerPanel"
|
||||
@@ -12,7 +12,7 @@
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
<local:TimeSpanToShortStringConverter x:Key="TimeSpanToShortStringConverter" />
|
||||
<local:TimeTickToShortStringConverter x:Key="TimeTickToShortStringConverter" />
|
||||
<local:VolumeToIconConverter x:Key="VolumeToIconConverter" />
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Styles.xaml" />
|
||||
@@ -20,8 +20,7 @@
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<vlc:VlcPlayer x:Name="mediaElement" LibVlcPath="{Binding LibVlcPath, ElementName=viewerPanel}"
|
||||
VlcOption="{Binding VlcOption, ElementName=viewerPanel}" />
|
||||
<mediakit:MediaUriElement x:Name="mediaElement" />
|
||||
<Grid x:Name="coverArtPersenter" ClipToBounds="True" Background="{StaticResource MainWindowBackground}">
|
||||
<Grid.Style>
|
||||
<Style TargetType="Grid">
|
||||
@@ -85,7 +84,7 @@
|
||||
Foreground="{DynamicResource WindowTextForeground}" />
|
||||
<TextBlock x:Name="metaLength" Grid.Row="5" FontSize="14" Padding="3" TextTrimming="CharacterEllipsis"
|
||||
Foreground="{DynamicResource WindowTextForeground}"
|
||||
Text="{Binding ElementName=mediaElement, Path=Length, Converter={StaticResource TimeSpanToShortStringConverter}}" />
|
||||
Text="{Binding ElementName=mediaElement, Path=MediaDuration, Converter={StaticResource TimeTickToShortStringConverter}}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -151,12 +150,6 @@
|
||||
<Style TargetType="Button" BasedOn="{StaticResource ControlButtonStyle}">
|
||||
<Setter Property="Content"
|
||||
Value="{Binding ElementName=mediaElement, Path=Volume, Converter={StaticResource VolumeToIconConverter}}" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsMuted, ElementName=viewerPanel}"
|
||||
Value="True">
|
||||
<Setter Property="Content" Value="" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
@@ -170,11 +163,11 @@
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=buttonTime, Path=Tag}" Value="Time">
|
||||
<Setter Property="Text"
|
||||
Value="{Binding ElementName=mediaElement, Path=Time, Converter={StaticResource TimeSpanToShortStringConverter}}" />
|
||||
Value="{Binding ElementName=mediaElement, Path=MediaPosition, Converter={StaticResource TimeTickToShortStringConverter}}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ElementName=buttonTime, Path=Tag}" Value="Length">
|
||||
<Setter Property="Text"
|
||||
Value="{Binding ElementName=mediaElement, Path=Length, Converter={StaticResource TimeSpanToShortStringConverter}}" />
|
||||
Value="{Binding ElementName=mediaElement, Path=MediaDuration, Converter={StaticResource TimeTickToShortStringConverter}}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
@@ -182,14 +175,15 @@
|
||||
</TextBlock>
|
||||
</Button>
|
||||
<Slider x:Name="sliderProgress" Style="{StaticResource PositionSliderStyle}"
|
||||
SmallChange="0.00001" LargeChange="0.01" Maximum="1"
|
||||
Value="{Binding Position, ElementName=mediaElement}" />
|
||||
SmallChange="1" LargeChange="10"
|
||||
Maximum="{Binding ElementName=mediaElement, Path=MediaDuration}"
|
||||
Value="{Binding MediaPosition, ElementName=mediaElement}" />
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
<Grid x:Name="volumeSliderLayer" Background="Transparent" Visibility="Collapsed">
|
||||
<Grid Height="32" Width="130" HorizontalAlignment="Right" VerticalAlignment="Bottom"
|
||||
Background="{DynamicResource CaptionButtonHoverBackground}" Margin="0,0,0,32">
|
||||
<Slider Style="{StaticResource CustomSliderStyle}" Width="110" Maximum="100"
|
||||
<Slider Style="{StaticResource CustomSliderStyle}" Width="110" Maximum="1"
|
||||
Value="{Binding ElementName=mediaElement, Path=Volume}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user