summaryrefslogtreecommitdiffstats
path: root/src/plugins/mediaservices
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-05-19 09:33:21 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-05-19 09:33:21 (GMT)
commitebe28bdd77ca615c47ebf6b41e34aee0c154fcf9 (patch)
treea1aa1578f798bae0cc23c32656134628bf5af788 /src/plugins/mediaservices
parent109024630cbf577d6f6bcb10ea3ac6272113b79e (diff)
parent28b894f65c5aba01d5ee80c20f617478faaee7e7 (diff)
downloadQt-ebe28bdd77ca615c47ebf6b41e34aee0c154fcf9.zip
Qt-ebe28bdd77ca615c47ebf6b41e34aee0c154fcf9.tar.gz
Qt-ebe28bdd77ca615c47ebf6b41e34aee0c154fcf9.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'src/plugins/mediaservices')
-rw-r--r--src/plugins/mediaservices/gstreamer/gstreamer.pro2
-rw-r--r--src/plugins/mediaservices/mediaservices.pro4
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.cpp13
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.h14
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.h3
5 files changed, 26 insertions, 10 deletions
diff --git a/src/plugins/mediaservices/gstreamer/gstreamer.pro b/src/plugins/mediaservices/gstreamer/gstreamer.pro
index 6af9c3f..6e05120 100644
--- a/src/plugins/mediaservices/gstreamer/gstreamer.pro
+++ b/src/plugins/mediaservices/gstreamer/gstreamer.pro
@@ -36,7 +36,7 @@ SOURCES += \
qvideosurfacegstsink.cpp
-x11 {
+!win32:!embedded:!mac:!symbian {
LIBS += -lXv
HEADERS += \
diff --git a/src/plugins/mediaservices/mediaservices.pro b/src/plugins/mediaservices/mediaservices.pro
index 27f05bc..0f0b021 100644
--- a/src/plugins/mediaservices/mediaservices.pro
+++ b/src/plugins/mediaservices/mediaservices.pro
@@ -9,5 +9,7 @@ contains(QT_CONFIG, media-backend) {
SUBDIRS += gstreamer
}
- symbian:SUBDIRS += symbian
+ symbian:contains(QT_CONFIG, audio-routing-available) {
+ SUBDIRS += symbian
+ }
}
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.cpp b/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.cpp
index f4065e4..1bebe0a 100644
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.cpp
+++ b/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.cpp
@@ -51,9 +51,11 @@ QT_BEGIN_NAMESPACE
S60AudioPlayerSession::S60AudioPlayerSession(QObject *parent)
: S60MediaPlayerSession(parent)
, m_player(0)
- , m_audioOutput(0)
, m_audioEndpoint("Default")
{
+#ifndef HAS_NO_AUDIOROUTING
+ m_audioOutput = 0;
+#endif
QT_TRAP_THROWING(m_player = CAudioPlayer::NewL(*this, 0, EMdaPriorityPreferenceNone));
m_player->RegisterForAudioLoadingNotification(*this);
}
@@ -71,11 +73,13 @@ S60AudioPlayerSession::~S60AudioPlayerSession()
void S60AudioPlayerSession::doLoadL(const TDesC &path)
{
+#ifndef HAS_NO_AUDIOROUTING
// m_audioOutput needs to be reinitialized after MapcInitComplete
if (m_audioOutput)
m_audioOutput->UnregisterObserver(*this);
delete m_audioOutput;
m_audioOutput = NULL;
+#endif
m_player->OpenFileL(path);
}
@@ -171,12 +175,14 @@ void S60AudioPlayerSession::MapcInitComplete(TInt aError, const TTimeIntervalMic
{
Q_UNUSED(aDuration);
setError(aError);
+#ifndef HAS_NO_AUDIOROUTING
TRAPD(err,
m_audioOutput = CAudioOutput::NewL(*m_player);
m_audioOutput->RegisterObserverL(*this);
);
setActiveEndpoint(m_audioEndpoint);
setError(err);
+#endif
loaded();
}
@@ -217,6 +223,7 @@ QString S60AudioPlayerSession::defaultEndpoint() const
void S60AudioPlayerSession::setActiveEndpoint(const QString& name)
{
+#if !defined(HAS_NO_AUDIOROUTING)
CAudioOutput::TAudioOutputPreference output = CAudioOutput::ENoPreference;
if (name == QString("Default"))
@@ -229,7 +236,6 @@ void S60AudioPlayerSession::setActiveEndpoint(const QString& name)
output = CAudioOutput::EPrivate;
else if (name == QString("Speaker"))
output = CAudioOutput::EPublic;
-#if !defined(HAS_NO_AUDIOROUTING)
if (m_audioOutput) {
TRAPD(err, m_audioOutput->SetAudioOutputL(output));
setError(err);
@@ -242,6 +248,7 @@ void S60AudioPlayerSession::setActiveEndpoint(const QString& name)
#endif
}
+#if !defined(HAS_NO_AUDIOROUTING)
void S60AudioPlayerSession::DefaultAudioOutputChanged(CAudioOutput& aAudioOutput,
CAudioOutput::TAudioOutputPreference aNewDefault)
{
@@ -264,5 +271,5 @@ QString S60AudioPlayerSession::qStringFromTAudioOutputPreference(CAudioOutput::T
return QString("Speaker");
return QString("Default");
}
-
+#endif
QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.h b/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.h
index fca66b3..f25b722 100644
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.h
+++ b/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.h
@@ -48,15 +48,19 @@
typedef CMdaAudioPlayerUtility CAudioPlayer;
typedef MMdaAudioPlayerCallback MAudioPlayerObserver;
-#include <AudioOutput.h>
+#ifndef HAS_NO_AUDIOROUTING
+#include <phonon/audiooutput.h>
#include <MAudioOutputObserver.h>
+#endif
QT_BEGIN_NAMESPACE
class S60AudioPlayerSession : public S60MediaPlayerSession
, public MAudioPlayerObserver
, public MAudioLoadingObserver
+#ifndef HAS_NO_AUDIOROUTING
, public MAudioOutputObserver
+#endif
{
Q_OBJECT
@@ -72,10 +76,11 @@ public:
void MaloLoadingStarted();
void MaloLoadingComplete();
+#ifndef HAS_NO_AUDIOROUTING
// From MAudioOutputObserver
void DefaultAudioOutputChanged( CAudioOutput& aAudioOutput,
CAudioOutput::TAudioOutputPreference aNewDefault );
-
+#endif
public:
// From S60MediaPlayerAudioEndpointSelector
QString activeEndpoint() const;
@@ -103,11 +108,14 @@ protected:
private:
void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
void MapcPlayComplete(TInt aError);
+#ifndef HAS_NO_AUDIOROUTING
QString qStringFromTAudioOutputPreference(CAudioOutput::TAudioOutputPreference output) const;
-
+#endif
private:
CAudioPlayer *m_player;
+#ifndef HAS_NO_AUDIOROUTING
CAudioOutput *m_audioOutput;
+#endif
QString m_audioEndpoint;
};
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.h b/src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.h
index 52e311a..9aece61 100644
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.h
+++ b/src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.h
@@ -48,8 +48,7 @@
#include <QtGui/qwidget.h>
#include <qvideowidget.h>
-#include <AudioOutput.h>
-#include <MAudioOutputObserver.h>
+#include <phonon/audiooutput.h>
QT_BEGIN_NAMESPACE