I have developed a DirectShow capture object that inherits QWidget. It works well inside of a standard QApplication using layouts and so forth. As soon as I try to insert it inside of a QGraphicsScene, the "preview" rendering stops appearing. Video is still captured to disk, even though it can't be seen while recording.
Phonon-based playback does work correctly inside of a QGraphicsScene.
I have set all of the same QT Window attributes as the phonon code does:
m_targetWidget->setAttribute(Qt::WA_OpaquePaintEvent, true);
m_targetWidget->setAttribute(Qt::WA_NoSystemBackground, true);
m_targetWidget->setAttribute(Qt::WA_PaintOnScreen, true);
m_targetWidget->setAutoFillBackground(false);
Other things I have looked at:
- Examine Phonon handling of DirectShow graph events
- Various attempts at adding paint events
- Tried both default renderer and VMR9 renderer
I am working on the Windows platform (32 bit Windows 7), and using Qt 4.6.3 and or Qt 4.7-rc1.
Bookmarks