Posts

Showing posts with the label qlabel

QT QLabel setPixmap from QAbstractVideoSurface

QT QLabel setPixmap from QAbstractVideoSurface I'm implementing my own class for probing video frames from QCamera under windows. It's a subclass of QAbstractVideoSurface. So, my probe generates QPixmap which I tried to draw on QLabel (as viewfinder). And I've got segmentation fault on QLabel setPixmap call. I'm sure my Qpixmap is well made, because I can save it on the disk with a save(). My QLabel is inititalized and works well, because I can load QPixmap from the disk and set it to QLabel. I guess there is problem with a format of a pixmap, but can't clue how to correct it :( My code frameprobe.h #ifndef FRAMEPROBE_H #define FRAMEPROBE_H #include <QAbstractVideoSurface> #include <QList> #include <QPixmap> class FrameProbe : public QAbstractVideoSurface { Q_OBJECT public: explicit FrameProbe(QObject *parent = 0); QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType) const;...