On 11/25/20 12:29 AM, Derek Lesho wrote:
Signed-off-by: Derek Lesho dlesho@codeweavers.com
I'm not sure if this is too many of too few tests, and if the kinds of tests I have here are wanted. I was going to add tests for MF_ENUMERATE_SOURCE_TYPES and MF_CONNECT_RESOLVE_INDEPENDENT_OUTPUTTYPES, but they got really large, and didn't really prove much beyond what is already documented in the MSDN. Another test I chose to leave out is for what happens on topologies with sources without a currently selected media type, since Microsoft is pretty clear that will never happen.
No, I agree. I'm fine with leaving these enumeration tweaks out for now, we will add them later if we find something using them (might be a good idea to put out a warning in Load() on such attributes, but that's clearly optional). Trying to test permutations we might never get in practice is not very interesting for initial tests.
The test in this patch is fine in principle, and that's what we should stick to for partial topology in initial tests: (source) -> (sample grabber). Next could be (source) -> (SAR) and (source) -> (EVR).
What I found is that this could be simplified because source instance is in fact unnecessary. Everything seems to work exactly the same without MF_TOPONODE_SOURCE, which makes sense. That opens a possibility for more compact tests in a form of [ input type, output type ] pairs + additional arguments as connect method, etc. This way we can easily extend them to trigger converters using mismatching subtypes or similar.