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

Lynne dev at lynne.ee
Tue May 12 22:16:32 EEST 2020


May 11, 2020, 14:09 by dev at lynne.ee:

> May 11, 2020, 13:55 by jamrial at gmail.com:
>
>> 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.
>>
>
> Sure, changed locally to av_hwdevice_ctx_create_derived_opts.
>

I've been testing and running this code for the past 2 days, planning to push this tomorrow if no one LGTMs.
The patch with said name change is attached.

Thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-hwcontext-add-av_hwdevice_ctx_create_derived_opts.patch
Type: text/x-patch
Size: 11484 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200512/fdd2e64f/attachment.bin>


More information about the ffmpeg-devel mailing list