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] SQLDBRestBridge

2022-11-08 Thread duilio foschi via lazarus
I am puzzled by TMS Software.

1. there is one demo specific for  SQLDBRestBridge, but the
application is obviously bugged, as you see from the following
screenshot
https://i.ibb.co/m4wVGtM/2.jpg

as a start, the code for the login and logout button is the same, what cannot be

2. the support will deny even under torture the idea that TMS code can
have bugs. The fault is always yours. You did not read the manual
carefully (666 pages) or did not study CORS carefully or have
knowledge gaps. All true in my case... but I can see a bug when I meet
one :)

3. in the end, they will suggest you buy their bridge solution, called
XData, as they cannot waste their time with a bridge server they did
not write (verbatim) :)

Probably (I reckon) they are not very interested in the Lazarus
market, as they gain most income from the Delphi market.

As a matter of fact, I find their support not helpful at all. They
dont help you to solve your problem: they will deny that a problem
exists or will pretend that you will be able to solve your problem
after a few months' study of technical documentation :)

I bought TMS Web Core months ago with the idea of quickly write web
applications in Lazarus, with a special aim at their
TWebGridComponent, but I can say today that it was no wise purchase :)

Thank you

Peppe



On Tue, Nov 8, 2022 at 7:56 AM Michael Van Canneyt via lazarus
 wrote:
>
>
>
> On Mon, 7 Nov 2022, duilio foschi wrote:
>
> > I fixed the code in Lazarus and got a client based on BufDataClient
> > that successfully talks with a restbridge server.
> >
> > As a next step, I'd like to connect to the same server from a TWebForm
> > of TMS Web Core library.
>
> Normally, TMS Web Core contains a dataset component that handles SQLDBRest
> connections?.
>
> I wrote it myself for them.
>
> >
> > I started with a slow step. There is only a TWebHttpRequest in the
> > form (which has the same functions of a TFPHTTPClient) and it issues a
> > GET to URL
> > http://localhost:3000/metadata/?fmt=json&humanreadable=0
> >
> > This command works ok in the windows client.
> >
> > Here, I get the errors shown in pic
> > https://i.ibb.co/dpsjfQQ/1.jpg
> >
> > The message (a CORS error) is attached below.
>
> Aaaahhh... Welcome to CORS hell... :/
>
> >
> > Weird enough, the message is there even after changing the server code
> > in this way:
> >
> > original code:
> >   
> > FDisp.DispatchOptions:=FDisp.DispatchOptions+[rdoCustomView,rdoHandleCORS];
> >
> > new code
> >FDisp.DispatchOptions:=FDisp.DispatchOptions+[rdoCustomView];
>
> This is the exact opposite of what you should do.
>
> The rdoHandleCORS option must be there, or CORS will not be handled at all.
>
> >
> > Is there a way to tell the server to ignore CORS errors?
> >
>
> The CORS errors are from the browser, not from the server.
>
>
> > Or there a way to sweet-talk the server to accept the requests from a
> > TMS Web form? :)
>
> Yes, you must add localhost as an allowed origin in CORSAllowedOrigins.
>
> FDisp.CORSAllowedOrigins:='localhost:3000'
>
> If you are not using authentication, as an alternative, you can try
> FDisp.CORSAllowedOrigins:='*'
>
> 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-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 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