utility: Add function to check for broken property groups

Even though property groups are supported in 23.x and above, there are quite a few bugs that result in completely bonkers behavior. So this function can be used to get the version of the currently running obs-studio.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2019-07-22 02:15:35 +02:00
parent 69f7afef1f
commit e1fbfd707c
+13
View File
@@ -19,6 +19,11 @@
#include "version.hpp"
extern "C" {
#include <obs-config.h>
#include <obs.h>
}
// Logging
#define PLOG(level, ...) blog(level, "[obs-ffmpeg-encoder] " __VA_ARGS__);
#define PLOG_ERROR(...) PLOG(LOG_ERROR, __VA_ARGS__)
@@ -71,3 +76,11 @@
static void f(void) __attribute__((constructor)); \
static void f(void)
#endif
// Helpers
namespace obsffmpeg {
bool inline are_property_groups_broken()
{
return obs_get_version() < MAKE_SEMANTIC_VERSION(24, 0, 0);
}
} // namespace obsffmpeg