Page 1 of 1

Force VOUT-module to repaint picture

Posted: 28 Jul 2009 16:39
by uj2
Hello!

I'm writing custom application built on top of VLC. Application in essence is pure VLC with OSD interface on top of it. And though this is OSD interface, it is implemented as a "video filter" module (because I'll need to scale video source at some point, but that's another story). Just like the logo filter, in it's "video filter" part. This OSD interface must be able to react to mouse actions, so I implemented this via callbacks with vout_filter_AddChild.

The problem is, my interface is not updated until the next frame arrives. So, when I move mouse, MouseEvent callback receives event on time, but interface is updated in filter's Render method. And when movie is paused, the interface is not updated at all. Funny though. I've tried to save previous frame and forcibly call Render method each time I need to update interface (well I know this is stupid and straightforward), but this just don't work for some reason. So, my question is: how can I forcibly update frame, forcibly "tell" to my vout-filter to repaint the screen?

Re: Force VOUT-module to repaint picture

Posted: 28 Jul 2009 21:10
by Rémi Denis-Courmont
You cannot force the video output to redraw; the function is vout_thread_t.pf_display but its use is totally undefined from outside the internal video output thread. Unfortunately, most video output plugins fail to handle repaint events.

Re: Force VOUT-module to repaint picture

Posted: 29 Jul 2009 06:44
by uj2
But aren't video filters working inside this internal video output thread? I'm trying to call pf_display from the event handler inside my video filter.

Re: Force VOUT-module to repaint picture

Posted: 29 Jul 2009 18:41
by Rémi Denis-Courmont
I don't know video filters much.