Phonon os x - when using QIoDevice it appears the entire file is read into memory when setcurrentsource is called
-
wrote on 20 Mar 2012, 03:14 last edited by
I have an application that has been running on windows for a while now, we recently started testing it on mac.
We are using phonon to play video, for some reason when we call setcurrentsouce it appears to load the entire file into memory.
With smaller files we are able to successfully play the video after a short delay. The problem is large files (2GB) cause a crash when the computer runs out of memory.If I change the input from a QFile to a QString path to the file the playback works as expected. -I cannot use a path or url for a solution I need QIODevice to work as we need to do some preprocessing on the file.
This only happens on Mac on windows it works as expected.
Anyone have a similar issue/or have a solution?
Below is the code
QFile *file = new QFile("/Users/.../D 2.mp4");
media->setCurrentSource(file); //If I use the path instead everything works, using QFile the entire file is loaded into memory. -
wrote on 29 Nov 2012, 17:05 last edited by
I figured this out. This is as designed. Its not an issue with QT but really quicktime. Quick time will load the entire file into memory unless you pass it a file name