diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-10-23 13:36:30 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-10-23 13:37:33 (GMT) |
commit | b2cc784cbba9c790c2cc083cf99d9a2a112a9c27 (patch) | |
tree | dc1fe9fb64300ea91f656c568ebea06f708b615b /src/3rdparty | |
parent | 72fb0f2637db401efd178b9d4139fc2b6ef59112 (diff) | |
download | Qt-b2cc784cbba9c790c2cc083cf99d9a2a112a9c27.zip Qt-b2cc784cbba9c790c2cc083cf99d9a2a112a9c27.tar.gz Qt-b2cc784cbba9c790c2cc083cf99d9a2a112a9c27.tar.bz2 |
Phonon: allows to stream wave files from QIODevice
Reviewed-by: trust Me
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/phonon/ds9/iodevicereader.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/3rdparty/phonon/ds9/iodevicereader.cpp b/src/3rdparty/phonon/ds9/iodevicereader.cpp index e0c505c..695af59 100644 --- a/src/3rdparty/phonon/ds9/iodevicereader.cpp +++ b/src/3rdparty/phonon/ds9/iodevicereader.cpp @@ -36,17 +36,20 @@ namespace Phonon //these mediatypes define a stream, its type will be autodetected by DirectShow static QVector<AM_MEDIA_TYPE> getMediaTypes() { - AM_MEDIA_TYPE mt = { MEDIATYPE_Stream, MEDIASUBTYPE_NULL, TRUE, FALSE, 1, GUID_NULL, 0, 0, 0}; + //the order here is important because otherwise, + //directshow might not be able to detect the stream type correctly + + AM_MEDIA_TYPE mt = { MEDIATYPE_Stream, MEDIASUBTYPE_Avi, TRUE, FALSE, 1, GUID_NULL, 0, 0, 0}; QVector<AM_MEDIA_TYPE> ret; - //normal auto-detect stream - ret << mt; //AVI stream - mt.subtype = MEDIASUBTYPE_Avi; ret << mt; //WAVE stream mt.subtype = MEDIASUBTYPE_WAVE; ret << mt; + //normal auto-detect stream (must be at the end!) + mt.subtype = MEDIASUBTYPE_NULL; + ret << mt; return ret; } |