From 970db998dc6586388ca66b8969433d55a675c0a6 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Wed, 16 Sep 2009 18:21:26 +0100 Subject: Added a utility function which samples a number of pixels from the screen, and writes their colors to the debug log --- src/3rdparty/phonon/mmf/utils.cpp | 13 +++++++++++++ src/3rdparty/phonon/mmf/utils.h | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/src/3rdparty/phonon/mmf/utils.cpp b/src/3rdparty/phonon/mmf/utils.cpp index 3d674fd..107a36d 100644 --- a/src/3rdparty/phonon/mmf/utils.cpp +++ b/src/3rdparty/phonon/mmf/utils.cpp @@ -123,6 +123,19 @@ QColor MMF::Utils::getScreenPixel(const QPoint& pos) return pixel; } +// Debugging: for debugging video visibility +void MMF::Utils::dumpScreenPixelSample() +{ + for(int i=0; i<20; ++i) { + const QPoint pos(i*10, i*10); + const QColor pixel = Utils::getScreenPixel(pos); + RDebug::Printf( + "Phonon::MMF::Utils::dumpScreenPixelSample %d %d = %d %d %d %d", + pos.x(), pos.y(), pixel.red(), pixel.green(), pixel.blue(), pixel.alpha() + ); + } +} + #endif // _DEBUG QT_END_NAMESPACE diff --git a/src/3rdparty/phonon/mmf/utils.h b/src/3rdparty/phonon/mmf/utils.h index 7db7831..38964d0 100644 --- a/src/3rdparty/phonon/mmf/utils.h +++ b/src/3rdparty/phonon/mmf/utils.h @@ -59,6 +59,12 @@ MediaType mimeTypeToMediaType(const TDesC& mimeType); * Retrieve color of specified pixel from the screen. */ QColor getScreenPixel(const QPoint& pos); + +/** + * Samples a small number of pixels from the screen, and dumps their + * colors to the debug log. + */ +void dumpScreenPixelSample(); #endif } -- cgit v0.12