[Gambas-user] How to create MediaControl with specific Type?
vuott at tiscali.it
vuott at tiscali.it
Sun Apr 12 23:22:49 CEST 2020
Hello,
you have use a "MediaPipeline" as MediaContatiner Parent.
Exemplum:
_Public hControl As MediaControl_
_ Public Sub Main()_
_
Dim pl As MediaPipeline_
_ pl = New MediaPipeline _
_ hControl = New
MediaControl(PL, "fdsink")_
...etc....
and _ hControl["fd"] = ...
_doesn't want a String, it wants an "Integer" value.
Il 12.04.2020
18:45 T Lee Davidson ha scritto:
> 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 ----[ http://gambaswiki.org/wiki/doc/netiquette [1] ]----
Con Tiscali Mobile Smart 30 4G hai minuti illimitati, 100 SMS e 30 Giga in 4G a soli 8,99€ al mese. http://tisca.li/smart30
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200412/23bf0402/attachment.html>
More information about the User
mailing list