Hi,
Using InteropBitmap is not recommended to display images as video due to memory leaks which can cause BSOD and a lot of memory usage (when you played a video in loop for few hours)... That's why I changed the code of Vlc.DotNet which --I think-- you have inspired.
I can also do unsafe code, but the purpose of Vlc.DotNet is to not have a single line of code unsafe.
Microsoft is preparing a new implementation using DirectX for image rendering in WPF, and I'm waiting to implement it.
Hi,
Yes, I have used Vlc.DotNet in my project(xZune), but I found I can't put any control on Player, so I write a LibVlc wrapper for it(xZune.Vlc).
Then I found it is not easy to use, so I create a control for it(xZune.Vlc.Wpf), I think many people need it for WPF Application, so I make it open-source.
xZune.Vlc is only want to provide a native WPF control, and you can create a Cool Player Application with WPF.
Also xZune.Vlc is not perfect, it has many problem about Multi-thread, play control and deadlock.
In early version of xZune.Vlc, stop media is not a easy work, and it will case deadlock in sometime, it is still not perfect now, you must use it by those code:
Code: Select all
Player.BeginStop(() =>
{
// After stop.
});
But xZune.Vlc have solved some flaw of LibVlc, like: interactive with DVD menu when you play video with video callback (
#5), DAR and SAR error with some video (
#32).
About InteropBitmap, I have test it, I play a video(1920x1080 H.264 AAC) loop in two hours, this is memory usage log:
02:03 AM - 188.3MB
02:35 AM - 179.2MB
02:51 AM - 148.7MB
03:13 AM - 146.4MB
03:34 AM - 149.9MB
03:46 AM - 163.8MB
04:10 AM - 162.1MB
04:14 AM - 156.1MB
04:19 AM - 149.2MB
I think it is in the acceptable range, at present. I will continue test it in next day.
Thank you.
-----------
New test result:
15:42 PM - 151.4MB
20:18 PM - 163.1MB
21:39 PM - 166.7MB