pipewire: add method to check linked library version

This commit is contained in:
Wim Taymans 2023-07-13 12:11:27 +02:00
parent 01b5bc443f
commit 0ee64c6fd3
2 changed files with 10 additions and 0 deletions

View file

@ -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 },

View file

@ -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! */