diff --git a/.devcontainer.json b/.devcontainer.json
index 04de050b..4cce9be7 100644
--- a/.devcontainer.json
+++ b/.devcontainer.json
@@ -16,5 +16,5 @@
},
},
"forwardPorts": [8090, 8092],
- "postCreateCommand": "git submodule update --recursive --init && sudo apt-get update && sudo apt-get install -y git cmake build-essential qtbase5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5x11extras5-dev libusb-1.0-0-dev python3-dev libcec-dev libxcb-image0-dev libxcb-util0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libssl-dev zlib1g-dev"
+ "postCreateCommand": "git submodule update --recursive --init && sudo apt-get update && sudo apt-get install -y git cmake build-essential qtbase5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5x11extras5-dev libusb-1.0-0-dev python3-dev libcec-dev libxcb-image0-dev libxcb-util0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libssl-dev"
}
diff --git a/.github/workflows/apt/amd64.json b/.github/workflows/apt/amd64.json
index dd6f5e7a..0573e85b 100644
--- a/.github/workflows/apt/amd64.json
+++ b/.github/workflows/apt/amd64.json
@@ -2,7 +2,7 @@
{
"distribution": "Bionic",
"architecture": "amd64",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl1.0-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl1.0-dev, libmbedtls-dev",
"package-depends": "libpython3.6, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls10, libturbojpeg, libcec4",
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Ubuntu 18.04 (Bionic Beaver) (amd64)"
@@ -10,7 +10,7 @@
{
"distribution": "Focal",
"architecture": "amd64",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, libmbedtls-dev",
"package-depends": "libpython3.8, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg, libcec4",
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Ubuntu 20.04 (Focal Fossa) (amd64)"
@@ -18,7 +18,7 @@
{
"distribution": "Groovy",
"architecture": "amd64",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, libmbedtls-dev",
"package-depends": "libpython3.8, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg, libcec6",
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Ubuntu 20.10 (Groovy Gorilla) (amd64)"
@@ -26,7 +26,7 @@
{
"distribution": "Hirsute",
"architecture": "amd64",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, libmbedtls-dev",
"package-depends": "libpython3.9, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg, libcec6",
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Ubuntu 21.04 (Hirsute Hippo) (amd64)"
@@ -34,7 +34,7 @@
{
"distribution": "Impish",
"architecture": "amd64",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, libmbedtls-dev",
"package-depends": "libpython3.9, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg, libcec6",
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Ubuntu 21.10 (Impish Indri) (amd64)"
@@ -42,7 +42,7 @@
{
"distribution": "Jammy",
"architecture": "amd64",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, libmbedtls-dev",
"package-depends": "libpython3.9, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg, libcec6",
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Ubuntu 22.04 (Jammy Jellyfish) (amd64)"
@@ -50,7 +50,7 @@
{
"distribution": "Stretch",
"architecture": "amd64",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl1.0-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl1.0-dev, libmbedtls-dev",
"package-depends": "libpython3.5, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls10, libturbojpeg0, libcec4",
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Debian 9.x (Stretch) (amd64)"
@@ -58,7 +58,7 @@
{
"distribution": "Buster",
"architecture": "amd64",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, libmbedtls-dev",
"package-depends": "libpython3.7, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg0, libcec4",
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Debian 10.x (Buster) (amd64)"
@@ -66,7 +66,7 @@
{
"distribution": "Bullseye",
"architecture": "amd64",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, libmbedtls-dev",
"package-depends": "libpython3.9, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg0, libcec6",
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Debian 11.x (Bullseye) (amd64)"
@@ -74,7 +74,7 @@
{
"distribution": "Bookworm",
"architecture": "amd64",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, libmbedtls-dev",
"package-depends": "libpython3.9, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg0, libcec6",
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Debian 12.x (Bookworm) (amd64)"
diff --git a/.github/workflows/apt/arm64.json b/.github/workflows/apt/arm64.json
index ba6f5e6a..d388991c 100644
--- a/.github/workflows/apt/arm64.json
+++ b/.github/workflows/apt/arm64.json
@@ -2,7 +2,7 @@
{
"distribution": "Bionic",
"architecture": "arm64",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl1.0-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl1.0-dev, libmbedtls-dev",
"package-depends": "libpython3.6, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls10, libturbojpeg, libcec4",
"cmake-environment": "-DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Ubuntu 18.04 (Bionic Beaver) (arm64)"
@@ -10,7 +10,7 @@
{
"distribution": "Focal",
"architecture": "arm64",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, libmbedtls-dev",
"package-depends": "libpython3.8, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg, libcec4",
"cmake-environment": "-DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Ubuntu 20.04 (Focal Fossa) (arm64)"
@@ -18,7 +18,7 @@
{
"distribution": "Hirsute",
"architecture": "arm64",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, libmbedtls-dev",
"package-depends": "libpython3.9, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg, libcec6",
"cmake-environment": "-DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Ubuntu 21.04 (Hirsute Hippo) (arm64)"
@@ -26,7 +26,7 @@
{
"distribution": "Impish",
"architecture": "arm64",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, libmbedtls-dev",
"package-depends": "libpython3.9, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg, libcec6",
"cmake-environment": "-DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Ubuntu 21.10 (Impish Indri) (arm64)"
@@ -34,7 +34,7 @@
{
"distribution": "Buster",
"architecture": "arm64",
- "build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, zlib1g-dev, libssl-dev, libraspberrypi-dev, libturbojpeg0-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libssl-dev, libraspberrypi-dev, libturbojpeg0-dev, libmbedtls-dev",
"package-depends": "libpython3.7, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg0, libcec4",
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Debian 10.x (Buster) (arm64)"
@@ -42,7 +42,7 @@
{
"distribution": "Bullseye",
"architecture": "arm64",
- "build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, zlib1g-dev, libssl-dev, libraspberrypi-dev, libturbojpeg0-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libssl-dev, libraspberrypi-dev, libturbojpeg0-dev, libmbedtls-dev",
"package-depends": "libpython3.9, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg0, libcec6",
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Debian 11.x (Bullseye) (arm64)"
diff --git a/.github/workflows/apt/armhf.json b/.github/workflows/apt/armhf.json
index 3dc8b6d3..8aad5fdb 100644
--- a/.github/workflows/apt/armhf.json
+++ b/.github/workflows/apt/armhf.json
@@ -2,7 +2,7 @@
{
"distribution": "Bionic",
"architecture": "armhf",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl1.0-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl1.0-dev, libmbedtls-dev",
"package-depends": "libpython3.6, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls10, libturbojpeg, libcec4",
"cmake-environment": "-DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Ubuntu 18.04 (Bionic Beaver) (armhf)"
@@ -10,7 +10,7 @@
{
"distribution": "Focal",
"architecture": "armhf",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, libmbedtls-dev",
"package-depends": "libpython3.8, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg, libcec4",
"cmake-environment": "-DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Ubuntu 20.04 (Focal Fossa) (armhf)"
@@ -18,7 +18,7 @@
{
"distribution": "Hirsute",
"architecture": "armhf",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, libmbedtls-dev",
"package-depends": "libpython3.9, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg, libcec6",
"cmake-environment": "-DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Ubuntu 21.04 (Hirsute Hippo) (armhf)"
@@ -26,7 +26,7 @@
{
"distribution": "Impish",
"architecture": "armhf",
- "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, zlib1g-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, build-essential, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, libqt5x11extras5-dev, libusb-1.0-0-dev, python3-dev, libcec-dev, libxcb-image0-dev, libxcb-util0-dev, libxcb-shm0-dev, libxcb-render0-dev, libxcb-randr0-dev, libxrandr-dev, libxrender-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libturbojpeg0-dev, libssl-dev, libmbedtls-dev",
"package-depends": "libpython3.9, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg, libcec6",
"cmake-environment": "-DENABLE_DISPMANX=OFF -DENABLE_X11=ON -DENABLE_XCB=ON -DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Ubuntu 21.10 (Impish Indri) (armhf)"
@@ -34,7 +34,7 @@
{
"distribution": "Stretch",
"architecture": "armhf",
- "build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, zlib1g-dev, libssl1.0-dev, libraspberrypi-dev, libturbojpeg0-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libssl1.0-dev, libraspberrypi-dev, libturbojpeg0-dev, libmbedtls-dev",
"package-depends": "libpython3.5, libusb-1.0-0, libqt5widgets5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls10, libturbojpeg0, libcec4",
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description":"Debian 9.x (Stretch) (armhf)"
@@ -42,7 +42,7 @@
{
"distribution": "Buster",
"architecture": "armhf",
- "build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, zlib1g-dev, libssl1.0-dev, libraspberrypi-dev, libturbojpeg0-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libssl1.0-dev, libraspberrypi-dev, libturbojpeg0-dev, libmbedtls-dev",
"package-depends": "libpython3.7, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg0, libcec4",
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Debian 10.x (Buster) (armhf)"
@@ -50,7 +50,7 @@
{
"distribution": "Bullseye",
"architecture": "armhf",
- "build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, zlib1g-dev, libssl-dev, libraspberrypi-dev, libturbojpeg0-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libssl-dev, libraspberrypi-dev, libturbojpeg0-dev, libmbedtls-dev",
"package-depends": "libpython3.9, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg0, libcec6",
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Debian 11.x (Bullseye) (armhf)"
@@ -58,7 +58,7 @@
{
"distribution": "Bookworm",
"architecture": "armhf",
- "build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, zlib1g-dev, libssl-dev, libraspberrypi-dev, libturbojpeg0-dev, libmbedtls-dev",
+ "build-depends": "git, cmake, python3-dev, qtbase5-dev, libqt5serialport5-dev, libqt5sql5-sqlite, libqt5svg5-dev, build-essential, libusb-1.0-0-dev, libcec-dev, libavahi-core-dev, libavahi-compat-libdnssd-dev, libssl-dev, libraspberrypi-dev, libturbojpeg0-dev, libmbedtls-dev",
"package-depends": "libpython3.9, libusb-1.0-0, libqt5widgets5, libqt5x11extras5, libqt5sql5, libqt5sql5-sqlite, libqt5serialport5, libavahi-compat-libdnssd1, libmbedtls12, libturbojpeg0, libcec6",
"cmake-environment": "-DUSE_SYSTEM_MBEDTLS_LIBS=ON -DENABLE_DEPLOY_DEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release",
"description": "Debian 12.x (Bookworm) (armhf)"
diff --git a/.gitmodules b/.gitmodules
index 0d5749f6..c618661c 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -8,5 +8,4 @@
branch = master
[submodule "dependencies/external/protobuf"]
path = dependencies/external/protobuf
- url = https://github.com/hyperion-project/protobuf.git
- branch = master
\ No newline at end of file
+ url = https://github.com/protocolbuffers/protobuf
diff --git a/.lgtm.yml b/.lgtm.yml
index 09e32b46..8c43762e 100644
--- a/.lgtm.yml
+++ b/.lgtm.yml
@@ -24,4 +24,3 @@ extraction:
- "libavahi-compat-libdnssd-dev"
- "libturbojpeg0-dev"
- "libssl-dev"
- - "zlib1g-dev"
diff --git a/.version b/.version
index 3bad7881..0ec9268a 100644
--- a/.version
+++ b/.version
@@ -1 +1 @@
-2.0.12
\ No newline at end of file
+2.0.13-beta.1
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 9f351e73..4082adea 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -38,7 +38,7 @@
"name": "(macOS) Hyperion.app",
"type": "cppdbg",
"request": "launch",
- "program": "${workspaceFolder}/build/bin/hyperiond.app/Contents/MacOS/hyperiond",
+ "program": "${workspaceFolder}/build/bin/Hyperion.app/Contents/MacOS/Hyperion",
"args": ["-d"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2da171d1..5524123e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
+- Allow to build a "light" version of Hyperion, i.e. no grabbers, or services like flat-/proto buffers, boblight, CEC
+- Allow to restart Hyperion via Systray
+
### Changed
- Colors Smoothing is started in pause mode to save resources, when Hyperion starts with no active source
@@ -19,7 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Effects: Fix image URL in Matrix effect
- Fixes that the Led-Device output flow was interrupted, by an enabling API request on an already enabled device (#967
- Yeelight - Workaround: Ignore error when setting music mode = off, but the music-mode is already off (#1372)
-- Standalone grabbers: Improved fps help/error text, fixed default address and port
+- Standalone grabbers: Improved fps help/error text, fixed default address and port, fixed auto discovery of Hyperion server in hyperion-remote
+- Fixed Qt version override, e.g. set via QTDIR
## Removed
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 786b444a..52ed9447 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,18 @@ cmake_minimum_required(VERSION 3.0.0)
message( STATUS "CMake Version: ${CMAKE_VERSION}" )
+macro(addIndent text)
+if(${CMAKE_VERSION} VERSION_GREATER "3.16.0")
+ list(APPEND CMAKE_MESSAGE_INDENT ${text})
+endif()
+endmacro()
+
+macro(removeIndent)
+if(${CMAKE_VERSION} VERSION_GREATER "3.16.0")
+ list(POP_BACK CMAKE_MESSAGE_INDENT)
+endif()
+endmacro()
+
PROJECT(hyperion)
# Parse semantic version of version file and write version to config
@@ -19,10 +31,6 @@ set(CMAKE_AUTOMOC ON)
# auto prepare .qrc files
set(CMAKE_AUTORCC ON)
-if ( POLICY CMP0026 )
- CMAKE_POLICY( SET CMP0026 OLD )
-endif()
-
# Configure CCache if available
find_program(CCACHE_FOUND ccache)
if ( CCACHE_FOUND )
@@ -41,40 +49,61 @@ else()
endif()
# Set build variables
+# Grabber
SET ( DEFAULT_AMLOGIC OFF )
-SET ( DEFAULT_BOBLIGHT ON )
SET ( DEFAULT_DISPMANX OFF )
SET ( DEFAULT_DX OFF )
SET ( DEFAULT_MF OFF )
SET ( DEFAULT_OSX OFF )
SET ( DEFAULT_QT ON )
+SET ( DEFAULT_V4L2 OFF )
SET ( DEFAULT_X11 OFF )
SET ( DEFAULT_XCB OFF )
-SET ( DEFAULT_V4L2 OFF )
+
+# Input
+SET ( DEFAULT_BOBLIGHT_SERVER ON )
+SET ( DEFAULT_CEC OFF )
+SET ( DEFAULT_FLATBUF_SERVER ON )
+SET ( DEFAULT_PROTOBUF_SERVER ON )
+
+# Output
+SET ( DEFAULT_FORWARDER ON )
+SET ( DEFAULT_FLATBUF_CONNECT ON )
+
+# LED-Devices
+SET ( DEFAULT_SPIDEV OFF )
+SET ( DEFAULT_TINKERFORGE OFF )
+SET ( DEFAULT_USB_HID OFF )
SET ( DEFAULT_WS281XPWM OFF )
+
+# Services
SET ( DEFAULT_AVAHI ON )
+SET ( DEFAULT_EXPERIMENTAL OFF )
+
+# Build
+SET ( DEFAULT_TESTS OFF )
+SET ( DEFAULT_DEPLOY_DEPENDENCIES ON )
SET ( DEFAULT_USE_SHARED_AVAHI_LIBS ON )
SET ( DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS OFF )
SET ( DEFAULT_USE_SYSTEM_PROTO_LIBS OFF )
SET ( DEFAULT_USE_SYSTEM_MBEDTLS_LIBS OFF )
-SET ( DEFAULT_TESTS OFF )
-SET ( DEFAULT_EXPERIMENTAL OFF )
-SET ( DEFAULT_CEC OFF )
-SET ( DEFAULT_DEPLOY_DEPENDENCIES ON )
+
+# Build Hyperion with a reduced set of functionality, overwrites other default values
+SET ( DEFAULT_HYPERION_LIGHT OFF )
IF ( ${CMAKE_SYSTEM} MATCHES "Linux" )
+ SET ( DEFAULT_FB ON )
SET ( DEFAULT_V4L2 ON )
SET ( DEFAULT_SPIDEV ON )
SET ( DEFAULT_TINKERFORGE ON )
- SET ( DEFAULT_FB ON )
SET ( DEFAULT_USB_HID ON )
SET ( DEFAULT_CEC ON )
ELSEIF ( WIN32 )
SET ( DEFAULT_DX ON )
SET ( DEFAULT_MF ON )
ELSE()
- SET ( DEFAULT_V4L2 OFF )
SET ( DEFAULT_FB OFF )
+ SET ( DEFAULT_V4L2 OFF )
SET ( DEFAULT_SPIDEV OFF )
SET ( DEFAULT_TINKERFORGE OFF )
SET ( DEFAULT_USB_HID OFF )
@@ -166,49 +195,65 @@ ADD_DEFINITIONS( ${PLATFORM_DEFINE} )
# set the build options
-option(ENABLE_BOBLIGHT "Enable BOBLIGHT server" ${DEFAULT_BOBLIGHT} )
-message(STATUS "ENABLE_BOBLIGHT = ${ENABLE_BOBLIGHT}")
+option(HYPERION_LIGHT "Build Hyperion with a reduced set of functionality" ${DEFAULT_HYPERION_LIGHT} )
+message(STATUS "HYPERION_LIGHT = ${HYPERION_LIGHT}")
+
+if (HYPERION_LIGHT)
+ message(STATUS "HYPERION_LIGHT: Hyperion is build with a reduced set of functionality.")
+ # Disable Grabbers
+ SET ( DEFAULT_AMLOGIC OFF )
+ SET ( DEFAULT_DISPMANX OFF )
+ SET ( DEFAULT_DX OFF )
+ SET ( DEFAULT_FB OFF )
+ SET ( DEFAULT_MF OFF )
+ SET ( DEFAULT_OSX OFF )
+ SET ( DEFAULT_QT OFF )
+ SET ( DEFAULT_V4L2 OFF )
+ SET ( DEFAULT_X11 OFF )
+ SET ( DEFAULT_XCB OFF )
+
+ # Disable Input Servers
+ SET ( DEFAULT_BOBLIGHT_SERVER OFF )
+ SET ( DEFAULT_CEC OFF )
+ SET ( DEFAULT_FLATBUF_SERVER OFF )
+ SET ( DEFAULT_PROTOBUF_SERVER OFF )
+
+ # Disable Output Connectors
+ SET ( DEFAULT_FORWARDER OFF )
+ SET ( DEFAULT_FLATBUF_CONNECT OFF )
+endif()
+
+message(STATUS "Grabber options:")
+
+addIndent(" - ")
option(ENABLE_AMLOGIC "Enable the AMLOGIC video grabber" ${DEFAULT_AMLOGIC} )
message(STATUS "ENABLE_AMLOGIC = ${ENABLE_AMLOGIC}")
-if (ENABLE_AMLOGIC)
- SET(ENABLE_FB ON)
-else()
- option(ENABLE_FB "Enable the framebuffer grabber" ${DEFAULT_FB} )
-endif()
-
-message(STATUS "ENABLE_FB = ${ENABLE_FB}")
-
option(ENABLE_DISPMANX "Enable the RPi dispmanx grabber" ${DEFAULT_DISPMANX} )
message(STATUS "ENABLE_DISPMANX = ${ENABLE_DISPMANX}")
-option(ENABLE_OSX "Enable the OSX grabber" ${DEFAULT_OSX} )
-message(STATUS "ENABLE_OSX = ${ENABLE_OSX}")
+option(ENABLE_DX "Enable the DirectX grabber" ${DEFAULT_DX})
+message(STATUS "ENABLE_DX = ${ENABLE_DX}")
-option(ENABLE_SPIDEV "Enable the SPIDEV device" ${DEFAULT_SPIDEV} )
-message(STATUS "ENABLE_SPIDEV = ${ENABLE_SPIDEV}")
-
-option(ENABLE_TINKERFORGE "Enable the TINKERFORGE device" ${DEFAULT_TINKERFORGE})
-message(STATUS "ENABLE_TINKERFORGE = ${ENABLE_TINKERFORGE}")
-
-option(ENABLE_V4L2 "Enable the V4L2 grabber" ${DEFAULT_V4L2})
-message(STATUS "ENABLE_V4L2 = ${ENABLE_V4L2}")
+if (ENABLE_AMLOGIC)
+ SET(ENABLE_FB ON)
+else()
+ option(ENABLE_FB " Enable the framebuffer grabber" ${DEFAULT_FB} )
+endif()
+message(STATUS "ENABLE_FB = ${ENABLE_FB}")
option(ENABLE_MF "Enable the Media Foundation grabber" ${DEFAULT_MF})
message(STATUS "ENABLE_MF = ${ENABLE_MF}")
-option(ENABLE_WS281XPWM "Enable the WS281x-PWM device" ${DEFAULT_WS281XPWM} )
-message(STATUS "ENABLE_WS281XPWM = ${ENABLE_WS281XPWM}")
+option(ENABLE_OSX "Enable the OSX grabber" ${DEFAULT_OSX} )
+message(STATUS "ENABLE_OSX = ${ENABLE_OSX}")
-option(ENABLE_AVAHI "Enable Zeroconf" ${DEFAULT_AVAHI})
-message(STATUS "ENABLE_AVAHI = " ${ENABLE_AVAHI})
+option(ENABLE_QT "Enable the Qt grabber" ${DEFAULT_QT})
+message(STATUS "ENABLE_QT = ${ENABLE_QT}")
-option(ENABLE_USB_HID "Enable the libusb and hid devices" ${DEFAULT_USB_HID} )
-message(STATUS "ENABLE_USB_HID = ${ENABLE_USB_HID}")
-
-option(ENABLE_CEC "Enable the libcec and CEC control" ${DEFAULT_CEC} )
-message(STATUS "ENABLE_CEC = ${ENABLE_CEC}")
+option(ENABLE_V4L2 "Enable the V4L2 grabber" ${DEFAULT_V4L2})
+message(STATUS "ENABLE_V4L2 = ${ENABLE_V4L2}")
option(ENABLE_X11 "Enable the X11 grabber" ${DEFAULT_X11})
message(STATUS "ENABLE_X11 = ${ENABLE_X11}")
@@ -216,11 +261,70 @@ message(STATUS "ENABLE_X11 = ${ENABLE_X11}")
option(ENABLE_XCB "Enable the XCB grabber" ${DEFAULT_XCB})
message(STATUS "ENABLE_XCB = ${ENABLE_XCB}")
-option(ENABLE_QT "Enable the Qt grabber" ${DEFAULT_QT})
-message(STATUS "ENABLE_QT = ${ENABLE_QT}")
+removeIndent()
-option(ENABLE_DX "Enable the DirectX grabber" ${DEFAULT_DX})
-message(STATUS "ENABLE_DX = ${ENABLE_DX}")
+message(STATUS "Input options:")
+addIndent(" - ")
+
+option(ENABLE_BOBLIGHT_SERVER "Enable BOBLIGHT server" ${DEFAULT_BOBLIGHT_SERVER} )
+message(STATUS "ENABLE_BOBLIGHT_SERVER = ${ENABLE_BOBLIGHT_SERVER}")
+
+option(ENABLE_CEC "Enable the libcec and CEC control" ${DEFAULT_CEC} )
+message(STATUS "ENABLE_CEC = ${ENABLE_CEC}")
+
+option(ENABLE_FLATBUF_SERVER "Enable Flatbuffers server" ${DEFAULT_FLATBUF_SERVER} )
+message(STATUS "ENABLE_FLATBUF_SERVER = ${ENABLE_FLATBUF_SERVER}")
+
+option(ENABLE_PROTOBUF_SERVER "Enable Protocol Buffers server" ${DEFAULT_PROTOBUF_SERVER} )
+message(STATUS "ENABLE_PROTOBUF_SERVER = ${ENABLE_PROTOBUF_SERVER}")
+
+removeIndent()
+
+message(STATUS "Output options:")
+addIndent(" - ")
+
+option(ENABLE_FORWARDER "Enable Hyperion forwarding" ${DEFAULT_FORWARDER} )
+message(STATUS "ENABLE_FORWARDER = ${ENABLE_FORWARDER}")
+
+if (ENABLE_FORWARDER)
+ SET(ENABLE_FLATBUF_CONNECT ON)
+else()
+ option(ENABLE_FLATBUF_CONNECT "Enable Flatbuffers connecting remotely" ${DEFAULT_FLATBUF_CONNECT} )
+endif()
+message(STATUS "ENABLE_FLATBUF_CONNECT = ${ENABLE_FLATBUF_CONNECT}")
+
+removeIndent()
+
+message(STATUS "LED-Device options:")
+addIndent(" - ")
+
+option(ENABLE_SPIDEV "Enable the SPIDEV device" ${DEFAULT_SPIDEV} )
+message(STATUS "ENABLE_SPIDEV = ${ENABLE_SPIDEV}")
+
+option(ENABLE_TINKERFORGE "Enable the TINKERFORGE device" ${DEFAULT_TINKERFORGE})
+message(STATUS "ENABLE_TINKERFORGE = ${ENABLE_TINKERFORGE}")
+
+option(ENABLE_USB_HID "Enable the libusb and hid devices" ${DEFAULT_USB_HID} )
+message(STATUS "ENABLE_USB_HID = ${ENABLE_USB_HID}")
+
+option(ENABLE_WS281XPWM "Enable the WS281x-PWM device" ${DEFAULT_WS281XPWM} )
+message(STATUS "ENABLE_WS281XPWM = ${ENABLE_WS281XPWM}")
+
+removeIndent()
+
+message(STATUS "Services options:")
+addIndent(" - ")
+
+option(ENABLE_AVAHI "Enable Zeroconf" ${DEFAULT_AVAHI})
+message(STATUS "ENABLE_AVAHI = " ${ENABLE_AVAHI})
+
+option(ENABLE_EXPERIMENTAL "Compile experimental features" ${DEFAULT_EXPERIMENTAL})
+message(STATUS "ENABLE_EXPERIMENTAL = ${ENABLE_EXPERIMENTAL}")
+
+removeIndent()
+
+message(STATUS "Build options:")
+addIndent(" - ")
option(ENABLE_TESTS "Compile additional test applications" ${DEFAULT_TESTS})
message(STATUS "ENABLE_TESTS = ${ENABLE_TESTS}")
@@ -228,12 +332,18 @@ message(STATUS "ENABLE_TESTS = ${ENABLE_TESTS}")
option(ENABLE_PROFILER "enable profiler capabilities - not for release code" OFF)
message(STATUS "ENABLE_PROFILER = ${ENABLE_PROFILER}")
-option(ENABLE_EXPERIMENTAL "Compile experimental features" ${DEFAULT_EXPERIMENTAL})
-message(STATUS "ENABLE_EXPERIMENTAL = ${ENABLE_EXPERIMENTAL}")
-
option(ENABLE_DEPLOY_DEPENDENCIES "Deploy with dependencies" ${DEFAULT_DEPLOY_DEPENDENCIES})
message(STATUS "ENABLE_DEPLOY_DEPENDENCIES = ${ENABLE_DEPLOY_DEPENDENCIES}")
+if (ENABLE_AVAHI)
+message(STATUS "DEFAULT_USE_SHARED_AVAHI_LIBS = ${DEFAULT_USE_SHARED_AVAHI_LIBS}")
+endif()
+message(STATUS "DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS = ${DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS}")
+message(STATUS "DEFAULT_USE_SYSTEM_MBEDTLS_LIBS = ${DEFAULT_USE_SYSTEM_MBEDTLS_LIBS}")
+message(STATUS "DEFAULT_USE_SYSTEM_PROTO_LIBS = ${DEFAULT_USE_SYSTEM_PROTO_LIBS}")
+
+removeIndent()
+
SET ( FLATBUFFERS_INSTALL_BIN_DIR ${CMAKE_BINARY_DIR}/flatbuf )
SET ( FLATBUFFERS_INSTALL_LIB_DIR ${CMAKE_BINARY_DIR}/flatbuf )
@@ -346,14 +456,22 @@ if (NOT DEFINED QTDIR)
set(QTDIR "${SUBDIRQT}/msvc2019_64")
endif()
elseif ( "${PLATFORM}" MATCHES "osx" )
+ # QT6 x86_64 location
if (EXISTS /usr/local/opt/qt6)
set(QTDIR "/usr/local/opt/qt6")
+ # QT6 arm64 location
+ elseif (EXISTS /opt/homebrew/opt/qt@6)
+ set(QTDIR "/opt/homebrew/opt/qt@6")
+ # QT5 x86_64 location
elseif (EXISTS /usr/local/opt/qt5)
set(QTDIR "/usr/local/opt/qt5")
+ # QT5 arm64 location
+ elseif (EXISTS /opt/homebrew/opt/qt@5)
+ set(QTDIR "/opt/homebrew/opt/qt@5")
endif()
endif()
endif()
-endif()
+endif()
if (DEFINED QTDIR)
message(STATUS "Add QTDIR: ${QTDIR} to CMAKE_PREFIX_PATH")
@@ -376,7 +494,7 @@ IF ( "${QT_VERSION}" VERSION_LESS "${QT_MIN_VERSION}" )
message( FATAL_ERROR "Your Qt version is to old! Minimum required ${QT_MIN_VERSION}" )
ENDIF()
-find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui Network SerialPort Sql Widgets REQUIRED)
+find_package(Qt${QT_VERSION_MAJOR} ${QT_VERSION} COMPONENTS Core Gui Network SerialPort Sql Widgets REQUIRED)
message( STATUS "Qt version used: ${QT_VERSION}" )
diff --git a/HyperionConfig.h.in b/HyperionConfig.h.in
index 9b098a73..76ad6209 100644
--- a/HyperionConfig.h.in
+++ b/HyperionConfig.h.in
@@ -1,62 +1,77 @@
// Generated config file
-// Define to enable the DispmanX grabber
-#cmakedefine ENABLE_DISPMANX
-
-// Define to enable the V4L2 grabber
-#cmakedefine ENABLE_V4L2
-
-// Define to enable the Media Foundation grabber
-#cmakedefine ENABLE_MF
-
-// Define to enable the Framebuffer grabber
-#cmakedefine ENABLE_FB
-
// Define to enable the AMLogic grabber
#cmakedefine ENABLE_AMLOGIC
+// Define to enable the DispmanX grabber
+#cmakedefine ENABLE_DISPMANX
+
+// Define to enable the DirectX grabber
+#cmakedefine ENABLE_DX
+
+// Define to enable the Framebuffer grabber
+#cmakedefine ENABLE_FB
+
+// Define to enable the Media Foundation grabber
+#cmakedefine ENABLE_MF
+
// Define to enable the OSX grabber
#cmakedefine ENABLE_OSX
+// Define to enable the Qt grabber
+#cmakedefine ENABLE_QT
+
+// Define to enable the V4L2 grabber
+#cmakedefine ENABLE_V4L2
+
// Define to enable the X11 grabber
#cmakedefine ENABLE_X11
// Define to enable the XCB grabber
#cmakedefine ENABLE_XCB
-// Define to enable the Qt grabber
-#cmakedefine ENABLE_QT
-
-// Define to enable the DirectX grabber
-#cmakedefine ENABLE_DX
-
-// Define to enable the SPI-Device
-#cmakedefine ENABLE_SPIDEV
-
-// Define to enable the WS281x-PWM-via-DMA-device using jgarff's library
-#cmakedefine ENABLE_WS281XPWM
-
-// Define to enable the Tinkerforge device
-#cmakedefine ENABLE_TINKERFORGE
-
-// Define to enable AVAHI
-#cmakedefine ENABLE_AVAHI
+// Define to enable boblight server
+#cmakedefine ENABLE_BOBLIGHT_SERVER
// Define to enable CEC
#cmakedefine ENABLE_CEC
-// Define to enable boblight server
-#cmakedefine ENABLE_BOBLIGHT
+// Define to enable flatbuffer server
+#cmakedefine ENABLE_FLATBUF_SERVER
+
+// Define to enable protocol buffer server
+#cmakedefine ENABLE_PROTOBUF_SERVER
+
+// Define to enable hyperion forwarding
+#cmakedefine ENABLE_FORWARDER
+
+// Define to enable enable flatbuffer connect
+#cmakedefine ENABLE_FLATBUF_CONNECT
+
+// Define to enable protocol buffer connect
+#cmakedefine ENABLE_PROTOBUF_CONNECT
+
+// Define to enable the SPI-Device
+#cmakedefine ENABLE_SPIDEV
+
+// Define to enable the Tinkerforge device
+#cmakedefine ENABLE_TINKERFORGE
// Define to enable the USB / HID devices
#cmakedefine ENABLE_USB_HID
-// Define to enable profiler for development purpose
-#cmakedefine ENABLE_PROFILER
+// Define to enable the WS281x-PWM-via-DMA-device using jgarff's library
+#cmakedefine ENABLE_WS281XPWM
+
+// Define to enable AVAHI
+#cmakedefine ENABLE_AVAHI
// Define to enable experimental features
#cmakedefine ENABLE_EXPERIMENTAL
+// Define to enable profiler for development purpose
+#cmakedefine ENABLE_PROFILER
+
// Define to enable deploy dependencies to packages
#cmakedefine ENABLE_DEPLOY_DEPENDENCIES
diff --git a/assets/webconfig/content/dashboard.html b/assets/webconfig/content/dashboard.html
index 0aec432a..133f5dff 100644
--- a/assets/webconfig/content/dashboard.html
+++ b/assets/webconfig/content/dashboard.html
@@ -16,7 +16,7 @@
Status
-
+
@@ -26,7 +26,7 @@
|
-
+
|
Screen-Grabber |
@@ -34,7 +34,7 @@
|
-
+
|
Video-Grabber |
@@ -44,7 +44,7 @@
|
-
+
@@ -54,15 +54,7 @@
|
-
- |
- proto |
-
- unknown
-
- |
-
-
+
|
flat |
@@ -70,6 +62,14 @@
|
+
+ |
+ proto |
+
+ unknown
+
+ |
+
|
json |
diff --git a/assets/webconfig/content/remote.html b/assets/webconfig/content/remote.html
index 8c92e3fa..7c39b19a 100644
--- a/assets/webconfig/content/remote.html
+++ b/assets/webconfig/content/remote.html
@@ -5,7 +5,7 @@
-
-
+
+
-
-
+
-
+
Colors/Effects
@@ -43,7 +45,7 @@
|
-
+
@@ -57,16 +59,16 @@
|
- |
+ |
-
-
+
+
|
|
-
+
|
@@ -77,7 +79,7 @@
-
+
-
+
-
+
diff --git a/assets/webconfig/js/content_colors.js b/assets/webconfig/js/content_colors.js
index abd35f0b..9d5358b0 100755
--- a/assets/webconfig/js/content_colors.js
+++ b/assets/webconfig/js/content_colors.js
@@ -1,6 +1,8 @@
$(document).ready(function () {
performTranslation();
+ var BORDERDETECT_ENABLED = (jQuery.inArray("borderdetection", window.serverInfo.services) !== -1);
+
// update instance listing
updateHyperionInstanceListing();
@@ -20,15 +22,19 @@ $(document).ready(function () {
$('#conf_cont_smoothing').append(createHelpTable(window.schema.smoothing.properties, $.i18n("edt_conf_smooth_heading_title"), "smoothingHelpPanelId"));
//blackborder
- $('#conf_cont').append(createRow('conf_cont_blackborder'));
- $('#conf_cont_blackborder').append(createOptPanel('fa-photo', $.i18n("edt_conf_bb_heading_title"), 'editor_container_blackborder', 'btn_submit_blackborder'));
- $('#conf_cont_blackborder').append(createHelpTable(window.schema.blackborderdetector.properties, $.i18n("edt_conf_bb_heading_title"), "blackborderHelpPanelId"));
+ if (BORDERDETECT_ENABLED) {
+ $('#conf_cont').append(createRow('conf_cont_blackborder'));
+ $('#conf_cont_blackborder').append(createOptPanel('fa-photo', $.i18n("edt_conf_bb_heading_title"), 'editor_container_blackborder', 'btn_submit_blackborder'));
+ $('#conf_cont_blackborder').append(createHelpTable(window.schema.blackborderdetector.properties, $.i18n("edt_conf_bb_heading_title"), "blackborderHelpPanelId"));
+ }
}
else {
$('#conf_cont').addClass('row');
$('#conf_cont').append(createOptPanel('fa-photo', $.i18n("edt_conf_color_heading_title"), 'editor_container_color', 'btn_submit_color'));
$('#conf_cont').append(createOptPanel('fa-photo', $.i18n("edt_conf_smooth_heading_title"), 'editor_container_smoothing', 'btn_submit_smoothing'));
- $('#conf_cont').append(createOptPanel('fa-photo', $.i18n("edt_conf_bb_heading_title"), 'editor_container_blackborder', 'btn_submit_blackborder'));
+ if (BORDERDETECT_ENABLED) {
+ $('#conf_cont').append(createOptPanel('fa-photo', $.i18n("edt_conf_bb_heading_title"), 'editor_container_blackborder', 'btn_submit_blackborder'));
+ }
}
//color
@@ -66,28 +72,30 @@ $(document).ready(function () {
});
//blackborder
- editor_blackborder = createJsonEditor('editor_container_blackborder', {
- blackborderdetector: window.schema.blackborderdetector
- }, true, true);
+ if (BORDERDETECT_ENABLED) {
+ editor_blackborder = createJsonEditor('editor_container_blackborder', {
+ blackborderdetector: window.schema.blackborderdetector
+ }, true, true);
- editor_blackborder.on('change', function () {
- var blackborderEnable = editor_blackborder.getEditor("root.blackborderdetector.enable").getValue();
- if (blackborderEnable) {
- showInputOptionsForKey(editor_blackborder, "blackborderdetector", "enable", true);
- $('#blackborderHelpPanelId').show();
- $('#blackborderWikiLinkId').show();
+ editor_blackborder.on('change', function () {
+ var blackborderEnable = editor_blackborder.getEditor("root.blackborderdetector.enable").getValue();
+ if (blackborderEnable) {
+ showInputOptionsForKey(editor_blackborder, "blackborderdetector", "enable", true);
+ $('#blackborderHelpPanelId').show();
+ $('#blackborderWikiLinkId').show();
- } else {
- showInputOptionsForKey(editor_blackborder, "blackborderdetector", "enable", false);
- $('#blackborderHelpPanelId').hide();
- $('#blackborderWikiLinkId').hide();
- }
- editor_blackborder.validate().length || window.readOnlyMode ? $('#btn_submit_blackborder').attr('disabled', true) : $('#btn_submit_blackborder').attr('disabled', false);
- });
+ } else {
+ showInputOptionsForKey(editor_blackborder, "blackborderdetector", "enable", false);
+ $('#blackborderHelpPanelId').hide();
+ $('#blackborderWikiLinkId').hide();
+ }
+ editor_blackborder.validate().length || window.readOnlyMode ? $('#btn_submit_blackborder').attr('disabled', true) : $('#btn_submit_blackborder').attr('disabled', false);
+ });
- $('#btn_submit_blackborder').off().on('click', function () {
- requestWriteConfig(editor_blackborder.getValue());
- });
+ $('#btn_submit_blackborder').off().on('click', function () {
+ requestWriteConfig(editor_blackborder.getValue());
+ });
+ }
//wiki links
var wikiElement = $(buildWL("user/advanced/Advanced.html#blackbar-detection", "edt_conf_bb_mode_title", true));
@@ -98,7 +106,9 @@ $(document).ready(function () {
if (window.showOptHelp) {
createHint("intro", $.i18n('conf_colors_color_intro'), "editor_container_color");
createHint("intro", $.i18n('conf_colors_smoothing_intro'), "editor_container_smoothing");
- createHint("intro", $.i18n('conf_colors_blackborder_intro'), "editor_container_blackborder");
+ if (BORDERDETECT_ENABLED) {
+ createHint("intro", $.i18n('conf_colors_blackborder_intro'), "editor_container_blackborder");
+ }
}
removeOverlay();
diff --git a/assets/webconfig/js/content_dashboard.js b/assets/webconfig/js/content_dashboard.js
index 129bdf26..2a547a9b 100644
--- a/assets/webconfig/js/content_dashboard.js
+++ b/assets/webconfig/js/content_dashboard.js
@@ -59,18 +59,18 @@ $(document).ready(function () {
if ((components[idx].name === "FORWARDER" && window.currentHyperionInstance != 0) ||
(components[idx].name === "GRABBER" && !window.serverConfig.framegrabber.enable) ||
(components[idx].name === "V4L" && !window.serverConfig.grabberV4L2.enable))
- continue;
+ continue;
- var comp_enabled = components[idx].enabled ? "checked" : "";
- const general_comp = "general_comp_" + components[idx].name;
- componentBtn = '
';
+ var comp_enabled = components[idx].enabled ? "checked" : "";
+ const general_comp = "general_comp_" + components[idx].name;
+ componentBtn = '
';
instance_components += '
| ' + $.i18n('general_comp_' + components[idx].name) + ' | ' + componentBtn + ' |
';
}
@@ -102,16 +102,42 @@ $(document).ready(function () {
// add more info
- var screenGrabber = window.serverConfig.framegrabber.enable ? $.i18n('general_enabled') : $.i18n('general_disabled');
- $('#dash_screen_grabber').html(screenGrabber);
- var videoGrabber = window.serverConfig.grabberV4L2.enable ? $.i18n('general_enabled') : $.i18n('general_disabled');
- $('#dash_video_grabber').html(videoGrabber);
+ var screenGrabberAvailable = (window.serverInfo.grabbers.screen.available.length !== 0);
+ var videoGrabberAvailable = (window.serverInfo.grabbers.video.available.length !== 0);
- var fbPort = window.serverConfig.flatbufServer.enable ? window.serverConfig.flatbufServer.port : $.i18n('general_disabled');
- $('#dash_fbPort').html(fbPort);
- var pbPort = window.serverConfig.protoServer.enable ? window.serverConfig.protoServer.port : $.i18n('general_disabled');
- $('#dash_pbPort').html(pbPort);
+ if (screenGrabberAvailable || videoGrabberAvailable) {
+ if (screenGrabberAvailable) {
+ var screenGrabber = window.serverConfig.framegrabber.enable ? $.i18n('general_enabled') : $.i18n('general_disabled');
+ $('#dash_screen_grabber').html(screenGrabber);
+ } else {
+ $("#dash_screen_grabber_row").hide();
+ }
+
+ if (videoGrabberAvailable) {
+ var videoGrabber = window.serverConfig.grabberV4L2.enable ? $.i18n('general_enabled') : $.i18n('general_disabled');
+ $('#dash_video_grabber').html(videoGrabber);
+ } else {
+ $("#dash_video_grabber_row").hide();
+ }
+ } else {
+ $("#dash_capture_hw").hide();
+ }
+
+ if (jQuery.inArray("flatbuffer", window.serverInfo.services) !== -1) {
+ var fbPort = window.serverConfig.flatbufServer.enable ? window.serverConfig.flatbufServer.port : $.i18n('general_disabled');
+ $('#dash_fbPort').html(fbPort);
+ } else {
+ $("#dash_ports_flat_row").hide();
+ }
+
+ if (jQuery.inArray("protobuffer", window.serverInfo.services) !== -1) {
+ var pbPort = window.serverConfig.protoServer.enable ? window.serverConfig.protoServer.port : $.i18n('general_disabled');
+ $('#dash_pbPort').html(pbPort);
+ } else {
+ $("#dash_ports_proto_row").hide();
+ }
+
var jsonPort = window.serverConfig.jsonServer.port;
$('#dash_jsonPort').html(jsonPort);
var wsPorts = window.serverConfig.webConfig.port + ' | ' + window.serverConfig.webConfig.sslPort;
diff --git a/assets/webconfig/js/content_grabber.js b/assets/webconfig/js/content_grabber.js
index 75e149dd..25a5dcd5 100755
--- a/assets/webconfig/js/content_grabber.js
+++ b/assets/webconfig/js/content_grabber.js
@@ -1,28 +1,41 @@
$(document).ready(function () {
+
performTranslation();
+ var screenGrabberAvailable = (window.serverInfo.grabbers.screen.available.length !== 0);
+ var videoGrabberAvailable = (window.serverInfo.grabbers.video.available.length !== 0);
+ var CEC_ENABLED = (jQuery.inArray("cec", window.serverInfo.services) !== -1);
+
var conf_editor_video = null;
var conf_editor_screen = null;
+ var configuredDevice = "";
+ var discoveredInputSources = {};
+ var deviceProperties = {};
+
// Screen-Grabber
- $('#conf_cont').append(createRow('conf_cont_screen'));
- $('#conf_cont_screen').append(createOptPanel('fa-camera', $.i18n("edt_conf_fg_heading_title"), 'editor_container_screengrabber', 'btn_submit_screengrabber', 'panel-system', 'screengrabberPanelId'));
- if (window.showOptHelp) {
- $('#conf_cont_screen').append(createHelpTable(window.schema.framegrabber.properties, $.i18n("edt_conf_fg_heading_title"), "screengrabberHelpPanelId"));
+ if (screenGrabberAvailable) {
+ $('#conf_cont').append(createRow('conf_cont_screen'));
+ $('#conf_cont_screen').append(createOptPanel('fa-camera', $.i18n("edt_conf_fg_heading_title"), 'editor_container_screengrabber', 'btn_submit_screengrabber', 'panel-system', 'screengrabberPanelId'));
+ if (window.showOptHelp) {
+ $('#conf_cont_screen').append(createHelpTable(window.schema.framegrabber.properties, $.i18n("edt_conf_fg_heading_title"), "screengrabberHelpPanelId"));
+ }
}
// Video-Grabber
- $('#conf_cont').append(createRow('conf_cont_video'));
- $('#conf_cont_video').append(createOptPanel('fa-camera', $.i18n("edt_conf_v4l2_heading_title"), 'editor_container_videograbber', 'btn_submit_videograbber', 'panel-system', 'videograbberPanelId'));
+ if (videoGrabberAvailable) {
+ $('#conf_cont').append(createRow('conf_cont_video'));
+ $('#conf_cont_video').append(createOptPanel('fa-camera', $.i18n("edt_conf_v4l2_heading_title"), 'editor_container_videograbber', 'btn_submit_videograbber', 'panel-system', 'videograbberPanelId'));
- if (storedAccess === 'expert') {
- var conf_cont_video_footer = document.getElementById("editor_container_videograbber").nextElementSibling;
- $(conf_cont_video_footer).prepend('
');
- }
+ if (storedAccess === 'expert') {
+ var conf_cont_video_footer = document.getElementById("editor_container_videograbber").nextElementSibling;
+ $(conf_cont_video_footer).prepend('
');
+ }
- if (window.showOptHelp) {
- $('#conf_cont_video').append(createHelpTable(window.schema.grabberV4L2.properties, $.i18n("edt_conf_v4l2_heading_title"), "videograbberHelpPanelId"));
+ if (window.showOptHelp) {
+ $('#conf_cont_video').append(createHelpTable(window.schema.grabberV4L2.properties, $.i18n("edt_conf_v4l2_heading_title"), "videograbberHelpPanelId"));
+ }
}
JSONEditor.defaults.custom_validators.push(function (schema, value, path) {
@@ -77,64 +90,109 @@ $(document).ready(function () {
}
// Screen-Grabber
- conf_editor_screen = createJsonEditor('editor_container_screengrabber', {
- framegrabber: window.schema.framegrabber
- }, true, true);
+ if (screenGrabberAvailable) {
+ conf_editor_screen = createJsonEditor('editor_container_screengrabber', {
+ framegrabber: window.schema.framegrabber
+ }, true, true);
- conf_editor_screen.on('ready', function () {
- // Trigger conf_editor_screen.watch - 'root.framegrabber.enable'
- var screenEnable = window.serverConfig.framegrabber.enable;
- conf_editor_screen.getEditor("root.framegrabber.enable").setValue(screenEnable);
- });
+ conf_editor_screen.on('ready', function () {
+ // Trigger conf_editor_screen.watch - 'root.framegrabber.enable'
+ var screenEnable = window.serverConfig.framegrabber.enable;
+ conf_editor_screen.getEditor("root.framegrabber.enable").setValue(screenEnable);
+ });
- conf_editor_screen.on('change', function () {
+ conf_editor_screen.on('change', function () {
+
+ if (!conf_editor_screen.validate().length) {
+ var deviceSelected = conf_editor_screen.getEditor("root.framegrabber.available_devices").getValue();
+ switch (deviceSelected) {
+ case "SELECT":
+ showInputOptionsForKey(conf_editor_screen, "framegrabber", ["enable", "available_devices"], false);
+ break;
+ case "NONE":
+ showInputOptionsForKey(conf_editor_screen, "framegrabber", ["enable", "available_devices"], false);
+ break;
+ default:
+ window.readOnlyMode ? $('#btn_submit_screengrabber').attr('disabled', true) : $('#btn_submit_screengrabber').attr('disabled', false);
+ break;
+ }
+ }
+ else {
+ $('#btn_submit_screengrabber').attr('disabled', true);
+ }
+ });
+
+ conf_editor_screen.watch('root.framegrabber.enable', () => {
+
+ var screenEnable = conf_editor_screen.getEditor("root.framegrabber.enable").getValue();
+ if (screenEnable) {
+ showInputOptionsForKey(conf_editor_screen, "framegrabber", "enable", true);
+ if (window.showOptHelp) {
+ $('#screengrabberHelpPanelId').show();
+ }
+ discoverInputSources("screen");
+ }
+ else {
+ $('#btn_submit_screengrabber').attr('disabled', false);
+ showInputOptionsForKey(conf_editor_screen, "framegrabber", "enable", false);
+ $('#screengrabberHelpPanelId').hide();
+ }
+
+ });
+
+ conf_editor_screen.watch('root.framegrabber.available_devices', () => {
- if (!conf_editor_screen.validate().length) {
var deviceSelected = conf_editor_screen.getEditor("root.framegrabber.available_devices").getValue();
- switch (deviceSelected) {
- case "SELECT":
- showInputOptionsForKey(conf_editor_screen, "framegrabber", ["enable", "available_devices"], false);
- break;
- case "NONE":
- showInputOptionsForKey(conf_editor_screen, "framegrabber", ["enable", "available_devices"], false);
- break;
- default:
- window.readOnlyMode ? $('#btn_submit_screengrabber').attr('disabled', true) : $('#btn_submit_screengrabber').attr('disabled', false);
- break;
+ if (deviceSelected === "SELECT" || deviceSelected === "NONE" || deviceSelected === "") {
+ $('#btn_submit_screengrabber').attr('disabled', true);
+ showInputOptionsForKey(conf_editor_screen, "framegrabber", ["enable", "available_devices"], false);
}
- }
- else {
- $('#btn_submit_screengrabber').attr('disabled', true);
- }
- });
+ else {
+ showInputOptionsForKey(conf_editor_screen, "framegrabber", ["enable", "available_devices"], true);
+ var addSchemaElements = {};
+ var enumVals = [];
+ var enumTitelVals = [];
+ var enumDefaultVal = "";
- conf_editor_screen.watch('root.framegrabber.enable', () => {
+ var deviceProperties = getPropertiesOfDevice("screen", deviceSelected);
- var screenEnable = conf_editor_screen.getEditor("root.framegrabber.enable").getValue();
- if (screenEnable) {
- showInputOptionsForKey(conf_editor_screen, "framegrabber", "enable", true);
- if (window.showOptHelp) {
- $('#screengrabberHelpPanelId').show();
+ //Update hidden input element
+ conf_editor_screen.getEditor("root.framegrabber.device").setValue(deviceProperties.device);
+
+ var video_inputs = deviceProperties.video_inputs;
+ if (video_inputs.length <= 1) {
+ addSchemaElements.access = "expert";
+ }
+
+ for (const video_input of video_inputs) {
+ enumVals.push(video_input.inputIdx.toString());
+ enumTitelVals.push(video_input.name);
+ }
+
+ if (enumVals.length > 0) {
+ if (deviceSelected === configuredDevice) {
+ var configuredVideoInput = window.serverConfig.framegrabber.input.toString();
+ if ($.inArray(configuredVideoInput, enumVals) != -1) {
+ enumDefaultVal = configuredVideoInput;
+ }
+ }
+ updateJsonEditorSelection(conf_editor_screen, 'root.framegrabber',
+ 'device_inputs', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false);
+ }
+
+ if (conf_editor_screen.validate().length && !window.readOnlyMode) {
+ $('#btn_submit_screengrabber').attr('disabled', false);
+ }
}
- discoverInputSources("screen");
- }
- else {
- $('#btn_submit_screengrabber').attr('disabled', false);
- showInputOptionsForKey(conf_editor_screen, "framegrabber", "enable", false);
- $('#screengrabberHelpPanelId').hide();
- }
+ });
- });
+ conf_editor_screen.watch('root.framegrabber.device_inputs', () => {
+ var deviceSelected = conf_editor_screen.getEditor("root.framegrabber.available_devices").getValue();
+ var videoInputSelected = conf_editor_screen.getEditor("root.framegrabber.device_inputs").getValue();
- conf_editor_screen.watch('root.framegrabber.available_devices', () => {
+ //Update hidden input element
+ conf_editor_screen.getEditor("root.framegrabber.input").setValue(parseInt(videoInputSelected));
- var deviceSelected = conf_editor_screen.getEditor("root.framegrabber.available_devices").getValue();
- if (deviceSelected === "SELECT" || deviceSelected === "NONE" || deviceSelected === "") {
- $('#btn_submit_screengrabber').attr('disabled', true);
- showInputOptionsForKey(conf_editor_screen, "framegrabber", ["enable", "available_devices"], false);
- }
- else {
- showInputOptionsForKey(conf_editor_screen, "framegrabber", ["enable", "available_devices"], true);
var addSchemaElements = {};
var enumVals = [];
var enumTitelVals = [];
@@ -142,256 +200,343 @@ $(document).ready(function () {
var deviceProperties = getPropertiesOfDevice("screen", deviceSelected);
- //Update hidden input element
- conf_editor_screen.getEditor("root.framegrabber.device").setValue(deviceProperties.device);
+ var formats = deviceProperties.video_inputs[videoInputSelected].formats;
+ var formatIdx = 0;
- var video_inputs = deviceProperties.video_inputs;
- if (video_inputs.length <= 1) {
- addSchemaElements.access = "expert";
+ var resolutions = formats[formatIdx].resolutions;
+ if (resolutions.length <= 1) {
+ addSchemaElements.access = "advanced";
+ } else {
+ resolutions.sort(compareTwoValues('width', 'height', 'asc'));
}
- for (const video_input of video_inputs) {
- enumVals.push(video_input.inputIdx.toString());
- enumTitelVals.push(video_input.name);
+ for (var i = 0; i < resolutions.length; i++) {
+ enumVals.push(i.toString());
+ var resolutionText = resolutions[i].width + "x" + resolutions[i].height;
+ enumTitelVals.push(resolutionText);
}
if (enumVals.length > 0) {
if (deviceSelected === configuredDevice) {
- var configuredVideoInput = window.serverConfig.framegrabber.input.toString();
- if ($.inArray(configuredVideoInput, enumVals) != -1) {
- enumDefaultVal = configuredVideoInput;
+ var configuredResolutionText = window.serverConfig.framegrabber.width + "x" + window.serverConfig.framegrabber.height;
+ var idx = $.inArray(configuredResolutionText, enumTitelVals);
+ if (idx != -1) {
+ enumDefaultVal = idx.toString();
}
}
+
updateJsonEditorSelection(conf_editor_screen, 'root.framegrabber',
- 'device_inputs', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false);
+ 'resolutions', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false);
}
if (conf_editor_screen.validate().length && !window.readOnlyMode) {
$('#btn_submit_screengrabber').attr('disabled', false);
}
- }
- });
+ });
- conf_editor_screen.watch('root.framegrabber.device_inputs', () => {
- var deviceSelected = conf_editor_screen.getEditor("root.framegrabber.available_devices").getValue();
- var videoInputSelected = conf_editor_screen.getEditor("root.framegrabber.device_inputs").getValue();
+ conf_editor_screen.watch('root.framegrabber.resolutions', () => {
+ var deviceSelected = conf_editor_screen.getEditor("root.framegrabber.available_devices").getValue();
+ var videoInputSelected = conf_editor_screen.getEditor("root.framegrabber.device_inputs").getValue();
+ var resolutionSelected = conf_editor_screen.getEditor("root.framegrabber.resolutions").getValue();
- //Update hidden input element
- conf_editor_screen.getEditor("root.framegrabber.input").setValue(parseInt(videoInputSelected));
+ var addSchemaElements = {};
+ var enumVals = [];
+ var enumDefaultVal = "";
- var addSchemaElements = {};
- var enumVals = [];
- var enumTitelVals = [];
- var enumDefaultVal = "";
+ var deviceProperties = getPropertiesOfDevice("screen", deviceSelected);
- var deviceProperties = getPropertiesOfDevice("screen", deviceSelected);
+ var formats = deviceProperties.video_inputs[videoInputSelected].formats;
+ var formatIdx = 0;
- var formats = deviceProperties.video_inputs[videoInputSelected].formats;
- var formatIdx = 0;
+ //Update hidden resolution related elements
+ var width = parseInt(formats[formatIdx].resolutions[resolutionSelected].width);
+ conf_editor_screen.getEditor("root.framegrabber.width").setValue(width);
- var resolutions = formats[formatIdx].resolutions;
- if (resolutions.length <= 1) {
- addSchemaElements.access = "advanced";
- } else {
- resolutions.sort(compareTwoValues('width', 'height', 'asc'));
- }
+ var height = parseInt(formats[formatIdx].resolutions[resolutionSelected].height);
+ conf_editor_screen.getEditor("root.framegrabber.height").setValue(height);
- for (var i = 0; i < resolutions.length; i++) {
- enumVals.push(i.toString());
- var resolutionText = resolutions[i].width + "x" + resolutions[i].height;
- enumTitelVals.push(resolutionText);
- }
+ //Update crop rage depending on selected resolution
+ updateCropForWidth(conf_editor_screen, "root.framegrabber");
+ updateCropForHeight(conf_editor_screen, "root.framegrabber");
- if (enumVals.length > 0) {
- if (deviceSelected === configuredDevice) {
- var configuredResolutionText = window.serverConfig.framegrabber.width + "x" + window.serverConfig.framegrabber.height;
- var idx = $.inArray(configuredResolutionText, enumTitelVals);
- if (idx != -1) {
- enumDefaultVal = idx.toString();
+ var fps = formats[formatIdx].resolutions[resolutionSelected].fps;
+ if (!fps) {
+ enumVals.push("NONE");
+ addSchemaElements.options = { "hidden": true };
+ } else {
+ fps.sort((a, b) => a - b);
+ for (var i = 0; i < fps.length; i++) {
+ enumVals.push(fps[i].toString());
}
}
- updateJsonEditorSelection(conf_editor_screen, 'root.framegrabber',
- 'resolutions', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false);
- }
-
- if (conf_editor_screen.validate().length && !window.readOnlyMode) {
- $('#btn_submit_screengrabber').attr('disabled', false);
- }
- });
-
- conf_editor_screen.watch('root.framegrabber.resolutions', () => {
- var deviceSelected = conf_editor_screen.getEditor("root.framegrabber.available_devices").getValue();
- var videoInputSelected = conf_editor_screen.getEditor("root.framegrabber.device_inputs").getValue();
- var resolutionSelected = conf_editor_screen.getEditor("root.framegrabber.resolutions").getValue();
-
- var addSchemaElements = {};
- var enumVals = [];
- var enumDefaultVal = "";
-
- var deviceProperties = getPropertiesOfDevice("screen", deviceSelected);
-
- var formats = deviceProperties.video_inputs[videoInputSelected].formats;
- var formatIdx = 0;
-
- //Update hidden resolution related elements
- var width = parseInt(formats[formatIdx].resolutions[resolutionSelected].width);
- conf_editor_screen.getEditor("root.framegrabber.width").setValue(width);
-
- var height = parseInt(formats[formatIdx].resolutions[resolutionSelected].height);
- conf_editor_screen.getEditor("root.framegrabber.height").setValue(height);
-
- //Update crop rage depending on selected resolution
- updateCropForWidth(conf_editor_screen, "root.framegrabber");
- updateCropForHeight(conf_editor_screen, "root.framegrabber");
-
- var fps = formats[formatIdx].resolutions[resolutionSelected].fps;
- if (!fps) {
- enumVals.push("NONE");
- addSchemaElements.options = { "hidden": true };
- } else {
- fps.sort((a, b) => a - b);
- for (var i = 0; i < fps.length; i++) {
- enumVals.push(fps[i].toString());
+ if (enumVals.length <= 1) {
+ addSchemaElements.access = "expert";
}
- }
- if (enumVals.length <= 1) {
- addSchemaElements.access = "expert";
- }
-
- if (enumVals.length > 0) {
- if (deviceSelected === configuredDevice) {
- var configuredFps = window.serverConfig.framegrabber.fps.toString();
- if ($.inArray(configuredFps, enumVals) != -1) {
- enumDefaultVal = configuredFps;
- }
- } else if (deviceProperties.hasOwnProperty('default') && !jQuery.isEmptyObject(deviceProperties.default.video_input)) {
+ if (enumVals.length > 0) {
+ if (deviceSelected === configuredDevice) {
+ var configuredFps = window.serverConfig.framegrabber.fps.toString();
+ if ($.inArray(configuredFps, enumVals) != -1) {
+ enumDefaultVal = configuredFps;
+ }
+ } else if (deviceProperties.hasOwnProperty('default') && !jQuery.isEmptyObject(deviceProperties.default.video_input)) {
if (deviceProperties.default.video_input.resolution.fps) {
enumDefaultVal = deviceProperties.default.video_input.resolution.fps;
}
+ }
+ updateJsonEditorSelection(conf_editor_screen, 'root.framegrabber',
+ 'framerates', addSchemaElements, enumVals, [], enumDefaultVal, false);
}
- updateJsonEditorSelection(conf_editor_screen, 'root.framegrabber',
- 'framerates', addSchemaElements, enumVals, [], enumDefaultVal, false);
- }
- if (conf_editor_screen.validate().length && !window.readOnlyMode) {
- $('#btn_submit_screengrabber').attr('disabled', false);
- }
- });
-
- conf_editor_screen.watch('root.framegrabber.framerates', () => {
- //Update hidden fps element
- var fps = 0;
- var framerates = conf_editor_screen.getEditor("root.framegrabber.framerates").getValue();
- if (framerates !== "NONE") {
- fps = parseInt(framerates);
- }
- conf_editor_screen.getEditor("root.framegrabber.fps").setValue(fps);
- });
-
-
- $('#btn_submit_screengrabber').off().on('click', function () {
- var saveOptions = conf_editor_screen.getValue();
-
- var instCaptOptions = window.serverConfig.instCapture;
- instCaptOptions.systemEnable = true;
- saveOptions.instCapture = instCaptOptions;
-
- requestWriteConfig(saveOptions);
- });
-
- // External Input Sources (Video-Grabbers)
-
- var configuredDevice = "";
- var discoveredInputSources = {};
- var deviceProperties = {};
-
- function updateDeviceProperties(deviceProperties, property, key) {
- var properties = {};
- if (deviceProperties) {
- if (deviceProperties.hasOwnProperty(property)) {
- properties = deviceProperties[property];
+ if (conf_editor_screen.validate().length && !window.readOnlyMode) {
+ $('#btn_submit_screengrabber').attr('disabled', false);
}
- }
- updateJsonEditorRange(conf_editor_video, "root.grabberV4L2", key,
- properties.minValue,
- properties.maxValue,
- properties.current,
- properties.step,
- true);
+ });
- if (jQuery.isEmptyObject(properties)) {
- showInputOptionForItem(conf_editor_video, "grabberV4L2", key, false);
- } else {
- showInputOptionForItem(conf_editor_video, "grabberV4L2", key, true);
- }
+ conf_editor_screen.watch('root.framegrabber.framerates', () => {
+ //Update hidden fps element
+ var fps = 0;
+ var framerates = conf_editor_screen.getEditor("root.framegrabber.framerates").getValue();
+ if (framerates !== "NONE") {
+ fps = parseInt(framerates);
+ }
+ conf_editor_screen.getEditor("root.framegrabber.fps").setValue(fps);
+ });
+
+
+ $('#btn_submit_screengrabber').off().on('click', function () {
+ var saveOptions = conf_editor_screen.getValue();
+
+ var instCaptOptions = window.serverConfig.instCapture;
+ instCaptOptions.systemEnable = true;
+ saveOptions.instCapture = instCaptOptions;
+
+ requestWriteConfig(saveOptions);
+ });
}
- conf_editor_video = createJsonEditor('editor_container_videograbber', {
- grabberV4L2: window.schema.grabberV4L2
- }, true, true);
+ // External Input Sources (Video-Grabbers)
+ if (videoGrabberAvailable) {
+ function updateDeviceProperties(deviceProperties, property, key) {
+ var properties = {};
+ if (deviceProperties) {
+ if (deviceProperties.hasOwnProperty(property)) {
+ properties = deviceProperties[property];
+ }
+ }
+ updateJsonEditorRange(conf_editor_video, "root.grabberV4L2", key,
+ properties.minValue,
+ properties.maxValue,
+ properties.current,
+ properties.step,
+ true);
- conf_editor_video.on('ready', function () {
- // Trigger conf_editor_video.watch - 'root.grabberV4L2.enable'
- var videoEnable = window.serverConfig.grabberV4L2.enable;
- conf_editor_video.getEditor("root.grabberV4L2.enable").setValue(videoEnable);
- });
-
- conf_editor_video.on('change', function () {
-
- // Hide elements not supported by the backend
- if (window.serverInfo.cec.enabled === false) {
- showInputOptionForItem(conf_editor_video, "grabberV4L2", "cecDetection", false);
+ if (jQuery.isEmptyObject(properties)) {
+ showInputOptionForItem(conf_editor_video, "grabberV4L2", key, false);
+ } else {
+ showInputOptionForItem(conf_editor_video, "grabberV4L2", key, true);
+ }
}
- // Validate the current editor's content
- if (!conf_editor_video.validate().length) {
+ conf_editor_video = createJsonEditor('editor_container_videograbber', {
+ grabberV4L2: window.schema.grabberV4L2
+ }, true, true);
+
+ conf_editor_video.on('ready', function () {
+ // Trigger conf_editor_video.watch - 'root.grabberV4L2.enable'
+ var videoEnable = window.serverConfig.grabberV4L2.enable;
+ conf_editor_video.getEditor("root.grabberV4L2.enable").setValue(videoEnable);
+ });
+
+ conf_editor_video.on('change', function () {
+
+ // Hide elements not supported by the backend
+ if (window.serverInfo.cec.enabled === false || !CEC_ENABLED) {
+ showInputOptionForItem(conf_editor_video, "grabberV4L2", "cecDetection", false);
+ }
+
+ // Validate the current editor's content
+ if (!conf_editor_video.validate().length) {
+ var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
+ switch (deviceSelected) {
+ case "SELECT":
+ showInputOptionsForKey(conf_editor_video, "grabberV4L2", ["enable", "available_devices"], false);
+ break;
+ case "NONE":
+ showInputOptionsForKey(conf_editor_video, "grabberV4L2", ["enable", "available_devices"], false);
+ break;
+ default:
+ window.readOnlyMode ? $('#btn_submit_videograbber').attr('disabled', true) : $('#btn_submit_videograbber').attr('disabled', false);
+ break;
+ }
+ }
+ else {
+ $('#btn_submit_videograbber').attr('disabled', true);
+ }
+ });
+
+ conf_editor_video.watch('root.grabberV4L2.enable', () => {
+
+ var videoEnable = conf_editor_video.getEditor("root.grabberV4L2.enable").getValue();
+ if (videoEnable) {
+ showInputOptionsForKey(conf_editor_video, "grabberV4L2", "enable", true);
+ $('#btn_videograbber_set_defaults').show();
+ if (window.showOptHelp) {
+ $('#videograbberHelpPanelId').show();
+ }
+ discoverInputSources("video");
+ }
+ else {
+ $('#btn_submit_videograbber').attr('disabled', false);
+ $('#btn_videograbber_set_defaults').hide();
+ showInputOptionsForKey(conf_editor_video, "grabberV4L2", "enable", false);
+ $('#videograbberHelpPanelId').hide();
+ }
+ });
+
+ conf_editor_video.watch('root.grabberV4L2.available_devices', () => {
var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
- switch (deviceSelected) {
- case "SELECT":
- showInputOptionsForKey(conf_editor_video, "grabberV4L2", ["enable", "available_devices"], false);
- break;
- case "NONE":
- showInputOptionsForKey(conf_editor_video, "grabberV4L2", ["enable", "available_devices"], false);
- break;
- default:
- window.readOnlyMode ? $('#btn_submit_videograbber').attr('disabled', true) : $('#btn_submit_videograbber').attr('disabled', false);
- break;
+ if (deviceSelected === "SELECT" || deviceSelected === "NONE" || deviceSelected === "") {
+ $('#btn_submit_videograbber').attr('disabled', true);
+ showInputOptionsForKey(conf_editor_video, "grabberV4L2", ["enable", "available_devices"], false);
}
- }
- else {
- $('#btn_submit_videograbber').attr('disabled', true);
- }
- });
+ else {
+ showInputOptionsForKey(conf_editor_video, "grabberV4L2", ["enable", "available_devices"], true);
+ var addSchemaElements = {};
+ var enumVals = [];
+ var enumTitelVals = [];
+ var enumDefaultVal = "";
- conf_editor_video.watch('root.grabberV4L2.enable', () => {
+ var deviceProperties = getPropertiesOfDevice("video", deviceSelected);
- var videoEnable = conf_editor_video.getEditor("root.grabberV4L2.enable").getValue();
- if (videoEnable) {
- showInputOptionsForKey(conf_editor_video, "grabberV4L2", "enable", true);
- $('#btn_videograbber_set_defaults').show();
- if (window.showOptHelp) {
- $('#videograbberHelpPanelId').show();
+ //Update hidden input element
+ conf_editor_video.getEditor("root.grabberV4L2.device").setValue(deviceProperties.device);
+
+ if (deviceProperties.hasOwnProperty('default') && !jQuery.isEmptyObject(deviceProperties.default.properties)) {
+ $('#btn_videograbber_set_defaults').attr('disabled', false);
+ } else {
+ $('#btn_videograbber_set_defaults').attr('disabled', true);
+ }
+
+ //If configured device is selected, use the saved values as current values
+ if (deviceSelected === configuredDevice) {
+ // Only if the device reported properties, use the configured values. In case no properties are presented, the device properties cannot be controlled.
+ if (deviceProperties.hasOwnProperty('properties') && !jQuery.isEmptyObject(deviceProperties.properties)) {
+ let properties = {
+ brightness: { current: window.serverConfig.grabberV4L2.hardware_brightness },
+ contrast: { current: window.serverConfig.grabberV4L2.hardware_contrast },
+ saturation: { current: window.serverConfig.grabberV4L2.hardware_saturation },
+ hue: { current: window.serverConfig.grabberV4L2.hardware_hue }
+ };
+ deviceProperties.properties = properties;
+ }
+ }
+
+ updateDeviceProperties(deviceProperties.properties, "brightness", "hardware_brightness");
+ updateDeviceProperties(deviceProperties.properties, "contrast", "hardware_contrast");
+ updateDeviceProperties(deviceProperties.properties, "saturation", "hardware_saturation");
+ updateDeviceProperties(deviceProperties.properties, "hue", "hardware_hue");
+
+ var video_inputs = deviceProperties.video_inputs;
+ if (video_inputs.length <= 1) {
+ addSchemaElements.access = "expert";
+ }
+
+ for (const video_input of video_inputs) {
+ enumVals.push(video_input.inputIdx.toString());
+ enumTitelVals.push(video_input.name);
+ }
+
+ if (enumVals.length > 0) {
+ if (deviceSelected === configuredDevice) {
+ var configuredVideoInput = window.serverConfig.grabberV4L2.input.toString();
+ if ($.inArray(configuredVideoInput, enumVals) != -1) {
+ enumDefaultVal = configuredVideoInput;
+ }
+ }
+
+ updateJsonEditorSelection(conf_editor_video, 'root.grabberV4L2',
+ 'device_inputs', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false, false);
+ }
+
+ if (conf_editor_video.validate().length && !window.readOnlyMode) {
+ $('#btn_submit_videograbber').attr('disabled', false);
+ }
}
- discoverInputSources("video");
- }
- else {
- $('#btn_submit_videograbber').attr('disabled', false);
- $('#btn_videograbber_set_defaults').hide();
- showInputOptionsForKey(conf_editor_video, "grabberV4L2", "enable", false);
- $('#videograbberHelpPanelId').hide();
- }
- });
+ });
+
+ conf_editor_video.watch('root.grabberV4L2.device_inputs', () => {
+ var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
+ var videoInputSelected = conf_editor_video.getEditor("root.grabberV4L2.device_inputs").getValue();
+
+ var addSchemaElements = {};
+ var enumVals = [];
+ var enumTitelVals = [];
+ var enumDefaultVal = "";
+
+ var deviceProperties = getPropertiesOfDevice("video", deviceSelected);
+ var formats = deviceProperties.video_inputs[videoInputSelected].formats;
+
+ addSchemaElements.access = "advanced";
+
+ for (var i = 0; i < formats.length; i++) {
+ if (formats[i].format) {
+ enumVals.push(formats[i].format);
+ enumTitelVals.push(formats[i].format.toUpperCase());
+ }
+ else {
+ enumVals.push("NONE");
+ }
+ }
+
+ if (enumVals.length > 0) {
+ if (deviceSelected === configuredDevice) {
+ var configuredEncoding = window.serverConfig.grabberV4L2.encoding;
+ if ($.inArray(configuredEncoding, enumVals) != -1) {
+ enumDefaultVal = configuredEncoding;
+ }
+ }
+ updateJsonEditorSelection(conf_editor_video, 'root.grabberV4L2',
+ 'encoding', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false);
+ }
+
+ var enumVals = [];
+ var enumDefaultVal = "";
+
+ var standards = deviceProperties.video_inputs[videoInputSelected].standards;
+ if (!standards) {
+ enumVals.push("NONE");
+ addSchemaElements.options = { "hidden": true };
+ } else {
+ enumVals = standards;
+ }
+
+ if (enumVals.length > 0) {
+ if (deviceSelected === configuredDevice) {
+ var configuredStandard = window.serverConfig.grabberV4L2.standard;
+ if ($.inArray(configuredStandard, enumVals) != -1) {
+ enumDefaultVal = configuredStandard;
+ }
+ }
+
+ updateJsonEditorSelection(conf_editor_video, 'root.grabberV4L2',
+ 'standard', addSchemaElements, enumVals, [], enumDefaultVal, false);
+ }
+
+ if (conf_editor_video.validate().length && !window.readOnlyMode) {
+ $('#btn_submit_videograbber').attr('disabled', false);
+ }
+ });
+
+ conf_editor_video.watch('root.grabberV4L2.encoding', () => {
+ var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
+ var videoInputSelected = conf_editor_video.getEditor("root.grabberV4L2.device_inputs").getValue();
+ var formatSelected = conf_editor_video.getEditor("root.grabberV4L2.encoding").getValue();
+
+ //Update hidden input element
+ conf_editor_video.getEditor("root.grabberV4L2.input").setValue(parseInt(videoInputSelected));
- conf_editor_video.watch('root.grabberV4L2.available_devices', () => {
- var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
- if (deviceSelected === "SELECT" || deviceSelected === "NONE" || deviceSelected === "") {
- $('#btn_submit_videograbber').attr('disabled', true);
- showInputOptionsForKey(conf_editor_video, "grabberV4L2", ["enable", "available_devices"], false);
- }
- else {
- showInputOptionsForKey(conf_editor_video, "grabberV4L2", ["enable", "available_devices"], true);
var addSchemaElements = {};
var enumVals = [];
var enumTitelVals = [];
@@ -399,288 +544,155 @@ $(document).ready(function () {
var deviceProperties = getPropertiesOfDevice("video", deviceSelected);
- //Update hidden input element
- conf_editor_video.getEditor("root.grabberV4L2.device").setValue(deviceProperties.device);
+ var formats = deviceProperties.video_inputs[videoInputSelected].formats;
+ var formatIdx = 0;
+ if (formatSelected !== "NONE") {
+ formatIdx = formats.findIndex(x => x.format === formatSelected);
+ }
- if (deviceProperties.hasOwnProperty('default') && !jQuery.isEmptyObject(deviceProperties.default.properties)) {
- $('#btn_videograbber_set_defaults').attr('disabled', false);
+ var resolutions = formats[formatIdx].resolutions;
+ if (resolutions.length <= 1) {
+ addSchemaElements.access = "advanced";
} else {
- $('#btn_videograbber_set_defaults').attr('disabled', true);
+ resolutions.sort(compareTwoValues('width', 'height', 'asc'));
}
- //If configured device is selected, use the saved values as current values
- if (deviceSelected === configuredDevice) {
- // Only if the device reported properties, use the configured values. In case no properties are presented, the device properties cannot be controlled.
- if (deviceProperties.hasOwnProperty('properties') && !jQuery.isEmptyObject(deviceProperties.properties)) {
- let properties = {
- brightness: { current: window.serverConfig.grabberV4L2.hardware_brightness },
- contrast: { current: window.serverConfig.grabberV4L2.hardware_contrast },
- saturation: { current: window.serverConfig.grabberV4L2.hardware_saturation },
- hue: { current: window.serverConfig.grabberV4L2.hardware_hue }
- };
- deviceProperties.properties = properties;
- }
- }
-
- updateDeviceProperties(deviceProperties.properties, "brightness", "hardware_brightness");
- updateDeviceProperties(deviceProperties.properties, "contrast", "hardware_contrast");
- updateDeviceProperties(deviceProperties.properties, "saturation", "hardware_saturation");
- updateDeviceProperties(deviceProperties.properties, "hue", "hardware_hue");
-
- var video_inputs = deviceProperties.video_inputs;
- if (video_inputs.length <= 1) {
- addSchemaElements.access = "expert";
- }
-
- for (const video_input of video_inputs) {
- enumVals.push(video_input.inputIdx.toString());
- enumTitelVals.push(video_input.name);
+ for (var i = 0; i < resolutions.length; i++) {
+ enumVals.push(i.toString());
+ var resolutionText = resolutions[i].width + "x" + resolutions[i].height;
+ enumTitelVals.push(resolutionText);
}
if (enumVals.length > 0) {
if (deviceSelected === configuredDevice) {
- var configuredVideoInput = window.serverConfig.grabberV4L2.input.toString();
- if ($.inArray(configuredVideoInput, enumVals) != -1) {
- enumDefaultVal = configuredVideoInput;
+ var configuredResolutionText = window.serverConfig.grabberV4L2.width + "x" + window.serverConfig.grabberV4L2.height;
+ var idx = $.inArray(configuredResolutionText, enumTitelVals);
+ if (idx != -1) {
+ enumDefaultVal = idx.toString();
}
}
updateJsonEditorSelection(conf_editor_video, 'root.grabberV4L2',
- 'device_inputs', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false, false);
+ 'resolutions', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false);
}
if (conf_editor_video.validate().length && !window.readOnlyMode) {
$('#btn_submit_videograbber').attr('disabled', false);
}
- }
- });
+ });
- conf_editor_video.watch('root.grabberV4L2.device_inputs', () => {
- var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
- var videoInputSelected = conf_editor_video.getEditor("root.grabberV4L2.device_inputs").getValue();
+ conf_editor_video.watch('root.grabberV4L2.resolutions', () => {
+ var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
+ var videoInputSelected = conf_editor_video.getEditor("root.grabberV4L2.device_inputs").getValue();
+ var formatSelected = conf_editor_video.getEditor("root.grabberV4L2.encoding").getValue();
+ var resolutionSelected = conf_editor_video.getEditor("root.grabberV4L2.resolutions").getValue();
- var addSchemaElements = {};
- var enumVals = [];
- var enumTitelVals = [];
- var enumDefaultVal = "";
+ var addSchemaElements = {};
+ var enumVals = [];
+ var enumDefaultVal = "";
- var deviceProperties = getPropertiesOfDevice("video", deviceSelected);
- var formats = deviceProperties.video_inputs[videoInputSelected].formats;
+ var deviceProperties = getPropertiesOfDevice("video", deviceSelected);
- addSchemaElements.access = "advanced";
+ var formats = deviceProperties.video_inputs[videoInputSelected].formats;
+ var formatIdx = 0;
+ if (formatSelected !== "NONE") {
+ formatIdx = formats.findIndex(x => x.format === formatSelected);
+ }
- for (var i = 0; i < formats.length; i++) {
- if (formats[i].format) {
- enumVals.push(formats[i].format);
- enumTitelVals.push(formats[i].format.toUpperCase());
+ //Update hidden resolution related elements
+ var width = parseInt(formats[formatIdx].resolutions[resolutionSelected].width);
+ conf_editor_video.getEditor("root.grabberV4L2.width").setValue(width);
+
+ var height = parseInt(formats[formatIdx].resolutions[resolutionSelected].height);
+ conf_editor_video.getEditor("root.grabberV4L2.height").setValue(height);
+
+ //Update crop rage depending on selected resolution
+ updateCropForWidth(conf_editor_video, "root.grabberV4L2");
+ updateCropForHeight(conf_editor_video, "root.grabberV4L2");
+
+ var fps = formats[formatIdx].resolutions[resolutionSelected].fps;
+ if (!fps) {
+ addSchemaElements.options = { "hidden": true };
+ } else {
+ fps.sort((a, b) => a - b);
+ for (var i = 0; i < fps.length; i++) {
+ enumVals.push(fps[i].toString());
+ }
+ }
+
+ if (enumVals.length <= 1) {
+ addSchemaElements.access = "expert";
+ }
+
+ if (enumVals.length > 0) {
+ if (deviceSelected === configuredDevice) {
+ var configuredFps = window.serverConfig.grabberV4L2.fps.toString();
+ if ($.inArray(configuredFps, enumVals) != -1) {
+ enumDefaultVal = configuredFps;
+ }
+ }
+ updateJsonEditorSelection(conf_editor_video, 'root.grabberV4L2',
+ 'framerates', addSchemaElements, enumVals, [], enumDefaultVal, false);
+ }
+
+ if (conf_editor_video.validate().length && !window.readOnlyMode) {
+ $('#btn_submit_videograbber').attr('disabled', false);
+ }
+ });
+
+ conf_editor_video.watch('root.grabberV4L2.framerates', () => {
+ //Update hidden fps element
+ var fps = 0;
+ var framerates = conf_editor_video.getEditor("root.grabberV4L2.framerates").getValue();
+ if (framerates !== "NONE") {
+ fps = parseInt(framerates);
+ }
+ //Show Frameskipping only when more than 2 fps
+ if (fps > 2) {
+ showInputOptionForItem(conf_editor_video, "grabberV4L2", "fpsSoftwareDecimation", true);
}
else {
- enumVals.push("NONE");
+ showInputOptionForItem(conf_editor_video, "grabberV4L2", "fpsSoftwareDecimation", false);
}
- }
+ conf_editor_video.getEditor("root.grabberV4L2.fps").setValue(fps);
+ });
- if (enumVals.length > 0) {
- if (deviceSelected === configuredDevice) {
- var configuredEncoding = window.serverConfig.grabberV4L2.encoding;
- if ($.inArray(configuredEncoding, enumVals) != -1) {
- enumDefaultVal = configuredEncoding;
+ $('#btn_submit_videograbber').off().on('click', function () {
+ var saveOptions = conf_editor_video.getValue();
+
+ var instCaptOptions = window.serverConfig.instCapture;
+ instCaptOptions.v4lEnable = true;
+ saveOptions.instCapture = instCaptOptions;
+
+ requestWriteConfig(saveOptions);
+ });
+
+ // ------------------------------------------------------------------
+
+ $('#btn_videograbber_set_defaults').off().on('click', function () {
+ var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
+ var deviceProperties = getPropertiesOfDevice("video", deviceSelected);
+
+ var defaultDeviceProperties = {};
+ if (deviceProperties.hasOwnProperty('default')) {
+ if (deviceProperties.default.hasOwnProperty('properties')) {
+ defaultDeviceProperties = deviceProperties.default.properties;
+ if (defaultDeviceProperties.brightness) {
+ conf_editor_video.getEditor("root.grabberV4L2.hardware_brightness").setValue(defaultDeviceProperties.brightness);
+ }
+ if (defaultDeviceProperties.contrast) {
+ conf_editor_video.getEditor("root.grabberV4L2.hardware_contrast").setValue(defaultDeviceProperties.contrast);
+ }
+ if (defaultDeviceProperties.saturation) {
+ conf_editor_video.getEditor("root.grabberV4L2.hardware_saturation").setValue(defaultDeviceProperties.saturation);
+ }
+ if (defaultDeviceProperties.hue) {
+ conf_editor_video.getEditor("root.grabberV4L2.hardware_hue").setValue(defaultDeviceProperties.hue);
+ }
}
}
- updateJsonEditorSelection(conf_editor_video, 'root.grabberV4L2',
- 'encoding', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false);
- }
-
- var enumVals = [];
- var enumDefaultVal = "";
-
- var standards = deviceProperties.video_inputs[videoInputSelected].standards;
- if (!standards) {
- enumVals.push("NONE");
- addSchemaElements.options = { "hidden": true };
- } else {
- enumVals = standards;
- }
-
- if (enumVals.length > 0) {
- if (deviceSelected === configuredDevice) {
- var configuredStandard = window.serverConfig.grabberV4L2.standard;
- if ($.inArray(configuredStandard, enumVals) != -1) {
- enumDefaultVal = configuredStandard;
- }
- }
-
- updateJsonEditorSelection(conf_editor_video, 'root.grabberV4L2',
- 'standard', addSchemaElements, enumVals, [], enumDefaultVal, false);
- }
-
- if (conf_editor_video.validate().length && !window.readOnlyMode) {
- $('#btn_submit_videograbber').attr('disabled', false);
- }
- });
-
- conf_editor_video.watch('root.grabberV4L2.encoding', () => {
- var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
- var videoInputSelected = conf_editor_video.getEditor("root.grabberV4L2.device_inputs").getValue();
- var formatSelected = conf_editor_video.getEditor("root.grabberV4L2.encoding").getValue();
-
- //Update hidden input element
- conf_editor_video.getEditor("root.grabberV4L2.input").setValue(parseInt(videoInputSelected));
-
- var addSchemaElements = {};
- var enumVals = [];
- var enumTitelVals = [];
- var enumDefaultVal = "";
-
- var deviceProperties = getPropertiesOfDevice("video", deviceSelected);
-
- var formats = deviceProperties.video_inputs[videoInputSelected].formats;
- var formatIdx = 0;
- if (formatSelected !== "NONE") {
- formatIdx = formats.findIndex(x => x.format === formatSelected);
- }
-
- var resolutions = formats[formatIdx].resolutions;
- if (resolutions.length <= 1) {
- addSchemaElements.access = "advanced";
- } else {
- resolutions.sort(compareTwoValues('width', 'height', 'asc'));
- }
-
- for (var i = 0; i < resolutions.length; i++) {
- enumVals.push(i.toString());
- var resolutionText = resolutions[i].width + "x" + resolutions[i].height;
- enumTitelVals.push(resolutionText);
- }
-
- if (enumVals.length > 0) {
- if (deviceSelected === configuredDevice) {
- var configuredResolutionText = window.serverConfig.grabberV4L2.width + "x" + window.serverConfig.grabberV4L2.height;
- var idx = $.inArray(configuredResolutionText, enumTitelVals);
- if (idx != -1) {
- enumDefaultVal = idx.toString();
- }
- }
-
- updateJsonEditorSelection(conf_editor_video, 'root.grabberV4L2',
- 'resolutions', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false);
- }
-
- if (conf_editor_video.validate().length && !window.readOnlyMode) {
- $('#btn_submit_videograbber').attr('disabled', false);
- }
- });
-
- conf_editor_video.watch('root.grabberV4L2.resolutions', () => {
- var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
- var videoInputSelected = conf_editor_video.getEditor("root.grabberV4L2.device_inputs").getValue();
- var formatSelected = conf_editor_video.getEditor("root.grabberV4L2.encoding").getValue();
- var resolutionSelected = conf_editor_video.getEditor("root.grabberV4L2.resolutions").getValue();
-
- var addSchemaElements = {};
- var enumVals = [];
- var enumDefaultVal = "";
-
- var deviceProperties = getPropertiesOfDevice("video", deviceSelected);
-
- var formats = deviceProperties.video_inputs[videoInputSelected].formats;
- var formatIdx = 0;
- if (formatSelected !== "NONE") {
- formatIdx = formats.findIndex(x => x.format === formatSelected);
- }
-
- //Update hidden resolution related elements
- var width = parseInt(formats[formatIdx].resolutions[resolutionSelected].width);
- conf_editor_video.getEditor("root.grabberV4L2.width").setValue(width);
-
- var height = parseInt(formats[formatIdx].resolutions[resolutionSelected].height);
- conf_editor_video.getEditor("root.grabberV4L2.height").setValue(height);
-
- //Update crop rage depending on selected resolution
- updateCropForWidth(conf_editor_video, "root.grabberV4L2");
- updateCropForHeight(conf_editor_video, "root.grabberV4L2");
-
- var fps = formats[formatIdx].resolutions[resolutionSelected].fps;
- if (!fps) {
- addSchemaElements.options = { "hidden": true };
- } else {
- fps.sort((a, b) => a - b);
- for (var i = 0; i < fps.length; i++) {
- enumVals.push(fps[i].toString());
- }
- }
-
- if (enumVals.length <= 1) {
- addSchemaElements.access = "expert";
- }
-
- if (enumVals.length > 0) {
- if (deviceSelected === configuredDevice) {
- var configuredFps = window.serverConfig.grabberV4L2.fps.toString();
- if ($.inArray(configuredFps, enumVals) != -1) {
- enumDefaultVal = configuredFps;
- }
- }
- updateJsonEditorSelection(conf_editor_video, 'root.grabberV4L2',
- 'framerates', addSchemaElements, enumVals, [], enumDefaultVal, false);
- }
-
- if (conf_editor_video.validate().length && !window.readOnlyMode) {
- $('#btn_submit_videograbber').attr('disabled', false);
- }
- });
-
- conf_editor_video.watch('root.grabberV4L2.framerates', () => {
- //Update hidden fps element
- var fps = 0;
- var framerates = conf_editor_video.getEditor("root.grabberV4L2.framerates").getValue();
- if (framerates !== "NONE") {
- fps = parseInt(framerates);
- }
- //Show Frameskipping only when more than 2 fps
- if (fps > 2) {
- showInputOptionForItem(conf_editor_video, "grabberV4L2", "fpsSoftwareDecimation", true);
- }
- else {
- showInputOptionForItem(conf_editor_video, "grabberV4L2", "fpsSoftwareDecimation", false);
- }
- conf_editor_video.getEditor("root.grabberV4L2.fps").setValue(fps);
- });
-
- $('#btn_submit_videograbber').off().on('click', function () {
- var saveOptions = conf_editor_video.getValue();
-
- var instCaptOptions = window.serverConfig.instCapture;
- instCaptOptions.v4lEnable = true;
- saveOptions.instCapture = instCaptOptions;
-
- requestWriteConfig(saveOptions);
- });
-
- // ------------------------------------------------------------------
-
- $('#btn_videograbber_set_defaults').off().on('click', function () {
- var deviceSelected = conf_editor_video.getEditor("root.grabberV4L2.available_devices").getValue();
- var deviceProperties = getPropertiesOfDevice("video", deviceSelected);
-
- var defaultDeviceProperties = {};
- if (deviceProperties.hasOwnProperty('default')) {
- if (deviceProperties.default.hasOwnProperty('properties')) {
- defaultDeviceProperties = deviceProperties.default.properties;
- if (defaultDeviceProperties.brightness) {
- conf_editor_video.getEditor("root.grabberV4L2.hardware_brightness").setValue(defaultDeviceProperties.brightness);
- }
- if (defaultDeviceProperties.contrast) {
- conf_editor_video.getEditor("root.grabberV4L2.hardware_contrast").setValue(defaultDeviceProperties.contrast);
- }
- if (defaultDeviceProperties.saturation) {
- conf_editor_video.getEditor("root.grabberV4L2.hardware_saturation").setValue(defaultDeviceProperties.saturation);
- }
- if (defaultDeviceProperties.hue) {
- conf_editor_video.getEditor("root.grabberV4L2.hardware_hue").setValue(defaultDeviceProperties.hue);
- }
- }
- }
- });
+ });
+ }
// ------------------------------------------------------------------
@@ -688,8 +700,12 @@ $(document).ready(function () {
//create introduction
if (window.showOptHelp) {
- createHint("intro", $.i18n('conf_grabber_fg_intro'), "editor_container_screengrabber");
- createHint("intro", $.i18n('conf_grabber_v4l_intro'), "editor_container_videograbber");
+ if (screenGrabberAvailable) {
+ createHint("intro", $.i18n('conf_grabber_fg_intro'), "editor_container_screengrabber");
+ }
+ if (videoGrabberAvailable) {
+ createHint("intro", $.i18n('conf_grabber_v4l_intro'), "editor_container_videograbber");
+ }
}
removeOverlay();
@@ -773,11 +789,15 @@ $(document).ready(function () {
switch (type) {
case "screen":
discoveredInputSources.screen = discoveryResult.video_sources;
- updateScreenSourcesList(type, discoveredInputSources.screen);
+ if (screenGrabberAvailable) {
+ updateScreenSourcesList(type, discoveredInputSources.screen);
+ }
break;
case "video":
discoveredInputSources.video = discoveryResult.video_sources;
- updateVideoSourcesList(type, discoveredInputSources.video);
+ if (videoGrabberAvailable) {
+ updateVideoSourcesList(type, discoveredInputSources.video);
+ }
break;
}
}
diff --git a/assets/webconfig/js/content_index.js b/assets/webconfig/js/content_index.js
index c8999772..878d6485 100644
--- a/assets/webconfig/js/content_index.js
+++ b/assets/webconfig/js/content_index.js
@@ -222,6 +222,12 @@ $(document).ready(function () {
$(window.hyperion).one("ready", function (event) {
// Content will be loaded by the instance load/switch
+
+ //Hide capture menu entries, if no grabbers are available
+ if ((window.serverInfo.grabbers.screen.available.length === 0) && (window.serverInfo.grabbers.video.available.length === 0)) {
+ $("#MenuItemGrabber").attr('style', 'display:none')
+ $("#MenuItemInstCapture").attr('style', 'display:none')
+ }
});
$(window.hyperion).on("cmd-adjustment-update", function (event) {
diff --git a/assets/webconfig/js/content_instcapture.js b/assets/webconfig/js/content_instcapture.js
index 0c68bcf1..d4e89030 100644
--- a/assets/webconfig/js/content_instcapture.js
+++ b/assets/webconfig/js/content_instcapture.js
@@ -1,6 +1,9 @@
$(document).ready(function () {
performTranslation();
+ var screenGrabberAvailable = (window.serverInfo.grabbers.screen.available.length !== 0);
+ var videoGrabberAvailable = (window.serverInfo.grabbers.video.available.length !== 0);
+
// update instance listing
updateHyperionInstanceListing();
@@ -26,20 +29,33 @@ $(document).ready(function () {
conf_editor_instCapt.on('ready', function () {
- if (!window.serverConfig.framegrabber.enable) {
- conf_editor_instCapt.getEditor("root.instCapture.systemEnable").setValue(false);
- conf_editor_instCapt.getEditor("root.instCapture.systemEnable").disable();
- }
- else {
- conf_editor_instCapt.getEditor("root.instCapture.systemEnable").setValue(window.serverConfig.instCapture.systemEnable);
+ if (screenGrabberAvailable) {
+ if (!window.serverConfig.framegrabber.enable) {
+ conf_editor_instCapt.getEditor("root.instCapture.systemEnable").setValue(false);
+ conf_editor_instCapt.getEditor("root.instCapture.systemEnable").disable();
+ }
+ else {
+ conf_editor_instCapt.getEditor("root.instCapture.systemEnable").setValue(window.serverConfig.instCapture.systemEnable);
+ }
+ } else {
+ showInputOptionForItem(conf_editor_instCapt, "instCapture", "systemEnable", false);
+ showInputOptionForItem(conf_editor_instCapt, "instCapture", "systemGrabberDevice", false);
+ showInputOptionForItem(conf_editor_instCapt, "instCapture", "systemPriority", false);
}
- if (!window.serverConfig.grabberV4L2.enable) {
- conf_editor_instCapt.getEditor("root.instCapture.v4lEnable").setValue(false);
- conf_editor_instCapt.getEditor("root.instCapture.v4lEnable").disable();
- }
- else {
- conf_editor_instCapt.getEditor("root.instCapture.v4lEnable").setValue(window.serverConfig.instCapture.v4lEnable);
+ if (videoGrabberAvailable) {
+ if (!window.serverConfig.grabberV4L2.enable) {
+ conf_editor_instCapt.getEditor("root.instCapture.v4lEnable").setValue(false);
+ conf_editor_instCapt.getEditor("root.instCapture.v4lEnable").disable();
+ }
+ else {
+ conf_editor_instCapt.getEditor("root.instCapture.v4lEnable").setValue(window.serverConfig.instCapture.v4lEnable);
+
+ }
+ } else {
+ showInputOptionForItem(conf_editor_instCapt, "instCapture", "v4lGrabberDevice", false);
+ showInputOptionForItem(conf_editor_instCapt, "instCapture", "v4lEnable", false);
+ showInputOptionForItem(conf_editor_instCapt, "instCapture", "v4lPriority", false);
}
});
@@ -75,6 +91,7 @@ $(document).ready(function () {
});
conf_editor_instCapt.watch('root.instCapture.v4lEnable', () => {
+ console.log("instCapt.watch(root.instCapture.v4lEnable");
var videoEnable = conf_editor_instCapt.getEditor("root.instCapture.v4lEnable").getValue();
if (videoEnable) {
conf_editor_instCapt.getEditor("root.instCapture.v4lGrabberDevice").setValue(window.serverConfig.grabberV4L2.available_devices);
diff --git a/assets/webconfig/js/content_network.js b/assets/webconfig/js/content_network.js
index da23a6dd..0176decf 100644
--- a/assets/webconfig/js/content_network.js
+++ b/assets/webconfig/js/content_network.js
@@ -1,7 +1,10 @@
$(document).ready(function () {
performTranslation();
- var BOBLIGHT_ENABLED = window.comps.find(element => element.name == "BOBLIGHTSERVER");
+ var BOBLIGHT_ENABLED = (jQuery.inArray("boblight", window.serverInfo.services) !== -1);
+ var FORWARDER_ENABLED = (jQuery.inArray("forwarder", window.serverInfo.services) !== -1);
+ var FLATBUF_SERVER_ENABLED = (jQuery.inArray("flatbuffer", window.serverInfo.services) !== -1);
+ var PROTOTBUF_SERVER_ENABLED = (jQuery.inArray("protobuffer", window.serverInfo.services) !== -1);
var conf_editor_net = null;
var conf_editor_json = null;
@@ -24,14 +27,18 @@ $(document).ready(function () {
$('#conf_cont_json').append(createHelpTable(window.schema.jsonServer.properties, $.i18n("edt_conf_js_heading_title")));
//flatbufserver
- $('#conf_cont').append(createRow('conf_cont_flatbuf'));
- $('#conf_cont_flatbuf').append(createOptPanel('fa-sitemap', $.i18n("edt_conf_fbs_heading_title"), 'editor_container_fbserver', 'btn_submit_fbserver', 'panel-system'));
- $('#conf_cont_flatbuf').append(createHelpTable(window.schema.flatbufServer.properties, $.i18n("edt_conf_fbs_heading_title"), "flatbufServerHelpPanelId"));
+ if (FLATBUF_SERVER_ENABLED) {
+ $('#conf_cont').append(createRow('conf_cont_flatbuf'));
+ $('#conf_cont_flatbuf').append(createOptPanel('fa-sitemap', $.i18n("edt_conf_fbs_heading_title"), 'editor_container_fbserver', 'btn_submit_fbserver', 'panel-system'));
+ $('#conf_cont_flatbuf').append(createHelpTable(window.schema.flatbufServer.properties, $.i18n("edt_conf_fbs_heading_title"), "flatbufServerHelpPanelId"));
+ }
//protoserver
- $('#conf_cont').append(createRow('conf_cont_proto'));
- $('#conf_cont_proto').append(createOptPanel('fa-sitemap', $.i18n("edt_conf_pbs_heading_title"), 'editor_container_protoserver', 'btn_submit_protoserver', 'panel-system'));
- $('#conf_cont_proto').append(createHelpTable(window.schema.protoServer.properties, $.i18n("edt_conf_pbs_heading_title"), "protoServerHelpPanelId"));
+ if (PROTOTBUF_SERVER_ENABLED) {
+ $('#conf_cont').append(createRow('conf_cont_proto'));
+ $('#conf_cont_proto').append(createOptPanel('fa-sitemap', $.i18n("edt_conf_pbs_heading_title"), 'editor_container_protoserver', 'btn_submit_protoserver', 'panel-system'));
+ $('#conf_cont_proto').append(createHelpTable(window.schema.protoServer.properties, $.i18n("edt_conf_pbs_heading_title"), "protoServerHelpPanelId"));
+ }
//boblight
if (BOBLIGHT_ENABLED) {
@@ -41,21 +48,30 @@ $(document).ready(function () {
}
//forwarder
- if (storedAccess != 'default') {
- $('#conf_cont').append(createRow('conf_cont_fw'));
- $('#conf_cont_fw').append(createOptPanel('fa-sitemap', $.i18n("edt_conf_fw_heading_title"), 'editor_container_forwarder', 'btn_submit_forwarder', 'panel-system'));
- $('#conf_cont_fw').append(createHelpTable(window.schema.forwarder.properties, $.i18n("edt_conf_fw_heading_title"), "forwarderHelpPanelId"));
+ if (FORWARDER_ENABLED) {
+ if (storedAccess != 'default') {
+ $('#conf_cont').append(createRow('conf_cont_fw'));
+ $('#conf_cont_fw').append(createOptPanel('fa-sitemap', $.i18n("edt_conf_fw_heading_title"), 'editor_container_forwarder', 'btn_submit_forwarder', 'panel-system'));
+ $('#conf_cont_fw').append(createHelpTable(window.schema.forwarder.properties, $.i18n("edt_conf_fw_heading_title"), "forwarderHelpPanelId"));
+ }
}
}
else {
$('#conf_cont').addClass('row');
$('#conf_cont').append(createOptPanel('fa-sitemap', $.i18n("edt_conf_net_heading_title"), 'editor_container_net', 'btn_submit_net'));
$('#conf_cont').append(createOptPanel('fa-sitemap', $.i18n("edt_conf_js_heading_title"), 'editor_container_jsonserver', 'btn_submit_jsonserver'));
- $('#conf_cont').append(createOptPanel('fa-sitemap', $.i18n("edt_conf_fbs_heading_title"), 'editor_container_fbserver', 'btn_submit_fbserver'));
- $('#conf_cont').append(createOptPanel('fa-sitemap', $.i18n("edt_conf_pbs_heading_title"), 'editor_container_protoserver', 'btn_submit_protoserver'));
- $('#conf_cont').append(createOptPanel('fa-sitemap', $.i18n("edt_conf_bobls_heading_title"), 'editor_container_boblightserver', 'btn_submit_boblightserver'));
- $('#conf_cont').append(createOptPanel('fa-sitemap', $.i18n("edt_conf_fw_heading_title"), 'editor_container_forwarder', 'btn_submit_forwarder'));
-
+ if (FLATBUF_SERVER_ENABLED) {
+ $('#conf_cont').append(createOptPanel('fa-sitemap', $.i18n("edt_conf_fbs_heading_title"), 'editor_container_fbserver', 'btn_submit_fbserver'));
+ }
+ if (PROTOTBUF_SERVER_ENABLED) {
+ $('#conf_cont').append(createOptPanel('fa-sitemap', $.i18n("edt_conf_pbs_heading_title"), 'editor_container_protoserver', 'btn_submit_protoserver'));
+ }
+ if (BOBLIGHT_ENABLED) {
+ $('#conf_cont').append(createOptPanel('fa-sitemap', $.i18n("edt_conf_bobls_heading_title"), 'editor_container_boblightserver', 'btn_submit_boblightserver'));
+ }
+ if (FORWARDER_ENABLED) {
+ $('#conf_cont').append(createOptPanel('fa-sitemap', $.i18n("edt_conf_fw_heading_title"), 'editor_container_forwarder', 'btn_submit_forwarder'));
+ }
$("#conf_cont_tok").removeClass('row');
}
@@ -86,46 +102,50 @@ $(document).ready(function () {
});
//flatbuffer
- conf_editor_fbs = createJsonEditor('editor_container_fbserver', {
- flatbufServer: window.schema.flatbufServer
- }, true, true);
+ if (FLATBUF_SERVER_ENABLED) {
+ conf_editor_fbs = createJsonEditor('editor_container_fbserver', {
+ flatbufServer: window.schema.flatbufServer
+ }, true, true);
- conf_editor_fbs.on('change', function () {
- var flatbufServerEnable = conf_editor_fbs.getEditor("root.flatbufServer.enable").getValue();
- if (flatbufServerEnable) {
- showInputOptionsForKey(conf_editor_fbs, "flatbufServer", "enable", true);
- $('#flatbufServerHelpPanelId').show();
- } else {
- showInputOptionsForKey(conf_editor_fbs, "flatbufServer", "enable", false);
- $('#flatbufServerHelpPanelId').hide();
- }
- conf_editor_fbs.validate().length || window.readOnlyMode ? $('#btn_submit_fbserver').attr('disabled', true) : $('#btn_submit_fbserver').attr('disabled', false);
- });
+ conf_editor_fbs.on('change', function () {
+ var flatbufServerEnable = conf_editor_fbs.getEditor("root.flatbufServer.enable").getValue();
+ if (flatbufServerEnable) {
+ showInputOptionsForKey(conf_editor_fbs, "flatbufServer", "enable", true);
+ $('#flatbufServerHelpPanelId').show();
+ } else {
+ showInputOptionsForKey(conf_editor_fbs, "flatbufServer", "enable", false);
+ $('#flatbufServerHelpPanelId').hide();
+ }
+ conf_editor_fbs.validate().length || window.readOnlyMode ? $('#btn_submit_fbserver').attr('disabled', true) : $('#btn_submit_fbserver').attr('disabled', false);
+ });
- $('#btn_submit_fbserver').off().on('click', function () {
- requestWriteConfig(conf_editor_fbs.getValue());
- });
+ $('#btn_submit_fbserver').off().on('click', function () {
+ requestWriteConfig(conf_editor_fbs.getValue());
+ });
+ }
//protobuffer
- conf_editor_proto = createJsonEditor('editor_container_protoserver', {
- protoServer: window.schema.protoServer
- }, true, true);
+ if (PROTOTBUF_SERVER_ENABLED) {
+ conf_editor_proto = createJsonEditor('editor_container_protoserver', {
+ protoServer: window.schema.protoServer
+ }, true, true);
- conf_editor_proto.on('change', function () {
- var protoServerEnable = conf_editor_proto.getEditor("root.protoServer.enable").getValue();
- if (protoServerEnable) {
- showInputOptionsForKey(conf_editor_proto, "protoServer", "enable", true);
- $('#protoServerHelpPanelId').show();
- } else {
- showInputOptionsForKey(conf_editor_proto, "protoServer", "enable", false);
- $('#protoServerHelpPanelId').hide();
- }
- conf_editor_proto.validate().length || window.readOnlyMode ? $('#btn_submit_protoserver').attr('disabled', true) : $('#btn_submit_protoserver').attr('disabled', false);
- });
+ conf_editor_proto.on('change', function () {
+ var protoServerEnable = conf_editor_proto.getEditor("root.protoServer.enable").getValue();
+ if (protoServerEnable) {
+ showInputOptionsForKey(conf_editor_proto, "protoServer", "enable", true);
+ $('#protoServerHelpPanelId').show();
+ } else {
+ showInputOptionsForKey(conf_editor_proto, "protoServer", "enable", false);
+ $('#protoServerHelpPanelId').hide();
+ }
+ conf_editor_proto.validate().length || window.readOnlyMode ? $('#btn_submit_protoserver').attr('disabled', true) : $('#btn_submit_protoserver').attr('disabled', false);
+ });
- $('#btn_submit_protoserver').off().on('click', function () {
- requestWriteConfig(conf_editor_proto.getValue());
- });
+ $('#btn_submit_protoserver').off().on('click', function () {
+ requestWriteConfig(conf_editor_proto.getValue());
+ });
+ }
//boblight
if (BOBLIGHT_ENABLED) {
@@ -150,39 +170,47 @@ $(document).ready(function () {
});
}
- if (storedAccess != 'default') {
- //forwarder
- conf_editor_forw = createJsonEditor('editor_container_forwarder', {
- forwarder: window.schema.forwarder
- }, true, true);
+ //forwarder
+ if (FORWARDER_ENABLED) {
+ if (storedAccess != 'default') {
+ conf_editor_forw = createJsonEditor('editor_container_forwarder', {
+ forwarder: window.schema.forwarder
+ }, true, true);
- conf_editor_forw.on('change', function () {
- var forwarderEnable = conf_editor_forw.getEditor("root.forwarder.enable").getValue();
- if (forwarderEnable) {
- showInputOptionsForKey(conf_editor_forw, "forwarder", "enable", true);
- $('#forwarderHelpPanelId').show();
- } else {
- showInputOptionsForKey(conf_editor_forw, "forwarder", "enable", false);
- $('#forwarderHelpPanelId').hide();
- }
- conf_editor_forw.validate().length || window.readOnlyMode ? $('#btn_submit_forwarder').attr('disabled', true) : $('#btn_submit_forwarder').attr('disabled', false);
- });
+ conf_editor_forw.on('change', function () {
+ var forwarderEnable = conf_editor_forw.getEditor("root.forwarder.enable").getValue();
+ if (forwarderEnable) {
+ showInputOptionsForKey(conf_editor_forw, "forwarder", "enable", true);
+ $('#forwarderHelpPanelId').show();
+ } else {
+ showInputOptionsForKey(conf_editor_forw, "forwarder", "enable", false);
+ $('#forwarderHelpPanelId').hide();
+ }
+ conf_editor_forw.validate().length || window.readOnlyMode ? $('#btn_submit_forwarder').attr('disabled', true) : $('#btn_submit_forwarder').attr('disabled', false);
+ });
- $('#btn_submit_forwarder').off().on('click', function () {
- requestWriteConfig(conf_editor_forw.getValue());
- });
+ $('#btn_submit_forwarder').off().on('click', function () {
+ requestWriteConfig(conf_editor_forw.getValue());
+ });
+ }
}
//create introduction
if (window.showOptHelp) {
createHint("intro", $.i18n('conf_network_net_intro'), "editor_container_net");
createHint("intro", $.i18n('conf_network_json_intro'), "editor_container_jsonserver");
- createHint("intro", $.i18n('conf_network_fbs_intro'), "editor_container_fbserver");
- createHint("intro", $.i18n('conf_network_proto_intro'), "editor_container_protoserver");
+ if (FLATBUF_SERVER_ENABLED) {
+ createHint("intro", $.i18n('conf_network_fbs_intro'), "editor_container_fbserver");
+ }
+ if (PROTOTBUF_SERVER_ENABLED) {
+ createHint("intro", $.i18n('conf_network_proto_intro'), "editor_container_protoserver");
+ }
if (BOBLIGHT_ENABLED) {
createHint("intro", $.i18n('conf_network_bobl_intro'), "editor_container_boblightserver");
}
- createHint("intro", $.i18n('conf_network_forw_intro'), "editor_container_forwarder");
+ if (FORWARDER_ENABLED) {
+ createHint("intro", $.i18n('conf_network_forw_intro'), "editor_container_forwarder");
+ }
createHint("intro", $.i18n('conf_network_tok_intro'), "tok_desc_cont");
}
diff --git a/assets/webconfig/js/ui_utils.js b/assets/webconfig/js/ui_utils.js
index 526852d9..35f78ac5 100644
--- a/assets/webconfig/js/ui_utils.js
+++ b/assets/webconfig/js/ui_utils.js
@@ -1200,38 +1200,40 @@ function getSystemInfo() {
var sys = window.sysInfo.system;
var shy = window.sysInfo.hyperion;
- var info = "Hyperion Server: \n";
- info += '- Build: ' + shy.build + '\n';
- info += '- Build time: ' + shy.time + '\n';
- info += '- Git Remote: ' + shy.gitremote + '\n';
- info += '- Version: ' + shy.version + '\n';
- info += '- UI Lang: ' + storedLang + ' (BrowserLang: ' + navigator.language + ')\n';
- info += '- UI Access: ' + storedAccess + '\n';
- //info += '- Log lvl: ' + window.serverConfig.logger.level + '\n';
- info += '- Avail Capt: ' + window.serverInfo.grabbers.available + '\n';
- info += '- Config path: ' + shy.rootPath + '\n';
- info += '- Database: ' + (shy.readOnlyMode ? "ready-only" : "read/write") + '\n';
+ var info = "Hyperion Server:\n";
+ info += '- Build: ' + shy.build + '\n';
+ info += '- Build time: ' + shy.time + '\n';
+ info += '- Git Remote: ' + shy.gitremote + '\n';
+ info += '- Version: ' + shy.version + '\n';
+ info += '- UI Lang: ' + storedLang + ' (BrowserLang: ' + navigator.language + ')\n';
+ info += '- UI Access: ' + storedAccess + '\n';
+ //info += '- Log lvl: ' + window.serverConfig.logger.level + '\n';
+ info += '- Avail Screen Cap.: ' + window.serverInfo.grabbers.screen.available + '\n';
+ info += '- Avail Video Cap.: ' + window.serverInfo.grabbers.video.available + '\n';
+ info += '- Avail Services: ' + window.serverInfo.services + '\n';
+ info += '- Config path: ' + shy.rootPath + '\n';
+ info += '- Database: ' + (shy.readOnlyMode ? "ready-only" : "read/write") + '\n';
info += '\n';
- info += 'Hyperion Server OS: \n';
- info += '- Distribution: ' + sys.prettyName + '\n';
- info += '- Architecture: ' + sys.architecture + '\n';
+ info += 'Hyperion Server OS:\n';
+ info += '- Distribution: ' + sys.prettyName + '\n';
+ info += '- Architecture: ' + sys.architecture + '\n';
if (sys.cpuModelName)
- info += '- CPU Model: ' + sys.cpuModelName + '\n';
+ info += '- CPU Model: ' + sys.cpuModelName + '\n';
if (sys.cpuModelType)
- info += '- CPU Type: ' + sys.cpuModelType + '\n';
+ info += '- CPU Type: ' + sys.cpuModelType + '\n';
if (sys.cpuRevision)
- info += '- CPU Revision: ' + sys.cpuRevision + '\n';
+ info += '- CPU Revision: ' + sys.cpuRevision + '\n';
if (sys.cpuHardware)
- info += '- CPU Hardware: ' + sys.cpuHardware + '\n';
+ info += '- CPU Hardware: ' + sys.cpuHardware + '\n';
- info += '- Kernel: ' + sys.kernelType + ' (' + sys.kernelVersion + ' (WS: ' + sys.wordSize + '))\n';
- info += '- Root/Admin: ' + sys.isUserAdmin + '\n';
- info += '- Qt Version: ' + sys.qtVersion + '\n';
- info += '- Python Version: ' + sys.pyVersion + '\n';
- info += '- Browser: ' + navigator.userAgent;
+ info += '- Kernel: ' + sys.kernelType + ' (' + sys.kernelVersion + ' (WS: ' + sys.wordSize + '))\n';
+ info += '- Root/Admin: ' + sys.isUserAdmin + '\n';
+ info += '- Qt Version: ' + sys.qtVersion + '\n';
+ info += '- Python Version: ' + sys.pyVersion + '\n';
+ info += '- Browser: ' + navigator.userAgent;
return info;
}
diff --git a/bin/compile.sh b/bin/compile.sh
index f8820dae..954a46cd 100644
--- a/bin/compile.sh
+++ b/bin/compile.sh
@@ -27,7 +27,6 @@ sudo apt-get install \
libssl-dev \
libqt5sql5-sqlite \
libqt5svg5-dev \
- zlib1g-dev \
if [ -e /dev/vc-cma -a -e /dev/vc-mem ]
then
diff --git a/cmake/FindBCM.cmake b/cmake/FindBCM.cmake
index f64c540e..ea8d571c 100644
--- a/cmake/FindBCM.cmake
+++ b/cmake/FindBCM.cmake
@@ -1,10 +1,9 @@
-# - Find the native BCM includes and library
+# Find Broadcom VideoCore firmware installation
#
-
# This module defines
-# BCM_INCLUDE_DIR, where to find png.h, etc.
-# BCM_LIBRARIES, the libraries to link against to use PNG.
-# BCM_FOUND, If false, do not try to use PNG.
+# BCM_INCLUDE_DIR - The Broadcom VideoCore include directory
+# BCM_LIBRARIES - The Broadcom VideoCore BCM_HOST library.
+# BCM_FOUND - BCM_HOST is available
#
FIND_PATH(BCM_INCLUDE_DIR
diff --git a/cmake/FindPNG.cmake b/cmake/FindPNG.cmake
deleted file mode 100644
index dd00fa5e..00000000
--- a/cmake/FindPNG.cmake
+++ /dev/null
@@ -1,60 +0,0 @@
-# - Find the native PNG includes and library
-#
-
-# This module defines
-# PNG_INCLUDE_DIR, where to find png.h, etc.
-# PNG_LIBRARIES, the libraries to link against to use PNG.
-# PNG_DEFINITIONS - You should ADD_DEFINITONS(${PNG_DEFINITIONS}) before compiling code that includes png library files.
-# PNG_FOUND, If false, do not try to use PNG.
-# also defined, but not for general use are
-# PNG_LIBRARY, where to find the PNG library.
-# None of the above will be defined unles zlib can be found.
-# PNG depends on Zlib
-#
-
-INCLUDE(FindZLIB)
-
-SET(PNG_FOUND "NO")
-
-IF(ZLIB_FOUND)
- FIND_PATH(PNG_PNG_INCLUDE_DIR png.h
- /usr/local/include
- /usr/include
- /usr/local/include/libpng # OpenBSD
- )
-
- SET(PNG_NAMES ${PNG_NAMES} png libpng)
- FIND_LIBRARY(PNG_LIBRARY
- NAMES ${PNG_NAMES}
- PATHS /usr/lib64 /usr/lib /usr/local/lib
- )
-
- IF (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
- # png.h includes zlib.h. Sigh.
- SET(PNG_INCLUDE_DIR ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
- SET(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY})
- SET(PNG_FOUND "YES")
- SET(HAVE_PNG_H)
- IF (CYGWIN)
- IF(BUILD_SHARED_LIBS)
- # No need to define PNG_USE_DLL here, because it's default for Cygwin.
- ELSE(BUILD_SHARED_LIBS)
- SET (PNG_DEFINITIONS -DPNG_STATIC)
- ENDIF(BUILD_SHARED_LIBS)
- ENDIF (CYGWIN)
-
- ENDIF (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
-
-ENDIF(ZLIB_FOUND)
-
-IF (PNG_FOUND)
- IF (NOT PNG_FIND_QUIETLY)
- MESSAGE(STATUS "Found PNG: ${PNG_LIBRARY}")
- ENDIF (NOT PNG_FIND_QUIETLY)
-ELSE (PNG_FOUND)
- IF (PNG_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find PNG library")
- ENDIF (PNG_FIND_REQUIRED)
-ENDIF (PNG_FOUND)
-
-MARK_AS_ADVANCED(PNG_PNG_INCLUDE_DIR PNG_LIBRARY )
diff --git a/cmake/osxbundle/Info.plist b/cmake/osxbundle/Info.plist.in
similarity index 57%
rename from cmake/osxbundle/Info.plist
rename to cmake/osxbundle/Info.plist.in
index f37e63bf..40e6df5e 100644
--- a/cmake/osxbundle/Info.plist
+++ b/cmake/osxbundle/Info.plist.in
@@ -5,19 +5,27 @@
CFBundleDeveloperRegion
en
CFBundleIdentifier
-
com.hyperion-project.hyperiond
+
${MACOSX_BUNDLE_GUI_IDENTIFIER}
CFBundleName
Hyperion
CFBundleExecutable
Hyperion
CFBundleIconFile
-
Hyperion.icns
+
${MACOSX_BUNDLE_ICON_FILE}
+
CFBundleGetInfoString
+
${MACOSX_BUNDLE_INFO_STRING}
+
CFBundleVersion
+
${MACOSX_BUNDLE_BUNDLE_VERSION}
+
CFBundleShortVersionString
+
${MACOSX_BUNDLE_SHORT_VERSION_STRING}
+
CFBundleLongVersionString
+
${MACOSX_BUNDLE_LONG_VERSION_STRING}
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType
APPL
NSHumanReadableCopyright
-
MIT License
+
${MACOSX_BUNDLE_COPYRIGHT}
Source Code
"https://github.com/hyperion-project/hyperion.ng"
diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt
index bd7bdd21..4dd9cd7a 100644
--- a/dependencies/CMakeLists.txt
+++ b/dependencies/CMakeLists.txt
@@ -16,174 +16,179 @@ endif()
# FLATBUFFER
#=============================================================================
-set(USE_SYSTEM_FLATBUFFERS_LIBS ${DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS} CACHE BOOL "use flatbuffers library from system")
+if(ENABLE_FLATBUF_SERVER OR ENABLE_FLATBUF_CONNECT)
+ set(USE_SYSTEM_FLATBUFFERS_LIBS ${DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS} CACHE BOOL "use flatbuffers library from system")
-if (USE_SYSTEM_FLATBUFFERS_LIBS)
- find_program(FLATBUFFERS_FLATC_EXECUTABLE NAMES flatc REQUIRED)
- find_package(Flatbuffers REQUIRED)
-else ()
- set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared flatbuffers library")
- set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "Build Flatbuffers with tests")
- add_subdirectory(external/flatbuffers)
+ if (USE_SYSTEM_FLATBUFFERS_LIBS)
+ find_program(FLATBUFFERS_FLATC_EXECUTABLE NAMES flatc REQUIRED)
+ find_package(Flatbuffers REQUIRED)
+ else ()
+ set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared flatbuffers library")
+ set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "Build Flatbuffers with tests")
+ add_subdirectory(external/flatbuffers)
- if(CMAKE_CROSSCOMPILING)
- # when crosscompiling import the flatc executable targets from a file generated by a native build
- option(IMPORT_FLATC "flatc export file (flatc_export.cmake) from a native build" "IMPORT_FLATC-FILE_NOT_FOUND")
- include(${IMPORT_FLATC})
- else()
- # export the flatc compiler so it can be used when cross compiling
- export(TARGETS flatc FILE "${CMAKE_BINARY_DIR}/flatc_export.cmake")
+ if(CMAKE_CROSSCOMPILING)
+ # when crosscompiling import the flatc executable targets from a file generated by a native build
+ option(IMPORT_FLATC "flatc export file (flatc_export.cmake) from a native build" "IMPORT_FLATC-FILE_NOT_FOUND")
+ include(${IMPORT_FLATC})
+ else()
+ # export the flatc compiler so it can be used when cross compiling
+ export(TARGETS flatc FILE "${CMAKE_BINARY_DIR}/flatc_export.cmake")
+ endif()
+
+ # define the include for the flatbuffers library at the parent scope
+ set(FLATBUFFERS_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/external/flatbuffers/include")
+
+ IF (NOT CMAKE_CROSSCOMPILING)
+ # define the flatc executable at the parent scope
+ set(FLATBUFFERS_FLATC_EXECUTABLE "$
")
+ else()
+ #Workaround, set flatc comiplier directory hard, as cmake definitions of flatc do not cater for crosscompile correctly.
+ #Includ of flatc_export.cmake detects that flatc target is defined aand returns before using the definitions written by export
+ set ( FLATBUFFERS_FLATC_EXECUTABLE "${CMAKE_BINARY_DIR}/../build-x86x64/bin/flatc")
+ endif()
endif()
+ set(FLATBUFFERS_FLATC_EXECUTABLE ${FLATBUFFERS_FLATC_EXECUTABLE} PARENT_SCOPE)
+ set(FLATBUFFERS_INCLUDE_DIRS ${FLATBUFFERS_INCLUDE_DIRS} PARENT_SCOPE)
+ include_directories(${FLATBUFFERS_INCLUDE_DIRS})
- # define the include for the flatbuffers library at the parent scope
- set(FLATBUFFERS_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/external/flatbuffers/include")
- IF (NOT CMAKE_CROSSCOMPILING)
- # define the flatc executable at the parent scope
- get_property(FLATBUFFERS_FLATC_EXECUTABLE TARGET flatc PROPERTY LOCATION)
- else()
- #Workaround, set flatc comiplier directory hard, as cmake definitions of flatc do not cater for crosscompile correctly.
- #Includ of flatc_export.cmake detects that flatc target is defined aand returns before using the definitions written by export
- set ( FLATBUFFERS_FLATC_EXECUTABLE "${CMAKE_BINARY_DIR}/../build-x86x64/bin/flatc")
- endif()
+ # message(STATUS "Using flatbuffers compiler: " ${FLATBUFFERS_FLATC_EXECUTABLE})
+
+ function(compile_flattbuffer_schema SRC_FBS OUTPUT_DIR)
+ string(REGEX REPLACE "\\.fbs$" "_generated.h" GEN_HEADER ${SRC_FBS})
+ set_property(SOURCE ${GEN_HEADER} PROPERTY SKIP_AUTOMOC ON)
+
+ add_custom_command(
+ OUTPUT ${GEN_HEADER}
+ COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" -c --no-includes --gen-mutable
+ --gen-object-api
+ -o "${OUTPUT_DIR}"
+ "${SRC_FBS}"
+ DEPENDS "${FLATBUFFERS_FLATC_EXECUTABLE}" ${SRC_FBS})
+ endfunction()
endif()
-set(FLATBUFFERS_FLATC_EXECUTABLE ${FLATBUFFERS_FLATC_EXECUTABLE} PARENT_SCOPE)
-set(FLATBUFFERS_INCLUDE_DIRS ${FLATBUFFERS_INCLUDE_DIRS} PARENT_SCOPE)
-include_directories(${FLATBUFFERS_INCLUDE_DIRS})
-
-
-message(STATUS "Using flatbuffers compiler: " ${FLATBUFFERS_FLATC_EXECUTABLE})
-
-function(compile_flattbuffer_schema SRC_FBS OUTPUT_DIR)
- string(REGEX REPLACE "\\.fbs$" "_generated.h" GEN_HEADER ${SRC_FBS})
- set_property(SOURCE ${GEN_HEADER} PROPERTY SKIP_AUTOMOC ON)
-
- add_custom_command(
- OUTPUT ${GEN_HEADER}
- COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" -c --no-includes --gen-mutable
- --gen-object-api
- -o "${OUTPUT_DIR}"
- "${SRC_FBS}"
- DEPENDS "${FLATBUFFERS_FLATC_EXECUTABLE}" ${SRC_FBS})
-endfunction()
#=============================================================================
# PROTOBUFFER
#=============================================================================
-set(USE_SYSTEM_PROTO_LIBS ${DEFAULT_USE_SYSTEM_PROTO_LIBS} CACHE BOOL "use protobuf library from system")
+if(ENABLE_PROTOBUF_SERVER)
-if (USE_SYSTEM_PROTO_LIBS)
- find_package(Protobuf REQUIRED)
-else ()
- set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared protobuf library")
- set(protobuf_BUILD_SHARED_LIBS OFF CACHE BOOL "Build protobuf shared")
+ set(USE_SYSTEM_PROTO_LIBS ${DEFAULT_USE_SYSTEM_PROTO_LIBS} CACHE BOOL "use protobuf library from system")
- if (WIN32)
- set(protobuf_MSVC_STATIC_RUNTIME OFF CACHE BOOL "Build protobuf static")
+ if (USE_SYSTEM_PROTO_LIBS)
+ find_package(Protobuf REQUIRED)
+ else ()
+ set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf with tests")
+ set(protobuf_BUILD_SHARED_LIBS OFF CACHE BOOL "Build protobuf shared")
+ set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build protobuf with zlib support")
+
+ if (WIN32)
+ set(protobuf_MSVC_STATIC_RUNTIME OFF CACHE BOOL "Build protobuf static")
+ endif()
+
+ add_subdirectory(external/protobuf/cmake)
+
+ if(CMAKE_CROSSCOMPILING)
+ # when crosscompiling import the protoc executable targets from a file generated by a native build
+ option(IMPORT_PROTOC "Protoc export file (protoc_export.cmake) from a native build" "IMPORT_PROTOC-FILE_NOT_FOUND")
+ include(${IMPORT_PROTOC})
+ else()
+ # export the protoc compiler so it can be used when cross compiling
+ export(TARGETS protoc FILE "${CMAKE_BINARY_DIR}/protoc_export.cmake")
+ endif()
+
+ # define the include for the protobuf library at the parent scope
+ set(PROTOBUF_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/external/protobuf/src")
+
+ # define the protoc executable at the parent scope
+ set(PROTOBUF_PROTOC_EXECUTABLE "$")
endif()
- add_subdirectory(external/protobuf)
+ set(PROTOBUF_PROTOC_EXECUTABLE ${PROTOBUF_PROTOC_EXECUTABLE} PARENT_SCOPE)
+ set(PROTOBUF_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIRS} PARENT_SCOPE)
+ include_directories(${PROTOBUF_INCLUDE_DIRS})
- if(CMAKE_CROSSCOMPILING)
- # when crosscompiling import the protoc executable targets from a file generated by a native build
- option(IMPORT_PROTOC "Protoc export file (protoc_export.cmake) from a native build" "IMPORT_PROTOC-FILE_NOT_FOUND")
- include(${IMPORT_PROTOC})
- else()
- # export the protoc compiler so it can be used when cross compiling
- export(TARGETS protoc_compiler FILE "${CMAKE_BINARY_DIR}/protoc_export.cmake")
- endif()
+ # message(STATUS "Using protobuf compiler: " ${PROTOBUF_PROTOC_EXECUTABLE})
- # define the include for the protobuf library at the parent scope
- set(PROTOBUF_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/external/protobuf/src")
+ #=============================================================================
+ # Copyright 2009 Kitware, Inc.
+ # Copyright 2009-2011 Philip Lowman
+ # Copyright 2008 Esben Mose Hansen, Ange Optimization ApS
+ #
+ # Distributed under the OSI-approved BSD License (the "License");
+ # see accompanying file Copyright.txt for details.
+ #
+ # This software is distributed WITHOUT ANY WARRANTY; without even the
+ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ # See the License for more information.
+ #=============================================================================
+ # (To distribute this file outside of CMake, substitute the full
+ # License text for the above reference.)
+ function(PROTOBUF_GENERATE_CPP SRCS HDRS)
+ if(NOT ARGN)
+ message(SEND_ERROR "Error: PROTOBUF_GENERATE_CPP() called without any proto files")
+ return()
+ endif()
- # define the protoc executable at the parent scope
- get_property(PROTOBUF_PROTOC_EXECUTABLE TARGET protoc_compiler PROPERTY LOCATION)
-endif()
-option(protobuf_BUILD_TESTS "" OFF)
+ if(PROTOBUF_GENERATE_CPP_APPEND_PATH)
+ # Create an include path for each file specified
+ foreach(FIL ${ARGN})
+ get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
+ get_filename_component(ABS_PATH ${ABS_FIL} PATH)
+ list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
+ if(${_contains_already} EQUAL -1)
+ list(APPEND _protobuf_include_path -I ${ABS_PATH})
+ endif()
+ endforeach()
+ else()
+ set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
+ endif()
-set(PROTOBUF_PROTOC_EXECUTABLE ${PROTOBUF_PROTOC_EXECUTABLE} PARENT_SCOPE)
-set(PROTOBUF_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIRS} PARENT_SCOPE)
-include_directories(${PROTOBUF_INCLUDE_DIRS})
+ if(DEFINED PROTOBUF_IMPORT_DIRS)
+ foreach(DIR ${PROTOBUF_IMPORT_DIRS})
+ get_filename_component(ABS_PATH ${DIR} ABSOLUTE)
+ list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
+ if(${_contains_already} EQUAL -1)
+ list(APPEND _protobuf_include_path -I ${ABS_PATH})
+ endif()
+ endforeach()
+ endif()
-message(STATUS "Using protobuf compiler: " ${PROTOBUF_PROTOC_EXECUTABLE})
+ if(CMAKE_CROSSCOMPILING OR USE_SYSTEM_PROTO_LIBS)
+ set(PROTOC_DEPENDENCY ${PROTOBUF_PROTOC_EXECUTABLE})
+ else()
+ set(PROTOC_DEPENDENCY protoc)
+ endif()
-#=============================================================================
-# Copyright 2009 Kitware, Inc.
-# Copyright 2009-2011 Philip Lowman
-# Copyright 2008 Esben Mose Hansen, Ange Optimization ApS
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
-function(PROTOBUF_GENERATE_CPP SRCS HDRS)
- if(NOT ARGN)
- message(SEND_ERROR "Error: PROTOBUF_GENERATE_CPP() called without any proto files")
- return()
- endif()
-
- if(PROTOBUF_GENERATE_CPP_APPEND_PATH)
- # Create an include path for each file specified
+ set(${SRCS})
+ set(${HDRS})
foreach(FIL ${ARGN})
get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
- get_filename_component(ABS_PATH ${ABS_FIL} PATH)
- list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
- if(${_contains_already} EQUAL -1)
- list(APPEND _protobuf_include_path -I ${ABS_PATH})
- endif()
+ get_filename_component(FIL_WE ${FIL} NAME_WE)
+
+ list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc")
+ list(APPEND ${HDRS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h")
+
+ add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc"
+ "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h"
+ COMMAND ${PROTOBUF_PROTOC_EXECUTABLE}
+ ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL}
+ DEPENDS ${ABS_FIL} ${PROTOC_DEPENDENCY}
+ COMMENT "Running C++ protocol buffer compiler on ${FIL}"
+ VERBATIM
+ )
+ set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc" PROPERTY SKIP_AUTOMOC ON)
+ set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h" PROPERTY SKIP_AUTOMOC ON)
endforeach()
- else()
- set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
- endif()
- if(DEFINED PROTOBUF_IMPORT_DIRS)
- foreach(DIR ${PROTOBUF_IMPORT_DIRS})
- get_filename_component(ABS_PATH ${DIR} ABSOLUTE)
- list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
- if(${_contains_already} EQUAL -1)
- list(APPEND _protobuf_include_path -I ${ABS_PATH})
- endif()
- endforeach()
- endif()
-
- if(CMAKE_CROSSCOMPILING OR USE_SYSTEM_PROTO_LIBS)
- set(PROTOC_DEPENDENCY ${PROTOBUF_PROTOC_EXECUTABLE})
- else()
- set(PROTOC_DEPENDENCY protoc_compiler)
- endif()
-
- set(${SRCS})
- set(${HDRS})
- foreach(FIL ${ARGN})
- get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
- get_filename_component(FIL_WE ${FIL} NAME_WE)
-
- list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc")
- list(APPEND ${HDRS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h")
-
- add_custom_command(
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc"
- "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h"
- COMMAND ${PROTOBUF_PROTOC_EXECUTABLE}
- ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL}
- DEPENDS ${ABS_FIL} ${PROTOC_DEPENDENCY}
- COMMENT "Running C++ protocol buffer compiler on ${FIL}"
- VERBATIM
- )
- set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc" PROPERTY SKIP_AUTOMOC ON)
- set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h" PROPERTY SKIP_AUTOMOC ON)
- endforeach()
-
- set_source_files_properties(${${SRCS}} ${${HDRS}} PROPERTIES GENERATED TRUE)
- set(${SRCS} ${${SRCS}} PARENT_SCOPE)
- set(${HDRS} ${${HDRS}} PARENT_SCOPE)
-endfunction()
+ set_source_files_properties(${${SRCS}} ${${HDRS}} PROPERTIES GENERATED TRUE)
+ set(${SRCS} ${${SRCS}} PARENT_SCOPE)
+ set(${HDRS} ${${HDRS}} PARENT_SCOPE)
+ endfunction()
+endif()
#=============================================================================
# MBEDTLS
diff --git a/dependencies/external/protobuf b/dependencies/external/protobuf
index adce8a99..b360b9e3 160000
--- a/dependencies/external/protobuf
+++ b/dependencies/external/protobuf
@@ -1 +1 @@
-Subproject commit adce8a99fdab90f290d659b6b3bf2d09b721e24a
+Subproject commit b360b9e388351aaed97f2ead98dd951fb5f1951e
diff --git a/doc/development/CompileHowto.md b/doc/development/CompileHowto.md
index 7c5fca3e..312a70f1 100644
--- a/doc/development/CompileHowto.md
+++ b/doc/development/CompileHowto.md
@@ -74,13 +74,13 @@ cd $HYPERION_HOME
```console
sudo apt-get update
-sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5x11extras5-dev libusb-1.0-0-dev python3-dev libavahi-core-dev libavahi-compat-libdnssd-dev libturbojpeg0-dev libssl-dev zlib1g-dev
+sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5x11extras5-dev libusb-1.0-0-dev python3-dev libavahi-core-dev libavahi-compat-libdnssd-dev libturbojpeg0-dev libssl-dev
```
**For Linux X11/XXCB grabber support**
```console
-sudo apt-get install libxrandr-dev libxrender-dev libxcb-image0-dev libxcb-util0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-randr0-dev
+sudo apt-get install libxrandr-dev libxrender-dev libxcb-image0-dev libxcb-util0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-randr0-dev
```
**For Linux CEC support**
@@ -125,7 +125,7 @@ To install on OS X you either need Homebrew or Macport but Homebrew is the recom
First you need to install the dependencies:
```console
-brew install qt5 python3 cmake libusb doxygen zlib
+brew install qt5 python3 cmake libusb doxygen
```
## Windows
diff --git a/include/hyperion/MessageForwarder.h b/include/forwarder/MessageForwarder.h
similarity index 100%
rename from include/hyperion/MessageForwarder.h
rename to include/forwarder/MessageForwarder.h
diff --git a/include/grabber/GrabberType.h b/include/grabber/GrabberType.h
new file mode 100644
index 00000000..c5e1de8a
--- /dev/null
+++ b/include/grabber/GrabberType.h
@@ -0,0 +1,15 @@
+#ifndef GRABBERTYPE_H
+#define GRABBERTYPE_H
+
+enum class GrabberType {
+ SCREEN,
+ VIDEO,
+};
+
+enum class GrabberTypeFilter {
+ ALL,
+ SCREEN,
+ VIDEO,
+};
+
+#endif // GRABBERTYPE_H
diff --git a/include/hyperion/GrabberWrapper.h b/include/hyperion/GrabberWrapper.h
index fe7dc632..99cfa4c6 100644
--- a/include/hyperion/GrabberWrapper.h
+++ b/include/hyperion/GrabberWrapper.h
@@ -16,6 +16,8 @@
#include
#include
+#include
+
class Grabber;
class GlobalSignals;
class QTimer;
@@ -67,16 +69,17 @@ public:
///
/// @brief Get active grabber name
/// @param hyperionInd The instance index
+ /// @param type Filter for a given grabber type
/// @return Active grabbers
///
- virtual QStringList getActive(int inst) const;
+ virtual QStringList getActive(int inst, GrabberTypeFilter type = GrabberTypeFilter::ALL) const;
bool getSysGrabberState() const { return GLOBAL_GRABBER_SYS_ENABLE; }
void setSysGrabberState(bool sysGrabberState){ GLOBAL_GRABBER_SYS_ENABLE = sysGrabberState; }
bool getV4lGrabberState() const { return GLOBAL_GRABBER_V4L_ENABLE; }
void setV4lGrabberState(bool v4lGrabberState){ GLOBAL_GRABBER_V4L_ENABLE = v4lGrabberState; }
- static QStringList availableGrabbers();
+ static QStringList availableGrabbers(GrabberTypeFilter type = GrabberTypeFilter::ALL);
public:
template
diff --git a/include/hyperion/Hyperion.h b/include/hyperion/Hyperion.h
index 58c4f920..b4daaac0 100644
--- a/include/hyperion/Hyperion.h
+++ b/include/hyperion/Hyperion.h
@@ -38,7 +38,9 @@
// Forward class declaration
class HyperionDaemon;
class ImageProcessor;
+#if defined(ENABLE_FORWARDER)
class MessageForwarder;
+#endif
class LinearColorSmoothing;
class EffectEngine;
class MultiColorAdjustment;
@@ -46,7 +48,7 @@ class ColorAdjustment;
class SettingsManager;
class BGEffectHandler;
class CaptureCont;
-#if defined(ENABLE_BOBLIGHT)
+#if defined(ENABLE_BOBLIGHT_SERVER)
class BoblightServer;
#endif
class LedDeviceWrapper;
@@ -534,8 +536,10 @@ private:
/// Effect engine
EffectEngine * _effectEngine;
+#if defined(ENABLE_FORWARDER)
// Message forwarder
MessageForwarder * _messageForwarder;
+#endif
/// Logger instance
Logger * _log;
@@ -555,7 +559,7 @@ private:
VideoMode _currVideoMode = VideoMode::VIDEO_2D;
-#if defined(ENABLE_BOBLIGHT)
+#if defined(ENABLE_BOBLIGHT_SERVER)
/// Boblight instance
BoblightServer* _boblightServer;
#endif
diff --git a/include/leddevice/LedDeviceWrapper.h b/include/leddevice/LedDeviceWrapper.h
index c709e67e..adad0741 100644
--- a/include/leddevice/LedDeviceWrapper.h
+++ b/include/leddevice/LedDeviceWrapper.h
@@ -6,7 +6,7 @@
#include
#include
-#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
#include
#else
#include
@@ -129,7 +129,7 @@ protected:
/// contains all available led device constructors
static LedDeviceRegistry _ledDeviceMap;
-#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
static QRecursiveMutex _ledDeviceMapLock;
#else
static QMutex _ledDeviceMapLock;
diff --git a/include/python/PythonUtils.h b/include/python/PythonUtils.h
index e7cd08b4..10574fc1 100644
--- a/include/python/PythonUtils.h
+++ b/include/python/PythonUtils.h
@@ -2,7 +2,7 @@
#undef slots
#include
-#define slots
+#define slots Q_SLOTS
// decl
extern PyThreadState* mainThreadState;
diff --git a/include/ssdp/SSDPHandler.h b/include/ssdp/SSDPHandler.h
index 134d08af..bfbce9a4 100644
--- a/include/ssdp/SSDPHandler.h
+++ b/include/ssdp/SSDPHandler.h
@@ -22,7 +22,7 @@ class SSDPHandler : public SSDPServer
{
Q_OBJECT
public:
- SSDPHandler(WebServer* webserver, quint16 flatBufPort, quint16 protoBufPort, quint16 jsonServerPort, quint16 sslPort, const QString &name, QObject * parent = nullptr);
+ SSDPHandler(WebServer* webserver, quint16 flatBufPort, quint16 protoBufPort, quint16 jsonServerPort, quint16 sslPort, const QString& name, QObject* parent = nullptr);
~SSDPHandler() override;
///
@@ -87,21 +87,37 @@ private slots:
///
void handleMSearchRequest(const QString& target, const QString& mx, const QString address, quint16 port);
- ///
- /// @brief Handle changes in the network configuration
- /// @param conig New config
- ///
-#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
- void handleNetworkConfigurationChanged(const QNetworkConfiguration &config);
-#endif
-
private:
WebServer* _webserver;
QString _localAddress;
+ QString _uuid;
+
+ /// Targets for announcement
+ std::vector _deviceList;
+
+//Handle elements deprecated from Qt 6.x and reported as deprecatedsince 5.15.x
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+#endif
+
+private slots:
+
+///
+/// @brief Handle changes in the network configuration
+/// @param conig New config
+///
+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
+ void handleNetworkConfigurationChanged(const QNetworkConfiguration& config);
+#endif
+
+private:
+
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
QNetworkConfigurationManager* _NCA;
#endif
- QString _uuid;
- /// Targets for announcement
- std::vector _deviceList;
+
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
+QT_WARNING_POP
+#endif
};
diff --git a/include/utils/Components.h b/include/utils/Components.h
index 8e95c388..ac5c95ed 100644
--- a/include/utils/Components.h
+++ b/include/utils/Components.h
@@ -15,8 +15,10 @@ enum Components
COMP_ALL,
COMP_SMOOTHING,
COMP_BLACKBORDER,
+#if defined(ENABLE_FORWARDER)
COMP_FORWARDER,
-#if defined(ENABLE_BOBLIGHT)
+#endif
+#if defined(ENABLE_BOBLIGHT_SERVER)
COMP_BOBLIGHTSERVER,
#endif
COMP_GRABBER,
@@ -25,8 +27,12 @@ enum Components
COMP_IMAGE,
COMP_EFFECT,
COMP_LEDDEVICE,
+#if defined(ENABLE_FLATBUF_SERVER)
COMP_FLATBUFSERVER,
+#endif
+#if defined(ENABLE_PROTOBUF_SERVER)
COMP_PROTOSERVER
+#endif
};
inline const char* componentToString(Components c)
@@ -36,8 +42,10 @@ inline const char* componentToString(Components c)
case COMP_ALL: return "Hyperion";
case COMP_SMOOTHING: return "Smoothing";
case COMP_BLACKBORDER: return "Blackborder detector";
+#if defined(ENABLE_FORWARDER)
case COMP_FORWARDER: return "Json/Proto forwarder";
-#if defined(ENABLE_BOBLIGHT)
+#endif
+#if defined(ENABLE_BOBLIGHT_SERVER)
case COMP_BOBLIGHTSERVER:return "Boblight server";
#endif
case COMP_GRABBER: return "Framegrabber";
@@ -46,8 +54,12 @@ inline const char* componentToString(Components c)
case COMP_EFFECT: return "Effect";
case COMP_IMAGE: return "Image";
case COMP_LEDDEVICE: return "LED device";
+#if defined(ENABLE_FLATBUF_SERVER)
case COMP_FLATBUFSERVER: return "Image Receiver";
+#endif
+#if defined(ENABLE_PROTOBUF_SERVER)
case COMP_PROTOSERVER: return "Proto Server";
+#endif
default: return "";
}
}
@@ -59,8 +71,10 @@ inline const char* componentToIdString(Components c)
case COMP_ALL: return "ALL";
case COMP_SMOOTHING: return "SMOOTHING";
case COMP_BLACKBORDER: return "BLACKBORDER";
+#if defined(ENABLE_FORWARDER)
case COMP_FORWARDER: return "FORWARDER";
-#if defined(ENABLE_BOBLIGHT)
+#endif
+#if defined(ENABLE_BOBLIGHT_SERVER)
case COMP_BOBLIGHTSERVER:return "BOBLIGHTSERVER";
#endif
case COMP_GRABBER: return "GRABBER";
@@ -69,8 +83,12 @@ inline const char* componentToIdString(Components c)
case COMP_EFFECT: return "EFFECT";
case COMP_IMAGE: return "IMAGE";
case COMP_LEDDEVICE: return "LEDDEVICE";
+#if defined(ENABLE_FLATBUF_SERVER)
case COMP_FLATBUFSERVER: return "FLATBUFSERVER";
+#endif
+#if defined(ENABLE_PROTOBUF_SERVER)
case COMP_PROTOSERVER: return "PROTOSERVER";
+#endif
default: return "";
}
}
@@ -81,8 +99,10 @@ inline Components stringToComponent(const QString& component)
if (cmp == "ALL") return COMP_ALL;
if (cmp == "SMOOTHING") return COMP_SMOOTHING;
if (cmp == "BLACKBORDER") return COMP_BLACKBORDER;
+#if defined(ENABLE_FORWARDER)
if (cmp == "FORWARDER") return COMP_FORWARDER;
-#if defined(ENABLE_BOBLIGHT)
+#endif
+#if defined(ENABLE_BOBLIGHT_SERVER)
if (cmp == "BOBLIGHTSERVER")return COMP_BOBLIGHTSERVER;
#endif
if (cmp == "GRABBER") return COMP_GRABBER;
@@ -91,8 +111,12 @@ inline Components stringToComponent(const QString& component)
if (cmp == "EFFECT") return COMP_EFFECT;
if (cmp == "IMAGE") return COMP_IMAGE;
if (cmp == "LEDDEVICE") return COMP_LEDDEVICE;
+#if defined(ENABLE_FLATBUF_SERVER)
if (cmp == "FLATBUFSERVER") return COMP_FLATBUFSERVER;
+#endif
+#if defined(ENABLE_PROTOBUF_SERVER)
if (cmp == "PROTOSERVER") return COMP_PROTOSERVER;
+#endif
return COMP_INVALID;
}
diff --git a/include/utils/Logger.h b/include/utils/Logger.h
index c24acca7..3aa3c1c9 100644
--- a/include/utils/Logger.h
+++ b/include/utils/Logger.h
@@ -7,7 +7,7 @@
#include
#include
-#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
#include
#else
#include
@@ -86,7 +86,7 @@ protected:
private:
void write(const Logger::T_LOG_MESSAGE & message);
-#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
static QRecursiveMutex MapLock;
#else
static QMutex MapLock;
diff --git a/include/utils/SysInfo.h b/include/utils/SysInfo.h
index 38c3ae19..8864ab2b 100644
--- a/include/utils/SysInfo.h
+++ b/include/utils/SysInfo.h
@@ -1,4 +1,5 @@
#pragma once
+#include
#include
#include
@@ -35,7 +36,7 @@ private:
SysInfo();
void getCPUInfo();
- static SysInfo* _instance;
+ static std::unique_ptr _instance;
HyperionSysInfo _sysinfo;
};
diff --git a/libsrc/CMakeLists.txt b/libsrc/CMakeLists.txt
index 58438e33..54416aa4 100644
--- a/libsrc/CMakeLists.txt
+++ b/libsrc/CMakeLists.txt
@@ -7,12 +7,23 @@ add_subdirectory(hyperion)
add_subdirectory(commandline)
add_subdirectory(blackborder)
add_subdirectory(jsonserver)
-add_subdirectory(flatbufserver)
-add_subdirectory(protoserver)
-add_subdirectory(ssdp)
-if(ENABLE_BOBLIGHT)
+
+if(ENABLE_BOBLIGHT_SERVER)
add_subdirectory(boblightserver)
endif()
+
+if(ENABLE_FLATBUF_SERVER OR ENABLE_FLATBUF_CONNECT)
+add_subdirectory(flatbufserver)
+endif()
+
+if(ENABLE_PROTOBUF_SERVER)
+add_subdirectory(protoserver)
+endif()
+
+if(ENABLE_FORWARDER)
+ add_subdirectory(forwarder)
+endif()
+
add_subdirectory(leddevice)
add_subdirectory(utils)
add_subdirectory(effectengine)
@@ -22,14 +33,15 @@ add_subdirectory(db)
add_subdirectory(api)
add_subdirectory(python)
-if(ENABLE_CEC)
- add_subdirectory(cec)
-endif()
-
+add_subdirectory(ssdp)
if(ENABLE_AVAHI)
add_subdirectory(bonjour)
endif()
+if(ENABLE_CEC)
+ add_subdirectory(cec)
+endif()
+
if(ENABLE_EXPERIMENTAL)
add_subdirectory(experimental)
endif()
diff --git a/libsrc/api/JsonAPI.cpp b/libsrc/api/JsonAPI.cpp
index 7ed4b35f..cbe9d6bd 100644
--- a/libsrc/api/JsonAPI.cpp
+++ b/libsrc/api/JsonAPI.cpp
@@ -512,34 +512,71 @@ void JsonAPI::handleServerInfoCommand(const QJsonObject &message, const QString
info["ledDevices"] = ledDevices;
QJsonObject grabbers;
- QJsonArray availableGrabbers;
-#if defined(ENABLE_DISPMANX) || defined(ENABLE_V4L2) || defined(ENABLE_MF) || defined(ENABLE_FB) || defined(ENABLE_AMLOGIC) || defined(ENABLE_OSX) || defined(ENABLE_X11) || defined(ENABLE_XCB) || defined(ENABLE_QT)
+ // *** Deprecated ***
+ //QJsonArray availableGrabbers;
+ //if ( GrabberWrapper::getInstance() != nullptr )
+ //{
+ // QStringList activeGrabbers = GrabberWrapper::getInstance()->getActive(_hyperion->getInstanceIndex());
+ // QJsonArray activeGrabberNames;
+ // for (auto grabberName : activeGrabbers)
+ // {
+ // activeGrabberNames.append(grabberName);
+ // }
- if ( GrabberWrapper::getInstance() != nullptr )
+ // grabbers["active"] = activeGrabberNames;
+ //}
+ //for (auto grabber : GrabberWrapper::availableGrabbers(GrabberTypeFilter::ALL))
+ //{
+ // availableGrabbers.append(grabber);
+ //}
+
+ //grabbers["available"] = availableGrabbers;
+
+ QJsonObject screenGrabbers;
+ if (GrabberWrapper::getInstance() != nullptr)
{
- QStringList activeGrabbers = GrabberWrapper::getInstance()->getActive(_hyperion->getInstanceIndex());
+ QStringList activeGrabbers = GrabberWrapper::getInstance()->getActive(_hyperion->getInstanceIndex(), GrabberTypeFilter::SCREEN);
QJsonArray activeGrabberNames;
for (auto grabberName : activeGrabbers)
{
activeGrabberNames.append(grabberName);
}
- grabbers["active"] = activeGrabberNames;
+ screenGrabbers["active"] = activeGrabberNames;
}
-
- // get available grabbers
- for (auto grabber : GrabberWrapper::availableGrabbers())
+ QJsonArray availableScreenGrabbers;
+ for (auto grabber : GrabberWrapper::availableGrabbers(GrabberTypeFilter::SCREEN))
{
- availableGrabbers.append(grabber);
+ availableScreenGrabbers.append(grabber);
}
+ screenGrabbers["available"] = availableScreenGrabbers;
-#endif
+ QJsonObject videoGrabbers;
+ if (GrabberWrapper::getInstance() != nullptr)
+ {
+ QStringList activeGrabbers = GrabberWrapper::getInstance()->getActive(_hyperion->getInstanceIndex(), GrabberTypeFilter::VIDEO);
+ QJsonArray activeGrabberNames;
+ for (auto grabberName : activeGrabbers)
+ {
+ activeGrabberNames.append(grabberName);
+ }
- grabbers["available"] = availableGrabbers;
- info["videomode"] = QString(videoMode2String(_hyperion->getCurrentVideoMode()));
+ videoGrabbers["active"] = activeGrabberNames;
+ }
+ QJsonArray availableVideoGrabbers;
+ for (auto grabber : GrabberWrapper::availableGrabbers(GrabberTypeFilter::VIDEO))
+ {
+ availableVideoGrabbers.append(grabber);
+ }
+ videoGrabbers["available"] = availableVideoGrabbers;
+
+ grabbers.insert("screen", screenGrabbers);
+ grabbers.insert("video", videoGrabbers);
info["grabbers"] = grabbers;
+ info["videomode"] = QString(videoMode2String(_hyperion->getCurrentVideoMode()));
+
QJsonObject cecInfo;
#if defined(ENABLE_CEC)
cecInfo["enabled"] = true;
@@ -548,6 +585,36 @@ void JsonAPI::handleServerInfoCommand(const QJsonObject &message, const QString
#endif
info["cec"] = cecInfo;
+ // get available services
+ QJsonArray services;
+
+#if defined(ENABLE_BOBLIGHT_SERVER)
+ services.append("boblight");
+#endif
+
+#if defined(ENABLE_CEC)
+ services.append("cec");
+#endif
+
+#if defined(ENABLE_FORWARDER)
+ services.append("forwarder");
+#endif
+
+#if defined(ENABLE_FLATBUF_SERVER)
+ services.append("flatbuffer");
+#endif
+
+#if defined(ENABLE_PROTOBUF_SERVER)
+ services.append("protobuffer");
+#endif
+
+ if (!availableScreenGrabbers.isEmpty() || !availableVideoGrabbers.isEmpty() || services.contains("flatbuffer") || services.contains("protobuffer"))
+ {
+ services.append("borderdetection");
+ }
+
+ info["services"] = services;
+
// get available components
QJsonArray component;
std::map components = _hyperion->getComponentRegister().getRegister();
diff --git a/libsrc/blackborder/BlackBorderProcessor.cpp b/libsrc/blackborder/BlackBorderProcessor.cpp
index 76092913..570cd9d2 100644
--- a/libsrc/blackborder/BlackBorderProcessor.cpp
+++ b/libsrc/blackborder/BlackBorderProcessor.cpp
@@ -44,27 +44,36 @@ void BlackBorderProcessor::handleSettingsUpdate(settings::type type, const QJson
{
if(type == settings::BLACKBORDER)
{
- const QJsonObject& obj = config.object();
- _unknownSwitchCnt = obj["unknownFrameCnt"].toInt(600);
- _borderSwitchCnt = obj["borderFrameCnt"].toInt(50);
- _maxInconsistentCnt = obj["maxInconsistentCnt"].toInt(10);
- _blurRemoveCnt = obj["blurRemoveCnt"].toInt(1);
- _detectionMode = obj["mode"].toString("default");
- const double newThreshold = obj["threshold"].toDouble(5.0)/100.0;
-
- if(_oldThreshold != newThreshold)
+ if (_hyperion->isComponentEnabled(COMP_BLACKBORDER) == -1)
{
- _oldThreshold = newThreshold;
-
- delete _detector;
-
- _detector = new BlackBorderDetector(newThreshold);
+ //Disable, if service is not available
+ _enabled = false;
+ _userEnabled = false;
}
+ else
+ {
+ const QJsonObject& obj = config.object();
+ _unknownSwitchCnt = obj["unknownFrameCnt"].toInt(600);
+ _borderSwitchCnt = obj["borderFrameCnt"].toInt(50);
+ _maxInconsistentCnt = obj["maxInconsistentCnt"].toInt(10);
+ _blurRemoveCnt = obj["blurRemoveCnt"].toInt(1);
+ _detectionMode = obj["mode"].toString("default");
+ const double newThreshold = obj["threshold"].toDouble(5.0) / 100.0;
- Debug(Logger::getInstance("BLACKBORDER"), "Set mode to: %s", QSTRING_CSTR(_detectionMode));
+ if (_oldThreshold != newThreshold)
+ {
+ _oldThreshold = newThreshold;
- // eval the comp state
- handleCompStateChangeRequest(hyperion::COMP_BLACKBORDER, obj["enable"].toBool(true));
+ delete _detector;
+
+ _detector = new BlackBorderDetector(newThreshold);
+ }
+
+ Debug(Logger::getInstance("BLACKBORDER"), "Set mode to: %s", QSTRING_CSTR(_detectionMode));
+
+ // eval the comp state
+ handleCompStateChangeRequest(hyperion::COMP_BLACKBORDER, obj["enable"].toBool(true));
+ }
}
}
diff --git a/libsrc/bonjour/bonjourserviceregister.cpp b/libsrc/bonjour/bonjourserviceregister.cpp
index b10c7ec3..3ff0b8be 100644
--- a/libsrc/bonjour/bonjourserviceregister.cpp
+++ b/libsrc/bonjour/bonjourserviceregister.cpp
@@ -118,6 +118,8 @@ void BonjourServiceRegister::registerService(const BonjourRecord &record, quint1
connect(bonjourSocket, &QSocketNotifier::activated, this, &BonjourServiceRegister::bonjourSocketReadyRead);
}
}
+
+ TXTRecordDeallocate(&txtRec);
}
diff --git a/libsrc/flatbufserver/CMakeLists.txt b/libsrc/flatbufserver/CMakeLists.txt
index 17a8925a..614208d5 100644
--- a/libsrc/flatbufserver/CMakeLists.txt
+++ b/libsrc/flatbufserver/CMakeLists.txt
@@ -8,8 +8,6 @@ include_directories(
${FLATBUFFERS_INCLUDE_DIRS}
)
-FILE ( GLOB FLATBUFSERVER_SOURCES "${CURRENT_HEADER_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.cpp" )
-
set(Flatbuffer_GENERATED_FBS
hyperion_reply_generated.h
hyperion_request_generated.h
@@ -28,14 +26,39 @@ set_source_files_properties(
${Flatbuffer_GENERATED_FBS} PROPERTIES GENERATED TRUE
)
-add_library(flatbufserver
+### Split flatbufconnect from flatbufserver as flatbufserver relates to HyperionDaemon
+
+if(ENABLE_FLATBUF_CONNECT)
+add_library(flatbufconnect
+ ${CURRENT_HEADER_DIR}/FlatBufferConnection.h
+ ${CURRENT_SOURCE_DIR}/FlatBufferConnection.cpp
${FLATBUFSERVER_SOURCES}
${Flatbuffer_GENERATED_FBS}
-)
-target_link_libraries(flatbufserver
+)
+target_link_libraries(flatbufconnect
hyperion-utils
flatbuffers
Qt${QT_VERSION_MAJOR}::Network
Qt${QT_VERSION_MAJOR}::Core
)
+endif()
+
+if(ENABLE_FLATBUF_SERVER)
+add_library(flatbufserver
+ ${CURRENT_HEADER_DIR}/FlatBufferServer.h
+ ${CURRENT_SOURCE_DIR}/FlatBufferServer.cpp
+ ${CURRENT_SOURCE_DIR}/FlatBufferClient.h
+ ${CURRENT_SOURCE_DIR}/FlatBufferClient.cpp
+ ${FLATBUFSERVER_SOURCES}
+ ${Flatbuffer_GENERATED_FBS}
+)
+
+target_link_libraries(flatbufserver
+hyperion-utils
+flatbuffers
+Qt${QT_VERSION_MAJOR}::Network
+Qt${QT_VERSION_MAJOR}::Core
+)
+endif()
+
diff --git a/libsrc/forwarder/CMakeLists.txt b/libsrc/forwarder/CMakeLists.txt
new file mode 100644
index 00000000..60dc5a6b
--- /dev/null
+++ b/libsrc/forwarder/CMakeLists.txt
@@ -0,0 +1,24 @@
+
+# Define the current source locations
+SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/forwarder)
+SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/forwarder)
+
+if(ENABLE_FLATBUF_CONNECT)
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}/../../libsrc/flatbufserver
+)
+endif()
+
+FILE ( GLOB Forwarder_SOURCES "${CURRENT_HEADER_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.cpp" )
+
+add_library(forwarder ${Forwarder_SOURCES} )
+
+target_link_libraries(forwarder
+ hyperion
+ hyperion-utils
+ ${QT_LIBRARIES}
+)
+
+if(ENABLE_FLATBUF_CONNECT)
+ target_link_libraries(forwarder flatbufconnect)
+endif()
diff --git a/libsrc/hyperion/MessageForwarder.cpp b/libsrc/forwarder/MessageForwarder.cpp
similarity index 99%
rename from libsrc/hyperion/MessageForwarder.cpp
rename to libsrc/forwarder/MessageForwarder.cpp
index 591eacba..899f6e28 100644
--- a/libsrc/hyperion/MessageForwarder.cpp
+++ b/libsrc/forwarder/MessageForwarder.cpp
@@ -2,7 +2,7 @@
#include
// project includes
-#include
+#include
// hyperion includes
#include
diff --git a/libsrc/hyperion/CMakeLists.txt b/libsrc/hyperion/CMakeLists.txt
index 1430c0c0..115b0770 100644
--- a/libsrc/hyperion/CMakeLists.txt
+++ b/libsrc/hyperion/CMakeLists.txt
@@ -3,9 +3,11 @@
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/hyperion)
SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/hyperion)
+if(ENABLE_FLATBUF_SERVER)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}/../../libsrc/flatbufserver
)
+endif()
FILE ( GLOB Hyperion_SOURCES "${CURRENT_HEADER_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.cpp" )
@@ -19,18 +21,24 @@ add_library(hyperion
target_link_libraries(hyperion
blackborder
hyperion-utils
- flatbufserver
- flatbuffers
leddevice
effectengine
database
${QT_LIBRARIES}
)
-if(ENABLE_BOBLIGHT)
+if(ENABLE_BOBLIGHT_SERVER)
target_link_libraries(hyperion boblightserver)
endif()
+if(ENABLE_FLATBUF_SERVER)
+ target_link_libraries(hyperion flatbufserver)
+endif()
+
+if(ENABLE_FORWARDER)
+ target_link_libraries(hyperion forwarder)
+endif()
+
if (ENABLE_AVAHI)
target_link_libraries(hyperion bonjour)
endif ()
diff --git a/libsrc/hyperion/ComponentRegister.cpp b/libsrc/hyperion/ComponentRegister.cpp
index 84cf1895..c5e80ffa 100644
--- a/libsrc/hyperion/ComponentRegister.cpp
+++ b/libsrc/hyperion/ComponentRegister.cpp
@@ -3,6 +3,8 @@
#include
+#include
+
using namespace hyperion;
ComponentRegister::ComponentRegister(Hyperion* hyperion)
@@ -11,12 +13,45 @@ ComponentRegister::ComponentRegister(Hyperion* hyperion)
{
// init all comps to false
QVector vect;
- vect << COMP_ALL << COMP_SMOOTHING << COMP_BLACKBORDER << COMP_FORWARDER << COMP_GRABBER << COMP_V4L << COMP_LEDDEVICE;
+ vect << COMP_ALL << COMP_SMOOTHING << COMP_LEDDEVICE;
-#if defined(ENABLE_BOBLIGHT)
+ bool areScreenGrabberAvailable = !GrabberWrapper::availableGrabbers(GrabberTypeFilter::VIDEO).isEmpty();
+ bool areVideoGrabberAvailable = !GrabberWrapper::availableGrabbers(GrabberTypeFilter::VIDEO).isEmpty();
+ bool flatBufServerAvailable { false };
+ bool protoBufServerAvailable{ false };
+
+#if defined(ENABLE_FLATBUF_SERVER)
+ flatBufServerAvailable = true;
+#endif
+
+#if defined(ENABLE_PROTOBUF_SERVER)
+ protoBufServerAvailable = true;
+#endif
+
+ if (areScreenGrabberAvailable)
+ {
+ vect << COMP_GRABBER;
+ }
+
+ if (areVideoGrabberAvailable)
+ {
+ vect << COMP_V4L;
+ }
+
+ if (areScreenGrabberAvailable || areVideoGrabberAvailable || flatBufServerAvailable || protoBufServerAvailable)
+ {
+ vect << COMP_BLACKBORDER;
+ }
+
+
+#if defined(ENABLE_BOBLIGHT_SERVER)
vect << COMP_BOBLIGHTSERVER;
#endif
+#if defined(ENABLE_FORWARDER)
+ vect << COMP_FORWARDER;
+#endif
+
for(auto e : vect)
{
_componentStates.emplace(e, (e == COMP_ALL));
@@ -36,12 +71,16 @@ int ComponentRegister::isComponentEnabled(hyperion::Components comp) const
void ComponentRegister::setNewComponentState(hyperion::Components comp, bool activated)
{
- if(_componentStates[comp] != activated)
+
+ if (_componentStates.count(comp) > 0)
{
- Debug( _log, "%s: %s", componentToString(comp), (activated? "enabled" : "disabled"));
- _componentStates[comp] = activated;
- // emit component has changed state
- emit updatedComponentState(comp, activated);
+ if (_componentStates[comp] != activated)
+ {
+ Debug(_log, "%s: %s", componentToString(comp), (activated ? "enabled" : "disabled"));
+ _componentStates[comp] = activated;
+ // emit component has changed state
+ emit updatedComponentState(comp, activated);
+ }
}
}
diff --git a/libsrc/hyperion/GrabberWrapper.cpp b/libsrc/hyperion/GrabberWrapper.cpp
index cfe1cc77..eb4a3a62 100644
--- a/libsrc/hyperion/GrabberWrapper.cpp
+++ b/libsrc/hyperion/GrabberWrapper.cpp
@@ -83,58 +83,70 @@ bool GrabberWrapper::isActive() const
return _timer->isActive();
}
-QStringList GrabberWrapper::getActive(int inst) const
+QStringList GrabberWrapper::getActive(int inst, GrabberTypeFilter type) const
{
QStringList result = QStringList();
- if(GRABBER_V4L_CLIENTS.contains(inst))
- result << GRABBER_V4L_CLIENTS.value(inst);
+ if (type == GrabberTypeFilter::SCREEN || type == GrabberTypeFilter::ALL)
+ {
+ if (GRABBER_SYS_CLIENTS.contains(inst))
+ result << GRABBER_SYS_CLIENTS.value(inst);
+ }
- if(GRABBER_SYS_CLIENTS.contains(inst))
- result << GRABBER_SYS_CLIENTS.value(inst);
+ if (type == GrabberTypeFilter::VIDEO || type == GrabberTypeFilter::ALL)
+ {
+ if (GRABBER_V4L_CLIENTS.contains(inst))
+ result << GRABBER_V4L_CLIENTS.value(inst);
+ }
return result;
}
-QStringList GrabberWrapper::availableGrabbers()
+QStringList GrabberWrapper::availableGrabbers(GrabberTypeFilter type)
{
QStringList grabbers;
-#ifdef ENABLE_DISPMANX
- grabbers << "dispmanx";
-#endif
+ if (type == GrabberTypeFilter::SCREEN || type == GrabberTypeFilter::ALL)
+ {
+ #ifdef ENABLE_DISPMANX
+ grabbers << "dispmanx";
+ #endif
-#if defined(ENABLE_V4L2) || defined(ENABLE_MF)
- grabbers << "v4l2";
-#endif
+ #ifdef ENABLE_FB
+ grabbers << "framebuffer";
+ #endif
-#ifdef ENABLE_FB
- grabbers << "framebuffer";
-#endif
+ #ifdef ENABLE_AMLOGIC
+ grabbers << "amlogic";
+ #endif
-#ifdef ENABLE_AMLOGIC
- grabbers << "amlogic";
-#endif
+ #ifdef ENABLE_OSX
+ grabbers << "osx";
+ #endif
-#ifdef ENABLE_OSX
- grabbers << "osx";
-#endif
+ #ifdef ENABLE_X11
+ grabbers << "x11";
+ #endif
-#ifdef ENABLE_X11
- grabbers << "x11";
-#endif
+ #ifdef ENABLE_XCB
+ grabbers << "xcb";
+ #endif
-#ifdef ENABLE_XCB
- grabbers << "xcb";
-#endif
+ #ifdef ENABLE_QT
+ grabbers << "qt";
+ #endif
-#ifdef ENABLE_QT
- grabbers << "qt";
-#endif
+ #ifdef ENABLE_DX
+ grabbers << "dx";
+ #endif
+ }
-#ifdef ENABLE_DX
- grabbers << "dx";
-#endif
+ if (type == GrabberTypeFilter::VIDEO || type == GrabberTypeFilter::ALL)
+ {
+ #if defined(ENABLE_V4L2) || defined(ENABLE_MF)
+ grabbers << "v4l2";
+ #endif
+ }
return grabbers;
}
diff --git a/libsrc/hyperion/Hyperion.cpp b/libsrc/hyperion/Hyperion.cpp
index b7e7dd6b..1bcdbb1f 100644
--- a/libsrc/hyperion/Hyperion.cpp
+++ b/libsrc/hyperion/Hyperion.cpp
@@ -9,7 +9,11 @@
// hyperion include
#include
-#include
+
+#if defined(ENABLE_FORWARDER)
+#include
+#endif
+
#include
#include
@@ -37,7 +41,7 @@
#include
// Boblight
-#if defined(ENABLE_BOBLIGHT)
+#if defined(ENABLE_BOBLIGHT_SERVER)
#include
#endif
@@ -53,14 +57,16 @@ Hyperion::Hyperion(quint8 instance, bool readonlyMode)
, _ledDeviceWrapper(nullptr)
, _deviceSmooth(nullptr)
, _effectEngine(nullptr)
+#if defined(ENABLE_FORWARDER)
, _messageForwarder(nullptr)
+#endif
, _log(Logger::getInstance("HYPERION"))
, _hwLedCount()
, _ledGridSize(hyperion::getLedLayoutGridSize(getSetting(settings::LEDS).array()))
, _BGEffectHandler(nullptr)
, _captureCont(nullptr)
, _ledBuffer(_ledString.leds().size(), ColorRgb::BLACK)
-#if defined(ENABLE_BOBLIGHT)
+#if defined(ENABLE_BOBLIGHT_SERVER)
, _boblightServer(nullptr)
#endif
, _readOnlyMode(readonlyMode)
@@ -127,11 +133,13 @@ void Hyperion::start()
//Start in pause mode, a new priority will activate smoothing (either start-effect or grabber)
_deviceSmooth->setPause(true);
+#if defined(ENABLE_FORWARDER)
// create the message forwarder only on main instance
if (_instIndex == 0)
{
_messageForwarder = new MessageForwarder(this);
}
+#endif
// create the effect engine; needs to be initialized after smoothing!
_effectEngine = new EffectEngine(this);
@@ -155,7 +163,7 @@ void Hyperion::start()
// if there is no startup / background effect and no sending capture interface we probably want to push once BLACK (as PrioMuxer won't emit a priority change)
update();
-#if defined(ENABLE_BOBLIGHT)
+#if defined(ENABLE_BOBLIGHT_SERVER)
// boblight, can't live in global scope as it depends on layout
_boblightServer = new BoblightServer(this, getSetting(settings::BOBLSERVER));
connect(this, &Hyperion::settingsChanged, _boblightServer, &BoblightServer::handleSettingsUpdate);
@@ -177,13 +185,18 @@ void Hyperion::freeObjects()
clear(-1,true);
// delete components on exit of hyperion core
-#if defined(ENABLE_BOBLIGHT)
+#if defined(ENABLE_BOBLIGHT_SERVER)
delete _boblightServer;
#endif
+
delete _captureCont;
delete _effectEngine;
delete _raw2ledAdjustment;
+
+#if defined(ENABLE_FORWARDER)
delete _messageForwarder;
+#endif
+
delete _settingsManager;
delete _ledDeviceWrapper;
}
diff --git a/libsrc/leddevice/LedDeviceWrapper.cpp b/libsrc/leddevice/LedDeviceWrapper.cpp
index 73d2a95a..7e45b7b8 100644
--- a/libsrc/leddevice/LedDeviceWrapper.cpp
+++ b/libsrc/leddevice/LedDeviceWrapper.cpp
@@ -17,7 +17,7 @@
LedDeviceRegistry LedDeviceWrapper::_ledDeviceMap {};
-#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
QRecursiveMutex LedDeviceWrapper::_ledDeviceMapLock;
#else
QMutex LedDeviceWrapper::_ledDeviceMapLock{ QMutex::Recursive };
diff --git a/libsrc/protoserver/CMakeLists.txt b/libsrc/protoserver/CMakeLists.txt
index aae41344..dd8890b8 100644
--- a/libsrc/protoserver/CMakeLists.txt
+++ b/libsrc/protoserver/CMakeLists.txt
@@ -11,7 +11,6 @@ include_directories(
set(ProtoServer_PROTOS ${CURRENT_SOURCE_DIR}/message.proto )
protobuf_generate_cpp(ProtoServer_PROTO_SRCS ProtoServer_PROTO_HDRS ${ProtoServer_PROTOS} )
-
### Split protoclient from protoserver as protoserver relates to HyperionDaemon and standalone capture binarys can't link to it
add_library(protoclient
@@ -27,12 +26,16 @@ add_library(protoserver
)
# disable warnings for auto generated proto files, we can't change the files ....
-SET_SOURCE_FILES_PROPERTIES ( ${ProtoServer_PROTO_SRCS} ${ProtoServer_PROTO_HDRS} ${ProtoServer_PROTOS} PROPERTIES COMPILE_FLAGS -w )
+if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+ set_source_files_properties(${ProtoServer_PROTO_SRCS} ${ProtoServer_PROTO_HDRS} ${ProtoServer_PROTOS} PROPERTIES COMPILE_FLAGS "-w -Wno-return-local-addr")
+elseif(MSVC)
+ set_source_files_properties(${ProtoServer_PROTO_SRCS} ${ProtoServer_PROTO_HDRS} ${ProtoServer_PROTOS} PROPERTIES COMPILE_FLAGS "/W0")
+endif()
target_link_libraries(protoclient
hyperion
hyperion-utils
- protobuf
+ libprotobuf
Qt${QT_VERSION_MAJOR}::Gui
)
diff --git a/libsrc/protoserver/message.proto b/libsrc/protoserver/message.proto
index 9652453e..d7593c32 100644
--- a/libsrc/protoserver/message.proto
+++ b/libsrc/protoserver/message.proto
@@ -1,3 +1,4 @@
+syntax = "proto2";
package proto;
message HyperionRequest {
diff --git a/libsrc/python/PythonInit.cpp b/libsrc/python/PythonInit.cpp
index d2fd41e0..2da6b161 100644
--- a/libsrc/python/PythonInit.cpp
+++ b/libsrc/python/PythonInit.cpp
@@ -31,7 +31,8 @@ PythonInit::PythonInit()
#if defined(ENABLE_DEPLOY_DEPENDENCIES)
// Set Program name
- Py_SetProgramName(L"Hyperion");
+ wchar_t programName[] = L"Hyperion";
+ Py_SetProgramName(programName);
// set Python module path when exists
QString py_path = QDir::cleanPath(qApp->applicationDirPath() + "/../lib/python" + STRINGIFY(PYTHON_VERSION_MAJOR) + "." + STRINGIFY(PYTHON_VERSION_MINOR));
diff --git a/libsrc/ssdp/SSDPHandler.cpp b/libsrc/ssdp/SSDPHandler.cpp
index e492243a..0fc3d43a 100644
--- a/libsrc/ssdp/SSDPHandler.cpp
+++ b/libsrc/ssdp/SSDPHandler.cpp
@@ -17,7 +17,7 @@
static const QString SSDP_IDENTIFIER("urn:hyperion-project.org:device:basic:1");
-SSDPHandler::SSDPHandler(WebServer* webserver, quint16 flatBufPort, quint16 protoBufPort, quint16 jsonServerPort, quint16 sslPort, const QString& name, QObject * parent)
+SSDPHandler::SSDPHandler(WebServer* webserver, quint16 flatBufPort, quint16 protoBufPort, quint16 jsonServerPort, quint16 sslPort, const QString& name, QObject* parent)
: SSDPServer(parent)
, _webserver(webserver)
, _localAddress()
@@ -44,22 +44,31 @@ void SSDPHandler::initServer()
// announce targets
_deviceList.push_back("upnp:rootdevice");
- _deviceList.push_back("uuid:"+_uuid);
+ _deviceList.push_back("uuid:" + _uuid);
_deviceList.push_back(SSDP_IDENTIFIER);
// prep server
SSDPServer::initServer();
-
+
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
+ #if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
+ QT_WARNING_PUSH
+ QT_WARNING_DISABLE_DEPRECATED
+ #endif
+
_NCA = new QNetworkConfigurationManager(this);
connect(_NCA, &QNetworkConfigurationManager::configurationChanged, this, &SSDPHandler::handleNetworkConfigurationChanged);
+
+ #if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
+ QT_WARNING_POP
+ #endif
#endif
-
+
// listen for mSearchRequestes
connect(this, &SSDPServer::msearchRequestReceived, this, &SSDPHandler::handleMSearchRequest);
// get localAddress from interface
- if(!getLocalAddress().isEmpty())
+ if (!getLocalAddress().isEmpty())
{
_localAddress = getLocalAddress();
}
@@ -68,7 +77,7 @@ void SSDPHandler::initServer()
bool isInited = false;
QMetaObject::invokeMethod(_webserver, "isInited", Qt::BlockingQueuedConnection, Q_RETURN_ARG(bool, isInited));
- if(!_localAddress.isEmpty() && isInited)
+ if (!_localAddress.isEmpty() && isInited)
{
handleWebServerStateChange(true);
}
@@ -84,33 +93,33 @@ void SSDPHandler::handleSettingsUpdate(settings::type type, const QJsonDocument&
{
const QJsonObject& obj = config.object();
- if(type == settings::FLATBUFSERVER)
+ if (type == settings::FLATBUFSERVER)
{
- if(obj["port"].toInt() != SSDPServer::getFlatBufPort())
+ if (obj["port"].toInt() != SSDPServer::getFlatBufPort())
{
SSDPServer::setFlatBufPort(obj["port"].toInt());
}
}
- if(type == settings::PROTOSERVER)
+ if (type == settings::PROTOSERVER)
{
- if(obj["port"].toInt() != SSDPServer::getProtoBufPort())
+ if (obj["port"].toInt() != SSDPServer::getProtoBufPort())
{
SSDPServer::setProtoBufPort(obj["port"].toInt());
}
}
- if(type == settings::JSONSERVER)
+ if (type == settings::JSONSERVER)
{
- if(obj["port"].toInt() != SSDPServer::getJsonServerPort())
+ if (obj["port"].toInt() != SSDPServer::getJsonServerPort())
{
SSDPServer::setJsonServerPort(obj["port"].toInt());
}
}
- if(type == settings::WEBSERVER)
+ if (type == settings::WEBSERVER)
{
- if(obj["sslPort"].toInt() != SSDPServer::getSSLServerPort())
+ if (obj["sslPort"].toInt() != SSDPServer::getSSLServerPort())
{
SSDPServer::setSSLServerPort(obj["sslPort"].toInt());
}
@@ -127,12 +136,12 @@ void SSDPHandler::handleSettingsUpdate(settings::type type, const QJsonDocument&
void SSDPHandler::handleWebServerStateChange(bool newState)
{
- if(newState)
+ if (newState)
{
// refresh info
QMetaObject::invokeMethod(_webserver, "setSSDPDescription", Qt::BlockingQueuedConnection, Q_ARG(QString, buildDesc()));
setDescriptionAddress(getDescAddress());
- if(start())
+ if (start())
sendAnnounceList(true);
}
else
@@ -144,11 +153,15 @@ void SSDPHandler::handleWebServerStateChange(bool newState)
}
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
-void SSDPHandler::handleNetworkConfigurationChanged(const QNetworkConfiguration &config)
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+#endif
+void SSDPHandler::handleNetworkConfigurationChanged(const QNetworkConfiguration& config)
{
// get localAddress from interface
QString localAddress = getLocalAddress();
- if(!localAddress.isEmpty() && _localAddress != localAddress)
+ if (!localAddress.isEmpty() && _localAddress != localAddress)
{
// revoke old ip
sendAnnounceList(false);
@@ -160,12 +173,15 @@ void SSDPHandler::handleNetworkConfigurationChanged(const QNetworkConfiguration
sendAnnounceList(true);
}
}
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
+QT_WARNING_POP
+#endif
#endif
QString SSDPHandler::getLocalAddress() const
{
// get the first valid IPv4 address. This is probably not that one we actually want to announce
- for(const auto & address : QNetworkInterface::allAddresses())
+ for (const auto& address : QNetworkInterface::allAddresses())
{
// is valid when, no loopback, IPv4
if (!address.isLoopback() && address.protocol() == QAbstractSocket::IPv4Protocol)
@@ -178,11 +194,11 @@ QString SSDPHandler::getLocalAddress() const
void SSDPHandler::handleMSearchRequest(const QString& target, const QString& mx, const QString address, quint16 port)
{
- const auto respond = [=] () {
+ const auto respond = [=]() {
// when searched for all devices / root devices / basic device
- if(target == "ssdp:all")
+ if (target == "ssdp:all")
sendMSearchResponse(SSDP_IDENTIFIER, address, port);
- else if(target == "upnp:rootdevice" || target == "urn:schemas-upnp-org:device:basic:1" || target == SSDP_IDENTIFIER)
+ else if (target == "upnp:rootdevice" || target == "urn:schemas-upnp-org:device:basic:1" || target == SSDP_IDENTIFIER)
sendMSearchResponse(target, address, port);
};
@@ -208,7 +224,7 @@ void SSDPHandler::handleMSearchRequest(const QString& target, const QString& mx,
QString SSDPHandler::getDescAddress() const
{
- return getBaseAddress()+"description.xml";
+ return getBaseAddress() + "description.xml";
}
QString SSDPHandler::getBaseAddress() const
@@ -230,20 +246,20 @@ QString SSDPHandler::buildDesc() const
/// %8 flatbuf port 19400
return SSDP_DESCRIPTION.arg(
- getBaseAddress(),
- QString("Hyperion (%1)").arg(_localAddress),
- QString(HYPERION_VERSION),
- _uuid,
- QString::number(SSDPServer::getJsonServerPort()),
- QString::number(SSDPServer::getSSLServerPort()),
- QString::number(SSDPServer::getProtoBufPort()),
- QString::number(SSDPServer::getFlatBufPort())
+ getBaseAddress(),
+ QString("Hyperion (%1)").arg(_localAddress),
+ QString(HYPERION_VERSION),
+ _uuid,
+ QString::number(SSDPServer::getJsonServerPort()),
+ QString::number(SSDPServer::getSSLServerPort()),
+ QString::number(SSDPServer::getProtoBufPort()),
+ QString::number(SSDPServer::getFlatBufPort())
);
}
void SSDPHandler::sendAnnounceList(bool alive)
{
- for(const auto & entry : _deviceList){
+ for (const auto& entry : _deviceList) {
alive ? SSDPServer::sendAlive(entry) : SSDPServer::sendByeBye(entry);
}
}
diff --git a/libsrc/ssdp/SSDPServer.cpp b/libsrc/ssdp/SSDPServer.cpp
index c0c1d8f0..cd8e1d08 100644
--- a/libsrc/ssdp/SSDPServer.cpp
+++ b/libsrc/ssdp/SSDPServer.cpp
@@ -27,7 +27,9 @@ static const QString UPNP_ALIVE_MESSAGE = "NOTIFY * HTTP/1.1\r\n"
"NTS: ssdp:alive\r\n"
"SERVER: %4\r\n"
"USN: uuid:%5\r\n"
+#if defined(ENABLE_FLATBUF_SERVER)
"HYPERION-FBS-PORT: %6\r\n"
+#endif
"HYPERION-JSS-PORT: %7\r\n"
"HYPERION-NAME: %8\r\n"
"\r\n";
@@ -72,7 +74,9 @@ static const QString UPNP_MSEARCH_RESPONSE = "HTTP/1.1 200 OK\r\n"
"SERVER: %4\r\n"
"ST: %5\r\n"
"USN: uuid:%6\r\n"
+#if defined(ENABLE_FLATBUF_SERVER)
"HYPERION-FBS-PORT: %7\r\n"
+#endif
"HYPERION-JSS-PORT: %8\r\n"
"HYPERION-NAME: %9\r\n"
"\r\n";
@@ -175,7 +179,9 @@ void SSDPServer::sendMSearchResponse(const QString& st, const QString& senderIp,
, _serverHeader
, st
, _uuid
+#if defined(ENABLE_FLATBUF_SERVER)
, _fbsPort
+#endif
, _jssPort
, _name );
@@ -202,7 +208,9 @@ void SSDPServer::sendAlive(const QString& st)
, st
, _serverHeader
, tempUSN
+#if defined(ENABLE_FLATBUF_SERVER)
, _fbsPort
+#endif
, _jssPort
, _name );
diff --git a/libsrc/utils/Logger.cpp b/libsrc/utils/Logger.cpp
index 494fb764..2fe7f123 100644
--- a/libsrc/utils/Logger.cpp
+++ b/libsrc/utils/Logger.cpp
@@ -17,7 +17,7 @@
#include
#include
-#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
QRecursiveMutex Logger::MapLock;
#else
QMutex Logger::MapLock{ QMutex::Recursive };
diff --git a/libsrc/utils/Process.cpp b/libsrc/utils/Process.cpp
index 8522a932..232ef6a3 100644
--- a/libsrc/utils/Process.cpp
+++ b/libsrc/utils/Process.cpp
@@ -1,10 +1,25 @@
#ifdef _WIN32
+#include
+#include
#include
#include
#include
+
namespace Process {
-void restartHyperion(bool asNewProcess) {}
+void restartHyperion(bool asNewProcess)
+{
+ Logger* log = Logger::getInstance("Process");
+ Info(log, "Restarting hyperion ...");
+
+ auto arguments = QCoreApplication::arguments();
+ if (!arguments.contains("--wait-hyperion"))
+ arguments << "--wait-hyperion";
+
+ QProcess::startDetached(QCoreApplication::applicationFilePath(), arguments);
+
+ QCoreApplication::quit();
+}
QByteArray command_exec(const QString& /*cmd*/, const QByteArray& /*data*/)
{
diff --git a/libsrc/utils/SysInfo.cpp b/libsrc/utils/SysInfo.cpp
index 4eebc02b..7d0409b3 100644
--- a/libsrc/utils/SysInfo.cpp
+++ b/libsrc/utils/SysInfo.cpp
@@ -15,7 +15,7 @@
#include
#endif
-SysInfo* SysInfo::_instance = nullptr;
+std::unique_ptr SysInfo::_instance = nullptr;
SysInfo::SysInfo()
: QObject()
@@ -38,7 +38,7 @@ SysInfo::SysInfo()
SysInfo::HyperionSysInfo SysInfo::get()
{
if (SysInfo::_instance == nullptr)
- SysInfo::_instance = new SysInfo();
+ SysInfo::_instance = std::unique_ptr(new SysInfo());
return SysInfo::_instance->_sysinfo;
}
diff --git a/resources/icons/restart.svg b/resources/icons/restart.svg
new file mode 100644
index 00000000..2d36f8a6
--- /dev/null
+++ b/resources/icons/restart.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 004cda45..20ea64ba 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -46,7 +46,6 @@ parts:
- libavahi-compat-libdnssd-dev
- libturbojpeg0-dev
- libssl-dev
- - zlib1g-dev
stage-packages:
- libfontconfig1
- libfreetype6
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 87200b43..abd34199 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,34 +2,34 @@ add_subdirectory(hyperiond)
add_subdirectory(hyperion-remote)
# The following binaries are just compiled if requested
-if (ENABLE_AMLOGIC)
+if (ENABLE_AMLOGIC AND ENABLE_FLATBUF_CONNECT)
add_subdirectory(hyperion-aml)
endif()
-if(ENABLE_V4L2)
+if(ENABLE_V4L2 AND ENABLE_FLATBUF_CONNECT)
add_subdirectory(hyperion-v4l2)
endif()
-if(ENABLE_X11)
+if(ENABLE_X11 AND ENABLE_FLATBUF_CONNECT)
add_subdirectory(hyperion-x11)
endif()
-if(ENABLE_XCB)
+if(ENABLE_XCB AND ENABLE_FLATBUF_CONNECT)
add_subdirectory(hyperion-xcb)
endif()
-if(ENABLE_DISPMANX)
+if(ENABLE_DISPMANX AND ENABLE_FLATBUF_CONNECT)
add_subdirectory(hyperion-dispmanx)
endif()
-if(ENABLE_FB)
+if(ENABLE_FB AND ENABLE_FLATBUF_CONNECT)
add_subdirectory(hyperion-framebuffer)
endif()
-if(ENABLE_QT)
+if(ENABLE_QT AND ENABLE_FLATBUF_CONNECT)
add_subdirectory(hyperion-qt)
endif()
-if(ENABLE_OSX)
+if(ENABLE_OSX AND ENABLE_FLATBUF_CONNECT)
add_subdirectory(hyperion-osx)
endif()
diff --git a/src/hyperion-aml/CMakeLists.txt b/src/hyperion-aml/CMakeLists.txt
index c67da159..11c641a0 100644
--- a/src/hyperion-aml/CMakeLists.txt
+++ b/src/hyperion-aml/CMakeLists.txt
@@ -25,7 +25,7 @@ add_executable(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
commandline
hyperion-utils
- flatbufserver
+ flatbufconnect
flatbuffers
amlogic-grabber
framebuffer-grabber
diff --git a/src/hyperion-aml/hyperion-aml.cpp b/src/hyperion-aml/hyperion-aml.cpp
index 4a678df8..c0391b78 100644
--- a/src/hyperion-aml/hyperion-aml.cpp
+++ b/src/hyperion-aml/hyperion-aml.cpp
@@ -44,7 +44,7 @@ int main(int argc, char ** argv)
// create the option parser and initialize all parser
Parser parser("AmLogic capture application for Hyperion. Will automatically search a Hyperion server if -a option isn't used. Please note that if you have more than one server running it's more or less random which one will be used.");
- IntOption & argFps = parser.add ('f', "framerate", "Capture frame rate. %1", QString("Range %1-%2fps, default: [%3]").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
+ IntOption & argFps = parser.add ('f', "framerate", QString("Capture frame rate. Range %1-%2fps").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ), QString::number(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
IntOption & argSizeDecimation = parser.add ('s', "size-decimator", "Decimation factor for the output image size [default=%1]", QString::number(GrabberWrapper::DEFAULT_PIXELDECIMATION), 1);
IntOption & argCropLeft = parser.add (0x0, "crop-left", "Number of pixels to crop from the left of the picture before decimation");
diff --git a/src/hyperion-dispmanx/CMakeLists.txt b/src/hyperion-dispmanx/CMakeLists.txt
index e9e6031b..bc96cb35 100644
--- a/src/hyperion-dispmanx/CMakeLists.txt
+++ b/src/hyperion-dispmanx/CMakeLists.txt
@@ -33,7 +33,7 @@ add_executable( ${PROJECT_NAME}
target_link_libraries( ${PROJECT_NAME}
commandline
hyperion-utils
- flatbufserver
+ flatbufconnect
flatbuffers
dispmanx-grabber
${Dispmanx_LIBRARIES}
diff --git a/src/hyperion-dispmanx/hyperion-dispmanx.cpp b/src/hyperion-dispmanx/hyperion-dispmanx.cpp
index 0ae0ca1b..42900ccf 100644
--- a/src/hyperion-dispmanx/hyperion-dispmanx.cpp
+++ b/src/hyperion-dispmanx/hyperion-dispmanx.cpp
@@ -45,7 +45,7 @@ int main(int argc, char ** argv)
// create the option parser and initialize all parameters
Parser parser("Dispmanx capture application for Hyperion. Will automatically search a Hyperion server if -a option isn't used. Please note that if you have more than one server running it's more or less random which one will be used.");
- IntOption & argFps = parser.add ('f', "framerate", "Capture frame rate. %1", QString("Range %1-%2fps, default: [%3]").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
+ IntOption & argFps = parser.add ('f', "framerate", QString("Capture frame rate. Range %1-%2fps").arg(GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ).arg(GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ), QString::number(GrabberWrapper::DEFAULT_RATE_HZ), GrabberWrapper::DEFAULT_MIN_GRAB_RATE_HZ, GrabberWrapper::DEFAULT_MAX_GRAB_RATE_HZ);
IntOption & argSizeDecimation = parser.add ('s', "size-decimator", "Decimation factor for the output image size [default=%1]", QString::number(GrabberWrapper::DEFAULT_PIXELDECIMATION), 1);
IntOption & argCropLeft = parser.add (0x0, "crop-left", "Number of pixels to crop from the left of the picture before decimation");
diff --git a/src/hyperion-framebuffer/CMakeLists.txt b/src/hyperion-framebuffer/CMakeLists.txt
index 7b577c28..dd65d8db 100644
--- a/src/hyperion-framebuffer/CMakeLists.txt
+++ b/src/hyperion-framebuffer/CMakeLists.txt
@@ -25,7 +25,7 @@ add_executable( ${PROJECT_NAME}
target_link_libraries( ${PROJECT_NAME}
commandline
hyperion-utils
- flatbufserver
+ flatbufconnect
flatbuffers
framebuffer-grabber
ssdp
diff --git a/src/hyperion-framebuffer/hyperion-framebuffer.cpp b/src/hyperion-framebuffer/hyperion-framebuffer.cpp
index 7b735ce4..34001833 100644
--- a/src/hyperion-framebuffer/hyperion-framebuffer.cpp
+++ b/src/hyperion-framebuffer/hyperion-framebuffer.cpp
@@ -46,7 +46,7 @@ int main(int argc, char ** argv)
Option & argDevice = parser.add