About error handling, I believe you said elsewhere that error handling wasn't very useful when the only possible errors were memory allocation failures. There's several instances of unchecked `IMFMediaType_Set*`, as well as `session_set_caps` right above which doesn't check anything either. I'm fine adding some, and I generally prefer to not leave any error unchecked, but I thought you preferred not to have these checks.
Regarding IMFCollection vs a custom list, I think it's mostly the same thing, except that IMFCollection and the skipped error checks actually reduce the number of LoC (which I don't think is a very good metric in general anyway). The change also introduces a new `transform_stream_handle_event` helper, and the required dispatch between samples and format change events is what's adding more LoC, and that's not really something we can get rid of. The same MR, but keeping a struct list instead of IMFCollection and checking errors (while still wrapping samples / format changes in IMFMediaEvent) add 20 more lines in total.