diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-29 02:44:55 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-29 02:44:55 (GMT) |
commit | 17388e0ca41bd123003fd3703bad8616491b562c (patch) | |
tree | e07c08070bb5f23fdd5f1cf1b4d42d13f07765a5 /src/3rdparty/phonon/qt7/quicktimemetadata.mm | |
parent | 4fb6cae4dd0c6a90008780df606abb8a9e73cb2c (diff) | |
parent | 1f802e16e6ab59dbf5ce450e2d6ef4db10dd7bb8 (diff) | |
download | Qt-17388e0ca41bd123003fd3703bad8616491b562c.zip Qt-17388e0ca41bd123003fd3703bad8616491b562c.tar.gz Qt-17388e0ca41bd123003fd3703bad8616491b562c.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging:
Remove references to evr based renderer from .pro.
Phonon core; compile fixes after merge.
Phonon qt7; Compile fixes after merge.
Phonon; complete integration.
Update Phonon CMakeLists.txt.
Update Phonon qt7 backend to 4.4.0.
Update Phonon ds9 backend to 4.4.0.
Update Phonon GStreamer backend to 4.4.0.
Update Phonon core to 4.4.0
Diffstat (limited to 'src/3rdparty/phonon/qt7/quicktimemetadata.mm')
-rw-r--r-- | src/3rdparty/phonon/qt7/quicktimemetadata.mm | 43 |
1 files changed, 15 insertions, 28 deletions
diff --git a/src/3rdparty/phonon/qt7/quicktimemetadata.mm b/src/3rdparty/phonon/qt7/quicktimemetadata.mm index 2dcc152..4ae3e2c 100644 --- a/src/3rdparty/phonon/qt7/quicktimemetadata.mm +++ b/src/3rdparty/phonon/qt7/quicktimemetadata.mm @@ -15,7 +15,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. */ -#include <QtCore/QFileInfo> +#import <QTKit/QTMovie.h> + #include "quicktimemetadata.h" #include "quicktimevideoplayer.h" @@ -26,14 +27,19 @@ namespace Phonon namespace QT7 { -QuickTimeMetaData::QuickTimeMetaData(QuickTimeVideoPlayer *videoPlayer) +QuickTimeMetaData::QuickTimeMetaData() { - m_videoPlayer = videoPlayer; + m_videoPlayer = 0; m_movieChanged = false; } -void QuickTimeMetaData::update() +QuickTimeMetaData::~QuickTimeMetaData() +{ +} + +void QuickTimeMetaData::setVideo(QuickTimeVideoPlayer *videoPlayer) { + m_videoPlayer = videoPlayer; m_movieChanged = true; m_metaData.clear(); } @@ -141,22 +147,14 @@ void QuickTimeMetaData::readFormattedData(QTMetaDataRef metaDataRef, OSType form #endif // QUICKTIME_C_API_AVAILABLE -void QuickTimeMetaData::guessMetaDataForCD() -{ - QString album = QFileInfo(m_videoPlayer->movieCompactDiscPath()).fileName(); - QString title = QFileInfo(m_videoPlayer->currentTrackPath()).fileName(); - title = title.left(title.lastIndexOf('.')); - m_metaData.insert(QLatin1String("ALBUM"), album); - m_metaData.insert(QLatin1String("TITLE"), title); - m_metaData.insert(QLatin1String("TRACKNUMBER"), QString::number(m_videoPlayer->currentTrack())); -} - -void QuickTimeMetaData::readMetaDataFromMovie() +void QuickTimeMetaData::readMetaData() { + if (!m_videoPlayer) + return; QMultiMap<QString, QString> metaMap; - + #ifdef QUICKTIME_C_API_AVAILABLE - QTMetaDataRef metaDataRef; + QTMetaDataRef metaDataRef; OSStatus err = QTCopyMovieMetaData([m_videoPlayer->qtMovie() quickTimeMovie], &metaDataRef); BACKEND_ASSERT2(err == noErr, "Could not read QuickTime meta data", NORMAL_ERROR) @@ -177,17 +175,6 @@ void QuickTimeMetaData::readMetaDataFromMovie() m_metaData.insert(QLatin1String("DESCRIPTION"), metaMap.value(QLatin1String("des"))); } -void QuickTimeMetaData::readMetaData() -{ - if (!m_videoPlayer) - return; - - if (m_videoPlayer->mediaSource().type() == Phonon::MediaSource::Disc) - guessMetaDataForCD(); - else - readMetaDataFromMovie(); -} - QMultiMap<QString, QString> QuickTimeMetaData::metaData() { if (m_videoPlayer && m_videoPlayer->hasMovie() && m_movieChanged) |