[Lazarus] How to use RunCommandIndir() in a thread?

Bo Berglund bo.berglund at gmail.com
Tue Apr 16 19:17:11 CEST 2019


On Tue, 16 Apr 2019 12:49:02 +0800, Michael Thompson via lazarus
<lazarus at lists.lazarus-ide.org> wrote:

>Sorry for not replying earlier, I'm under the pump at work.

Don't be sorry! This is a peer-to-peer list AFAIK and anyone can pop
in at their leisure. Noone is *required* to comment.
But thanks for your comments!

I have added a video recoding function to my existing non-threaded
application now. And as I feared it is not very good because it
disappears out into nothing-land for 5 minutes when it recodes a 5
minute test video.
Looks like ffmpeg is actually "playing" the video at normal speed and
saving a modified stream to the file.
So it would be 45 minutes to recode a 45 min video with the wrong
codec to begin with...

So I will try my hand at using the hints from the article I linked to
in order to have some user feedback. Maybe just write a period to the
console every second and add a linefeed and the time in minutes every
minute.
This way the user can see something is happening at least.
But it requires me to run the actual process in a separate thread of
course.

-- 
Bo Berglund
Developer in Sweden



More information about the lazarus mailing list