LibVLCSharp issueshttps://code.videolan.org/videolan/LibVLCSharp/-/issues2024-03-04T10:10:35Zhttps://code.videolan.org/videolan/LibVLCSharp/-/issues/635Build errors when targeting Windows SDK versions2024-03-04T10:10:35ZBarrett LewisBuild errors when targeting Windows SDK versions### Summary
Including LibVLCSharp in an x86/64 project with a **versioned** windows sdk `<TargetFramework>`, along with windows forms enabled, causes the following errors:
```
Error NETSDK1082 There was no runtime pack for Microsoft.Wi...### Summary
Including LibVLCSharp in an x86/64 project with a **versioned** windows sdk `<TargetFramework>`, along with windows forms enabled, causes the following errors:
```
Error NETSDK1082 There was no runtime pack for Microsoft.WindowsDesktop.App.WindowsForms available for the specified RuntimeIdentifier 'win10-arm-aot'.
Error NETSDK1082 There was no runtime pack for Microsoft.WindowsDesktop.App.WindowsForms available for the specified RuntimeIdentifier 'win10-arm'.
```
When ARM is not used or referenced in the project.
Specifically, I have found that there is a combination of 3 things, that when are the case together, lead to the errors:
1. LibVLCSharp (3.8.2, and some previous) is loaded in the project through Nuget
2. Target framework is _net6.0-windows10.0.19041.0_ (or _net6.0-windows10.0.17763_).
3. `<UseWindowsForms>true</UseWindowsForms>` in the csproj.
If (only) any two of the three is the case, the build succeeds:
- LibVLCSharp works with the desired target framework, until UseWindowsForms is added.
- LibVLCSharp works with UseWindowsForms on _net6.0-windows_, until it's changed to _net6.0-windows10.0.XYZ_.
- The desired target framework works with UseWindowsForms, until LibVLCSharp is added.
It seems that the LibVLCSharp package has some kind of msbuild target setup for this combination of factors that requires an arm runtime/workload installed
Adding `<RuntimeIdentifier>win-x64</RuntimeIdentifier>` does not resolve the issue.
I have tried multiple build environments with the same results.
I primarily work in windows/x86 and troubleshooting cross platform build configurations is not my forte, or I would try to dig deeper.
### Minimal project and steps to reproduce
Start with a blank project with arbitrary main() boilerplate.
- Add LibVLCSharp
- Enable windows forms
- Use a versioned windows SDK target framework
- Try to build.
Sample:
https://code.videolan.org/BarrettLewis/build-issue
NOTE: I started with a functional application using LibVLC (and company), encountered this error when switching target frameworks, and then stripped it down to 10 lines of csproj to repro the issue, that is why other packages like VideoLAN.LibVLC.Windows, LibVLC.Forms, etc, are not linked. This is the bare minimum to get the error.
Functionality can be toggled by (for example) removing the csproj line to enable windows forms. In my case I have to close VS, clear the `bin` and `obj` folders and restart vs. Then it will build until the missing piece of the unholy trinity is added back.
### What is the current *bug* behavior?
Build fails, complaining about missing ARM workload which is not being used.
### What is the expected *correct* behavior?
Build succeeds, does not require ARM workload to build x86/64
### Environment
<!-- Please complete the following information. -->
- OS: Windows
- Version 10 21H2
- Device: PC
- LibVLC version and architecture 3.0.20 (doesn't matter)
- LibVLCSharp version 3.8.2, x64 (desired)
- Visual Studio 2022 17.8.3
- MSBuild version 17.8.3https://code.videolan.org/videolan/LibVLCSharp/-/issues/634Balck Window appears when switching videos in Video View WPF2024-01-25T05:48:16ZParthibanBalck Window appears when switching videos in Video View WPFBlack window is visible on switching videos in WPF VideoView control. this issue is observed with LibVLCSharp.WPF 3.8.2
Steps to reproduce.
Play multiple videos on loop in same VideoView control one after another. Black window can be s...Black window is visible on switching videos in WPF VideoView control. this issue is observed with LibVLCSharp.WPF 3.8.2
Steps to reproduce.
Play multiple videos on loop in same VideoView control one after another. Black window can be seen at before after playing video when player switches from one video to another.
What is the expected *correct* behavior?
switching between videos should be smooth and no black window should be visible on any part of the screen.
Code
https://github.com/Parthiban-P/libvlcWpfTest/tree/main/LibVLCCharpWPF
* OS: Windows
* Version 10
* Device: Intel
* LibVLCSharp.WPF 3.8.2
* VideoLAN.LibVLC.Windows 3.0.10 x86https://code.videolan.org/videolan/LibVLCSharp/-/issues/630Segmentation fault when using libVlc.Log2023-12-18T09:59:31ZSimon ŠanderSegmentation fault when using libVlc.Log<!---
Please read this!
Before opening a new issue, make sure to search for keywords in the issues
filtered by "bug" label and verify the issue you're about to submit isn't a duplicate.
If you are using LibVLCSharp commercially, please...<!---
Please read this!
Before opening a new issue, make sure to search for keywords in the issues
filtered by "bug" label and verify the issue you're about to submit isn't a duplicate.
If you are using LibVLCSharp commercially, please consider purchasing a Commercial License: https://videolabs.io/products/libvlcsharp
If this is a question please ask on StackOverflow: https://stackoverflow.com/questions/tagged/libvlcsharp.
Need professional support? Reach out at dotnet@videolabs.io for more info.
--->
### Summary
<!-- Summarize the bug encountered concisely -->
### Minimal project and steps to reproduce
<!-- How one can reproduce the issue - this is very important
https://github.com/sajmons/LibVLCSharp.Avalonia.Sample/tree/master
-->
### What is the current *bug* behavior?
<!-- What actually happens -->
Application crashes upon start with Segmentation fault message.
If you comment out line 12 https://github.com/sajmons/LibVLCSharp.Avalonia.Sample/blob/69b3536f21706d736068357c57273a8e4f04f31a/ViewModels/MainWindowViewModel.cs#L12
from code application starts without problem.
So I guess bug happens when this line is executed: _libVlc.Log += _libVlc_Log;
### What is the expected *correct* behavior?
<!-- What you should see instead -->
Application should start normally.
### Does it work on other plaforms? Does it work with the official VLC apps?
<!-- Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise. -->
This bug only occours on Raspberry PI OS Bullseye ARM64 Linux platform (Raspberry PI 4 B+ 4GB RAM).
On Windows 11 Pro 22H2 x64 (AMD Ryzen 7 3700X 8-Core Processor, 16GB RAM) it works.
### Relevant LibVLC logs and/or screenshots
<!-- Paste any relevant logs from your app and/or from LibVLC (`new LibVLC(enableDebugLogs: true)`).
Please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise. -->
![image](/uploads/ed84e5c47120fd4d4ceefe76ceb199bd/image.png)
![image](/uploads/af373d57c08f8881744680bf91e7defc/image.png)
```
simon@raspberrypi:~/Downloads/linux-arm64 $ ./LibVLCSharp.Avalonia.Sample
Xlib: sequence lost (0x1002d > 0x2f) in reply type 0x0!
Xlib: sequence lost (0x10032 > 0x34) in reply type 0x0!
Xlib: sequence lost (0x10050 > 0x52) in reply type 0x0!
Xlib: sequence lost (0x10055 > 0x57) in reply type 0x0!
revision `C
VLC media player - `C
`C
configured with ��a�
Segmentation fault
```
```
simon@raspberrypi:~/Downloads/linux-arm64 $ apt show libvlc-dev
Package: libvlc-dev
Version: 1:3.0.20-0+rpt1+deb11u1
Priority: optional
Section: libdevel
Source: vlc
Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Installed-Size: 443 kB
Depends: libvlc5 (= 1:3.0.20-0+rpt1+deb11u1)
Homepage: https://www.videolan.org/vlc/
Download-Size: 170 kB
APT-Manual-Installed: yes
APT-Sources: http://archive.raspberrypi.org/debian bullseye/main arm64 Packages
Description: development files for libvlc
This package contains headers and a static library required to build
standalone applications that use VLC features.
.
VLC is the VideoLAN project's media player. It plays MPEG, MPEG-2, MPEG-4,
DivX, MOV, WMV, QuickTime, WebM, FLAC, MP3, Ogg/Vorbis files, DVDs, VCDs,
podcasts, and multimedia streams from various network sources.
```
### Environment
<!-- Please complete the following information. -->
- OS: Raspberry PI OS
- Version Bullseye ARM64 bit
- Device: Raspberry PI 4 B+
- LibVLC version and architecture: libvlc-dev 1:3.0.20-0+rpt1+deb11u1 arm64
- LibVLCSharp: LibVLCSharp.Avalonia 3.8.2https://code.videolan.org/videolan/LibVLCSharp/-/issues/578UWP LibVLC 42023-08-07T12:32:33ZMartin FinkelUWP LibVLC 4- See if we can use https://docs.microsoft.com/en-us/uwp/api/windows.applicationmodel.datatransfer.sharedstorageaccessmanager?view=winrt-22621 with a regular win64 build for filesystem access.
- See if the winrt audio output is still nee...- See if we can use https://docs.microsoft.com/en-us/uwp/api/windows.applicationmodel.datatransfer.sharedstorageaccessmanager?view=winrt-22621 with a regular win64 build for filesystem access.
- See if the winrt audio output is still needed.
- Check current WACK results for UCRT classic win64 builds, as well as Xbox support.
- Add filepicker to UWP sample.
- port https://github.com/videolan/libvlcsharp/pull/328 to callbacks
- port https://code.videolan.org/videolan/LibVLCSharp/-/commit/fef0d804cf5b70c8986cc6d08f88291e54345042 and https://code.videolan.org/videolan/LibVLCSharp/-/commit/64dc8676153541a1010164e190b2d1572befdf80 to v4https://code.videolan.org/videolan/LibVLCSharp/-/issues/616Log callback interop for Android simulator2023-06-26T07:19:26ZwinkmichaelLog callback interop for Android simulator### Summary
Xamarin Forms app, running _libVLC.Log += LibVLC_Log; overload which contains nothing will crash. private void LibVLC_Log(object sender, LogEventArgs e) {} The overload contains no code.
### Minimal project and steps to re...### Summary
Xamarin Forms app, running _libVLC.Log += LibVLC_Log; overload which contains nothing will crash. private void LibVLC_Log(object sender, LogEventArgs e) {} The overload contains no code.
### Minimal project and steps to reproduce
https://github.com/winkmichael/LogTestlibVLC
Immediately crashes once initialized, no errors.
Remove _libVLC.Log += LibVLC_Log; and there is no crash.
Same issue occurs with; private void OnLogReceived(object sender, LogEventArgs e)
### What is the current *bug* behavior?
Crashes the Android App.
### What is the expected *correct* behavior?
Log overload should allow log handling by application.
### Does it work on other plaforms? Does it work with the official VLC apps?
[libc] Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x30 in tid 23185 (e.logtestlibvlc), pid 23185 (e.logtestlibvlc)
That is the only log.
### Relevant LibVLC logs and/or screenshots
N/A
### Environment
Android Pixel 5 - API 30 Emulator
LibVLCSharp.Forms 3.7.0
VideoLAN.LibVLC.Android 3.5.3
### Possible fixes
No ideahttps://code.videolan.org/videolan/LibVLCSharp/-/issues/454Add MSIX support2023-05-19T08:35:37ZFranck EAdd MSIX supportPackaging with MSIX - WPF - LibVLCSharp.Shared.VLCException: 'Failed to load required native libraries
RE StackOverflow question [here](https://stackoverflow.com/questions/66935123/c-sharp-wpf-vlc-libvlcsharp-shared-vlcexception-failed-...Packaging with MSIX - WPF - LibVLCSharp.Shared.VLCException: 'Failed to load required native libraries
RE StackOverflow question [here](https://stackoverflow.com/questions/66935123/c-sharp-wpf-vlc-libvlcsharp-shared-vlcexception-failed-to-load-required-na/66936116?noredirect=1#comment118328158_66936116)
I am using with minimal sample, which I then prepare for the Windows store following official documentation [here](https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/modernize-wpf-tutorial-5)
Issue is that the libvlc folder is not being copied to AppX\... folder.
Minimal project included, and to make the solution small, packages are not installed. List of required packages:
LibVLCSharp.3.5.0
LibVLCSharp.WPF.3.5.0
VideoLAN.LibVLC.Windows.3.0.12
The other packages should only be dependencies.
[vlc-msix-app.zip](/uploads/00ae31e9ffc15bcf6bc8e1223e011c4e/vlc-msix-app.zip)https://code.videolan.org/videolan/LibVLCSharp/-/issues/609UI crashes with exception: "Unable to create WPF Window in VideoView."2023-05-17T17:33:35ZBartemisUI crashes with exception: "Unable to create WPF Window in VideoView."**Description:**
When using a LibVLCSharp WPF VideoView and switching between tabs, the UI crashes with an exception.
![switching_tabs_crash](/uploads/894e127507eecf3393cfb9de22161fd8/switching_tabs_crash.gif)
**Expected behavior:**
E...**Description:**
When using a LibVLCSharp WPF VideoView and switching between tabs, the UI crashes with an exception.
![switching_tabs_crash](/uploads/894e127507eecf3393cfb9de22161fd8/switching_tabs_crash.gif)
**Expected behavior:**
Expected no crash
**Exception:**
```
LibVLCSharp.Shared.VLCException: Unable to create WPF Window in VideoView. ---> System.InvalidOperationException: This Visual is not connected to a PresentationSource.
at System.Windows.Media.Visual.PointToScreen(Point point)
at LibVLCSharp.WPF.ForegroundWindow.Background_Loaded(Object sender, RoutedEventArgs e)
```
**Stacktrace**:
```
at LibVLCSharp.WPF.ForegroundWindow.Background_Loaded(Object sender, RoutedEventArgs e)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
at MS.Internal.LoadedOrUnloadedOperation.DoWork()
at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
```
**LibVLCSharp/LibVLC Versions:**
- LibVLCSharp 3.7.0
- LibVLCSharp.WPF 3.7.0
- VideoLan.LibVLC.Windows 3.0.18
**Operating system:**
Windows 10 Professional
**How to reproduce:**
Create a WPF application and use the following **MainWindow.xaml** (change the `NameSpace` to your own):
```
<Window x:Class="NameSpace.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:MSStreaming_VLC_WPF"
xmlns:wpf="clr-namespace:LibVLCSharp.WPF;assembly=LibVLCSharp.WPF"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid>
<TabControl>
<TabItem Header="VLC 1">
<TabControl>
<TabItem Header="VLC 2">
<wpf:VideoView x:Name="VideoView" />
</TabItem>
<TabItem Header="Other 2">
<TextBlock Text="Other content" />
</TabItem>
</TabControl>
</TabItem>
<TabItem Header="Other 1">
<TextBlock Text="Other content" />
</TabItem>
</TabControl>
</Grid>
</Window>
```
Add some exception handling to the **App.xaml.cs**:
```
public partial class App
{
// Prevent an exception to crash the application
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
DispatcherUnhandledException += (sender, args) =>
{
// Prevent the application from crashing
args.Handled = true;
// Display a message box with the exception details
MessageBox.Show("An unhandled exception occurred: " + args.Exception.Message, "Unhandled Exception", MessageBoxButton.OK, MessageBoxImage.Error);
// Log the exception including inner exceptions
Debug.WriteLine(args.Exception.ToString());
Debug.WriteLine(args.Exception.StackTrace);
};
}
}
```
Reproduction steps (also see gif):
- Click on Other 2
- Click on Other 1
- Click on VLC 1
Observe the application popups with an exceptionhttps://code.videolan.org/videolan/LibVLCSharp/-/issues/346MAUI support2023-04-10T11:16:21ZMartin FinkelMAUI support### Problem to solve
Support [MAUI](https://github.com/dotnet/maui)
This evolution will affect at least 3 of our packages:
- https://www.nuget.org/packages/LibVLCSharp.Forms/
- https://www.nuget.org/packages/LibVLCSharp.Forms.WPF/
- ht...### Problem to solve
Support [MAUI](https://github.com/dotnet/maui)
This evolution will affect at least 3 of our packages:
- https://www.nuget.org/packages/LibVLCSharp.Forms/
- https://www.nuget.org/packages/LibVLCSharp.Forms.WPF/
- https://www.nuget.org/packages/LibVLCSharp.Forms.GTK/
as well as the MediaElement crossplatform control.
RC release for MAUI is planned for September 2021. https://github.com/dotnet/maui#milestones
### Intended users
- future MAUI users.
- Ex-Xamarin.Forms users.
- MediaElement users.
### Proposal
Haven't looked into it yet.
### Documentation
- https://code.videolan.org/videolan/LibVLCSharp/-/blob/3.x/src/LibVLCSharp.Forms/README.md
- https://code.videolan.org/videolan/LibVLCSharp/-/blob/3.x/src/LibVLCSharp.Forms.Platforms.WPF/README.md
- https://code.videolan.org/videolan/LibVLCSharp/-/blob/3.x/src/LibVLCSharp.Forms.Platforms.GTK/README.md
- https://code.videolan.org/videolan/LibVLCSharp/-/blob/3.x/docs/media_player_element.mdhttps://code.videolan.org/videolan/LibVLCSharp/-/issues/2Rx/ReactiveUI integration2023-03-30T00:49:05ZMartin FinkelRx/ReactiveUI integrationSee https://code.videolan.org/videolan/LibVLCSharp/blob/master/LibVLCSharp/Shared/EventManager.cs
- https://github.com/dotnet/reactive/
- https://github.com/reactiveui/ReactiveUI
- https://github.com/Baseflow/XamarinMediaManager/blob/d...See https://code.videolan.org/videolan/LibVLCSharp/blob/master/LibVLCSharp/Shared/EventManager.cs
- https://github.com/dotnet/reactive/
- https://github.com/reactiveui/ReactiveUI
- https://github.com/Baseflow/XamarinMediaManager/blob/develop/MediaManager.Reactive/ReactiveExtensions.cshttps://code.videolan.org/videolan/LibVLCSharp/-/issues/211WASM/Blazor support2023-03-28T07:07:55ZDiego StamigniWASM/Blazor support### Problem to solve
Should we support Blazor and WebAssembly?
### Intended users
Web FrontEnd developers that want to use VLC in the browser using .NET.
### Documentation
https://docs.microsoft.com/en-gb/aspnet/core/blazor/?view=as...### Problem to solve
Should we support Blazor and WebAssembly?
### Intended users
Web FrontEnd developers that want to use VLC in the browser using .NET.
### Documentation
https://docs.microsoft.com/en-gb/aspnet/core/blazor/?view=aspnetcore-3.0
I’m not sure about this and I’m throwing it here just as an issue we can follow in case the team decides to support it. It would be super cool tho :)
P.S. as of today, Blazor is still in preview and will be released by end of 2019.https://code.videolan.org/videolan/LibVLCSharp/-/issues/288LibVLCSharp 42023-03-01T07:10:45ZMartin FinkelLibVLCSharp 4### Problem to solve
Add libvlcsharp support.
### Intended users
All.
### Proposal
List all API changes to be implemented here, and implement them.
Need to push LibVLC 4 builds for all platforms.
These will be pre-release packages...### Problem to solve
Add libvlcsharp support.
### Intended users
All.
### Proposal
List all API changes to be implemented here, and implement them.
Need to push LibVLC 4 builds for all platforms.
These will be pre-release packages for now.
### Documentation
Should not change much.LibVLCSharp 4Martin FinkelMartin Finkelhttps://code.videolan.org/videolan/LibVLCSharp/-/issues/555VideoView Background is very unstable from LibVLCSharp.WPF2023-02-21T07:30:30ZGhost UserVideoView Background is very unstable from LibVLCSharp.WPFYou can see this video, The VideoView control's background is unstable.
When I click the button **more than 20 times** to open the VLC control, the background of the control sometimes doesn't render black, but some other color.
I just ...You can see this video, The VideoView control's background is unstable.
When I click the button **more than 20 times** to open the VLC control, the background of the control sometimes doesn't render black, but some other color.
I just opened the VLC control and I didn't play any video. So the problem is not due to playing the video.
I didn't set any background color for the VLC control, so its background color should always be black by default.
![001](/uploads/b1d1743efa027b36709b9a710af6afac/001.mp4)
Full Test C# code
.NET 6.0 With Visual studio 2022 (With LibVLCSharp.WPF 3.6.6)
MainWindow.xaml
```
<Window x:Class="VLCTransparentWindowTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:VLCTransparentWindowTest"
mc:Ignorable="d" WindowStartupLocation="CenterScreen"
Title="MainWindow" Height="450" Width="800">
<Grid>
<Button Content="Button" Margin="318,166,350,206" Click="Button_Click"/>
</Grid>
</Window>
```
MainWindow.xaml.cs
```
using System.Windows;
namespace VLCTransparentWindowTest
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
var window = new TestWindow();
window.ShowDialog();
}
}
}
```
TestWindow.xaml
```
<Window x:Class="VLCTransparentWindowTest.TestWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:VLC="clr-namespace:LibVLCSharp.WPF;assembly=LibVLCSharp.WPF"
mc:Ignorable="d" WindowStartupLocation="CenterScreen"
Title="TestWindow" Height="400" Width="600" Background="Black">
<Grid>
<VLC:VideoView x:Name="player" x:FieldModifier="private">
</VLC:VideoView>
</Grid>
</Window>
```
TestWindow.xaml.cs
```
using System.Windows;
namespace VLCTransparentWindowTest
{
public partial class TestWindow : Window
{
public TestWindow()
{
InitializeComponent();
}
}
}
```https://code.videolan.org/videolan/LibVLCSharp/-/issues/579Create C repro for vmem cleanup callback investigation2022-08-30T09:18:01ZMartin FinkelCreate C repro for vmem cleanup callback investigationhttps://code.videolan.org/videolan/LibVLCSharp/-/commit/3e3e2a4a0d2cd3688b84fdaca31577af2dcb652a fixed a CLR crash but it is probably unsuitable for iOS.
The vmem module invokes both cleanup and free on closing, which likely results in ...https://code.videolan.org/videolan/LibVLCSharp/-/commit/3e3e2a4a0d2cd3688b84fdaca31577af2dcb652a fixed a CLR crash but it is probably unsuitable for iOS.
The vmem module invokes both cleanup and free on closing, which likely results in internal memory corruption when using the opaque pointer as a libvlc consumer. Need a C repro to prove it.https://code.videolan.org/videolan/LibVLCSharp/-/issues/557VideoView lies on top of all other elements in XAML in Xamarin.Forms in WPF a...2022-07-01T03:45:07ZSigurður JökullVideoView lies on top of all other elements in XAML in Xamarin.Forms in WPF application.<!---
Please read this!
Before opening a new issue, make sure to search for keywords in the issues
filtered by "bug" label and verify the issue you're about to submit isn't a duplicate.
If you are using LibVLCSharp commercially, please...<!---
Please read this!
Before opening a new issue, make sure to search for keywords in the issues
filtered by "bug" label and verify the issue you're about to submit isn't a duplicate.
If you are using LibVLCSharp commercially, please consider purchasing a Commercial License: https://videolabs.io/solutions/libvlcsharp
If this is a question please ask on StackOverflow: https://stackoverflow.com/questions/tagged/libvlcsharp.
Need professional support? Reach out at dotnet@videolabs.io for more info.
--->
### Summary
VideoView lies on top of other elements in XAML in xamarin forms when it shouldn't. For example if you have an absolutelayout containing a videoview then a stacklayout next as a child in the same absolutelayout then the VideoView will cover the stacklayout instead of the other way around, which is expected.
<!-- Summarize the bug encountered concisely -->
### Minimal project and steps to reproduce
create a VideoView in xaml and place some element above it using absolutelayout and see that it doesn't work.
I can submit a project later if necessary this is pretty self-explanatory (I'm guessing).
<!-- How one can reproduce the issue - this is very important
Provide a Minimal, Complete, and Verifiable example (https://stackoverflow.com/help/mcve) through a git hosting platform
and post the URL here. Do NOT paste parts of your code in the GitLab issue, share your full (but minimal) code through a git repository.
Maintainers should be able to just clone and run your minimal project. If you don't provide this, we may not be able to help and may close the issue.
-->
### What is the current *bug* behavior?
VideoView exceeds all other elements.
<!-- What actually happens -->
### What is the expected *correct* behavior?
VideoView should have the "z-index" that makes sense like any other element in XAML in Xamarin.Forms.
<!-- What you should see instead -->
### Does it work on other plaforms? Does it work with the official VLC apps?
Works on macOS but not on WPF.
<!-- Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise. -->
### Relevant LibVLC logs and/or screenshots
I can provide screenshots or logs if requested.
<!-- Paste any relevant logs from your app and/or from LibVLC (`new LibVLC(enableDebugLogs: true)`).
Please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise. -->
### Environment
Windows 10 on Parallels Virtual Machine, on iMac "27 2019
LibVLC 3.6.6
<!-- Please complete the following information. -->
- OS: Windows 10
- Version 10
- Device: iMac
- LibVLC version and architecture: LibVLC 3.6.6
- LibVLCSharp version: latest
### Possible fixes
Not sure.https://code.videolan.org/videolan/LibVLCSharp/-/issues/8Setup BenchmarkDotNet2022-06-29T02:36:24ZMartin FinkelSetup BenchmarkDotNethttps://github.com/dotnet/BenchmarkDotNet
This may prove useful to catch perf regressions and improve memory usage in marshaling situations.https://github.com/dotnet/BenchmarkDotNet
This may prove useful to catch perf regressions and improve memory usage in marshaling situations.https://code.videolan.org/videolan/LibVLCSharp/-/issues/1Elmish.XamarinForms integration2022-06-29T02:36:23ZMartin FinkelElmish.XamarinForms integrationhttps://github.com/fsprojects/Elmish.XamarinFormshttps://github.com/fsprojects/Elmish.XamarinFormshttps://code.videolan.org/videolan/LibVLCSharp/-/issues/558Does setvideoformatcallbacks in vlcsharp support i420 decoding2022-05-30T09:32:37Z王熙Does setvideoformatcallbacks in vlcsharp support i420 decodingThe pitches and lines in libvlcvideoformatcb in setvideoformatcallbacks need to set YUV three plane parameters, but does the official uint type support this operation?
![image](/uploads/78f13783d5e6ba8ce8330ca39972dc2c/image.png)
If you ...The pitches and lines in libvlcvideoformatcb in setvideoformatcallbacks need to set YUV three plane parameters, but does the official uint type support this operation?
![image](/uploads/78f13783d5e6ba8ce8330ca39972dc2c/image.png)
If you can, can you give me an example?https://code.videolan.org/videolan/LibVLCSharp/-/issues/535Add support to hosting the WPF VideoView in a Windows Forms app with HwndSource2022-04-19T03:16:25ZTimothy PageAdd support to hosting the WPF VideoView in a Windows Forms app with HwndSource### Summary
I try to use a WPF User control containing VideoView on an Element Host on a Windows Form and get an Assertion failed LibVLCSharp.WPF.ForegroundWindow.Background_Loaded dialog box.
### Minimal project and steps to reproduce...### Summary
I try to use a WPF User control containing VideoView on an Element Host on a Windows Form and get an Assertion failed LibVLCSharp.WPF.ForegroundWindow.Background_Loaded dialog box.
### Minimal project and steps to reproduce
Here is a link to my very basic stripped down code to reproduce the issue - (https://github.com/timepage/WPFUserControlWinForm.git)
1. Open the solution file that I have provided
2. Run the solution
3. See error
### What is the current *bug* behavior?
Running the code displays an Assertion failed LibVLCSharp.WPF.ForegroundWindow.Background_Loaded dialog box
### What is the expected *correct* behavior?
I expect to have my WinForm use a WPF user control to display the VideoView to display video.
### Does it work on other plaforms? Does it work with the official VLC apps?
---- Assert Long Message ----
```
at LibVLCSharp.WPF.ForegroundWindow.Background_Loaded(Object sender, RoutedEventArgs e)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
at MS.Internal.LoadedOrUnloadedOperation.DoWork()
at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WPFUserControlWinForm.Program.Main() in C:\Users\timp\Desktop\Dev\WPFUserControlWinForm\WPFUserControlWinForm\Program.cs:line 13
```
### Relevant LibVLC logs and/or screenshots
### Environment
<!-- Please complete the following information. -->
- OS: Windows 10 Enterprise
- Version 19044.1466
- Device: Desktop
- LibVLC version and architecture VideoLAN.LibVLC.Windows 3.0.16
- LibVLCSharp version 3.6.5
- LibVLCSharp.WPF version 3.6.5
- Visual Studio version 2019
### Possible fixeshttps://code.videolan.org/videolan/LibVLCSharp/-/issues/428MediaPlayerElement for WinForms2022-04-19T03:16:22ZMartin FinkelMediaPlayerElement for WinFormshttps://code.videolan.org/videolan/LibVLCSharp/-/issues/408Avalonia: Add a convenient way to put controls over the video2022-04-11T10:51:43ZMartin FinkelAvalonia: Add a convenient way to put controls over the videoFollow up on https://code.videolan.org/videolan/LibVLCSharp/-/merge_requests/18#note_73534
### Problem to solve
- Add a convenient way to put controls over the video, much like the WPF way. Look into having shared code for this.
- Veri...Follow up on https://code.videolan.org/videolan/LibVLCSharp/-/merge_requests/18#note_73534
### Problem to solve
- Add a convenient way to put controls over the video, much like the WPF way. Look into having shared code for this.
- Verify if TwoWay binding mode is really needed.
### Intended users
Avalonia users.
/cc FYI @shawnallen85 @jeremyVignelles