mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 09:52:17 +00:00
hwcontext_vulkan: do not require libdrm to map VAAPI devices
VAAPI is sadly on the way of becoming multiplaform.
This commit is contained in:
parent
f50bc930a4
commit
e11fd1abdb
@ -42,14 +42,17 @@
|
|||||||
#include "vulkan.h"
|
#include "vulkan.h"
|
||||||
#include "vulkan_loader.h"
|
#include "vulkan_loader.h"
|
||||||
|
|
||||||
|
#if CONFIG_VAAPI
|
||||||
|
#include "hwcontext_vaapi.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if CONFIG_LIBDRM
|
#if CONFIG_LIBDRM
|
||||||
|
#if CONFIG_VAAPI
|
||||||
|
#include <va/va_drmcommon.h>
|
||||||
|
#endif
|
||||||
#include <xf86drm.h>
|
#include <xf86drm.h>
|
||||||
#include <drm_fourcc.h>
|
#include <drm_fourcc.h>
|
||||||
#include "hwcontext_drm.h"
|
#include "hwcontext_drm.h"
|
||||||
#if CONFIG_VAAPI
|
|
||||||
#include <va/va_drmcommon.h>
|
|
||||||
#include "hwcontext_vaapi.h"
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_CUDA
|
#if CONFIG_CUDA
|
||||||
@ -1627,7 +1630,6 @@ static int vulkan_device_derive(AVHWDeviceContext *ctx,
|
|||||||
* by the following checks (e.g. non-PCIe ARM GPU), having an empty
|
* by the following checks (e.g. non-PCIe ARM GPU), having an empty
|
||||||
* dev_select will mean it'll get picked. */
|
* dev_select will mean it'll get picked. */
|
||||||
switch(src_ctx->type) {
|
switch(src_ctx->type) {
|
||||||
#if CONFIG_LIBDRM
|
|
||||||
#if CONFIG_VAAPI
|
#if CONFIG_VAAPI
|
||||||
case AV_HWDEVICE_TYPE_VAAPI: {
|
case AV_HWDEVICE_TYPE_VAAPI: {
|
||||||
AVVAAPIDeviceContext *src_hwctx = src_ctx->hwctx;
|
AVVAAPIDeviceContext *src_hwctx = src_ctx->hwctx;
|
||||||
@ -1644,6 +1646,7 @@ static int vulkan_device_derive(AVHWDeviceContext *ctx,
|
|||||||
return vulkan_device_create_internal(ctx, &dev_select, opts, flags);
|
return vulkan_device_create_internal(ctx, &dev_select, opts, flags);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#if CONFIG_LIBDRM
|
||||||
case AV_HWDEVICE_TYPE_DRM: {
|
case AV_HWDEVICE_TYPE_DRM: {
|
||||||
AVDRMDeviceContext *src_hwctx = src_ctx->hwctx;
|
AVDRMDeviceContext *src_hwctx = src_ctx->hwctx;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user