[vlc-devel] [vlc-commits] Add lua console handling code for windows.
Rémi Denis-Courmont
remi at remlab.net
Wed Feb 8 13:14:45 CET 2012
On Wed, 8 Feb 2012 12:34:24 +0100, Antoine Cellerier
<dionoea at videolan.org>
wrote:
> On Wed, Feb 08, 2012, Rémi Denis-Courmont wrote:
>> On Wed, 08 Feb 2012 11:47:13 +0100, Rémi Denis-Courmont
>> <remi at remlab.net>
>> wrote:
>> >> This fixes the lua command line interface under windows. Adding all
>> >> those special cases in the host abstraction layer doesn't seem
optimal
>> >> but at least it works. I'll probably try cleaning it up later.
>>
>> And Windows-specific code in LUA script is not acceptable either
IMNSHO.
>
> Timeouts are unfortunately required to have working concurrent socket
> based and console interfaces on Windows.
Then don't make them concurrent! I do not see any fundamental need for
concurrent command line and sockets in a singleinterface instance.
I can conceive that parsing the command line is easier with Lua than C.
But I think the I/O should have remained C code. Merging console and socket
I/O on Linux was already a bit hackish (on old RC). Obviously, it does not
work on Windows at all.
> If there were a clean solution I'd gladly use it. There isn't.
Time-outs ostracism is not my political invention. VLC inherits it from
Linux. Linux inherits it from the chipsets vendors. This principle is true
at least for x86 and ARM, the same platform that Windows runs on. So I find
it hard to believe that Windows would not have a clean event dispatching
system to avoid polling timeouts.
> Now if people don't care that the lua command line interface
> doesn't work on Windows I can just revert this commit ...
> but please stop bitching about the fact that it doesn't work
> on windows (that wasn't aimed at you Rémi).
> Just to be clear:
> Socket only mode or unix with console of course does not use any
timeout.
Maybe. But the timeouts are exposed to Lua, and Lua gets some Windows only
code. This is not a good example, nor a good design. As a matter of fact, I
have not had much help with event handling ever since Zorglub left.
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list