[fpc-pascal] Cannot run mplayer with TProcess when options is poUsePipes in Windows

Vincent Snijders vsnijders at vodafonevast.nl
Mon Nov 10 11:03:46 CET 2008


Dusan Halicky schreef:
> Following code works in linux, but not in windows. In windows program
> freeze, or I don't see mplayer. Thanks.
> 
> program bug;
> 
> {$mode objfpc}{$H+}
> 
> uses
>   Classes, SysUtils, Process;
> 
> begin
>   with TProcess.Create(nil) do
>   try
>     //Options := [];            // this work on both Windows and Linux
>     Options := [poUsePipes];  // this doesn't work in Windows but works in Linux
>     CommandLine := 'mplayer -slave -quiet final.avi';
>     Execute;
>     writeln('press enter to exit');
>     readln;
>   finally
>     Free;
>   end;
> end.

Maybe you need to add poNoConsole?

Vincent



More information about the fpc-pascal mailing list