diff options
author | Frans Englich <frans.englich@nokia.com> | 2009-07-13 09:44:55 (GMT) |
---|---|---|
committer | Frans Englich <frans.englich@nokia.com> | 2009-07-13 09:44:55 (GMT) |
commit | 975af6c3c81788e39422c55f67ffabfebd31d9be (patch) | |
tree | 20c505f9cb0a4b6538a89d3cadc939a2ea3975e6 /src | |
parent | 7ead0ff857d8f164e9cfa3f756a1b234a76eedc6 (diff) | |
download | Qt-975af6c3c81788e39422c55f67ffabfebd31d9be.zip Qt-975af6c3c81788e39422c55f67ffabfebd31d9be.tar.gz Qt-975af6c3c81788e39422c55f67ffabfebd31d9be.tar.bz2 |
Build fixes, debug code.
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/phonon/mmf/audiooutput.cpp | 18 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/mediaobject.cpp | 64 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/mediaobject.h | 10 | ||||
-rw-r--r-- | src/3rdparty/phonon/phonon/factory.cpp | 13 |
4 files changed, 58 insertions, 47 deletions
diff --git a/src/3rdparty/phonon/mmf/audiooutput.cpp b/src/3rdparty/phonon/mmf/audiooutput.cpp index ddc48b0..9d1ff02 100644 --- a/src/3rdparty/phonon/mmf/audiooutput.cpp +++ b/src/3rdparty/phonon/mmf/audiooutput.cpp @@ -24,19 +24,19 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. using namespace Phonon; using namespace Phonon::MMF; -AudioOutput::AudioOutput(Backend *, QObject *parent) : m_mediaObject(0) - , m_volume(0) - , m_maxVolume(-1) +MMF::AudioOutput::AudioOutput(Backend *, QObject *parent) : m_mediaObject(0) + , m_volume(0) + , m_maxVolume(-1) { setParent(parent); } -qreal AudioOutput::volume() const +qreal MMF::AudioOutput::volume() const { return 0; } -void AudioOutput::setVolume(qreal newVolume) +void MMF::AudioOutput::setVolume(qreal newVolume) { if(!m_mediaObject) return; @@ -51,22 +51,22 @@ void AudioOutput::setVolume(qreal newVolume) emit volumeChanged(m_volume); } -int AudioOutput::outputDevice() const +int MMF::AudioOutput::outputDevice() const { return 0; } -bool AudioOutput::setOutputDevice(int) +bool MMF::AudioOutput::setOutputDevice(int) { return true; } -bool AudioOutput::setOutputDevice(const Phonon::AudioOutputDevice &) +bool MMF::AudioOutput::setOutputDevice(const Phonon::AudioOutputDevice &) { return true; } -void AudioOutput::setMediaObject(MediaObject *mo) +void MMF::AudioOutput::setMediaObject(MediaObject *mo) { Q_ASSERT(m_mediaObject); m_mediaObject = mo; diff --git a/src/3rdparty/phonon/mmf/mediaobject.cpp b/src/3rdparty/phonon/mmf/mediaobject.cpp index 79b7558..605fe24 100644 --- a/src/3rdparty/phonon/mmf/mediaobject.cpp +++ b/src/3rdparty/phonon/mmf/mediaobject.cpp @@ -24,9 +24,9 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. using namespace Phonon; using namespace Phonon::MMF; -MediaObject::MediaObject(QObject *parent) : m_player(0) - , m_error(NoError) - , m_state(StoppedState) +MMF::MediaObject::MediaObject(QObject *parent) : m_player(0) + , m_error(NoError) + , m_state(StoppedState) { Q_UNUSED(parent); m_player = CDrmPlayerUtility::NewL(*this, 0, EMdaPriorityPreferenceNone); @@ -34,55 +34,55 @@ MediaObject::MediaObject(QObject *parent) : m_player(0) m_player->RegisterForAudioLoadingNotification(*this); } -MediaObject::~MediaObject() +MMF::MediaObject::~MediaObject() { delete m_player; } -void MediaObject::play() +void MMF::MediaObject::play() { transitTo(PlayingState); m_player->Play(); } -void MediaObject::pause() +void MMF::MediaObject::pause() { transitTo(PausedState); m_player->Pause(); } -void MediaObject::stop() +void MMF::MediaObject::stop() { transitTo(StoppedState); m_player->Stop(); } -void MediaObject::seek(qint64 milliseconds) +void MMF::MediaObject::seek(qint64 milliseconds) { m_player->SetPosition(toMicroSeconds(milliseconds)); } -qint32 MediaObject::tickInterval() const +qint32 MMF::MediaObject::tickInterval() const { return 0; } -void MediaObject::setTickInterval(qint32 interval) +void MMF::MediaObject::setTickInterval(qint32 interval) { Q_UNUSED(interval); } -bool MediaObject::hasVideo() const +bool MMF::MediaObject::hasVideo() const { return false; } -bool MediaObject::isSeekable() const +bool MMF::MediaObject::isSeekable() const { return false; } -qint64 MediaObject::currentTime() const +qint64 MMF::MediaObject::currentTime() const { TTimeIntervalMicroSeconds mss; const TInt retcode = m_player->GetPosition(mss); @@ -96,37 +96,37 @@ qint64 MediaObject::currentTime() const } } -QString MediaObject::errorString() const +QString MMF::MediaObject::errorString() const { return QString(); } -Phonon::ErrorType MediaObject::errorType() const +Phonon::ErrorType MMF::MediaObject::errorType() const { return m_error; } -qint64 MediaObject::toMilliSeconds(const TTimeIntervalMicroSeconds &in) +qint64 MMF::MediaObject::toMilliSeconds(const TTimeIntervalMicroSeconds &in) { return in.Int64() / 1000; } -TTimeIntervalMicroSeconds MediaObject::toMicroSeconds(qint64 ms) +TTimeIntervalMicroSeconds MMF::MediaObject::toMicroSeconds(qint64 ms) { return TTimeIntervalMicroSeconds(TInt64(ms)); } -qint64 MediaObject::totalTime() const +qint64 MMF::MediaObject::totalTime() const { return toMilliSeconds(m_player->Duration()); } -MediaSource MediaObject::source() const +MediaSource MMF::MediaObject::source() const { return m_mediaSource; } -void MediaObject::setSource(const MediaSource &source) +void MMF::MediaObject::setSource(const MediaSource &source) { stop(); m_mediaSource = source; @@ -161,42 +161,42 @@ void MediaObject::setSource(const MediaSource &source) transitTo(LoadingState); } -void MediaObject::setNextSource(const MediaSource &source) +void MMF::MediaObject::setNextSource(const MediaSource &source) { m_nextSource = source; Q_UNUSED(source); } -qint32 MediaObject::prefinishMark() const +qint32 MMF::MediaObject::prefinishMark() const { return 0; } -void MediaObject::setPrefinishMark(qint32) +void MMF::MediaObject::setPrefinishMark(qint32) { } -qint32 MediaObject::transitionTime() const +qint32 MMF::MediaObject::transitionTime() const { return 0; } -void MediaObject::setTransitionTime(qint32) +void MMF::MediaObject::setTransitionTime(qint32) { } -void MediaObject::MaloLoadingComplete() +void MMF::MediaObject::MaloLoadingComplete() { transitTo(StoppedState); } -void MediaObject::MaloLoadingStarted() +void MMF::MediaObject::MaloLoadingStarted() { transitTo(LoadingState); } -void MediaObject::MdapcInitComplete(TInt aError, - const TTimeIntervalMicroSeconds &) +void MMF::MediaObject::MdapcInitComplete(TInt aError, + const TTimeIntervalMicroSeconds &) { if(aError == KErrNone) { m_error = NormalError; @@ -207,7 +207,7 @@ void MediaObject::MdapcInitComplete(TInt aError, transitTo(StoppedState); } -void MediaObject::MdapcPlayComplete(TInt aError) +void MMF::MediaObject::MdapcPlayComplete(TInt aError) { if(aError == KErrNone) { if(m_nextSource.type() == MediaSource::Empty) { @@ -225,13 +225,13 @@ void MediaObject::MdapcPlayComplete(TInt aError) } } -void MediaObject::transitTo(Phonon::State newState) +void MMF::MediaObject::transitTo(Phonon::State newState) { emit stateChanged(m_state, newState); m_state = newState; } -Phonon::State MediaObject::state() const +Phonon::State MMF::MediaObject::state() const { return m_state; } diff --git a/src/3rdparty/phonon/mmf/mediaobject.h b/src/3rdparty/phonon/mmf/mediaobject.h index 1512919..3afa3b4 100644 --- a/src/3rdparty/phonon/mmf/mediaobject.h +++ b/src/3rdparty/phonon/mmf/mediaobject.h @@ -20,6 +20,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #define PHONON_MMF_MEDIAOBJECT_H #include <DrmAudioSamplePlayer.h> +#include <VideoPlayer.h> #include <Phonon/MediaSource> #include <Phonon/mediaobjectinterface.h> @@ -33,16 +34,25 @@ namespace Phonon { class AudioOutput; + /** + * + * See + * <a href="http://wiki.forum.nokia.com/index.php/How_to_play_a_video_file_using_CVideoPlayerUtility">How to + * play a video file using CVideoPlayerUtility</a> + */ class MediaObject : public QObject , public MediaObjectInterface , public MDrmAudioPlayerCallback , public MAudioLoadingObserver + //, public MVideoPlayerUtilityObserver { Q_OBJECT Q_INTERFACES(Phonon::MediaObjectInterface) public: MediaObject(QObject *parent); virtual ~MediaObject(); + + // MediaObjectInterface virtual void play(); virtual void pause(); virtual void stop(); diff --git a/src/3rdparty/phonon/phonon/factory.cpp b/src/3rdparty/phonon/phonon/factory.cpp index 34d04fa..d828756 100644 --- a/src/3rdparty/phonon/phonon/factory.cpp +++ b/src/3rdparty/phonon/phonon/factory.cpp @@ -125,6 +125,7 @@ bool FactoryPrivate::createBackend() // (finding the first loadable backend). const QLatin1String suffix("/phonon_backend/"); foreach (QString libPath, QCoreApplication::libraryPaths()) { + qDebug() << Q_FUNC_INFO << "Lookinng in" << libPath; libPath += suffix; const QDir dir(libPath); if (!dir.exists()) { @@ -136,18 +137,18 @@ bool FactoryPrivate::createBackend() #ifdef Q_OS_SYMBIAN /* On Symbian OS we might have two plugins, one which uses Symbian - * MMF framework("mmf"), and one which uses Real Networks's + * MMF framework("phonon_mmf"), and one which uses Real Networks's * Helix("hxphonon"). We prefer the latter because it's more * sophisticated, so we make sure the Helix backend is attempted * to be loaded first, and the MMF backend is used for backup. */ { - const int helix = plugins.indexOf(QLatin1String("hxphonon")); - if (helix != -1) - plugins.move(helix, 0); + const int hxphonon = plugins.indexOf(QLatin1String("hxphonon")); + if (hxphonon != -1) + plugins.move(hxphonon, 0); // Code for debugging the MMF backend. - if(helix != -1) { - qDebug() << "Found helix, and removed it from the lookup list."; + if(hxphonon != -1) { + qDebug() << "Found hxphonon backend and removed it from the lookup list."; plugins.removeAll(QLatin1String("hxphonon")); } } |