Improve video test coverage and debugging output.

Added a few debug operators for some useful enums, and
added tests for them.  One or two other features not really
tested.

Change-Id: Idffec6ade1d4e05dbf72f3dc47dfc0d01ddddf8b
Reviewed-on: http://codereview.qt-project.org/6201
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
This commit is contained in:
Michael Goddard
2011-10-07 12:03:35 +10:00
committed by Qt by Nokia
parent 03f22bcdaf
commit adca03adfd
10 changed files with 464 additions and 149 deletions

View File

@@ -43,6 +43,9 @@
#include <qvariant.h>
#include <QDebug>
QT_BEGIN_NAMESPACE
/*!
@@ -198,5 +201,24 @@ QVariant QAbstractVideoBuffer::handle() const
return QVariant();
}
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, QAbstractVideoBuffer::HandleType type)
{
switch (type) {
case QAbstractVideoBuffer::NoHandle:
return dbg.nospace() << "NoHandle";
case QAbstractVideoBuffer::GLTextureHandle:
return dbg.nospace() << "GLTextureHandle";
case QAbstractVideoBuffer::XvShmImageHandle:
return dbg.nospace() << "XvShmImageHandle";
case QAbstractVideoBuffer::CoreImageHandle:
return dbg.nospace() << "CoreImageHandle";
case QAbstractVideoBuffer::QPixmapHandle:
return dbg.nospace() << "QPixmapHandle";
default:
return dbg.nospace() << QString(QLatin1String("UserHandle(%1)")).arg(int(type)).toAscii().constData();
}
}
#endif
QT_END_NAMESPACE