From 9c05be8999a77deea056c8c4952ab37756d05ce2 Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Sat, 28 Dec 2019 12:58:39 -0800 Subject: video: cuda: add explicit context creation for copy hwaccels In the distant past, the cuviddec backed copy hwaccel could be configured directly using lavc options. However, since that time, we gained support for automatic hw ctx creation which ended up bypassing the lavc options. Rather than trying to find a way to pass those options again, a better idea is to make the 'cuda-decode-device' option, used by the interop hwaccels, work for the copy hwaccels too. And that's pretty simple: we have to add a create function that checks the option and passes it on to ffmpeg. Note that this does require a slight re-jig to the configuration flags, as we now have a scenario where we want to build with support for the cuda copy hwaccels but not the interop ones. So we need a distinct configuration flag for that combination. Fixes #7295. --- wscript_build.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'wscript_build.py') diff --git a/wscript_build.py b/wscript_build.py index 3d772a31fb..3d901df3fb 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -410,6 +410,7 @@ def build(ctx): ## Video ( "video/csputils.c" ), + ( "video/cuda.c", "cuda-hwaccel" ), ( "video/d3d.c", "d3d-hwaccel" ), ( "video/decode/vd_lavc.c" ), ( "video/filter/refqueue.c" ), @@ -460,9 +461,9 @@ def build(ctx): ( "video/out/gpu/utils.c" ), ( "video/out/gpu/video.c" ), ( "video/out/gpu/video_shaders.c" ), - ( "video/out/hwdec/hwdec_cuda.c", "cuda-hwaccel" ), - ( "video/out/hwdec/hwdec_cuda_gl.c", "cuda-hwaccel && gl" ), - ( "video/out/hwdec/hwdec_cuda_vk.c", "cuda-hwaccel && vulkan" ), + ( "video/out/hwdec/hwdec_cuda.c", "cuda-interop" ), + ( "video/out/hwdec/hwdec_cuda_gl.c", "cuda-interop && gl" ), + ( "video/out/hwdec/hwdec_cuda_vk.c", "cuda-interop && vulkan" ), ( "video/out/hwdec/hwdec_vaapi.c", "vaapi-egl || vaapi-vulkan" ), ( "video/out/hwdec/hwdec_vaapi_gl.c", "vaapi-egl" ), ( "video/out/hwdec/hwdec_vaapi_vk.c", "vaapi-vulkan" ), -- cgit v1.2.3