summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-10-23 15:36:30 +0200
committerThierry Bastian <thierry.bastian@nokia.com>2009-10-23 15:37:33 +0200
commitb2cc784cbba9c790c2cc083cf99d9a2a112a9c27 (patch)
treedc1fe9fb64300ea91f656c568ebea06f708b615b
parent72fb0f2637db401efd178b9d4139fc2b6ef59112 (diff)
Phonon: allows to stream wave files from QIODevice
Reviewed-by: trust Me
-rw-r--r--src/3rdparty/phonon/ds9/iodevicereader.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/3rdparty/phonon/ds9/iodevicereader.cpp b/src/3rdparty/phonon/ds9/iodevicereader.cpp
index e0c505c7d9..695af59085 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;
}