diff options
author | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-09-16 17:21:26 (GMT) |
---|---|---|
committer | Frans Englich <frans.englich@nokia.com> | 2009-09-23 12:36:36 (GMT) |
commit | 970db998dc6586388ca66b8969433d55a675c0a6 (patch) | |
tree | 58ce7200f9f3aaf7796b94702053597c97149f05 /src/3rdparty | |
parent | 6700a53676265787ab46106602234448e0174e55 (diff) | |
download | Qt-970db998dc6586388ca66b8969433d55a675c0a6.zip Qt-970db998dc6586388ca66b8969433d55a675c0a6.tar.gz Qt-970db998dc6586388ca66b8969433d55a675c0a6.tar.bz2 |
Added a utility function which samples a number of pixels from the screen, and writes their colors to the debug log
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/phonon/mmf/utils.cpp | 13 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/utils.h | 6 |
2 files changed, 19 insertions, 0 deletions
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 } |