d3dvideosink: bufferpool implementation does not work well with device-lost/resets
@slomo
Submitted by Sebastian Dröge Link to original bug (#706566)
Description
+++ 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:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb147168(v=vs.85).aspx
"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.
Version: 1.x