PDA

View Full Version : Playing file with Phonon while stil downloading it.



alexandernst
23rd January 2011, 21:56
I'm trying to play a file that I'm downloading at the same time. I have tried to start the download and then set the current source of phonon to that file, but phonon will play just the part that was already downloaded before the call to setCurrentSource() and then it will stop, even if there is more data. So, that would be something like:

1. Start downloading file via async
2. Start playing local file
3. Play while not EOF (pause when buffer needed)

Any ideas how could I do that?

Sven
24th January 2011, 11:29
Yep I got an idea, cause i had the same problem.

First I was looking for a solution and finally I came up with this : (not the best way to solve the problem)

Everytime I got new data (readyRead()) i pass this data to a class member and call setCurrentSource() again. Before I do this i save the time which has been played already and after calling setCurrentSource i seek that phonon media object to that time. it works pretty good even if i call stop to that media object and start again i don't get any kinds of lags or so on

alexandernst
25th January 2011, 20:48
That sound really durty. Isn't there any other method?

hrn2k1
10th April 2011, 11:25
Hi Sven !
I AM NEW IN QT MOBILE APPLICATION. I ALSO WANT TO DO IT. BUT I GET ERROR MediaSource::Stream not yet handled.
PLEASE GIVE YOUR CODE.