[MPlayer-cygwin] mplayer slave mode on win32

Sascha Sommer saschasommer at freenet.de
Fri Aug 13 15:53:55 CEST 2004


On Friday 13 August 2004 10:46, Anton Ragnarsson wrote:
> Hi all!
>
> I've been trying to use the win32 version of mplayer in slave mode,
> but with little success. It works when writing commands manually
> in the console, but not when sending to stdin via a pipe (i.e popen or
> CreateProcess).
>
> Anyway, I looked in the source code and found that the function
> mp_input_win32_slave_cmd_func() in osdep/getch2-win.c was
> a bit "weird". It directly reads input events from the console instead of
> treating stdin as a file. So I changed it into:
>

I did not know there is something like PeekNamedPiped.
Could you please also make a small test app that starts playback in slave mode
waits a few seconds and then sends a pause command?
I tryed with popen and CreateProcess but I still could not get it to work.

Also note that in your code you have to check if retval> size before reading 
cause there is a potential buffer overflow there.

Sascha




More information about the MPlayer-cygwin mailing list