Thanks for the patches! I have a few comments:
* In 1/4, let's please replace the FIXME with a TRACE instead of deleting it. And because I'm particular about trace format, I'd like to prescribe the following:
TRACE("filter %p, code %#x, param1 %#Ix, param2 %#Ix.\n", filter, code, param1, param2);
* 2/4 could use a more descriptive title, along the lines of "recreate surfaces".
* I don't like the idea of calling vmr_connect() / vmr_disconnect() directly. Also, I wouldn't guess we need to mess with the window position and size since it should be the same. In practice I think all we should need to do is call allocate_surfaces(), as well as factoring out and calling an equivalent function from vmr_disconnect().
* We shouldn't need to save or reconstruct the connection media type; it's stored in the pin (filter->renderer.sink.pin.mt). Yes, this means that filter->bmiheader is redundant, especially when we have get_bitmap_header().
* In 4/4, you create a second device but don't actually use it, I assume by accident? Also, "out of memory" is... a bit odd; I'd just write "Failed to create device."