summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/phonon')
-rw-r--r--src/3rdparty/phonon/mmf/abstractaudioeffect.h2
-rw-r--r--src/3rdparty/phonon/mmf/abstractmediaplayer.h1
-rw-r--r--src/3rdparty/phonon/mmf/abstractplayer.h1
-rw-r--r--src/3rdparty/phonon/mmf/abstractvideooutput.cpp3
-rw-r--r--src/3rdparty/phonon/mmf/abstractvideoplayer.cpp15
-rw-r--r--src/3rdparty/phonon/mmf/audioequalizer.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/bassboost.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/dummyplayer.cpp4
-rw-r--r--src/3rdparty/phonon/mmf/dummyplayer.h1
-rw-r--r--src/3rdparty/phonon/mmf/environmentalreverb.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/loudness.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/mediaobject.cpp3
-rw-r--r--src/3rdparty/phonon/mmf/stereowidening.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/videoplayer_dsa.cpp9
-rw-r--r--src/3rdparty/phonon/mmf/videoplayer_surface.cpp64
-rw-r--r--src/3rdparty/phonon/mmf/videoplayer_surface.h3
16 files changed, 86 insertions, 30 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractaudioeffect.h b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
index 70adcf6..8879636 100644
--- a/src/3rdparty/phonon/mmf/abstractaudioeffect.h
+++ b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
@@ -21,7 +21,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <QScopedPointer>
-#include <AudioEffectBase.h>
+#include <audioeffectbase.h>
#include <phonon/effectinterface.h>
diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.h b/src/3rdparty/phonon/mmf/abstractmediaplayer.h
index 23a8233..7d28caf 100644
--- a/src/3rdparty/phonon/mmf/abstractmediaplayer.h
+++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.h
@@ -71,7 +71,6 @@ protected:
virtual int openFile(RFile& file) = 0;
virtual int openUrl(const QString& url) = 0;
virtual int bufferStatus() const = 0;
- virtual void close() = 0;
void updateMetaData();
virtual int numberOfMetaDataEntries() const = 0;
diff --git a/src/3rdparty/phonon/mmf/abstractplayer.h b/src/3rdparty/phonon/mmf/abstractplayer.h
index ab892f5..30d5243 100644
--- a/src/3rdparty/phonon/mmf/abstractplayer.h
+++ b/src/3rdparty/phonon/mmf/abstractplayer.h
@@ -55,6 +55,7 @@ public:
AbstractPlayer(const AbstractPlayer *player);
virtual void open(const Phonon::MediaSource&, RFile&) = 0;
+ virtual void close() = 0;
// MediaObjectInterface (implemented)
qint32 tickInterval() const;
diff --git a/src/3rdparty/phonon/mmf/abstractvideooutput.cpp b/src/3rdparty/phonon/mmf/abstractvideooutput.cpp
index a8aabfd..2d221ed 100644
--- a/src/3rdparty/phonon/mmf/abstractvideooutput.cpp
+++ b/src/3rdparty/phonon/mmf/abstractvideooutput.cpp
@@ -60,7 +60,8 @@ MMF::AbstractVideoOutput::AbstractVideoOutput(QWidget *parent)
, m_aspectRatio(DefaultAspectRatio)
, m_scaleMode(DefaultScaleMode)
{
-
+ // Ensure that this widget has a native window handle
+ winId();
}
MMF::AbstractVideoOutput::~AbstractVideoOutput()
diff --git a/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp b/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
index 2e0ab1c..9ea4d18 100644
--- a/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
+++ b/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
@@ -66,6 +66,8 @@ void MMF::AbstractVideoPlayer::construct()
createPlayer();
+ m_player->RegisterForVideoLoadingNotification(*this);
+
TRACE_EXIT_0();
}
@@ -211,7 +213,8 @@ void MMF::AbstractVideoPlayer::aspectRatioChanged()
TRACE_CONTEXT(AbstractVideoPlayer::aspectRatioChanged, EVideoInternal);
TRACE_ENTRY("state %d aspectRatio %d", state());
- updateScaleFactors(m_videoOutput->videoWindowSize());
+ if (m_videoOutput)
+ updateScaleFactors(m_videoOutput->videoWindowSize());
TRACE_EXIT_0();
}
@@ -221,7 +224,8 @@ void MMF::AbstractVideoPlayer::scaleModeChanged()
TRACE_CONTEXT(AbstractVideoPlayer::scaleModeChanged, EVideoInternal);
TRACE_ENTRY("state %d", state());
- updateScaleFactors(m_videoOutput->videoWindowSize());
+ if (m_videoOutput)
+ updateScaleFactors(m_videoOutput->videoWindowSize());
TRACE_EXIT_0();
}
@@ -357,6 +361,8 @@ void MMF::AbstractVideoPlayer::videoOutputChanged()
void MMF::AbstractVideoPlayer::initVideoOutput()
{
+ Q_ASSERT(m_videoOutput);
+
bool connected = connect(
m_videoOutput, SIGNAL(videoWindowChanged()),
this, SLOT(videoWindowChanged())
@@ -378,9 +384,6 @@ void MMF::AbstractVideoPlayer::initVideoOutput()
// Suppress warnings in release builds
Q_UNUSED(connected);
- // Do these after all connections are complete, to ensure
- // that any signals generated get to their destinations.
- m_videoOutput->winId();
m_videoOutput->setVideoSize(m_videoFrameSize);
}
@@ -400,6 +403,8 @@ QSize scaleToAspect(const QSize &srcRect, int aspectWidth, int aspectHeight)
void MMF::AbstractVideoPlayer::updateScaleFactors(const QSize &windowSize, bool apply)
{
+ Q_ASSERT(m_videoOutput);
+
if (m_videoFrameSize.isValid()) {
QRect videoRect;
diff --git a/src/3rdparty/phonon/mmf/audioequalizer.cpp b/src/3rdparty/phonon/mmf/audioequalizer.cpp
index 1d2bbd4..28433f6 100644
--- a/src/3rdparty/phonon/mmf/audioequalizer.cpp
+++ b/src/3rdparty/phonon/mmf/audioequalizer.cpp
@@ -16,7 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <AudioEqualizerBase.h>
+#include <audioequalizerbase.h>
#include "audioequalizer.h"
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/bassboost.cpp b/src/3rdparty/phonon/mmf/bassboost.cpp
index 67076f6..81d9208 100644
--- a/src/3rdparty/phonon/mmf/bassboost.cpp
+++ b/src/3rdparty/phonon/mmf/bassboost.cpp
@@ -16,7 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <BassBoostBase.h>
+#include <bassboostbase.h>
#include "bassboost.h"
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/dummyplayer.cpp b/src/3rdparty/phonon/mmf/dummyplayer.cpp
index 6970088..d39ef76 100644
--- a/src/3rdparty/phonon/mmf/dummyplayer.cpp
+++ b/src/3rdparty/phonon/mmf/dummyplayer.cpp
@@ -97,6 +97,10 @@ void MMF::DummyPlayer::open(const Phonon::MediaSource &, RFile &)
}
+void MMF::DummyPlayer::close()
+{
+
+}
//-----------------------------------------------------------------------------
// AbstractPlayer
diff --git a/src/3rdparty/phonon/mmf/dummyplayer.h b/src/3rdparty/phonon/mmf/dummyplayer.h
index 6841b5d..9d45696 100644
--- a/src/3rdparty/phonon/mmf/dummyplayer.h
+++ b/src/3rdparty/phonon/mmf/dummyplayer.h
@@ -58,6 +58,7 @@ public:
// AbstractPlayer
virtual void open(const Phonon::MediaSource&, RFile&);
+ virtual void close();
virtual void doSetTickInterval(qint32 interval);
};
}
diff --git a/src/3rdparty/phonon/mmf/environmentalreverb.cpp b/src/3rdparty/phonon/mmf/environmentalreverb.cpp
index d4f5223..c500385 100644
--- a/src/3rdparty/phonon/mmf/environmentalreverb.cpp
+++ b/src/3rdparty/phonon/mmf/environmentalreverb.cpp
@@ -16,7 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <EnvironmentalReverbBase.h>
+#include <environmentalreverbbase.h>
#include "environmentalreverb.h"
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/loudness.cpp b/src/3rdparty/phonon/mmf/loudness.cpp
index ca05ab0..22d7518 100644
--- a/src/3rdparty/phonon/mmf/loudness.cpp
+++ b/src/3rdparty/phonon/mmf/loudness.cpp
@@ -16,7 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <LoudnessBase.h>
+#include <loudnessbase.h>
#include "loudness.h"
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/mediaobject.cpp b/src/3rdparty/phonon/mmf/mediaobject.cpp
index e1b921b..d264377 100644
--- a/src/3rdparty/phonon/mmf/mediaobject.cpp
+++ b/src/3rdparty/phonon/mmf/mediaobject.cpp
@@ -281,6 +281,9 @@ void MMF::MediaObject::createPlayer(const MediaSource &source)
break;
}
+ if (oldPlayer)
+ oldPlayer->close();
+
AbstractPlayer* newPlayer = 0;
// Construct newPlayer using oldPlayer (if not 0) in order to copy
diff --git a/src/3rdparty/phonon/mmf/stereowidening.cpp b/src/3rdparty/phonon/mmf/stereowidening.cpp
index f90651b..e452160 100644
--- a/src/3rdparty/phonon/mmf/stereowidening.cpp
+++ b/src/3rdparty/phonon/mmf/stereowidening.cpp
@@ -16,7 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <StereoWideningBase.h>
+#include <stereowideningbase.h>
#include "stereowidening.h"
QT_BEGIN_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp b/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp
index 1925471..deb9774 100644
--- a/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp
+++ b/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp
@@ -61,6 +61,8 @@ DsaVideoPlayer::~DsaVideoPlayer()
void MMF::DsaVideoPlayer::videoWindowScreenRectChanged()
{
+ Q_ASSERT(m_videoOutput);
+
QRect windowRect = static_cast<DsaVideoOutput *>(m_videoOutput)->videoWindowScreenRect();
// Clip to physical window size
@@ -124,12 +126,12 @@ void MMF::DsaVideoPlayer::createPlayer()
// CVideoPlayerUtility::NewL starts DSA
m_dsaActive = true;
-
- m_player->RegisterForVideoLoadingNotification(*this);
}
void MMF::DsaVideoPlayer::initVideoOutput()
{
+ Q_ASSERT(m_videoOutput);
+
bool connected = connect(
m_videoOutput, SIGNAL(videoWindowScreenRectChanged()),
this, SLOT(videoWindowScreenRectChanged())
@@ -156,7 +158,8 @@ void MMF::DsaVideoPlayer::initVideoOutput()
void MMF::DsaVideoPlayer::prepareCompleted()
{
- videoWindowScreenRectChanged();
+ if (m_videoOutput)
+ videoWindowScreenRectChanged();
}
void MMF::DsaVideoPlayer::handleVideoWindowChanged()
diff --git a/src/3rdparty/phonon/mmf/videoplayer_surface.cpp b/src/3rdparty/phonon/mmf/videoplayer_surface.cpp
index fda7342..f380e69 100644
--- a/src/3rdparty/phonon/mmf/videoplayer_surface.cpp
+++ b/src/3rdparty/phonon/mmf/videoplayer_surface.cpp
@@ -59,7 +59,8 @@ SurfaceVideoPlayer::~SurfaceVideoPlayer()
void MMF::SurfaceVideoPlayer::videoWindowSizeChanged()
{
- updateScaleFactors(m_videoOutput->videoWindowSize());
+ if (m_videoOutput)
+ updateScaleFactors(m_videoOutput->videoWindowSize());
}
@@ -80,6 +81,8 @@ void MMF::SurfaceVideoPlayer::createPlayer()
void MMF::SurfaceVideoPlayer::initVideoOutput()
{
+ Q_ASSERT(m_videoOutput);
+
bool connected = connect(
m_videoOutput, SIGNAL(videoWindowSizeChanged()),
this, SLOT(videoWindowSizeChanged())
@@ -104,6 +107,9 @@ void MMF::SurfaceVideoPlayer::handleVideoWindowChanged()
void MMF::SurfaceVideoPlayer::handleParametersChanged(VideoParameters parameters)
{
+ TRACE_CONTEXT(SurfaceVideoPlayer::handleParametersChanged, EVideoApi);
+ TRACE_ENTRY("parameters 0x%x", parameters.operator int());
+
TRect rect;
if (m_videoOutput) {
m_videoOutput->dump();
@@ -115,23 +121,14 @@ void MMF::SurfaceVideoPlayer::handleParametersChanged(VideoParameters parameters
if (player) {
int err = KErrNone;
if (parameters & WindowHandle) {
- if (m_displayWindow)
- player->RemoveDisplayWindow(*m_displayWindow);
-
- RWindow *window = static_cast<RWindow *>(m_window);
- if (window) {
- window->SetBackgroundColor(TRgb(0, 0, 0, 255));
- TRAP(err, player->AddDisplayWindowL(m_wsSession, m_screenDevice, *window, rect, rect));
- if (KErrNone != err) {
- setError(tr("Video display error"), err);
- window = 0;
- }
- }
- m_displayWindow = window;
+ removeDisplayWindow();
+ addDisplayWindow(rect);
}
if (KErrNone == err) {
if (parameters & ScaleFactors) {
+ if (!m_displayWindow)
+ addDisplayWindow(rect);
Q_ASSERT(m_displayWindow);
TRAP(err, player->SetVideoExtentL(*m_displayWindow, rect));
if (KErrNone == err)
@@ -143,6 +140,45 @@ void MMF::SurfaceVideoPlayer::handleParametersChanged(VideoParameters parameters
}
}
}
+
+ TRACE_EXIT_0();
+}
+
+void MMF::SurfaceVideoPlayer::addDisplayWindow(const TRect &rect)
+{
+ TRACE_CONTEXT(SurfaceVideoPlayer::addDisplayWindow, EVideoApi);
+ TRACE_ENTRY("rect %d %d - %d %d", rect.iTl.iX, rect.iTl.iY, rect.iBr.iX, rect.iBr.iY);
+
+ Q_ASSERT(!m_displayWindow);
+ RWindow *window = static_cast<RWindow *>(m_window);
+
+ TRACE("window 0x%08x", window);
+
+ if (window) {
+ window->SetBackgroundColor(TRgb(0, 0, 0, 255));
+ CVideoPlayerUtility2 *player = static_cast<CVideoPlayerUtility2 *>(m_player.data());
+ Q_ASSERT(player);
+ TRAPD(err, player->AddDisplayWindowL(m_wsSession, m_screenDevice, *window, rect, rect));
+ if (KErrNone == err)
+ m_displayWindow = window;
+ else
+ setError(tr("Video display error"), err);
+ TRACE("err %d", err);
+ }
+
+ TRACE_EXIT_0();
+}
+
+void MMF::SurfaceVideoPlayer::removeDisplayWindow()
+{
+ TRACE_CONTEXT(SurfaceVideoPlayer::removeDisplayWindow, EVideoApi);
+ TRACE("player 0x%08x window 0x%08x", m_player.data(), m_displayWindow);
+
+ CVideoPlayerUtility2 *player = static_cast<CVideoPlayerUtility2 *>(m_player.data());
+ if (player && m_displayWindow) {
+ player->RemoveDisplayWindow(*m_displayWindow);
+ m_displayWindow = 0;
+ }
}
QT_END_NAMESPACE
diff --git a/src/3rdparty/phonon/mmf/videoplayer_surface.h b/src/3rdparty/phonon/mmf/videoplayer_surface.h
index c05da9c..8572fdc 100644
--- a/src/3rdparty/phonon/mmf/videoplayer_surface.h
+++ b/src/3rdparty/phonon/mmf/videoplayer_surface.h
@@ -62,6 +62,9 @@ private:
void handleVideoWindowChanged();
void handleParametersChanged(VideoParameters parameters);
+ void addDisplayWindow(const TRect &rect);
+ void removeDisplayWindow();
+
private:
// Window handle which has been passed to the MMF via
// CVideoPlayerUtility2::SetDisplayWindowL