Re: [Lazarus] GStreamer API unit added

2022-11-09 Thread Michael Van Canneyt via lazarus




On Wed, 9 Nov 2022, Aruna Hewapathirane wrote:


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


That's an error of gstreamer itself.

At first sight I would say that you are not using pulseaudio on your system,
since it seems gstreamer cannot connect to the pulseaudio streamer.

Try changing "pulsesink" with "osssink" or "alsasink" in the gst_parse_launch 
call.

If none of those help, I'm also at a loss: I am not a gstreamer expert...

Michael.
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] GStreamer API unit added

2022-11-09 Thread Aruna Hewapathirane via lazarus
On Wed, Nov 9, 2022 at 3:37 AM Michael Van Canneyt via lazarus <
lazarus@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@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@lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus


Thank you for your patience and all the guidance, Aruna
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] GStreamer API unit added

2022-11-09 Thread Aruna Hewapathirane via lazarus
On Wed, Nov 9, 2022 at 2:34 AM Luca Olivetti via lazarus <
lazarus@lists.lazarus-ide.org> wrote:

> El 9/11/22 a les 3:06, Aruna Hewapathirane via lazarus ha escrit:
> > This time it tries to link but dies saying can't find : /usr/bin/ld.bfd:
> > cannot find -lgstreamer-1.0
>
>
> In debian/ubuntu based distributions you'll have to install the
> libgstreamer1.0-dev package:
>
> $ apt-file search libgstreamer-1.0
> libgstreamer1.0-0: /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
> libgstreamer1.0-0: /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1404.0
> libgstreamer1.0-0: /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1602.0
> libgstreamer1.0-0: /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1603.0
> libgstreamer1.0-dev: /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so
> libgstreamer1.0-dev:
> /usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/
> libgstreamer-1.0.so.0.1602.0-gdb.py
> libgstreamer1.0-dev:
> /usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/
> libgstreamer-1.0.so.0.1603.0-gdb.py
>
>
> Bye
> --
> Luca Olivetti
> Wetron Automation Technology http://www.wetron.es/
> Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007
>

Ahhh.. ofcourse.. thank you Luca.
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] GStreamer API unit added

2022-11-09 Thread Michael Van Canneyt via lazarus




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


Re: [Lazarus] GStreamer API unit added

2022-11-08 Thread Luca Olivetti via lazarus

El 9/11/22 a les 3:06, Aruna Hewapathirane via lazarus ha escrit:
This time it tries to link but dies saying can't find : /usr/bin/ld.bfd: 
cannot find -lgstreamer-1.0



In debian/ubuntu based distributions you'll have to install the 
libgstreamer1.0-dev package:


$ apt-file search libgstreamer-1.0
libgstreamer1.0-0: /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
libgstreamer1.0-0: /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1404.0
libgstreamer1.0-0: /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1602.0
libgstreamer1.0-0: /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1603.0
libgstreamer1.0-dev: /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so
libgstreamer1.0-dev: 
/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1602.0-gdb.py
libgstreamer1.0-dev: 
/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1603.0-gdb.py



Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] GStreamer API unit added

2022-11-08 Thread Aruna Hewapathirane via lazarus
On Tue, Nov 8, 2022 at 2:00 AM Michael Van Canneyt via lazarus <
lazarus@lists.lazarus-ide.org> wrote:

>
>
> On Mon, 7 Nov 2022, Aruna Hewapathirane wrote:
>
> > Hi Michael,
> >
> > Many thanks for the link. I have a few more questions please? I am
> running
> > FPC 3.2.0
> > and Lazarus 2.0.10 how do I get your gstreamer code into my installation?
> > What is the
> > preferred or best way to do this? It is my first time so apologies if
> this
> > is a silly question.
>
> In your case, I would recommend simply to copy the units into your project
> folder.
>
> Alternatively, copy them to some folder on your harddisk, and add this
> folder to the unit path in the "project options" dialog in Lazarus.
> The compiler will then find them.
>
> Michael.
>

Hello Michael,

I tried to get things working but had problems with the IDE I have attached
as screenshot.
https://pasteboard.co/xc64IUDOYVBb.png

Then I tried to see if I can get it going on the command line but trouble
again, screenshot attached.
https://pasteboard.co/dHxckB8iMPxh.png

See below for details please:
--
aruna@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

-
So I changed the -1 to a 0 in line 48,95 and tried again
-

aruna@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
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
aruna@debian:/media/aruna/linux-next/home/lazarus/gstreamer/example$

This time it tries to link but dies saying can't find : /usr/bin/ld.bfd:
cannot find -lgstreamer-1.0

Now what? I will keep trying different things...

Thanks, Aruna
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] GStreamer API unit added

2022-11-08 Thread Aruna Hewapathirane via lazarus
On Tue, Nov 8, 2022 at 2:00 AM Michael Van Canneyt via lazarus <
lazarus@lists.lazarus-ide.org> wrote:

>
>
> On Mon, 7 Nov 2022, Aruna Hewapathirane wrote:
>
> > Hi Michael,
> >
> > Many thanks for the link. I have a few more questions please? I am
> running
> > FPC 3.2.0
> > and Lazarus 2.0.10 how do I get your gstreamer code into my installation?
> > What is the
> > preferred or best way to do this? It is my first time so apologies if
> this
> > is a silly question.
>
> In your case, I would recommend simply to copy the units into your project
> folder.
>

Understood and will do so. Many thanks!

>
> Alternatively, copy them to some folder on your harddisk, and add this
> folder to the unit path in the "project options" dialog in Lazarus.
> The compiler will then find them.
>

Again understood and will try both methods. Thank you :-)


>
> Michael.
> --
> ___
> lazarus mailing list
> lazarus@lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus
>
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] GStreamer API unit added

2022-11-07 Thread Michael Van Canneyt via lazarus




On Mon, 7 Nov 2022, Aruna Hewapathirane wrote:


Hi Michael,

Many thanks for the link. I have a few more questions please? I am running
FPC 3.2.0
and Lazarus 2.0.10 how do I get your gstreamer code into my installation?
What is the
preferred or best way to do this? It is my first time so apologies if this
is a silly question.


In your case, I would recommend simply to copy the units into your project
folder.

Alternatively, copy them to some folder on your harddisk, and add this
folder to the unit path in the "project options" dialog in Lazarus. 
The compiler will then find them.


Michael.
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] GStreamer API unit added

2022-11-07 Thread Aruna Hewapathirane via lazarus
Hi Michael,

Many thanks for the link. I have a few more questions please? I am running
FPC 3.2.0
and Lazarus 2.0.10 how do I get your gstreamer code into my installation?
What is the
preferred or best way to do this? It is my first time so apologies if this
is a silly question.

Many thanks once again for your help.

Aruna

On Mon, Nov 7, 2022 at 2:14 AM Michael Van Canneyt via lazarus <
lazarus@lists.lazarus-ide.org> wrote:

>
> Hello,
>
> Yes, see here:
>
> https://gitlab.com/freepascal.org/fpc/source/-/tree/main/packages/gstreamer
>
> Michael.
>
> On Sun, 6 Nov 2022, Aruna Hewapathirane wrote:
>
> > Hello Michael,
> >
> > I would be very interested in this. Is there a link to the source and the
> > example code please?
> >
> > Thanks - Aruna
> >
> > On Tue, Nov 1, 2022 at 6:45 AM Michael Van Canneyt via lazarus <
> > lazarus@lists.lazarus-ide.org> wrote:
> >
> >>
> >> Hello,
> >>
> >> For all people interested in sound/video streaming:
> >>
> >> After lots of work, I added the gst unit to the FPC packages.
> >> This unit contains the import declarations for the full libgstreamer-1.0
> >> API.
> >> I didn't translate all C macros, but if you need some which I didn't
> >> translate, let me know and I will add them.
> >>
> >> For those that are not in the know:
> >> gstreamer is a powerful audio/video stream system, used on most modern
> >> linux
> >> distributions (it may be available on mac/windows, but I didn't test
> >> those).
> >>
> >> I have also added a simple demo, that shows how to play a mp3 file.
> >>
> >> I'm not an expert in sound/video streams, so if someone can contribute a
> >> more elaborate example, it would be most welcome :)
> >>
> >> Enjoy,
> >>
> >> Michael.
> >> --
> >> ___
> >> lazarus mailing list
> >> lazarus@lists.lazarus-ide.org
> >> https://lists.lazarus-ide.org/listinfo/lazarus
> >>
> >
> --
> ___
> lazarus mailing list
> lazarus@lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus
>
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] GStreamer API unit added

2022-11-06 Thread Michael Van Canneyt via lazarus



Hello,

Yes, see here:

https://gitlab.com/freepascal.org/fpc/source/-/tree/main/packages/gstreamer

Michael.

On Sun, 6 Nov 2022, Aruna Hewapathirane wrote:


Hello Michael,

I would be very interested in this. Is there a link to the source and the
example code please?

Thanks - Aruna

On Tue, Nov 1, 2022 at 6:45 AM Michael Van Canneyt via lazarus <
lazarus@lists.lazarus-ide.org> wrote:



Hello,

For all people interested in sound/video streaming:

After lots of work, I added the gst unit to the FPC packages.
This unit contains the import declarations for the full libgstreamer-1.0
API.
I didn't translate all C macros, but if you need some which I didn't
translate, let me know and I will add them.

For those that are not in the know:
gstreamer is a powerful audio/video stream system, used on most modern
linux
distributions (it may be available on mac/windows, but I didn't test
those).

I have also added a simple demo, that shows how to play a mp3 file.

I'm not an expert in sound/video streams, so if someone can contribute a
more elaborate example, it would be most welcome :)

Enjoy,

Michael.
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus




--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] GStreamer API unit added

2022-11-06 Thread Aruna Hewapathirane via lazarus
Hello Michael,

I would be very interested in this. Is there a link to the source and the
example code please?

Thanks - Aruna

On Tue, Nov 1, 2022 at 6:45 AM Michael Van Canneyt via lazarus <
lazarus@lists.lazarus-ide.org> wrote:

>
> Hello,
>
> For all people interested in sound/video streaming:
>
> After lots of work, I added the gst unit to the FPC packages.
> This unit contains the import declarations for the full libgstreamer-1.0
> API.
> I didn't translate all C macros, but if you need some which I didn't
> translate, let me know and I will add them.
>
> For those that are not in the know:
> gstreamer is a powerful audio/video stream system, used on most modern
> linux
> distributions (it may be available on mac/windows, but I didn't test
> those).
>
> I have also added a simple demo, that shows how to play a mp3 file.
>
> I'm not an expert in sound/video streams, so if someone can contribute a
> more elaborate example, it would be most welcome :)
>
> Enjoy,
>
> Michael.
> --
> ___
> lazarus mailing list
> lazarus@lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus
>
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus