[Lazarus] GStreamer API unit added

Michael Van Canneyt michael at freepascal.org
Wed Nov 9 09:37:15 CET 2022



On Tue, 8 Nov 2022, Aruna Hewapathirane wrote:

>>
> Hello Michael,
>
> I tried to get things working but had problems with the IDE I have attached
> screenshots.

It seems you opened the .lpi file as a pascal file using the file - open
menu ?

A .lpi file must be opened with project - open menu.


> Then I tried to see if I can get it going on the commandline but trouble
> again, see below please.
>
> aruna at debian:/media/aruna/linux-next/home/lazarus/gstreamer/example$ fpc
> playmp3
> Free Pascal Compiler version 3.2.0+dfsg-12 [2021/01/25] for x86_64
> Copyright (c) 1993-2020 by Florian Klaempfl and others
> Target OS: Linux for x86-64
> Compiling playmp3.pp
> playmp3.pp(48,95) Warning: range check error while evaluating constants (-1
> must be between 0 and 18446744073709551615)
> Linking playmp3
> /usr/bin/ld.bfd: cannot find -lgstreamer-1.0
> Error: Error while linking
> Fatal: There were 1 errors compiling module, stopping
> Fatal: Compilation aborted
> Error: /usr/bin/ppcx64 returned an error exitcode
>

This is a typical error when you do not have the gstreamer1-0-dev package
installed.

normally,

sudo apt-get install libgstreamer1.0-dev

will fix this.

Alternatively, you can try to change the code

   gstreamerlib = 'libgstreamer-1.0'; {Setup as you need}

to

   gstreamerlib = 'libgstreamer-1.0.so.0'; {Setup as you need}


Michael.


More information about the lazarus mailing list