summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGareth Stockwell <gareth.stockwell@sosco.com>2009-09-01 10:32:07 (GMT)
committerGareth Stockwell <gareth.stockwell@sosco.com>2009-09-01 10:32:07 (GMT)
commit65c8d29d8bad265a236431ab57b03f7b2614c53a (patch)
treeba0abcfe27a74ad3f5a1f761c02ce43ab9fe2977 /src
parent74b5571063e70f6be8ff5f2bee25ef61ad179f73 (diff)
parent44d641dec7972cdf30f9f4445e2de3416224de89 (diff)
downloadQt-65c8d29d8bad265a236431ab57b03f7b2614c53a.zip
Qt-65c8d29d8bad265a236431ab57b03f7b2614c53a.tar.gz
Qt-65c8d29d8bad265a236431ab57b03f7b2614c53a.tar.bz2
Merge branch 'mmfphonon' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into mmfphonon
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/phonon/mmf/1139
-rw-r--r--src/3rdparty/phonon/mmf/videooutput.cpp20
-rw-r--r--src/3rdparty/phonon/mmf/videoplayer.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/videoplayer.h1
4 files changed, 11 insertions, 151 deletions
diff --git a/src/3rdparty/phonon/mmf/1 b/src/3rdparty/phonon/mmf/1
deleted file mode 100644
index e5d6b26..0000000
--- a/src/3rdparty/phonon/mmf/1
+++ /dev/null
@@ -1,139 +0,0 @@
-/* This file is part of the KDE project.
-
-Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-
-This library is free software: you can redistribute it and/or modify
-it under the terms of the GNU Lesser General Public License as published by
-the Free Software Foundation, either version 2.1 or 3 of the License.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public License
-along with this library. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#include "dummyplayer.h"
-
-QT_BEGIN_NAMESPACE
-
-using namespace Phonon;
-using namespace Phonon::MMF;
-
-//-----------------------------------------------------------------------------
-// Constructor / destructor
-//-----------------------------------------------------------------------------
-
-MMF::DummyPlayer::DummyPlayer()
-{
-
-}
-
-MMF::DummyPlayer::DummyPlayer(const AbstractPlayer& player)
- : AbstractPlayer(player)
-{
-
-}
-
-
-//-----------------------------------------------------------------------------
-// MediaObjectInterface
-//-----------------------------------------------------------------------------
-
-void MMF::DummyPlayer::play()
-{
-
-}
-
-void MMF::DummyPlayer::pause()
-{
-
-}
-
-void MMF::DummyPlayer::stop()
-{
-
-}
-
-void MMF::DummyPlayer::seek(qint64)
-{
-
-}
-
-bool MMF::DummyPlayer::hasVideo() const
-{
- return false;
-}
-
-bool MMF::DummyPlayer::isSeekable() const
-{
- return false;
-}
-
-Phonon::State MMF::DummyPlayer::state() const
-{
- return Phonon::LoadingState;
-}
-
-qint64 MMF::DummyPlayer::currentTime() const
-{
- return 0;
-}
-
-QString MMF::DummyPlayer::errorString() const
-{
- return QString();
-}
-
-Phonon::ErrorType MMF::DummyPlayer::errorType() const
-{
- return Phonon::NoError;
-}
-
-qint64 MMF::DummyPlayer::totalTime() const
-{
- return 0;
-}
-
-MediaSource MMF::DummyPlayer::source() const
-{
- return MediaSource();
-}
-
-void MMF::DummyPlayer::setFileSource(const Phonon::MediaSource &, RFile &)
-{
-
-}
-
-void MMF::DummyPlayer::setNextSource(const MediaSource &)
-{
-
-}
-
-
-//-----------------------------------------------------------------------------
-// VolumeObserver
-//-----------------------------------------------------------------------------
-
-void MMF::DummyPlayer::volumeChanged(qreal)
-{
-
-}
-
-
-//-----------------------------------------------------------------------------
-// AbstractPlayer
-//-----------------------------------------------------------------------------
-
-void MMF::DummyPlayer::doSetTickInterval(qint32)
-{
-
-}
-
-
-
-
-
diff --git a/src/3rdparty/phonon/mmf/videooutput.cpp b/src/3rdparty/phonon/mmf/videooutput.cpp
index ef5b154..c517c22 100644
--- a/src/3rdparty/phonon/mmf/videooutput.cpp
+++ b/src/3rdparty/phonon/mmf/videooutput.cpp
@@ -42,16 +42,10 @@ MMF::VideoOutput::VideoOutput(QWidget* parent)
TRACE_ENTRY("parent 0x%08x", parent);
#ifndef PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET
- QPalette palette(Qt::black);
- //palette.setColor(QPalette::Window, Qt::transparent);
- setPalette(palette);
-
- // Widget redraws all of its pixels when it receives a paint event, so Qt
- // does not need to erase it before generating paint events.
- setAttribute(Qt::WA_OpaquePaintEvent, true);
-
- //setAttribute(Qt::WA_NoSystemBackground, true);
- //setAutoFillBackground(false);
+ setPalette(QPalette(Qt::black));
+ //setAttribute(Qt::WA_OpaquePaintEvent, true);
+ setAttribute(Qt::WA_NoSystemBackground, true);
+ setAutoFillBackground(false);
#endif // PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET
#ifdef PHONON_MMF_DEBUG_VIDEO_OUTPUT
@@ -158,7 +152,7 @@ QSize MMF::VideoOutput::sizeHint() const
if (!m_frameSize.isNull()) {
result = m_frameSize;
}
-
+
TRACE(" result %d %d", result.width(), result.height());
return result;
}
@@ -172,11 +166,13 @@ void MMF::VideoOutput::paintEvent(QPaintEvent* event)
TRACE("regions %d", event->region().numRects());
TRACE("type %d", event->type());
+/*
QPainter painter;
painter.begin(this);
painter.setBrush(QColor(0, 0, 0, 255)); // opaque black
painter.drawRects(event->region().rects());
painter.end();
+*/
}
void MMF::VideoOutput::resizeEvent(QResizeEvent* event)
@@ -187,7 +183,7 @@ void MMF::VideoOutput::resizeEvent(QResizeEvent* event)
event->size().width(), event->size().height());
QWidget::resizeEvent(event);
-
+
if (m_observer)
m_observer->videoOutputRegionChanged();
}
diff --git a/src/3rdparty/phonon/mmf/videoplayer.cpp b/src/3rdparty/phonon/mmf/videoplayer.cpp
index f2f93fa..736d74f 100644
--- a/src/3rdparty/phonon/mmf/videoplayer.cpp
+++ b/src/3rdparty/phonon/mmf/videoplayer.cpp
@@ -342,6 +342,8 @@ void MMF::VideoPlayer::updateMmfOutput()
// visible. If this is the case, we should set m_mmfOutputChangePending
// and respond to future showEvents from the videoOutput widget.
+ getNativeWindowSystemHandles();
+
TRAPD(err,
m_player->SetDisplayWindowL
(
diff --git a/src/3rdparty/phonon/mmf/videoplayer.h b/src/3rdparty/phonon/mmf/videoplayer.h
index 1fad4c4..887a26b 100644
--- a/src/3rdparty/phonon/mmf/videoplayer.h
+++ b/src/3rdparty/phonon/mmf/videoplayer.h
@@ -106,6 +106,7 @@ private:
bool m_mmfOutputChangePending;
};
+
}
}