[vlc-devel] [PATCH 03/34] video context: add a function to test if 2 context are similar
Steve Lhomme
robux4 at ycbcr.xyz
Wed Nov 13 08:09:23 CET 2019
On 2019-11-12 16:23, Rémi Denis-Courmont wrote:
> Le tiistaina 12. marraskuuta 2019, 17.06.46 EET Steve Lhomme a écrit :
>> On 2019-11-12 11:23, Rémi Denis-Courmont wrote:
>>> VDPAU buffers are tied to a VDPAU device instance. You cannot use them
>>> across different VLC video contexts. I doubt you can do that with NVDEC
>>> either.
>>>
>>> It might be possible with DRM or maybe not, but even then I doubt that
>>> the similarity callback can actually be implemented...
>>>
>>> So I don't really see the point over a straight pointer equality test.
>>
>> A video context created from a decoder device is likely to be compatible
>> with another video context created from the same decoder device. This
>> works in NVDEC and in D3D11. Decoder devices can probably check for
>> equality with just a pointer.
>
> Well it could be. But then again, I don't exactly follow why you would have
> separate video contexts for the same decoder device. At least in VDPAU, device
> and context are essentially the same thing (a VdpDevice handle and its
> dispatch table). I would think NVDEV would work the same way.
>
> Do we actually have a case where the video context will wrap some child object
> of the decoder device, and not the same thing?
In D3D11 (and to a lesser extent D3D9) the decoder device creates the
resources (ID3D11Device), the video context allows doing action on the
resources ((ID3D11DeviceContext). It's possible to use resources from
the same ID3D11Device on different ID3D11DeviceContext.
It's also possible to use resources from different ID3D11Device in
certain condition (they are on the same GPU). A callback in the video
context can verify that.
More information about the vlc-devel
mailing list