Qt: Painting over GStreamer-Sink
Im streaming a video via GStreamer SDK (and XOverlay) into a QWidget. No problems so far. But I want to draw something on top of the video. I'd prefer to be able to draw some transparent OpenGL stuff. But QPainter would be be alright too. Is there any possibility to achieve this? Í heard about people who streamed their video into an OpenGL texture. This would be kind of perfect, so I could first draw the texture and then the overlay elements. But I have no idea to accomplish that and I also heard that this would be kinda slow.
Has anyone experience with this sort of problem?
Im running Windows 7 & 8.1, Qt 5.2.1, GStreamer SDK
I don't know how opengl sink works on windows. On linux it opens a new window which is not controlled by your app.
I think you need to use appsink plugin to get the decoded images and then draw the images using opengl or widget.
I'm using the "real" SDK from http://gstreamer.com.
Do get the video into my QWidget I'm currently using d3dvideosink.
Okay, it seems that appsink is the only option for me atm :/ But I suppose appsink isn't fast enough for 720p 30fps?!
"real" SDK version is 0.10 and maybe too old and does not have latest changes in "real" gstreamer-1.0.
There are articles about using opengl with gstreamer "here":http://lubosz.wordpress.com/2014/06/16/transforming-video-on-the-gpu/ and "here":https://coaxion.net/blog/2014/04/opengl-support-in-gstreamer/ fir example.
[quote]But I suppose appsink isn’t fast enough for 720p 30fps?![/quote]
I guess it depends on how fast an application process the incoming frames. OpenGl may help here.
But I have not use opengl and did not try to use appsink on 720p 30fps so I don't know.