Page 1 of 1

Qt Signal as libvlc_callback_t

Posted: 23 May 2009 15:02
by hanss
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

Re: Qt Signal as libvlc_callback_t

Posted: 23 May 2009 15:53
by RĂ©mi Denis-Courmont
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 *);