summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGareth Stockwell <gareth.stockwell@sosco.com>2009-08-26 08:38:13 (GMT)
committerGareth Stockwell <gareth.stockwell@sosco.com>2009-08-26 08:38:13 (GMT)
commit8076ee4317333112a529b9df5e7ab0a44e101d16 (patch)
tree90e8a1cfb9f9da575d090a26225ba8f70947beeb /src
parent55dcdac49aeaf9a7af9d420140e7629682fa4573 (diff)
downloadQt-8076ee4317333112a529b9df5e7ab0a44e101d16.zip
Qt-8076ee4317333112a529b9df5e7ab0a44e101d16.tar.gz
Qt-8076ee4317333112a529b9df5e7ab0a44e101d16.tar.bz2
Added a bit more tracing for debugging video visibility
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/phonon/mmf/defs.h26
-rw-r--r--src/3rdparty/phonon/mmf/videooutput.cpp3
-rw-r--r--src/3rdparty/phonon/mmf/videoplayer.cpp6
-rw-r--r--src/3rdparty/phonon/mmf/videowidget.cpp8
4 files changed, 25 insertions, 18 deletions
diff --git a/src/3rdparty/phonon/mmf/defs.h b/src/3rdparty/phonon/mmf/defs.h
index adf2882..0a9a683 100644
--- a/src/3rdparty/phonon/mmf/defs.h
+++ b/src/3rdparty/phonon/mmf/defs.h
@@ -25,8 +25,10 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
// in order to debug the current problems with video visibility.
// If this is defined, then VideoOutput is essentially just a typedef for
-// QWidget
-#define PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET
+// QWidget. This is to allow us to test whether the QWidget function
+// overrides present in VideoOutput (e.g. sizeHint, paintEvent etc) may
+// be the cause of the visibility problems.
+//#define PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET
// Use hard-coded rectangle coordinates, rather than using CCoeControl
// rect, i.e. QWidget::winId()->Rect()
@@ -40,16 +42,16 @@ namespace Phonon
{
namespace MMF
{
- static const qint32 DefaultTickInterval = 10;
- static const qreal InitialVolume = 0.5;
-
- enum MediaType
- {
- MediaTypeUnknown,
- MediaTypeAudio,
- MediaTypeVideo
- };
+ static const qint32 DefaultTickInterval = 10;
+ static const qreal InitialVolume = 0.5;
+
+ enum MediaType
+ {
+ MediaTypeUnknown,
+ MediaTypeAudio,
+ MediaTypeVideo
+ };
}
}
-#endif
+#endif // PHONON_MMF_DEFS_H
diff --git a/src/3rdparty/phonon/mmf/videooutput.cpp b/src/3rdparty/phonon/mmf/videooutput.cpp
index 482d944..2652844 100644
--- a/src/3rdparty/phonon/mmf/videooutput.cpp
+++ b/src/3rdparty/phonon/mmf/videooutput.cpp
@@ -64,7 +64,8 @@ void VideoOutput::dump()
{
QWidget* widget = qobject_cast<QWidget*>(node);
const bool visible = widget ? widget->isVisible() : false;
- TRACE("node 0x%08x widget 0x%08x visible %d", node, widget, visible);
+ const QHBufC name(node->objectName());
+ TRACE("node 0x%08x name %S widget 0x%08x visible %d", node, name.data(), widget, visible);
root = node;
node = node->parent();
diff --git a/src/3rdparty/phonon/mmf/videoplayer.cpp b/src/3rdparty/phonon/mmf/videoplayer.cpp
index 584a4f0..419c83c 100644
--- a/src/3rdparty/phonon/mmf/videoplayer.cpp
+++ b/src/3rdparty/phonon/mmf/videoplayer.cpp
@@ -234,8 +234,12 @@ void MMF::VideoPlayer::MvpuoPrepareComplete(TInt aError)
#ifdef PHONON_MMF_EXPLICITLY_SHOW_VIDEO_WIDGET
// HACK: why do we need to explicitly show() the grandparent...?
- static_cast<QWidget*>(videoOutput().parent()->parent())->show();
+ QWidget* grandparent = static_cast<QWidget*>(videoOutput().parent()->parent());
+ TRACE("Calling grandparent[0x%08x]->show()", grandparent);
+ grandparent->show();
+ TRACE_0("Calling videoOutput().updateGeometry()");
videoOutput().updateGeometry();
+ TRACE_0("Calling videoOutput().update()");
videoOutput().update();
#endif
diff --git a/src/3rdparty/phonon/mmf/videowidget.cpp b/src/3rdparty/phonon/mmf/videowidget.cpp
index 7849109..515f04e 100644
--- a/src/3rdparty/phonon/mmf/videowidget.cpp
+++ b/src/3rdparty/phonon/mmf/videowidget.cpp
@@ -42,7 +42,7 @@ static const qreal DefaultSaturation = 1.0;
//-----------------------------------------------------------------------------
MMF::VideoWidget::VideoWidget(QWidget* parent)
- : m_videoOutput(new VideoOutput(parent))
+ : m_widget(new VideoOutput(parent))
, m_aspectRatio(DefaultAspectRatio)
, m_brightness(DefaultBrightness)
, m_scaleMode(DefaultScaleMode)
@@ -51,7 +51,7 @@ MMF::VideoWidget::VideoWidget(QWidget* parent)
, m_saturation(DefaultSaturation)
{
TRACE_CONTEXT(VideoWidget::VideoWidget, EVideoApi);
- TRACE_ENTRY_0();
+ TRACE_ENTRY_0();
TRACE_EXIT_0();
}
@@ -150,11 +150,11 @@ void MMF::VideoWidget::setSaturation(qreal saturation)
QWidget* MMF::VideoWidget::widget()
{
- return m_videoOutput.data();
+ return m_widget.data();
}
VideoOutput& MMF::VideoWidget::videoOutput()
{
- return *m_videoOutput;
+ return *static_cast<VideoOutput*>(widget());
}