[Lazarus] GStreamer API unit added

Aruna Hewapathirane aruna.hewapathirane at gmail.com
Wed Nov 9 13:22:35 CET 2022


On Wed, Nov 9, 2022 at 3:37 AM Michael Van Canneyt via lazarus <
lazarus at lists.lazarus-ide.org> wrote:

>
>
> 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.
>

Oh.. I did not know this thank you. Yes it opens fine now. Screenshot
attached.
https://pasteboard.co/6vWHLlaCiYc3.png


>
> > 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.
>

I installed gstreamer1.0-dev package and now it compiles.
Compiles and builds playmp3 - screenshot attached.
https://pasteboard.co/Uq4bM35Ykllu.png


But new problem now. I have attached screenshots.

Errors when trying to play a *.mp3 file:
https://pasteboard.co/xK7PNcnRMZa8.png


>
> 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.
> --
> _______________________________________________
> lazarus mailing list
> lazarus at lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus


Thank you for your patience and all the guidance, Aruna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20221109/9a346d2c/attachment.htm>


More information about the lazarus mailing list