[FFmpeg-devel] [PATCH] hwcontext: add av_hwdevice_ctx_create_derived2

James Almer jamrial at gmail.com
Mon May 11 15:55:47 EEST 2020


On 5/11/2020 7:25 AM, Lynne wrote:
> This allows for users who derive devices to set options for the 
> new device context they derive.
> The main use case of this is to allow users to enable extensions
> (such as surface drawing extensions) in Vulkan while deriving from
> the device their frames are on. That way, users don't need to write
> any initialization code themselves, since currently Vulkan prevents
> mixing instances and devices.
> Also, with this, users can also set custom OpenCL extensions such
> as cl_khr_gl_sharing and cl_khr_gl_depth_images.
> Apart from OpenCL and Vulkan, other hwcontexts ignore the opts
> argument since they don't support options at all (or in VAAPI's case,
> options are only used for device selection, which device_derive overrides).
> 
> Patch attached.

Could this be av_hwdevice_ctx_create_derived_dict() or similar, please?
The 2 suffix is pretty ugly and it would be nice if we can avoid adding
more of them.


More information about the ffmpeg-devel mailing list