Force VOUT-module to repaint picture

This forum is about all development around libVLC.
uj2
Blank Cone
Blank Cone
Posts: 11
Joined: 28 Jul 2009 16:28

Force VOUT-module to repaint picture

Postby uj2 » 28 Jul 2009 16:39

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?

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

Re: Force VOUT-module to repaint picture

Postby Rémi Denis-Courmont » 28 Jul 2009 21:10

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

uj2
Blank Cone
Blank Cone
Posts: 11
Joined: 28 Jul 2009 16:28

Re: Force VOUT-module to repaint picture

Postby uj2 » 29 Jul 2009 06:44

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.

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

Re: Force VOUT-module to repaint picture

Postby Rémi Denis-Courmont » 29 Jul 2009 18:41

I don't know video filters much.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 62 guests