I have a decoded video frame coming over a distributed bus. Currently, I am using a QLabel that receives the frame buffer via Qt Signal/Slot
and sets it's pixmap.
void VideoViewer::slot_update_view( unsigned char* frame, QSize size )
{
QImage img( frame, size.width(), size.height(), QImage::Format_RGB888 );
_label->setPixmap( QPixmap::fromImage( img ).scaledToWidth( width(), Qt::SmoothTransformation ) );
}
This works, but using QLabel feels hacky. Is there a better solution? Eventually I'd like to draw on top of the video.