print NDI ver: use NDIlib_version()

Note that the printed now is the runtime version, while in the previous
version it wash the version used (just) for the compilation. Current
inmplementation seem to be better, anyways.
This commit is contained in:
Martin Pulec
2024-06-25 12:21:39 +02:00
parent 3c7a75f486
commit 09eb5411ed
3 changed files with 1 additions and 12 deletions

View File

@@ -37,7 +37,6 @@ install_ndi() {(
installer=./Install*NDI*sh
yes | PAGER="cat" $installer
sudo cp -r NDI\ SDK\ for\ Linux/include/* /usr/local/include/
sed 's/\(.*\)/\#define NDI_VERSION \"\1\"/' < 'NDI SDK for Linux/Version.txt' | sudo tee /usr/local/include/ndi_version.h
)}
# TODO: needed only for U20.04, remove after upgrading to U22.04

View File

@@ -59,8 +59,6 @@ install_ndi() {(
installer=/private/var/tmp/Install_NDI_SDK_Apple.pkg
sudo installer -pkg $installer -target /
sudo mv /Library/NDI\ SDK\ for\ * /Library/NDI
sed 's/\(.*\)/\#define NDI_VERSION \"\1\"/' < /Library/NDI/Version.txt |
sudo tee /usr/local/include/ndi_version.h
)
NDI_LIB=/Library/NDI/lib/macOS
export CPATH=${CPATH:+"$CPATH:"}/Library/NDI/include

View File

@@ -67,10 +67,6 @@
#include "video.h"
#include "video_capture.h"
#if __has_include(<ndi_version.h>)
#include <ndi_version.h>
#endif
static constexpr double DEFAULT_AUDIO_DIVISOR = 1;
static constexpr const char *MOD_NAME = "[NDI cap.] ";
@@ -172,11 +168,7 @@ static void show_help(struct vidcap_state_ndi *s) {
}
cout << "\n";
s->NDIlib->find_destroy(pNDI_find);
#ifdef NDI_VERSION
cout << NDI_VERSION "\n";
#elif defined USE_NDI_VERSION
cout << "NDI version " << USE_NDI_VERSION << "\n";
#endif
printf("NDI version %s\n", s->NDIlib->version());
}
static int vidcap_ndi_init(struct vidcap_params *params, void **state)