[Gambas-user] controlling VLC via a virtual terminal...

Stephen Bungay sbungay at ...981...
Mon Aug 22 01:25:40 CEST 2011


On 08/21/2011 02:12 PM, Benoît Minisini wrote:
>>     Hi folks!
>>        I cant seem to send commands to VLC through it's remote control
>> interface when started using SHELL.
>>
>> Gambas 2.23
>>
>> ShellString = "vlc --intf rc --video-title "&  psPlayerTitle&  " "&
>> psFileName
>> mpProcessHandle = SHELL ShellString FOR READ WRITE AS "VLC"
>>
>>     VLC starts up in remote control mode properly (the app reads the
>> startup messages and prints them so that I can verify remote control
>> interface, so I know it is ready to accept commands.  If it was in a
>> 'real' console one could type 'shutdown', for example (less the quotes
>> of course) and VLC would kill itself. But when I put a button on the
>> form and set a property to the value 'shutdown', then call a sub from
>> the property assignment in order to send the message to the process like
>> this;
>>
>> PRINT #mpProcessHandle, Value
>>
>>     Nothing happens, except that I might start to get lots of binary data
>> streaming into the GAMBAS IDE console pane.
>>
>>     Anyone got any ideas? I can attach the source package (it is small)
>> if anyone would like to take a look.
>>
>> Regards
>> Steve.
>>
> If VLC really needs a virtual terminal, then you must use SHELL ... FOR INPUT
> OUTPUT. And why use SHELL ? You should use EXEC instead.
>
> Regards,
>
   Thanks for that Benoit, I didn't use Exec because I thought I needed 
the capabilities of SHELL. It works, but is slow to get the commands to 
the process, but then this may not be the way to do things, there may be 
a better way.

Kindest Regards
Steve.




More information about the User mailing list