Page 1 of 1

render external controls into video output

Posted: 13 Dec 2010 17:43
by devildrey33
Hi, im looking for paint some external controls (play, pause, stop, media list, etc...) directly to video output in windows xp/7.

I have sent some ways reading this forum, but cant decide for the best way.

In first instance i tryed libvlc_video_set_callbacks + libvlc_video_set_format to do this, but cpu usage exceds my expectatives writing output with windows GDI. Can i obtain more speed using direct3d?

If libvlc_video_set_callbacks way is not suficient, the best solution is create a video filter like marq?, or create a video output plugin?, In this case is posible send HDC to plugins so these plugins paint HDC's with alpha in the vout?

Another thing with video filters is when playing only audio, vout is not used and cant show controls during reproduction, any way to display vout always?

Sorry for my poor english, and thanks in advance for your time.

Re: render external controls into video output

Posted: 14 Dec 2010 02:10
by RĂ©mi Denis-Courmont
There are basically two ways to do this.

The traditional way consists of blending YUVA-coded external controls into the video signal with a video filter. Unfortunately, while this is very efficient, this requires control be in the same resolution as the video signal. So the controls may look very ugly, especially if the video has a low resolution.

The modern way consists of drawing the video to an OpenGL (or Direct3D or whatever) surface and overlaying a semi-transparent surface on top using GPU acceleration.


Either way, there is no LibVLC API for this at the moment. So you have to reimplement the whole video output in your application with libvlc_video_set_callbacks(), or patch and extend the LibVLC API for your needs.

Re: render external controls into video output

Posted: 15 Dec 2010 20:33
by devildrey33
Thanks for this info, i will try libvlc_video_set_callbacks again with direct3d stuff.

Re: render external controls into video output

Posted: 09 Jun 2011 14:10
by neonp
Hi,

Did you manage to do so ? I am trying to achieve the same thing : having libvlc_video_set_callbacks with direct3D stuff, but I'm a noob in C. I would like to use this direct3D output to display it in WPF (which has a Direct3D control).

Re: render external controls into video output

Posted: 10 Jun 2011 11:21
by XilasZ
take a look at this wrapper : http://vlcdotnet.codeplex.com/
It has a wpf control to do exactly what you want.

Re: render external controls into video output

Posted: 17 Jun 2011 23:51
by neonp
I already do for the Interop, but Video has tearing when size is maximized. In the mean time, I discovered SlimDX, which enabled me to reproduce what I needed, with an issue when setting chroma to YV12 (see my other post : viewtopic.php?f=32&t=91314)