-
Notifications
You must be signed in to change notification settings - Fork 2
WPF sample #19
Comments
(very) early API draft: Regarding potential HWND issues, this project seems to have done some interesting stuff we maybe could use: https://github.com/dzimchuk/power-video-player |
Maybe also do a crossplatform |
For reference https://github.com/unosquare/ffmediaelement Also. |
Of the few options that are listed on this page, none seems to be "awesome":
I'm currently looking if this is possible with SharpDX |
Anything wrong with that? |
https://github.com/Microsoft/WPFDXInterop/blob/master/samples/D3D11Image/WpfD3D11Interop/MainWindow.xaml.cs seems interesting, but I still don't undestand how it is supposed to work, and it links to an inexistant documentation. Specifically, I don't see the difference with the built-in D3DImage.
Performance is the main reason I'd like to avoid that : That would require vlc to write the pictures in the memory, converting them in a C# buffer, writing them to the bitmap that would then be finally rendered on the screen. It feels like there are too many copies involved. |
Using directX in WPF "natively" seems to cause a lot of issues. See: sharpdx/SharpDX#599 (comment) We need performance, and currently, I think the only reasonable way we have is to wrap the WinForms component at the cost of not being able to write above the video and some other event issues. |
Will use this to set the drawable surface.
https://github.com/mfkl/LibVLCSharp/blob/783e104b485931de978eee48d6d22a067d220cab/LibVlcSharp/MediaPlayer.cs#L773
May be of interest:
https://github.com/prasannavl/WinApi
https://msdn.microsoft.com/en-us/library/ms618134
https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/wpf-and-win32-interoperation
We probably should do something very similar to https://github.com/kakone/VLC.MediaElement/blob/master/VLCMediaElement/MediaElement.cs, but move all crossplatform-capable code in a
MediaElementBase
abstract class. Each platform would inherit from that and perform platform-specific initialization (set drawable surface etc)./cc @jeremyVignelles
The text was updated successfully, but these errors were encountered: