cplussharp / graph-studio-next

GraphStudioNext is a tool for developers to build and test DirectShow Graphs
355 stars 94 forks source link

Performance test playback window should close on stop #308

Open mirh opened 7 years ago

mirh commented 7 years ago

IMHO. I totally don't see the point in a black window standing still there.

mikecopperwhite commented 7 years ago

Thanks for the report.

Again this seems to be the standard windowing behaviour for some video renderer filters. AFAICT it's up to the filter how to manage any created windows. Most system renderers leave the windows visible when stopping. Not something GSN can change really.

mirh commented 7 years ago

Well, doesn't graphstudio know when benchmark has ended? I mean, this is not "our" actual technical problem then, but since for the love of me I cannot see a single case where keeping said window open would matter.. Can't we just kill it?

mikecopperwhite commented 7 years ago

If this was a standalone application then what you say makes perfect sense.

However GSN is a testbed application for DirectShow developers testing graphs and filters. On the whole GSN tries not to override default filter behaviour without showing some sort of UI cue that the behaviour has been customised by the application. When we start getting too clever it can interfere with this purpose. For example in #issue 291 GSN was doing something custom and non-standard with clock setting on new graphs which caused incorrect behaviour and needed to be removed.

You could add an option on the dialog for closing the video renderer window at the end of performance testing (the performance testing dialog knows when this happens) but it would probably involve querying for video renderer specific COM interfaces to get the window handle or some sort of hacky search for a window with a specific window title or window class and would only work with specific video renderers. What would happen with other video renderers that play full screen or use multiple or no windows or actually display meaningful images after playback has stopped? It seems niche and bit dirty to me...

mirh commented 7 years ago

Mhh, I totally see your point and I'd even close the issue now then. But first, I wonder if at least in the case of LAV (where people owns sauces!) pinging their guys for an opinion would be worth it?

I mean, if not to cross-check what you said, at least to know if on their part anybody would mind to implement some.. stupidity to fix this even stupider nuisance.

mikecopperwhite commented 7 years ago

I'm guessing here you mean the 'LAV video decoder' filter. I'm not aware of an LAV video renderer filter.

Changing the LAV video decoder filter wouldn't help as the playback window is created and destroyed by the renderer filter and is independent of the decoder filter that's being used. The DirectShow architecture deliberately limits the extent of interactions between filters (and that's a very good thing!).

mirh commented 7 years ago

I'm guessing here you mean the 'LAV video decoder' filter. I'm not aware of an LAV video renderer filter.

Yes, sorry if I confuse labels.

Changing the LAV video decoder filter wouldn't help as the playback window is created and destroyed by the renderer filter and is independent of the decoder filter that's being used.

Ohh, I see. I wonder if we couldn't workaround it somehow else "externally" (ie not touching directshow) then?