Page 1 of 1

Play two files in a row

Posted: 02 Mar 2012 19:47
by neku
Hi,

I already opened a thread (viewtopic.php?f=32&t=98533), but I think my question was to specific.

I hope this time my concern is understandable:

Can you show me a working example in Python, where a file is played and when the file finished (eof) a new file is loaded and played via the "trackEnded event"-callback.

I would really appreciate if you could help me. Really :)...

with kind regards
neku

Re: Play two files in a row

Posted: 02 Mar 2012 22:15
by kevintcore
If you already know the second file at the start of your process, you can use a media list player. That would probably be easier than the event handler route.

Re: Play two files in a row

Posted: 03 Mar 2012 09:53
by neku
No, the next file in the row is not know at the start, it can change dynamically.

Re: Play two files in a row

Posted: 05 Mar 2012 15:03
by neku
Nobody has an idea how to play one file after another using the python bindings?? :wink:

Re: Play two files in a row

Posted: 07 Mar 2012 20:00
by neku
Anybody? :o

Re: Play two files in a row

Posted: 09 Mar 2012 17:48
by neku
Can nobody post an example for me? I am hanging on this for weeks now... ;(

Re: Play two files in a row

Posted: 20 Mar 2012 18:02
by thkatsou
I ve got the same problem

Re: Play two files in a row

Posted: 27 Mar 2012 20:38
by thkatsou
I somehow managed (for some time) to play several files in a row.
Sadly I am know facing random segfaults when a video ends.
What I did was started a QTimer (have gone with pyqt) that was checking the value of variable and if it was found true
then the next video will be put to play..
The MediaPlayerEndReached event callback would set this variable to True..
I ve read and noticed that you cannot call MediaPlayer.play directly on the MediaPlayerEndReached callback so that's why I used this approach..

But have not got rid of random segfaults when a video ends..
We need an example of not an interactive implementation but something that would play a list of videos over and over...