[fpc-pascal] re: Cannot run mplayer with TProcess when options is poUsePipes in Windows
Vincent Snijders
vsnijders at vodafonevast.nl
Mon Nov 10 14:42:39 CET 2008
Dusan Halicky schreef:
> Well. The only way how to make mplayer visible is read all data from output
>
> repeat
> i := Output.Read(buf[0],100);
> until i<0;
>
> but since my program is console application, it stay blocked on the
> last read from output and do not continue to application main loop
> None of these are problems on linux, it appears only on windows. Any
> ideas?
>
>
Maybe linux performs a non-blocking read (and returns 0) and windows performs a
blocking read. You can check if there is output using NumBytesAvailable:
http://lazarus-ccr.sourceforge.net/docs/fcl/pipes/tinputpipestream.numbytesavailable.html
Vincent
More information about the fpc-pascal
mailing list