Skip to content

videoio: plugins API versioning#19027

Merged
opencv-pushbot merged 1 commit intoopencv:masterfrom
alalek:videoio_plugins_api_versioning
Dec 24, 2020
Merged

videoio: plugins API versioning#19027
opencv-pushbot merged 1 commit intoopencv:masterfrom
alalek:videoio_plugins_api_versioning

Conversation

@alalek
Copy link
Copy Markdown
Member

@alalek alalek commented Dec 6, 2020

Revised support for plugin API versioning.

RFC

/cc @mshabunin @asmorkalov @joshdoe

Thanks for looking at these and providing feedback.

To be merged after the current release.

Copy link
Copy Markdown
Member Author

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It make sense to split on 2 interfaces for VideoCapture and VideoWriter

CV_Assert(plugin_api);
CvPluginWriter writer = NULL;
if (plugin_api->api_header.api_version >= 1 && plugin_api->Writer_open_with_params)
if (plugin_api->api_header.api_version >= 1 && plugin_api->v1.Writer_open_with_params)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v0 access doesn't require api_version checks
v1+ access requires api_version check and compatibility warnings about missing features CV_LOG_WARNING(... due to lower API level)

Comment on lines +1842 to 1844
#define ABI_VERSION 0
#define API_VERSION 1
#include "plugin_api.hpp"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ABI_VERSION / API_VERSION must be defined on plugins size (defined(BUILD_PLUGIN)) before including plugin_api.hpp

@mshabunin
Copy link
Copy Markdown
Contributor

Looks like we forgot to add ABI/API macros to the mfx plugin

#define ABI_VERSION 0
#define API_VERSION 0

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Jan 14, 2021

Please check fix here: #19321

@alalek alalek mentioned this pull request Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants