<span style="FONT-SIZE: 150%; LINE-HEIGHT: 116%">Hi I am implementing a new button function. Thanks to the help of the forum&#39;s people I have been able to show the button beside the PLAY button. Now I was finding out how to run this funtion but I am not a so good programmer for this issues and I am not able to understand how is working. Looking around I saw some codes about the buttons and the change of variables.<br>
<br>Let me show what Iīve done and explain what I would like to do if anyone could help.<br><br>I have modified the file &quot;ts.c&quot; in /modules/mux/mpeg folder. In this file I have attached some funtions to stream a new PSI table and new boolean variables. Now I am trying to change the value of a boolean variable through the button before I have told:</span><br>
<br><span style="FONT-STYLE: italic">add_bool( SOUT_CFG_PREFIX &quot;enable-HAT&quot;, 0, NULL, HAT_TEXT, HAT_LONGTEXT, VLC_TRUE);<br>[...]<br>static const char *ppsz_sout_options[] = {<br>&quot;pid-video&quot;, &quot;pid-audio&quot;, &quot;pid-spu&quot;, &quot;pid-pmt&quot;, &quot;tsid&quot;, &quot;netid&quot;,<br>
&quot;es-id-pid&quot;, &quot;shaping&quot;, &quot;pcr&quot;, &quot;bmin&quot;, &quot;bmax&quot;, &quot;use-key-frames&quot;,<br>&quot;dts-delay&quot;, &quot;csa-ck&quot;, &quot;csa-pkt&quot;, &quot;crypt-audio&quot;, &quot;crypt-video&quot;,<br>
&quot;muxpmt&quot;, &quot;sdtdesc&quot;, &quot;program-pmt&quot;, &quot;alignment&quot;,<span style="FONT-WEIGHT: bold"> &quot;enable-HAT&quot;</span>,<br>&quot;numpmt-f&quot; , &quot;pidpmt-f&quot; , &quot;numpmt-s&quot; , &quot;pidpmt-s&quot;,<br>
NULL<br>};</span><br><br><span style="FONT-SIZE: 150%; LINE-HEIGHT: 116%">The boolean &quot;enable-Hat&quot; appears in the MUX funtion in the file &quot;ts.c&quot;. With the first two lines I want to receive the order from the button which I will explain afterwars his code:</span><br>
<br><span style="FONT-STYLE: italic">sout_instance_t *pa_mux = (sout_instance_t *)p_mux-&gt;parent;<br>[...]<br>p_sys-&gt;enhat = var_CreateGetBool( pa_mux, SOUT_CFG_PREFIX &quot;enable-HAT&quot; );<br>if(p_sys-&gt;enhat)<br>
{<br>GetHAT( p_mux, &amp;chain_ts );<br>}</span><br><br><span style="FONT-SIZE: 150%; LINE-HEIGHT: 116%">In the &quot;interface.cpp&quot; file in /modules/gui/wxwidgets I have modified the code to show the button and itīs done properly. The problem is the code to change the boolean said backwards. The code is the next:</span><br>
<br><span style="FONT-STYLE: italic">void Interface::OnDecodeHAT( wxCommandEvent&amp; WXUNUSED(event) )<br>{<br>DecodeHAT();<br>}<br><br>void Interface::DecodeHAT()<br>{<br>sout_instance_t *p_mux = (sout_instance_t *)vlc_object_find(p_intf, VLC_OBJECT_SOUT, FIND_ANYWHERE);<br>
if( p_mux = NULL )<br>{<br>msg_Warn(p_intf, &quot;Object not found&quot;);<br>return;<br>}<br>var_SetBool(p_mux, &quot;enable-HAT&quot;, VLC_TRUE);<br><br>vlc_object_release( p_mux );<br>}</span><br><br><span style="FONT-SIZE: 150%; LINE-HEIGHT: 116%">But the make give the error:interface.cpp:1095:error:invalid use of undefined type &#39;struct sout_instance_t&#39;, the line referred to varSetBool... And the same for the line 1097, the line vlc_object_release...</span><br>
<br><span style="FONT-SIZE: 150%; LINE-HEIGHT: 116%">Now I donīt know what to do as I feel little lost. I&#39;m aware the message is a little large but there is none who can help me aside the forum people. If anyone could aid me to learn how doing it I would be very grateful.<br>
Thanks and regards </span>