On Fri Oct 20 18:43:32 2023 +0000, Zebediah Figura wrote:
I don't understand the point of that autoplug-continue handler. It
looks like it says "yep, I want this" for certain formats, then it turns around and says "no, I don't want this after all, decode it again" in the pad-added signal. I'm sure that complexity exists for some reason, otherwise someone would've deleted it long ago, but... It's recent. The main idea is that we want to know the compressed format, but we don't necessarily want to output it. This is mainly for WM and mfplat, which have an API switch to toggle that. For DirectShow there's no such API switch so it doesn't matter. I'm not sure it's the best design (and I've been thinking about other options), but it's what we have for now.
If you just want to know the format, I'd let decodebin finish construction, then check what's inside. A decodebin is a GstBin, you can just call gst_bin_iterate_elements or something on it.
If you want to be able to switch, like wmvcore!WMCreateSyncReader, I think the best solution would be creating a new decodebin with different target caps.
But that's out of scope for this MR.