ReadProgramError()
Posted: Thu Dec 27, 2007 3:00 pm
Hi,
I have a little problem with ReadProgramError(). I am running FFMpeg like this:
and i need to collect the output and parse it. FFMpeg doesn't write on stdout, only on stderr. All is ok so far. Then, i use this in my code:
The code works, with the exception that ReadProgramError freezes the window (like it never had a message loop) and it returns nothing! After the program ends, it returns all the output in just one string. This is wrong, since i need to read the output in realtime so I can calculate the progress and show it, but all i get is "" and at the end I get all the lines concatenated in only 1 string. Something makes ReadProgramError not to return after it reads the output.
Is there any way of fixing this?
[Edit]
On windows, the above lines work perfectly.
[Later edit]
I changed a bit the progrm flow and now it seems to work. I had to remove the resizing code, otherwise it won't process the window messages.
I have a little problem with ReadProgramError(). I am running FFMpeg like this:
Code: Select all
FFHandle = RunProgram(FFMPEG,CmdLine,CurrentDir,#PB_Program_Error|#PB_Program_Open|#PB_Program_Hide)Code: Select all
While ProgramRunning(FFHandle)
Event = WaitWindowEvent()
;
Err.s = ReadProgramError(FFHandle)
If Err <> ""
;
Debug Err
;
;AddStatusLine("FFMpeg -> "+Err)
EndIf
WendIs there any way of fixing this?
[Edit]
On windows, the above lines work perfectly.
[Later edit]
I changed a bit the progrm flow and now it seems to work. I had to remove the resizing code, otherwise it won't process the window messages.