diff options
author | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-08-25 07:46:08 (GMT) |
---|---|---|
committer | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-08-25 07:46:08 (GMT) |
commit | ca8f0c669142d27091873c108ffe21b4285e3087 (patch) | |
tree | 74bee27be06d17007b9e589c6bc3aaf668aab69a /src/3rdparty/phonon/mmf/mediaobject.cpp | |
parent | d4efe766d35aa8150f67f67cd16cfc00ba4f9723 (diff) | |
download | Qt-ca8f0c669142d27091873c108ffe21b4285e3087.zip Qt-ca8f0c669142d27091873c108ffe21b4285e3087.tar.gz Qt-ca8f0c669142d27091873c108ffe21b4285e3087.tar.bz2 |
Implemented Backend::availableMimeTypes
Diffstat (limited to 'src/3rdparty/phonon/mmf/mediaobject.cpp')
-rw-r--r-- | src/3rdparty/phonon/mmf/mediaobject.cpp | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/src/3rdparty/phonon/mmf/mediaobject.cpp b/src/3rdparty/phonon/mmf/mediaobject.cpp index 82c671c..fec5441 100644 --- a/src/3rdparty/phonon/mmf/mediaobject.cpp +++ b/src/3rdparty/phonon/mmf/mediaobject.cpp @@ -17,6 +17,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. */ #include "audioplayer.h" +#include "defs.h" #include "dummyplayer.h" #include "mediaobject.h" #include "utils.h" @@ -95,28 +96,7 @@ bool MMF::MediaObject::openRecognizer() return true; } -const TInt KMimePrefixLength = 6; // either "audio/" or "video/" -_LIT(KMimePrefixAudio, "audio/"); -_LIT(KMimePrefixVideo, "video/"); - -MMF::MediaObject::MediaType MMF::MediaObject::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; -} - - -MMF::MediaObject::MediaType MMF::MediaObject::fileMediaType +MMF::MediaType MMF::MediaObject::fileMediaType (const QString& fileName) { TRACE_CONTEXT(MediaObject::fileMediaType, EAudioInternal); @@ -137,7 +117,7 @@ MMF::MediaObject::MediaType MMF::MediaObject::fileMediaType if(KErrNone == err) { const TPtrC mimeType = recognizerResult.iDataType.Des(); - result = mimeTypeToMediaType(mimeType); + result = Utils::mimeTypeToMediaType(mimeType); } else { |