Add support to native Windows ARM64#55
Conversation
|
this looks good. Did you test both the GPL and LGPL package? Do you see the performance difference compared with the x64 emulation for high res media? |
|
Yes, I compiled GPL so far and tested it successfully on Microsoft Surface X Pro 11th Generation. |
|
Hello! I'm also waiting on Windows arm64 support for an integration I'm building. Would love to see this land soon! Could you share what the current blockers are for getting this merged? |
|
Hi, I need to fix the Windows build to CI integration #56 so that the consistency of builds is properly monitoring. |
Today installing VideoLAN.LibVLC.Windows and LibVLCSharp together generates binaries for x86 and x64, but not ARM64.
The resulting binaries actually work on a Windows on ARM device, eg Microsoft Surface X Pro 11th.
However, this is not optimal as it leverages emulation of VLC x64 DLLs to run them on ARM64.
This PR adds support to ARM64 architecture, so the resulting nupkg provides arm64 in addition to x86 and x64
Attention: this NuGet, alone will not provide support to win-arm64, LibVLCSharp should also support win-arm64.
This will break the resulting published application.
Previously, everything works with win-x64 plugins, when publishing an app for ARM64. This NuGet provides x64 plugins and LibVLCSharp only seeks win-x64 plugins, so all works (with emulation)
LibVLCSharp must add few things and patch Core.cs to detect the win-arm64 too.
In src/LibVLCSharp/Shared/Core/Constants.cs, Line 35 add
public const string WinArm64 = "win-arm64";LibVLCSharp must patch the Core.cs file
src/LibVLCSharp/Shared/Core/Core.csBecause now inside this file => "everything 64bit is x64" <= which is not good.
Specifically Lines 80 to 83
From
else { arch = PlatformHelper.IsX64BitProcess ? ArchitectureNames.Win64 : ArchitectureNames.Win86; }To something like
else if (PlatformHelper.IsWindows) { arch = RuntimeInformation.ProcessArchitecture switch { Architecture.X64 => ArchitectureNames.Win64, Architecture.X86 => ArchitectureNames.Win86, Architecture.Arm64 => ArchitectureNames.WinArm64, _ => throw new PlatformNotSupportedException( $"Unsupported architecture {RuntimeInformation.ProcessArchitecture}") }; }I still don't have access to VideoLAN code to raise a PR there too.
I think that's it for now (maybe LoongArch64 soon).