[Gambas-user] Problem with gb.media

vuott at tutanota.com vuott at tutanota.com
Thu Aug 25 22:37:27 CEST 2022


Hello,
I have found the following problem with gb.media.

If I start this very simple code to listen only to the audio of a video (with audio) file, it works regularly:

Public Sub Main()

Dim pl As New MediaPipeline
Dim src As MediaControl
Dim bin, con, res, ask As MediaControl
Dim vsk As MediaControl
Dim filevideo As String

filevideo = "/path/of/file/Video-audio"

src = New MediaControl(pl, "filesrc")
src["location"] = filevideo
bin = New MediaControl(pl, "decodebin")
con = New MediaControl(pl, "audioconvert")
res = New MediaControl(pl, "audioresample")
ask = New MediaControl(pl, "autoaudiosink")

src.LinkTo(bin)
bin.LinkLaterTo(con)
con.LinkTo(res)
res.LinkTo(ask)

     '  vsk = New MediaControl(pl, "xvimagesink")

pl.Play

Wait 0

pl.Close

End
-----------------------

BUT, if I activate this command line:

       vsk = New MediaControl(pl, "xvimagesink")

the audio of the video file is no longer audible.
I point out that that MediaControl element ("autoaudiosink") is NOT connected to others with the .Linkto () method !!!
It seems that, the mere creation of an instance of MediaControl element ("autoaudiosink"), interferes with the audio part of the pipeline.

Regards
vuott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220825/20378cf5/attachment.htm>


More information about the User mailing list