mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 11:40:08 +00:00
GPUJPEG: check minor version compat
Check only minor version on runtime (using GPUJPEG_VERSION_INT).
This commit is contained in:
@@ -2175,8 +2175,8 @@ AC_ARG_ENABLE(gpujpeg,
|
||||
[gpujpeg_req=$build_default])
|
||||
|
||||
|
||||
PKG_CHECK_MODULES([LIBGPUJPEG_ANY], [ libgpujpeg ], [ found_gpujpeg_any=yes ], [ found_gpujpeg_any=no ])
|
||||
PKG_CHECK_MODULES([LIBGPUJPEG], [ libgpujpeg >= 0.11 ], [ found_gpujpeg=yes ], [ found_gpujpeg=no ])
|
||||
PKG_CHECK_MODULES([LIBGPUJPEG_ANY], [libgpujpeg], [ found_gpujpeg_any=yes ], [ found_gpujpeg_any=no ])
|
||||
PKG_CHECK_MODULES([LIBGPUJPEG], [libgpujpeg >= 0.12.0], [ found_gpujpeg=yes ], [ found_gpujpeg=no ])
|
||||
|
||||
if test "$found_gpujpeg_any" = yes -a "$found_gpujpeg" = no; then
|
||||
AC_MSG_WARN([Old GPUJPEG version found, please upgrade]);
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#if LIBGPUJPEG_API_VERSION < 11
|
||||
#error "GPUJPEG API 10 or more requested!"
|
||||
#if GPUJPEG_VERSION_INT == 0
|
||||
#error "Old GPUJPEG API detected!"
|
||||
#endif
|
||||
|
||||
#define MOD_NAME "[GPUJPEG enc.] "
|
||||
@@ -446,9 +446,10 @@ state_video_compress_gpujpeg *state_video_compress_gpujpeg::create(struct module
|
||||
|
||||
struct module * gpujpeg_compress_init(struct module *parent, const char *opts)
|
||||
{
|
||||
if (gpujpeg_version() != LIBGPUJPEG_API_VERSION) {
|
||||
if (gpujpeg_version() >> 8 != GPUJPEG_VERSION_INT >> 8) {
|
||||
LOG(LOG_LEVEL_WARNING) << "GPUJPEG API version mismatch! (" <<
|
||||
gpujpeg_version() << " vs " << LIBGPUJPEG_API_VERSION << ")\n";
|
||||
gpujpeg_version_to_string(gpujpeg_version()) << " vs " <<
|
||||
gpujpeg_version_to_string(GPUJPEG_VERSION_INT) << ", required same minor version)\n";
|
||||
}
|
||||
struct state_video_compress_gpujpeg *s;
|
||||
|
||||
|
||||
@@ -122,9 +122,9 @@ static int configure_with(struct state_decompress_gpujpeg *s, struct video_desc
|
||||
|
||||
static void * gpujpeg_decompress_init(void)
|
||||
{
|
||||
if (gpujpeg_version() != LIBGPUJPEG_API_VERSION) {
|
||||
log_msg(LOG_LEVEL_WARNING, "GPUJPEG API version mismatch! (%d vs %d)\n",
|
||||
gpujpeg_version(), LIBGPUJPEG_API_VERSION);
|
||||
if (gpujpeg_version() >> 8 != GPUJPEG_VERSION_INT >> 8) {
|
||||
log_msg(LOG_LEVEL_WARNING, "GPUJPEG API version mismatch! (%s vs %s, required same minor version)\n",
|
||||
gpujpeg_version_to_string(gpujpeg_version()), gpujpeg_version_to_string(GPUJPEG_VERSION_INT));
|
||||
}
|
||||
|
||||
struct state_decompress_gpujpeg *s = (struct state_decompress_gpujpeg *) calloc(1, sizeof(struct state_decompress_gpujpeg));
|
||||
|
||||
Reference in New Issue
Block a user