Render same video on 2 different surfaces
Basically I'm trying to render the same video source onto 2 locations in my window, using QtMultimedia5.
I'm doing it in QML, but if there is a solution in C++ I will be happy to implement it instead.
What I see is happening is that QMediaService::requestControl is called, which returns a QVideoRendererControl object. Then QVideoRendererControl::setSurface is called to set the surface to which it renders the video.
So from what I gather QMediaService has one surface to which it renders the video.
How can I render to 2 surfaces or more?
Well, this was fairly simple, not the way I expected though. You gotta love QtQuick2.
So I have a MediaPlayer source and a VideoOutput item in my QML code:
All I had to do was just to add a ShaderEffectSource and set tbltSlides as its source. So simple: