[Gambas-user] MediaPlayer bug with AboutToFinish and URL?
Benoît Minisini
gambas at ...1...
Wed Oct 19 03:05:54 CEST 2016
Le 18/10/2016 à 13:18, Piper984 a écrit :
> OK, thanks for continuing to look into it!
>
> In case it helps: Below is a Python script + Gstreamer lib where setting the
> URL property behaves as expected. It just toggles between playing two video
> clips, setting the URL property when the 'about-to-finish' event fires. Not
> sure if this will be of any use, but it might? I ran this script w/ Ubuntu
> 16.04 and GStreamer 1.8.2, which is a different system than the one I
> originally asked about. I have confirmed that running Gambas 3.9.0 on the
> same system that the Python script below runs doesn't behave as expected.
>
> Thanks again!
>
OK, I understood the problem:
If you want to define the next media to play, you HAVE TO do it during
the 'about-to-finish' GStreamer signal, which is not run in the main thread.
As Gambas is not multi-threaded, its 'AboutToFinish' event is a delayed
version of the 'about-to-finish' signal, raised in the main thread.
And apparently, setting the uri outside of the 'about-to-finish' leads
to unexpected result, and to deadlock on my system.
When I say that GStreamer is an huge sensitive beast... :-/
Now I will try to find a workaround.
Regards,
--
Benoît Minisini
More information about the User
mailing list