qtqtgstreamer

QGstreamer VideoWidget takes over entire screen


I am trying to embed a QGst::Ui::VideoWidget into my application. When I do, the video plays correctly, but the rest of the window is blacked out. I am building a pipeline with the "fromDescription" function, using a basic "playbin" to play an h.264-encoded file.

When I initialize everything except the pipeline, everything appears as it should, with empty black rectangles where the video would otherwise be playing. With the pipeline initialized, however, the videos play in the rectangles, but everything else is completely blacked out, with the exception of some artifacting when moving the window.

How do I restrict QGstreamer from overpainting in the areas of parent and "cousin" classes?

I am using Qt 5.9, Qt5-Gstreamer-1.0, and my environment is in Fedora 25 with no hardware video acceleration (Virtualbox).


Solution

  • I have figured it out (simple mistake), and here it is to avoid the ol' xkcd 979...

    Basically, make sure that you set the parents in the constructor for every single element. If you don't, things will seem to kind of work, but they won't.