summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/videooutput.cpp
diff options
context:
space:
mode:
authorGareth Stockwell <gareth.stockwell@sosco.com>2009-08-28 17:52:59 (GMT)
committerGareth Stockwell <gareth.stockwell@sosco.com>2009-08-28 17:52:59 (GMT)
commit764aebf14e5f8f72c91a4370803dfa4521aafbbc (patch)
treeae03b7c88e4758925b28152a9205c5a2c5315368 /src/3rdparty/phonon/mmf/videooutput.cpp
parent8b9d50a2d83fb05e1b32814c341936daf6628452 (diff)
downloadQt-764aebf14e5f8f72c91a4370803dfa4521aafbbc.zip
Qt-764aebf14e5f8f72c91a4370803dfa4521aafbbc.tar.gz
Qt-764aebf14e5f8f72c91a4370803dfa4521aafbbc.tar.bz2
Video playback now visible; flickering problems now observed
Diffstat (limited to 'src/3rdparty/phonon/mmf/videooutput.cpp')
-rw-r--r--src/3rdparty/phonon/mmf/videooutput.cpp30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/3rdparty/phonon/mmf/videooutput.cpp b/src/3rdparty/phonon/mmf/videooutput.cpp
index 6810f10..ef5b154 100644
--- a/src/3rdparty/phonon/mmf/videooutput.cpp
+++ b/src/3rdparty/phonon/mmf/videooutput.cpp
@@ -42,10 +42,14 @@ MMF::VideoOutput::VideoOutput(QWidget* parent)
TRACE_ENTRY("parent 0x%08x", parent);
#ifndef PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET
- //QPalette palette(Qt::black);
+ QPalette palette(Qt::black);
//palette.setColor(QPalette::Window, Qt::transparent);
- //setPalette(palette);
- //setAttribute(Qt::WA_OpaquePaintEvent, true);
+ 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);
#endif // PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET
@@ -168,23 +172,11 @@ 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(255, 0, 0, 255)); // opaque red
- //painter.setBrush(QColor(0, 0, 0, 0)); // transparent black
+ painter.setBrush(QColor(0, 0, 0, 255)); // opaque black
painter.drawRects(event->region().rects());
painter.end();
-*/
-}
-
-QPaintEngine* MMF::VideoOutput::paintEngine() const
-{
- TRACE_CONTEXT(VideoOutput::sizeHint, EVideoApi);
-
- QPaintEngine* const engine = QWidget::paintEngine();
-
- TRACE_RETURN("0x%08x", engine);
}
void MMF::VideoOutput::resizeEvent(QResizeEvent* event)
@@ -196,9 +188,8 @@ void MMF::VideoOutput::resizeEvent(QResizeEvent* event)
QWidget::resizeEvent(event);
- if (m_observer) {
+ if (m_observer)
m_observer->videoOutputRegionChanged();
- }
}
void MMF::VideoOutput::moveEvent(QMoveEvent* event)
@@ -210,9 +201,8 @@ void MMF::VideoOutput::moveEvent(QMoveEvent* event)
QWidget::moveEvent(event);
- if (m_observer) {
+ if (m_observer)
m_observer->videoOutputRegionChanged();
- }
}
#endif // PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET