[FFmpeg-devel] [PATCH v3 2/2] fftools/ffplay: add hwaccel decoding support

Lynne dev at lynne.ee
Sun Oct 29 05:18:32 EET 2023


Oct 29, 2023, 03:31 by quinkblack at foxmail.com:

>
> On 2023/10/29 03:32, Lynne wrote:
>
>> Oct 28, 2023, 20:14 byquinkblack at foxmail.com:
>>
>
> Fixed in patch v4.
>
> Maybe we should export optional_device_exts in API.
>

Patch welcome.


>>
>> Is there no option to let libavutil create the hwdevice for both SDL and libplacebo?
>> That way, that code path can also be tested.
>>
>
> libplacebo doesn't support that:
>

It does. It's how vf_libplacebo runs, and I also use it in my sample library (txproto).
You should do it this way.


> // Creates a new vulkan device based on the given parameters and initializes
> // a new GPU. This function will internally initialize a VkDevice. There is
> // currently no way to share a vulkan device with the caller. If `params` is
> // left as NULL, it defaults to &pl_vulkan_default_params.
> //
> // Thread-safety: Safe
> PL_API pl_vulkan pl_vulkan_create(pl_log log, const struct pl_vulkan_params *params);
>
> I think share instance or vkImage without support from vulkan spec is hard to implementation,
>
> if not impossible.
>
> https://www.yosoygames.com.ar/wp/2022/07/vulkan-integration-between-multiple-libraries-e-g-qt-ogrenext/
>

That's why we have locking callbacks for AVVkFrame, and for VkQueues.
It's all done for you, as long as you use the pl_map_avframe_ex().


More information about the ffmpeg-devel mailing list