[Gambas-user] Problem with gb.media
Benoit Minisini
benoit.minisini at gambas-basic.org
Thu Aug 25 23:08:42 CEST 2022
Le 25/08/2022 à 22:37, vuott--- via User a écrit :
> 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
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
I think it's only the GStreamer behaviour. Did you test the same
pipeline with GStreamer directly?
--
Benoît Minisini.
More information about the User
mailing list