[Gambas-user] Problem with gb.media

vuott at tutanota.com vuott at tutanota.com
Thu Aug 25 22:46:56 CEST 2022


Excuse me,

errata corrige :

   Wait 30    ' or other positive value

not "Wait 0" !





25 ago 2022, 22:37 da user at lists.gambas-basic.org:

> 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/2201ad02/attachment.htm>


More information about the User mailing list