[vlc-devel] What is the significance of the first parameter to var_Create?
robux4 at gmail.com
Tue Jan 3 08:56:29 CET 2017
On Tue, Jan 3, 2017 at 1:42 AM, Peter Tap via vlc-devel
<vlc-devel at videolan.org> wrote:
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> ---------- Forwarded message ----------
> From: Peter Tap <ptrtap at yahoo.com>
> To: Mailing List for VLC Media Player Developers <vlc-devel at videolan.org>
> Date: Tue, 3 Jan 2017 00:39:01 +0000 (UTC)
> Subject: What is the significance of the first parameter to var_Create?
> I need to share a value across various custom modules.
It's possible if they have a common parent or if one module is the
parent of another.
> Looks like var_Create/var_Set/var_Get is the way to go. However, I am not sure about the first parameter to these methods. Is this parameter local to each module? To achieve truly global variable, can I simply pass NULL as the first parameter?
No, a variable is part of a vlc_object_t. There is no global variable
in VLC (or there shouldn't be). If you pass NULL it will crash. You
need to find a common parent and put your variable there.
> Thank you in advance for your help.
More information about the vlc-devel