Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Rewrite the Wpf control and version bump to 3.0.0 #365

Merged
merged 7 commits into from
Jan 20, 2018

Conversation

jeremyVignelles
Copy link
Collaborator

@jeremyVignelles jeremyVignelles commented Jan 1, 2018

Motivation

There are many Wpf bugs that are caused by the airspace issue #296 .

The Wpf control as it is now is just a wrapper around the WinForms control, which can be easily reproduced.

User are asking for a Wpf control that is not dependant on a WinForms component ( see #249 ).

Options that were available

Keep things as-is

Not a good option in my opinion, because many issues would have been left unanswered.

Try to use DirectX

Wpf is based on DirectX, it seemed to be a good option at first. However, using DirectX from WPF is really hard and suffers from too many bugs ( see sharpdx/SharpDX#599 (comment) ) . Most of the time, people are suggesting to use WinForms to use DirectX with best performance, but that would bring us no gain over the "keep as-is" method.

Moreover, things are not ready in libvlc to use DirectX from outside in the classic build (winrt build are available, but not really applicable for us...)

Using a Wpf bitmap

This is the solution that have been chosen. Warnings are there in the libvlc documentation to discourage the use of this method, because there is a copy of buffers involved, which slows down the rendering and consumes more resources.

However, this is a technique that have been used in older version of Vlc.DotNet and in other bindings like Meta.Vlc. It provides a good experience for WPF developpers, since an ImageSource can be used in a ImageBrush and painted everywhere !

If performance is critical, it is still possible to use the WinForms control in WPF.

What needs to be done

  • Implement the Wpf control
  • Make the "default" Wpf control and the ImageSource two separate things (one may want to use it without displaying the full video)
  • Add the ability to pass mouse events to libvlc : not possible with current version of libvlc (3.0.0).
  • Make sure that the API is correct for most of the use cases : Looks correct to me, we'll see in develop
  • Update documentation
  • Explain how to choose a Wpf component ( WPF for better UX, WinForms for performance )

@jeremyVignelles jeremyVignelles merged commit 516cca3 into ZeBobo5:develop Jan 20, 2018
@jeremyVignelles jeremyVignelles deleted the feature/wpf branch January 20, 2018 14:23
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant