summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp')
-rw-r--r--WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp62
1 files changed, 5 insertions, 57 deletions
diff --git a/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp b/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
index 431e68e..b1a48fb 100644
--- a/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
+++ b/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
@@ -84,6 +84,9 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
{
// Hint to Phonon to disable overlay painting
m_videoWidget->setAttribute(Qt::WA_DontShowOnScreen);
+#if QT_VERSION < 0x040500
+ m_videoWidget->setAttribute(Qt::WA_QuitOnClose, false);
+#endif
createPath(m_mediaObject, m_videoWidget);
createPath(m_mediaObject, m_audioOutput);
@@ -96,7 +99,6 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
connect(m_mediaObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)),
this, SLOT(stateChanged(Phonon::State, Phonon::State)));
- connect(m_mediaObject, SIGNAL(tick(qint64)), this, SLOT(tick(qint64)));
connect(m_mediaObject, SIGNAL(metaDataChanged()), this, SLOT(metaDataChanged()));
connect(m_mediaObject, SIGNAL(seekableChanged(bool)), this, SLOT(seekableChanged(bool)));
connect(m_mediaObject, SIGNAL(hasVideoChanged(bool)), this, SLOT(hasVideoChanged(bool)));
@@ -105,7 +107,6 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
connect(m_mediaObject, SIGNAL(currentSourceChanged(const Phonon::MediaSource&)),
this, SLOT(currentSourceChanged(const Phonon::MediaSource&)));
connect(m_mediaObject, SIGNAL(aboutToFinish()), this, SLOT(aboutToFinish()));
- connect(m_mediaObject, SIGNAL(prefinishMarkReached(qint32)), this, SLOT(prefinishMarkReached(qint32)));
connect(m_mediaObject, SIGNAL(totalTimeChanged(qint64)), this, SLOT(totalTimeChanged(qint64)));
}
@@ -314,7 +315,7 @@ void MediaPlayerPrivate::updateStates()
m_mediaObject->pause();
}
} else if (phononState == Phonon::PausedState) {
- m_networkState = MediaPlayer::LoadedFirstFrame;
+ m_networkState = MediaPlayer::Loaded;
m_readyState = MediaPlayer::CanPlayThrough;
} else if (phononState == Phonon::ErrorState) {
if (!m_mediaObject || m_mediaObject->errorType() == Phonon::FatalError) {
@@ -371,42 +372,6 @@ void MediaPlayerPrivate::setRect(const IntRect& newRect)
m_videoWidget->resize(newRect.width(), newRect.height());
}
-
-void MediaPlayerPrivate::loadStateChanged()
-{
- notImplemented();
-}
-
-void MediaPlayerPrivate::rateChanged()
-{
- notImplemented();
-}
-
-void MediaPlayerPrivate::sizeChanged()
-{
- notImplemented();
-}
-
-void MediaPlayerPrivate::timeChanged()
-{
- notImplemented();
-}
-
-void MediaPlayerPrivate::volumeChanged()
-{
- notImplemented();
-}
-
-void MediaPlayerPrivate::didEnd()
-{
- notImplemented();
-}
-
-void MediaPlayerPrivate::loadingFailed()
-{
- notImplemented();
-}
-
IntSize MediaPlayerPrivate::naturalSize() const
{
if (!hasVideo()) {
@@ -430,17 +395,12 @@ IntSize MediaPlayerPrivate::naturalSize() const
bool MediaPlayerPrivate::eventFilter(QObject* obj, QEvent* event)
{
- if (event->type() == QEvent::Paint)
+ if (event->type() == QEvent::UpdateRequest)
m_player->repaint();
return QObject::eventFilter(obj, event);
}
-void MediaPlayerPrivate::repaint()
-{
- m_player->repaint();
-}
-
void MediaPlayerPrivate::paint(GraphicsContext* graphicsContect, const IntRect& rect)
{
if (graphicsContect->paintingDisabled())
@@ -469,12 +429,6 @@ void MediaPlayerPrivate::stateChanged(Phonon::State newState, Phonon::State oldS
updateStates();
}
-void MediaPlayerPrivate::tick(qint64)
-{
- updateStates();
- m_player->timeChanged();
-}
-
void MediaPlayerPrivate::metaDataChanged()
{
LOG(Media, "MediaPlayerPrivatePhonon::metaDataChanged()");
@@ -516,12 +470,6 @@ void MediaPlayerPrivate::aboutToFinish()
LOG_MEDIAOBJECT();
}
-void MediaPlayerPrivate::prefinishMarkReached(qint32)
-{
- notImplemented();
- LOG_MEDIAOBJECT();
-}
-
void MediaPlayerPrivate::totalTimeChanged(qint64 totalTime)
{
LOG(Media, "MediaPlayerPrivatePhonon::totalTimeChanged(%d)", totalTime);