[Gambas-user] gb.media: No display of videos in Gambas controls

Claus Dietrich claus.dietrich at freenet.de
Mon Apr 29 19:26:42 CEST 2019


I am running Linux Mint 19 Mate with VirtualBox on a Windows Host with
all host and guest additions installed. Tests with GStreamer in a
terminal showed, that only /autovideosink/ works as video-sink in this
environment (xvimagesink or ximagesink don't work) . The working
GStreamer pipeline was successfully rebuilt in Gambas 3.13.0 with
gb.media as follows:

' Gambas class file

Public pl As MediaPipeline
Public dr As DrawingArea

Public Sub Form_Open()

Dim src, snk As MediaControl
Dim ftr1, ftr2 As MediaFilter

  With dr = New DrawingArea(Me)
    .X = 10
    .Y = 10
    .W = 640
    .H = 480
    .Background = Color.Black
  End With
  FMain.width = dr.w + 20
  pl = New MediaPipeline
  ' 'With webcam
  ' src = New MediaControl(pl, "v4l2src")
  ' src["device"] = "/dev/video0"
  ' ftr1 = New MediaFilter(pl, "jpegdec") 
  ' ftr2 = New MediaFilter(pl,
  ' snk = New MediaControl(pl, "autovideosink")
  ' src.LinkTo(ftr1)
  ' ftr1.Linkto(ftr2)
  ' ftr2.LinkTo(snk)
  'With test source
  src = New MediaControl(pl, "videotestsrc")
  snk = New MediaControl(pl, "autovideosink")


Public Sub Button1_Click()



Public Sub Button2_Click()


The problem: When I am trying with the above out-commented command line
"pl.SetWindow(dr)" to display the video in a Gambas control, Gambas
throws the error "Not supported on this control". Earlier examples found
in the Web showed, that this was working with Drawing Areas. Did this
function went lost? Is there anything wrong in my program?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20190429/771499e5/attachment.html>

More information about the User mailing list