From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 5D73543BAC for ; Wed, 20 Jul 2022 10:56:56 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F1D6268B5B3; Wed, 20 Jul 2022 13:56:53 +0300 (EEST) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4A6F768B4F7 for ; Wed, 20 Jul 2022 13:56:48 +0300 (EEST) Received: by mail-wr1-f49.google.com with SMTP id h8so2854373wrw.1 for ; Wed, 20 Jul 2022 03:56:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EiI5RUxzSe+dyW0S7UWWFU7/2uPkCqSEkS/eUENPLDk=; b=nxJ4bPftaiKreBFe237kS8VM1qWrQaBa7A8TTC3C/mVd/i8ssIdsL0Yg8JhPaeH2Qm VGaqC4YMRNIaWdYczOmMZtMhDSPmZBfBhiHK9LOcuqixZWkcSyH+UZSMAyfHw3HdVCcI RKKD+es+M7MNSBWsWYqLh/eKvIzuK5J97gjS60CUcn5gaEHeTpIqDWjQv7ERW3Qbbe/M b6JPMQZJmIxWJ3GJLc5z2YxBujP7AilFZLgTY8dx7B5iY99LOgxKlcxwtphtXnFWYBOX lD6oCIPMXaG5fe/HgCt4azEgRriVV/Vn9cQvPoCamUkOdie+dJi1+1pkMn3fHwihl9gy B2lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EiI5RUxzSe+dyW0S7UWWFU7/2uPkCqSEkS/eUENPLDk=; b=WVN12mc7QdUw2W/8iaazkr9iQFWRCzp6Itc7PPIJolZ5OooQhWKGTp+YiG38wU5ffS KsNODxRSZ4MunD+G4NH2Jgy8oOoPzbc5gMwduLxkA5ns6T/kA/xwFUBp9rtyyBUvXSNm qtIyEClqihueGK5w9bCCE4BPB/bsPE6153eCeU6wfOLWmrLnNtwHp/47lhVMoWW2msmr yWO5qmcc0sZRVFFjsrr7gR04yM4A5nGv7Qef5uj8ttcIgNoEoxYTgoxh/6rn8q/FFY/w MsliGpAUqJV3EGqSAwH3O27Fq6GWwEuNzv72UJLxT7iLnV2d9aL08RAJOIMwl25ur1Gt 45kg== X-Gm-Message-State: AJIora8bcbDKgPq+By5tb9NdP+UND6pZQRWooOivJ4/6yQ+5nga6OUuC on65U92lLyYH+YsXWwFhVj6e7AfMVdNz9Q== X-Google-Smtp-Source: AGRyM1syXnopAW7XbT071v+gobpsd4zpjeY9Sb+jdXkqL7kwHWNOsZzoHaSR7rNmYC+gpEVSOa6R3g== X-Received: by 2002:a5d:6c6f:0:b0:21d:c28a:2f99 with SMTP id r15-20020a5d6c6f000000b0021dc28a2f99mr24960890wrz.448.1658314607347; Wed, 20 Jul 2022 03:56:47 -0700 (PDT) Received: from localhost ([2a00:5f00:102:0:a792:c012:897f:7da6]) by smtp.gmail.com with UTF8SMTPSA id u17-20020a5d5151000000b0021d7799cf4csm15456744wrt.61.2022.07.20.03.56.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Jul 2022 03:56:46 -0700 (PDT) From: Emil Velikov To: ffmpeg-devel@ffmpeg.org Date: Wed, 20 Jul 2022 11:56:43 +0100 Message-Id: <20220720105646.716398-1-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.37.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 0/3] hwcontext_vaapi: dlopen libva-x11 and libva-drm X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Mark Thompson , emil.l.velikov@gmail.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Greetings everyone, As you may know the libva* set of libraries share an internal ABI between them. In a resent libva commit, the va_fool API was removed. Thus if one is to mix different versions of libva.so and libva-x11.so they will get an error, leading to a crash of the whole stack. The simple solution is to dlopen() the winsys components, like libva-x11 and libva-drm. The changes are pretty minor and allow us to handle this king of issues. Comments and suggestions are welcome, but please me gentle it's my first time hacking on ffmpeg :-P Thanks Emil Aside: - Please consider backporting it to the stable branches in due time. - I've noticed that we leak state in the error paths, happy to send follow-up patches if you'd like those fixed. - My TODO includes reducing the massive ABI between libva* and backend drivers, to a single extra "registration" API entrypoint. --- Changes in v2: - Add libdl dependency, to address underlinking with older glibc Emil Velikov (3): hwcontext_vaapi: do not link against libva-x11.so hwcontext_vaapi: do not link against libva-drm.so hwcontext_vaapi: #if guard VAAPI_DRM specifics configure | 3 +- libavutil/hwcontext_vaapi.c | 92 +++++++++++++++++++++++++++++++++++-- 2 files changed, 91 insertions(+), 4 deletions(-) -- 2.37.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".