[Gambas-user] How to create MediaControl with specific Type?
T Lee Davidson
t.lee.davidson at gmail.com
Sun Apr 12 18:45:39 CEST 2020
I am trying to create a new MediaControl with the Type="fdsink". But, I get errors on creation.
It seems that to specify a Type, a Parent must also be specified else I get a "Null object" error.
Given this:
' Gambas module file
Public hMediaContainer As MediaContainer
Public hControl As MediaControl
Public Sub Main()
' hMediaContainer = New MediaContainer As "hMediaContainer"
hControl = New MediaControl(Null, "fdsink") As "hControl"
hControl["fd"] = "myfile.mp4"
End
I get "Null object" on New MediaControl.
If I uncomment so as to create a new MediaContainer to be used as Parent for the MediaControl,
(ie: hControl = New MediaControl(hMediaContainer, "fdsink") As "hControl"),
I get "Null object" on New MediaContainer.
If I try hPlayer = New MediaPlayer(Null, "fdsink") As "hPlayer", the IDE console displays an error:
GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed
So it appears that a Parent is required.
How can a specific Type be specified when there is no parent?
--
Lee
More information about the User
mailing list