summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Stockwell <gareth.stockwell@sosco.com>2009-09-16 17:54:47 (GMT)
committerFrans Englich <frans.englich@nokia.com>2009-09-23 12:36:41 (GMT)
commitd2cad41ec85f753d7da4ddbf3fe70d034aaea8fc (patch)
tree48b4d2c09815bac4201f3dfb0b1781c4bf4c58a8
parenta4c600e205a79c5dfc7657b792374a8ce9e308d0 (diff)
downloadQt-d2cad41ec85f753d7da4ddbf3fe70d034aaea8fc.zip
Qt-d2cad41ec85f753d7da4ddbf3fe70d034aaea8fc.tar.gz
Qt-d2cad41ec85f753d7da4ddbf3fe70d034aaea8fc.tar.bz2
Modified video output widget to make video visible on target device
-rw-r--r--src/3rdparty/phonon/mmf/TODO.txt12
-rw-r--r--src/3rdparty/phonon/mmf/videooutput.cpp16
2 files changed, 15 insertions, 13 deletions
diff --git a/src/3rdparty/phonon/mmf/TODO.txt b/src/3rdparty/phonon/mmf/TODO.txt
index 1d2cb44..47abddc 100644
--- a/src/3rdparty/phonon/mmf/TODO.txt
+++ b/src/3rdparty/phonon/mmf/TODO.txt
@@ -4,13 +4,11 @@ TODO list for MMF Phonon backend
The following items are in rough order of priority.
-* Work out why video is not visible
-
-* Write a test app which allows the following:
- - Dragging of the video widget
- - Resizing of the video widget
- - Dragging of other widgets on top of / underneath the video widget
-These will allow the video widget's moveEvent / resizeEvent implementations to be tested.
+* Review the latest changes for making video visible on target. In particular, the temporary hack in qmediaplayer (setting the Qt::WA_TranslucentBackground attribute on the top-level widget, so that the CFbsBitmap used as the window surface is created with a display mode of EColor16MA) needs to be replaced with a change in QtGui. Some possiblilities are as follows:
+1. Change the QS60WindowSurface constructor so that *all* window surfaces are 16MA. This has some drawbacks:
+ - It causes application backgrounds to be transparent, because CFbsBitmap data (including the alpha channel) gets zero-initialized. This may require the alpha values in the bitmap to be set to 255.
+ - Blitting of RGB32 and ABGR Qt pixmaps to a 16MA surface is slower than blitting to 16MU. This could be alleviated by modifying the software blitting routines.
+2. Add a function in QS60WindowSurface, e.g. setAlphaValue(const QRegion& region, int value), allowing the client to set alpha values in the bitmap. Assuming that WSERV will transfer these values, when blitting a 16MU source, this would allow the video to be visible, and avoid the performance penalties of option (1). We would then call this from VideoOutput::paintEvent.
* On-target testing
1. Ensure that Phonon front- and back-end libraries are included in the SIS file.
diff --git a/src/3rdparty/phonon/mmf/videooutput.cpp b/src/3rdparty/phonon/mmf/videooutput.cpp
index 2544a97..2130d58 100644
--- a/src/3rdparty/phonon/mmf/videooutput.cpp
+++ b/src/3rdparty/phonon/mmf/videooutput.cpp
@@ -47,9 +47,9 @@ MMF::VideoOutput::VideoOutput(QWidget* parent)
#ifndef PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET
setPalette(QPalette(Qt::black));
- //setAttribute(Qt::WA_OpaquePaintEvent, true);
- setAttribute(Qt::WA_NoSystemBackground, true);
- setAutoFillBackground(false);
+ setAttribute(Qt::WA_OpaquePaintEvent, true);
+ setAttribute(Qt::WA_NoSystemBackground, true);
+ setAutoFillBackground(false);
#endif // PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET
dump();
@@ -120,13 +120,17 @@ void MMF::VideoOutput::paintEvent(QPaintEvent* event)
dump();
-/*
+ // Note: composition mode code was a failed attempt to get transparent
+ // alpha values to be propagated to the (EColor16MU) window surface.
+
QPainter painter;
+ //const QPainter::CompositionMode compositionMode = painter.compositionMode();
+ //painter.setCompositionMode(QPainter::CompositionMode_Source);
painter.begin(this);
- painter.setBrush(QColor(0, 0, 0, 255)); // opaque black
+ painter.setBrush(QColor(0, 0, 0, 0));
painter.drawRects(event->region().rects());
painter.end();
-*/
+ //painter.setCompositionMode(compositionMode);
}
void MMF::VideoOutput::resizeEvent(QResizeEvent* event)