I've a Video application. It consists of some different widgets.
I use on QGraphicsScene with OpenGL to render a video clip. This is done by drawing a square using polygon and then applying a texture, the video frame, on that polygon. Doing that will let the hardware scale everything. But I have a real performance problem.
The QGraphicsScene has a timer that will get the next frame and then call update. It also will emit a signal telling the new frame number. There are one other widget that will listen to this signal and update a QLabel with how many seconds have been played. A QSlider is also updated to visualize how far in the movie we are. Doing these two updates will slow down the application extreme.
When playing a clip with 60 fps and NOT updating the QLabel and QSlider I can see that the timer will generate a signal each 16 mS (exactly what the timer is set on). But when updating the QLabel/QSlider it will take between 30-40 mS between the timer timeout even though it is set to 16 mS.
I think I've made som thread problem, but can not really figure it out.
Bookmarks