core(libva): use dynamic loader#19562
Conversation
|
Checked with this MediaStack: https://github.com/Intel-Media-SDK/MediaSDK/releases/tag/intel-mediasdk-20.5.1 Env setupRunning the sampleNo dependency on libva |
|
VADisplay (VAAPI context) contains v-table of all VAAPI functions. VAAPI experts confirm that v-table guarantees backward compatibility. Should be safe to use v-table starting VAAPI 1.0 which dated Oct 21, 2017. Not sure if ok to support only VAAPI>=1.0 in OpenCV, or use universal dlopen().. |
|
@mikhail-nikolskiy , I think the method with vtable requires runtime libva version checks. Otherwise there can be situation when the library built with fresh libva would expect some new method exists and slightly older libva loaded in runtime would not have this field in vtable. This situation is partially handled by #if VERSION > XX // new_function added in XX
if (ctx->version > XX)
ctx->new_function()
else
#endif
cerr << "Not implemented" << endl;We have somewhat similar code for example in OSX AVFoundation integration: opencv/modules/videoio/src/cap_avfoundation_mac.mm Lines 330 to 332 in 504ff97 Currently |
|
@mikhail-nikolskiy Thank you for the information! Unfortunately we still need to support configurations/platforms with old libva versions:
|
Uh oh!
There was an error while loading. Please reload this page.