On Wed Apr 3 20:25:54 2024 +0000, Nikolay Sivov wrote:
Allocators are associated with stream sinks, and yes, they are provided by sink components normally I think. The situation with d3d11_aware could be different because there is no builtin d3d11 renderer, for some reason. What happens if you do source -> decoder-with-optional-d3d-decoding -> sample grabber? Does that resolve to a topology with d3d(11)_aware attributes set? If it doesn't that still could mean that session enables it itself. That should be visible in final topology, or actually you can see that yourself by checking decoder attributes before are after.
I will try that, but fwiw I'm pretty sure that every MFT has its own allocator, initialized from the device manager that is passed on initialization. I'm not sure that sinks even need or have one.
This has visible side effect that after receiving a device manager, the MFT (h264 decoder, video processor, etc...) changes its stream properties to indicate that it will allocate its output samples itself (from the internal allocator it has initialized).
It also uses the MFT attributes and output stream attributes (that application can, and do modify through IMFTransform_GetAttributes and IMFTransform_GetOutputStreamAttributes) to control the allocator initialization parameters.