I'm working on a multimedia player for windows, using Directshow, GMFLBridge and Qt. It has multiple playlist windows which have their own render widget.
For design reasons, I have multiple graphs running, one for each playlist. I can't have 2 players running at the same time (the render widget is for seeking), because, among them, there is a special graph that does some special work and contains a filter
that can't be used in more than one graph.
When I hit "play" on a playlist, the application must request this special graph and set its render widget so that it shows the video as the special operation runs.
So, when I hit play on a playlist window, if I don't already "own" the special graph, I get it, and make it swap widgets with my current "normal" widget.
//Get the handles
HWND oldOwnerHandle = decoders.value(currentDeviceOwner)->getCurrentPreviewHandle();
HWND newOwnerHandle = decoders.value(owner)->getCurrentPreviewHandle();
//Stop the graphs
//swap the previews and restart the graphs
The startGraphs method actually cues them, making them go from Stopped state to Paused, but when I start the special graph,
it starts rendering on the old widget for a few frames before rendering on the new widget.
At first I created my graphs using the Video Renderer Filter as the render filter for the widget, but I already tried with the VMR-7 (Video Mixing Renderer 7) in both windowed and windowless modes and achieved the same results.
With the windowed mode, I used IVideoWindow::put_Owner method, and with the VMR windowless mode, the
I suspect that even stopping the graphs doesn't entirely flushes it. Is there a way I can achieve what I want?