[Gambas-user] Problem with MediaPipeline

Benoit Minisini benoit.minisini at gambas-basic.org
Sun Apr 16 20:44:19 CEST 2023

Le 16/04/2023 à 16:25, Claus Dietrich a écrit :
> Am 16.04.23 um 00:10 schrieb Benoit Minisini:
>> This is why I ask you to send a full project and not a piece of code.
> As said, it was the full project - see attached program.
> Best regards
> Claus

It still works here, but...

The 'output.mp3' will be kept void if I close the window. But it will be 
(partly) written if I stop the program with the debugger stop button!

So, as you can see, the fact that you are using 'gb.qt5' has an impact 
on the behaviour of the media pipeline. This is the reason why I always 
ask a full project: to have the exact same context for running the code.

Now there is a difference between using 'gst-launch' and creating the 
same pipeline with Gambas. 'gst-launch' will try to connect the elements 
"intelligently" (I don't know exactly how), whereas you have to be 
explicit with Gambas.

In other words, there are two way of connecting elements in Gambas: the 
'LinkTo' method, which is immediate, and the 'LinkLaterTo' method, that 
must be used when the connectors of an element are available later after 
the creation of the element.

Alas, to know if you have to use 'LinkLaterTo', you have to read the 
documentation of the element. And it may not be explicitely explained!

I suggest you try different combinations of 'LinkLaterTo' (instead of 
'LinkTo') on your machine, to see if the beahviour changes. Maybe the 
GStreamer elements do not behave the same on my machine because the 
GStreamer version is different?

I don't think it will change anything, but you must try, as I don't see 
something else that could explain the different behaviour at the moment.


Benoît Minisini.

More information about the User mailing list