d3dvideosink: bufferpool implementation does not work well with device-lost/resets
Submitted by Sebastian Dröge
+++ This bug was initially created as a clone of Bug 697868 +++
Resizing requires resetting the device and all the resources allocated to this
d3d pool if we use the default pool. I believe that using a managed pool
instead allows resources to persists in a device reset:
"Use the D3DPOOL_MANAGED flag at creation time to specify a managed resource.
Managed resources persist through transitions between the lost and operational
states of the device. These resources exist both in video and system memory. A
managed resource will be copied into video memory when it is needed during
rendering. The device can be restored with a call to IDirect3DDevice9::Reset,
and such resources continue to function normally without being reloaded with
data. However, if the device must be destroyed and re-created, all resources
must be re-created."
We should also be using the managed for devices lost, and not recreate the
device as it's done now but only reset it to reuse the existent resources.
We should probably disable allowing usage of the pool outside d3dvideosink for 1.2, and then find a real solution that allows us to still continue to work zerocopy.