[Lazarus] LclVLC usage questions for switching from PasLibVLC

Sven Barth pascaldragon at googlemail.com
Mon Nov 20 18:27:03 CET 2023

Bo Berglund via lazarus <lazarus at lists.lazarus-ide.org> schrieb am Mo., 20.
Nov. 2023, 15:09:

> On Sun, 19 Nov 2023 14:50:34 +0100, Bo Berglund via lazarus
> <lazarus at lists.lazarus-ide.org> wrote:
> >Lazarus contains LibVLC as a standard package available to be installed
> in the
> >GUI using Package/Install-remove packages! No download needed from
> external
> >sources!
> >Anyway, I have been experimenting with the example inside the package
> code and
> >also read Michael's document "Displaying video files using Free Pascal and
> >Lazarus".
> >
> >I think I can switch out PasLibVLC and replace it with the LclVLC player
> instead
> >but I need some help in implementation.
> >
> >There are some functions I would like to get hints on how to implement:
> >
> >1) Progressbar update
> >---------------------
> --------------------
> I added a TThread.Create... statement as I found in the document, without
> really
> understanding how it can help. Seems to me like creating a thread that
> immediately exits. What can that do?

It ensures that the RTL is multi threading aware, cause as long as no
Pascal thread is started (which is the case for many programs) some
shortcuts are taken by not using locks and such. However if you use an
external library that starts non-Pascal threads that then call into the
Pascal code things might go wrong due to this. Thus creating an empty
thread will ensure that all locks are properly in place.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20231120/6d27807b/attachment.htm>

More information about the lazarus mailing list