From 80dcf2d968dcff4dbc57fd344a9dcefdda354c88 Mon Sep 17 00:00:00 2001 From: AlexandreRouma Date: Wed, 26 Jan 2022 20:51:59 +0100 Subject: [PATCH] Fixed support for older distro (update ffs) --- core/src/server.cpp | 4 +--- readme.md | 5 ++++- rpi_install.sh | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/src/server.cpp b/core/src/server.cpp index f53991af..d29b00f9 100644 --- a/core/src/server.cpp +++ b/core/src/server.cpp @@ -74,7 +74,6 @@ namespace server { // Initialize compressor cctx = ZSTD_createCCtx(); - ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, 1); core::configManager.acquire(); std::string modulesDir = core::configManager.conf["modulesDirectory"]; @@ -226,8 +225,7 @@ namespace server { // Compress data if needed and fill out header fields if (compression) { bb_pkt_hdr->type = PACKET_TYPE_BASEBAND_COMPRESSED; - bb_pkt_hdr->size = sizeof(PacketHeader) + (uint32_t)ZSTD_compress2(cctx, &bbuf[sizeof(PacketHeader)], SERVER_MAX_PACKET_SIZE, data, count); - + bb_pkt_hdr->size = sizeof(PacketHeader) + (uint32_t)ZSTD_compressCCtx(cctx, &bbuf[sizeof(PacketHeader)], SERVER_MAX_PACKET_SIZE, data, count, 1); } else { bb_pkt_hdr->type = PACKET_TYPE_BASEBAND; diff --git a/readme.md b/readme.md index 95a9e349..82b1454c 100644 --- a/readme.md +++ b/readme.md @@ -78,7 +78,8 @@ brew install \ portaudio \ rtl-sdr \ soapyrtlsdr \ - volk + volk \ + zstd mkdir build cd build cmake .. \ @@ -115,6 +116,7 @@ After this, install the following dependencies using vcpkg: * fftw3 * glfw3 +* zstd You are probably going to build in 64 bit so make sure vcpkg installs the correct versions using `.\vcpkg.exe install :x64-windows` @@ -221,6 +223,7 @@ you can disable it using the module parameter listed in the table below * fftw3 * glfw * libvolk +* zstd Next install dependencies based on the modules you wish to build (See previous step) diff --git a/rpi_install.sh b/rpi_install.sh index 805cc2db..51bf74d1 100644 --- a/rpi_install.sh +++ b/rpi_install.sh @@ -5,7 +5,7 @@ set -e echo "Installing dependencies" sudo apt update -sudo apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk1-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \ +sudo apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk1-dev libzstd-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \ libiio-dev libad9361-dev librtaudio-dev libhackrf-dev librtlsdr-dev libbladerf-dev liblimesuite-dev p7zip-full wget echo "Preparing build"