[vlc-devel] Direct3D9 + DXVA direct rendering

Steve Lhomme robux4 at gmail.com
Mon Apr 13 17:17:57 CEST 2015


I am working on having D3D9 using the surfaces directly from DXVA
without copying data to the CPU. It is now working but before I
commit, and to avoid wasting everybody's time, I'll like to know the
proper way of doing some things.

For this to work, D3D9 and DXVA need to use the same D3D9 object and
the same device object. So I am passing a decoder_sys_t object to the
vout. The exact type of the (otherwise opaque) decoder_sys_t is shared
between the two.

While this is primarily working, when closing VLC I get all sorts of
crashes with threads using dead pointers. For example the surfaces
pushed in the display FIFO belong to the decoder. So if the decoder is
closed, there are some picture_t in the FIFO pointing to invalid data.
If they belonged to the vout then the decoder wouldn't work if the
vout not available or reset for some reason.

Maybe creating a vlc_object_t for the surface pool on which they would
both hold a reference could help ?



More information about the vlc-devel mailing list