render external controls into video output

This forum is about all development around libVLC.
devildrey33
Blank Cone
Blank Cone
Posts: 11
Joined: 07 Dec 2010 17:06
Operating System: Windows & Linux
Location: Spain

render external controls into video output

Postby devildrey33 » 13 Dec 2010 17:43

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.
http://www.devildrey33.es

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: render external controls into video output

Postby Rémi Denis-Courmont » 14 Dec 2010 02:10

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

devildrey33
Blank Cone
Blank Cone
Posts: 11
Joined: 07 Dec 2010 17:06
Operating System: Windows & Linux
Location: Spain

Re: render external controls into video output

Postby devildrey33 » 15 Dec 2010 20:33

Thanks for this info, i will try libvlc_video_set_callbacks again with direct3d stuff.
http://www.devildrey33.es

neonp
Blank Cone
Blank Cone
Posts: 20
Joined: 09 Jun 2011 14:07
VLC version: 2.2.0
Operating System: Raspbian/jessie
Location: Mulhouse, France

Re: render external controls into video output

Postby neonp » 09 Jun 2011 14:10

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).

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: render external controls into video output

Postby XilasZ » 10 Jun 2011 11:21

take a look at this wrapper : http://vlcdotnet.codeplex.com/
It has a wpf control to do exactly what you want.

neonp
Blank Cone
Blank Cone
Posts: 20
Joined: 09 Jun 2011 14:07
VLC version: 2.2.0
Operating System: Raspbian/jessie
Location: Mulhouse, France

Re: render external controls into video output

Postby neonp » 17 Jun 2011 23:51

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)


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 14 guests