您的位置:首页 > 编程语言 > Qt开发

[转]QT 显示视频

2010-12-28 19:41 447 查看
原地址不清楚,从网上随便找到的,做一下记录 QPainter has a method called drawImage. You can do something like the following in a subclass of QWidget: void VideoWidget::paintEvent() { //Get the current frame and size data... //Passing QImage QImage frame(frameDataUCharPtr, frameWidth, frameHeight. QImage::Format_RBG32 ); QPainter painter(this); painter.drawImage(rect(), frame); } Under Qtopia you can use QDirectPainter to write directly to framebuffer memory and get some faster access for drawing frames. You will have to do the color conversions yourself to get the frame into your framebuffer's color model. --Justin
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: