Hey Peter,<div><br></div><div>I used to have the same problem and found a hackish solution that ofc never should be used in official code, but it is perfect for lab or own usage.</div><div><br></div><div>I wanted to extend the libVLC API with some of my own methods that needed to communicate with my own module. I just used the p_libvlc object's variable space to store this variabels.</div>

<div><br></div><div>Your code should like this:</div><div><br></div><div>//Set a var</div><div>    var_Create(stream->p_libvlc, "variabel_name_1", VLC_VAR_INTEGER);<br></div><div><div>    var_SetInteger(stream->p_libvlc, "variabel_name_1", active);</div>

<div><br></div><div>//get a var</div><div>    return var_InheritInteger(stream->p_libvlc, "variabel_name_1");<br></div><div></div></div><div><br></div><div><br></div><div>I have no idea if this solution is thread safe and stuff like that, like I said, it is a hacksish solution that you shouldn't use in decent code.</div>

<div><br></div><div>Kind regards,</div><div><br></div><div>Thomas Brouckaert</div><div><br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 17, 2012 at 12:30 PM, Peter Tap <span dir="ltr"><<a href="mailto:ptrtap@yahoo.com" target="_blank">ptrtap@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Remi,<br>
<br>
It appears rc.c is making a call to vlc_object_find_name method. However, this method doesn't seem to work anymore. Plus, there is a warning on not to use this API.<br>
<br>
For now, I am using a file-based mechanism to share values between two modules. Wish there was a better way.<br>
<div class="im HOEnZb"><br>
Peter<br>
<br>
<br>
----- Original Message -----<br>
</div><div class="HOEnZb"><div class="h5">From: Peter Tap <<a href="mailto:ptrtap@yahoo.com">ptrtap@yahoo.com</a>><br>
To: Mailing list for VLC media player developers <<a href="mailto:vlc-devel@videolan.org">vlc-devel@videolan.org</a>><br>
Cc:<br>
Sent: Thursday, November 15, 2012 6:19 PM<br>
Subject: Re: [vlc-devel] How to create a field that is accessible by multiple modules<br>
<br>
Remi,<br>
<br>
Thank you for your help.<br>
<br>
I think this is not entirely true. Although each object may have its own independent dictionary, there is some way for others to get/set the values. If you look at gui/qt4, it is able to dynamically build preferences UI by obtaining all the key/values from all the modules. Also, the remote control interface (control/rc.c) has a way to get/set value for any other module's field. You can enter a command "@name marq-x value," for example within the remote control interface and set the "x" position value for marquee control.<br>


<br>
It is just that I am not able to figure out how exactly they are achieving this.<br>
<br>
Regards,<br>
Peter<br>
<br>
<br>
----- Original Message -----<br>
From: Rémi Denis-Courmont <<a href="mailto:remi@remlab.net">remi@remlab.net</a>><br>
><br>
> Can someone please help me understand how I can share the field between<br>
> two different modules?<br>
<br>
You cannot. Each object has its own independent dictionary.<br>
<br>
--<br>
Rémi Denis-Courmont<br>
Sent from my collocated server<br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
<br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
</div></div></blockquote></div><br></div>