Files
video-v1/vav2/platforms/windows/applications/vav2player/Vav2Player/MainVideoPage.xaml

149 lines
6.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Page
x:Class="Vav2Player.MainVideoPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Vav2Player"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Video Display Area -->
<Border Grid.Row="0" Background="Black" BorderBrush="{ThemeResource SystemControlForegroundBaseLowBrush}" BorderThickness="1" Margin="10">
<!-- VideoPlayerControl2: Refactored modular architecture -->
<!-- NOTE: Must build in Visual Studio to ensure VavCore-debug.dll copies to AppX directory -->
<local:VideoPlayerControl2 x:Name="VideoPlayer"/>
</Border>
<!-- Player Controls -->
<StackPanel Grid.Row="1" Orientation="Vertical" HorizontalAlignment="Center" Margin="10">
<!-- Main Control Buttons -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,10">
<Button x:Name="OpenFileButton"
Content="Open AV1 File"
Width="120"
Height="40"
Margin="5"
Click="OpenFileButton_Click"/>
<Button x:Name="TestDecodeButton"
Content="Test Decode"
Width="100"
Height="40"
Margin="5"
Click="TestDecodeButton_Click"/>
<Button x:Name="PlayButton"
Content="Play"
Width="80"
Height="40"
Margin="5"
IsEnabled="False"
Click="PlayButton_Click"/>
<Button x:Name="PauseButton"
Content="Pause"
Width="80"
Height="40"
Margin="5"
IsEnabled="False"
Click="PauseButton_Click"/>
<Button x:Name="StopButton"
Content="Stop"
Width="80"
Height="40"
Margin="5"
IsEnabled="False"
Click="StopButton_Click"/>
</StackPanel>
<!-- Decoder Selection -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,10">
<TextBlock Text="Decoder:"
VerticalAlignment="Center"
Margin="0,0,10,0"/>
<ComboBox x:Name="DecoderSelectionComboBox"
Width="200"
Height="32"
VerticalAlignment="Center"
Margin="0,0,20,0"
SelectionChanged="DecoderSelectionComboBox_SelectionChanged">
<ComboBoxItem Content="AV1 Decoder (Auto)" IsSelected="True" Tag="AUTO"/>
<ComboBoxItem Content="AV1 Hardware (Media Foundation)" Tag="HARDWARE_MF"/>
<ComboBoxItem Content="AV1 Software (dav1d)" Tag="SOFTWARE"/>
</ComboBox>
</StackPanel>
<!-- File Output Options -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<CheckBox x:Name="EnableFileOutputCheckBox"
Content="Save frames to files"
IsChecked="False"
VerticalAlignment="Center"
Margin="10,0,20,0"
Checked="EnableFileOutputCheckBox_Checked"
Unchecked="EnableFileOutputCheckBox_Unchecked"/>
<ComboBox x:Name="OutputFormatComboBox"
Width="120"
Height="32"
VerticalAlignment="Center"
Margin="5,0,20,0"
IsEnabled="False"
SelectionChanged="OutputFormatComboBox_SelectionChanged">
<ComboBoxItem Content="BMP Format" IsSelected="True"/>
<ComboBoxItem Content="Raw YUV"/>
</ComboBox>
<TextBlock Text="Output folder:"
VerticalAlignment="Center"
Margin="0,0,5,0"/>
<TextBlock x:Name="OutputFolderText"
Text="Not set"
VerticalAlignment="Center"
FontStyle="Italic"
Foreground="Gray"
MaxWidth="200"
TextTrimming="CharacterEllipsis"/>
</StackPanel>
</StackPanel>
<!-- Status and Info Panel -->
<Border Grid.Row="2" Background="{ThemeResource SystemControlBackgroundChromeMediumBrush}" Padding="10" Margin="10,0,10,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock x:Name="StatusText"
Grid.Column="0"
Text="Ready"
VerticalAlignment="Center"
Foreground="{ThemeResource SystemControlForegroundBaseHighBrush}"/>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<TextBlock Text="Progress: "
VerticalAlignment="Center"
Margin="0,0,5,0"
Foreground="{ThemeResource SystemControlForegroundBaseHighBrush}"/>
<ProgressBar x:Name="ProgressBar"
Width="200"
Height="10"
VerticalAlignment="Center"
Minimum="0"
Maximum="100"
Value="0"/>
</StackPanel>
</Grid>
</Border>
</Grid>
</Page>