diff --git a/src/pipewire/pipewire.c b/src/pipewire/pipewire.c index 73caa3b24..1192a1a7e 100644 --- a/src/pipewire/pipewire.c +++ b/src/pipewire/pipewire.c @@ -838,6 +838,12 @@ const char* pw_get_library_version(void) return pw_get_headers_version(); } +SPA_EXPORT +bool pw_check_library_version(int major, int minor, int micro) +{ + return PW_CHECK_VERSION(major, minor, micro); +} + static const struct spa_type_info type_info[] = { { SPA_ID_INVALID, SPA_ID_INVALID, "spa_types", spa_types }, { 0, 0, NULL, NULL }, diff --git a/src/pipewire/version.h.in b/src/pipewire/version.h.in index 89601fe36..87fc0cfad 100644 --- a/src/pipewire/version.h.in +++ b/src/pipewire/version.h.in @@ -20,6 +20,10 @@ it. */ * linked to. */ const char* pw_get_library_version(void); +/** Return TRUE if the currently linked PipeWire library version is equal + * or newer than the specified version. Since 0.3.75 */ +bool pw_check_library_version(int major, int minor, int micro); + /** The current API version. Versions prior to 0.2.0 have * PW_API_VERSION undefined. Please note that this is only ever * increased on incompatible API changes! */