Verify Views files against decompiled, extract embedded types
Fixed files: - SkiaImageButton.cs: Added SVG support with multi-path search - SkiaNavigationPage.cs: Added LinuxApplication.IsGtkMode check - SkiaRefreshView.cs: Added ICommand support (Command, CommandParameter) - SkiaTemplatedView.cs: Added missing using statements Extracted embedded types to separate files (matching decompiled pattern): - From SkiaMenuBar.cs: MenuBarItem, MenuItem, SkiaMenuFlyout, MenuItemClickedEventArgs - From SkiaNavigationPage.cs: NavigationEventArgs - From SkiaTabbedPage.cs: TabItem - From SkiaVisualStateManager.cs: SkiaVisualStateGroupList, SkiaVisualStateGroup, SkiaVisualState, SkiaVisualStateSetter - From SkiaSwipeView.cs: SwipeItem, SwipeStartedEventArgs, SwipeEndedEventArgs - From SkiaFlyoutPage.cs: FlyoutLayoutBehavior (already separate) - From SkiaIndicatorView.cs: IndicatorShape (already separate) - From SkiaBorder.cs: SkiaFrame - From SkiaCarouselView.cs: PositionChangedEventArgs - From SkiaCollectionView.cs: SkiaSelectionMode, ItemsLayoutOrientation - From SkiaContentPresenter.cs: LayoutAlignment Verified matching decompiled: - SkiaContextMenu.cs, SkiaFlexLayout.cs, SkiaGraphicsView.cs Build: 0 errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,83 +6,6 @@ using SkiaSharp;
|
||||
|
||||
namespace Microsoft.Maui.Platform.Linux.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Supported hardware video acceleration APIs.
|
||||
/// </summary>
|
||||
public enum VideoAccelerationApi
|
||||
{
|
||||
/// <summary>
|
||||
/// Automatically select the best available API.
|
||||
/// </summary>
|
||||
Auto,
|
||||
|
||||
/// <summary>
|
||||
/// VA-API (Video Acceleration API) - Intel, AMD, and some NVIDIA.
|
||||
/// </summary>
|
||||
VaApi,
|
||||
|
||||
/// <summary>
|
||||
/// VDPAU (Video Decode and Presentation API for Unix) - NVIDIA.
|
||||
/// </summary>
|
||||
Vdpau,
|
||||
|
||||
/// <summary>
|
||||
/// Software decoding fallback.
|
||||
/// </summary>
|
||||
Software
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Video codec profiles supported by hardware acceleration.
|
||||
/// </summary>
|
||||
public enum VideoProfile
|
||||
{
|
||||
H264Baseline,
|
||||
H264Main,
|
||||
H264High,
|
||||
H265Main,
|
||||
H265Main10,
|
||||
Vp8,
|
||||
Vp9Profile0,
|
||||
Vp9Profile2,
|
||||
Av1Main
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Information about a decoded video frame.
|
||||
/// </summary>
|
||||
public class VideoFrame : IDisposable
|
||||
{
|
||||
public int Width { get; init; }
|
||||
public int Height { get; init; }
|
||||
public IntPtr DataY { get; init; }
|
||||
public IntPtr DataU { get; init; }
|
||||
public IntPtr DataV { get; init; }
|
||||
public int StrideY { get; init; }
|
||||
public int StrideU { get; init; }
|
||||
public int StrideV { get; init; }
|
||||
public long Timestamp { get; init; }
|
||||
public bool IsKeyFrame { get; init; }
|
||||
|
||||
private bool _disposed;
|
||||
private Action? _releaseCallback;
|
||||
|
||||
internal void SetReleaseCallback(Action callback) => _releaseCallback = callback;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (!_disposed)
|
||||
{
|
||||
_releaseCallback?.Invoke();
|
||||
_disposed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hardware-accelerated video decoding service using VA-API or VDPAU.
|
||||
/// Provides efficient video decode for media playback on Linux.
|
||||
/// </summary>
|
||||
public class HardwareVideoService : IDisposable
|
||||
{
|
||||
#region VA-API Native Interop
|
||||
|
||||
Reference in New Issue
Block a user