[vlc-devel] [PATCH] core: add a callback to init/release data for picture pool of opaque formats

Steve Lhomme robux4 at videolabs.io
Mon Apr 20 17:25:28 CEST 2015

On Mon, Apr 20, 2015 at 5:20 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le lundi 20 avril 2015, 17:16:40 Steve Lhomme a écrit :
>> The case where "direct rendering" is not possible is already handled.
>> A filter from D3D9 surfaces to I420 planes is automatically added in
>> the chain.
>> In the case of the D3D9 vout there could be a chance that the D3D9
>> device it's using is not the same as the one from DXVA2. That's why
>> this handle is passed to the vout and the vout is created accordingly.
> The video output does not get to decide what device it renders with. It gets a
> window handle from the UI or the embedding application, and has to render with
> a corresponding device.
> So ideally the decoder uses the device it obtains from the output.
> Alternatively, something has to support device-to-device copy.

I already explained that. The device is first created by the DXVA
decoder, regardless of the vout. The only way to have "direct
rendering" with that constraint is to share the D3D9 device it's

Luckily D3D objects have reference counting. So whatever other module
is using shared objects, it can addref/release the object. And the
order of use by modules doesn't cause any problem.

More information about the vlc-devel mailing list