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

Bo Berglund bo.berglund at gmail.com
Mon Apr 15 00:59:16 CEST 2019


I havr written a wrapper for some ffmpeg functions to make them easier
to work with.
However, some of the functions are rather longish so the GUI
application gets unresponsive...
I would like to fix this perhaps by running the commands inside a
thread, but I don't really know how that can be done...
RunCommandIndir() is a command line interface I use to start ffmpeg
with selected arguments.
I would like to implement some solution that puts the
RunCommandIndir() call into a thread so the main application could for
instance show a running clock and have a button to interrupt the task
if it turns out to be too long.
Any suggestions on how to do this?`
Or is there already a threaded version of RunCommandIndir() somewhere?

I use Fpc 3.0.4 and Lazarus 2.0.0 on Windows 7 and Ubuntu Linux to
compile for both environments.


-- 
Bo Berglund
Developer in Sweden



More information about the lazarus mailing list