diff options
author | Frans Englich <frans.englich@nokia.com> | 2010-03-10 13:13:58 (GMT) |
---|---|---|
committer | Frans Englich <frans.englich@nokia.com> | 2010-03-10 13:13:58 (GMT) |
commit | 28fc7434e0be95527292050bc6dd3980aabd44ca (patch) | |
tree | 4d79e9fe39985176c2cd41c9e0b2dca54d8044b6 /src | |
parent | 032d4ac63687d209ffef594bf6ef60e3db20bfa3 (diff) | |
parent | 64cd7dea0e2f3d6544e6cc47ccd857b1ce3d44e7 (diff) | |
download | Qt-28fc7434e0be95527292050bc6dd3980aabd44ca.zip Qt-28fc7434e0be95527292050bc6dd3980aabd44ca.tar.gz Qt-28fc7434e0be95527292050bc6dd3980aabd44ca.tar.bz2 |
Merge branch 'mmfphonon' into 4.6
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/phonon/mmf/utils.cpp | 22 |
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) |