[vlc-devel] How to register for status change notifications?

Peter Tap ptrtap at yahoo.com
Thu Dec 6 10:32:41 CET 2012


Hi Remi,

Thank you for your help.

I did look at control/rc.c. It seems to add callback for "intf-event" variable.

In my module, which is a video filter, I tried to add the callback

static int Open(vlc_object_t *p_this) {
    filter_t *p_filter = (filter_t *)p_this;

    var_AddCallback(p_filter, "intf-event", InputEvent, NULL);

    ...
}

However, I get an warning "Failed to add callback for a non-existing variable intf-event."

It seems filter_t type of object is probably not the right type of object to pass to var_AddCallback.

Looking at other examples, I tried getting a playlist_t instance:
      playlist_t* p_playlist = pl_Get(p_filter);

However, the returned object is NULL.

I would appreciate it if you could provide a little bit more insight on how to handle this. 

Regards,
Peter




----- Original Message -----
From: Rémi Denis-Courmont <remi at remlab.net>
To: Mailing list for VLC media player developers <vlc-devel at videolan.org>
Cc: 
Sent: Wednesday, December 5, 2012 1:37 AM
Subject: Re: [vlc-devel] How to register for status change notifications?

On Wed, 5 Dec 2012 01:31:04 -0800 (PST), Peter Tap <ptrtap at yahoo.com>
wrote:
> 1. Is there a "status change" global variable that I can register a
> callback for and get status change notifications?

There are plenty of examples in control, notify and gui plugins.

> 2. Which category will the new module fall in? CAT_INTERFACE?

Irrelevant.

-- 
Rémi Denis-Courmont
Sent from my collocated server
_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
http://mailman.videolan.org/listinfo/vlc-devel




More information about the vlc-devel mailing list