[vlc-devel] Direct3D9 + DXVA direct rendering

Steve Lhomme robux4 at gmail.com
Mon Apr 13 18:13:31 CEST 2015


On Mon, Apr 13, 2015 at 5:17 PM, Steve Lhomme <robux4 at gmail.com> wrote:
> 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.

The vout (D3D9) is created in a different thread than the one the
decoder (DXVA). The data passed to create this vout are all in a
vout_display_cfg_t.

That configuration struct is passed in VoutCreate()
http://git.videolan.org/?p=vlc.git;a=blob;f=src/video_output/video_output.c;h=43ff7ade61da22bb992b91729609bd32914bdde9;hb=HEAD#l113

And it's created in RequestVout() from the input resources
http://git.videolan.org/?p=vlc.git;a=blob;f=src/input/resource.c;h=34402885ec500db3ed22f7c8e431d96ed30d1cca;hb=HEAD#l232

So far at that level we have :
- an input_resource_t which doesn't contain much interresting stuff
- vout_thread_t irrelevant (NULL in this case)
- a video_format_t, in which we could have a video_format_sys_t where
we can share data between the decoder and the renderer
- the dpb_size
- a b_recycle flag

I added decoder_sys_t because that's the lowest level thing that is
known to the decoder when it calls input_resource_RequestVout().

The inside of decoder_sys_t is opaque in decoder.c so we can't reach
the vlc_va_t and vlc_va_sys_t that are really useful.



More information about the vlc-devel mailing list