problem in MediaPipeline construction

Ask about the individual Gambas components here.
Post Reply
nino83
Posts: 3
Joined: Monday 04th October 2021 8:34am

problem in MediaPipeline construction

Post by nino83 » Monday 04th October 2021 8:46am

Hi, I have a problem in the construction of a media pipeline.
I use the code:

Code: Select all

    f.src = New MediaControl(f.pl, "v4l2src")
    'Troviamo il percorso del device!
    Dim pDev As String = Utility.GetPercorsoDevice(ModuloGenerale.settaggioCorrente.FriendlyName, ModuloGenerale.settaggioCorrente.DevPath)
    f.src["device"] = pDev   '"/dev/video2"
  
    'creiamo il MediaFilter usando il formato associato al settaggio
    Dim strFrmt As String = ModuloGenerale.settaggioCorrente.MajorType1
    Dim strWidth As String = Str(ModuloGenerale.settaggioCorrente.Width1)
    Dim strHeight As String = Str(ModuloGenerale.settaggioCorrente.Height1)
    Dim strFramerate As String = Str(ModuloGenerale.settaggioCorrente.BitRate1)
    Dim stringaMediaFilter As String = "video/x-raw, format=" & strFrmt & ", width=" & strWidth & ", height=" & strHeight & ", framerate=" & strFramerate & "/1"
    f.ftr = New MediaFilter(f.pl, stringaMediaFilter)
omissis

Code: Select all

f.src.LinkTo(f.ftr) 'here the error!!!
At the instruction "linkTo" I have an error IF the format I choose is, for example, MJPEG or YUYV

while, if I use UYVY, it works good.

some ideas to resolve?

Post Reply