Hi, I have this command:
gst-launch-1.0 v4l2src ! videoflip method=rotate-180 ! videoconvert ! ximagesink
How can I create a MediaControl object for the videoflip filter?
How create a MediaControl in MediaPipeline?
Re: How create a MediaControl in MediaPipeline?
I suggest this code.
(I want to insert an "Enumeration ", so I have to change in the name of some its elements the dash to underscores)
(I want to insert an "Enumeration ", so I have to change in the name of some its elements the dash to underscores)
Private Enum none = 0, clockwise, rotate_180, counterclockwise, horizontal_flip,
vertical_flip, upper_left_diagonal, upper_right_diagonal, automatic
Public Sub Main()
Dim pl As MediaPipeline
Dim src, flp, cnv, snk As MediaControl
Dim ftr As MediaFilter
pl = New MediaPipeline
src = New MediaControl(pl, "v4l2src")
src["device"] = "/dev/video0"
ftr = New MediaFilter(pl, "video/x-raw,width=640,height=480,framerate=30/1")
flp = New MediaControl(pl, "videoflip")
flp["method"] = rotate_180
cnv = New MediaControl(pl, "videoconvert")
snk = New MediaControl(pl, "xvimagesink")
' We connect "GStreamer" plugins together:
src.LinkTo(ftr)
ftr.LinkTo(flp)
flp.LinkTo(cnv)
cnv.LinkTo(snk)
' Start video:
pl.Play()
While True
' The elapsed time from the start of video is shown in console/Terminal:
Write "\rTempus: " & Time(0, 0, 0, pl.Position * 1000)
Wait 0.001
Wend
End
Europaeus sum !
Amare memorentes atque deflentes ad mortem silenter labimur.
Amare memorentes atque deflentes ad mortem silenter labimur.
Re: How create a MediaControl in MediaPipeline?
Thanks! it works!
I had tryed a code very very similar, but I didn't use the Enumeration.... I used
flp["method"] = 1
Why in this way it didn't work?
thanks again and bye!
I had tryed a code very very similar, but I didn't use the Enumeration.... I used
flp["method"] = 1
Why in this way it didn't work?
thanks again and bye!
Re: How create a MediaControl in MediaPipeline?
I do not know. It works for me.
Regarding the "Enumeration" resource, obviously this does not affect the functioning of the code.
Ah... more about "video" with "gb.media" Component:
https://www.gambas-it.org/wiki/index.ph ... e_gb.media
Europaeus sum !
Amare memorentes atque deflentes ad mortem silenter labimur.
Amare memorentes atque deflentes ad mortem silenter labimur.