summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrans Englich <frans.englich@nokia.com>2010-03-05 15:24:48 (GMT)
committerFrans Englich <frans.englich@nokia.com>2010-03-10 13:04:39 (GMT)
commit64cd7dea0e2f3d6544e6cc47ccd857b1ce3d44e7 (patch)
tree624e132fcc043678e5763bf4f1492d9f34d57eac /src
parent24392fb62bb34a80eb7ce13662b0a8744c9ab415 (diff)
downloadQt-64cd7dea0e2f3d6544e6cc47ccd857b1ce3d44e7.zip
Qt-64cd7dea0e2f3d6544e6cc47ccd857b1ce3d44e7.tar.gz
Qt-64cd7dea0e2f3d6544e6cc47ccd857b1ce3d44e7.tar.bz2
Fix SDP files are not supported.
The Phonon glue code rejected SDPs based on the MIME type for SDPs. Task-number: QTBUG-8702 Reviewed-by: Gareth Stockwell
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/phonon/mmf/utils.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/3rdparty/phonon/mmf/utils.cpp b/src/3rdparty/phonon/mmf/utils.cpp
index 2d17bd2..c556afc 100644
--- a/src/3rdparty/phonon/mmf/utils.cpp
+++ b/src/3rdparty/phonon/mmf/utils.cpp
@@ -52,22 +52,24 @@ void MMF::Utils::panic(PanicCode code)
User::Panic(PanicCategory, code);
}
-
-static const TInt KMimePrefixLength = 6; // either "audio/" or "video/"
_LIT(KMimePrefixAudio, "audio/");
_LIT(KMimePrefixVideo, "video/");
+_LIT(KMimeSDP, "application/sdp");
+
+enum ConstantStringLengths {
+ KMimePrefixLength = 6, // either "audio/" or "video/",
+ KMimeSDPLength = 15 // "application/sdp"
+};
MMF::MediaType MMF::Utils::mimeTypeToMediaType(const TDesC& mimeType)
{
- MediaType result = MediaTypeUnknown;
-
if (mimeType.Left(KMimePrefixLength).Compare(KMimePrefixAudio) == 0) {
- result = MediaTypeAudio;
- } else if (mimeType.Left(KMimePrefixLength).Compare(KMimePrefixVideo) == 0) {
- result = MediaTypeVideo;
- }
-
- return result;
+ return MediaTypeAudio;
+ } else if (mimeType.Left(KMimePrefixLength).Compare(KMimePrefixVideo) == 0 ||
+ mimeType.Left(KMimeSDPLength).Compare(KMimeSDP) == 0) {
+ return MediaTypeVideo;
+ } else
+ return MediaTypeUnknown;
}
QString MMF::Utils::symbianErrorToString(int errorCode)