summaryrefslogtreecommitdiff
path: root/src/plugins/mediaservices/qt7
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/mediaservices/qt7')
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm31
-rw-r--r--src/plugins/mediaservices/qt7/qt7movierenderer.h1
-rw-r--r--src/plugins/mediaservices/qt7/qt7movierenderer.mm4
-rw-r--r--src/plugins/mediaservices/qt7/qt7movievideowidget.h1
-rw-r--r--src/plugins/mediaservices/qt7/qt7movievideowidget.mm4
-rw-r--r--src/plugins/mediaservices/qt7/qt7movieviewoutput.h1
-rw-r--r--src/plugins/mediaservices/qt7/qt7movieviewoutput.mm4
-rw-r--r--src/plugins/mediaservices/qt7/qt7movieviewrenderer.h1
-rw-r--r--src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm4
-rw-r--r--src/plugins/mediaservices/qt7/qt7videooutputcontrol.h1
10 files changed, 19 insertions, 33 deletions
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm b/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm
index d83c0e3ff4..f35a9fa819 100644
--- a/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm
+++ b/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm
@@ -193,17 +193,13 @@ void QT7PlayerSession::setVideoOutput(QT7VideoOutput *output)
if (m_videoOutput == output)
return;
- if (m_videoOutput) {
- m_videoOutput->setEnabled(false);
+ if (m_videoOutput)
m_videoOutput->setMovie(0);
- }
m_videoOutput = output;
- if (m_videoOutput) {
- m_videoOutput->setEnabled(m_QTMovie != 0);
+ if (m_videoOutput && m_state != QMediaPlayer::StoppedState)
m_videoOutput->setMovie(m_QTMovie);
- }
}
@@ -297,6 +293,9 @@ void QT7PlayerSession::setPosition(qint64 pos)
void QT7PlayerSession::play()
{
+ if (m_videoOutput)
+ m_videoOutput->setMovie(m_QTMovie);
+
float preferredRate = [[(QTMovie*)m_QTMovie attributeForKey:@"QTMoviePreferredRateAttribute"] floatValue];
[(QTMovie*)m_QTMovie setRate:preferredRate*m_rate];
@@ -306,6 +305,9 @@ void QT7PlayerSession::play()
void QT7PlayerSession::pause()
{
+ if (m_videoOutput)
+ m_videoOutput->setMovie(m_QTMovie);
+
m_state = QMediaPlayer::PausedState;
[(QTMovie*)m_QTMovie setRate:0];
@@ -320,6 +322,9 @@ void QT7PlayerSession::stop()
[(QTMovie*)m_QTMovie setRate:0];
setPosition(0);
+ if (m_videoOutput)
+ m_videoOutput->setMovie(0);
+
if (m_state == QMediaPlayer::StoppedState)
emit stateChanged(m_state);
}
@@ -361,10 +366,8 @@ void QT7PlayerSession::setMedia(const QMediaContent &content, QIODevice *stream)
if (m_QTMovie) {
[(QTMovieObserver*)m_movieObserver setMovie:nil];
- if (m_videoOutput) {
- m_videoOutput->setEnabled(false);
+ if (m_videoOutput)
m_videoOutput->setMovie(0);
- }
[(QTMovie*)m_QTMovie release];
m_QTMovie = 0;
@@ -425,10 +428,9 @@ void QT7PlayerSession::setMedia(const QMediaContent &content, QIODevice *stream)
} else {
[(QTMovieObserver*)m_movieObserver setMovie:(QTMovie*)m_QTMovie];
- if (m_videoOutput) {
+ if (m_videoOutput && m_state != QMediaPlayer::StoppedState)
m_videoOutput->setMovie(m_QTMovie);
- m_videoOutput->setEnabled(true);
- }
+
processLoadStateChange();
[(QTMovie*)m_QTMovie setMuted:m_muted];
@@ -457,6 +459,8 @@ bool QT7PlayerSession::isVideoAvailable() const
void QT7PlayerSession::processEOS()
{
m_mediaStatus = QMediaPlayer::EndOfMedia;
+ if (m_videoOutput)
+ m_videoOutput->setMovie(0);
emit stateChanged(m_state = QMediaPlayer::StoppedState);
emit mediaStatusChanged(m_mediaStatus);
}
@@ -493,6 +497,9 @@ void QT7PlayerSession::processLoadStateChange()
if (state == kMovieLoadStateError) {
newStatus = QMediaPlayer::InvalidMedia;
+ if (m_videoOutput)
+ m_videoOutput->setMovie(0);
+
emit error(QMediaPlayer::FormatError, tr("Failed to load media"));
emit stateChanged(m_state = QMediaPlayer::StoppedState);
}
diff --git a/src/plugins/mediaservices/qt7/qt7movierenderer.h b/src/plugins/mediaservices/qt7/qt7movierenderer.h
index a547329c81..c2dd1779c0 100644
--- a/src/plugins/mediaservices/qt7/qt7movierenderer.h
+++ b/src/plugins/mediaservices/qt7/qt7movierenderer.h
@@ -74,7 +74,6 @@ public:
QT7MovieRenderer(QObject *parent = 0);
virtual ~QT7MovieRenderer();
- void setEnabled(bool);
void setMovie(void *movie);
void updateNaturalSize(const QSize &newSize);
diff --git a/src/plugins/mediaservices/qt7/qt7movierenderer.mm b/src/plugins/mediaservices/qt7/qt7movierenderer.mm
index a6d9d8decb..95f5d4cc4d 100644
--- a/src/plugins/mediaservices/qt7/qt7movierenderer.mm
+++ b/src/plugins/mediaservices/qt7/qt7movierenderer.mm
@@ -368,10 +368,6 @@ void QT7MovieRenderer::setupVideoOutput()
}
-void QT7MovieRenderer::setEnabled(bool)
-{
-}
-
void QT7MovieRenderer::setMovie(void *movie)
{
// qDebug() << "QT7MovieRenderer::setMovie" << movie;
diff --git a/src/plugins/mediaservices/qt7/qt7movievideowidget.h b/src/plugins/mediaservices/qt7/qt7movievideowidget.h
index 7908efd549..831a18d4da 100644
--- a/src/plugins/mediaservices/qt7/qt7movievideowidget.h
+++ b/src/plugins/mediaservices/qt7/qt7movievideowidget.h
@@ -72,7 +72,6 @@ public:
QT7MovieVideoWidget(QObject *parent = 0);
virtual ~QT7MovieVideoWidget();
- void setEnabled(bool);
void setMovie(void *movie);
void updateNaturalSize(const QSize &newSize);
diff --git a/src/plugins/mediaservices/qt7/qt7movievideowidget.mm b/src/plugins/mediaservices/qt7/qt7movievideowidget.mm
index 197c26ee2a..c58d0a0cb6 100644
--- a/src/plugins/mediaservices/qt7/qt7movievideowidget.mm
+++ b/src/plugins/mediaservices/qt7/qt7movievideowidget.mm
@@ -279,10 +279,6 @@ void QT7MovieVideoWidget::setupVideoOutput()
m_displayLink->start();
}
-void QT7MovieVideoWidget::setEnabled(bool)
-{
-}
-
void QT7MovieVideoWidget::setMovie(void *movie)
{
if (m_movie == movie)
diff --git a/src/plugins/mediaservices/qt7/qt7movieviewoutput.h b/src/plugins/mediaservices/qt7/qt7movieviewoutput.h
index 49049ad2ce..0fee41ce6d 100644
--- a/src/plugins/mediaservices/qt7/qt7movieviewoutput.h
+++ b/src/plugins/mediaservices/qt7/qt7movieviewoutput.h
@@ -63,7 +63,6 @@ public:
QT7MovieViewOutput(QObject *parent = 0);
~QT7MovieViewOutput();
- void setEnabled(bool);
void setMovie(void *movie);
void updateNaturalSize(const QSize &newSize);
diff --git a/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm b/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm
index 8e4dd9be26..20f1a02e3d 100644
--- a/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm
+++ b/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm
@@ -194,10 +194,6 @@ void QT7MovieViewOutput::setupVideoOutput()
setDisplayRect(m_displayRect);
}
-void QT7MovieViewOutput::setEnabled(bool)
-{
-}
-
void QT7MovieViewOutput::setMovie(void *movie)
{
if (m_movie != movie) {
diff --git a/src/plugins/mediaservices/qt7/qt7movieviewrenderer.h b/src/plugins/mediaservices/qt7/qt7movieviewrenderer.h
index 01263605a3..0b515aecad 100644
--- a/src/plugins/mediaservices/qt7/qt7movieviewrenderer.h
+++ b/src/plugins/mediaservices/qt7/qt7movieviewrenderer.h
@@ -67,7 +67,6 @@ public:
QT7MovieViewRenderer(QObject *parent = 0);
~QT7MovieViewRenderer();
- void setEnabled(bool);
void setMovie(void *movie);
void updateNaturalSize(const QSize &newSize);
diff --git a/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm b/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm
index 5f1147925a..33a6970a29 100644
--- a/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm
+++ b/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm
@@ -299,10 +299,6 @@ void QT7MovieViewRenderer::setupVideoOutput()
}
}
-void QT7MovieViewRenderer::setEnabled(bool)
-{
-}
-
void QT7MovieViewRenderer::setMovie(void *movie)
{
if (movie == m_movie)
diff --git a/src/plugins/mediaservices/qt7/qt7videooutputcontrol.h b/src/plugins/mediaservices/qt7/qt7videooutputcontrol.h
index 2c6091976f..3c74cb8f3e 100644
--- a/src/plugins/mediaservices/qt7/qt7videooutputcontrol.h
+++ b/src/plugins/mediaservices/qt7/qt7videooutputcontrol.h
@@ -67,7 +67,6 @@ class QT7PlayerService;
class QT7VideoOutput {
public:
virtual ~QT7VideoOutput() {}
- virtual void setEnabled(bool enabled) = 0;
virtual void setMovie(void *movie) = 0;
virtual void updateNaturalSize(const QSize &newSize) = 0;
};