Qt Signal as libvlc_callback_t

This forum is about all development around libVLC.
hanss
New Cone
New Cone
Posts: 4
Joined: 23 May 2009 14:35

Qt Signal as libvlc_callback_t

Postby hanss » 23 May 2009 15:02

Hello *,

as rookie in vlc (Qt/C++ as well) trying to get the qt signal/slot functionality to work with the libvlc_event I ask for help.

I use a qt signal "playerChanged(QString)" in "vlcPlayer : public QObject" and want to get it attached to work with libvlc_event.

I've declared a "libvlc_event_manager_t *eventManager" and tried to use "libvlc_event_attach" in the constructor. But the function cannot be converted to libvlc_callback_t.

Can a qt signal be used directly as libvlc_callback_t or how can I connect signal/slot of qt with libvlc_event?

Do I need a separate signal for every libvlc_event_type_t?

Any help is very welcome.

Greetings from Munich
Stefan

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

Re: Qt Signal as libvlc_callback_t

Postby Rémi Denis-Courmont » 23 May 2009 15:53

The prototype for a C++ method to pass as a libvlc_callback_t function is:

Code: Select all

static void callback (const libvlc_event_t *, void *);
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 57 guests