1

This is QT5. Its on an embedded Yocto system, with QT drawing to the framebuffer, no X11. The problem is this. I want to play a video using gstreamer. So, I tried to launch gstreamer with gst-launch-1.0 linked to a touch event in QT. Problem is, it flickers as QT also tries to render frames.

Next, we tried Q media player. However, this proprietary gstreamer doesn't support playbin, so, I went into QGstreamerPlayerSession and modified the constructor to use gst_parse_launch to set up my pipeline instead of playbin.

This works, in that my video plays. However, there is still the same flickering! I tried to throw up a white rectangle before launching the video, but it still flickers.

How could I prevent QT from redrawing? Do I need an empty scene before playing the video? Or is there a function call to pause redrawing?

I could of course send a SIGSTOP to QT, play the video in an external application, then resume with a SIGCONT. That works, but is obviously a very inelegant and restrictive solution (I need the app to be processing in the background still as its controlling other things as well).

Alexander V
  • 8,351
  • 4
  • 38
  • 47
bodangly
  • 2,473
  • 17
  • 28
  • Without your environment it is a guessing game. But I assume that the screen output is actually responsible. The flicker may happen due to no sync between frame rate and display rate if not handled properly and/or the background drawing surface getting invalidated as well. Usually there is no flicker if video is rendered to OpenGL surface but it is not clear what kind of surface the program is rendering to. – Alexander V Sep 24 '17 at 04:07
  • Its direct to the framebuffer. So QT is drawing to /dev/fb0 at the same time as the video. The "flicker" is me seeing the QT output periodically between video frames. So my question is how to get QT to stop rendering / prevent QT from thinking the screen needs a refresh? – bodangly Sep 24 '17 at 14:50
  • https://stackoverflow.com/questions/20720134/put-graphics-on-the-screen-without-dev-fb0 – Alexander V Sep 24 '17 at 15:38
  • @AlexanderVX not sure how that has anything to do with my problem. Again, my issue is that I need to be able to play a video in a framebuffer without Qt interfering by drawing frames as well. If it is not possible to suspend Qt's rendering loop manually, I am wondering if there is another method or scene architecture that would cause Qt to not redraw anything. – bodangly Sep 26 '17 at 03:17
  • I do QML video output and through the framebuffer and also through normal image paint. Consider http://doc.qt.io/qt-5/qquickpainteditem.html and this answer https://stackoverflow.com/questions/46187024/openscenegraph-integration-into-qt-quick/46201000#46201000 But set `renderTarget` to `Image` and not `FramebufferObject`. Does this qualify for an answer? – Alexander V Sep 26 '17 at 03:24

0 Answers0