<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Brilliant. Thank you very much for your help.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span>Regards,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span>Peter</span></div><div><br></div>  <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <font
 size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Thomas Brouckaert <thomasbrouckaert@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Mailing list for VLC media player developers <vlc-devel@videolan.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Saturday, November 17, 2012 4:07 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [vlc-devel] How to create a field that is accessible by multiple modules<br> </font> </div> <br>
<meta http-equiv="x-dns-prefetch-control" content="off"><div id="yiv1570427964">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="yiv1570427964gmail_extra"><br><br><div class="yiv1570427964gmail_quote">On Sat, Nov 17, 2012 at 12:30 PM, Peter Tap <span dir="ltr"><<a rel="nofollow" ymailto="mailto:ptrtap@yahoo.com" target="_blank" href="mailto:ptrtap@yahoo.com">ptrtap@yahoo.com</a>></span> wrote:<br><blockquote class="yiv1570427964gmail_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="yiv1570427964im yiv1570427964HOEnZb"><br>
Peter<br>
<br>
<br>
----- Original Message -----<br>
</div><div class="yiv1570427964HOEnZb"><div class="yiv1570427964h5">From: Peter Tap <<a rel="nofollow" ymailto="mailto:ptrtap@yahoo.com" target="_blank" href="mailto:ptrtap@yahoo.com">ptrtap@yahoo.com</a>><br>
To: Mailing list for VLC media player developers <<a rel="nofollow" ymailto="mailto:vlc-devel@videolan.org" target="_blank" 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 rel="nofollow" ymailto="mailto:remi@remlab.net" target="_blank" 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>
http://mailman.videolan.org/listinfo/vlc-devel<br>
<br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a rel="nofollow" target="_blank" href="http://mailman.videolan.org/listinfo/vlc-devel">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a rel="nofollow" target="_blank" href="http://mailman.videolan.org/listinfo/vlc-devel">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
</div></div></blockquote></div><br></div>
</div><meta http-equiv="x-dns-prefetch-control" content="on"><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> </div> </div>  </div></body></html>